|
@@ -182,7 +182,7 @@ namespace OTSPartA_STDEditor
|
|
|
}
|
|
|
catch /*(Exception ee)*/
|
|
|
{
|
|
|
- MessageBox.Show(table["message6"].ToString(), table["message32"].ToString());
|
|
|
+ MessageBox.Show("The selected standard library is formatted incorrectly, please open the correct standard library!", "Tip");
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
@@ -209,8 +209,8 @@ namespace OTSPartA_STDEditor
|
|
|
try
|
|
|
{
|
|
|
SaveFileDialog saveFile = new SaveFileDialog();
|
|
|
- saveFile.Title = table["message23"].ToString();
|
|
|
- saveFile.Filter = table["message36"].ToString();
|
|
|
+ saveFile.Title = "Please select the path which to save the file";
|
|
|
+ saveFile.Filter = "Database File(*.db)|*.db";
|
|
|
saveFile.OverwritePrompt = true; //是否覆盖当前文件
|
|
|
saveFile.RestoreDirectory = true; //还原上次目录
|
|
|
if (saveFile.ShowDialog() == DialogResult.OK)
|
|
@@ -219,7 +219,7 @@ namespace OTSPartA_STDEditor
|
|
|
bool result = SaveDictionaryToClassify(saveFile.FileName);
|
|
|
if (result)
|
|
|
{
|
|
|
- MessageBox.Show(table["message25"].ToString(), table["message32"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
+ MessageBox.Show("Export file successful!", "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
}
|
|
|
}
|
|
|
else
|
|
@@ -236,7 +236,7 @@ namespace OTSPartA_STDEditor
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- MessageBox.Show(table["message3"].ToString(), table["message32"].ToString());
|
|
|
+ MessageBox.Show("The name of rulecannot be empty!", "Tip");
|
|
|
}
|
|
|
}
|
|
|
else
|
|
@@ -244,8 +244,8 @@ namespace OTSPartA_STDEditor
|
|
|
try
|
|
|
{
|
|
|
SaveFileDialog saveFile = new SaveFileDialog();
|
|
|
- saveFile.Title = table["message23"].ToString();
|
|
|
- saveFile.Filter = table["message36"].ToString();
|
|
|
+ saveFile.Title = "Please select the path which to save the file";
|
|
|
+ saveFile.Filter = "Database File(*.db)|*.db";
|
|
|
saveFile.OverwritePrompt = true; //是否覆盖当前文件
|
|
|
saveFile.RestoreDirectory = true; //还原上次目录
|
|
|
if (saveFile.ShowDialog() == DialogResult.OK)
|
|
@@ -254,7 +254,7 @@ namespace OTSPartA_STDEditor
|
|
|
bool result = SaveDictionaryToClassify(saveFile.FileName);
|
|
|
if (result)
|
|
|
{
|
|
|
- MessageBox.Show(table["message25"].ToString(), table["message32"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
+ MessageBox.Show("Export file successful!", "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
}
|
|
|
}
|
|
|
else
|
|
@@ -330,12 +330,12 @@ namespace OTSPartA_STDEditor
|
|
|
STDDictionaryInitial = Clone(STDDictionary) as Dictionary<int, STDdata>;
|
|
|
forWaiting.Close();
|
|
|
IsModified = false;
|
|
|
- MessageBox.Show(table["message1"].ToString(), table["message32"].ToString());
|
|
|
+ MessageBox.Show("Save successful!", "Tip");
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
forWaiting.Close();
|
|
|
- MessageBox.Show(table["message2"].ToString(), table["message32"].ToString());
|
|
|
+ MessageBox.Show("Save failed!", "Tip");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -363,12 +363,12 @@ namespace OTSPartA_STDEditor
|
|
|
STDDictionaryInitial = new Dictionary<int, STDdata>(STDDictionary);
|
|
|
forWaiting.Close();
|
|
|
IsModified = false;
|
|
|
- MessageBox.Show(table["message1"].ToString(), table["message32"].ToString());
|
|
|
+ MessageBox.Show("Save successful!", "Tip");
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
forWaiting.Close();
|
|
|
- MessageBox.Show(table["message2"].ToString(), table["message32"].ToString());
|
|
|
+ MessageBox.Show("Save failed!", "Tip");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -406,19 +406,19 @@ namespace OTSPartA_STDEditor
|
|
|
{
|
|
|
if (str_RemoveBlank.Contains(Symbol[i] + Symbol[j]))
|
|
|
{
|
|
|
- MessageBox.Show(table["message18"].ToString() + Symbol[i] + Symbol[j], table["message32"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
+ MessageBox.Show("Invalid string exists:" + Symbol[i] + Symbol[j], "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (str_RemoveBlank.Contains(Symbol[i] + ")") || str_RemoveBlank.Contains("(" + Symbol[i]))
|
|
|
{
|
|
|
- MessageBox.Show(table["message18"].ToString() + Symbol[i] + ")", table["message32"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
+ MessageBox.Show("Invalid string exists:" + Symbol[i] + ")", "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
return false;
|
|
|
}
|
|
|
if (str_RemoveBlank.Contains("(" + Symbol[i]))
|
|
|
{
|
|
|
- MessageBox.Show(table["message18"].ToString() + "(" + Symbol[i], table["message32"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
+ MessageBox.Show("Invalid string exists:" + "(" + Symbol[i], "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
@@ -433,13 +433,13 @@ namespace OTSPartA_STDEditor
|
|
|
}
|
|
|
if (BracketsNum != 0)
|
|
|
{
|
|
|
- MessageBox.Show(table["message19"].ToString(), table["message32"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
+ MessageBox.Show("Number of left and right parentheses does not match!", "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
return false;
|
|
|
}
|
|
|
//首字符检测
|
|
|
if ((str_RemoveBlank[0] == '+') || (str_RemoveBlank[0] == '-') || (str_RemoveBlank[0] == '*') || (str_RemoveBlank[0] == '/') || (str_RemoveBlank[0] == '>') || (str_RemoveBlank[0] == '<') || (str_RemoveBlank[0] == '=') || (str_RemoveBlank[0] == ')') || (str_RemoveBlank[str_RemoveBlank.Length - 1] == '('))
|
|
|
{
|
|
|
- MessageBox.Show(table["message20"].ToString(), table["message32"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
+ MessageBox.Show("First character is error!", "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
return false;
|
|
|
}
|
|
|
|
|
@@ -447,7 +447,7 @@ namespace OTSPartA_STDEditor
|
|
|
{
|
|
|
if ((str_RemoveBlank.Substring(0, 3) == "and") || (str_RemoveBlank.Substring(0, 3) == "end"))
|
|
|
{
|
|
|
- MessageBox.Show(table["message20"].ToString(), table["message32"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
+ MessageBox.Show("First character is error!", "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
@@ -519,13 +519,13 @@ namespace OTSPartA_STDEditor
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
- MessageBox.Show(table["message21"].ToString() + list_all[i], table["message32"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
+ MessageBox.Show("Please check whether the input rules are correct, error characters:" + list_all[i], "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
return false;
|
|
|
}
|
|
|
//检测是否有<>= true,false
|
|
|
if (!m_SubMidWindow.m_STDEditor.textbox_STDEditor.Text.ToString().Contains("<") && !m_SubMidWindow.m_STDEditor.textbox_STDEditor.Text.ToString().Contains(">") && !m_SubMidWindow.m_STDEditor.textbox_STDEditor.Text.ToString().Contains("=") && m_SubMidWindow.m_STDEditor.textbox_STDEditor.Text.ToString() != "true" && m_SubMidWindow.m_STDEditor.textbox_STDEditor.Text.ToString() != "false")
|
|
|
{
|
|
|
- MessageBox.Show(table["message22"].ToString(), table["message32"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
+ MessageBox.Show("Expressions have no effect!", "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
@@ -534,7 +534,7 @@ namespace OTSPartA_STDEditor
|
|
|
var XrayInfo = m_SubMidWindow.m_STDEditor.m_STDXrayList.Find(STDXray => STDXray.StdID == m_STDRuleslist.Grid_Minerals[m_STDRuleslist.PreRow, 0].Tag.ToString());
|
|
|
if (XrayInfo==null||XrayInfo.XrayData==null)
|
|
|
{
|
|
|
- MessageBox.Show(table["message38"].ToString(), table["message32"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
+ MessageBox.Show("Expressions and spectra cannot all be empty!", "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
@@ -578,7 +578,7 @@ namespace OTSPartA_STDEditor
|
|
|
{
|
|
|
Position pos = new Position(10, 1);
|
|
|
m_Attributes.Grid_Attributes.Selection.Focus(pos, true);
|
|
|
- MessageBox.Show(table["message4"].ToString(), table["message32"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
+ MessageBox.Show("This group name is not included, please fill in again!", "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
@@ -1246,7 +1246,7 @@ namespace OTSPartA_STDEditor
|
|
|
{
|
|
|
if (!EqualsBetweenDictionary(STDDictionaryInitial, STDDictionary) || IsModified)
|
|
|
{
|
|
|
- DialogResult dr = MessageBox.Show("是否保存当前修改", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
|
|
+ DialogResult dr = MessageBox.Show("Whether to save the current modification?", "Tip", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
|
|
if (dr == DialogResult.Yes)
|
|
|
{
|
|
|
if (m_STDRuleslist.Grid_Minerals.RowsCount > 1)
|
|
@@ -1276,7 +1276,7 @@ namespace OTSPartA_STDEditor
|
|
|
else
|
|
|
{
|
|
|
forWaiting.Close();
|
|
|
- MessageBox.Show(table["message2"].ToString(), table["message32"].ToString());
|
|
|
+ MessageBox.Show("Save failed!", "Tip");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1309,7 +1309,7 @@ namespace OTSPartA_STDEditor
|
|
|
}
|
|
|
catch
|
|
|
{
|
|
|
- MessageBox.Show(table["message6"].ToString(), table["message32"].ToString());
|
|
|
+ MessageBox.Show("The selected standard library is formatted incorrectly, please open the correct standard library!", "Tip");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1394,7 +1394,7 @@ namespace OTSPartA_STDEditor
|
|
|
openFileDialog.Filter = "(*.db)|*.db";
|
|
|
openFileDialog.RestoreDirectory = true;
|
|
|
openFileDialog.FilterIndex = 1;
|
|
|
- openFileDialog.Title = table["message33"].ToString();
|
|
|
+ openFileDialog.Title = "Please open a database!";
|
|
|
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
|
|
{
|
|
|
try
|
|
@@ -1404,7 +1404,7 @@ namespace OTSPartA_STDEditor
|
|
|
|
|
|
if(STDDictionary.Count==0)
|
|
|
{
|
|
|
- MessageBox.Show(table["message27"].ToString(), table["message32"].ToString());
|
|
|
+ MessageBox.Show(table["message27"].ToString(), "Tip");
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -1425,7 +1425,7 @@ namespace OTSPartA_STDEditor
|
|
|
}
|
|
|
if (!ret)
|
|
|
{
|
|
|
- MessageBox.Show(table["message34"].ToString(), table["message32"].ToString());
|
|
|
+ MessageBox.Show("No matching energy spectrum data was found", "Tip");
|
|
|
}
|
|
|
|
|
|
int color = Convert.ToInt32(m_SubMidWindow.m_STDEditor.ParseRGB(STDRuleslist.colorHx16toRGB(STDDictionary[int.Parse(STDId)].Color)).ToString());
|
|
@@ -1477,7 +1477,7 @@ namespace OTSPartA_STDEditor
|
|
|
{
|
|
|
if (!EqualsBetweenDictionary(STDDictionaryInitial, STDDictionary)|| IsModified)
|
|
|
{
|
|
|
- DialogResult dr = MessageBox.Show("是否保存当前修改", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
|
|
+ DialogResult dr = MessageBox.Show("Whether to save the current modification", "Tip", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
|
|
if (dr == DialogResult.Yes)
|
|
|
{
|
|
|
if (m_STDRuleslist.Grid_Minerals.RowsCount > 1)
|
|
@@ -1508,7 +1508,7 @@ namespace OTSPartA_STDEditor
|
|
|
else
|
|
|
{
|
|
|
forWaiting.Close();
|
|
|
- MessageBox.Show(table["message2"].ToString(), table["message32"].ToString());
|
|
|
+ MessageBox.Show("Save failed!", "Tip");
|
|
|
}
|
|
|
}
|
|
|
else
|
|
@@ -1531,7 +1531,7 @@ namespace OTSPartA_STDEditor
|
|
|
{
|
|
|
DataTable OreDatabasedt = new DataTable();
|
|
|
OpenFileDialog openFileDialog = new OpenFileDialog();
|
|
|
- openFileDialog.Title= table["message37"].ToString();
|
|
|
+ openFileDialog.Title= "Please select the database you want to convert";
|
|
|
openFileDialog.Filter = "(*.db)|*.db";
|
|
|
openFileDialog.RestoreDirectory = true;
|
|
|
openFileDialog.FilterIndex = 1;
|