Interaction logic for GlobalSettingDialog.xaml
Inheritance: MahApps.Metro.Controls.MetroWindow
Exemplo n.º 1
0
        private void SettingButton_Click(object sender, RoutedEventArgs e)
        {
            Dialogs.GlobalSettingDialog gd = new Dialogs.GlobalSettingDialog();
            gd.Owner = this;
            int  mi        = Properties.Settings.Default.monitorInterval;
            bool watchProc = Properties.Settings.Default.watchProcess;

            if (gd.ShowDialog() == true)
            {
                GameListView.Items.Refresh();
                RegisterInStartup(Properties.Settings.Default.setStartUp);
                bool watchProc_a = Properties.Settings.Default.watchProcess;
                if (watchProc != watchProc_a)
                {
                    WatchProc = watchProc_a;
                }

                if (mi != Properties.Settings.Default.monitorInterval)
                {
                    watchProcTimer.Stop();
                    watchProcTimer.Interval = new TimeSpan(0, 0, Properties.Settings.Default.monitorInterval);
                    watchProcTimer.Start();
                }
            }
        }
Exemplo n.º 2
0
		private void SettingButton_Click(object sender, RoutedEventArgs e)
		{
			Dialogs.GlobalSettingDialog gd = new Dialogs.GlobalSettingDialog();
			gd.Owner = this;
			int mi = Properties.Settings.Default.monitorInterval;
			bool watchProc = Properties.Settings.Default.watchProcess;
			if (gd.ShowDialog() == true)
			{
				GameListView.Items.Refresh();
				RegisterInStartup(Properties.Settings.Default.setStartUp);
				bool watchProc_a = Properties.Settings.Default.watchProcess;
				if (watchProc != watchProc_a)
				{
					WatchProc = watchProc_a;
				}

				if (mi != Properties.Settings.Default.monitorInterval)
				{
					watchProcTimer.Stop();
					watchProcTimer.Interval = new TimeSpan(0, 0, Properties.Settings.Default.monitorInterval);
					watchProcTimer.Start();
				}
			}
		}