Exemple #1
0
 /// <summary>
 /// Start the timer to update the cursor position and clear all items in the list view
 /// when the form loads
 /// </summary>
 private void MainForm_Load(object sender, EventArgs e)
 {
     CurrentPositionTimer.Start();
     PositionsGridView.Rows.Clear();
     ReadAllSettings();
 }
Exemple #2
0
 /// <summary>
 /// Start the timer to update the cursor position and clear all items in the list view
 /// when the form loads
 /// </summary>
 private void MainForm_Load(object sender, EventArgs e)
 {
     CurrentPositionTimer.Start();
     PositionsListView.Items.Clear();
     PositionsListView.LabelEdit = true;
 }
Exemple #3
0
        public Form1()
        {
            InitializeComponent();
            CurrentPositionTimer.Start();
            runtime_Counter = Int32.Parse(Properties.Settings.Default.runtimecounter);
            ++runtime_Counter;
            Properties.Settings.Default.runtimecounter = runtime_Counter.ToString();
            Properties.Settings.Default.Save();
            if (runtime_Counter == 2)
            {
                LaunchUpdater();
            }

            amounttext.Text        = Properties.Settings.Default.clickamountsave;
            clickintervaltext.Text = Properties.Settings.Default.clickintervalsave;
            try
            {
                clicktcombo.SelectedIndex = Properties.Settings.Default.clicktypesave;
            }
            catch
            {
                clicktcombo.SelectedIndex = 0;
            }
            try
            {
                typecombo.SelectedIndex = Properties.Settings.Default.clicktimessave;
            }
            catch
            {
                typecombo.SelectedIndex = 1;
            }
            if (Properties.Settings.Default.curfixedsave == false)
            {
                cursorrbut.Checked = true;
            }
            else
            {
                fixedrbut.Checked = true;
            }
            clickLocation = Properties.Settings.Default.pointsave;
            string locationstring = clickLocation.ToString();

            coordlabel.Text = (locationstring.Remove(locationstring.Length - 1)).Remove(0, 1);

            coordlabelList.Clear();
            coordlabelListIndex = 0;

            Point zeroPoint = new Point(0, 0);

            if (clickLocation != zeroPoint)
            {
                coordlabelList.Add(coordlabel.Text);
                saveToolStripMenuItem.Enabled = true;

                if (ListContainsBoundingRectangle(coordlabelList))
                {
                    saveToolrndStripMenuItem.Enabled = true;
                }
                else
                {
                    saveToolrndStripMenuItem.Enabled = false;
                }
            }
            else
            {
                saveToolStripMenuItem.Enabled    = false;
                saveToolrndStripMenuItem.Enabled = false;
            }

            coordlabel.Text += ("(" + coordlabelList.Count.ToString() + ")");

            RegisterHotKey(this.Handle, START_HOTKEY, 0, Properties.Settings.Default.startkey);
            RegisterHotKey(this.Handle, STOP_HOTKEY, 0, Properties.Settings.Default.stopkey);
            RegisterHotKey(this.Handle, SELECT_HOTKEY, 0, Properties.Settings.Default.selectkey);
            RegisterHotKey(this.Handle, CLEAR_HOTKEY, 0, Properties.Settings.Default.clearkey);
            //change hotkey apperance on buttons
            startbutton.Text = "Start (" + ((Keys)Enum.Parse(typeof(Keys), Properties.Settings.Default.startkey.ToString())).ToString() + ")";
            stopbut.Text     = "Stop (" + ((Keys)Enum.Parse(typeof(Keys), Properties.Settings.Default.stopkey.ToString())).ToString() + ")";
            fixedlabel.Text  = "Fixed Pos. (" + ((Keys)Enum.Parse(typeof(Keys), Properties.Settings.Default.selectkey.ToString())).ToString() + "/" + ((Keys)Enum.Parse(typeof(Keys), Properties.Settings.Default.clearkey.ToString())).ToString() + " to Add/Clear):";
        }