public MainWindow() { InitializeComponent(); App._naviTest = FrameTest.NavigationService; App._naviConf = FrameConf.NavigationService; App._naviHelp = FrameHelp.NavigationService; App._naviInfo = FrameInfo.NavigationService; this.MouseLeftButtonDown += (sender, e) => this.DragMove();//ウィンドウ全体でドラッグ可能にする this.DataContext = State.VmMainWindow; //タイマーの設定 timerTextInput = new DispatcherTimer(DispatcherPriority.Normal); timerTextInput.Interval = TimeSpan.FromMilliseconds(1000); timerTextInput.Tick += timerTextInput_Tick; timerTextInput.Start(); GetInfo(); //カレントディレクトリの取得 State.CurrDir = Directory.GetCurrentDirectory(); //試験用パラメータのロード State.LoadConfigData(); FindSerialPort.GetDeviceNames(); General.Init周辺機器();//非同期処理です InitMainForm();//メインフォーム初期 this.WindowState = WindowState.Maximized; //メタルモード設定(デフォルトは禁止とする) Flags.MetalModeSw = false; State.SetSerialInfo(); State.VmMainWindow.SerialNumber = State.シリアルナンバー年月部分 + State.NewSerial.ToString("D5"); }