Exemple #1
0
        public void OnChangeView(EUserControl userControl, object param)
        {
            try
            {
                switch (userControl)
                {
                case EUserControl.MAIN_USERS:
                    CurrentUC = new UsersUC(_login);
                    break;

                case EUserControl.MAIN_USERS_ADD:
                    CurrentUC = new AddUserUC(_login);
                    break;

                case EUserControl.MAIN_PATIENTS:
                    CurrentUC = new PatientsUC(_login);
                    break;

                case EUserControl.MAIN_PATIENTS_ADD:
                    CurrentUC = new AddPatientUC(_login);
                    break;

                case EUserControl.MAIN_PATIENTS_SINGLE:
                    CurrentUC = new SinglePatientUC(_login, (int)param);
                    break;

                default:
                    break;
                }
            }
            catch (Exception)
            {
            }
        }
Exemple #2
0
 static public void Notify(string token, EUserControl userControl, object param)
 {
     if (callbacks.ContainsKey(token))
     {
         foreach (var callback in callbacks[token])
         {
             callback(userControl, param);
         }
     }
 }
        public void OnConnectView(EUserControl userControl, object login)
        {
            try
            {
                switch (userControl)
                {
                case EUserControl.LOGIN:
                    CurrentUC = new LoginUC();
                    break;

                case EUserControl.MAIN:
                    CurrentUC = new MainUC((string)login);
                    break;

                default:
                    break;
                }
            }
            catch (Exception)
            {}
        }