Exemplo n.º 1
0
 private void _ref_Conveyor_OnStateChanged(CReference sender, enumReferenceState state)
 {
     if (state == LGCNS.ezControl.Common.enumReferenceState.Active && state == LGCNS.ezControl.Common.enumReferenceState.Active)
     {
         this.lblConnConveyor.Content   = "Conveyor Connected";
         this.bdConnConveyor.Background = new SolidColorBrush(Colors.Green);
         this.BtnConnect.IsEnabled      = false;
         this.BtnDisconnect.IsEnabled   = true;
     }
     else if (state == LGCNS.ezControl.Common.enumReferenceState.Fault)
     {
         this.lblConnConveyor.Content   = "Conveyor Disconnected";
         this.bdConnConveyor.Background = new SolidColorBrush(Colors.Red);
         this.BtnConnect.IsEnabled      = true;
         this.BtnDisconnect.IsEnabled   = false;
     }
     state_conveyor = state;
 }
Exemplo n.º 2
0
        private void _ref_Sorter_OnStateChanged(CReference sender, enumReferenceState state)
        {
            if (state == LGCNS.ezControl.Common.enumReferenceState.Active && state == LGCNS.ezControl.Common.enumReferenceState.Active)
            {
                this.lblConnSorter.Content   = "Sorter Connected";
                this.bdConnSorter.Background = new SolidColorBrush(Colors.Green);
                this.BtnConnect.IsEnabled    = false;
                this.BtnDisconnect.IsEnabled = true;

                this.BaseClass.MsgInfo("CMPT_CONNECT");
            }
            else if (state == LGCNS.ezControl.Common.enumReferenceState.Fault && state == LGCNS.ezControl.Common.enumReferenceState.Fault)
            {
                this.lblConnSorter.Content   = "Sorter Disconnected";
                this.bdConnSorter.Background = new SolidColorBrush(Colors.Red);
                this.BtnConnect.IsEnabled    = true;
                this.BtnDisconnect.IsEnabled = false;

                this.BaseClass.MsgInfo("CMPT_DISCONNECT");
            }
            state_sorter = state;
        }