/// <summary> /// 执法记录仪移除 /// </summary> /// <param name="deviceCode"></param> public static void DevieItemRemove(string deviceCode) { DeviveInfo deviveInfo = GatherViewModel.DeviveInfoList.Find(p => p.DeviceCode.Equals(deviceCode)); if (deviveInfo != null) { GatherViewModel.DeviveInfoList.Remove(deviveInfo); MatchWindow matchWindow = WindowsHelper.GetWindow <MatchWindow>(); if (matchWindow != null && matchWindow.DeviveInfo.DeviceCode.Equals(deviceCode)) { matchWindow.Close(); } DeviceRegisterWindow registerWindow = WindowsHelper.GetWindow <DeviceRegisterWindow>(); if (registerWindow != null && registerWindow.DeviveInfo.DeviceCode.Equals(deviceCode)) { registerWindow.Close(); } HandCollectWindow handCollectWindow = WindowsHelper.GetWindow <HandCollectWindow>(); if (handCollectWindow != null && handCollectWindow.DeviveInfo.DeviceCode.Equals(deviceCode)) { handCollectWindow.Close(); } } }
/// <summary> /// 清除所有的执法记录仪 /// </summary> public static void DeviceItemClear() { GatherViewModel.DeviveInfoList.Clear(); MatchWindow matchWindow = WindowsHelper.GetWindow <MatchWindow>(); if (matchWindow != null) { matchWindow.Close(); } DeviceRegisterWindow registerWindow = WindowsHelper.GetWindow <DeviceRegisterWindow>(); if (registerWindow != null) { registerWindow.Close(); } }