Beispiel #1
0
        //private RelayCommand _CloseFailCommand;
        //public RelayCommand CloseFailCommand {
        //  get {
        //    if (_CloseFailCommand == null) {
        //      _CloseFailCommand = new RelayCommand(() => {
        //        // add implement in here:

        //        string sa = "sdfg";
        //      });
        //    }
        //    return _CloseFailCommand;
        //  }
        //}


        private void AfterLogin(AfterLoginLogoutMessage m)
        {
            IsAuthenticated = _DataService.LoggedInUser != null;

            if (IsAuthenticated)
            {
                IsAdminVisible = _DataService.LoggedInUser.RoleEnum == PersonRoleEnum.Teacher ||
                                 _DataService.LoggedInUser.RoleEnum == PersonRoleEnum.Admin;
                IscmdLogoutVisible = true;

                WelcomeString = string.Format("Isten hozott {0}!", _DataService.LoggedInUser.TreeDisplayName);
            }
            else
            {
                IsAdminVisible = false;
            }
        }
Beispiel #2
0
    //private RelayCommand _CloseFailCommand;
    //public RelayCommand CloseFailCommand {
    //  get {
    //    if (_CloseFailCommand == null) {
    //      _CloseFailCommand = new RelayCommand(() => {
    //        // add implement in here:

    //        string sa = "sdfg";
    //      });
    //    }
    //    return _CloseFailCommand;
    //  }
    //}


    private void AfterLogin(AfterLoginLogoutMessage m) {

      IsAuthenticated = _DataService.LoggedInUser != null;

      if (IsAuthenticated) {
        IsAdminVisible = _DataService.LoggedInUser.RoleEnum == PersonRoleEnum.Teacher
          || _DataService.LoggedInUser.RoleEnum == PersonRoleEnum.Admin;
        IscmdLogoutVisible = true;

        WelcomeString = string.Format("Isten hozott {0}!", _DataService.LoggedInUser.TreeDisplayName);
      }
      else {
        IsAdminVisible = false;
      }
    }