private void OnCurrentPresetChanged()
        {
            if (!this.CurrentPreset.IsEmpty()) //if preset is named
            {
                this.Text = HelperFunctions.GetApplicationName() + " - " + this.CurrentPreset.PresetName;
                if (!timer1.Enabled) //only allow deleting presets if timer is off i.e. monitoring is stopped
                {
                    if (this.CurrentPreset.UserDefined)
                    {
                        toolStripMenuItemDeletePreset.Enabled = true;
                    }
                    else
                    {
                        toolStripMenuItemDeletePreset.Enabled = false;
                    }
                }

                trackBar1.Value = this.CurrentPreset.Dx;
                trackBar2.Value = this.CurrentPreset.Dy;
                trackBar3.Value = this.CurrentPreset.WaitMs;
                trackBar4.Value = this.CurrentPreset.DelayMs;
            }
            else
            {
                this.Text = HelperFunctions.GetApplicationName();
                toolStripMenuItemDeletePreset.Enabled = false;
            }
        }
Esempio n. 2
0
        private void UpdateTrackbarValuesAndGUI()
        {
            if (!this.CurrentPreset.IsEmpty()) //if preset is named
            {
                this.Text = HelperFunctions.GetApplicationName() + " - " + this.CurrentPreset.PresetName;
                toolStripStatusLabel1.Text = $"Loaded preset {this.CurrentPreset.PresetName}";

                if (!poller.Activated) //only allow deleting presets if monitoring is stopped
                {
                    if (this.CurrentPreset.UserDefined)
                    {
                        toolStripMenuItemDeletePreset.Enabled = true;
                    }
                    else
                    {
                        toolStripMenuItemDeletePreset.Enabled = false;
                    }
                }

                trackBarShotInterval.Value = this.CurrentPreset.ShotInterval;
                trackBarDy.Value           = this.CurrentPreset.Dy;
                trackBarPullDelay.Value    = this.CurrentPreset.PullDelay;
            }
            else
            {
                this.Text = HelperFunctions.GetApplicationName();
                toolStripMenuItemDeletePreset.Enabled = false;
            }
        }
Esempio n. 3
0
 private void toolStripMenuItem10_Click(object sender, EventArgs e)
 {
     timer1.Stop();
     toolStripStatusLabel1.Text            = "Ready";
     notifyIcon1.Text                      = HelperFunctions.GetApplicationName();
     toolStripMenuItemSaveAsPreset.Enabled = true;
     if (!CurrentPreset.IsEmpty() && CurrentPreset.UserDefined)
     {
         toolStripMenuItemDeletePreset.Enabled = true;
     }
     toolStripMenuItemActivate.Enabled = true;
     toolStripMenuItemStop.Enabled     = false;
 }
Esempio n. 4
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (toolStripMenuItemActivate.Checked)
            {
                toolStripStatusLabel1.Text = $"Monitor active : (dy={trackBarDy.Value}, ShotInterval={trackBarShotInterval.Value}, PullDelay={trackBarPullDelay.Value})";
                notifyIcon1.Text           = toolStripStatusLabel1.Text;
            }
            else
            {
                notifyIcon1.Text = HelperFunctions.GetApplicationName();
            }

            poller.Poll(trackBarDy.Value, trackBarShotInterval.Value, trackBarPullDelay.Value, toolStripComboBoxFireButton.Text);
        }
 private void timer1_Tick(object sender, EventArgs e)
 {
     if (toolStripMenuItemActivate.Checked)
     {
         toolStripStatusLabel1.Text = $"Monitor active : (dx={trackBar1.Value}, dy={trackBar2.Value}, WaitMs={trackBar3.Value}, DelayMs={trackBar4.Value})";
         notifyIcon1.Text           = toolStripStatusLabel1.Text;
     }
     else
     {
         toolStripStatusLabel1.Text = "Ready";
         notifyIcon1.Text           = HelperFunctions.GetApplicationName();
     }
     timer1.Interval = trackBar4.Value;
     poller.Poll(trackBar1.Value, trackBar2.Value, (uint)trackBar3.Value, toolStripComboBoxFireButton.Text);
 }
 private void toolStripMenuItemActivate_Click(object sender, EventArgs e)
 {
     if (toolStripMenuItemActivate.Checked)
     {
         this.poller.Activated = true;
         toolStripMenuItemSaveAsPreset.Enabled = false;
         toolStripMenuItemDeletePreset.Enabled = false;
     }
     else
     {
         this.poller.Activated                 = false;
         toolStripStatusLabel1.Text            = "Ready";
         notifyIcon1.Text                      = HelperFunctions.GetApplicationName();
         toolStripMenuItemSaveAsPreset.Enabled = true;
         if (!CurrentPreset.IsEmpty() && CurrentPreset.UserDefined)
         {
             toolStripMenuItemDeletePreset.Enabled = true;
         }
     }
 }
 private void toolStripMenuItemAbout_Click(object sender, EventArgs e)
 {
     MessageBox.Show("Author : s0ft\nBlog : c0dew0rth.blogspot.com\nContact : [email protected]", HelperFunctions.GetApplicationName(), MessageBoxButtons.OK, MessageBoxIcon.Information);
 }
 private void Form1_Load(object sender, EventArgs e)
 {
     this.Text = HelperFunctions.GetApplicationName();
     LoadUserPresetsNames();
     toolStripMenuItemPresets.DropDownItems[0].PerformClick(); //load the first preset by default
 }
Esempio n. 9
0
 private void toolStripMenuItemAbout_Click(object sender, EventArgs e)
 {
     MessageBox.Show("Designed By: Nirinium \nNTG:Ridgefire (c) 2018", HelperFunctions.GetApplicationName(), MessageBoxButtons.OK, MessageBoxIcon.Information);
 }
Esempio n. 10
0
 private void Form1_Load(object sender, EventArgs e)
 {
     this.Text = HelperFunctions.GetApplicationName();
     LoadUserPresetsNames();
 }