Ejemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();
            App._naviTest    = FrameTest.NavigationService;
            App._naviConf    = FrameConf.NavigationService;
            App._naviHelp    = FrameHelp.NavigationService;
            App._naviErrInfo = FrameErrInfo.NavigationService;

            this.MouseLeftButtonDown += (sender, e) => this.DragMove();//ウィンドウ全体でドラッグ可能にする

            this.DataContext = State.VmMainWindow;



            //タイマーの設定
            timerStartCamera          = new DispatcherTimer(DispatcherPriority.Normal);
            timerStartCamera.Interval = TimeSpan.FromMilliseconds(1000);
            timerStartCamera.Tick    += (object sender, EventArgs e) =>
            {
                if (Flags.StateCamera)
                {
                    timerStartCamera.Stop();
                    General.cam.Start();
                    General.cam.ImageOpacity = Constants.OpacityImgMin;
                }
            };
            timerStartCamera.Start();

            GetInfo();

            //カレントディレクトリの取得
            State.CurrDir = Directory.GetCurrentDirectory();

            //試験用パラメータのロード
            State.LoadConfigData();

            General.Init周辺機器();                    //非同期処理です

            InitMainForm();                        //メインフォーム初期

            Flags.PressOpenCheckBeforeTest = true; //アプリ立ち上げ時はtrueにしておく
        }