|
@@ -1243,28 +1243,28 @@ namespace OTSPartA_STDEditor
|
|
|
#endregion
|
|
|
|
|
|
private void rbClose_Click(object sender, EventArgs e)
|
|
|
- {
|
|
|
- if (m_STDRuleslist.Grid_Minerals.RowsCount > 1)
|
|
|
- {
|
|
|
- if ((m_STDRuleslist.Grid_Minerals[m_STDRuleslist.Grid_Minerals.Selection.ActivePosition.Row, 0].Value.ToString().Replace(" ", "").Trim() != "") && CheckAttributes() && Checktextbox_STDEditor())
|
|
|
- {
|
|
|
- SaveDataOfSelRule(m_STDRuleslist.Grid_Minerals.Selection.ActivePosition.Row, 0);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- STDDictionaryInitial.Clear();
|
|
|
- } if (!EqualsBetweenDictionary(STDDictionaryInitial, STDDictionary) || IsModified)
|
|
|
-
|
|
|
+ {
|
|
|
+ if (!EqualsBetweenDictionary(STDDictionaryInitial, STDDictionary) || IsModified)
|
|
|
{
|
|
|
DialogResult dr = MessageBox.Show("是否保存当前修改", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
|
|
if (dr == DialogResult.Yes)
|
|
|
{
|
|
|
+ if (m_STDRuleslist.Grid_Minerals.RowsCount > 1)
|
|
|
+ {
|
|
|
+ if ((m_STDRuleslist.Grid_Minerals[m_STDRuleslist.Grid_Minerals.Selection.ActivePosition.Row, 0].Value.ToString().Replace(" ", "").Trim() != "") && CheckAttributes() && Checktextbox_STDEditor())
|
|
|
+ {
|
|
|
+ SaveDataOfSelRule(m_STDRuleslist.Grid_Minerals.Selection.ActivePosition.Row, 0);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ STDDictionaryInitial.Clear();
|
|
|
+ }
|
|
|
FormForWaiting forWaiting = new FormForWaiting();
|
|
|
forWaiting.Show();
|
|
|
bool result = SaveDictionaryToClassify(STDDBAddress);
|
|
@@ -1376,11 +1376,15 @@ namespace OTSPartA_STDEditor
|
|
|
|
|
|
if (m_STDRuleslist.Grid_Minerals.RowsCount > 1)
|
|
|
{
|
|
|
+ m_STDRuleslist.button_UpOrder.Enabled = false;
|
|
|
+ if (m_STDRuleslist.Grid_Minerals.RowsCount == 2) //就一条时向下按钮置灰
|
|
|
+ {
|
|
|
+ m_STDRuleslist.button_DownOrder.Enabled = false;
|
|
|
+ }
|
|
|
+ ChangeSTDEditorAndGrid_Attributes(int.Parse(m_STDRuleslist.Grid_Minerals[1, 0].Tag.ToString()));
|
|
|
Position pos = new Position(1, 0);
|
|
|
m_STDRuleslist.Grid_Minerals[1, 0].Grid.Select();
|
|
|
m_STDRuleslist.Grid_Minerals.Selection.Focus(pos, true);
|
|
|
- ChangeSTDEditorAndGrid_Attributes(int.Parse(m_STDRuleslist.Grid_Minerals[1, 0].Tag.ToString()));
|
|
|
- m_STDRuleslist.button_UpOrder.Enabled = false;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1471,28 +1475,28 @@ namespace OTSPartA_STDEditor
|
|
|
{
|
|
|
if (m_STDRuleslist.Text != "")
|
|
|
{
|
|
|
- if (m_STDRuleslist.Grid_Minerals.RowsCount > 1)
|
|
|
- {
|
|
|
- if ((m_STDRuleslist.Grid_Minerals[m_STDRuleslist.Grid_Minerals.Selection.ActivePosition.Row, 0].Value.ToString().Replace(" ", "").Trim() != "") && CheckAttributes() && Checktextbox_STDEditor())
|
|
|
- {
|
|
|
- SaveDataOfSelRule(m_STDRuleslist.Grid_Minerals.Selection.ActivePosition.Row, 0);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- e.Cancel = true;
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- STDDictionaryInitial.Clear();
|
|
|
- }
|
|
|
if (!EqualsBetweenDictionary(STDDictionaryInitial, STDDictionary)|| IsModified)
|
|
|
{
|
|
|
DialogResult dr = MessageBox.Show("是否保存当前修改", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
|
|
if (dr == DialogResult.Yes)
|
|
|
{
|
|
|
+ if (m_STDRuleslist.Grid_Minerals.RowsCount > 1)
|
|
|
+ {
|
|
|
+ if ((m_STDRuleslist.Grid_Minerals[m_STDRuleslist.Grid_Minerals.Selection.ActivePosition.Row, 0].Value.ToString().Replace(" ", "").Trim() != "") && CheckAttributes() && Checktextbox_STDEditor())
|
|
|
+ {
|
|
|
+ SaveDataOfSelRule(m_STDRuleslist.Grid_Minerals.Selection.ActivePosition.Row, 0);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ e.Cancel = true;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ STDDictionaryInitial.Clear();
|
|
|
+ }
|
|
|
FormForWaiting forWaiting = new FormForWaiting();
|
|
|
forWaiting.Show();
|
|
|
bool result = SaveDictionaryToClassify(STDDBAddress);
|