private void MachineDataInitialize()
 {
     _machineData = new MachineData(EnableVirtualIndexer);
     _machineData.ProductInLoadingStatusChanged   += ProductInLoadingStatusChanged;
     _machineData.ProductInUnloadingStatusChanged += ProductInUnloadingStatusChanged;
     _machineData.ReferenceChanged         += ReferenceChanged;
     _machineData.TraceabilityStateChanged += TraceabilityStateChanged;
     if (EnableVirtualIndexer)
     {
         _machineData.VirtualIndexerStateChanged += VirtualIndexerStateChanged;
     }
 }
 private void MachineDataReInitialize()
 {
     if (_machineData != null)
     {
         _machineData.ProductInLoadingStatusChanged   -= ProductInLoadingStatusChanged;
         _machineData.ProductInUnloadingStatusChanged -= ProductInUnloadingStatusChanged;
         _machineData.ReferenceChanged         -= ReferenceChanged;
         _machineData.TraceabilityStateChanged -= TraceabilityStateChanged;
         if (EnableVirtualIndexer)
         {
             _machineData.VirtualIndexerStateChanged -= VirtualIndexerStateChanged;
         }
         _machineData = null;
     }
     MachineDataInitialize();
 }