Esempio n. 1
0
        private void toolStripButtonClick(object sender, EventArgs e)
        {
            ToolStripButton toolStripButton = sender as ToolStripButton;
            ToolStripAction action          = (ToolStripAction)toolStripButton.Tag;

            StripButtonClickHandler?.Invoke(sender, new ToolStripEventArgs(action));
            RefreshButtonState();
        }
Esempio n. 2
0
        public void SetMeasureTool(ToolStripAction action)
        {
            switch (action)
            {
            case ToolStripAction.Line:
                CommandLine();
                break;

            case ToolStripAction.Rectangle:
                CommandRectangle();
                break;

            case ToolStripAction.Ellipse:
                CommandEllipse();
                break;

            case ToolStripAction.Polygon:
                CommandPolyLine();
                break;

            case ToolStripAction.Laser:
                if (LaserType == LaserType.SaturnFixed)
                {
                    CommandCircle();
                }
                else if (LaserType == LaserType.SaturnActive)
                {
                    CommandMultipleCircle();
                }
                break;

            case ToolStripAction.Move:
                CommandMove();
                break;

            default:
                CommandPointer();
                break;
            }
        }
Esempio n. 3
0
 /// <summary>
 /// set cursor shape when click toolstrip button
 /// </summary>
 /// <param name="action"></param>
 /// <param name="isDoubleClick"></param>
 public void SetMeasureTool(ToolStripAction action, bool isDoubleClick)
 {
     SetMeasureTool(action);
 }
Esempio n. 4
0
 public ToolStripEventArgs(ToolStripAction action)
 {
     this.action = action;
 }