Пример #1
0
        private void Start_Click(object sender, EventArgs e)
        {
            PLCClient.Get().sendString("G");
            Program.GetVM().logWriteLine("Start command");

            ////Test when an order comes in

            //var order = new Order
            //{
            //    bricks = new Brick
            //    {
            //        blue = 2,
            //        red = 3,
            //        yellow = 1
            //    },
            //    status = "Ready",
            //    time = DateTime.Now
            //};

            ////Fake order number and Ticket



            //var vm = Program.GetVM();

            //vm.CurrentOrder = order;
            //vm.Status = "Exceuting";
            //vm.Info = "Creating your order now!";

            //vm.CurrentOrderName = MESClient.currentOrderName;
            //vm.CurrentOrderKey = MESClient.currentOrderKey;
        }
Пример #2
0
        public static PLCClient Get()
        {
            if (client == null)
            {
                client = new PLCClient();
            }

            return(client);
        }
Пример #3
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            //Start default stuff
            ViewModel = new Form1ViewModel();
            PLCClient.Get().sendString("P"); //Init singleton
            SCADAForm = new Form1(ViewModel);
            var LifetimeThread = new ImAlive();


            //Run Main
            //Application.Run(SCADAForm);
            SCADAForm.ShowDialog();
            LifetimeThread.UptimeThread.Abort();
        }
Пример #4
0
 private void Clear_Click(object sender, EventArgs e)
 {
     PLCClient.Get().sendString("C");
     Program.GetVM().logWriteLine("Clear command");
 }
Пример #5
0
 private void Hold_Click(object sender, EventArgs e)
 {
     PLCClient.Get().sendString("H");
     Program.GetVM().logWriteLine("Hold command");
 }