Example #1
0
        private void ExpensesButton_Click(object sender, EventArgs e)
        {
            MoveIndicator((Control)sender);
            Expenses expenses = new Expenses();

            this.Controls.Clear();
            expenses.Dock = DockStyle.Fill;
            this.Controls.Add(expenses);

            if (MainHeader.ForeColor == Color.Orange)
            {
                expenses.ChangeTheme();
            }
        }
        private void ExpensesButton_Click(object sender, EventArgs e)
        {
            MoveIndicator((Control)sender);
            Expenses expenses = new Expenses();

            if (CultureInfo.CurrentCulture.Equals("fr-FR"))
            {
                this.Controls.Clear();
                expenses.Dock = DockStyle.Fill;
                this.Controls.Add(expenses);

                if (MainHeader.ForeColor == Color.Orange)
                {
                    expenses.ChangeTheme();
                }

                expenses.ChangeLanguage("fr-FR");
            }

            else if (CultureInfo.CurrentCulture.Equals("es-ES"))
            {
                this.Controls.Clear();
                expenses.Dock = DockStyle.Fill;
                this.Controls.Add(expenses);

                if (MainHeader.ForeColor == Color.Orange)
                {
                    expenses.ChangeTheme();
                }

                expenses.ChangeLanguage("es-ES");
            }

            else
            {
                this.Controls.Clear();
                expenses.Dock = DockStyle.Fill;
                this.Controls.Add(expenses);

                if (MainHeader.ForeColor == Color.Orange)
                {
                    expenses.ChangeTheme();
                }

                expenses.ChangeLanguage("en");
            }
        }