private FlightCenterSystem() { _loginService = new LoginServiceMSSQL(); _functionallityFacade = new FlightCenterSystemFanctionallityFacadeMSSQL(); Task.Run(() => { System.Timers.Timer timer = new System.Timers.Timer(); timer.Interval = 1; timer.Elapsed += new System.Timers.ElapsedEventHandler((o, e) => { _counter++; }); while (true) { if (DateTime.Now.TimeOfDay == _dailyWakeUpTime) { timer.Start(); _functionallityFacade.MoveFlightAndTicketsToHistory(); timer.Stop(); Thread.Sleep(MyConfig.CLEANING_TIME_GAP - _counter); _counter = 0; } else { Thread.Sleep(1000); } } }); }//SINGELTON
public LoginViewModel(LoginServiceBase loginService, DialogServiceViewModel dialogServiceViewModel) { this.loginService = loginService; this.dialogServiceViewModel = dialogServiceViewModel; var netCred = this.loginService.LoadFromRegistry(); if (netCred != null && !string.IsNullOrWhiteSpace(netCred.UserName) && !string.IsNullOrWhiteSpace(netCred.Password)) { this.Username = netCred.UserName; // Don't load the password back into the dialog. //this.Password = netCred.SecurePassword; this.RememberCredentials = true; } this.OkCommand = new DelegateCommand(async p => await OkAction(p)); this.CancelCommand = new DelegateCommand(p => CancelAction(p)); }
private void Start() { ls = ServiceResolver.GetForCurrentPlatform <LoginServiceBase>(); ls.Login(true, onLoginSuccess, onLoginFailed); }
public void Start() { DIContainer.RegisterContainer(0); ls = ServiceResolver.GetForCurrentPlatform <LoginServiceBase>(); ls.Login(true, onLoginSuccess, onLoginFailed); }