Exemple #1
0
 private void chkStartWithWindows_CheckedChanged(object sender, EventArgs e)
 {
     if (AutoStarter.IsAutoStartEnabled != chkStartWithWindows.Checked)
     {
         if (AutoStarter.IsAutoStartEnabled)
         {
             AutoStarter.UnSetAutoStart();
         }
         else
         {
             AutoStarter.SetAutoStart();
         }
     }
 }
Exemple #2
0
        private void Save_Button_Click(object sender, EventArgs e)
        {
            if (this.Startup_Check.Checked)
            {
                if (AutoStarter.IsAutoStartEnabled)
                {
                    AutoStarter.UnSetAutoStart();
                }

                AutoStarter.SetAutoStart();
            }
            else
            {
                AutoStarter.UnSetAutoStart();
            }

            if (this.ShowStats_Check.Checked)
            {
                GuiManipulator.CanShowStatistics = true;
            }
            else
            {
                GuiManipulator.CanShowStatistics = false;
            }

            Properties.Settings.Default.AlertForLowAmountItems = this.AlertForAmount_Check.Checked;
            Properties.Settings.Default.LowAmountTheresold     = Convert.ToInt32(this.LowAmountTheresold_Num.Value);
            Properties.Settings.Default.LowAmountAlertColor    = this.LowAmountColor_Preview_Label.BackColor;

            Properties.Settings.Default.AlertForUnpricedItems = this.AlertForUnpriced_Check.Checked;
            Properties.Settings.Default.UnpricedAlertColor    = this.Unpriced_Color_Preview_Label.BackColor;

            Properties.Settings.Default.PlaySoundOnScanned = this.Sound_Check.Checked;
            Properties.Settings.Default.SoundFileLocation  = (this.Sound_Combo.SelectedItem as SoundEntity).FilePath;

            Properties.Settings.Default.Save();

            this.Close();
        }