コード例 #1
0
        /// <summary>
        /// Handles navigation button click events
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void nav_click(object sender, EventArgs e)
        {
            Control flatbtn = (FlatButton_WOC)sender;

            if (flatbtn.TabIndex == 0)
            {
                Home_Tab.getInstance().populateCharts();
                Home_Tab.getInstance().populateDataGridAgeAnalysis();
                Home_Tab.getInstance().populateDataGridDREAnalysis();
                Home_Tab.getInstance().populateDataGridDRRAnalysis();
                materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey900, Primary.Red700, Primary.Red700, Accent.Red700, TextShade.WHITE);
            }
            if (flatbtn.TabIndex == 1)
            {
                Users_Tab.getInstance().populateDataGridView();
                materialSkinManager.ColorScheme = new ColorScheme(Primary.Red700, Primary.Red700, Primary.Red700, Accent.Red700, TextShade.WHITE);
            }
            else if (flatbtn.TabIndex == 2)
            {
                Projects_Tab.getInstance().populateDataGridView();
                materialSkinManager.ColorScheme = new ColorScheme(Primary.Red700, Primary.Red700, Primary.Red700, Accent.Red700, TextShade.WHITE);
            }
            else if (flatbtn.TabIndex == 3)
            {
                Defects_Tab.getInstance().populateDataGridView();
                materialSkinManager.ColorScheme = new ColorScheme(Primary.Red700, Primary.Red700, Primary.Red700, Accent.Red700, TextShade.WHITE);
            }

            navAdapter.ShowTab((flatbtn).TabIndex);
        }
コード例 #2
0
        /// <summary>
        /// Override OnLoad event
        /// </summary>
        /// <param name="e"></param>
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            MaximizedBounds = Screen.FromHandle(Handle).WorkingArea; // Set the MaximumBounds to the screen size excluding the taskbar
            if (role == "Developer" || role == "Tester")
            {
                btnNavHome.Visible    = false;
                btnNavUser.Visible    = false;
                btnNavProject.Visible = false;
                btnNavHome.Selected   = false;
                btnNavDefect.Selected = true;
                Defects_Tab.getInstance().BringToFront();
                materialSkinManager.ColorScheme = new ColorScheme(Primary.Red700, Primary.Red700, Primary.Red700, Accent.Red700, TextShade.WHITE);
            }
            else if (role == "Manager")
            {
                btnNavHome.Visible    = true;
                btnNavUser.Visible    = false;
                btnNavProject.Visible = false;
                btnNavHome.Selected   = true;
                btnNavDefect.Selected = false;
                Home_Tab.getInstance().BringToFront();
                btnNavUser.Selected    = false;
                btnNavProject.Selected = false;
                btnNavDefect.Selected  = false;
                Home_Tab.getInstance().populateCharts();
                materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey900, Primary.Red700, Primary.Red700, Accent.Red700, TextShade.WHITE);
            }
            else
            {
                btnNavHome.Visible    = true;
                btnNavUser.Visible    = true;
                btnNavProject.Visible = true;
                btnNavHome.Selected   = true;
                btnNavDefect.Selected = false;
                Home_Tab.getInstance().BringToFront();
                btnNavUser.Selected    = false;
                btnNavProject.Selected = false;
                btnNavDefect.Selected  = false;
                Home_Tab.getInstance().populateCharts();
                materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey900, Primary.Red700, Primary.Red700, Accent.Red700, TextShade.WHITE);
            }
        }
コード例 #3
0
        /// <summary>
        /// Setup navigation between tabs
        /// </summary>
        private void SetupNavigation()
        {
            navAdapter.AddTab(Home_Tab.getInstance(), true);
            navAdapter.AddTab(Users_Tab.getInstance(), false);
            navAdapter.AddTab(Projects_Tab.getInstance(), false);
            navAdapter.AddTab(Defects_Tab.getInstance(), false);

            panelTabs_Holder.Controls.Add(Users_Tab_Child.getInstance());
            Users_Tab_Child.getInstance().Dock = DockStyle.Fill;
            panelTabs_Holder.Controls.Add(Projects_Tab_Child.getInstance());
            Projects_Tab_Child.getInstance().Dock = DockStyle.Fill;
            panelTabs_Holder.Controls.Add(Modules_Tab.getInstance());
            Modules_Tab.getInstance().Dock = DockStyle.Fill;
            panelTabs_Holder.Controls.Add(Modules_Tab_Child.getInstance());
            Modules_Tab_Child.getInstance().Dock = DockStyle.Fill;
            panelTabs_Holder.Controls.Add(Defects_Tab_Child.getInstance());
            Defects_Tab_Child.getInstance().Dock = DockStyle.Fill;
            panelTabs_Holder.Controls.Add(Defects_Tab_Child2.getInstance());
            Defects_Tab_Child2.getInstance().Dock = DockStyle.Fill;
        }