Пример #1
0
        private static void Start()
        {
            if (Isset == "0")
            {
                try
                {
                    cdo.RemoveDisplay();
                }
                catch { }
                try
                {
                    cdo.SetDisplay(true, true, Base_DL.iniEntity.DefaultMessage);
                }
                catch { }
            }
            else
            {
                try
                {
                    cdo.SetDisplay(true, true, Base_DL.iniEntity.DefaultMessage);
                }
                catch { }
            }
            Console.ReadLine();
            //while (true)
            //{
            //    Thread.Sleep(3*1000);
            //    Login_BL bbl = new Login_BL();
            //    Base_DL bdl = new Base_DL();

            //    if (bbl.Display_Service_Status() == "1")
            //    {
            //       if (Base_DL.iniEntity.IsDM_D30Used)
            //        cdo.SetDisplay(true,true, Base_DL.iniEntity.DefaultMessage);
            //    }
            //    //else {
            //    //    try
            //    //    {
            //    //        cdo.RemoveDisplay();
            //    //    }
            //    //    catch { }

            //    //}
            //}
        }
Пример #2
0
        public static void Main(string[] args)
        {
            try
            {
                cdo = new CashDrawerOpen();
                //Console.CancelKeyPress += new ConsoleCancelEventHandler(Console_CancelKeyPress);
                //    Isset = args[0];
                var      f   = "";
                Login_BL lbl = new Login_BL();;
                if (lbl.ReadConfig())
                {
                    f = Base_DL.iniEntity.DefaultMessage;
                }
                else
                {
                    f = "No Message at that moment. . . . . . . . . . . . . . . . ";
                }

                // cdo.RemoveDisplay();
                long RD = 0;
                long SD = 0;
                while (true)
                {
                    // Login_BL lbl = new Login_BL();
                    if (lbl.Display_Service_Status() == "0")
                    {
                        if (RD == 0)
                        {
                            cdo.RemoveDisplay();
                        }
                        RD++;
                        SD = 0;
                    }
                    else
                    {
                        if (SD == 0)
                        {
                            cdo.SetDisplay(true, true, f);
                        }
                        SD++;
                        RD = 0;
                    }
                    Thread.Sleep(1500);
                }
                //
                // cdo.SetDisplay(false, false, "1233123","PPPPP","TTTTT");
                //Start();
                //   Console.CancelKeyPress += new ConsoleCancelEventHandler(Console_CancelKeyPress);
            }
            catch (Exception ex)
            { Console.WriteLine(ex.StackTrace + ex.Message); }
            Console.ReadLine();

            //Start();
        }
        private void Capital_MainMenu_Load(object sender, EventArgs e)
        {
            //var f=  GetMessages();
            //  var ds = ASCIIEncoding.ASCII.GetByteCount(f);
            Clear_Text(panel_left);
            Clear_Text(panel_right);
            BindButtonName();
            try
            {
                //var pth = "C:\\SMS\\Appdata";
                //var getmsg = Base_DL.iniEntity.DefaultMessage;
                //Process.Start(pth+ @"\"+ "Display_Service" + ".exe","02_1" + " "+ getmsg + " "+ "-" +" "+"-" );

                if (Base_DL.iniEntity.IsDM_D30Used)
                {
                    cdo.SetDisplay(true, true, Base_DL.iniEntity.DefaultMessage);
                }///Start New Window for display by PTK
            }
            catch (Exception ex)
            {
                MessageBox.Show("Current Error is " + ex.Message + " Skipped if Epson TM-M30 have not been installed.");
            }
        }