HDL-ON_Android/Assets/Language.ini | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL-ON_iOS/ViewControllerBase.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/Common/ImageUtlis.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/Common/R.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/DAL/Server/HttpUtil.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/Curtain/VenetianBlindsPage.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPage.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
SiriIntents/Server/HttpUtil.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
HDL-ON_Android/Assets/Language.ini
@@ -557,6 +557,7 @@ 2532=Visitor Invitation Record 2533=Visitor management 2534=Visitor Invitation @@ -1772,6 +1773,7 @@ 567=电池SOC: --% 568=运行数量/总数量: --/-- 569=人居环境 570=室外:{0}°/室内:{1}° HDL-ON_iOS/ViewControllerBase.cs
@@ -2,7 +2,7 @@ using System.Drawing; using Foundation; using UIKit; using WebKit; namespace HDL_ON_iOS { public class ViewControllerBase : Shared.BaseViewController @@ -31,50 +31,54 @@ // } //} public override void ViewDidLoad () public override void ViewDidLoad() { base.ViewDidLoad (); base.ViewDidLoad(); //设置键盘事件处理程序 RegisterForKeyboardNotifications (); RegisterForKeyboardNotifications(); } protected virtual void RegisterForKeyboardNotifications () protected virtual void RegisterForKeyboardNotifications() { _keyboardObserverWillShow = NSNotificationCenter.DefaultCenter.AddObserver (UIKeyboard.WillShowNotification, KeyboardWillShowNotification); _keyboardObserverWillHide = NSNotificationCenter.DefaultCenter.AddObserver (UIKeyboard.WillHideNotification, KeyboardWillHideNotification); } protected virtual void UnregisterKeyboardNotifications () protected virtual void UnregisterKeyboardNotifications() { NSNotificationCenter.DefaultCenter.RemoveObserver (_keyboardObserverWillShow); NSNotificationCenter.DefaultCenter.RemoveObserver (_keyboardObserverWillHide); NSNotificationCenter.DefaultCenter.RemoveObserver(_keyboardObserverWillShow); NSNotificationCenter.DefaultCenter.RemoveObserver(_keyboardObserverWillHide); } protected virtual UIView KeyboardGetActiveView () protected virtual UIView KeyboardGetActiveView() { return this.View.FindFirstResponder (); return this.View.FindFirstResponder(); } protected virtual void KeyboardWillShowNotification (NSNotification notification) protected virtual void KeyboardWillShowNotification(NSNotification notification) { UIView activeView = KeyboardGetActiveView (); UIView activeView = KeyboardGetActiveView(); if (activeView == null) return; UIView scrollView = activeView.FindSuperviewOfType_Self (this.View, typeof (UIView)) as UIView; string sss = activeView.ToString(); if (sss.StartsWith("<WKContentView")) return; UIView scrollView = activeView.FindSuperviewOfType_Self(this.View, typeof(UIView)) as UIView; if (scrollView == null) return; CoreGraphics.CGRect keyboardBounds = UIKeyboard.BoundsFromNotification (notification); CoreGraphics.CGRect keyboardBounds = UIKeyboard.BoundsFromNotification(notification); //UIEdgeInsets contentInsets = new UIEdgeInsets (0.0f, 0.0f, keyboardBounds.Size.Height, 0.0f); //scrollView.ContentInset = contentInsets; //scrollView.ScrollIndicatorInsets = contentInsets; CoreGraphics.CGRect viewRectAboveKeyboard = new CoreGraphics.CGRect (this.View.Frame.Location, new CoreGraphics.CGSize (this.View.Frame.Width, this.View.Frame.Size.Height - keyboardBounds.Size.Height)); CoreGraphics.CGRect activeFieldAbsoluteFrame = activeView.Superview.ConvertRectToView (activeView.Frame, this.View); if (!viewRectAboveKeyboard.Contains (activeFieldAbsoluteFrame)) { CoreGraphics.CGRect viewRectAboveKeyboard = new CoreGraphics.CGRect(this.View.Frame.Location, new CoreGraphics.CGSize(this.View.Frame.Width, this.View.Frame.Size.Height - keyboardBounds.Size.Height)); CoreGraphics.CGRect activeFieldAbsoluteFrame = activeView.Superview.ConvertRectToView(activeView.Frame, this.View); if (!viewRectAboveKeyboard.Contains(activeFieldAbsoluteFrame)) { //PointF scrollPoint = new PointF (0.0f, // (float)(activeFieldAbsoluteFrame.Location.Y + activeFieldAbsoluteFrame.Height // + scrollView.ContentOffset.Y - viewRectAboveKeyboard.Height)); // scrollView.SetContentOffset (scrollPoint, true); scrollView.Bounds = new CoreGraphics.CGRect (0.0f, scrollView.Bounds = new CoreGraphics.CGRect(0.0f, (float)(activeFieldAbsoluteFrame.Location.Y + activeFieldAbsoluteFrame.Height + scrollView.Frame.Y - viewRectAboveKeyboard.Height) , this.View.Frame.Width, this.View.Frame.Height); @@ -82,55 +86,63 @@ //if (this.View.Frame.Height - activeView.Frame.Bottom < keyboardBounds.Size.Height) // scrollView.Bounds = new CoreGraphics.CGRect (0.0f, this.View.Frame.Height - activeView.Frame.Height - keyboardBounds.Size.Height, this.View.Frame.Width, this.View.Frame.Height); } protected virtual void KeyboardWillHideNotification (NSNotification notification) protected virtual void KeyboardWillHideNotification(NSNotification notification) { UIView activeView = KeyboardGetActiveView (); UIView activeView = KeyboardGetActiveView(); if (activeView == null) return; UIView scrollView = activeView.FindSuperviewOfType_Self (this.View, typeof (UIView)) as UIView; string sss = activeView.ToString(); if (sss.StartsWith("<WKContentView")) return; UIView scrollView = activeView.FindSuperviewOfType_Self(this.View, typeof(UIView)) as UIView; if (scrollView == null) return; double animationDuration = UIKeyboard.AnimationDurationFromNotification (notification); double animationDuration = UIKeyboard.AnimationDurationFromNotification(notification); //UIEdgeInsets contentInsets = new UIEdgeInsets (0.0f, 0.0f, 0.0f, 0.0f); //UIView.Animate (animationDuration, delegate { // scrollView.ContentInset = contentInsets; // scrollView.ScrollIndicatorInsets = contentInsets; //}); scrollView.Bounds = new CoreGraphics.CGRect (0.0f, 0.0f, this.View.Frame.Width, this.View.Frame.Height); scrollView.Bounds = new CoreGraphics.CGRect(0.0f, 0.0f, this.View.Frame.Width, this.View.Frame.Height); } } public static class ViewExtensions { public static UIView FindFirstResponder (this UIView view) public static UIView FindFirstResponder(this UIView view) { if (view.IsFirstResponder) { if (view.IsFirstResponder) { return view; } foreach (UIView subView in view.Subviews) { var firstResponder = subView.FindFirstResponder (); foreach (UIView subView in view.Subviews) { var firstResponder = subView.FindFirstResponder(); if (firstResponder != null) return firstResponder; } return null; } public static UIView FindSuperviewOfType (this UIView view, UIView stopAt, Type type) public static UIView FindSuperviewOfType(this UIView view, UIView stopAt, Type type) { if (view.Superview != null) { if (type.IsAssignableFrom (view.Superview.GetType ())) { if (view.Superview != null) { if (type.IsAssignableFrom(view.Superview.GetType())) { return view.Superview; } if (view.Superview != stopAt) return view.Superview.FindSuperviewOfType (stopAt, type); return view.Superview.FindSuperviewOfType(stopAt, type); } return null; } public static UIView FindSuperviewOfType_Self (this UIView view, UIView stopAt, Type type) public static UIView FindSuperviewOfType_Self(this UIView view, UIView stopAt, Type type) { if (view.Superview != null) { return view.Superview.FindSuperviewOfType_Self (stopAt, type); if (view.Superview != null) { return view.Superview.FindSuperviewOfType_Self(stopAt, type); } return view; } HDL_ON/Common/ImageUtlis.cs
@@ -347,7 +347,7 @@ if (imageUrl.StartsWith("http")) { imageKey = Encrypt(imageKey); imageKey = Encrypt(imageKey).Replace("/","123"); } //1.本地默认图库图片,直接加载本地 HDL_ON/Common/R.cs
@@ -5,6 +5,10 @@ public static class StringId { /// <summary> /// 室外:27°/室内:27° /// </summary> public const int IndoorTempOutdoorTemp = 570; /// <summary> /// 科技 /// </summary> public const int Acst = 569; HDL_ON/DAL/Server/HttpUtil.cs
@@ -18,8 +18,8 @@ /// 公共域名就近解析 /// </summary> //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm /// <summary> /// RegionMark /// </summary> HDL_ON/UI/UI2/FuntionControlView/Curtain/VenetianBlindsPage.cs
@@ -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(240), 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(); HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPage.cs
@@ -226,11 +226,12 @@ Y = btnTemp.Bottom+ Application.GetRealWidth(10), Width = Application.GetRealWidth(100), Height = Application.GetRealHeight(20), Text = Language.StringByID(StringId.IndoorTemp) + "20°C", Text = Language.StringByID(StringId.IndoorTempOutdoorTemp).Replace("{1}",function.GetAttrState(FunctionAttributeKey.IndoorTemp)).Replace("{0}",MainPage.cityInfo.temperature), TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, }; controlView.AddChidren(btnIndoorTemp); btnMinus = new Button() { HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs
@@ -21,7 +21,9 @@ } var outinTemp = Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."))); bodyView.btnTemp.Text = outinTemp.ToString(); bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "°C"; //bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "°C"; bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTempOutdoorTemp).Replace("{1}", Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))).ToString()).Replace("{0}", MainPage.cityInfo.temperature); bodyView.btnMode.SelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode)); bodyView.btnMode.UnSelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode), false); bodyView.arcBar.Progress = outinTemp; SiriIntents/Server/HttpUtil.cs
@@ -16,8 +16,8 @@ /// 固定域名,正式环境 /// 公共域名就近解析 /// </summary> //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm /// <summary> /// RegionMark /// </summary>