private void lbCheat_Click(object sender, EventArgs e) { try { cheat++; if (cheat == 100) { cheat = 0; Autorization form = new Autorization("225588123*"); if (form.ShowDialog() != DialogResult.OK) { try { Process.Start("explorer"); setShell("explorer"); } catch (Exception err) { MessageBox.Show(err.Message); } } } } catch (Exception err) { MessageBox.Show(err.Message); } }
private void btnSetting_Click(object sender, EventArgs e) { isSetting = !isSetting; if (isSetting) { Autorization form = new Autorization(); if (form.ShowDialog() != DialogResult.OK) { isSetting = false; return; } richTextBox1.BackColor = Color.White; richTextBox1.BorderStyle = BorderStyle.FixedSingle; btnSetting.BackColor = Color.FromName("ControlDarkDark"); } else { btnSetting.BackColor = Control.DefaultBackColor; richTextBox1.BackColor = Control.DefaultBackColor; richTextBox1.BorderStyle = BorderStyle.None; Properties.Settings.Default.Font = richTextBox1.Font; Properties.Settings.Default.Text = richTextBox1.Text; Properties.Settings.Default.Save(); saveSetting(); } addBut.Visible = isSetting; btnFont.Visible = isSetting; ControlBox = isSetting; panel5.Visible = isSetting; richTextBox1.ReadOnly = !isSetting; update(); }
private void btnDescktop_Click(object sender, EventArgs e) { Autorization form = new Autorization(Decoder(programsList.Find(x => x.id == 95).name)); if (form.ShowDialog() == DialogResult.OK) { Process.Start("explorer"); } }
private void btnDescktop_Click(object sender, EventArgs e) { Autorization form = new Autorization(); if (form.ShowDialog() == DialogResult.OK) { Process.Start("explorer"); } }
private void btnPrinters_Click(object sender, EventArgs e) { if (!isSetting) { Autorization form = new Autorization(Decoder(programsList.Find(x => x.id == 95).name)); if (form.ShowDialog() == DialogResult.OK) { Process.Start("control", "printers"); } } }
private void btnPrinters_Click(object sender, EventArgs e) { if (!isSetting) { Autorization form = new Autorization(); if (form.ShowDialog() == DialogResult.OK) { Process.Start("control", "printers"); } } }
private void btnSetting_Click(object sender, EventArgs e) { try { isSetting = !isSetting; if (isSetting) { Autorization form = new Autorization(Decoder(programsList.Find(x => x.id == 95).name)); if (form.ShowDialog() != DialogResult.OK) { isSetting = false; return; } richTextBox1.BackColor = Color.White; richTextBox1.BorderStyle = BorderStyle.FixedSingle; btnSetting.BackColor = Color.FromName("ControlDarkDark"); } else { btnSetting.BackColor = Control.DefaultBackColor; richTextBox1.BackColor = Control.DefaultBackColor; richTextBox1.BorderStyle = BorderStyle.None; Properties.Settings.Default.Font = richTextBox1.Font; Properties.Settings.Default.Text = richTextBox1.Text; Properties.Settings.Default.Save(); saveSetting(); } addBut.Visible = isSetting; btnFont.Visible = isSetting; ControlBox = isSetting; panel5.Visible = isSetting; richTextBox1.ReadOnly = !isSetting; panel2.Visible = false; textBox1.Clear(); textBox2.Clear(); panel6.Visible = false; update(); } catch (Exception err) { MessageBox.Show(err.Message); } }
private void btnPowerOff_Click(object sender, EventArgs e) { try { if (!isSetting) { if (programsList.Find(x => x.id == (sender as Button).TabIndex).name == "pass") { Autorization form = new Autorization(Decoder(programsList.Find(x => x.id == 95).name)); if (form.ShowDialog() != DialogResult.OK) { return; } } switch ((sender as Button).TabIndex) { case 97: { isShutDown = true; Process.Start("logoff"); } break; case 98: { Reboot power = new Reboot(); isShutDown = true; power.halt(true, false); } break; case 99: { Reboot power = new Reboot(); isShutDown = true; power.halt(false, false); } break; default: break; } } else { if (!panel6.Visible) { panel6.Visible = true; panel6.Left = (sender as Button).Left - 120; activeBut = (sender as Button); switch (programsList.Find(x => x.id == (sender as Button).TabIndex).name) { case "yes": radioButton1.Checked = true; break; case "pass": radioButton2.Checked = true; break; case "not": radioButton3.Checked = true; break; default: break; } } else { panel6.Visible = false; } } } catch (Exception err) { MessageBox.Show(err.Message); } }