Exemplo n.º 1
0
        private void ExisitingCasePanel_PasswordCheckClick(object sender, EventArgs e)
        {
            //TODO: logic also exists in load exisiting case panel/close case panels
            //this is a test of functionality

            //if password is fine, open audit log
            Controls.Clear();

            using (AuditLogForm audit = new AuditLogForm())
            {
                audit.ShowDialog();
            }


            bool caseHasPassword = new Database.DatabaseHandler().CaseHasPassword();

            if (caseHasPassword)
            {
                CloseCasePanel closePanel = new CloseCasePanel();
                Controls.Add(closePanel);
                closePanel.PasswordCorrect += ClosePanel_PasswordCorrect;
            }
            else
            {
                CaseClosingCleanUpPanel cleanUpPanel = new CaseClosingCleanUpPanel("", false);
                Controls.Add(cleanUpPanel);
            }
        }
Exemplo n.º 2
0
        private void ClosePanel_PasswordCorrect(object sender, CaseClosingEventArgs args)
        {
            Controls.Clear();
            //add new closing panel
            CaseClosingCleanUpPanel cleanUpPanel = new CaseClosingCleanUpPanel(args.Password, false);

            Controls.Add(cleanUpPanel);
        }
Exemplo n.º 3
0
        private void ClosingOsirt()
        {
            Controls.Clear();

            //UserSettings.Load().CaseHasPassword
            bool caseHasPassword = new Database.DatabaseHandler().CaseHasPassword();

            if (caseHasPassword)
            {
                CloseCasePanel closePanel = new CloseCasePanel();
                Controls.Add(closePanel);
                closePanel.PasswordCorrect += ClosePanel_PasswordCorrect;
            }
            else
            {
                CaseClosingCleanUpPanel cleanUpPanel = new CaseClosingCleanUpPanel("", false);
                Controls.Add(cleanUpPanel);
            }
        }