Esempio n. 1
0
        public Tool SetCurrentTool(ControlType type)
        {
            Tool tool = null;

            switch (type)
            {
            case ControlType.LABEL:
                tool = new LabelControlTool();
                break;

            case ControlType.BUTTON:
                tool = new ButtonControlTool();
                break;

            case ControlType.COMBOBOX:
                tool = new ComboBoxControlTool();
                break;

            case ControlType.TEXTBOX:
                tool = new TextBoxControlTool();
                break;

            case ControlType.CHECKBOX:
                tool = new CheckBoxControlTool();
                break;

            case ControlType.RADIOBUTTON:
                tool = new RadioButtonControlTool();
                break;

            case ControlType.SELECT:
                tool = new SelectorTool();
                break;

            case ControlType.LINE:
                tool = new LineControlTool();
                break;
            }
            return(tool);
        }
Esempio n. 2
0
 private void FormControl_Load(object sender, EventArgs e)
 {
     CurrentTool = new SelectorTool();
     OnInit(sender, e);
 }