public VerifyPage(VerificationResult result) : base("VerifyPage") { Subscribe <ServiceNodesLoadedEvent>(ServiceNodesLoaded); var viewResult = result != null; AddTitleRow("Title"); if (!viewResult) { AddHeaderRow("Search"); _transactionId = AddEntryRow(null, "TransactionId"); _transactionId.SetDetailViewIcon(Icons.ShieldCheck); _transactionId.Edit.TextChanged += (sender, e) => { StatusValidators.PositiveNumberValidator(null, _transactionId.Edit, e.NewTextValue, e.OldTextValue); }; AddSubmitRow("SearchButton", Search, false); AddInfoRow("SearchInfo"); AddFooterRow(); } _verifyButton = AddButtonRow("VerifyFile", VerifyFile); _verifyButton.RowStyle = Theme.SubmitButton; _verifyButton.IsEnabled = false; _verifyView = new VerifyView(); AddViewRow(_verifyView); _viewFiles = AddButtonRow("ViewFiles", ViewFiles); _viewFiles.IsEnabled = false; _link = AddLinkRow("Link", ""); _link.IsEnabled = false; _verifyLink = AddLinkRow("VerifyLink", ""); _verifyLink.IsEnabled = false; _copyVerifyLink = AddButtonRow("CopyVerifyLink", Copy); _copyVerifyLink.IsEnabled = false; _account = AddButtonRow("Account", Account); _account.IsEnabled = false; AddFooterRow(); if (!viewResult) { AddHeaderRow("Common.ServiceNode"); _serviceNode = AddRow(new ServiceNodeButtonRow(VerifyApp.Current.GetLastUsedServiceNode(), this, SelectServiceNode)); AddInfoRow("Common.ServiceNodeInfo"); AddFooterRow(); } if (viewResult) { Update(result); } }
/// <summary> /// Timer触发的事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void timer_Tick(object sender, EventArgs e) { if (OnCountDown()) { //HourArea.Text = processCount.GetHour(); //MinuteArea.Text = processCount.GetMinute(); //SecondArea.Text = processCount.GetSecond(); ChcekInTimer = processCount.GetMinute() + "分" + processCount.GetSecond() + "秒"; ThreadPool.QueueUserWorkItem(m => { if (processCount.timerTotalSecond >= 20) { var errCode = 0; var errMsg = string.Empty; AntSdkQuerySystemDateOuput serverResult = AntSdkService.AntSdkGetCurrentSysTime(ref errCode, ref errMsg); DateTime serverDateTime = DateTime.Now; if (serverResult != null) { serverDateTime = PublicTalkMothed.ConvertStringToDateTime(serverResult.systemCurrentTime); } var diffMinute = serverDateTime - checkInDataTime; if (checkInDataTime.ToShortDateString() != serverDateTime.ToShortDateString()) { return; } if (diffMinute.Days > 0 || diffMinute.TotalMinutes > 20) { return; } var minuteChangeSecond = (20 - diffMinute.TotalMinutes) * 60; processCount.ResetTotalSecond((int)minuteChangeSecond); } }); } else { if (VerifyView != null) { VerifyView.Close(); //MainWindowViewModel.CloseExitVerify(); } VerifyResultShow(true, CheckInVerifyResultState.TimeError); timer.Stop(); } }
/// <summary> /// Takes param from Verify model /// </summary> /// <param name="enhancement"></param> public VerifyModel(List <Jobs> enhancement) { this.Enhancementlist = enhancement; _page = new VerifyView(Enhancementlist); }