示例#1
0
        private void Wadvmode_Click_1(object sender, EventArgs e)
        {
            DialogResult waudit_go = MetroFramework.MetroMessageBox.Show(this, "Are you sure you want to see the Advanced options of Windows ?", "Booting to the Advanced options of Windows", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, IntegrateOS.IntegrateOS_var.color_t);

            if (waudit_go == DialogResult.Yes)
            {
                CMD_Process_Class.Process_CMD("shutdown.exe -r -o -t 0", "cmd.exe");
            }
        }
示例#2
0
        private void Sysprep_Click(object sender, EventArgs e)
        {
            DialogResult waudit_go = MetroFramework.MetroMessageBox.Show(this, "Are you sure you want to unistall driveres?\nYou have a very high risk of loosing your data!", "Booting to the Audit mode", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, IntegrateOS.IntegrateOS_var.color_t);

            if (waudit_go == DialogResult.Yes)
            {
                CMD_Process_Class x    = new CMD_Process_Class();
                string            path = Environment.GetFolderPath(Environment.SpecialFolder.System);

                string final = "start " + path + "\\sysprep\\sysprep.exe /generalize /shutdown";
                x.Process_CMD(final);
            }
        }
示例#3
0
        private void CheckEnter(object sender, System.Windows.Forms.KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)13)
            {
                string s = textBox1.Text;
                textBox1.Clear();
                richTextBox1.AppendText("IntegrateOS@Beta> " + s + "\n");
                switch (s)
                {
                case "help":
                    richTextBox1.AppendText("\nThe commands are:\n");
                    richTextBox1.AppendText("\nhelp - you see the available commands");
                    richTextBox1.AppendText("\nexit - you will leave the form\n");
                    break;

                case "exit":
                    Moving.Form(this, new Basic_tools(Location));
                    break;

                case "clear":
                    richTextBox1.Clear();
                    break;

                default:
                    List <string> list = new List <string>();

                    System.Threading.Thread t = new System.Threading.Thread(() =>
                    {
                        CMD_Process_Class x = new CMD_Process_Class();
                        x.Process_CMD(s);
                        list = x.Get();
                        x.Dispose();
                    });
                    t.Start();
                    while (t.IsAlive == true)
                    {
                    }
                    for (int i = 0; i < list.Count; i++)
                    {
                        richTextBox1.AppendText(list[i]);
                    }
                    break;
                }
            }
        }