Пример #1
0
        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;
                    });
                }
            }
        }
Пример #2
0
        void Set_time_now(object sender, RoutedEventArgs e) // Test
        {
            if (secToFinish > 0 && secToStart <= 0)
            {
                MessageBox.Show("Дождитесь окончания аукциона");
            }
            else
            {
                if (timer.IsEnabled)
                {
                    timer.Stop();
                }

                dbf.Open();
                dbf.Test_SetAuctTimerByNow(auctID);
                dbf.Close();
                MainLoad();
            }
        }