public void Run() { this.Storage.Initialize(); this.TransactionPool.WipeThread.Start(); Log.Info(String.Format("Engine starting running(version:{0})...", Assembly.GetAssembly(this.GetType()).GetName().Version)); //F3Gate would start after successful log in. this.CloudParking.Start(); Log.Info("Engine started!"); this.UiControl.Dispatcher.Invoke(new Action(() => { this.UiControl.MajorWindow.Show(); this.UiControl.MajorWindow.MainPage.ParkPage.RefreshData ( this.Storage.GetTodayParking() ); this.UiControl.MajorWindow.MainPage.TicketPage.RefreshData ( this.Storage.GetTodayTicketUsed() ); this.UiControl.LoginWindow.Owner = this.UiControl.MajorWindow; this.UiControl.LoginWindow.UserNameTextBox.Text = LoginUtils.ReadPerservedAccount( new FileInfo(FileConfig.FindConfig("GUI.cfg").GetString("PERSERVEACCOUNTFILENAME"))).Item1; this.UiControl.LoginWindow.PasswordTextBox.Password = LoginUtils.ReadPerservedAccount( new FileInfo(FileConfig.FindConfig("GUI.cfg").GetString("PERSERVEACCOUNTFILENAME"))).Item2; this.UiControl.LoginWindow.ShowDialog(); })); this.UiControl.Run(); }