コード例 #1
0
        public MainWindow()
        {
            InitializeComponent();
            LoadMachineSettings();
            SamlightForm smFrm = new SamlightForm();

            SLMgr = new SamLightClass(smFrm.GetControl());
            mySet = new SettingsMenu(this);
            mySet.GetSaveBtnControl().MouseDown += SettingSaveBtn_MouseDown;
            myPaintCtrl = new PaintControl(SLMgr);
            UpdateLanguage();
            UpdateUIColor();
            if (Para.AutoStartSamlightSW)
            {
                string exeString = Para.SamlightAppPath;//@"D:\scaps\samlight\sam_light.exe";
                if (!Helper.IsProcessOpen("sam_light"))
                {
                    Process.Start(exeString);
                    //using (Process exeProcess = Process.Start(exeString))
                    //{
                    //    exeProcess.WaitForExit();
                    //}
                }
            }
            SLMgr.HideSamlightWindow();

            //SLMgr.Get_Output(5);
            //SLMgr.Get_Output(0);
            //SLMgr.Get_Output(1);
            //SLMgr.Get_Output(2);
            //SLMgr.Get_Output(3);
            //SLMgr.Get_Output(4);

            VersionLbl.Content = Para.SWVersion;
        }
コード例 #2
0
        public PaintControl(SamLightClass mySL)
        {
            InitializeComponent();
            SLMgr        = mySL;
            myPaint      = new PaintObj(inkC, MainImg);
            myPaintMenu  = new PaintPhotoMenu(myPaint);
            myHandMenu   = new PaintHandMenu(myPaint);
            myTypeMenu   = new PaintTypeMenu(myPaint);
            myWebCamMenu = new WebCamControl();
            //2017/7/10

            myProcess = new Processing();
            //PaintMenuPnl.Children.Add(myMainMenu);
            AssignMenuEvent();
            StartJPTWebCam();
            MinimizedWEbCam();
            BackImgPnl.Visibility  = System.Windows.Visibility.Hidden;
            AlignImgPnl.Visibility = System.Windows.Visibility.Hidden;
        }