Ejemplo n.º 1
0
        /// <summary>
        /// IntData and StringData of chosen  exchanger
        /// </summary>
        /// <returns></returns>
        public override DataClass GetPowerData()
        {
            var result = new DataClass();

            if (SelectedValueHeaterExchange == RecupList[0])
            {
                DataClass rotorPower = RotorVM.GetPowerData();
                if (rotorPower != null)
                {
                    result.IntData.AddRange(rotorPower.IntData);
                    result.StringData.AddRange(rotorPower.StringData);
                }
            }
            else if (SelectedValueHeaterExchange == RecupList[2])
            {
                DataClass plateBypassPower = PlateBypassVM.GetPowerData();
                if (plateBypassPower != null)
                {
                    result.IntData.AddRange(plateBypassPower.IntData);
                    result.StringData.AddRange(plateBypassPower.StringData);
                }
            }
            else if (SelectedValueHeaterExchange == RecupList[3])
            {
                DataClass glycolPower = GlycolVM.GetPowerData();
                if (glycolPower != null)
                {
                    result.IntData.AddRange(glycolPower.IntData);
                    result.StringData.AddRange(glycolPower.StringData);
                }
            }
            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// StringData[0]-Type of exchanger,StringData[1]-Temp. sensor,StringData[2]-Press. sensor
        /// After - IntData and StringData of chosen exchanger
        /// </summary>
        /// <returns></returns>
        public override DataClass GetControlData()
        {
            var result = new DataClass();

            result.StringData.Add(SelectedValueHeaterExchange);
            result.StringData.Add(BoolToStringConverter.BTS((bool)IsTempSensor));
            result.StringData.Add(BoolToStringConverter.BTS((bool)IsPressureSensor));
            if (SelectedValueHeaterExchange == RecupList[0])
            {
                DataClass rotorControl = RotorVM.GetControlData();
                if (rotorControl != null)
                {
                    result.IntData.AddRange(rotorControl.IntData);
                    result.StringData.AddRange(rotorControl.StringData);
                }
            }
            else if (SelectedValueHeaterExchange == RecupList[2])
            {
                DataClass PlateBypassControl = PlateBypassVM.GetControlData();
                if (PlateBypassControl != null)
                {
                    result.IntData.AddRange(PlateBypassControl.IntData);
                    result.StringData.AddRange(PlateBypassControl.StringData);
                }
            }
            else if (SelectedValueHeaterExchange == RecupList[3])
            {
                DataClass GlycolResult = GlycolVM.GetControlData();
                if (GlycolResult != null)
                {
                    result.IntData.AddRange(GlycolResult.IntData);
                    result.StringData.AddRange(GlycolResult.StringData);
                }
            }
            return(result);
        }