wei
2020-12-16 e073fe7864d815379e4b118b9bcb8a935395381f
HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
@@ -272,7 +272,7 @@
                TextAlignment = TextAlignment.CenterRight,
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                Text = scene.delayText
                Text = FunctionList.List.GetDelayText( sceneFunction.delay)
            };
            delayRow.AddChidren(btnDelayInfo);
@@ -288,10 +288,12 @@
            btnSceneDelayTitle.MouseUpEventHandler = (sender, e) => {
                new PublicAssmebly().SetSceneDelayDialog(scene, btnDelayInfo);
                Action<string> action = (obj) => {
                    sceneFunction.delay = obj;
                    btnDelayInfo.Text = FunctionList.List.GetDelayText(obj);
                };
                new PublicAssmebly().SetSceneDelayDialog(action,sceneFunction.delay);
            };
            #endregion
@@ -600,7 +602,7 @@
                ProgressTextColor = CSS_Color.FirstLevelTitleColor,
                ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                MaxValue = 100,
                Progress = trait.value.ToString().Replace("{}", "") == "" ? 0 : Convert.ToInt32( trait.value.Replace("{}","")),
                Progress = trait.value.ToString().Replace("{}", "") == "" ? 0 : Convert.ToInt32(trait.value.Replace("{}", "")),
                SeekBarPadding = Application.GetRealWidth(20),
            };
            optionBaseView.AddChidren(controlBar);
@@ -615,39 +617,47 @@
            };
            optionBaseView.AddChidren(btnPlusSgnIcon);
            btnMinusSignIcon.MouseUpEventHandler = (sender, e) => {
            btnMinusSignIcon.MouseUpEventHandler = (sender, e) =>
            {
                controlBar.Progress--;
            };
            btnPlusSgnIcon.MouseUpEventHandler = (sender, e) => {
            btnPlusSgnIcon.MouseUpEventHandler = (sender, e) =>
            {
                controlBar.Progress++;
            };
            dialog.Show();
            pView.MouseUpEventHandler = (sender, e) => {
            pView.MouseUpEventHandler = (sender, e) =>
            {
                dialog.Close();
            };
            btnCancel.MouseUpEventHandler = (sender, e) => {
            btnCancel.MouseUpEventHandler = (sender, e) =>
            {
                dialog.Close();
            };
            btnConfrim.MouseUpEventHandler = (sender, e) => {
            btnConfrim.MouseUpEventHandler = (sender, e) =>
            {
                dialog.Close();
                trait.value = controlBar.Progress.ToString();
                btn.Text = trait.value + FunctionList.List.GetUintString(trait.key);
                if (controlBar.Progress > 0)
                var temp = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.OnOff);
                if (temp != null)
                {
                    var temp = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.OnOff);
                    if (temp != null)
                    if (controlBar.Progress > 0)
                    {
                        temp.value = "on";
                        btnOnText.Text = FunctionList.List.GetValueText(temp.key, temp.value);
                    }
                    else
                    {
                        temp.value = "off";
                    }
                    btnOnText.Text = FunctionList.List.GetValueText(temp.key, temp.value);
                }
            };
        }
        /// <summary>
        /// 加载功能属性数据选择弹窗
        /// </summary>