|
@@ -228,6 +228,24 @@ namespace OTSMeasureApp._7_OTSProgMgrInfo.Stage
|
|
|
MessageBox.Show("Please check Params!");
|
|
|
return;
|
|
|
}
|
|
|
+ if (tBoundaryWide.Text == "1" || tBoundaryHeight.Text == "1" || tStandardsampleWide.Text == "1" || tStandardsampleHeight.Text == "1")
|
|
|
+ {
|
|
|
+ this.button_Ok.Enabled = false;
|
|
|
+ MessageBox.Show("The length value cannot be 1!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ for (int i = 0; i < dataGridView_Holes.Rows.Count; i++)
|
|
|
+ {
|
|
|
+ for (int j = 4; j <= 5; j++)
|
|
|
+ {
|
|
|
+ if (dataGridView_Holes.Rows[i].Cells[j].Value.ToString() == "1")
|
|
|
+ {
|
|
|
+ this.button_Ok.Enabled = false;
|
|
|
+ MessageBox.Show("The length value cannot be 1!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
CSEMStageData a_pCSEMStageData = new CSEMStageData();
|
|
|
//获取配置文件中 StageData 内容
|
|
|
COTSDefaultParam m_DefaultParam = new COTSDefaultParam();
|
|
@@ -420,11 +438,11 @@ namespace OTSMeasureApp._7_OTSProgMgrInfo.Stage
|
|
|
//draw boundery
|
|
|
Brush pLTGrayBrush = new SolidBrush(Color.FromArgb(255, 0, 0));
|
|
|
stageDisplayHelp.DrawStageBoundery(m_pStage, nWidth, nHeight, pDC, PixSize);
|
|
|
-
|
|
|
- ////draw STD
|
|
|
- //Brush pBlackBrush = new SolidBrush(Color.FromArgb(255, 0, 0)); ;
|
|
|
|
|
|
- //DrawStageSTD(m_pStage[m_nListBoxStageListIndex], nWidth, nHeight, pDC, PixSize);
|
|
|
+ //draw STD
|
|
|
+ Brush pBlackBrush = new SolidBrush(Color.FromArgb(255, 0, 0));
|
|
|
+
|
|
|
+ stageDisplayHelp.DrawStageSTD(m_pStage, nWidth, nHeight, pDC, PixSize);
|
|
|
|
|
|
////draw holes
|
|
|
//Brush pWriteBrush = new SolidBrush(Color.FromArgb(255, 0, 0)); ;
|
|
@@ -433,8 +451,13 @@ namespace OTSMeasureApp._7_OTSProgMgrInfo.Stage
|
|
|
|
|
|
// draw ratio
|
|
|
stageDisplayHelp.DrawRatio(nBounderyWidth, nWidth, nHeight, pDC, (IntPtr)pWnd, rc);
|
|
|
-
|
|
|
- //stageDisplayHelp.DrawXY(pDC, m_ctrlStagePicture.Width, m_ctrlStagePicture.Height, PixSize, coordinateSystemEndpoint);
|
|
|
+ if (button_Coordinate.Text == "坐标系关闭")
|
|
|
+ {
|
|
|
+ double coordinateSystemEndpointX = nBounderyWidth / 2;
|
|
|
+ double coordinateSystemEndpointY = nBounderyHeight / 2;
|
|
|
+ stageDisplayHelp.DrawXY(pDC, m_ctrlStagePicture.Width, m_ctrlStagePicture.Height, PixSize, coordinateSystemEndpointX, coordinateSystemEndpointY);
|
|
|
+ }
|
|
|
+
|
|
|
pLTGrayBrush.Dispose();
|
|
|
//pBlackBrush.Dispose();
|
|
|
//pWriteBrush.Dispose();
|
|
@@ -510,6 +533,20 @@ namespace OTSMeasureApp._7_OTSProgMgrInfo.Stage
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (radioButton_BoundarySquare.Checked)
|
|
|
+ {
|
|
|
+ if (double.Parse(tBoundaryHeight.Text) == 0)
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (radioButton_StandardsampleSqare.Checked)
|
|
|
+ {
|
|
|
+ if (double.Parse(tStandardsampleHeight.Text) == 0)
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
return true;
|
|
|
}
|
|
|
|
|
@@ -575,6 +612,7 @@ namespace OTSMeasureApp._7_OTSProgMgrInfo.Stage
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ button_Coordinate.Text = "坐标系显示";
|
|
|
if(m_pStage != null)
|
|
|
{
|
|
|
DrawStage();
|
|
@@ -583,7 +621,6 @@ namespace OTSMeasureApp._7_OTSProgMgrInfo.Stage
|
|
|
{
|
|
|
m_ctrlStagePicture.Refresh();
|
|
|
}
|
|
|
- button_Coordinate.Text = "坐标系显示";
|
|
|
}
|
|
|
}
|
|
|
}
|