Ejemplo n.º 1
0
        private void Doctor_Form_Button_Click(object sender, EventArgs e)
        {
            DoctorForm doctorForm = new DoctorForm(this);

            IDoctorViewRef   = doctorForm;
            doctorForm.Owner = this;
            doctorForm.Show();
            Visible = false;

            Doctor_Click?.Invoke(this, EventArgs.Empty);
        }
Ejemplo n.º 2
0
        public void EntityChoice(Entities entity)
        {
            switch (entity)
            {
            case Entities.Administrator:
            {
                label1.Show();
                Doctor.Show();
                Registrator.Show();
                button3.Show();
                label2.Hide();
                enter.Hide();
                textBox1.Hide();
                break;
            }

            case Entities.Registrator:
            {
                textBox1.Clear();
                RegistratorForm RegistratorFormRef = new RegistratorForm(this);
                IRegistratorViewRef      = RegistratorFormRef;
                RegistratorFormRef.Owner = this;
                RegistratorFormRef.Show();
                Visible = false;

                Registrator_Click?.Invoke(this, EventArgs.Empty);
                break;
            }

            case Entities.Doctor:
            {
                textBox1.Clear();
                DoctorForm doctorForm = new DoctorForm(this);
                IDoctorViewRef   = doctorForm;
                doctorForm.Owner = this;
                doctorForm.Show();
                Visible = false;

                Doctor_Click?.Invoke(this, EventArgs.Empty);
                break;
            }

            case Entities.Empty:
            {
                MessageService.ShowWarning("Wrong login was entered");
                textBox1.Clear();
                break;
            }
            }

            MelodyThread.Suspend();
        }