数据输入窗体及相关代码
This commit is contained in:
1 parent
ae55eaad44
commit
5cfb336f46
5 files changed
+196
-18
No files matched your search
@@ -277,14 +277,17 @@ namespace kcsj.Forms
|
||||
}
|
||||
|
||||
// 把数据交给主窗体
|
||||
DataStore.SetData(knownPoints, observations, "文件导入");
|
||||
|
||||
ImportedKnownPoints = knownPoints;
|
||||
ImportedObservations = observations;
|
||||
|
||||
MessageBox.Show("数据导入成功!");
|
||||
LogService.AddLog("数据导入成功!");
|
||||
LogService.AddLog("文件数据导入成功!");
|
||||
|
||||
this.DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Generated
+1
@@ -82,6 +82,7 @@
|
||||
btnDataInspect.TabIndex = 2;
|
||||
btnDataInspect.Text = "数据检查";
|
||||
btnDataInspect.UseVisualStyleBackColor = true;
|
||||
btnDataInspect.Click += btnDataInspect_Click;
|
||||
//
|
||||
// btnStartAdjust
|
||||
//
|
||||
|
||||
+35
-3
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using kcsj.Models;
|
||||
using kcsj.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
@@ -7,12 +9,12 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using kcsj.Services;
|
||||
|
||||
namespace kcsj.Forms
|
||||
{
|
||||
public partial class MainForm : Form
|
||||
{
|
||||
|
||||
public MainForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -45,7 +47,12 @@ namespace kcsj.Forms
|
||||
{
|
||||
FileInputForm form = new FileInputForm();
|
||||
|
||||
form.ShowDialog();
|
||||
if (form.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
LogService.AddLog("主窗体已接收文件导入数据。");
|
||||
LogService.AddLog($"已知点数量:{DataStore.KnownPoints.Count}");
|
||||
LogService.AddLog($"观测数据数量:{DataStore.Observations.Count}");
|
||||
}
|
||||
}
|
||||
|
||||
private void 手动输入ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
@@ -74,5 +81,30 @@ namespace kcsj.Forms
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void btnDataInspect_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataCheckResult result = DataCheck.Check(DataStore.KnownPoints, DataStore.Observations);
|
||||
|
||||
LogService.AddLog(result.ToLogText());
|
||||
LogService.AddLog(Environment.NewLine);
|
||||
|
||||
if (!result.IsValid)
|
||||
{
|
||||
MessageBox.Show(
|
||||
"数据检查未通过,请查看日志信息。",
|
||||
"数据检查",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Warning);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
MessageBox.Show(
|
||||
"数据检查通过,可以进行平差计算。",
|
||||
"数据检查",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loaded 3 of 5 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user