Exemplo n.º 1
0
        public MultiControl(int multiCount, Panel container, PortControl portControl)
        {
            _portControl             = portControl;
            MultiCommands            = new MultiCommands();
            atCommands               = MultiCommands.Commands;
            MultiCommands.Circle     = false;
            MultiCommands.CircleTime = 1000;
            MultiCommands.Count      = multiCount;
            atCommands               = new List <ATCommand>();
            for (int i = 0; i < MultiCommands.Count; i++)
            {
                ATCommand atCommand = new ATCommand();
                atCommand.Index = i;
                atCommands.Add(atCommand);
            }
            //atCommandsTemp = atCommands;
            copyCommand();
            panel1            = container;
            panel1.Scroll    += Panel1_Scroll;
            panel1.MouseMove += Panel1_MouseMove;
            PanelAddItems(panel1);

            btnSave             = panel1.FindForm().Controls.Find("btnMCPDSave", true)[0] as Button;
            btnRead             = panel1.FindForm().Controls.Find("btnMCPDRead", true)[0] as Button;
            cboxMCCircle        = panel1.FindForm().Controls.Find("cboxMCCircle", true)[0] as CheckBox;
            cboxMCCircle.Click += CboxMCCircle_Click;
            btnSave.Click      += BtnSave_Click;
            btnRead.Click      += BtnRead_Click;
            Button btnMCClear = panel1.FindForm().Controls.Find("btnMCClear", true)[0] as Button;

            btnMCClear.Click += BtnMCClear_Click;

            Button btnAddItem = panel1.FindForm().Controls.Find("btnMCAddOne", true)[0] as Button;
            Button btnSubItem = panel1.FindForm().Controls.Find("btnMCSubOne", true)[0] as Button;

            btnAddItem.Click += BtnAddItem_Click;
            btnSubItem.Click += BtnSubItem_Click;

            rbAll = panel1.FindForm().Controls.Find("rbAll", true)[0] as RadioButton;
            rbSel = panel1.FindForm().Controls.Find("rbSelected", true)[0] as RadioButton;
        }
Exemplo n.º 2
0
 public MultiControl(MultiCommands multicommands)
 {
     MultiCommands = multicommands;
 }