示例#1
0
 private void format_Load(object sender, EventArgs e)
 {
     temp = new Thread(
         () =>
     {
         if (FormatDrive(metroLabel2.Text, "Windows") == true)
         {
             Invoke(new Action(() =>
             {
                 maximum   = true;
                 var form2 = new Form13();
                 this.Hide();
                 form2.Show();
                 temp.Abort();
             }));
         }
         else
         {
             Invoke(new Action(() =>
             {
                 temp.Abort();
             }));
         }
     })
     {
         IsBackground = true
     };
     temp.Start();
     if (maximum == true)
     {
         this.Close();
         test.Hide();
     }
 }
示例#2
0
 private void format_Load(object sender, EventArgs e)
 {
     temp = new Thread(
         () =>
     {
         if (FormatDrive(metroLabel2.Text, partition_name_type, format_type_fileSystem, format_type_quickformat, format_type_cluster) == true)
         {
             Invoke(new Action(() =>
             {
                 maximum   = true;
                 var form2 = new Form13();
                 this.Hide();
                 form2.Show();
                 temp.Abort();
             }));
         }
         else
         {
             Invoke(new Action(() =>
             {
                 temp.Abort();
             }));
         }
     })
     {
         IsBackground = true
     };
     temp.Start();
     if (maximum == true)
     {
         this.Close();
         test.Hide();
     }
 }