|
@@ -120,7 +120,41 @@ namespace OTSPartA_STDEditor
|
|
|
|
|
|
private void MineralsGrid_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
+ SourceGrid.Grid ls_gd = (SourceGrid.Grid)sender;
|
|
|
+ ls_gd.Focus();
|
|
|
+ int i = ls_gd.Selection.ActivePosition.Row;
|
|
|
+ int j = ls_gd.Selection.ActivePosition.Column;
|
|
|
+ //string jj =m_MainForm.m_Attributes.Grid_Attributes[10, 1].Value.ToString();
|
|
|
+ /// 保证鼠标点击的GRID行和列是有效的
|
|
|
+ if (i >= 0 && j >= 0)
|
|
|
+ {
|
|
|
+ ////规则名称不为空
|
|
|
+ //if (Grid_Minerals[i, 0].Value.ToString().Replace(" ", "").Trim() != "")
|
|
|
+ //{
|
|
|
+ // if (m_MainForm.CheckAttributes() && m_MainForm.Checktextbox_STDEditor())
|
|
|
+ // {
|
|
|
|
|
|
+ m_MainForm.SaveDataOfSelRule(PreRow, 0);
|
|
|
+ m_MainForm.ChangeSTDEditorAndGrid_Attributes(int.Parse(Grid_Minerals[i, 0].Tag.ToString()));
|
|
|
+ m_MainForm.m_SubMidWindow.m_ComparativeLibrary.MakeCheckboxUnchecked();
|
|
|
+ PreRow = i;
|
|
|
+
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // Position pos = new Position(PreRow, 0);
|
|
|
+ // Grid_Minerals.Selection.Focus(pos, true);
|
|
|
+ // m_MainForm.m_SubMidWindow.m_ComparativeLibrary.MakeCheckboxUnchecked();
|
|
|
+ // }
|
|
|
+ //}
|
|
|
+ //else
|
|
|
+ //{
|
|
|
+ // Position pos = new Position(PreRow, 0);
|
|
|
+ // Grid_Minerals.Selection.Focus(pos, true);
|
|
|
+ // m_MainForm.m_SubMidWindow.m_ComparativeLibrary.MakeCheckboxUnchecked();
|
|
|
+ //}
|
|
|
+ }
|
|
|
+ SetOrderButtonsStatus();
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 新建
|