示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void GlControl_MouseUp(object sender, MouseEventArgs e)
        {
            // Middle button
            if (e.Button == MouseButtons.Middle)
            {
                Cursor = Cursors.Default;
                return;
            }

            // Left mouse button
            else if (e.Button == MouseButtons.Left)
            {
                if (ZoneBox.Checked)
                {
                    DungeonEye.Forms.Wizards.NewNameWizard wizard = new DungeonEye.Forms.Wizards.NewNameWizard(string.Empty);
                    if (wizard.ShowDialog() == DialogResult.OK)
                    {
                        CurrentZone.Name = wizard.NewName;
                        Maze.Zones.Add(CurrentZone);
                        //RebuildZones();
                    }
                    else
                    {
                        CurrentZone = null;
                    }

                    ZoneBox.Checked = false;
                }

                DragPreview = false;
                return;
            }
        }
示例#2
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void GlControl_MouseUp(object sender, MouseEventArgs e)
		{

			// Middle button
			if (e.Button == MouseButtons.Middle)
			{
				Cursor = Cursors.Default;
				return;
			}

			// Left mouse button
			else if (e.Button == MouseButtons.Left)
			{
				if (ZoneBox.Checked)
				{
					DungeonEye.Forms.Wizards.NewNameWizard wizard = new DungeonEye.Forms.Wizards.NewNameWizard(string.Empty);
					if (wizard.ShowDialog() == DialogResult.OK)
					{
						CurrentZone.Name = wizard.NewName;
						Maze.Zones.Add(CurrentZone);
						//RebuildZones();
					}
					else
					{
						CurrentZone = null;
					}

					ZoneBox.Checked = false;
				}

				DragPreview = false;
				return;
			}


		}