public LoginVewModel(IWindowFactory <RegisterViewModel> registerWindowFactory, IWindowFactory <MainViewModel> mainWindowFactory) { _registerWindowFactory = registerWindowFactory; _mainWindowFactory = mainWindowFactory; LoginedUser = new UserCr(); LoginedUser.Nickname = "Asd1"; }
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); }
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); }
public InviteViewModel(UserCr user, long channelId) { _user = user; _channeId = channelId; }