Exemple #1
0
    public void LogIn()
    {
        playSound("Button");

        LoadingPanel.SetActive(true);
        BacktoryUser.LoginInBackground(usernameLogIn.text, passwordLogIn.text, loginResponse =>
        {
            // Login operation done (fail or success), handling it:
            if (loginResponse.Successful)
            {
                PlayerPrefs.SetString("Username", usernameLogIn.text);
                PlayerPrefs.SetString("PassWord", passwordLogIn.text);
                // Login successful
                LogInPanel.SetTrigger("Idle");
                DownloadData();
                ShowLeaderBoard();
            }
            else if (loginResponse.Code == (int)BacktoryHttpStatusCode.Unauthorized)
            {
                // Username 'mohx' with password '123456' is wrong
                Debug.Log("Either username or password is wrong.");
                LogInLogText.text = GameManager.Language("نام کاربری یا رزم عبور اشتباه است", "Either username or password is wrong.", LogInLogText);
                LoadingPanel.SetActive(false);
            }
            else
            {
                // Operation generally failed, maybe internet connection issue
                Debug.Log("Login failed for other reasons like network issues.");
                LogInLogText.text = GameManager.Language("خطلا در ورود", "Login failed", LogInLogText);
                LoadingPanel.SetActive(false);
            }
        });
    }
Exemple #2
0
    public void MovetoLogIn()
    {
        PanelOff();
        LogInPanel logInPanel = Panels.instance.logInPanel;

        logInPanel.gameObject.SetActive(true);
        logInPanel.OnPanel(exPanel);
        exPanel.gameObject.SetActive(false);
    }
 public void initNextPanels(
     Schedule s,
     LogInPanel l,
     ReservationsNurse r,
     AnalysisNurse a
     )
 {
     this.SchedulePanel          = s;
     this.LogInPanel             = l;
     this.AnalysisPanel          = a;
     this.ReservationsNursePanel = r;
 }
Exemple #4
0
        /* Setters and getters */

        public void initNextPanels(
            TimeTablesDoc t,
            ReservationsDoc r,
            Prescription p,
            LogInPanel l
            )
        {
            this.TimeTablesDocPanel   = t;
            this.ReservationsDocPanel = r;
            this.PrescriptionPanel    = p;
            this.LogInPanel           = l;
        }
 public void initNextPanels(
     Patients p,
     OperatorPatientCharts pc,
     Reservations r,
     OperatorTimetables t,
     LogInPanel l
     )
 {
     this.PatientsPanel      = p;
     this.PatientChartsPanel = pc;
     this.ReservationsPanel  = r;
     this.TimeTablesPanel    = t;
     this.LogInPanel         = l;
 }
 private void button1_Click(object sender, EventArgs e)
 {
     foreach (Usuario registro in Lusuarios)
     {
         if (tbUsuario.Text == registro.id && tbpass.Text == registro.password)
         {
             MessageBox.Show("Bienvenido");
             LogInPanel.Hide();
             ABCPanel.Show();
             return;
         }
     }
     MessageBox.Show("Nombre de usuario O contraseña incorrectos");
 }
Exemple #7
0
 public void OpenLogInPanel()
 {
     signUpPanel.SetTrigger("Idle");
     LogInName.text = GameManager.Language("ورود", "Log In", LogInName);
     if (PlayerPrefs.GetString("Language") == "Persian")
     {
         UserNameLogInText.text = "نام کاربری";
         PassWordLogInText.text = "رمز ورود";
     }
     else
     {
         UserNameLogInText.text = "Username";
         PassWordLogInText.text = "Password";
     }
     LogInPanel.SetTrigger("Enter");
 }
Exemple #8
0
        /* Setters and getters */

        public void initNextPanels(
            Users u,
            Timetables t,
            Services s,
            Medicaments m,
            DoctorInCharge d,
            ManagerAnalytics a,
            LogInPanel l
            )
        {
            this.UsersPanel          = u;
            this.TimetablesPanel     = t;
            this.ServicesPanel       = s;
            this.MedicamentsPanel    = m;
            this.DoctorInChargePanel = d;
            this.AnalyticsPanel      = a;
            this.LogInPanel          = l;
        }
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
            this.SuspendLayout();
            //
            // Panels
            //
            LogInPanel logInPanel = new LogInPanel();

            ManagerMainPanel managerMainPanel        = new ManagerMainPanel();
            ManagerAnalytics managerAnalyticsPanel   = new ManagerAnalytics(managerMainPanel.Panel);
            DoctorInCharge   managerDICPanel         = new DoctorInCharge(managerMainPanel.Panel);
            Medicaments      managerMedicamentsPanel = new Medicaments(managerMainPanel.Panel);
            Services         managerServicesPanel    = new Services(managerMainPanel.Panel);
            Timetables       managerTimetablesPanel  = new Timetables(managerMainPanel.Panel);
            Users            managerUsersPanel       = new Users(managerMainPanel.Panel);

            OperatorMainPanel     operatorMainPanel          = new OperatorMainPanel();
            OperatorPatientCharts operatorPatientChartsPanel = new OperatorPatientCharts(operatorMainPanel.Panel);
            Patients           operatorPatientsPanel         = new Patients(operatorMainPanel.Panel);
            Reservations       operatorReservationsPanel     = new Reservations(operatorMainPanel.Panel);
            OperatorTimetables operatorTimeTablesPanel       = new OperatorTimetables(operatorMainPanel.Panel);

            DoctorMainPanel doctorMainPanel            = new DoctorMainPanel();
            TimeTablesDoc   doctorTimeTablesDocPanel   = new TimeTablesDoc(doctorMainPanel.Panel);
            ReservationsDoc doctorReservationsDocPanel = new ReservationsDoc(doctorMainPanel.Panel);
            Prescription    doctorPrescriptionPanel    = new Prescription(doctorMainPanel.Panel);

            NurseMainPanel    nurseMainPanel              = new NurseMainPanel();
            Schedule          nurseSchedulePanel          = new Schedule(nurseMainPanel.Panel);
            ReservationsNurse nurseReservationsNursePanel = new ReservationsNurse(nurseMainPanel.Panel);
            AnalysisNurse     nurseAnalysisPanel          = new AnalysisNurse(nurseMainPanel.Panel);

            logInPanel.initNextPanels(
                managerMainPanel,
                operatorMainPanel,
                doctorMainPanel,
                nurseMainPanel
                );

            managerMainPanel.initNextPanels(
                managerUsersPanel,
                managerTimetablesPanel,
                managerServicesPanel,
                managerMedicamentsPanel,
                managerDICPanel,
                managerAnalyticsPanel,
                logInPanel
                );

            operatorMainPanel.initNextPanels(
                operatorPatientsPanel,
                operatorPatientChartsPanel,
                operatorReservationsPanel,
                operatorTimeTablesPanel,
                logInPanel
                );

            doctorMainPanel.initNextPanels(
                doctorTimeTablesDocPanel,
                doctorReservationsDocPanel,
                doctorPrescriptionPanel,
                logInPanel
                );

            nurseMainPanel.initNextPanels(
                nurseSchedulePanel,
                logInPanel,
                nurseReservationsNursePanel,
                nurseAnalysisPanel
                );

            //
            // MainForm
            //
            this.AutoScaleMode = AutoScaleMode.Font;
            this.Icon          = ((Icon)(resources.GetObject("$this.Icon")));
            this.Left          = this.Top = 0;
            this.MaximumSize   = new Size(Dimensions.VIEW_WIDTH, Dimensions.VIEW_HEIGHT);
            this.MinimumSize   = this.MaximumSize;
            this.Name          = "MainForm";
            this.MaximizeBox   = false;
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Text          = "E-Pacient GG";
            this.ResumeLayout(false);
            this.PerformLayout();

            this.Controls.Add(logInPanel.Panel);

            this.Controls.Add(managerMainPanel.Panel);
            this.Controls.Add(managerAnalyticsPanel.Panel);
            this.Controls.Add(managerDICPanel.Panel);
            this.Controls.Add(managerMedicamentsPanel.Panel);
            this.Controls.Add(managerTimetablesPanel.Panel);
            this.Controls.Add(managerUsersPanel.Panel);
            this.Controls.Add(managerServicesPanel.Panel);

            this.Controls.Add(operatorMainPanel.Panel);
            this.Controls.Add(operatorPatientsPanel.Panel);
            this.Controls.Add(operatorPatientChartsPanel.Panel);
            this.Controls.Add(operatorReservationsPanel.Panel);
            this.Controls.Add(operatorTimeTablesPanel.Panel);

            this.Controls.Add(doctorMainPanel.Panel);
            this.Controls.Add(doctorTimeTablesDocPanel.Panel);
            this.Controls.Add(doctorReservationsDocPanel.Panel);
            this.Controls.Add(doctorPrescriptionPanel.Panel);

            this.Controls.Add(nurseMainPanel.Panel);
            this.Controls.Add(nurseSchedulePanel.Panel);
            this.Controls.Add(nurseAnalysisPanel.Panel);
            this.Controls.Add(nurseReservationsNursePanel.Panel);
        }
Exemple #10
0
 public LogInController(LogInPanel view)
 {
     this.view = view;
 }
Exemple #11
0
    public void exitLogIn()
    {
        playSound("Button");

        LogInPanel.SetTrigger("Idle");
    }
Exemple #12
0
 public void LogInPanelAppear()
 {
     LogInPanel.Show();
 }