Пример #1
0
 public LoginVewModel(IWindowFactory <RegisterViewModel> registerWindowFactory,
                      IWindowFactory <MainViewModel> mainWindowFactory)
 {
     _registerWindowFactory = registerWindowFactory;
     _mainWindowFactory     = mainWindowFactory;
     LoginedUser            = new UserCr();
     LoginedUser.Nickname   = "Asd1";
 }
Пример #2
0
        public SchedulerClient CreateSchedulerClient(UserCr user)
        {
            var client = new SchedulerClient();

            client.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None;
            client.ClientCredentials.UserName.UserName = user.Nickname;
            client.ClientCredentials.UserName.Password = user.Password;
            return(client);
        }
Пример #3
0
        public MainViewModel(UserCr user)
        {
            _user = user;
            var clientFactory = new ClientFacrory();

            Client = clientFactory.CreateSchedulerClient(user);
            _noValidationClient = clientFactory.CreateNoValidationClient();
            ImportanceScale     = new ObservableCollection <ImportanceDto>(_noValidationClient.GetImportanceScale());
            RolePermitions      = new ObservableCollection <RolePermitions>(_noValidationClient.GetRolePermitions());
            var res = Client.GetChannels();

            ChannelsInfo = ChannelInfo.Convert(res.CreatedObject, this);
        }
Пример #4
0
 public InviteViewModel(UserCr user, long channelId)
 {
     _user     = user;
     _channeId = channelId;
 }