コード例 #1
0
        private bool allowClose   = true;     //SetVisibleCore(), OnFormClosing()

        public MainForm()
        {
            if (LogInStart.SignIntime() < 20)
            {
                allowVisible = false;
                allowClose   = false;
            }


            InitializeComponent();

            StartWithWindows.Set(true); // this function is start with running operating system.

            InitUI();

            ScheduleStore.ReadStore();  // Read ScheduleDB

            if (!ScheduleStore.doingSchedule)
            {
                InitComponentEnable();
            }
            else
            {
                ScheduleStoreInitComponent();
                StartShutDown();
            }
        }
コード例 #2
0
ファイル: SettingsViewModel.cs プロジェクト: TheSylence/GSD
        private void ExecuteSaveCommand()
        {
            Settings.Set(SettingKeys.Accent, SelectedAccent.Name);
            Settings.Set(SettingKeys.Theme, SelectedTheme.Name);
            Settings.Set(SettingKeys.ExpandEntries, ExpandEntries.ToString());
            Settings.Set(SettingKeys.Language, SelectedLanguage.IetfLanguageTag);
            Settings.Set(SettingKeys.StartWithWindows, StartWithWindows.ToString());
            Settings.Set(SettingKeys.StartMinimized, StartMinimized.ToString());
            Settings.Set(SettingKeys.CloseToTray, CloseToTray.ToString());

            Themes.ChangeStyle(SelectedTheme.Name, SelectedAccent.Name);

            Startup.SetStartup(StartWithWindows, Constants.AutostartArgument);
        }
コード例 #3
0
        public MainForm()
        {
            InitializeComponent();

            FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(Application.ExecutablePath);

            notifyIcon.Text = Text = "GS Sound Helper - " + fvi.FileVersion;

            InitKeysAndModifiers();

            keyboardHook.KeyPressed += new EventHandler <KeyPressedEventArgs>(KeyboardHook_KeyPressed);
            keyboardHook.RegisterHotKey(Modifiers, Key);

            if (SoundHelper.GetVolume(out int level) && level == 0)
            {
                Mute = true;
            }

            SetNotifyIcon(Mute);
            chkRunWithWindows.Checked = StartWithWindows.IsAdded();
            notifyIcon.Visible        = true;
        }
コード例 #4
0
 public void TestStartWithWindows()
 {
     StartWithWindows.IsAdded();
 }