Esempio n. 1
0
        /// <summary>
        /// initialize all the base controls
        /// </summary>
        private void InitializeControls()
        {
            CtrlFactory.InitializeCtrlFactory(this);
            controls = new List <BaseCtrl>();
            controls.Add(CtrlFactory.GetCtrlFactory().GetCtrlByType <LaserCtrl>(CtrlType.LaserCtrl));
            controls.Add(CtrlFactory.GetCtrlFactory().GetCtrlByType <LaserAppearanceCtrl>(CtrlType.LaserAppreance));
            controls.Add(CtrlFactory.GetCtrlFactory().GetCtrlByType <StatisticsCtrl>(CtrlType.StatisticsCtrl));
            controls.Add(CtrlFactory.GetCtrlFactory().GetCtrlByType <RulerAppearanceCtrl>(CtrlType.RulerAppearanceCtrl));

            settingCtrl = CtrlFactory.GetCtrlFactory().GetCtrlByType <SettingCtrl>(CtrlType.SettingCtrl);
            settingCtrl.UpdateSimulatorImageHandler += UpdateSimulatorImageHandler;
            //settingCtrl.UpdateTimerStatesHandler += UpdateTimerStatesHandler;
            controls.Add(settingCtrl);
            controls.Add(CtrlFactory.GetCtrlFactory().GetCtrlByType <LaserAlignment>(CtrlType.LaserAlignment));
            controls.Add(CtrlFactory.GetCtrlFactory().GetCtrlByType <LaserHoleSize>(CtrlType.LaserHoleSize));
            serialPortConfigCtrl = CtrlFactory.GetCtrlFactory().GetCtrlByType <SerialPortConfigCtrl>(CtrlType.SerialPort);
            controller           = new IController(serialPortConfigCtrl);
            controls.Add(serialPortConfigCtrl);
        }
Esempio n. 2
0
 /// <summary>
 /// first shold initialize ZWPictureBox
 /// </summary>
 /// <param name="ZWPictureBox"></param>
 public static void InitializeCtrlFactory(ZWPictureBox pictureBox)
 {
     ctrlFactory = new CtrlFactory(pictureBox);
 }