Esempio n. 1
0
 private void button3_Click(object sender, EventArgs e)
 {
     try
     {
         Progress_Init(AppDirectory.LIST.Length + AppFile.LIST.Length);
         for (int i = 0; i < AppDirectory.LIST.Length; i++)
         {
             textBox2.Text += "יוצר תיקיה: " + AppDirectory.GetDirectory(AppDirectory.LIST[i]);
             Directory.CreateDirectory(AppDirectory.GetDirectory(AppDirectory.LIST[i]));
             Progress_Add();
             textBox2.Text += "נוצרה בהצלחה.";
             textBox2.ScrollToCaret();
         }
         for (int i = 0; i < AppFile.LIST.Length; i++)
         {
             textBox2.Text += "יוצר קובץ: " + AppFile.GetFile(AppFile.LIST[i]);
             File.WriteAllText(AppFile.GetFile(AppFile.LIST[i]), AppFile.GetFileDefaultText(AppFile.LIST[i]));
             Progress_Add();
             textBox2.Text += "נוצר בהצלחה.";
         }
     }
     catch (Exception ex)
     {
         Classes.App.Error("בעיה בהפעלת חלק " + progressBar1.Value + " של ההתקנה:\r\n" + ex.Message, true);
     }
     finally
     {
         button1.Enabled = true;
         button2.Enabled = false;
         button3.Enabled = false;
         System.Media.SystemSounds.Exclamation.Play();
     }
 }