Esempio n. 1
0
 private void SetPatientListView(PatientListView patientListView)
 {
     this.globalPatientList               = patientListView;
     this.globalPatientList.MdiParent     = this;
     this.globalPatientList.WindowState   = FormWindowState.Maximized;
     this.globalPatientList.StartPosition = FormStartPosition.CenterScreen;
     this.globalPatientList.Show();
 }
Esempio n. 2
0
        private void CheckEnterKeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
        {
            for (int i = Application.OpenForms.Count - 1; i >= 0; i--)
            {
                if (Application.OpenForms[i] != this && Application.OpenForms[i].Name != "WelcomeHomePage" &&
                    Application.OpenForms[i].Name != "PatientListView")
                {
                    Application.OpenForms[i].Close();
                }
            }

            if (e.KeyChar == (char)Keys.Return && Application.OpenForms["PatientListView"] as PatientListView == null)

            {
                PatientListView patientListView = new PatientListView(this);
                SetPatientListView(patientListView);
                globalPatientList.ActivateSearch();
            }

            if (e.KeyChar == (char)Keys.Return)
            {
                globalPatientList.ActivateSearch();
            }
        }