Exemplo n.º 1
0
        private void calendarToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form13 newf = new Form13();

            newf.MdiParent = this;
            newf.Show();
        }
        private void button7_Click(object sender, EventArgs e)
        {
            bool   isOpen = false;
            Form13 form13 = new Form13();

            if (Application.OpenForms["Form13"] != null)
            {
                if ((Application.OpenForms["Form13"].Text).Equals("MSS Information Centre"))
                {
                    isOpen = true;
                }
                if (isOpen == true)
                {
                    form13.Focus();
                    this.Close();
                }
                else
                {
                    isOpen = true;
                    form13.ShowDialog();
                    form13.Focus();
                    //this.Close();
                }
            }//this.Close();
            else
            {
                form13.ShowDialog();
            }
        }
Exemplo n.º 3
0
        private void button4_Click(object sender, EventArgs e)
        {
            Form13 f = new Form13();

            f.ShowDialog();
            this.Close();
        }
Exemplo n.º 4
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            string drive_letter = "";

            try
            {
                drive_letter = dataGridView1[dataGridView1.CurrentCell.ColumnIndex, dataGridView1.CurrentCell.RowIndex].Value.ToString();
            }
            catch { }
            string t = "\\pagefile.sys";

            char[] s = new char[2];
            s[0] = drive_letter[0];
            s[1] = drive_letter[1];
            string ga = new string(s);
            string k  = ga + t;
            string t1 = "\\hiberfile.sys";

            if (drive_letter != "")
            {
                string k1 = ga + t1;
                if (File.Exists(k) || File.Exists(k1) || drive_letter == "C:")
                {
                    if (drive_letter == "C:")
                    {
                        MessageBox.Show("It's a system disk");
                    }
                    MessageBox.Show("I can't format your disk, it contains system files such as pagefile.sys. Code error 5!");
                }
                else
                {
                    string strCmdText = "Format " + ga + " /Y /FS:NTFS /V:Windows /Q";
                    MessageBox.Show(strCmdText);
                    WindowsSetup.Variabile.format = ga + "\\";
                    var result = MessageBox.Show("You really want to install Windows?", "Install Windows", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                    if (result == DialogResult.Yes)
                    {
                        CMD_Process_Class.Process_CMD(strCmdText);
                        var form2 = new Form13();
                        this.Hide();
                        form2.Show();
                    }
                }
            }
            else
            {
                MessageBox.Show("You didn't selected any option!", "Error 003", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 5
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     if (DateTime.Now.Hour == sa && DateTime.Now.Minute == 9 && DateTime.Now.Second == 00) //TT50
     {
         sayı = sayı + 1;
         Form2 yeni = new Form2();
         yeni.Show();
     }
     if (DateTime.Now.Hour == sa && DateTime.Now.Minute == 10 && DateTime.Now.Second == 00) //CB50
     {
         sayı = sayı + 2;
         Form2 yeni = new Form2();
         yeni.Show();
     }
     if (DateTime.Now.Hour == sa && DateTime.Now.Minute == 19 && DateTime.Now.Second == 00) //TT40
     {
         sayı = sayı + 1;
         Form5 yeni = new Form5();
         yeni.Show();
     }
     if (DateTime.Now.Hour == sa && DateTime.Now.Minute == 20 && DateTime.Now.Second == 00)  //CB40
     {
         sayı = sayı + 2;
         Form5 yeni = new Form5();
         yeni.Show();
     }
     if (DateTime.Now.Hour == sa && DateTime.Now.Minute == 29 && DateTime.Now.Second == 00) //TT30
     {
         sayı = sayı + 1;
         Form6 yeni = new Form6();
         yeni.Show();
     }
     if (DateTime.Now.Hour == sa && DateTime.Now.Minute == 30 && DateTime.Now.Second == 00) //CB30
     {
         sayı = sayı + 2;
         Form6 yeni = new Form6();
         yeni.Show();
     }
     if (DateTime.Now.Hour == sa && DateTime.Now.Minute == 39 && DateTime.Now.Second == 00) //TT20
     {
         sayı = sayı + 1;
         Form7 yeni = new Form7();
         yeni.Show();
     }
     if (DateTime.Now.Hour == sa && DateTime.Now.Minute == 40 && DateTime.Now.Second == 00)  //CB20
     {
         sayı = sayı + 2;
         Form7 yeni = new Form7();
         yeni.Show();
     }
     if (DateTime.Now.Hour == sa && DateTime.Now.Minute == 44 && DateTime.Now.Second == 00) //TT15
     {
         sayı = sayı + 1;
         Form8 yeni = new Form8();
         yeni.Show();
     }
     if (DateTime.Now.Hour == sa && DateTime.Now.Minute == 45 && DateTime.Now.Second == 00) //CB15
     {
         sayı = sayı + 2;
         Form8 yeni = new Form8();
         yeni.Show();
     }
     if (DateTime.Now.Hour == sa && DateTime.Now.Minute == 49 && DateTime.Now.Second == 00) //TT10
     {
         sayı = sayı + 1;
         Form9 yeni = new Form9();
         yeni.Show();
     }
     if (DateTime.Now.Hour == sa && DateTime.Now.Minute == 50 && DateTime.Now.Second == 00) //CB10
     {
         sayı = sayı + 2;
         Form9 yeni = new Form9();
         yeni.Show();
     }
     if (DateTime.Now.Hour == sa && DateTime.Now.Minute == 54 && DateTime.Now.Second == 00) //TT5
     {
         sayı = sayı + 1;
         Form10 yeni = new Form10();
         yeni.Show();
     }
     if (DateTime.Now.Hour == sa && DateTime.Now.Minute == 55 && DateTime.Now.Second == 00) //CB5
     {
         sayı = sayı + 2;
         Form10 yeni = new Form10();
         yeni.Show();
     }
     if (DateTime.Now.Hour == sa && DateTime.Now.Minute == 55 && DateTime.Now.Second == 00) //TT4
     {
         sayı = sayı + 1;
         Form11 yeni = new Form11();
         yeni.Show();
     }
     if (DateTime.Now.Hour == sa && DateTime.Now.Minute == 56 && DateTime.Now.Second == 00) //CB4
     {
         sayı = sayı + 2;
         Form11 yeni = new Form11();
         yeni.Show();
     }
     if (DateTime.Now.Hour == sa && DateTime.Now.Minute == 56 && DateTime.Now.Second == 00) //TT3
     {
         sayı = sayı + 1;
         Form12 yeni = new Form12();
         yeni.Show();
     }
     if (DateTime.Now.Hour == sa && DateTime.Now.Minute == 57 && DateTime.Now.Second == 00) //CB3
     {
         sayı = sayı + 2;
         Form12 yeni = new Form12();
         yeni.Show();
     }
     if (DateTime.Now.Hour == sa && DateTime.Now.Minute == 57 && DateTime.Now.Second == 00) //TT2
     {
         sayı = sayı + 1;
         Form13 yeni = new Form13();
         yeni.Show();
     }
     if (DateTime.Now.Hour == sa && DateTime.Now.Minute == 58 && DateTime.Now.Second == 00) //CB2
     {
         sayı = sayı + 2;
         Form13 yeni = new Form13();
         yeni.Show();
     }
     if (DateTime.Now.Hour == sa && DateTime.Now.Minute == 58 && DateTime.Now.Second == 00) //TT1
     {
         sayı = sayı + 1;
         Form14 yeni = new Form14();
         yeni.Show();
     }
     if (DateTime.Now.Hour == sa && DateTime.Now.Minute == 59 && DateTime.Now.Second == 00) //CB1
     {
         sayı = sayı + 2;
         Form14 yeni = new Form14();
         yeni.Show();
     }
     if (DateTime.Now.Hour == sa + 1 && DateTime.Now.Minute == 00 && DateTime.Now.Second == 00) //TT0
     {
         sayı = sayı + 1;
         Form15 yeni = new Form15();
         yeni.Show();
         Form16 sonuç = new Form16();
         sonuç.Show();
     }
     if (DateTime.Now.Hour == sa + 1 && DateTime.Now.Minute == 01 && DateTime.Now.Second == 00) //CB0
     {
         sayı = sayı + 2;
         Form15 yeni = new Form15();
         yeni.Show();
         Form16 sonuç = new Form16();
         sonuç.Show();
     }
 }
Exemplo n.º 6
0
        private void button10_Click(object sender, EventArgs e)
        {
            Form13 yeni = new Form13();

            yeni.Show();
        }
Exemplo n.º 7
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (radioButton1.Checked)
     {
         bool  isOpen = false;
         Form3 form3  = new Form3();
         if (Application.OpenForms["Form3"] != null)
         {
             if ((Application.OpenForms["Form3"].Text).Equals("MSS Information Centre"))
             {
                 isOpen = true;
             }
             if (isOpen == true)
             {
                 form3.Focus();
                 this.Close();
             }
             else
             {
                 isOpen = true;
                 form3.ShowDialog();
                 form3.Focus();
                 //this.Close();
             }
         }//this.Close();
         else
         {
             form3.ShowDialog();
         }
     }
     else if (radioButton2.Checked)
     {
         bool  isOpen = false;
         Form8 form8  = new Form8();
         if (Application.OpenForms["Form8"] != null)
         {
             if ((Application.OpenForms["Form8"].Text).Equals("MSS Information Centre"))
             {
                 isOpen = true;
             }
             if (isOpen == true)
             {
                 form8.Focus();
                 this.Close();
             }
             else
             {
                 isOpen = true;
                 form8.ShowDialog();
                 form8.Focus();
                 //this.Close();
             }
         }//this.Close();
         else
         {
             form8.ShowDialog();
         }
     }
     else if (radioButton3.Checked)
     {
         bool   isOpen = false;
         Form13 form13 = new Form13();
         if (Application.OpenForms["Form13"] != null)
         {
             if ((Application.OpenForms["Form13"].Text).Equals("MSS Information Centre"))
             {
                 isOpen = true;
             }
             if (isOpen == true)
             {
                 form13.Focus();
                 this.Close();
             }
             else
             {
                 isOpen = true;
                 form13.ShowDialog();
                 form13.Focus();
                 //this.Close();
             }
         }//this.Close();
         else
         {
             form13.ShowDialog();
         }
     }
     else if (radioButton4.Checked)
     {
     }
 }
Exemplo n.º 8
0
 private void exec_cmd(String cmd)
 {
     String[] fcmd = cmd.Split(' ');
     if (fcmd[0] == "echo")
     {
         int    x    = 0;
         String outl = "";
         outl = "OS" + Globals.curdir + ">";
         foreach (String pcmd in fcmd)
         {
             if (x != 0)
             {
                 outl = outl + " " + pcmd;
             }
             x = 69;
         }
         label1.Text = outl;
     }
     else if (fcmd[0] == "file-manager")
     {
         Form4 newf = new Form4();
         newf.MdiParent = this.ParentForm;
         newf.Show();
     }
     else if (fcmd[0] == "text-editor")
     {
         Form2 newf = new Form2();
         newf.MdiParent = this.ParentForm;
         newf.Show();
     }
     else if (fcmd[0] == "calculator")
     {
         Form8 newf = new Form8();
         newf.MdiParent = this.ParentForm;
         newf.Show();
     }
     else if (fcmd[0] == "media-player")
     {
         Form9 newf = new Form9();
         newf.MdiParent = this.ParentForm;
         newf.Show();
     }
     else if (fcmd[0] == "cpu-monitor")
     {
         Form12 newf = new Form12();
         newf.MdiParent = this.ParentForm;
         newf.Show();
     }
     else if (fcmd[0] == "calendar")
     {
         Form13 newf = new Form13();
         newf.MdiParent = this.ParentForm;
         newf.Show();
     }
     else if (fcmd[0] == "cp")//Not working
     {
         String at = Application.StartupPath + Globals.curdir;
         System.Diagnostics.Process process = new System.Diagnostics.Process();
         process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
         process.StartInfo.FileName    = "cmd.exe";
         process.StartInfo.Arguments   = "/C copy \"" + at + "\\" + fcmd[1] + "\" \"" + at + "\\" + fcmd[2] + "\"";
         process.Start();
         label1.Text = "/C copy " + at + "\\" + fcmd[1] + '\n' + at + "\\" + fcmd[2];
     }
     else if (fcmd[0] == "mkdir")
     {
         String at = Application.StartupPath + Globals.curdir;
         System.Diagnostics.Process process = new System.Diagnostics.Process();
         process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
         process.StartInfo.FileName    = "cmd.exe";
         process.StartInfo.Arguments   = "/C mkdir \"" + at + "\\" + fcmd[1] + "\"";
         String outl = "OS" + Globals.curdir + ">";
         outl        = outl + "Created directory. ";
         label1.Text = outl;
         process.Start();
     }
     else if (fcmd[0] == "touch")
     {
         String at = Application.StartupPath + Globals.curdir;
         System.Diagnostics.Process process = new System.Diagnostics.Process();
         process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
         process.StartInfo.FileName    = "cmd.exe";
         process.StartInfo.Arguments   = "/C echo.> \"" + at + "\\" + fcmd[1] + "\"";
         process.Start();
         String outl = "OS" + Globals.curdir + ">";
         outl        = outl + "Created file.";
         label1.Text = outl;
     }
     else if (fcmd[0] == "ls")
     {
         String[] dir  = Directory.GetDirectories(Application.StartupPath + Globals.curdir);
         String   outl = "OS" + Globals.curdir + ">";
         outl = outl + '\n';
         foreach (String word in dir)
         {
             int m = word.Length - 1;
             while (m >= 0 && word[m] != '\\')
             {
                 m--;
             }
             String nw = word.Substring(m + 1);
             outl = outl + nw;
             outl = outl + '\n';
         }
         String[] dir2 = Directory.GetFiles(Application.StartupPath + Globals.curdir);
         foreach (String word in dir2)
         {
             int m = word.Length - 1;
             while (m >= 0 && word[m] != '\\')
             {
                 m--;
             }
             String nw = word.Substring(m + 1);
             outl = outl + nw;
             outl = outl + '\n';
         }
         label1.Text = outl;
     }
     else if (fcmd[0] == "cd")
     {
         if (fcmd[1] == "..")
         {
             String outl = "";
             String temp = "";
             temp = Globals.curdir;
             int x = temp.Length;
             x = x - 2;
             while (x >= 0 && temp[x] != '\\')
             {
                 x--;
             }
             if (x >= 0)
             {
                 Globals.curdir = temp.Substring(0, x);
                 outl           = "OS" + Globals.curdir + ">";
                 label1.Text    = outl;
             }
         }
         else
         {
             int    x    = 0;
             int    f    = 0;
             String outl = "OS";
             foreach (String pcmd in fcmd)
             {
                 String[] dir = Directory.GetDirectories(Application.StartupPath + Globals.curdir);
                 foreach (String word in dir)
                 {
                     int m = word.Length - 1;
                     while (m >= 0 && word[m] != '\\')
                     {
                         m--;
                     }
                     String nw = word.Substring(m + 1);
                     if (pcmd == nw)
                     {
                         if (x != 0)
                         {
                             Globals.curdir = Globals.curdir + "\\" + pcmd;
                             f = 69;
                         }
                     }
                 }
                 x = 69;
             }
             if (f != 69)
             {
                 outl        = "OS" + Globals.curdir + ">";
                 outl        = outl + " " + "The specified directory doesn't exist!";
                 label1.Text = outl;
             }
             else
             {
                 outl        = "OS" + Globals.curdir + ">";
                 outl        = outl + " " + "(Y)";
                 label1.Text = outl;
             }
         }
     }
     else
     {
         String outl;
         outl        = "OS" + Globals.curdir + ">";
         outl        = outl + " " + "Invalid Command";
         label1.Text = outl;
     }
 }
Exemplo n.º 9
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            int saat;

            saat = Convert.ToInt32(textBox1.Text);
            if (DateTime.Now.Hour == saat && DateTime.Now.Minute == 10 && DateTime.Now.Second == 00) //50 Dakika
            {
                Form2 yeni = new Form2();
                yeni.Show();
            }
            if (DateTime.Now.Hour == saat && DateTime.Now.Minute == 20 && DateTime.Now.Second == 00) //40 Dakika
            {
                Form5 yeni = new Form5();
                yeni.Show();
            }
            if (DateTime.Now.Hour == saat && DateTime.Now.Minute == 30 && DateTime.Now.Second == 00) //30 Dakika
            {
                Form6 yeni = new Form6();
                yeni.Show();
            }
            if (DateTime.Now.Hour == saat && DateTime.Now.Minute == 40 && DateTime.Now.Second == 00)  //20 Dakika
            {
                Form7 yeni = new Form7();
                yeni.Show();
            }
            if (DateTime.Now.Hour == saat && DateTime.Now.Minute == 45 && DateTime.Now.Second == 00) //15 Dakika
            {
                Form8 yeni = new Form8();
                yeni.Show();
            }
            if (DateTime.Now.Hour == saat && DateTime.Now.Minute == 50 && DateTime.Now.Second == 00) //10 Dakika
            {
                Form9 yeni = new Form9();
                yeni.Show();
            }
            if (DateTime.Now.Hour == saat && DateTime.Now.Minute == 55 && DateTime.Now.Second == 00) //5 Dakika
            {
                Form10 yeni = new Form10();
                yeni.Show();
            }
            if (DateTime.Now.Hour == saat && DateTime.Now.Hour == saat && DateTime.Now.Minute == 56 && DateTime.Now.Second == 00)  //4 Dakika
            {
                Form11 yeni = new Form11();
                yeni.Show();
            }
            if (DateTime.Now.Hour == saat && DateTime.Now.Minute == 57 && DateTime.Now.Second == 00) //3 Dakika
            {
                Form12 yeni = new Form12();
                yeni.Show();
            }
            if (DateTime.Now.Hour == saat && DateTime.Now.Minute == 58 && DateTime.Now.Second == 00) //2 Dakika
            {
                Form13 yeni = new Form13();
                yeni.Show();
            }
            if (DateTime.Now.Hour == saat && DateTime.Now.Minute == 59 && DateTime.Now.Second == 00) //1 Dakika
            {
                Form14 yeni = new Form14();
                yeni.Show();
            }
            if (DateTime.Now.Hour == saat + 1 && DateTime.Now.Minute == 00 && DateTime.Now.Second == 00) //KatılımSonlandı
            {
                Form15 yeni = new Form15();
                yeni.Show();
                Form16 sonuc = new Form16();
                sonuc.Show();
                this.Hide();
                timer1.Stop();
            }
        }
Exemplo n.º 10
0
        private void skinButton27_Click(object sender, EventArgs e)
        {
            Form frm13 = new Form13();

            frm13.Show();
        }