public LoginViewModel(IUnityContainer container) { CurrentUser = new Login(); CurrentUser.PropertyChanged += login_PropertyChanged; LoginCommand = new DelegateCommand(ProcessLogin, () => CurrentUser.IsValid); _container = container; LoadValues(); // subscribe to application loading status messages EventSystem.Subscribe<GenericEvent<string>>(xx => OnUIThread(() => { ApplicationLoadingStatus = xx.Message; })); #if DEBUG OnUIThread(() => { if (string.IsNullOrEmpty(CurrentUser.Username)) { CurrentUser.Username = SecurityModule.UserNameAdmin; } if (string.IsNullOrEmpty(CurrentUser.BaseUrl)) { CurrentUser.BaseUrl = GetConnectionStringBaseUrl(SecurityConfiguration.Instance.Connection.DataServiceBaseUriName); } CurrentUser.Password = "******"; }); #endif }
public LoginViewModel(IUnityContainer container) { CurrentUser = new Login(); CurrentUser.PropertyChanged += login_PropertyChanged; LoginCommand = new DelegateCommand(ProcessLogin, () => CurrentUser.IsValid); _container = container; LoadValues(); #if DEBUG OnUIThread(() => { if (string.IsNullOrEmpty(CurrentUser.Username)) { CurrentUser.Username = SecurityModule.UserNameAdmin; } if (string.IsNullOrEmpty(CurrentUser.BaseUrl)) { CurrentUser.BaseUrl = GetConnectionStringBaseUrl(SecurityConfiguration.Instance.Connection.DataServiceBaseUriName); } CurrentUser.Password = "******"; }); #endif }