コード例 #1
0
 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);
     }
 }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: andriy1909/ABShell
        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();
        }
コード例 #3
0
        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");
            }
        }
コード例 #4
0
ファイル: MainForm.cs プロジェクト: andriy1909/ABShell
        private void btnDescktop_Click(object sender, EventArgs e)
        {
            Autorization form = new Autorization();

            if (form.ShowDialog() == DialogResult.OK)
            {
                Process.Start("explorer");
            }
        }
コード例 #5
0
 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");
         }
     }
 }
コード例 #6
0
ファイル: MainForm.cs プロジェクト: andriy1909/ABShell
 private void btnPrinters_Click(object sender, EventArgs e)
 {
     if (!isSetting)
     {
         Autorization form = new Autorization();
         if (form.ShowDialog() == DialogResult.OK)
         {
             Process.Start("control", "printers");
         }
     }
 }
コード例 #7
0
        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);
            }
        }
コード例 #8
0
        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);
            }
        }