public void menuItemAutostart_click(object o, EventArgs e) { if (AutoStart.IsOn()) { AutoStart.SetOff(); } else { AutoStart.SetOn(); } OnStartTextChange(); }
private void resetSettings() { File.Delete(Program.path); Program.ReadWriteJson(); Settings_Load(this, new System.EventArgs()); AutoStart.SetOff(); Program.onStartUp = !Program.onStartUp; ChangeButtonColor(btnAutoStart, false, false); resetSideBar(); stickyLeft = Program.readSettings.stickyLeftClick; buttonStickyLeftClick.BackColor = Color.Black; selectionFeedback = Program.readSettings.selectionFeedback; btnFeedback.BackColor = Color.White; }
//private void btnChangeSide_Click(object sender, EventArgs e) //{ // if (OnTheRight) // { // changeSide("On left", ApplicationDesktopToolbar.AppBarEdges.Left, false); // ChangeButtonColor(btnChangeSide, true, false); // } // else // { // changeSide("On Right", ApplicationDesktopToolbar.AppBarEdges.Right, true); // ChangeButtonColor(btnChangeSide, false, false); // } //} //private void changeSide(string text, ApplicationDesktopToolbar.AppBarEdges edge, bool flag) //{ // lblIndicationLeftOrRight.Text = text; // form1.Edge = edge; // OnTheRight = flag; //} /// private void btnAutoStart_Click(object sender, EventArgs e) { if (Program.onStartUp) { AutoStart.SetOff(); Program.onStartUp = !Program.onStartUp; ChangeButtonColor(btnAutoStart, false, false); } else { if (AutoStart.SetOn()) { Program.onStartUp = !Program.onStartUp; ChangeButtonColor(btnAutoStart, true, false); } } form1.OnStartTextChange(); }