|
@@ -13,6 +13,7 @@ namespace OTSPartA_STDEditor
|
|
|
{
|
|
|
public partial class Form_GroupId : Form
|
|
|
{
|
|
|
+ public Form_ConstantsEditor2 m_MainForm = null;
|
|
|
//国际化
|
|
|
Language lan;
|
|
|
System.Collections.Hashtable table_GroupId;
|
|
@@ -229,10 +230,11 @@ namespace OTSPartA_STDEditor
|
|
|
m_dbConnection.Close();
|
|
|
}
|
|
|
|
|
|
- public Form_GroupId(string DBAddress)
|
|
|
+ public Form_GroupId(string DBAddress, Form_ConstantsEditor2 mainForm)
|
|
|
{
|
|
|
InitializeComponent();
|
|
|
MineralGroupDBAddress = DBAddress;
|
|
|
+ m_MainForm = mainForm;
|
|
|
}
|
|
|
|
|
|
private void Form_GroupId_Load(object sender, EventArgs e)
|
|
@@ -404,9 +406,18 @@ namespace OTSPartA_STDEditor
|
|
|
int y = Grid_FroupId.Selection.ActivePosition.Column;
|
|
|
if (x > 0 && (y == 0|| y == 1))
|
|
|
{
|
|
|
- if(x==1)
|
|
|
+ bool bexist = false;
|
|
|
+ foreach (KeyValuePair<int, STDdata> kv in m_MainForm.STDDictionary)
|
|
|
{
|
|
|
- MessageBox.Show("Group by default,can not be deleted!");
|
|
|
+ if(kv.Value.GroupId.ToString()== Grid_FroupId[x, 0].Tag.ToString())
|
|
|
+ {
|
|
|
+ bexist = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(bexist)
|
|
|
+ {
|
|
|
+ MessageBox.Show("There is a grouping in the user standard library that you want to delete!");
|
|
|
return;
|
|
|
}
|
|
|
RemoveMineralGroupDictionaryItem((int)Grid_FroupId[x, 0].Tag);
|