public Forum_main() { InitializeComponent(); viewer = OutputView; db = new DBLoad(); dbf = new DBFill(); ver03.Properties.Settings.Default.Loading = true; Thread newThread = new Thread(ShowForum); newThread.Start(); }
void MainLoad() { isPageSelect = true; ver03.Properties.Settings.Default.Loading = true; dbl = new DBLoad(); dbf = new DBFill(); InitColors(); InitStoryboard(); pathArrInit(); Initial_Timer(); Initial_anim_timer(); int auctid = ver03.Properties.Settings.Default.AuctionSelectId; if (auctid != 0) { this.auctID = auctid; } else { MessageBox.Show(auctid.ToString()); } image_presenter = img_now; image_index_prsenter = tb_photoIndex; Thread thread = new Thread(LoadAndShowAll); thread.Start(); void LoadAndShowAll() { LoadAuction(); // have Open and close LoadCar(); // have Open and close dbl.Open(); dbf.Open(); LoadTimes(); CheckAuctionStatus(); if (car != null) { this.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.SystemIdle, (ThreadStart) delegate() { upCarInfo(); upAuctInfo(); SetButtonPrices(); photos = new AuctCarPhotos(car.id, image_presenter, image_index_prsenter); ver03.Properties.Settings.Default.Loading = false; }); } } }
void Load_this_topic() { // ver03.Properties.Settings.Default.Loading = true; this.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.SystemIdle, (ThreadStart) delegate() { //Thread.Sleep(TimeSpan.FromSeconds(3)); //SLEEP dbl = new DBLoad(); mytopic = dbl.GetTopick(id_topic); tb_header.Text = mytopic.name.Replace(Environment.NewLine, " "); //tb_topic_context.Text = mytopic.context.Replace(Environment.NewLine, " "); tb_topic_context.Text = mytopic.context; Load_Answers(); ver03.Properties.Settings.Default.Loading = false; }); }
void Load_Answers() { this.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.SystemIdle, (ThreadStart) delegate() { timer.Stop(); dbl = new DBLoad(); mytopic = dbl.GetTopick(id_topic); sp_answers.Children.Clear(); answers = dbl.GetAnswers(id_topic); foreach (var x in answers) { sp_answers.Children.Add(GetAnswer(x)); } timer.Start(); }); }
void Load_nickname() { this.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.SystemIdle, (ThreadStart) delegate() { ShowLoadIndicator(); }); Thread.Sleep(TimeSpan.FromSeconds(1)); this.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.SystemIdle, (ThreadStart) delegate() { db = new DBLoad(id); ver03.Properties.Settings.Default.NickName = db.nick; Set_NickName(db.nick); Check_IsAdmin(); // Administaration part CollapseLoadIndicator(); }); }
public AutoPark() { InitializeComponent(); FileManager menej = new FileManager(); List <CarAutopark> cars = new List <CarAutopark>(); DBLoad dbl = new DBLoad(); cars = dbl.GetAutoParkCars(); if (cars == null) { MessageBox.Show("Ошибка получения коллекции авто для форума"); return; } foreach (CarAutopark car in cars) { menej.CreateCarFolder(car.id); menej.LoadCarPhotos(car.id); CreateCarBlock(car); } AddEmptyGrid(); }