private void Items_Disposed(object sender, EventArgs e) { if (this.world.finish == null) { this.items = new Toolbox(this); this.items.Show(); items.Disposed += Items_Disposed; DialogResult dialogResult = MessageBox.Show("This level does not have a finish yet, please add a finish", "Error", MessageBoxButtons.OK); } else { this.save(); this.startForm.Show(); } }
private void Designer_Load(object sender, EventArgs e) { // Set initial location this.Location = this.startForm.Location; // Set the initial size this.setFullScreenSize(this, null); // Subscribe to the screen properties Properties.Screen.Default.PropertyChanged += setFullScreenSize; // Add onclick listener this.MouseDown += Designer_Click; // Add OnMouseUp Listerer this.MouseUp += stopTimer; // Add Event to MouseDownTimer this.MouseDownLeftTimer.Tick += addObject; this.MouseDownRightTimer.Tick += deleteObject; // Create the form to hold the items this.items = new Toolbox(this); this.items.Disposed += Items_Disposed; // Show the item form this.items.Show(); }