Пример #1
0
 private void StopAll()
 {
     foreach (var cotrl in tableLayoutPanel1.Controls)
     {
         AutoClickControl ctrl = ((AutoClickControl)cotrl);
         ctrl.Stop();
     }
 }
Пример #2
0
 private void StartAll()
 {
     foreach (var cotrl in tableLayoutPanel1.Controls)
     {
         AutoClickControl ctrl = ((AutoClickControl)cotrl);
         if (ctrl.autoSetting.autoStart)
         {
             ctrl.Start();
         }
     }
 }
Пример #3
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            AutoSettings autoSettings = new AutoSettings();

            foreach (var cotrl in tableLayoutPanel1.Controls)
            {
                AutoClickControl ctrl = ((AutoClickControl)cotrl);
                ctrl.UpdateSetings();
                ctrl.Dock = DockStyle.Fill;
                autoSettings.settings.Add(ctrl.autoSetting);
            }
            SaveLoad.Save(autoSettings);
        }
Пример #4
0
        private void Form1_Load(object sender, EventArgs e)
        {
            tableLayoutPanel1.Controls.Clear();
            tableLayoutPanel1.RowCount    = 0;
            tableLayoutPanel1.ColumnCount = 0;
            var autoSettings = SaveLoad.Load();

            foreach (var setting in autoSettings.settings)
            {
                AutoClickControl autoClickControl = new AutoClickControl();
                autoClickControl.SetSettingsFromSettings(setting);
                AddLayoutControl(autoClickControl);
            }
            RegisterHotkeys();
        }
Пример #5
0
 private void Ctrl_OnDeleteClick(AutoClickControl autoClickControl)
 {
     tableLayoutPanel1.Controls.Remove(autoClickControl);
 }
Пример #6
0
 private void AddLayoutControl(AutoClickControl ctrl)
 {
     ctrl.OnDeleteClick += Ctrl_OnDeleteClick;
     tableLayoutPanel1.Controls.Add(ctrl);
 }