private void OnNewImageClicked(object sender, EventArgs e) { GameData.Image image = new GameData.Image(); image.Name = "NewImage"; NewImage(panel1.Tag as Imageset, image); }
private void panel1_MouseUp(object sender, MouseEventArgs e) { if (panel1.Capture) { GameData.Image image = new GameData.Image(); image.Name = "NewImage"; image.X = boundPanel.Location.X; image.Y = boundPanel.Location.Y; image.Width = boundPanel.Width; image.Height = boundPanel.Height; NewImage(panel1.Tag as Imageset, image); } boundPanel.Visible = false; panel1.Capture = false; }
private void OnNewImageClicked(object sender, EventArgs e) { Imageset imageset = panel1.Tag as Imageset; if (imageset == null) return; GameData.Image image = new GameData.Image(); image.Name = "NewImage"; SettingDlg dlg = new SettingDlg("New image", image); if (dlg.ShowDialog() != DialogResult.OK) return; if (imageset.Contains(image.Name)) { MessageBox.Show(String.Format("The image '{0}' already exist!!", image.Name)); return; } imageset.Add(image); ShowImageset(imageset); listView2.Items[listView2.Items.Count - 1].Selected = true; }