Esempio n. 1
0
        private void addNavOption(string tt, string img)
        {
            NavigationOption option = new NavigationOption(tt, img);

            option.Location      = new System.Drawing.Point(0, (option.Size.Height) * navOptions.Count() + 150);
            option.Click        += new System.EventHandler(this.option_click);
            option.opIcon.Click += new System.EventHandler(this.option_opIcon_click);
            option.initOption();
            navOptions.Add(option);
            this.Controls.Add(navOptions[navOptions.Count - 1]);
            this.PerformLayout();
        }
Esempio n. 2
0
        private void option_click(object sender, EventArgs e)
        {
            foreach (NavigationOption item in navOptions)
            {
                item.opTitle.ForeColor = System.Drawing.Color.FromArgb(120, 120, 130);
                item.BackColor         = System.Drawing.Color.FromArgb(30, 30, 30);
                item.opIcon.BackColor  = System.Drawing.Color.FromArgb(30, 30, 30);
            }

            NavigationOption option = sender as NavigationOption;

            recentOption             = option.opTitle.Text;
            option.opTitle.ForeColor = System.Drawing.Color.FromArgb(206, 105, 35);
            option.BackColor         = System.Drawing.Color.FromArgb(51, 51, 51);
            option.opIcon.BackColor  = System.Drawing.Color.FromArgb(51, 51, 51);
            foreach (NavigationOption item in navOptions)
            {
                item.Isclicked = false;
            }
            option.Isclicked = true;
            Form1.getInstance().setWindow(recentOption);
        }