Exemplo n.º 1
0
        private void toolBarMain_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
        {
            switch(e.Button.Text)
            {
                case "Users":
                    BuildUserHierarchy();
                    break;
                case "System":
                    System_Properties SP = new System_Properties();
                    PassOysterSystemData POSD = new PassOysterSystemData();
                    POSD.LoginUser = LoginUser;
                    POSD.OSystem = OSystem;
                    SP.Tag = POSD;
                    SP.ShowDialog(this);
                    break;
                case "Help":
                    //ShowDisplay(ShowHelpInfo);
                    if(FRMHelp != null)
                    {
                        if(FRMHelp.Visible == true)
                        {
                            if(FRMHelp.WindowState == FormWindowState.Minimized)
                                FRMHelp.WindowState = FormWindowState.Normal;
                            else
                                FRMHelp.WindowState = FormWindowState.Minimized;
                        }
                        else
                        {
                            FRMHelp.Dispose();
                            FRMHelp = new frmHelp();
                            FRMHelp.Show();
                        }

                        FRMHelp.Focus();
                    }
                    else
                    {
                        FRMHelp = new frmHelp();
                        FRMHelp.Show();
                    }
                    break;
                case "Log Off":
                    frmLogOff DR = new frmLogOff();
                    DR.ShowDialog(this);
                    if(DR.DialogResult == DialogResult.Cancel)
                    {
                        return;
                    }

                    if(OSystem != null)
                        OSystem.ReleaseResources();
                    //                    if(LoginUser != null)
                    //                        LoginUser.ReleaseCameras();
                    Application.Exit();
                    break;
                default :
                    //MessageBox.Show("This feature has not yet been implement.");
                    break;
            }
            tbActionBar.Buttons[0].Visible = false;
            tbActionBar.Buttons[1].Visible = false;
            tbActionBar.Buttons[2].Visible = false;
            tbActionBar.Buttons[3].Visible = false;
            tbActionBar.Buttons[4].Visible = false;
            tbActionBar.Buttons[5].Visible = false;
            tbActionBar.Buttons[6].Visible = false;
        }
Exemplo n.º 2
0
 private void mnuSystem_Click(object sender, System.EventArgs e)
 {
     System_Properties SP = new System_Properties();
     PassOysterSystemData POSD = new PassOysterSystemData();
     //POSD.LoginUser = LoginUser;
     //POSD.OSystem = OSystem;
     //SP.Tag = POSD;
     SP.ShowDialog(this);
     BuildUserHierarchy();
     BuildCameraView();
 }