using System;
|
using Java.Sql;
|
using Shared.Common;
|
using ZigBee.Device;
|
|
namespace Shared.Phone.UserCenter.DoorLock
|
{
|
public class TemporaryPassword : DoorLockCommonLayout, ZigBee.Common.IStatus
|
{
|
/// <summary>
|
/// 构造函数
|
/// </summary>
|
/// <param name="doorLock"></param>
|
public TemporaryPassword(ZigBee.Device.DoorLock doorLock)
|
{
|
this.doorLock = doorLock;
|
BackgroundColor = Shared.Common.ZigbeeColor.Current.GXCTopViewBackgroundColor;
|
ZigBee.Device.ZbGateway.StatusList.Add(this);
|
}
|
|
#region ◆ 变量申明__________________________
|
ZigBee.Device.DoorLock doorLock;
|
public System.Collections.Generic.List<Button> pawButtonList = new System.Collections.Generic.List<Button> { };//临时密码中的6位数字
|
Button passwordText; //临时密码
|
FrameLayout MidTopFrameLayout;
|
#endregion
|
|
/// <summary>
|
/// UI显示
|
/// </summary>
|
public void Show()
|
{
|
this.TopFrameLayout(this, Language.StringByID(R.MyInternationalizationString.TemporaryPassword));
|
|
EventHandler<MouseEventArgs> eHandlerBack = (sender, e) =>
|
{
|
RemoveFromParent();
|
};
|
this.btnBack.MouseUpEventHandler += eHandlerBack;
|
this.btnBackFrameLayout.MouseUpEventHandler += eHandlerBack;
|
this.MidFrameLayout(this);
|
|
var btnDelFrameLayout = new FrameLayout
|
{
|
X = Application.GetRealWidth(953),
|
Height = Application.GetRealHeight(69),
|
Width = Application.GetRealWidth(1080 - 953),
|
};
|
this.titleFrameLayout.AddChidren(btnDelFrameLayout);
|
|
var btnDelIcon = new Button
|
{
|
Height = Application.GetRealHeight(69),
|
Width = Application.GetRealWidth(69),
|
UnSelectedImagePath = "DoorLock/DelIcon.png",
|
};
|
btnDelFrameLayout.AddChidren(btnDelIcon);
|
|
EventHandler<MouseEventArgs> eHandler = (sender, e) =>
|
{
|
var dialog = new Dialog { };
|
dialog.Show();
|
|
var flMain = new FrameLayout { BackgroundColor = 0x00000000 };
|
dialog.AddChidren(flMain);
|
flMain.MouseUpEventHandler += (sender11, e11) =>
|
{
|
dialog.Close();
|
};
|
|
var delBackgroundFrameLayout = new FrameLayout
|
{
|
X = Application.GetRealWidth(596),
|
Y = Application.GetRealHeight(164),
|
Height = Application.GetRealHeight(173),
|
Width = Application.GetRealWidth(449),
|
BackgroundImagePath = "DoorLock/DelBackground.png",
|
};
|
flMain.AddChidren(delBackgroundFrameLayout);
|
|
var btnDelIcon2 = new Button
|
{
|
Height = Application.GetRealHeight(81),
|
Width = Application.GetRealWidth(81),
|
X = Application.GetRealWidth(81),
|
Y = Application.GetRealHeight(55),
|
UnSelectedImagePath = "DoorLock/DelIcon.png",
|
};
|
delBackgroundFrameLayout.AddChidren(btnDelIcon2);
|
|
var btnDelText = new Button
|
{
|
Height = Application.GetRealHeight(58),
|
Width = Application.GetRealWidth(311),
|
X = Application.GetRealWidth(173),
|
Y = Application.GetRealHeight(69),
|
TextAlignment = TextAlignment.CenterLeft,
|
Text = Language.StringByID(R.MyInternationalizationString.ClearTempPassword),
|
TextColor = Shared.Common.ZigbeeColor.Current.XMTopTitleText,
|
TextSize = 12,
|
};
|
delBackgroundFrameLayout.AddChidren(btnDelText);
|
|
EventHandler<MouseEventArgs> eHandler2 = (sender2, e2) =>
|
{
|
ZigBee.Device.DoorLock.LocalTempPassword = "";
|
dialog.Close();
|
};
|
delBackgroundFrameLayout.MouseDownEventHandler += eHandler2;
|
btnDelIcon2.MouseDownEventHandler += eHandler2;
|
btnDelText.MouseDownEventHandler += eHandler2;
|
};
|
btnDelFrameLayout.MouseDownEventHandler += eHandler;
|
btnDelIcon.MouseDownEventHandler += eHandler;
|
|
MidTopFrameLayout = new FrameLayout()
|
{
|
X = Application.GetRealWidth(181),
|
Y = Application.GetRealHeight(92),
|
Width = Application.GetRealWidth(717),
|
Height = Application.GetRealHeight(570),
|
BackgroundImagePath = "DoorLock/TempPasswordBackground.png",
|
};
|
this.midFrameLayout.AddChidren(MidTopFrameLayout);
|
MidFrameLayoutContent();
|
}
|
|
public void MidFrameLayoutContent()
|
{
|
MidTopFrameLayout.RemoveAll();
|
var TempPasswordBackground1 = new Button()
|
{
|
Height = Application.GetRealHeight(43),
|
Width = Application.GetRealWidth(259),
|
X = Application.GetRealWidth(230),
|
Y = Application.GetRealHeight(418),
|
UnSelectedImagePath = "DoorLock/TempPasswordBackground1.png",
|
};
|
MidTopFrameLayout.AddChidren(TempPasswordBackground1);
|
|
var topMidTopFrameLayout = new FrameLayout()
|
{
|
Height = Application.GetRealHeight(313),
|
};
|
MidTopFrameLayout.AddChidren(topMidTopFrameLayout);
|
|
var topPic = new Button()
|
{
|
Height = Application.GetRealHeight(81),
|
Y = Application.GetRealHeight(48),
|
TextAlignment = TextAlignment.Center,
|
Text = Language.StringByID(R.MyInternationalizationString.ClickGenerate),
|
TextColor = Shared.Common.ZigbeeColor.Current.XMTopTitleText,
|
TextSize = 12,
|
};
|
topMidTopFrameLayout.AddChidren(topPic);
|
|
var randomPassword = new EditText()
|
{
|
X = Application.GetRealWidth(233),
|
Y = Application.GetRealHeight(153),
|
Height = Application.GetRealHeight(84),
|
Width = Application.GetRealWidth(251),
|
TextAlignment = TextAlignment.CenterRight,
|
TextSize = 24,
|
SecureTextEntry = false,
|
Enable = false,
|
};
|
topMidTopFrameLayout.AddChidren(randomPassword);
|
|
var temPasswordVisiable = new Button()
|
{
|
Height = Application.GetRealHeight(92),
|
Width = Application.GetRealWidth(92),
|
X = Application.GetRealWidth(495),
|
Y = Application.GetRealHeight(153),
|
UnSelectedImagePath = "DoorLock/TemPasswordInvisiable.png",
|
SelectedImagePath = "DoorLock/TemPasswordVisiable.png",
|
};
|
topMidTopFrameLayout.AddChidren(temPasswordVisiable);
|
|
var validTime = new Button()
|
{
|
Height = Application.GetRealHeight(55),
|
Width = Application.GetRealWidth(115),
|
X = Application.GetRealWidth(92),
|
Y = Application.GetRealHeight(386),
|
TextColor = Shared.Common.ZigbeeColor.Current.XMGray2,
|
TextAlignment = TextAlignment.CenterLeft,
|
TextSize = 14,
|
};
|
MidTopFrameLayout.AddChidren(validTime);
|
|
var validTimeDate = new Button()
|
{
|
Height = Application.GetRealHeight(49),
|
Width = Application.GetRealWidth(135),
|
X = Application.GetRealWidth(84),
|
Y = Application.GetRealHeight(441),
|
TextColor = Shared.Common.ZigbeeColor.Current.XMGray2,
|
TextSize = 10,
|
};
|
MidTopFrameLayout.AddChidren(validTimeDate);
|
|
var inValidTime = new Button()
|
{
|
Height = Application.GetRealHeight(55),
|
Width = Application.GetRealWidth(118),
|
X = Application.GetRealWidth(507),
|
Y = Application.GetRealHeight(389),
|
Text = "10:00",
|
TextColor = Shared.Common.ZigbeeColor.Current.XMGray2,
|
TextAlignment = TextAlignment.CenterLeft,
|
TextSize = 14,
|
};
|
MidTopFrameLayout.AddChidren(inValidTime);
|
|
var inValidTimeDate = new Button()
|
{
|
Height = Application.GetRealHeight(49),
|
Width = Application.GetRealWidth(135),
|
X = Application.GetRealWidth(508),
|
Y = Application.GetRealHeight(444),
|
TextColor = Shared.Common.ZigbeeColor.Current.XMGray2,
|
TextAlignment = TextAlignment.CenterLeft,
|
TextSize = 10,
|
};
|
MidTopFrameLayout.AddChidren(inValidTimeDate);
|
|
BottomFrameLayoutContent();
|
|
#region 数据处理
|
string hour = "";
|
string minute = "";
|
if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour < 10)
|
{
|
hour = "0" + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour;
|
}
|
else
|
{
|
hour = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour.ToString();
|
}
|
if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMinute < 10)
|
{
|
minute = "0" + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMinute;
|
}
|
else
|
{
|
minute = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMinute.ToString();
|
}
|
//有效时间
|
if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour == 100)
|
{
|
validTime.Text = "00:00";
|
}
|
else
|
{
|
validTime.Text = hour + ":" + minute;
|
}
|
|
if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateHour < 10)
|
{
|
hour = "0" + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateHour;
|
}
|
else
|
{
|
hour = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateHour.ToString();
|
}
|
if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMinute < 10)
|
{
|
minute = "0" + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMinute;
|
}
|
else
|
{
|
minute = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMinute.ToString();
|
}
|
|
if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateHour == 100)
|
{
|
inValidTime.Text = "00:00";
|
}
|
else
|
{
|
inValidTime.Text = hour + ":" + minute;
|
}
|
validTimeDate.Text = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMonth + Language.StringByID(R.MyInternationalizationString.Month) + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateDay + Language.StringByID(R.MyInternationalizationString.Day);
|
inValidTimeDate.Text = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMonth + Language.StringByID(R.MyInternationalizationString.Month) + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateDay + Language.StringByID(R.MyInternationalizationString.Day);
|
|
if (string.IsNullOrEmpty(ZigBee.Device.DoorLock.LocalTempPassword))
|
{
|
randomPassword.Text = "- - - - - -";
|
temPasswordVisiable.Visible = false;
|
randomPassword.X = Application.GetRealWidth(215);
|
randomPassword.TextColor = Shared.Common.ZigbeeColor.Current.XMGray4;
|
}
|
else
|
{
|
randomPassword.Text = ZigBee.Device.DoorLock.LocalTempPassword;
|
temPasswordVisiable.Visible = true;
|
}
|
if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InTempPasswordVisiable)
|
{
|
randomPassword.SecureTextEntry = false;
|
temPasswordVisiable.IsSelected = true;
|
randomPassword.TextColor = Shared.Common.ZigbeeColor.Current.XMOrange;
|
}
|
else
|
{
|
randomPassword.SecureTextEntry = true;
|
temPasswordVisiable.IsSelected = false;
|
randomPassword.TextColor = Shared.Common.ZigbeeColor.Current.XMGray4;
|
}
|
|
topPic.MouseUpEventHandler += (sender, e) =>
|
{
|
randomPassword.Text = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetTempPassword();
|
ZigBee.Device.DoorLock.LocalTempPassword = randomPassword.Text;
|
temPasswordVisiable.IsSelected = true;
|
temPasswordVisiable.Visible = true;
|
Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InTempPasswordVisiable = true;
|
randomPassword.TextColor = Shared.Common.ZigbeeColor.Current.XMOrange;
|
};
|
temPasswordVisiable.MouseUpEventHandler += (sender, e) =>
|
{
|
temPasswordVisiable.IsSelected = !temPasswordVisiable.IsSelected;
|
if (!temPasswordVisiable.IsSelected)
|
{
|
randomPassword.TextColor = Shared.Common.ZigbeeColor.Current.XMGray4;
|
randomPassword.SecureTextEntry = true;
|
}
|
else
|
{
|
randomPassword.TextColor = Shared.Common.ZigbeeColor.Current.XMOrange;
|
randomPassword.SecureTextEntry = false;
|
}
|
Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InTempPasswordVisiable = !randomPassword.SecureTextEntry;
|
};
|
topPic.MouseUpEventHandler += (sender, e) =>
|
{
|
randomPassword.Text = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetTempPassword();
|
ZigBee.Device.DoorLock.LocalTempPassword = randomPassword.Text;
|
randomPassword.SecureTextEntry = false;
|
temPasswordVisiable.IsSelected = true;
|
Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InTempPasswordVisiable = true;
|
randomPassword.TextColor = Shared.Common.ZigbeeColor.Current.XMOrange;
|
};
|
|
EventHandler<MouseEventArgs> handerValidTimeDateSet = (sender, e) =>
|
{
|
var tempPage = new Shared.Phone.UserCenter.DoorLock.TimeSettignPage(doorLock, "ValidTime");
|
Shared.Phone.UserView.HomePage.Instance.AddChidren(tempPage);
|
Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
|
tempPage.Show();
|
|
tempPage.timeSetAction += () =>
|
{
|
MidFrameLayoutContent();
|
};
|
};
|
validTimeDate.MouseUpEventHandler += handerValidTimeDateSet;
|
validTime.MouseUpEventHandler += handerValidTimeDateSet;
|
EventHandler<MouseEventArgs> handerInValidTimeSet = (sender, e) =>
|
{
|
var tempPage = new Shared.Phone.UserCenter.DoorLock.TimeSettignPage(doorLock, "InValidTime");
|
Shared.Phone.UserView.HomePage.Instance.AddChidren(tempPage);
|
Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
|
tempPage.Show();
|
tempPage.timeSetAction += () =>
|
{
|
MidFrameLayoutContent();
|
};
|
};
|
inValidTime.MouseUpEventHandler += handerInValidTimeSet;
|
inValidTimeDate.MouseUpEventHandler += handerInValidTimeSet;
|
#endregion
|
}
|
//底部界面和数据处理
|
public void BottomFrameLayoutContent()
|
{
|
var bottomFrameLayout = new FrameLayout()
|
{
|
Height = Application.GetRealHeight(1025),
|
Y = Application.GetRealHeight(711),
|
BackgroundColor = ZigbeeColor.Current.XMWhite,
|
};
|
this.midFrameLayout.AddChidren(bottomFrameLayout);
|
|
var informationEdit = new Button()
|
{
|
Height = Application.GetRealHeight(60),
|
X = Application.GetRealWidth(58),
|
Y = Application.GetRealHeight(81),
|
Text = Language.StringByID(R.MyInternationalizationString.InformationEdit),
|
TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
|
TextAlignment = TextAlignment.CenterLeft,
|
TextSize = 15,
|
};
|
bottomFrameLayout.AddChidren(informationEdit);
|
|
for (int i = 0; i < 2; i++)
|
{
|
var btnValidTime = new Button()
|
{
|
Width = Application.GetRealWidth(453),
|
Height = Application.GetRealHeight(58),
|
X = Application.GetRealWidth(58),
|
Text = Language.StringByID(R.MyInternationalizationString.ValidTime),
|
TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
|
TextAlignment = TextAlignment.CenterLeft,
|
TextSize = 14,
|
};
|
bottomFrameLayout.AddChidren(btnValidTime);
|
|
var btnModifyText = new Button()
|
{
|
Width = Application.GetRealWidth(448),
|
Height = Application.GetRealHeight(58),
|
X = btnValidTime.Right,
|
Text = Language.StringByID(R.MyInternationalizationString.Modify),
|
TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
|
TextAlignment = TextAlignment.CenterRight,
|
TextSize = 14,
|
};
|
bottomFrameLayout.AddChidren(btnModifyText);
|
|
var btnNextFrameLayout = new FrameLayout()
|
{
|
Width = Application.GetRealWidth(58 * 2),
|
Height = Application.GetRealHeight(58),
|
X = Application.GetRealWidth(956),
|
Y = Application.GetRealHeight(204),
|
};
|
bottomFrameLayout.AddChidren(btnNextFrameLayout);
|
|
var btnNext = new Button()
|
{
|
Width = Application.GetRealWidth(58),
|
Height = Application.GetRealHeight(58),
|
UnSelectedImagePath = "Item/Next.png",
|
SelectedImagePath = "Item/Down.png",
|
};
|
btnNextFrameLayout.AddChidren(btnNext);
|
|
var btnLine = new FrameLayout()
|
{
|
Width = Application.GetRealWidth(965),
|
Height = Application.GetRealHeight(5),
|
X = Application.GetRealWidth(58),
|
BackgroundColor = Shared.Common.ZigbeeColor.Current.XMRowLine,
|
};
|
bottomFrameLayout.AddChidren(btnLine);
|
|
if (i == 0)
|
{
|
btnValidTime.Y = Application.GetRealHeight(204);
|
btnValidTime.Text = Language.StringByID(R.MyInternationalizationString.ValidTime);
|
btnModifyText.Y = btnNextFrameLayout.Y = btnValidTime.Y;
|
btnLine.Y = Application.GetRealHeight(308);
|
}
|
else if (i == 1)
|
{
|
btnValidTime.Y = Application.GetRealHeight(343);
|
btnValidTime.Text = Language.StringByID(R.MyInternationalizationString.InValidTime);
|
btnModifyText.Y = btnNextFrameLayout.Y = btnValidTime.Y;
|
btnLine.Y = Application.GetRealHeight(446);
|
}
|
int curIndex = i;
|
EventHandler<MouseEventArgs> hander = (sender, e) =>
|
{
|
if (curIndex == 0)
|
{
|
var tempPage = new Shared.Phone.UserCenter.DoorLock.TimeSettignPage(doorLock, "ValidTime");
|
Shared.Phone.UserView.HomePage.Instance.AddChidren(tempPage);
|
Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
|
tempPage.Show();
|
tempPage.timeSetAction += () =>
|
{
|
MidFrameLayoutContent();
|
};
|
}
|
if (curIndex == 1)
|
{
|
var tempPage = new Shared.Phone.UserCenter.DoorLock.TimeSettignPage(doorLock, "InValidTime");
|
Shared.Phone.UserView.HomePage.Instance.AddChidren(tempPage);
|
Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
|
tempPage.Show();
|
tempPage.timeSetAction += () =>
|
{
|
MidFrameLayoutContent();
|
};
|
}
|
};
|
btnValidTime.MouseDownEventHandler += hander;
|
btnModifyText.MouseDownEventHandler += hander;
|
btnNextFrameLayout.MouseDownEventHandler += hander;
|
btnNext.MouseDownEventHandler += hander;
|
}
|
|
var btnFinifh = new Button()
|
{
|
Width = Application.GetRealWidth(907),
|
Height = Application.GetRealHeight(127),
|
X = Application.GetRealWidth(86),
|
Y = Application.GetRealHeight(760),
|
Radius = (uint)Application.GetRealHeight(120) / 2,
|
TextID = R.MyInternationalizationString.Confrim,
|
BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack,
|
//BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect,
|
TextColor = Shared.Common.ZigbeeColor.Current.XMWhite,
|
TextSize = 16,
|
};
|
bottomFrameLayout.AddChidren(btnFinifh);
|
|
btnFinifh.MouseUpEventHandler += async (sender, e) =>
|
{
|
FinifhEventHandler(btnFinifh);
|
};
|
|
}
|
|
//确定事件处理
|
async private void FinifhEventHandler(Button btnFinifh)
|
{
|
if (ZigBee.Device.DoorLock.LocalTempPassword == "")
|
{
|
//请"点击生成"临时密码;
|
new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetTempPasswordTip1), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
|
return;
|
}
|
if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour == 100)
|
{
|
//请设置生效时间;
|
new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetTempPasswordTip2), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
|
return;
|
}
|
if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMonth == 0)
|
{
|
//请设置生效日期;
|
new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetTempPasswordTip3), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
|
return;
|
}
|
if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateHour == 100)
|
{
|
new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetTempPasswordTip4), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
|
return;
|
}
|
if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMonth == 0)
|
{
|
new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetTempPasswordTip5), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
|
return;
|
}
|
var dNow = DateTime.Now;
|
var validDateTime = new DateTime(dNow.Year, Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMonth, Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateDay, Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour, Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMinute, dNow.Second);
|
var inValidDateTime = new DateTime(dNow.Year, Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMonth, Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateDay, Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateHour, Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMinute, dNow.Second);
|
var result = await doorLock.TempPasswordAsync(ZigBee.Device.DoorLock.LocalTempPassword, validDateTime, inValidDateTime);
|
if (result != null && result.responseData != null && result.responseData.status == 0)
|
{
|
var aa = 0;
|
}
|
else
|
{
|
//失败
|
}
|
}
|
|
//生成随机数事件处理
|
private void RandomPasswordMouseUpEventHandler(Button randomPassword)
|
{
|
|
}
|
|
#region ◆ 接口实现__________________________
|
/// <summary>
|
/// 处理变化事件 --将弃用 改用DeviceInfoChange()
|
/// </summary>
|
/// <returns>The changed.</returns>
|
/// <param name="common">Common.</param>
|
public void Changed(CommonDevice common)
|
{
|
|
}
|
/// <summary>
|
/// 处理变化事件
|
/// </summary>
|
/// <param name="common"></param>
|
/// <param name="typeTag"></param>
|
public void DeviceInfoChange(CommonDevice common, string typeTag)
|
{
|
}
|
/// <summary>
|
/// Changeds the IL ogic status.
|
/// </summary>
|
/// <param name="logic">Logic.</param>
|
public void ChangedILogicStatus(ZigBee.Device.Logic logic)
|
{
|
}
|
/// <summary>
|
/// Changeds the IS cene status.
|
/// </summary>
|
/// <param name="scene">Scene.</param>
|
public void ChangedISceneStatus(Scene scene)
|
{
|
}
|
#endregion
|
}
|
}
|