예제 #1
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);
        }