Exemple #1
0
        public static void PrintFCheckShowWnd()
        {
            ctrlShowOChecks ctrlSelectChk = new ctrlShowOChecks();

            ctrlSelectChk.InitData(GetCurentChecks());
            PDSystem.AlertModalWindow wnd = PDSystem.ModalWindowsForegraund.GetModalWindow(ctrlSelectChk);
            ctrlSelectChk.SetOwnerWnd(wnd);
            ctrlSelectChk.Height = 700;
            ctrlSelectChk.Width  = 950;
            //wnd.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
            //wnd.WindowState = System.Windows.WindowState.Maximized;
            wnd.ShowDialog();
        }
Exemple #2
0
        public static void ShowWndApplyCard(FayRetailCheckInfo DefaultCheck)
        {
            ctrlApplyFayRetailCard ctrlSetCard = new ctrlApplyFayRetailCard();

            ctrlSetCard.SetCurCheck(DefaultCheck, AlohaTSClass.CurentWaiter.ToString());

            PDSystem.AlertModalWindow wnd = PDSystem.ModalWindowsForegraund.GetModalWindow(ctrlSetCard);
            //PDSystem.AlertModalWindow wnd = new PDSystem.AlertModalWindow();
            //wnd.SetContent(ctrlSetCard);
            ctrlSetCard.SetOwnerWnd(wnd);
            ctrlSetCard.Height = 700;
            ctrlSetCard.Width  = 950;
            //wnd.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
            //wnd.WindowState = System.Windows.WindowState.Maximized;
            ctrlSetCard.SettbCodeFocus();
            wnd.ShowDialog();
        }
Exemple #3
0
        public static void GetItmWeight(int Barcode, string DishName)
        {
            if (Running)
            {
                try
                {
                    ScaleWnd.Close();
                }
                catch
                { };
                try
                {
                    myScale.Disconnect();
                }
                catch
                {
                }
            }
            ctrlMess = new ctrlScaleMessage();
            ScaleWnd = PDSystem.ModalWindowsForegraund.GetModalWindow(ctrlMess);
            ctrlMess.SetOwner(ScaleWnd);
            Running = true;
            ctrlMess.SetDish(Barcode, DishName);
            GetWieghtQueueStop = false;

            /*
             * try
             * {
             *  myScale.Disconnect();
             * }
             * catch
             * {
             *
             * }
             */

            switch (iniFile.ScaleType)
            {
            case 0:
                break;

            case 1:
                break;

            case 2:
                break;

            case 3:
                myScale = new ScaleCasSWN();
                break;

            default:
                break;
            }
            if (!myScale.Connect())
            {
                ctrlMess.SetError("Нет соединения с весами. Com " + iniFile.ScalePort.ToString());
            }


            Thread ScaleWorkThread = new Thread(GetWieghtQueue);

            //ShtrihWorkThread.SetApartmentState(ApartmentState.STA);
            ScaleWorkThread.Start();

            ScaleWnd.ShowDialog();
            GetWieghtQueueStop = true;

            myScale.Disconnect();
            Running = false;
        }