Esempio n. 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            SellerForm openSellerForm = new SellerForm {
                BackColor = GetBackColor()
            };

            openSellerForm.Show();
        }
Esempio n. 2
0
        private void button13_Click(object sender, EventArgs e)
        {
            var reader = new StreamReader("SystemColors.txt");

            try
            {
                var        option     = reader.ReadLine();
                SellerForm sellerForm = new SellerForm {
                    BackColor = Color.FromName(option)
                };
                sellerForm.Show();
                this.Hide();
            }
            catch (IOException exception)
            {
                Console.WriteLine("The file could not be read:");
                Console.WriteLine(exception.Message);
            }
            finally
            {
                reader.Close();
            }
        }