private void bandevent()
        {
            SyncClient client = new SyncClient();
            //client.SyncInfoList();
            //创建后台同步的线程
            Thread syncThread    = new Thread(new ThreadStart(client.SyncMethod));
            Thread TipFormThread = new Thread(new ThreadStart(ShowTipFormThread));
            //  Thread testtipThread = new Thread(new ThreadStart(showtesttipThread));
            //syncThread.Start();
            BizBillController bbc        = new BizBillController();
            Thread            billThread = new Thread(new ThreadStart(bbc.RemoteGetBillList));

            //  billThread.Start();

            OpenDefaultTable();

            Utils.utils.MyEvent                     += ShowTip;
            Utils.utils.MessageBoxEvent             += ShowMessageBox;
            Utils.utils.MessageBoxYesNoEvent        += ShowMessageYesNoBox;
            MyEvent.More.MoreEvent.ReplaceEvent     += MyReplaceEvent;
            MyEvent.More.MoreEvent.ShowWaitEvent    += MyShowWaitEvent;
            MyEvent.More.MoreEvent.EndShowWaitEvent += MyEndShowWaitEvent;
            Utils.utils.ShowWaitEvent               += MyShowWaitEvent;
            Utils.utils.EndShowWaitEvent            += MyEndShowWaitEvent;
            Utils.utils.MessageBoxTipsFormListEvent += ShowMessageBoxTipsFormListEvent;
            TipFormThread.Start();
        }
Esempio n. 2
0
        public MainForm()
        {
            InitializeComponent();

            SyncClient client = new SyncClient();
            //client.SyncInfoList();
            //创建后台同步的线程
            Thread syncThread    = new Thread(new ThreadStart(client.SyncMethod));
            Thread TipFormThread = new Thread(new ThreadStart(ShowTipFormThread));
            //  Thread testtipThread = new Thread(new ThreadStart(showtesttipThread));
            //syncThread.Start();
            BizBillController bbc        = new BizBillController();
            Thread            billThread = new Thread(new ThreadStart(bbc.RemoteGetBillList));
            //  billThread.Start();

            BIZFoodController bfc = new BIZFoodController();

            //  var tmp = bfc.GetFoodList(0);

            comboBoxEx1.Items.AddRange(new object[] { eStyle.Office2013, eStyle.OfficeMobile2014, eStyle.Office2010Blue,
                                                      eStyle.Office2010Silver, eStyle.Office2010Black, eStyle.VisualStudio2010Blue, eStyle.VisualStudio2012Light,
                                                      eStyle.VisualStudio2012Dark, eStyle.Office2007Blue, eStyle.Office2007Silver, eStyle.Office2007Black });
            comboBoxEx1.SelectedIndex = 0;
            foreach (DevExpress.Skins.SkinContainer skin in DevExpress.Skins.SkinManager.Default.Skins)
            {
                comboBoxEdit1.Properties.Items.Add(skin.SkinName);
            }
            this.WindowState = FormWindowState.Maximized;

            //默认打开桌位
            OpenDefaultTable();

            Utils.utils.MyEvent                     += ShowTip;
            Utils.utils.MessageBoxEvent             += ShowMessageBox;
            Utils.utils.MessageBoxYesNoEvent        += ShowMessageYesNoBox;
            MyEvent.More.MoreEvent.ReplaceEvent     += MyReplaceEvent;
            MyEvent.More.MoreEvent.ShowWaitEvent    += MyShowWaitEvent;
            MyEvent.More.MoreEvent.EndShowWaitEvent += MyEndShowWaitEvent;
            Utils.utils.MessageBoxTipsFormListEvent += ShowMessageBoxTipsFormListEvent;
            TipFormThread.Start();
            //  testtipThread.Start();
            //加载顶部bar
            MyControl.TopBarControl topBar = new MyControl.TopBarControl();
            topBar.Dock = DockStyle.Fill;
            this.tableLayoutPanel1.Controls.Add(topBar, 0, 0);
            topBar.MyEvent += TopBarEvent;
        }