Beispiel #1
0
 public EngineFM2()
 {
     FieldMax2Listener = new cFM2Listener();
     ThisListener      = (IFM2Listener)FieldMax2Listener;
     ScanUSBForChange  = new cFM2ScanUSBForChange();
     ScanForData       = new cFM2ScanForDataClass();
     NotifyMe          = new cFM2Notify(this.EngineFm2EventHandler, this.EngineFM2ErrorEventHandler,
                                        this.EngineFM2DeviceStatusNotifier, this.EngineFM2DisplayZeroDeviceProgressToClientHandler);
     FieldMax2Listener.DeviceEvents = NotifyMe;
     ScanUSBForChange.CheckTimer(ref ThisListener);
     //timer.Elapsed += this.CheckDevices;
     Console.WriteLine("Класс создан");
 }
Beispiel #2
0
        public EngineFM2(cFM2Notify.FM2Notifier FM2EventHandler, cFM2Notify.FM2ErrorNotifier FM2ErrorEventHandler,
                         cFM2Notify.FM2DeviceStatusNotifier FM2DeviceStatusNotifier, cFM2Notify.FM2DisplayZeroDeviceProgressToClient FM2DisplayZeroDeviceProgressToClientHandler)
        {
            FieldMax2Listener                 = new cFM2Listener();
            ThisListener                      = (IFM2Listener)FieldMax2Listener;
            ScanUSBForChange                  = new cFM2ScanUSBForChange();
            ScanForData                       = new cFM2ScanForDataClass();
            NotifyMe                          = new cFM2Notify(FM2EventHandler, FM2ErrorEventHandler, FM2DeviceStatusNotifier, FM2DisplayZeroDeviceProgressToClientHandler);
            NotifyMe.notifyEvent             += this.EngineFm2EventHandler;
            NotifyMe.notifyErrorEvent        += this.EngineFM2ErrorEventHandler;
            NotifyMe.notifyDeviceStatusEvent += this.EngineFM2DeviceStatusNotifier;
            NotifyMe.notifyDisplayZeroDeviceProgressToClient += this.EngineFM2DisplayZeroDeviceProgressToClientHandler;
            FieldMax2Listener.DeviceEvents = NotifyMe;
            ScanUSBForChange.CheckTimer(ref ThisListener);

            //timer.Elapsed += this.CheckDevices;
            //lastError.Capacity = 20;
        }
Beispiel #3
0
        public SimpleFM()
        {
            Zeroed       = false;
            FMCounter    = 0;
            PowerOn      = false;
            ProbePresent = false;
            //auto connecting to dll server when class init;
            cListener = new cFM2Listener();
            iListener = (IFM2Listener)cListener;
            ScanData  = new cFM2ScanForData();
            ScanUSB   = new cFM2ScanUSBForChange();
            Notify    = new cFM2Notify();
            Devices   = new cFM2Devices();

            cListener.DeviceEvents = Notify;
            ScanUSB.CheckTimer(iListener);
            Notify.NewStatusMessage += Notify_NewStatusMessage;
            Notify.NewMessage       += Notify_NewMessage;
            FMCounter    = 0;
            PowerOn      = false;
            ProbePresent = false;
            System.Diagnostics.Debug.Write("SimpleFM constructor!\r");
            //double pwr = Power;
        }