From b562a582ac3a288193e6e4f57c5eff8a344305a4 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期五, 27 九月 2024 13:52:17 +0800
Subject: [PATCH] Update AndroidManifest.xml
---
HDL_ON/UI/UI2/FuntionControlView/Curtain/VenetianBlindsPage.cs | 76 ++++++++++++++++++++++----------------
1 files changed, 44 insertions(+), 32 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/VenetianBlindsPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/VenetianBlindsPage.cs
index c60430f..6616c72 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/VenetianBlindsPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/VenetianBlindsPage.cs
@@ -90,7 +90,7 @@
FrameLayout controlView = new FrameLayout()
{
Gravity = Gravity.CenterHorizontal,
- Y = Application.GetRealHeight(88),
+ Y = Application.GetRealHeight(88 + 10),
Width = Application.GetRealWidth(327),
Height = Application.GetRealHeight(526),
BackgroundImagePath = "Public/Fragmentbg.png",
@@ -143,17 +143,19 @@
btnProgress = new Button()
{
+ X = Application.GetRealWidth(80),
Y = Application.GetRealHeight(80),
+ Width = Application.GetRealWidth(170),
Height = Application.GetRealHeight(50),
TextSize = CSS_FontSize.TextFontSize,
TextColor = CSS_Color.PromptingColor1,
Text = curtainTemp.GetPercent(function).ToString() + "%",
};
- controlView.AddChidren(btnProgress);
+ //controlView.AddChidren(btnProgress);
curtainSeekBar = new CurtainRollSeekBarOn()
{
- Gravity = Gravity.CenterHorizontal,
+ X = Application.GetRealWidth(40),
Y = Application.GetRealHeight(130),
Width = Application.GetRealWidth(170),
Height = Application.GetRealWidth(210),
@@ -169,10 +171,10 @@
int angleValut = Convert.ToInt32(function.GetAttrState("angle")) - 90;
var angleView = new FrameLayout()
{
- Gravity = Gravity.CenterHorizontal,
- Y = Application.GetRealHeight(300),//414,璁捐鏁版嵁
- Width = Application.GetRealWidth(250),
- Height = Application.GetRealWidth(30),
+ X = Application.GetRealWidth(250),
+ Y = Application.GetRealHeight(145),
+ Width = Application.GetRealWidth(40),
+ Height = Application.GetRealWidth(220),
BackgroundColor = 0x00ff0000
};
controlView.AddChidren(angleView);
@@ -182,10 +184,10 @@
{
var btn = new Button()
{
- X = Application.GetRealWidth(12 * i + 4),
- Y = Application.GetRealHeight(5),
- Width = Application.GetRealWidth(4),
- Height = Application.GetRealHeight(20),
+ X = Application.GetRealWidth(5),
+ Y = Application.GetRealHeight(8 * i + 4),
+ Width = Application.GetRealWidth(25),
+ Height = Application.GetRealHeight(3),
BackgroundColor = 0xFFDFE1E6,
};
btn.SetRotation(angleValut);
@@ -195,46 +197,56 @@
var btnAngle = new Button()
{
- TextAlignment = TextAlignment.CenterRight,
+ Y = Application.GetRealHeight(8 * 17 + 14),
+ Height = Application.GetRealHeight(20),
+ TextAlignment = TextAlignment.Center,
TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
TextColor = CSS_Color.PromptingColor1,
Text = function.GetAttrState("angle") + "掳"
};
angleView.AddChidren(btnAngle);
- var angleBar = new DiyImageSeekBar()
- {
- Width = Application.GetRealWidth(220),
- Height = Application.GetRealHeight(30),
- SeekBarViewHeight = Application.GetRealHeight(20),
- SeekBarBackgroundColor = 0x00000000,
- ThumbImagePath = "Public/ThumbImage2.png",
- ThumbImageHeight = Application.GetRealHeight(40),
- ProgressBarColor = 0x00000000,
- ProgressTextColor = 0x00000000,
- ProgressTextSize = 0,
- MaxValue = 180,
- Progress = 90,
- ProgressChangeDelayTime = 0
+ var angleBar = new Button() {
+ Height = Application.GetRealHeight(8 * 18 + 14),
};
angleView.AddChidren(angleBar);
- angleBar.OnProgressChangedEvent = (sender, e) =>
+ float angle = 0;
+ angleBar.MouseMoveEventHandler = (sender, e) =>
{
- float angle = (e - 90);
- btnAngle.Text = e + "掳";
+ int data = angleBar.Height / 180;
+ int data1 = Convert.ToInt32(e.Y / data);
+ angle = (90 - data1);
+
+ Console.WriteLine($"angle:: {angle}");
+ if (angle > 90)
+ {
+ angle = 90;
+ }
+ else if (angle < -90)
+ {
+ angle = -90;
+ }
+ btnAngle.Text = angle + "掳";
foreach (var btn in buttons)
{
btn.SetRotation(angle);
}
-
+ if (angle == 90 || angle == -90)
+ {
+ curtainSeekBar.SetBlindsType(false);
+ }
+ else
+ {
+ curtainSeekBar.SetBlindsType(true);
+ }
};
- angleBar.OnStopTrackingTouchEvent = (sende, e) =>
+ angleBar.MouseUpEventHandler = (sende, e) =>
{
function.refreshTime = DateTime.Now;
new System.Threading.Thread(() =>
{
Dictionary<string, string> dic = new Dictionary<string, string>();
- dic.Add("angle", e.ToString());
+ dic.Add("angle", angle.ToString());
Control.Ins.SendWriteCommand(function, dic);
})
{ IsBackground = true }.Start();
--
Gitblit v1.8.0