CrabtreeOn,印度客户定制APP,迁移2.0平台版本
wxr
2023-02-01 c96d62ac9c6bb1d880a9170f9dd477fcb5f76fc0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System;
namespace Shared.SimpleControl.Phone
{
    public class SendControl
    {
        //public SendControl ()
        //{
        //}
 
        /// <summary>
        /// //2020-02-10 带返回结果的调光控制
        /// </summary>
        /// <param name="mLightCommon"></param>
        /// <param name="sendBytes"></param>
        public static void SendControlSetSingleLight (Common mLightCommon, byte [] sendBytes)
        {
            MainPage.Loading.Start ("Sending...");
            System.Threading.Tasks.Task.Run (() => {
                byte [] returnBytes = Control.ControlBytesSendHasReturn (Command.SetSingleLight, mLightCommon.SubnetID, mLightCommon.DeviceID, sendBytes);
                Application.RunOnMainThread (() => {
                    if (returnBytes == null) {
                        new Alert ("", mLightCommon.Name + ErrorCode.ControlFailure, "Close").Show ();
                    }
                    MainPage.Loading.Hide ();
                });
            });
        }
 
        public static int GetSendBrightness (bool IsSelected) {
            return IsSelected ? 0 : 100;
        }
 
        ///// <summary>
        ///// //2020-02-10 带返回结果的修改窗帘状态
        ///// </summary>
        ///// <param name="mCurtainCommon"></param>
        ///// <param name="sendBytes"></param>
        //public static void SendControlUpdataCurtain (Common mCurtainCommon, byte [] sendBytes)
        //{
        //    MainPage.Loading.Start ("Sending...");
        //    System.Threading.Tasks.Task.Run (() => {
        //        byte [] returnBytes = Control.ControlBytesSendHasReturn (Command.UpdataCurtainModelStutas, mCurtainCommon.SubnetID, mCurtainCommon.DeviceID, sendBytes);
        //        Application.RunOnMainThread (() => {
        //            if (returnBytes == null) {
        //                new Alert ("", mCurtainCommon.Name + ErrorCode.ControlFailure, "Close").Show ();
        //            }
        //            MainPage.Loading.Hide ();
        //        });
        //    });
        //}
 
 
        public static void CheckIfShowError(byte [] mReturnBytes) {
 
        }
    }
}