Esempio n. 1
0
 public void AddControl(Control control, ApplicationController.State ControlState)
 {
     RemoveAllCenterPanelControls();
     centerPanel.Controls.Add(control);
     control.Dock    = DockStyle.Fill;
     control.Visible = true;
     this.CurrentApplicationState = ControlState;
 }
Esempio n. 2
0
        public void StateChange(ApplicationController.State state)
        {
            try
            {
                switch (state)
                {
                case ApplicationController.State.Captured_Good:
                    //this.Template = enrollFromScanner.Template;
                    ShowMessage("Please wait while your fingerprint is being processed...");
                    RemoveAllCenterPanelControls();     // Remove the Finger Capture Control...

                    if (this.DbTemplates != null && this.DbTemplates.Count() > 0)
                    {
                        MatcherBGWorker.RunWorkerAsync();
                    }
                    else
                    {
                        ShowMessage("Fingerprints failed to load. Contact Administrator");
                    }

                    break;

                case ApplicationController.State.Captured_Bad:
                    ShowFingerCaptureControl();
                    break;

                case ApplicationController.State.Capturing:
                    break;

                case ApplicationController.State.Idle:
                    ShowFingerCaptureControl();
                    break;

                case ApplicationController.State.Identifying:
                    ShowMessage("Please Wait...");
                    break;

                case ApplicationController.State.LoadJobFailed:
                    //Do Nothing... To enable Application Display Error...
                    break;

                case ApplicationController.State.LoadJobCompleted:
                    if (_AppSettings.PreloadUserData)
                    {
                        this.UserRecords = splashControl.UserRecords;
                    }

                    this.DbTemplates = splashControl.DbTemplateRecords;
                    if (this.DbTemplates != null && this.DbTemplates.Count() > 0)
                    {
                        ShowFingerCaptureControl();
                    }
                    else
                    {
                        ShowMessage("Fingerprints failed to load. Contact Administrator");
                    }
                    break;

                case ApplicationController.State.Loading:
                    ShowMessage("Please Wait...");
                    break;

                case ApplicationController.State.Startup:
                    ShowSplash();
                    break;

                case ApplicationController.State.Verifying:
                    ShowMessage("Please Wait...");
                    break;

                case ApplicationController.State.Identified:
                    ShowUserInfo(MatchedRecordId);
                    break;

                case ApplicationController.State.Identified_Low_Match:
                    ShowUserInfo(MatchedRecordId);
                    break;

                case ApplicationController.State.Identify_failed:
                    ShowError(_AppSettings.Failed_Message);
                    break;

                case ApplicationController.State.Verified:
                    ShowUserInfo(MatchedRecordId);
                    break;

                case ApplicationController.State.Verify_Failed:
                    ShowError(_AppSettings.Failed_Message);
                    break;

                case ApplicationController.State.Dispose:
                    CloseMainForm();
                    break;

                case ApplicationController.State.No_User_Found:
                    ShowError("Failed to displayed verified user record. Please notify the system administrator.");
                    break;

                case ApplicationController.State.Report:
                    ShowMessage("View and Print Time and Attendance Reports");
                    ShowReport();
                    break;

                case ApplicationController.State.Setup:
                    ShowMessage("Configure Application Settings");
                    ShowSettings();
                    break;

                case ApplicationController.State.Login_Failed:
                    ShowMessage("Invalid Login Details!");
                    break;

                case ApplicationController.State.Attendance_EI:
                    ShowMessage("Import and Export Attendance Logs");
                    ShowImportExportControl();
                    break;

                case ApplicationController.State.SyncTool:
                    ShowSyncScreen();
                    break;
                }
            }
            catch (Exception exp)
            {
                Logger.logToFile(exp, AppSettings.ErrorLogPath);
            }
        }
Esempio n. 3
0
 private void UpdateStateToParent(ApplicationController.State state)
 {
     StateNotifyer(state);
 }