Ejemplo n.º 1
0
 private void panel1_MouseClick(object sender, MouseEventArgs e)
 {
     if (toolSelected == null && select == false)
     {
         DialogResult box2;
         box2 = MessageBox.Show("Please, Select Shape", "Error", MessageBoxButtons.RetryCancel);
         if (box2 == DialogResult.Cancel)
         {
             this.Dispose();
         }
     }
     else if (selectTool.isActive == true)
     {
         /*deselectObject();
          * initial = e.Location;
          * foreach (AObject Object in listObject)
          * {
          *  if (Object.Select(e.Location) == true)
          *  {
          *      shouldPaint = true;
          *      objectSelected = Object;
          *      Object.DrawEdit();
          *      Object.DrawHandle();
          *      break;
          *  }
          * }*/
         //if (toolSelected.MouseClick(sender,e,listObject)==true)
         if (toolSelected.MouseClick(sender, e, drawables) == true)
         {
             //System.Diagnostics.Debug.WriteLine("Bisa");
             shouldPaint = true;
         }
     }
 }
Ejemplo n.º 2
0
        private void panel1_MouseClick_1(object sender, MouseEventArgs e)
        {
            if (toolSelected == null && select == false)
            {
                DialogResult box2;
                box2 = MessageBox.Show("Please, Select Shape", "Error", MessageBoxButtons.RetryCancel);
                if (box2 == DialogResult.Cancel)
                {
                    this.Dispose();
                }
            }
            else if (selectTool.isActive == true)

            {
                if (toolSelected.MouseClick(sender, e, drawables) == true)
                {
                    System.Diagnostics.Debug.WriteLine("Bisa");
                    shouldPaint = true;
                }
            }
        }