void Create_Answer()
        {
            if (ver03.Properties.Settings.Default.Autoriz)
            {
                this.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.SystemIdle,
                                            (ThreadStart) delegate()
                {
                    dbf = new DBFill();
                    dbf.CreateForumAnswer(ver03.Properties.Settings.Default.UserID, id_topic, GetTextFromRTB(rtb_myanswer));

                    if (is_answer)
                    {
                        dbf.CreateNoteFromForumAnswer(other_answer, ver03.Properties.Settings.Default.UserID, GetTextFromRTB(rtb_myanswer), tb_header.Text);
                        is_answer = false;
                    }
                    rtb_myanswer.Document.Blocks.Clear();
                    Scroll.ScrollToEnd();

                    Load_Answers();
                });
            }
            else
            {
                MessageBox.Show("Нужна авторизация");
            }
        }
        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();
        }
Пример #3
0
 public CustomerDataTable()
 {
     cus       = new Customer();
     util      = new Utility(log);
     log       = new LogWrite(new LogOpen());
     dbString  = new DBConnectionString(log);
     dbConnect = new DBConnect(dbString, log);
     dbFill    = new DBFill(dbConnect, log);
     dbDelete  = new DBDelete(dbConnect, log);
     dbInsert  = new DBInsert(dbConnect, log);
     dbUpdate  = new DBUpdate(dbConnect, log);
     dbFilter  = new DBFilter(dbConnect, log);
 }
Пример #4
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;
                    });
                }
            }
        }