using System;
|
using System.Collections.Generic;
|
using System.Threading;
|
using System.Net.NetworkInformation;
|
using System.Net;
|
using System.Text;
|
|
namespace Shared.SimpleControl.Phone
|
{
|
public class ACMerrillDevicePage : FrameLayout
|
{
|
//IndoorTemperature
|
uint MLTextColor = 0xFFEB5C19;
|
uint MLTextColorG = 0x90FFFFFF;
|
Button titleBtn;
|
//室内温度
|
Button btnTempIcon;
|
Button btnIndoorTempValues;
|
//室内湿度
|
Button btnHumidityIcon;
|
Button btnIndoorHumidityValues;
|
|
|
Button btnModeIcon;
|
|
Button btnACSwitch;
|
Button btnSetTemperature;
|
Button btnModeText;
|
Button btnReduceTemperature;
|
Button BtnAddTemperature;
|
Button btnACModeRight;
|
Button btnACModeLeft;
|
|
|
string TempTypeString = "°C";
|
string HumidityTypeString = "%";
|
//static DateTime controlTime = DateTime.MinValue;
|
|
/// <summary>
|
/// 当前视图
|
/// </summary>
|
static ACMerrillDevicePage curView;
|
VerticalScrolViewLayout bodyScrolView;
|
|
////List<EmqServerInfoRes> mEmqServerList;
|
//VerticalScrolViewLayout mVerticalScrolViewLayout;
|
////Thread readSpeedThead;
|
|
ACMerrillLoop ac;
|
|
public ACMerrillDevicePage (ACMerrillLoop mmACMerrillLoop)
|
{
|
//BackgroundColor = SkinStyle.Current.MainColor;
|
this.ac = mmACMerrillLoop;
|
curView = this;
|
}
|
|
public override void RemoveFromParent ()
|
{
|
MainPage.Loading.Hide ();
|
base.RemoveFromParent ();
|
curView = null;
|
ACMerrillHomePage.UpdateACRowView ();
|
}
|
|
public void ShowView ()
|
{
|
#region 标题
|
var topView = new FrameLayout () {
|
Y = Application.GetRealHeight (36),
|
Height = Application.GetRealHeight (90),
|
BackgroundColor = SkinStyle.Current.MainColor,
|
};
|
AddChidren (topView);
|
|
titleBtn = new Button () {
|
Width = Application.GetRealWidth (400),
|
TextAlignment = TextAlignment.Center,
|
Text = ac.Name,
|
TextSize = 19,
|
TextColor = SkinStyle.Current.TextColor1,
|
Height = Application.GetMinReal (90),
|
SelectedTextColor = SkinStyle.Current.TextColor1,
|
Gravity = Gravity.CenterHorizontal,
|
};
|
topView.AddChidren (titleBtn);
|
|
//var logo = new Button () {
|
// Width = Application.GetRealWidth (154),
|
// Height = Application.GetRealHeight (90),
|
// X = Application.GetRealWidth (486),
|
// UnSelectedImagePath = MainPage.LogoString,
|
// Gravity = Gravity.CenterVertical,
|
//};
|
//topView.AddChidren (logo);
|
var btnEdit = new Button () {
|
X = Application.GetRealWidth (545),
|
Width = Application.GetMinRealAverage (75),
|
Height = Application.GetMinRealAverage (72),
|
Gravity = Gravity.CenterVertical,
|
UnSelectedImagePath = "CrabtreeAdd/Edit.png",
|
SelectedImagePath = "CrabtreeAdd/EditOn.png",
|
|
};
|
topView.AddChidren (btnEdit);
|
btnEdit.MouseUpEventHandler += (sd, ds) => {
|
btnEdit.IsSelected = false;
|
ShowDialog (ac);
|
};
|
btnEdit.MouseDownEventHandler += (sd, ds) => {
|
btnEdit.IsSelected = true;
|
};
|
|
|
|
var back = new Button () {
|
Height = Application.GetRealHeight (90),
|
Width = Application.GetRealWidth (85),
|
UnSelectedImagePath = "Item/Back.png",
|
Gravity = Gravity.CenterVertical,
|
};
|
topView.AddChidren (back);
|
back.MouseUpEventHandler += (sender, e) => {
|
(Parent as PageLayout).PageIndex -= 1;
|
curView = null;
|
};
|
#endregion
|
|
//var BodyView = new FrameLayout () {
|
// Width = LayoutParams.MatchParent,
|
// Height = Application.GetRealHeight (Application.DesignHeight - 126),
|
// Y = topView.Bottom,
|
// BackgroundColor = SkinStyle.Current.ViewColor,
|
//};
|
//AddChidren (BodyView);
|
|
|
bodyScrolView = new VerticalScrolViewLayout () {
|
Height = Application.GetRealHeight (Application.DesignHeight - 126),
|
Y = topView.Bottom,
|
//BackgroundColor = SkinStyle.Current.ViewColor,
|
};
|
AddChidren (bodyScrolView);
|
|
|
#region 头部View
|
var acRowView = new FrameLayout () {
|
Height = Application.GetRealHeight (158),
|
};
|
|
|
bodyScrolView.AddChidren (acRowView);
|
|
|
acRowView.AddTag ("ID", ac.LoopID);
|
|
var btnName = new Button () {
|
Width = Application.GetRealWidth (400),
|
Height = Application.GetRealHeight (26),
|
TextAlignment = TextAlignment.CenterLeft,
|
Y = Application.GetRealWidth (32),
|
X = Application.GetRealWidth (34),
|
TextColor = SkinStyle.Current.TextColor1,
|
TextSize = 14,
|
TextID = R.MyInternationalizationString.IndoorEnvironment
|
};
|
acRowView.AddChidren (btnName);
|
//btnName.Text = "室内环境";
|
|
|
btnACSwitch = new Button () {
|
Width = Application.GetMinRealAverage (90),
|
Height = Application.GetMinRealAverage (53),
|
X = Application.GetRealWidth (640 - 90 - 32),
|
Y = Application.GetRealHeight (18),
|
UnSelectedImagePath = "Item/SwitchClose.png",
|
SelectedImagePath = "Item/SwitchOpen.png",
|
Tag = "Switch"
|
};
|
acRowView.AddChidren (btnACSwitch);
|
btnACSwitch.MouseUpEventHandler += (sender3, e3) => {
|
//btnACSwitch.IsSelected = !btnACSwitch.IsSelected;
|
System.Console.WriteLine ($"============>tempSiwtch: { ac.Name}");
|
|
btnACSwitch.IsSelected = !btnACSwitch.IsSelected;
|
ac.Power = btnACSwitch.IsSelected ? (byte)1 : (byte)0;
|
UpdateACStatus (ac, true);
|
//发送控制命令
|
SetACMode (ac);
|
};
|
|
|
if (0 < ac.Power) {
|
btnACSwitch.IsSelected = true;
|
}
|
|
btnTempIcon = new Button () {
|
X = Application.GetRealWidth (23),
|
Y = Application.GetRealHeight (86),
|
Width = Application.GetMinRealAverage (44),
|
Height = Application.GetMinRealAverage (44),
|
UnSelectedImagePath = "ACMerrill/ACTempG.png",
|
SelectedImagePath = "ACMerrill/ACTemp.png",
|
};
|
acRowView.AddChidren (btnTempIcon);
|
|
|
btnIndoorTempValues = new Button () {
|
//X = btnTempIcon.Right,
|
X = Application.GetRealWidth (78),
|
Width = Application.GetRealWidth (120),
|
Height = Application.GetMinRealAverage (36),
|
Y = Application.GetRealHeight (90),
|
Text = ac.IndoorTemperature.ToString () + "°C",
|
TextColor = MLTextColor,
|
TextAlignment = TextAlignment.CenterLeft,
|
TextSize = 18,
|
Tag = "Temp"
|
};
|
acRowView.AddChidren (btnIndoorTempValues);
|
|
|
|
|
btnHumidityIcon = new Button () {
|
X = Application.GetRealWidth (203),
|
Y = Application.GetRealHeight (86),
|
Width = Application.GetMinRealAverage (44),
|
Height = Application.GetMinRealAverage (44),
|
UnSelectedImagePath = "ACMerrill/ACHumidityG.png",
|
SelectedImagePath = "ACMerrill/ACHumidity.png",
|
};
|
acRowView.AddChidren (btnHumidityIcon);
|
|
|
btnIndoorHumidityValues = new Button () {
|
//X = btnHumidityIcon.Right,
|
X = Application.GetRealWidth (258),
|
Width = Application.GetRealWidth (120),
|
Height = Application.GetMinRealAverage (36),
|
Y = Application.GetRealHeight (90),
|
Text = ac.IndoorHumidity.ToString () + "%",
|
TextColor = MLTextColor,
|
TextAlignment = TextAlignment.CenterLeft,
|
TextSize = 18,
|
Tag = "Humidity"
|
};
|
acRowView.AddChidren (btnIndoorHumidityValues);
|
|
|
|
|
var btnDeviceRowLine = new Button () {
|
Y = acRowView.Bottom,
|
Height = Application.GetRealHeight (16),
|
BackgroundColor = SkinStyle.Current.LineColor,
|
};
|
bodyScrolView.AddChidren (btnDeviceRowLine);
|
|
#endregion
|
|
#region TempView
|
AddTempView ();
|
#endregion
|
|
|
#region 模式
|
AddModeView ();
|
#endregion
|
|
UpdateACStatus (ac, true);
|
|
ReadStatus (ac);
|
|
}
|
|
/// <summary>
|
/// 温度View
|
/// </summary>
|
void AddTempView ()
|
{
|
#region TempView
|
var TempView = new FrameLayout () {
|
Width = LayoutParams.MatchParent,
|
Height = Application.GetRealHeight (138),
|
};
|
bodyScrolView.AddChidren (TempView);
|
|
var btnLine2 = new Button () {
|
Height = 1,
|
BackgroundColor = SkinStyle.Current.LineColor,
|
};
|
bodyScrolView.AddChidren (btnLine2);
|
|
btnSetTemperature = new Button () {
|
Width = Application.GetMinRealAverage (200),
|
Height = Application.GetRealHeight (80),
|
Y = Application.GetRealHeight (39),
|
Gravity = Gravity.CenterHorizontal,
|
Text = ac.SetTemperature.ToString () + "°",
|
TextSize = 42,
|
TextAlignment = TextAlignment.Center,
|
Enable = false,
|
TextColor = SkinStyle.Current.TextColor1
|
};
|
|
TempView.AddChidren (btnSetTemperature);
|
//if (ac.TemperatureMode == 1) {
|
// btnSetTemperature.Text = ac.SetTemperature.ToString () + "°F";
|
//} else {
|
// btnSetTemperature.Text = ac.SetTemperature.ToString () + "°C";
|
//}
|
btnReduceTemperature = new Button () {
|
Width = Application.GetMinRealAverage (129),
|
Height = Application.GetMinRealAverage (129),
|
Gravity = Gravity.CenterVertical,
|
UnSelectedImagePath = "AC/ac-1.png",
|
SelectedImagePath = "AC/ac_on-.png",
|
};
|
TempView.AddChidren (btnReduceTemperature);
|
btnReduceTemperature.MouseDownEventHandler += (sender, e) => {
|
btnReduceTemperature.IsSelected = true;
|
};
|
btnReduceTemperature.MouseUpEventHandler += (sender, e) => {
|
btnReduceTemperature.IsSelected = false;
|
|
if (ac.SetTemperature == 5) return;
|
|
ac.SetTemperature--;
|
|
if (ac.SetTemperature < 5) {
|
ac.SetTemperature = 6;
|
}else if (ac.SetTemperature > 35) {
|
ac.SetTemperature = 35;
|
}
|
|
UpdateACStatus (ac, true);
|
|
//发送控制命令
|
SetACMode (ac);
|
};
|
|
BtnAddTemperature = new Button () {
|
Width = Application.GetMinRealAverage (129),
|
Height = Application.GetMinRealAverage (129),
|
X = Application.GetRealWidth (640 - 129),
|
Gravity = Gravity.CenterVertical,
|
UnSelectedImagePath = "AC/ac+1.png",
|
SelectedImagePath = "AC/ac_on+.png",
|
};
|
TempView.AddChidren (BtnAddTemperature);
|
BtnAddTemperature.MouseDownEventHandler += (sender, e) => {
|
BtnAddTemperature.IsSelected = true;
|
};
|
BtnAddTemperature.MouseUpEventHandler += (sender, e) => {
|
BtnAddTemperature.IsSelected = false;
|
|
if (ac.SetTemperature == 35) return;
|
|
ac.SetTemperature++;
|
|
if (ac.SetTemperature < 5) {
|
ac.SetTemperature = 6;
|
} else if (ac.SetTemperature > 35) {
|
ac.SetTemperature = 35;
|
}
|
|
UpdateACStatus (ac, true);
|
//发送控制命令
|
SetACMode (ac);
|
|
};
|
|
|
#endregion
|
}
|
|
/// <summary>
|
/// 模式View
|
/// </summary>
|
void AddModeView ()
|
{
|
//var TempView = new FrameLayout () {
|
// Width = LayoutParams.MatchParent,
|
// Height = Application.GetRealHeight (231),
|
//};
|
//bodyScrolView.AddChidren (TempView);
|
|
#region 模式
|
var acModeView = new FrameLayout () {
|
Width = LayoutParams.MatchParent,
|
Height = Application.GetRealHeight (231),
|
};
|
bodyScrolView.AddChidren (acModeView);
|
//分割线
|
var btnLine1 = new Button () {
|
Height = 1,
|
BackgroundColor = SkinStyle.Current.LineColor,
|
};
|
bodyScrolView.AddChidren (btnLine1);
|
|
btnACModeLeft = new Button () {
|
Width = Application.GetMinRealAverage (129),
|
Height = Application.GetMinRealAverage (129),
|
Gravity = Gravity.CenterVertical,
|
UnSelectedImagePath = "AC/ac_left.png",
|
SelectedImagePath = "AC/ACLeftSelected.png",
|
};
|
acModeView.AddChidren (btnACModeLeft);
|
var btnModeName = new Button () {
|
Width = Application.GetRealWidth (200),
|
Height = Application.GetRealHeight (30),
|
Gravity = Gravity.CenterHorizontal,
|
Y = Application.GetRealHeight (32),
|
TextID = R.MyInternationalizationString.UserACMode,
|
TextColor = SkinStyle.Current.ButtonColor,
|
TextSize = 16
|
};
|
acModeView.AddChidren (btnModeName);
|
btnModeIcon = new Button () {
|
Width = Application.GetMinRealAverage (60),
|
Height = Application.GetMinRealAverage (60),
|
Gravity = Gravity.Center,
|
Y = btnModeName.Bottom + Application.GetRealHeight (26),
|
UnSelectedImagePath = "ACMerrill/ACCooling.png",
|
};
|
acModeView.AddChidren (btnModeIcon);
|
btnModeText = new Button () {
|
Width = Application.GetRealWidth (200),
|
Height = Application.GetRealHeight (26),
|
TextID = R.MyInternationalizationString.Cool,
|
Gravity = Gravity.CenterHorizontal,
|
Y = Application.GetRealHeight (169),
|
TextColor = SkinStyle.Current.TextColor1,
|
TextSize = 14
|
};
|
acModeView.AddChidren (btnModeText);
|
btnACModeRight = new Button () {
|
Width = Application.GetMinRealAverage (129),
|
Height = Application.GetMinRealAverage (129),
|
X = Application.GetRealWidth (640 - 129),
|
Gravity = Gravity.CenterVertical,
|
UnSelectedImagePath = "AC/ac_right.png",
|
SelectedImagePath = "AC/ACRightSelected.png",
|
};
|
acModeView.AddChidren (btnACModeRight);
|
|
btnACModeRight.MouseDownEventHandler += (sender, e) => {
|
btnACModeRight.IsSelected = true;
|
};
|
btnACModeRight.MouseUpEventHandler += (sender, e) => {
|
btnACModeRight.IsSelected = false;
|
try {
|
if (ac.SetMode > 2) {
|
ac.SetMode = 2;
|
}
|
if (++ac.SetMode > 2) {
|
ac.SetMode = 0;
|
}
|
UpdateACStatus (ac, true);
|
|
//发送控制命令
|
SetACMode (ac);
|
|
} catch { }
|
};
|
btnACModeLeft.MouseDownEventHandler += (sender, e) => {
|
btnACModeLeft.IsSelected = true;
|
};
|
btnACModeLeft.MouseUpEventHandler += (sender, e) => {
|
btnACModeLeft.IsSelected = false;
|
try {
|
if (ac.SetMode == 0)
|
ac.SetMode = 2;
|
else {
|
ac.SetMode--;
|
}
|
} catch {
|
ac.SetMode = 2;
|
}
|
UpdateACStatus (ac, true);
|
|
//发送控制命令
|
SetACMode (ac);
|
};
|
#endregion
|
}
|
|
|
/// <summary>
|
/// 更新空调
|
/// </summary>
|
public static void UpdateACStatus (ACMerrillLoop ac, bool selfUpdate = false)
|
{
|
Application.RunOnMainThread (() => {
|
if (curView == null) {
|
return;
|
}
|
if (curView.ac != ac) {
|
return;
|
}
|
//if (controlTime.AddSeconds (0.8) > DateTime.Now && !selfUpdate) {
|
// return;
|
//}
|
|
|
try {
|
curView.UpdateIndoorButton (ac);
|
|
if (ac.Power == 1) {
|
curView.btnACSwitch.IsSelected = true;
|
|
curView.UpdateACHostModeIcon (ac.SetMode, curView.btnModeIcon, curView.btnModeText);
|
curView.UpdateACSetTemperature (ac, curView.btnSetTemperature);
|
|
|
curView.btnReduceTemperature.Enable = true;
|
curView.BtnAddTemperature.Enable = true;
|
curView.btnACModeLeft.Enable = true;
|
curView.btnACModeRight.Enable = true;
|
} else {
|
curView.btnACSwitch.IsSelected = false;
|
curView.btnReduceTemperature.Enable = false;
|
curView.BtnAddTemperature.Enable = false;
|
curView.btnACModeLeft.Enable = false;
|
curView.btnACModeRight.Enable = false;
|
}
|
} catch (Exception ex) {
|
Console.WriteLine (ex.ToString ());
|
}
|
});
|
}
|
|
|
|
|
/// <summary>
|
/// 刷新 室内温度和室内湿度
|
/// </summary>
|
/// <param name="ac"></param>
|
public void UpdateIndoorButton (ACMerrillLoop ac) {
|
|
//if (ac.TemperatureMode == 0) {
|
// TempTypeString = "°C";
|
//} else {
|
// TempTypeString = "°F";
|
//}
|
|
if (ac.IndoorTemperature <= 0) {
|
btnIndoorTempValues.Text = "--" + TempTypeString;
|
} else {
|
btnIndoorTempValues.Text = ac.IndoorTemperature.ToString () + TempTypeString;
|
}
|
|
if (ac.IndoorHumidity <= 0) {
|
btnIndoorHumidityValues.Text = "--" + HumidityTypeString;
|
} else {
|
btnIndoorHumidityValues.Text = ac.IndoorHumidity.ToString () + HumidityTypeString;
|
}
|
|
if (ac.Power > 0) {
|
btnTempIcon.IsSelected = true;
|
btnHumidityIcon.IsSelected = true;
|
btnIndoorTempValues.Visible = true;
|
btnIndoorHumidityValues.Visible = true;
|
|
} else {
|
btnTempIcon.IsSelected = false;
|
btnHumidityIcon.IsSelected = false;
|
btnIndoorTempValues.Visible = false;
|
btnIndoorHumidityValues.Visible = false;
|
}
|
|
}
|
|
/// <summary>
|
/// 刷新模式图标
|
/// </summary>
|
/// <param name="modeByte"></param>
|
/// <param name="btn"></param>
|
/// <param name="btn2"></param>
|
public void UpdateACHostModeIcon (byte modeByte, Button btn = null, Button btn2 = null)
|
{
|
switch (modeByte) {
|
case 0:
|
if (btn != null)
|
btn.UnSelectedImagePath = "ACMerrill/ACCooling.png";
|
if (btn2 != null)
|
btn2.TextID = R.MyInternationalizationString.Cool;
|
break;
|
case 1:
|
if (btn != null)
|
btn.UnSelectedImagePath = "ACMerrill/ACHeating.png";
|
if (btn2 != null)
|
btn2.TextID = R.MyInternationalizationString.Heating;
|
break;
|
case 2:
|
if (btn != null)
|
btn.UnSelectedImagePath = "ACMerrill/ACStroke.png";
|
if (btn2 != null)
|
btn2.TextID = R.MyInternationalizationString.Ventila;
|
break;
|
//case 3:
|
// if (btn != null)
|
// btn.UnSelectedImagePath = "AC/ACAuto.png";
|
// if (btn2 != null)
|
// btn2.TextID = R.MyInternationalizationString.Auto;
|
// break;
|
//case 4:
|
// if (btn != null)
|
// btn.UnSelectedImagePath = "AC/ACDehumidification.png";
|
// if (btn2 != null)
|
// btn2.TextID = R.MyInternationalizationString.Dehumidify;
|
// break;
|
}
|
}
|
|
public void UpdateACSetTemperature (ACMerrillLoop ac, Button btn, bool showTempType = true)
|
{
|
btn.Text = ac.SetTemperature.ToString () + "°";
|
//if (showTempType) {
|
// if (ac.TemperatureMode == 0) {
|
// btn.Text = ac.SetTemperature.ToString () + "°C";
|
// } else {
|
// btn.Text = ac.SetTemperature.ToString () + "°F";
|
// }
|
//}
|
}
|
|
/// <summary>
|
/// 读空调状态
|
/// </summary>
|
/// <param name="mAC"></param>
|
void ReadStatus (ACMerrillLoop mAC) {
|
Control.ControlBytesSend (Command.ReadACMode, mAC.SubnetID, mAC.DeviceID, new byte [] { mAC.LoopID });
|
}
|
|
|
/// <summary>
|
/// 发送控制指令
|
/// </summary>
|
/// <param name="mAC"></param>
|
void SetACMode (ACMerrillLoop mAC)
|
{
|
try {
|
Control.ControlBytesSend (Command.SetACMode, mAC.SubnetID, mAC.DeviceID, mAC.GetACSendBytes());
|
} catch {
|
|
}
|
|
}
|
|
/// <summary>
|
/// 修改备注名
|
/// </summary>
|
/// <param name="mACMerrillLoop"></param>
|
void ShowDialog (ACMerrillLoop mACMerrillLoop) {
|
Dialog dialog = new Dialog ();
|
|
var dialogView = new FrameLayout () {
|
Gravity = Gravity.Center,
|
Width = Application.GetRealWidth (500),
|
Height = Application.GetRealHeight (300),
|
BackgroundColor = SkinStyle.Current.DialogColor,
|
Radius = 5,
|
BorderColor = SkinStyle.Current.Transparent,
|
BorderWidth = 1,
|
};
|
dialog.AddChidren (dialogView);
|
|
var etDeviceName = new EditText () {
|
Y = Application.GetRealHeight (80),
|
Gravity = Gravity.CenterHorizontal,
|
Width = Application.GetRealWidth (350),
|
Height = Application.GetRealHeight (70),
|
Text = mACMerrillLoop.Name,
|
TextAlignment = TextAlignment.Center,
|
TextColor = SkinStyle.Current.TextColor,
|
Radius = 1,
|
BorderWidth = 1,
|
BorderColor = SkinStyle.Current.BorderColor,
|
};
|
dialogView.AddChidren (etDeviceName);
|
|
var dialogBottomView = new FrameLayout () {
|
Y = Application.GetRealHeight (213),
|
Height = Application.GetRealHeight (90),
|
BackgroundColor = SkinStyle.Current.Black50Transparent,
|
};
|
dialogView.AddChidren (dialogBottomView);
|
|
var btnClose = new Button () {
|
Width = Application.GetRealWidth (250),
|
TextAlignment = TextAlignment.Center,
|
TextID = R.MyInternationalizationString.cancel,
|
TextColor = SkinStyle.Current.TextColor,
|
BackgroundColor = SkinStyle.Current.ButtonColor,
|
};
|
dialogBottomView.AddChidren (btnClose);
|
btnClose.MouseUpEventHandler += (ddss, dddsss) => {
|
dialog.Close ();
|
};
|
|
var editor = new Button () {
|
X = btnClose.Right + 1,
|
Width = Application.GetRealWidth (250),
|
TextAlignment = TextAlignment.Center,
|
TextID = R.MyInternationalizationString.SAVE,
|
TextColor = SkinStyle.Current.TextColor,
|
BackgroundColor = SkinStyle.Current.ButtonColor,
|
};
|
dialogBottomView.AddChidren (editor);
|
|
editor.MouseUpEventHandler += (dff, ffd) => {
|
titleBtn.Text = etDeviceName.Text;
|
mACMerrillLoop.Name = etDeviceName.Text;
|
ACMerrillHomePage.SaveMerrilEquipmentMessage ();
|
//ACMerrillHomePage.RefreshRowViewName (mACMerrillLoop.CommonLoopID, mACMerrillLoop.Name);
|
dialog.Close ();
|
new Alert (Language.StringByID (R.MyInternationalizationString.Tip), Language.StringByID (R.MyInternationalizationString.AmendTheSuccess), Language.StringByID (R.MyInternationalizationString.Close)).Show ();
|
|
};
|
dialog.Show ();
|
|
}
|
//byte [] GetACSendBytes (ACMerrillLoop mAC)
|
//{
|
// byte [] sendBytes = new byte [13];
|
// sendBytes [0] = mAC.LoopID;
|
// sendBytes [1] = 0;
|
// sendBytes [2] = mAC.IndoorTemperature;
|
// sendBytes [3] = mAC.SetTemperature;
|
// sendBytes [4] = mAC.SetTemperature;
|
// sendBytes [5] = mAC.SetTemperature;
|
// sendBytes [6] = mAC.SetTemperature;
|
// sendBytes [7] = mAC.RealModeAndFanSpeed;
|
// sendBytes [8] = mAC.Power;
|
// sendBytes [9] = mAC.SetMode;
|
// sendBytes [10] = mAC.SetFanSpeed;
|
// sendBytes [11] = mAC.SetTemperature;
|
// sendBytes [12] = mAC.IndoorHumidity;//扫风状态位改为:室内湿度
|
|
// return sendBytes;
|
|
//}
|
|
}
|
}
|