diff --git a/Cyberpipe.suo b/Cyberpipe.suo index dfd18d2..1787b1e 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/Cyberpipe.suo b/Cyberpipe.suo index dfd18d2..1787b1e 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmBSQStatis.cs b/FrmBSQStatis.cs index 4b25eda..a409022 100644 --- a/FrmBSQStatis.cs +++ b/FrmBSQStatis.cs @@ -20,92 +20,93 @@ { public Dictionary bsq = new Dictionary(); //SqlConnection conn; - public static List typeLists; + //public static List typeLists; OracleConnection conn; string connectString; public FrmBSQStatis() { InitializeComponent(); - BSQNumStatis(); + bsq = getBSQNameAndNumMap(null); + //BSQNumStatis(); } string[] codeStr = new string[50]; string[] nameStr = new string[30]; public static List pipeLists = new List(); - private void BSQNumStatis() - { - bool flag2 = false; - for (int i = 0; i < Utility.listPipelineType.Count; i++) - { + //private void BSQNumStatis() + //{ + // bool flag2 = false; + // for (int i = 0; i < Utility.listPipelineType.Count; i++) + // { - for (int j = 0; j < pipeLists.Count; j++) - { - if (pipeLists[j] == Utility.listPipelineType[i].type) - { - flag2 = true; - break; - } - } - if (!flag2 && Utility.listPipelineType[i].type != "标识器") - { - pipeLists.Add(Utility.listPipelineType[i].type); - } - flag2 = false; - } + // for (int j = 0; j < pipeLists.Count; j++) + // { + // if (pipeLists[j] == Utility.listPipelineType[i].type) + // { + // flag2 = true; + // break; + // } + // } + // if (!flag2 && Utility.listPipelineType[i].type != "标识器") + // { + // pipeLists.Add(Utility.listPipelineType[i].type); + // } + // flag2 = false; + // } - typeLists = new List(); - for (int num = 0; num (); + // for (int num = 0; num 0) - bsq.Add(typeLists[i].type, typeLists[i].num); - } + // while (dr.Read()) + // { + // string str =Convert.ToString(dr["对象名称"]); + // codeStr = str.Split(','); + // for(int n=0;n 0) + // bsq.Add(typeLists[i].type, typeLists[i].num); + // } - } - catch (Exception ex) - { + // } + // catch (Exception ex) + // { - } - } + // } + //} private void FrmBSQStatis_Load(object sender, EventArgs e) { @@ -136,16 +137,61 @@ } } - public class typeList - { - public int num; - public string type; + //public class typeList + //{ + // public int num; + // public string type; - public typeList(int _num, string _type) + // public typeList(int _num, string _type) + // { + // num = _num; + // type = _type; + // } + //} + + + private Dictionary getBSQNameAndNumMap(GSOGeoPolygon3D polygon) + { + + Dictionary result = new Dictionary(); + Dictionary codeAndType = new Dictionary(); + //得到type的种类 + for (int i = 0; i < Utility.listPipelineType.Count; i++) { - num = _num; - type = _type; + if (!result.ContainsKey(Utility.listPipelineType[i].type) && Utility.listPipelineType[i].type != "标识器") + { + result.Add(Utility.listPipelineType[i].type, 0); + codeAndType.Add(Utility.listPipelineType[i].code, Utility.listPipelineType[i].type); + } + } + + try + { + conn = OledbHelper.sqlConnection(); + conn.Open(); + OracleCommand cmd; + cmd = new OracleCommand("select 对象类型 from 标识器", conn); + OracleDataReader dr = cmd.ExecuteReader(); + + while (dr.Read()) + { + string str = Convert.ToString(dr["对象类型"]); + if (str == null) continue; + foreach (string key in codeAndType.Keys) + { + if (str.Contains(key)) { + result[codeAndType[key]] += 1; + } + } + } + conn.Close(); + } + catch (Exception ex) + { + + } + return result; } } diff --git a/Cyberpipe.suo b/Cyberpipe.suo index dfd18d2..1787b1e 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmBSQStatis.cs b/FrmBSQStatis.cs index 4b25eda..a409022 100644 --- a/FrmBSQStatis.cs +++ b/FrmBSQStatis.cs @@ -20,92 +20,93 @@ { public Dictionary bsq = new Dictionary(); //SqlConnection conn; - public static List typeLists; + //public static List typeLists; OracleConnection conn; string connectString; public FrmBSQStatis() { InitializeComponent(); - BSQNumStatis(); + bsq = getBSQNameAndNumMap(null); + //BSQNumStatis(); } string[] codeStr = new string[50]; string[] nameStr = new string[30]; public static List pipeLists = new List(); - private void BSQNumStatis() - { - bool flag2 = false; - for (int i = 0; i < Utility.listPipelineType.Count; i++) - { + //private void BSQNumStatis() + //{ + // bool flag2 = false; + // for (int i = 0; i < Utility.listPipelineType.Count; i++) + // { - for (int j = 0; j < pipeLists.Count; j++) - { - if (pipeLists[j] == Utility.listPipelineType[i].type) - { - flag2 = true; - break; - } - } - if (!flag2 && Utility.listPipelineType[i].type != "标识器") - { - pipeLists.Add(Utility.listPipelineType[i].type); - } - flag2 = false; - } + // for (int j = 0; j < pipeLists.Count; j++) + // { + // if (pipeLists[j] == Utility.listPipelineType[i].type) + // { + // flag2 = true; + // break; + // } + // } + // if (!flag2 && Utility.listPipelineType[i].type != "标识器") + // { + // pipeLists.Add(Utility.listPipelineType[i].type); + // } + // flag2 = false; + // } - typeLists = new List(); - for (int num = 0; num (); + // for (int num = 0; num 0) - bsq.Add(typeLists[i].type, typeLists[i].num); - } + // while (dr.Read()) + // { + // string str =Convert.ToString(dr["对象名称"]); + // codeStr = str.Split(','); + // for(int n=0;n 0) + // bsq.Add(typeLists[i].type, typeLists[i].num); + // } - } - catch (Exception ex) - { + // } + // catch (Exception ex) + // { - } - } + // } + //} private void FrmBSQStatis_Load(object sender, EventArgs e) { @@ -136,16 +137,61 @@ } } - public class typeList - { - public int num; - public string type; + //public class typeList + //{ + // public int num; + // public string type; - public typeList(int _num, string _type) + // public typeList(int _num, string _type) + // { + // num = _num; + // type = _type; + // } + //} + + + private Dictionary getBSQNameAndNumMap(GSOGeoPolygon3D polygon) + { + + Dictionary result = new Dictionary(); + Dictionary codeAndType = new Dictionary(); + //得到type的种类 + for (int i = 0; i < Utility.listPipelineType.Count; i++) { - num = _num; - type = _type; + if (!result.ContainsKey(Utility.listPipelineType[i].type) && Utility.listPipelineType[i].type != "标识器") + { + result.Add(Utility.listPipelineType[i].type, 0); + codeAndType.Add(Utility.listPipelineType[i].code, Utility.listPipelineType[i].type); + } + } + + try + { + conn = OledbHelper.sqlConnection(); + conn.Open(); + OracleCommand cmd; + cmd = new OracleCommand("select 对象类型 from 标识器", conn); + OracleDataReader dr = cmd.ExecuteReader(); + + while (dr.Read()) + { + string str = Convert.ToString(dr["对象类型"]); + if (str == null) continue; + foreach (string key in codeAndType.Keys) + { + if (str.Contains(key)) { + result[codeAndType[key]] += 1; + } + } + } + conn.Close(); + } + catch (Exception ex) + { + + } + return result; } } diff --git a/bin/x86/Debug/Cyberpipe.exe b/bin/x86/Debug/Cyberpipe.exe index 19fa9e4..f720b92 100644 --- a/bin/x86/Debug/Cyberpipe.exe +++ b/bin/x86/Debug/Cyberpipe.exe Binary files differ diff --git a/Cyberpipe.suo b/Cyberpipe.suo index dfd18d2..1787b1e 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmBSQStatis.cs b/FrmBSQStatis.cs index 4b25eda..a409022 100644 --- a/FrmBSQStatis.cs +++ b/FrmBSQStatis.cs @@ -20,92 +20,93 @@ { public Dictionary bsq = new Dictionary(); //SqlConnection conn; - public static List typeLists; + //public static List typeLists; OracleConnection conn; string connectString; public FrmBSQStatis() { InitializeComponent(); - BSQNumStatis(); + bsq = getBSQNameAndNumMap(null); + //BSQNumStatis(); } string[] codeStr = new string[50]; string[] nameStr = new string[30]; public static List pipeLists = new List(); - private void BSQNumStatis() - { - bool flag2 = false; - for (int i = 0; i < Utility.listPipelineType.Count; i++) - { + //private void BSQNumStatis() + //{ + // bool flag2 = false; + // for (int i = 0; i < Utility.listPipelineType.Count; i++) + // { - for (int j = 0; j < pipeLists.Count; j++) - { - if (pipeLists[j] == Utility.listPipelineType[i].type) - { - flag2 = true; - break; - } - } - if (!flag2 && Utility.listPipelineType[i].type != "标识器") - { - pipeLists.Add(Utility.listPipelineType[i].type); - } - flag2 = false; - } + // for (int j = 0; j < pipeLists.Count; j++) + // { + // if (pipeLists[j] == Utility.listPipelineType[i].type) + // { + // flag2 = true; + // break; + // } + // } + // if (!flag2 && Utility.listPipelineType[i].type != "标识器") + // { + // pipeLists.Add(Utility.listPipelineType[i].type); + // } + // flag2 = false; + // } - typeLists = new List(); - for (int num = 0; num (); + // for (int num = 0; num 0) - bsq.Add(typeLists[i].type, typeLists[i].num); - } + // while (dr.Read()) + // { + // string str =Convert.ToString(dr["对象名称"]); + // codeStr = str.Split(','); + // for(int n=0;n 0) + // bsq.Add(typeLists[i].type, typeLists[i].num); + // } - } - catch (Exception ex) - { + // } + // catch (Exception ex) + // { - } - } + // } + //} private void FrmBSQStatis_Load(object sender, EventArgs e) { @@ -136,16 +137,61 @@ } } - public class typeList - { - public int num; - public string type; + //public class typeList + //{ + // public int num; + // public string type; - public typeList(int _num, string _type) + // public typeList(int _num, string _type) + // { + // num = _num; + // type = _type; + // } + //} + + + private Dictionary getBSQNameAndNumMap(GSOGeoPolygon3D polygon) + { + + Dictionary result = new Dictionary(); + Dictionary codeAndType = new Dictionary(); + //得到type的种类 + for (int i = 0; i < Utility.listPipelineType.Count; i++) { - num = _num; - type = _type; + if (!result.ContainsKey(Utility.listPipelineType[i].type) && Utility.listPipelineType[i].type != "标识器") + { + result.Add(Utility.listPipelineType[i].type, 0); + codeAndType.Add(Utility.listPipelineType[i].code, Utility.listPipelineType[i].type); + } + } + + try + { + conn = OledbHelper.sqlConnection(); + conn.Open(); + OracleCommand cmd; + cmd = new OracleCommand("select 对象类型 from 标识器", conn); + OracleDataReader dr = cmd.ExecuteReader(); + + while (dr.Read()) + { + string str = Convert.ToString(dr["对象类型"]); + if (str == null) continue; + foreach (string key in codeAndType.Keys) + { + if (str.Contains(key)) { + result[codeAndType[key]] += 1; + } + } + } + conn.Close(); + } + catch (Exception ex) + { + + } + return result; } } diff --git a/bin/x86/Debug/Cyberpipe.exe b/bin/x86/Debug/Cyberpipe.exe index 19fa9e4..f720b92 100644 --- a/bin/x86/Debug/Cyberpipe.exe +++ b/bin/x86/Debug/Cyberpipe.exe Binary files differ diff --git a/bin/x86/Debug/Cyberpipe.pdb b/bin/x86/Debug/Cyberpipe.pdb index ce95ccc..4513dbd 100644 --- a/bin/x86/Debug/Cyberpipe.pdb +++ b/bin/x86/Debug/Cyberpipe.pdb Binary files differ diff --git a/Cyberpipe.suo b/Cyberpipe.suo index dfd18d2..1787b1e 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmBSQStatis.cs b/FrmBSQStatis.cs index 4b25eda..a409022 100644 --- a/FrmBSQStatis.cs +++ b/FrmBSQStatis.cs @@ -20,92 +20,93 @@ { public Dictionary bsq = new Dictionary(); //SqlConnection conn; - public static List typeLists; + //public static List typeLists; OracleConnection conn; string connectString; public FrmBSQStatis() { InitializeComponent(); - BSQNumStatis(); + bsq = getBSQNameAndNumMap(null); + //BSQNumStatis(); } string[] codeStr = new string[50]; string[] nameStr = new string[30]; public static List pipeLists = new List(); - private void BSQNumStatis() - { - bool flag2 = false; - for (int i = 0; i < Utility.listPipelineType.Count; i++) - { + //private void BSQNumStatis() + //{ + // bool flag2 = false; + // for (int i = 0; i < Utility.listPipelineType.Count; i++) + // { - for (int j = 0; j < pipeLists.Count; j++) - { - if (pipeLists[j] == Utility.listPipelineType[i].type) - { - flag2 = true; - break; - } - } - if (!flag2 && Utility.listPipelineType[i].type != "标识器") - { - pipeLists.Add(Utility.listPipelineType[i].type); - } - flag2 = false; - } + // for (int j = 0; j < pipeLists.Count; j++) + // { + // if (pipeLists[j] == Utility.listPipelineType[i].type) + // { + // flag2 = true; + // break; + // } + // } + // if (!flag2 && Utility.listPipelineType[i].type != "标识器") + // { + // pipeLists.Add(Utility.listPipelineType[i].type); + // } + // flag2 = false; + // } - typeLists = new List(); - for (int num = 0; num (); + // for (int num = 0; num 0) - bsq.Add(typeLists[i].type, typeLists[i].num); - } + // while (dr.Read()) + // { + // string str =Convert.ToString(dr["对象名称"]); + // codeStr = str.Split(','); + // for(int n=0;n 0) + // bsq.Add(typeLists[i].type, typeLists[i].num); + // } - } - catch (Exception ex) - { + // } + // catch (Exception ex) + // { - } - } + // } + //} private void FrmBSQStatis_Load(object sender, EventArgs e) { @@ -136,16 +137,61 @@ } } - public class typeList - { - public int num; - public string type; + //public class typeList + //{ + // public int num; + // public string type; - public typeList(int _num, string _type) + // public typeList(int _num, string _type) + // { + // num = _num; + // type = _type; + // } + //} + + + private Dictionary getBSQNameAndNumMap(GSOGeoPolygon3D polygon) + { + + Dictionary result = new Dictionary(); + Dictionary codeAndType = new Dictionary(); + //得到type的种类 + for (int i = 0; i < Utility.listPipelineType.Count; i++) { - num = _num; - type = _type; + if (!result.ContainsKey(Utility.listPipelineType[i].type) && Utility.listPipelineType[i].type != "标识器") + { + result.Add(Utility.listPipelineType[i].type, 0); + codeAndType.Add(Utility.listPipelineType[i].code, Utility.listPipelineType[i].type); + } + } + + try + { + conn = OledbHelper.sqlConnection(); + conn.Open(); + OracleCommand cmd; + cmd = new OracleCommand("select 对象类型 from 标识器", conn); + OracleDataReader dr = cmd.ExecuteReader(); + + while (dr.Read()) + { + string str = Convert.ToString(dr["对象类型"]); + if (str == null) continue; + foreach (string key in codeAndType.Keys) + { + if (str.Contains(key)) { + result[codeAndType[key]] += 1; + } + } + } + conn.Close(); + } + catch (Exception ex) + { + + } + return result; } } diff --git a/bin/x86/Debug/Cyberpipe.exe b/bin/x86/Debug/Cyberpipe.exe index 19fa9e4..f720b92 100644 --- a/bin/x86/Debug/Cyberpipe.exe +++ b/bin/x86/Debug/Cyberpipe.exe Binary files differ diff --git a/bin/x86/Debug/Cyberpipe.pdb b/bin/x86/Debug/Cyberpipe.pdb index ce95ccc..4513dbd 100644 --- a/bin/x86/Debug/Cyberpipe.pdb +++ b/bin/x86/Debug/Cyberpipe.pdb Binary files differ diff --git a/bin/x86/Debug/glVersion.txt b/bin/x86/Debug/glVersion.txt index 06a7613..1fc46d0 100644 --- a/bin/x86/Debug/glVersion.txt +++ b/bin/x86/Debug/glVersion.txt Binary files differ