protected ViewModelBase(IMessageBoxService messageBoxService, IEventAggregator eventAggregator, AppRepository appRepository, IoCProxy ioc) { MessageBoxService = messageBoxService; AppRepository = appRepository; EventAggregator = eventAggregator; IoC = ioc; }
public MainViewModel(IEventAggregator eventAggregator, IoCProxy ioc) { eventAggregator.Subscribe(this); Handle(new ShowViewModelMessage(ioc.Get <LoginPageViewModel>())); }
public LoginPageViewModel(IMessageBoxService messageBoxService, IEventAggregator eventAggregator, IoCProxy ioc) : base(messageBoxService, eventAggregator, ioc) { AddValidationRule(() => Email) .Condition(() => !EmailValidation.Check(Email)) .Message("-"); AddValidationRule(() => Password) .Condition(() => string.IsNullOrEmpty(Password)) .Message("-"); #if DEBUG // Pro účely ladění a vývoje. Zadávat furt heslo je otravný. Email = "*****@*****.**"; Password = "******"; #endif }
protected ViewModelBase(IMessageBoxService messageBoxService = null, IEventAggregator eventAggregator = null, IoCProxy ioc = null) : this(messageBoxService, eventAggregator, new AppRepository(), ioc) { }
public RegisterPageViewModel(IMessageBoxService messageBoxService, IEventAggregator eventAggregator, IoCProxy ioc) : base(messageBoxService, eventAggregator, ioc) { AddValidationRule(() => Email).Condition(() => !EmailValidation.Check(Email)).Message("-"); AddValidationRule(() => Password).Condition(() => string.IsNullOrEmpty(Password)).Message("-"); AddValidationRule(() => RepeatPassword).Condition(() => string.IsNullOrEmpty(RepeatPassword)).Message("-"); AddValidationRule(() => FirstName).Condition(() => string.IsNullOrEmpty(FirstName)).Message("-"); AddValidationRule(() => Surname).Condition(() => string.IsNullOrEmpty(Surname)).Message("-"); }