public LoginViewModel( ISettingsService settingsService = null, IOpenUrlService openUrlService = null, IIdentityService identityService = null ) : base("Authentication") { this.settingsService = settingsService ?? Locator.Current.GetService <ISettingsService>(); this.openUrlService = openUrlService ?? Locator.Current.GetService <IOpenUrlService>(); this.identityService = identityService ?? Locator.Current.GetService <IIdentityService>(); userName = string.Empty; password = string.Empty; this.UserDialogResult = false; this.WhenAnyValue(x => x.IdentityServerUrl) .Subscribe(s => this.settingsService.IdentityServerUrl = s); // TODO: this.MockSignInCommand = ReactiveCommand.Create(async () => await MockSignInAsync()); this.SignInCommand = ReactiveCommand.Create(async() => await SignInAsync()); this.RegisterCommand = ReactiveCommand.Create(Register); this.NavigateCommand = ReactiveCommand.Create <string>(async(url) => await NavigateAsync(url)); //this.SettingsCommand = ReactiveCommand.Create(async () => await SettingsAsync()); //this.ValidateUserNameCommand = ReactiveCommand.Create(() => ValidateUserName()); //this.ValidatePasswordCommand = ReactiveCommand.Create(() => ValidatePassword()); // InvalidateMock(); // TODO: AddValidations(); }
/// <summary> /// ctor(). /// </summary> public SignUpViewModel(IOpenUrlService openUrlService) { _openUrlService = openUrlService; ActionBarHeader = _SIGN_UP_HEADER; BackCommand = new Command(async() => { await NavigationService.GoBackAsync(); }); }
public LoginViewModel(IOpenUrlService openUrlService, IIdentityService identityService) { _openUrlService = openUrlService; _identityService = identityService; _userName = new ValidatableObject <string>(); _password = new ValidatableObject <string>(); InvalidateMock(); AddValidations(); }
public LoginViewModel() { _settingsService = DependencyService.Get <ISettingsService> (); _openUrlService = DependencyService.Get <IOpenUrlService> (); _identityService = DependencyService.Get <IIdentityService> (); _userName = new ValidatableObject <string>(); _password = new ValidatableObject <string>(); InvalidateMock(); AddValidations(); }
public LoginViewModel( ISettingsService settingsService, IDialogService dialogService, INavigationService <ViewModelBase> navigationService, IOpenUrlService openUrlService, IIdentityService identityService ) : base(settingsService, dialogService, navigationService) { _openUrlService = openUrlService; _identityService = identityService; _userName = new ValidatableObject <string>(); _password = new ValidatableObject <string>(); InvalidateMock(); AddValidations(); }
public Workspace(IOpenUrlService openUrlService = null, IDialogService dialogService = null, ISettingsService settingsService = null, IIdentityService identityService = null) { this.openUrlService = openUrlService ?? Locator.Current.GetService <IOpenUrlService>(); this.dialogService = dialogService ?? Locator.Current.GetService <IDialogService>(); this.settingsService = settingsService ?? Locator.Current.GetService <ISettingsService>(); this.identityService = identityService ?? Locator.Current.GetService <IIdentityService>(); this.newNeuronTreeCommand = ReactiveCommand.Create(() => { this.panes.Add(new NeuronTreePaneViewModel()); this.ActiveDocument = this.panes.Last(); }); this.newNotificationsCommand = ReactiveCommand.Create(() => { this.panes.Add(new NotificationsPaneViewModel()); this.ActiveDocument = this.panes.Last(); }); this.signInCommand = ReactiveCommand.Create <object>(async(parameter) => await this.OnSignInClicked(parameter)); this.openAboutCommand = ReactiveCommand.Create(() => this.openUrlService.OpenUrl("https://github.com/ei8/cortex-diary")); }
public OpenLinkCommand(IOpenUrlService openUrlService, IMessageBoxService messageBoxService) { OpenUrlService = openUrlService; MessageBoxService = messageBoxService; }
public Task <bool?> ShowLogin(ISettingsService settingsService, IOpenUrlService openUrlService, IIdentityService identityService, object owner, out bool result) { return(this.ShowDialog <bool>(new LoginViewModel(settingsService, openUrlService, identityService), owner, out result, "Avatar Server Log In", 800, 630)); }