public AddToExistFile()
 {
     InitializeComponent();
     RecordData_pnl.Hide();
     if (Main.theme == "Dark")
     {
         this.BackColor = Color.FromArgb(30, 30, 30);
         this.RecordData_pnl.BackColor = Color.FromArgb(30, 30, 30);
         this.label1.ForeColor         = Color.White;
         this.label2.ForeColor         = Color.White;
         this.label3.ForeColor         = Color.White;
         this.label4.ForeColor         = Color.White;
         this.label5.ForeColor         = Color.White;
         this.label6.ForeColor         = Color.White;
         this.label7.ForeColor         = Color.White;
         this.label9.ForeColor         = Color.White;
     }
     else if (Main.theme == "Default")
     {
         this.BackColor = Color.White;
         this.RecordData_pnl.BackColor = Color.White;
         this.label1.ForeColor         = Color.Black;
         this.label2.ForeColor         = Color.Black;
         this.label3.ForeColor         = Color.Black;
         this.label4.ForeColor         = Color.Black;
         this.label5.ForeColor         = Color.Black;
         this.label6.ForeColor         = Color.Black;
         this.label7.ForeColor         = Color.Black;
         this.label9.ForeColor         = Color.Black;
     }
 }
        private void FileOpen_btn_Click(object sender, EventArgs e)
        {
            RecordData_pnl.Show();
            string FileName = FileName_txt.Text;

            if (!File.Exists(FileName + ".xml"))
            {
                MessageBox.Show("The File Not Exist !!! ", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Exemple #3
0
        private void FileCreate_btn_Click(object sender, EventArgs e)
        {
            RecordData_pnl.Show();
            RecordData_pnl.Show();
            FileStream   fs = new FileStream("Files.txt", FileMode.Append);
            StreamWriter sw = new StreamWriter(fs);

            sw.WriteLine(FileName_txt.Text);
            sw.Close();
            fs.Close();
        }
Exemple #4
0
 public CreateFile()
 {
     InitializeComponent();
     RecordData_pnl.Hide();
     if (File.Exists("Files.txt"))
     {
         FileStream   fs = new FileStream("Files.txt", FileMode.Open);
         StreamReader sr = new StreamReader(fs);
         while (sr.Peek() != -1)
         {
             Files.Add(sr.ReadLine());
         }
         sr.Close();
         fs.Close();
     }
     if (Main.theme == "Dark")
     {
         this.BackColor = Color.FromArgb(30, 30, 30);
         this.RecordData_pnl.BackColor = Color.FromArgb(30, 30, 30);
         this.label1.ForeColor         = Color.White;
         this.label2.ForeColor         = Color.White;
         this.label3.ForeColor         = Color.White;
         this.label4.ForeColor         = Color.White;
         this.label5.ForeColor         = Color.White;
         this.label6.ForeColor         = Color.White;
         this.label7.ForeColor         = Color.White;
         this.label9.ForeColor         = Color.White;
     }
     else if (Main.theme == "Default")
     {
         this.BackColor = Color.White;
         this.RecordData_pnl.BackColor = Color.White;
         this.label1.ForeColor         = Color.Black;
         this.label2.ForeColor         = Color.Black;
         this.label3.ForeColor         = Color.Black;
         this.label4.ForeColor         = Color.Black;
         this.label5.ForeColor         = Color.Black;
         this.label6.ForeColor         = Color.Black;
         this.label7.ForeColor         = Color.Black;
         this.label9.ForeColor         = Color.Black;
     }
 }