Если не валидно то в ответе 0.0
This commit is contained in:
parent
fd743c91b3
commit
960e855301
@ -913,7 +913,9 @@ namespace AnchorsTest
|
||||
public void LoafForms()
|
||||
{
|
||||
MainWindowForm.Instance.GridViewAnchorState.DataSource = _anchors;
|
||||
|
||||
MainWindowForm.Instance.GridViewGroupState.DataSource = _anchorsGroups;
|
||||
MainWindowForm.Instance.GridViewFinalGroupState.DataSource = _finalyAncorGroupStates;
|
||||
MainWindowForm.Instance.GridViewEngineState.DataSource = _engines;
|
||||
}
|
||||
public void SaveToExcel()
|
||||
{
|
||||
@ -929,7 +931,8 @@ namespace AnchorsTest
|
||||
sheet.Column(column++).Hide();
|
||||
sheet.Column(column++).Hide();
|
||||
sheet.Column(column++).Hide();
|
||||
sheet.Column(column++).Hide();
|
||||
sheet.Column(column).AdjustToContents();
|
||||
sheet.Column(column++).Style.NumberFormat.Format = "0.00%";
|
||||
sheet.Column(column++).Hide();
|
||||
sheet.Column(column).AdjustToContents();
|
||||
sheet.Column(column++).Style.NumberFormat.Format = "0.00%";
|
||||
|
||||
92
AnchorsTest/MainWindowForm.Designer.cs
generated
92
AnchorsTest/MainWindowForm.Designer.cs
generated
@ -34,6 +34,7 @@
|
||||
B_ChooseFile1 = new Button();
|
||||
tabControl1 = new TabControl();
|
||||
tabPage1 = new TabPage();
|
||||
button2 = new Button();
|
||||
button1 = new Button();
|
||||
label1 = new Label();
|
||||
textBox3 = new TextBox();
|
||||
@ -54,14 +55,24 @@
|
||||
tableLayoutPanel1 = new TableLayoutPanel();
|
||||
StatusLabel = new Label();
|
||||
backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
|
||||
button2 = new Button();
|
||||
dataGridView2 = new DataGridView();
|
||||
tabPage5 = new TabPage();
|
||||
dataGridView3 = new DataGridView();
|
||||
tabPage6 = new TabPage();
|
||||
dataGridView4 = new DataGridView();
|
||||
tabControl1.SuspendLayout();
|
||||
tabPage1.SuspendLayout();
|
||||
tabPage2.SuspendLayout();
|
||||
tabControl2.SuspendLayout();
|
||||
tabPage3.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
|
||||
tabPage4.SuspendLayout();
|
||||
tableLayoutPanel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView2).BeginInit();
|
||||
tabPage5.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView3).BeginInit();
|
||||
tabPage6.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView4).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// StartRecord
|
||||
@ -131,6 +142,16 @@
|
||||
tabPage1.Text = "tabPage1";
|
||||
tabPage1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// button2
|
||||
//
|
||||
button2.Location = new Point(81, 135);
|
||||
button2.Name = "button2";
|
||||
button2.Size = new Size(75, 23);
|
||||
button2.TabIndex = 15;
|
||||
button2.Text = "Показать";
|
||||
button2.UseVisualStyleBackColor = true;
|
||||
button2.Click += button2_Click;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
button1.Location = new Point(81, 164);
|
||||
@ -256,6 +277,8 @@
|
||||
//
|
||||
tabControl2.Controls.Add(tabPage3);
|
||||
tabControl2.Controls.Add(tabPage4);
|
||||
tabControl2.Controls.Add(tabPage5);
|
||||
tabControl2.Controls.Add(tabPage6);
|
||||
tabControl2.Dock = DockStyle.Fill;
|
||||
tabControl2.Location = new Point(3, 3);
|
||||
tabControl2.Name = "tabControl2";
|
||||
@ -285,6 +308,7 @@
|
||||
//
|
||||
// tabPage4
|
||||
//
|
||||
tabPage4.Controls.Add(dataGridView2);
|
||||
tabPage4.Location = new Point(4, 24);
|
||||
tabPage4.Name = "tabPage4";
|
||||
tabPage4.Padding = new Padding(3);
|
||||
@ -317,15 +341,54 @@
|
||||
StatusLabel.TabIndex = 4;
|
||||
StatusLabel.Text = "label4";
|
||||
//
|
||||
// button2
|
||||
// dataGridView2
|
||||
//
|
||||
button2.Location = new Point(81, 135);
|
||||
button2.Name = "button2";
|
||||
button2.Size = new Size(75, 23);
|
||||
button2.TabIndex = 15;
|
||||
button2.Text = "button2";
|
||||
button2.UseVisualStyleBackColor = true;
|
||||
button2.Click += button2_Click;
|
||||
dataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView2.Dock = DockStyle.Fill;
|
||||
dataGridView2.Location = new Point(3, 3);
|
||||
dataGridView2.Name = "dataGridView2";
|
||||
dataGridView2.Size = new Size(968, 377);
|
||||
dataGridView2.TabIndex = 1;
|
||||
//
|
||||
// tabPage5
|
||||
//
|
||||
tabPage5.Controls.Add(dataGridView3);
|
||||
tabPage5.Location = new Point(4, 24);
|
||||
tabPage5.Name = "tabPage5";
|
||||
tabPage5.Padding = new Padding(3);
|
||||
tabPage5.Size = new Size(974, 383);
|
||||
tabPage5.TabIndex = 2;
|
||||
tabPage5.Text = "tabPage5";
|
||||
tabPage5.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// dataGridView3
|
||||
//
|
||||
dataGridView3.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView3.Dock = DockStyle.Fill;
|
||||
dataGridView3.Location = new Point(3, 3);
|
||||
dataGridView3.Name = "dataGridView3";
|
||||
dataGridView3.Size = new Size(968, 377);
|
||||
dataGridView3.TabIndex = 2;
|
||||
//
|
||||
// tabPage6
|
||||
//
|
||||
tabPage6.Controls.Add(dataGridView4);
|
||||
tabPage6.Location = new Point(4, 24);
|
||||
tabPage6.Name = "tabPage6";
|
||||
tabPage6.Padding = new Padding(3);
|
||||
tabPage6.Size = new Size(974, 383);
|
||||
tabPage6.TabIndex = 3;
|
||||
tabPage6.Text = "tabPage6";
|
||||
tabPage6.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// dataGridView4
|
||||
//
|
||||
dataGridView4.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView4.Dock = DockStyle.Fill;
|
||||
dataGridView4.Location = new Point(3, 3);
|
||||
dataGridView4.Name = "dataGridView4";
|
||||
dataGridView4.Size = new Size(968, 377);
|
||||
dataGridView4.TabIndex = 2;
|
||||
//
|
||||
// MainWindowForm
|
||||
//
|
||||
@ -342,8 +405,14 @@
|
||||
tabControl2.ResumeLayout(false);
|
||||
tabPage3.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit();
|
||||
tabPage4.ResumeLayout(false);
|
||||
tableLayoutPanel1.ResumeLayout(false);
|
||||
tableLayoutPanel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView2).EndInit();
|
||||
tabPage5.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView3).EndInit();
|
||||
tabPage6.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView4).EndInit();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
@ -375,5 +444,10 @@
|
||||
private Label StatusLabel;
|
||||
private Button button1;
|
||||
private Button button2;
|
||||
private DataGridView dataGridView2;
|
||||
private TabPage tabPage5;
|
||||
private DataGridView dataGridView3;
|
||||
private TabPage tabPage6;
|
||||
private DataGridView dataGridView4;
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,6 +20,47 @@ namespace AnchorsTest
|
||||
dataGridView1 = value;
|
||||
}
|
||||
}
|
||||
|
||||
public DataGridView GridViewGroupState
|
||||
{
|
||||
get
|
||||
{
|
||||
return dataGridView2;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
dataGridView2 = value;
|
||||
}
|
||||
}
|
||||
|
||||
public DataGridView GridViewFinalGroupState
|
||||
{
|
||||
get
|
||||
{
|
||||
return dataGridView3;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
dataGridView3 = value;
|
||||
}
|
||||
}
|
||||
|
||||
public DataGridView GridViewEngineState
|
||||
{
|
||||
get
|
||||
{
|
||||
return dataGridView4;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
dataGridView4 = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Label LabelFile1Path
|
||||
{
|
||||
get
|
||||
|
||||
@ -398,27 +398,24 @@ namespace AnchorsTest
|
||||
finalyState.name = data.AncGroupName;
|
||||
}
|
||||
|
||||
finalyState.ZAverage = (finalyState.ZAverage * finalyState.count + data.Z) / (finalyState.count + 1);
|
||||
|
||||
++finalyState.count;
|
||||
if (data.Valid)
|
||||
{
|
||||
++finalyState.countValid;
|
||||
finalyState.ZAverage = (finalyState.ZAverage * finalyState.count + data.Z) / (finalyState.count + 1);
|
||||
|
||||
if (data.Z < finalyState.ZMin)
|
||||
{
|
||||
finalyState.ZMin = data.Z;
|
||||
}
|
||||
|
||||
if (data.Z > finalyState.ZMax)
|
||||
{
|
||||
finalyState.ZMax = data.Z;
|
||||
}
|
||||
}
|
||||
|
||||
if (data.Z < finalyState.ZMin)
|
||||
{
|
||||
finalyState.ZMin = data.Z;
|
||||
}
|
||||
|
||||
if (data.Z > finalyState.ZMax)
|
||||
{
|
||||
finalyState.ZMax = data.Z;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (isNeedAdd)
|
||||
{
|
||||
FinalyAnchorGroup.Add(finalyState.sn, finalyState);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user