Ejemplo n.º 1
0
        public MainForm()
        {
            InitializeComponent();

            keyboardHookManager = new KeyboardHookListener(new GlobalHooker());
            keyboardHookManager.Enabled = true;
            keyboardHookManager.KeyUp += KeyBoardHook_KeyUp;

            if (Properties.Settings.Default.FirstRun)
            {
                SettingsDialog settings = new SettingsDialog();
                if (settings.Created == false)
                {
                    settings.ShowDialog();
                }

                Properties.Settings.Default.FirstRun = false;
            }

            messageTextBox.Text = Properties.Settings.Default.Message;
            this.Message = messageTextBox.Text;

            if (Properties.Settings.Default.SaveCount)
            {
                Count = Properties.Settings.Default.Count;
                currentCountLabel.Text = Properties.Settings.Default.Count.ToString();
            }
            else
            {
                Count = 0;
            }
        }
Ejemplo n.º 2
0
 private void settingsButton_Click(object sender, EventArgs e)
 {
     this.onOffLabel.Image = global::SimpleOnScreenDeathCounter.Properties.Resources.RedOFF;
     Properties.Settings.Default.HotKeyEnabled = false;
     SettingsDialog settings = new SettingsDialog();
     if (settings.Created == false)
     {
         settings.ShowDialog();
     }
 }