コード例 #1
0
		public MainWindow()
		{

			if (Settings.Default.UpgradeRequired)
			{
				Settings.Default.Upgrade();
				Settings.Default.UpgradeRequired = false;
				Settings.Default.Save();
			}
		

			InitializeComponent();
			tbico.DoubleClickCommand = new ShowAppCommand(this);
			tbico.DataContext = this;

			if (Settings.Default.Do_minimize)
			{
				this.Hide();
				Settings.Default.Do_minimize = false;
				Settings.Default.Save();
			}


			db = new DBManager(Utility.userDBPath);
			Utility.im = new InformationManager(Utility.infoDBPath);

			items = new ObservableCollection<GameExecutionInfo>();
			db.LoadGame(items);

			GameListView.ItemsSource = items;
			GameListView.SelectedItem = null;
			UpdateStatus();
			OnPropertyChanged("ItemCount");

			_hotkey = new HotKey(Key.F9, KeyModifier.Alt, OnHotKeyHandler_WatchProc);
			_hotkey = new HotKey(Key.F8, KeyModifier.Alt, OnHotKeyHandler_ErogeHelper);

			RegisterInStartup(Properties.Settings.Default.setStartUp);

			watchProcTimer = new System.Windows.Threading.DispatcherTimer();
			watchProcTimer.Tick += new EventHandler(dispatcherTimer_Tick);
			watchProcTimer.Interval = new TimeSpan(0, 0, Properties.Settings.Default.monitorInterval);
			watchProcTimer.Start();

			if (Settings.Default.checkUpdate)
			{
				Thread t = new Thread(doCheckUpdate);
				t.Start();
			}

		}