/// <summary> /// 警员信息内容解析 /// </summary> /// <param name="value"></param> private void AnalyzePoliceInfos(string value, MsgType msgType) { App.Current.Dispatcher.Invoke(new Action(() => { FingerInfos policeInfos = XmlUnityConvert.XmlDeserialize <FingerInfos>(value); policeInfos = FilterFingerInfoByUserType(policeInfos); ResultWindow resultWindow = CheckResultMsg(msgType); if (resultWindow == null) { return; } if (policeInfos.ResultCode == 0) { resultWindow.SuccessCloseWindow(); FingerViewModel.PageIndex = policeInfos.PageIndex; FingerViewModel.IsMoreData = policeInfos.UserInfoList.Count == AppConfigInfos.AppStateInfos.SearchPageCount; if (policeInfos.PageIndex == 1) { FingerViewModel.SearchPoliceInfos(policeInfos.UserInfoList); } else { FingerViewModel.AddPoliceInfos(policeInfos.UserInfoList); } } else { resultWindow.FailedCloseWindow(policeInfos); } })); }
void EmitFingerEvents(FingerModel finger, FingerViewModel viewModel, bool wasPinching) { // Pinch events if (finger.isPinching != wasPinching) { if (finger.isPinching) { viewModel.onPinch.Invoke(); } else { viewModel.onUnpinch.Invoke(); } } // Pinch intention events if (finger.pinchIntentionLerp == 1.0f && !finger.isIntentionallyPinching) { finger.isIntentionallyPinching = true; viewModel.onLongPinch.Invoke(); } else if (finger.pinchIntentionLerp == 0.0f && finger.isIntentionallyPinching) { finger.isIntentionallyPinching = false; viewModel.onLongUnpinch.Invoke(); } }
public void UpdateEvents(FingerViewModel finger) { onPinchLerpUpdate.Invoke(finger.pinchLerp); onPinchSpeedUpdate.Invoke(finger.pinchSpeed); onBaseRotationUpdate.Invoke(finger.baseRotationLerp); onFlexUpdate.Invoke(finger.flexLerp); onStrengthUpdate.Invoke(finger.strengthLerp); onPalmLineUpdate.Invoke(finger.palmLineLerp); }
/// <summary> /// 采集指纹保存 /// </summary> /// <param name="value"></param> /// <param name="msgType"></param> private void AnalyzeSaveFingerPrint(string value, MsgType msgType) { App.Current.Dispatcher.Invoke(new Action(() => { FingerResult fingerResult = XmlUnityConvert.XmlDeserialize <FingerResult>(value); ResultWindow resultWindow = CheckResultMsg(msgType); if (resultWindow == null) { return; } if (fingerResult.ResultCode == 0) { resultWindow.SuccessCloseWindow(); FingerViewModel.AddFingerPrintByUser(fingerResult); } else { resultWindow.FailedCloseWindow(fingerResult); } })); }