Esempio n. 1
0
 public void Insert(int index, AirControlBase acb)
 {
     this.AllAirControlList.Insert(index, acb);
 }
Esempio n. 2
0
        /// <summary>
        /// when derive data update ,it will notify UI to update information
        /// </summary>
        /// <param name="datapack"></param>
        private void DataConverterable_ParseDataChangeEvent(AirControlBase AirControl)
        {
            //  this.TemperatureDisplay = "30 °C";
            //symbol █ █ █ █ █

            this.Currentindex = (AircontrolIndexClass.CurrentAirControlIndex + 1).ToString();

            if (AirControl.conDriveState == "开")
            {
                this.StartView          = "运行";
                this.TemperatureDisplay = AirControl.conTemperatureDdisplay;


                switch (AirControl.conWindPowerMode)
                {
                case "一级":
                    this.WindPowerLevelView = "█";
                    break;

                case "二级":
                    this.WindPowerLevelView = "█ █";
                    break;

                case "三级":
                    this.WindPowerLevelView = "█ █ █";
                    break;

                default:
                    break;
                }

                switch (AirControl.conUpDownWindsweep)
                {
                case "开":
                    this.HorWindView = "上下扫风";
                    break;

                case "关":
                    this.HorWindView = "";
                    break;

                default:
                    break;
                }

                switch (AirControl.conLeftRigetWindsweep)
                {
                case "开":
                    this.HorWindView = "左右扫风";
                    break;

                case "关":
                    this.HorWindView = "";
                    break;

                default:
                    break;
                }

                switch (AirControl.conUpDownWindsweep)
                {
                case "开":
                    this.VerWindView = "上下扫风";
                    break;

                case "关":
                    this.VerWindView = "";
                    break;

                default:
                    break;
                }

                switch (AirControl.conWorkMode)
                {
                case "自动":
                    this.WorkModeDisplay = "自动";
                    break;

                case "制热":
                    this.WorkModeDisplay = "制热";
                    break;

                case "制冷":
                    this.WorkModeDisplay = "制冷";
                    break;

                case "吹风":
                    this.WorkModeDisplay = "吹风";
                    break;

                case "除湿":
                    this.WorkModeDisplay = "除湿";
                    break;

                default:
                    break;
                }

                switch (AirControl.conHeathAndAirChangeMode)
                {
                case "健康模式":
                    this.HealthView    = "健康";
                    this.AirChangeView = "";
                    break;

                case "换气模式":
                    this.HealthView    = "";
                    this.AirChangeView = "换气";
                    break;

                case "健康换气模式":
                    this.HealthView    = "健康";
                    this.AirChangeView = "换气";
                    break;

                case "关":
                    this.HealthView = "";
                    break;

                default:
                    break;
                }

                switch (AirControl.conTemperatureDdisplay)
                {
                case "开":
                    this.TemperatureDisplay = AirControl.conTemperature + "°C";
                    break;

                case "关":
                    this.TemperatureDisplay = "";
                    break;

                default:
                    break;
                }

                switch (AirControl.conDriveState)
                {
                case "开":
                    this.DryView = "辅热";
                    break;

                case "关":
                    this.DryView = "";
                    break;

                default:
                    break;
                }
                switch (AirControl.conTimeMode)
                {
                case "一小时":
                    this.SetTimerView     = "1";
                    this.SetTimerOpenView = "小时后关闭";
                    break;

                case "二小时":
                    this.SetTimerView     = "2";
                    this.SetTimerOpenView = "小时后关闭";
                    break;

                case "三小时":
                    this.SetTimerView     = "3";
                    this.SetTimerOpenView = "小时后关闭";
                    break;

                case "关":
                    this.SetTimerView     = "";
                    this.SetTimerOpenView = "";
                    break;

                default:
                    break;
                }

                switch (AirControl.conSleepMode)
                {
                case "一小时":
                    this.SleepView = "睡眠1";
                    break;

                case "二小时":
                    this.SleepView = "睡眠2";
                    break;

                case "三小时":
                    this.SleepView = "睡眠3";
                    break;

                case "关":
                    this.SleepView = "";
                    break;

                default:
                    break;
                }

                this.TemperatureDisplay = AirControl.conTemperature + "°C";

                switch (AirControl.conSuperPowerMode)
                {
                case "开":
                    this.SuperPowerView = "超强";
                    break;

                case "关":
                    this.SuperPowerView = "";
                    break;

                default:
                    break;
                }

                switch (AirControl.conSlienceMode)
                {
                case "自动静音":
                    this.AutoSlieceView = "自动";
                    this.SlienceView    = "静音";
                    break;

                case "自动":
                    this.AutoSlieceView = "自动";
                    this.SlienceView    = "";
                    break;

                case "静音":
                    this.AutoSlieceView = "";
                    this.SlienceView    = "静音";
                    break;

                case "关":
                    this.AutoSlieceView = "";
                    this.SlienceView    = "";
                    break;

                default:
                    break;
                }
                switch (AirControl.conDry)
                {
                case "开":
                    this.DryView = "干燥";
                    break;

                case "关":
                    this.DryView = "";
                    break;

                default:
                    break;
                }
            }
            else
            {
                this.StartView          = "关机";
                this.WindPowerLevelView = "";
                this.HorWindView        = "";
                this.VerWindView        = "";
                this.WorkModeDisplay    = "";
                this.HealthView         = "";
                this.TemperatureDisplay = "";
                this.DryView            = "";
                this.SetTimerView       = "";
                this.SetTimerOpenView   = "";
                this.SleepView          = "";
                this.SuperPowerView     = "";
                this.AutoSlieceView     = "";
                this.SlienceView        = "";
                this.DryView            = "";
            }
        }
Esempio n. 3
0
 public void AddAirControl(AirControlBase AirControl)
 {
     this.AllAirControlList.Add(AirControl);
 }