Пример #1
0
        // Main Constructor
        public Fridge
            (int Price, int OverallVolume, int Weight, int Height, int Width, int Depth,
            string Name, string Manufacturer, string Color, string ProducingCountry,
            bool Display, bool DefrostSystem, bool RehangingDoors, byte[] DeviceImage,
            InstallationMethodType InstallationMethod, ControlType ControlType,
            int NoiseLevel, string Refrigerant, EnergyClassType EnergyClass,
            int CompressorsAmount, int FridgeUsefulVolume, int FreezerUsefulVolume,
            bool FreshnessZone, bool MiniBar,
            FreezerLocationType FreezerLocation, CompressorType CompressorType, FridgeType DeviceType) : base

                (Price, OverallVolume, Weight, Height, Width, Depth,
                Name, Manufacturer, Color, ProducingCountry,
                Display, DefrostSystem, RehangingDoors, DeviceImage,
                InstallationMethod, ControlType,
                NoiseLevel, Refrigerant, EnergyClass)
        {
            // Int
            this.CompressorsAmount   = CompressorsAmount;
            this.FridgeUsefulVolume  = FridgeUsefulVolume;
            this.FreezerUsefulVolume = FreezerUsefulVolume;

            // Bool
            this.FreshnessZone = FreshnessZone;
            this.MiniBar       = MiniBar;

            // Enums
            this.DeviceType      = DeviceType;
            this.CompressorType  = CompressorType;
            this.FreezerLocation = FreezerLocation;
        }
Пример #2
0
        public FridgeCabinet(RfidReader currenRfidReader, string strPortBadgeAndLCD, string strPortTempReader, FridgeType fridgeType)
            : base(currenRfidReader, strPortBadgeAndLCD)
        {
            StrPortTempReader = strPortTempReader;
            _fridgeType       = fridgeType;

            EventThread = new Thread(EventThreadProc)
            {
                Name = "SmartCabinet event", IsBackground = true
            };
            EventThread.Start();

            Clock.Interval = 1000;
            Clock.Elapsed += Timer_Tick;
            Clock.Start();

            if (string.IsNullOrEmpty(strPortTempReader))
            {
                return;
            }

            if (fridgeType == FridgeType.FT_CAREL)
            {
                _tempFridgeReaderCarel = new TempFridgeThreadCarel(strPortTempReader);
                _tempFridgeReaderCarel.StartThread();
            }

            if (fridgeType == FridgeType.FT_EVERCOM)
            {
                _tempFridgeReaderEvercom = new TempFridgeThreadEvercom(strPortTempReader);
                _tempFridgeReaderEvercom.StartThread();
            }

            if (fridgeType == FridgeType.FT_PT100)
            {
                _tempFridgeReaderPT100 = new TempFridgeThreadPT100();
                _tempFridgeReaderPT100.StartThread();
            }
            if (fridgeType == FridgeType.FT_FANEM)
            {
                _tempFridgeFanem = new TempFridgeFanem(strPortTempReader);
                _tempFridgeFanem.StartThread();
            }
        }