|
@@ -437,16 +437,13 @@ namespace OTSPartA_STDEditor
|
|
|
m_dbConnection.Open();
|
|
|
|
|
|
System.Data.SQLite.SQLiteCommand cmm = m_dbConnection.CreateCommand();
|
|
|
- cmm.CommandText = "delete from ZeroElementRules";
|
|
|
|
|
|
- try
|
|
|
- {
|
|
|
- cmm.ExecuteNonQuery();
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
- {
|
|
|
- MessageBox.Show(ex.ToString());
|
|
|
- }
|
|
|
+ cmm.CommandText = "drop table ZeroElementRules";
|
|
|
+ cmm.ExecuteNonQuery();
|
|
|
+
|
|
|
+ cmm.CommandText = "CREATE TABLE ZeroElementRules (ZeroElement TEXT,UsingElementList TEXT, UsingImgPropertyList TEXT,UsingOtherPropertyList TEXT,Expression TEXT)";
|
|
|
+ cmm.ExecuteNonQuery();
|
|
|
+
|
|
|
System.Data.SQLite.SQLiteDataAdapter m_dataAdapter = new System.Data.SQLite.SQLiteDataAdapter("select * from ZeroElementRules", m_dbConnection);
|
|
|
System.Data.SQLite.SQLiteCommandBuilder qLiteCommandBuilder = new System.Data.SQLite.SQLiteCommandBuilder(m_dataAdapter);
|
|
|
|
|
@@ -454,8 +451,6 @@ namespace OTSPartA_STDEditor
|
|
|
m_dataAdapter.Fill(ds, "ZeroElementRules");
|
|
|
DataTable dt = ds.Tables["ZeroElementRules"];
|
|
|
|
|
|
- dt.Clear();
|
|
|
-
|
|
|
for (int num = 0; num < XmlTree_ZeroElementRules.Nodes.Count; num++)
|
|
|
{
|
|
|
string UsingElementList = "";
|
|
@@ -466,13 +461,6 @@ namespace OTSPartA_STDEditor
|
|
|
List<string> UsingOtherPropertyL = new List<string>();
|
|
|
|
|
|
string str_RemoveBlank = "";
|
|
|
- //forth_elem干扰or分隔符,故先行去掉
|
|
|
- //if (XmlTree_ZeroElementRules.Nodes[num].Tag.ToString().Contains("fourth_elem"))
|
|
|
- //{
|
|
|
- // str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
|
|
|
- // UsingOtherPropertyList = "fourth_elem,";
|
|
|
- //}
|
|
|
-
|
|
|
str_RemoveBlank = XmlTree_ZeroElementRules.Nodes[num].Tag.ToString().Replace(" ", "");
|
|
|
string[] str_Removeand = System.Text.RegularExpressions.Regex.Split(str_RemoveBlank, "and", System.Text.RegularExpressions.RegexOptions.None);
|
|
|
List<string> str_Removeandor = new List<string>();
|