private void initalAlarmHanle()
{
string cancelAlarm = "CancelAlarmEvent";
ConnectionManager.AddHandler(cancelAlarm, async (v) =>
{
string clockId = "clockId";
if (v.ContainsKey(clockId))
{
Log.WriteLine("AlarmModel CancelAlarmEvent");
long Clock_id = (long) v[clockId];
Clock clock=clockList.GetClockByID(Clock_id);
if(clock!=null)
{
ClockData clockData = clock.ClockData;
clockData.Clock_id = Clock_id;
_ = HPMetrics.Metrics.Track(LocalSettings.CustomerId, (int)HPMetrics.XwEventType.ClickButton, "AlarmDetailsPageDelete");
await XiaoweiAI.ModifyAlarmAsync(3, clockData.ToJsonObject()).ConfigureAwait(false);
}
}
});
}