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; } }
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; } }