| | |
| | | using OxyPlot.Series; |
| | | using OxyPlot.WindowsForms; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.Runtime.InteropServices; |
| | | using System.Security.Cryptography; |
| | | using System.Windows.Forms; |
| | | using static System.Windows.Forms.VisualStyles.VisualStyleElement.Menu; |
| | |
| | | { |
| | | public partial class FrmMain : Form |
| | | { |
| | | [DllImport("user32.dll")] |
| | | private static extern short GetAsyncKeyState(Keys vKey); |
| | | |
| | | private string? _connectionString; |
| | | private List<COModelTable> _models; |
| | | private Dictionary<string, string> _filters; |
| | | private COModelTable _model; |
| | | private ReportModel _reportModel; |
| | | |
| | | public FrmMain() |
| | | { |
| | | InitializeComponent(); |
| | |
| | | AppendText(txtAnalysisResult, $"{errorRate}%", ColorTranslator.FromHtml("#8B0000")); |
| | | txtAnalysisResult.AppendText(" error rate. With the tool operating at "); |
| | | AppendText(txtAnalysisResult, $"{speed} {cmbSpeedUnit.Text}", ColorTranslator.FromHtml("#8B0000")); |
| | | txtAnalysisResult.AppendText(" the estimated total job duration is "); |
| | | txtAnalysisResult.AppendText(" the estimated one pass duration is "); |
| | | AppendText(txtAnalysisResult, $"{totalTime} hours.", ColorTranslator.FromHtml("#8B0000")); |
| | | |
| | | _reportModel = CreateReportModel(totalTime.ToString(), result.ErrorRatios.Count.ToString(), Math.Round(UnitConvert.MS2FtHr(calcSpeed), 2).ToString(), errorRate.ToString()); |
| | |
| | | |
| | | _reportModel = CreateReportModel(totalTime.ToString(), result.ErrorRatios.Count.ToString(), speedFr.ToString(), errorRate.ToString()); |
| | | } |
| | | if (chkProcessing.Checked) |
| | | if ((Control.ModifierKeys & Keys.Control) == Keys.Control && (GetAsyncKeyState(Keys.D) & 0x8000) != 0) |
| | | new ProcessingData(processingData).Show(); |
| | | |
| | | |
| | | } |
| | | private void btnReport_Click(object sender, EventArgs e) |
| | | { |