Example #1
0
 public static UserControlDashBoard Instance()
 {
     if (_instance == null)
     {
         _instance = new UserControlDashBoard();
     }
     return(_instance);
 }
Example #2
0
 void loadFirstControl()
 {
     try
     {
         if (!panelMainContent.Controls.Contains(UserControlDashBoard.Instance()))
         {
             panelMainContent.Controls.Add(UserControlDashBoard.Instance());
             UserControlDashBoard.Instance().Dock = DockStyle.Fill;
             UserControlDashBoard.Instance().BringToFront();
         }
         else
         {
             UserControlDashBoard.Instance().BringToFront();
         }
     }
     catch (Exception ex)
     {
         MetroMessageBox.Show(this, "System Error " + ex.Message, "MetroMessageBox", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Example #3
0
        private void pictureBox2_Click(object sender, EventArgs e)
        {
            try
            {
                OutOfStoclIC.refresh();
                D_Summary.Refresh();

                panelMainContent.Controls.Remove(UserControlDashBoard.Refresh());
                panelMainContent.Controls.Remove(D_Summary.Instance());
                panelMainContent.Controls.Remove(OutOfStoclIC.Instance());

                panelMainContent.Controls.Add(UserControlDashBoard.Refresh());
                UserControlDashBoard.Refresh().Dock = DockStyle.Fill;
                UserControlDashBoard.Refresh().BringToFront();
            }
            catch (Exception ex)
            {
                MetroMessageBox.Show(this, "System Error " + ex.Message, "MetroMessageBox", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #4
0
 public static UserControlDashBoard Refresh()
 {
     _instance = null;
     _instance = new UserControlDashBoard();
     return(_instance);
 }