forward/back buttons working & initial "save"
This commit is contained in:
		
							
								
								
									
										3
									
								
								SpriteLibrary/SpriteEntryForm.Designer.cs
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										3
									
								
								SpriteLibrary/SpriteEntryForm.Designer.cs
									
									
									
										generated
									
									
									
								
							@@ -171,6 +171,7 @@
 | 
				
			|||||||
            this.btnApply.TabIndex = 10;
 | 
					            this.btnApply.TabIndex = 10;
 | 
				
			||||||
            this.btnApply.Text = "Apply";
 | 
					            this.btnApply.Text = "Apply";
 | 
				
			||||||
            this.btnApply.UseVisualStyleBackColor = true;
 | 
					            this.btnApply.UseVisualStyleBackColor = true;
 | 
				
			||||||
 | 
					            this.btnApply.Click += new System.EventHandler(this.btnApply_Click);
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // btnNewSprite
 | 
					            // btnNewSprite
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
@@ -222,6 +223,7 @@
 | 
				
			|||||||
            this.btnBack.TabIndex = 16;
 | 
					            this.btnBack.TabIndex = 16;
 | 
				
			||||||
            this.btnBack.Text = "<";
 | 
					            this.btnBack.Text = "<";
 | 
				
			||||||
            this.btnBack.UseVisualStyleBackColor = true;
 | 
					            this.btnBack.UseVisualStyleBackColor = true;
 | 
				
			||||||
 | 
					            this.btnBack.Click += new System.EventHandler(this.btnBack_Click);
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // btnFwd
 | 
					            // btnFwd
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
@@ -232,6 +234,7 @@
 | 
				
			|||||||
            this.btnFwd.TabIndex = 17;
 | 
					            this.btnFwd.TabIndex = 17;
 | 
				
			||||||
            this.btnFwd.Text = ">";
 | 
					            this.btnFwd.Text = ">";
 | 
				
			||||||
            this.btnFwd.UseVisualStyleBackColor = true;
 | 
					            this.btnFwd.UseVisualStyleBackColor = true;
 | 
				
			||||||
 | 
					            this.btnFwd.Click += new System.EventHandler(this.btnFwd_Click);
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // lblCountSprites
 | 
					            // lblCountSprites
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -280,5 +280,37 @@ namespace SpriteLibrary
 | 
				
			|||||||
            WeAreDragging = false;
 | 
					            WeAreDragging = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private void btnApply_Click(object sender, EventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if(CurrentSIIndex >0 && CurrentSIIndex < SpriteInformation.Count)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                SpriteInformation[CurrentSIIndex].CopyFrom(TempInformation);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                SpriteInformation.Add(TempInformation);
 | 
				
			||||||
 | 
					                CurrentSIIndex = SpriteInformation.IndexOf(TempInformation);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            UpdateMenu();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private void btnFwd_Click(object sender, EventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if (SpriteInformation.Count == 0) return; //nothing to do 
 | 
				
			||||||
 | 
					            CurrentSIIndex++;
 | 
				
			||||||
 | 
					            if (CurrentSIIndex >= SpriteInformation.Count) CurrentSIIndex = 0;
 | 
				
			||||||
 | 
					            SpriteInformationToForm();
 | 
				
			||||||
 | 
					            UpdateMenu();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private void btnBack_Click(object sender, EventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if (SpriteInformation.Count == 0) return; //nothing to do
 | 
				
			||||||
 | 
					            CurrentSIIndex--;
 | 
				
			||||||
 | 
					            if (CurrentSIIndex < 0) CurrentSIIndex = SpriteInformation.Count - 1;
 | 
				
			||||||
 | 
					            SpriteInformationToForm();
 | 
				
			||||||
 | 
					            UpdateMenu();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user