diff --git a/Cyberpipe.suo b/Cyberpipe.suo index cc8242f..7b935a0 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/Cyberpipe.suo b/Cyberpipe.suo index cc8242f..7b935a0 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EditTask.cs b/EMS_Forms/Form_EditTask.cs index 72d3e8e..30a9765 100644 --- a/EMS_Forms/Form_EditTask.cs +++ b/EMS_Forms/Form_EditTask.cs @@ -23,7 +23,6 @@ public static List checkLists = new List(); OracleConnection conn = null; - List BSQFeatures = new List(); public static List roadList = new List(); @@ -193,10 +192,8 @@ private void Form_EditTask_FormClosing(object sender, FormClosingEventArgs e) { - for (int i = 0; i < BSQFeatures.Count; i++) - { - BSQFeatures[i].Label = null; - } + + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); globeControl1.TrackPolygonEndEvent -= new TrackPolygonEndEventHandler(TrackPolygonEndEvent); } @@ -340,6 +337,7 @@ //f.Geometry = model; //GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + GSOLabel label = new GSOLabel(); label.Text = "标识器位置"; @@ -351,8 +349,14 @@ label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); features[0].Label = label; - BSQFeatures.Add(features[0]); - globeControl1.Globe.JumpToFeature(features[0], 10); + GSOFeature f = new GSOFeature(); + f.Geometry = features[0].Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + + globeControl1.Globe.JumpToFeature(newFeature, 10); } else diff --git a/Cyberpipe.suo b/Cyberpipe.suo index cc8242f..7b935a0 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EditTask.cs b/EMS_Forms/Form_EditTask.cs index 72d3e8e..30a9765 100644 --- a/EMS_Forms/Form_EditTask.cs +++ b/EMS_Forms/Form_EditTask.cs @@ -23,7 +23,6 @@ public static List checkLists = new List(); OracleConnection conn = null; - List BSQFeatures = new List(); public static List roadList = new List(); @@ -193,10 +192,8 @@ private void Form_EditTask_FormClosing(object sender, FormClosingEventArgs e) { - for (int i = 0; i < BSQFeatures.Count; i++) - { - BSQFeatures[i].Label = null; - } + + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); globeControl1.TrackPolygonEndEvent -= new TrackPolygonEndEventHandler(TrackPolygonEndEvent); } @@ -340,6 +337,7 @@ //f.Geometry = model; //GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + GSOLabel label = new GSOLabel(); label.Text = "标识器位置"; @@ -351,8 +349,14 @@ label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); features[0].Label = label; - BSQFeatures.Add(features[0]); - globeControl1.Globe.JumpToFeature(features[0], 10); + GSOFeature f = new GSOFeature(); + f.Geometry = features[0].Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + + globeControl1.Globe.JumpToFeature(newFeature, 10); } else diff --git a/FrmFlagEdits.cs b/FrmFlagEdits.cs index ff25a41..04a9f90 100644 --- a/FrmFlagEdits.cs +++ b/FrmFlagEdits.cs @@ -17,6 +17,9 @@ InitializeComponent(); } string id = ""; + public delegate void Handle(); + public event Handle refresh; + public FrmFlagEdits(string id, string flagid, string flagno, string flagtype, string deep, string street,string gc) { @@ -52,9 +55,10 @@ "t.所属道路 = '" + txt_street.Text.Trim() + "'" + "where t.LSSYS_ID =" + id; OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql); - if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.YesNo, MessageBoxIcon.Question)==DialogResult.Yes) + if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Question)==DialogResult.OK) { this.Close(); + refresh(); } } catch (Exception ex) diff --git a/Cyberpipe.suo b/Cyberpipe.suo index cc8242f..7b935a0 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EditTask.cs b/EMS_Forms/Form_EditTask.cs index 72d3e8e..30a9765 100644 --- a/EMS_Forms/Form_EditTask.cs +++ b/EMS_Forms/Form_EditTask.cs @@ -23,7 +23,6 @@ public static List checkLists = new List(); OracleConnection conn = null; - List BSQFeatures = new List(); public static List roadList = new List(); @@ -193,10 +192,8 @@ private void Form_EditTask_FormClosing(object sender, FormClosingEventArgs e) { - for (int i = 0; i < BSQFeatures.Count; i++) - { - BSQFeatures[i].Label = null; - } + + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); globeControl1.TrackPolygonEndEvent -= new TrackPolygonEndEventHandler(TrackPolygonEndEvent); } @@ -340,6 +337,7 @@ //f.Geometry = model; //GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + GSOLabel label = new GSOLabel(); label.Text = "标识器位置"; @@ -351,8 +349,14 @@ label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); features[0].Label = label; - BSQFeatures.Add(features[0]); - globeControl1.Globe.JumpToFeature(features[0], 10); + GSOFeature f = new GSOFeature(); + f.Geometry = features[0].Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + + globeControl1.Globe.JumpToFeature(newFeature, 10); } else diff --git a/FrmFlagEdits.cs b/FrmFlagEdits.cs index ff25a41..04a9f90 100644 --- a/FrmFlagEdits.cs +++ b/FrmFlagEdits.cs @@ -17,6 +17,9 @@ InitializeComponent(); } string id = ""; + public delegate void Handle(); + public event Handle refresh; + public FrmFlagEdits(string id, string flagid, string flagno, string flagtype, string deep, string street,string gc) { @@ -52,9 +55,10 @@ "t.所属道路 = '" + txt_street.Text.Trim() + "'" + "where t.LSSYS_ID =" + id; OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql); - if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.YesNo, MessageBoxIcon.Question)==DialogResult.Yes) + if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Question)==DialogResult.OK) { this.Close(); + refresh(); } } catch (Exception ex) diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 9bf9734..8d89f55 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -27,7 +27,6 @@ int rows = 0; public static GeoScene.Engine.GSODataSource ds = null; TreeNode layerManagerNode = null; - List Features = new List(); public FrmFlagManagers(GSOGlobeControl _globeControl1) { @@ -139,6 +138,7 @@ string street = row.Cells["所属道路"].Value.ToString(); FrmFlagEdits frm = new FrmFlagEdits(id, flagid, flagno,flagtype, deep, street,gc); + frm.refresh += new FrmFlagEdits.Handle(LoadData);//改变值的事件 frm.ShowDialog(); winGridViewPager1.Refresh(); } @@ -149,66 +149,7 @@ } } - /// - /// 对象查看 - /// - /// - /// - private void winGridViewPager1_OnAddNew(object sender, EventArgs e) - { - DataGridView grid = sender as DataGridView; - if (grid != null) - { - DataGridViewRow row = grid.SelectedRows[0]; - try - { - this.WindowState = FormWindowState.Minimized; - string id = row.Cells["LSSYS_ID"].Value.ToString(); - string flagno = row.Cells["编号"].Value.ToString(); - string flagstreet = row.Cells["所属道路"].Value.ToString(); - double x = Convert.ToDouble(row.Cells["X坐标"].Value); - double y = Convert.ToDouble(row.Cells["Y坐标"].Value); - GSOFeature flagFeature = globeControl1.Globe.Layers.GetLayerByCaption("标识器").GetFeatureByID(int.Parse(id)); - string type = ""; - string pipe = ""; - string sql = "select t.标识器型号,t.对象编号 from 标识器 t where t.编号='" + flagno + "'"; - using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) - { - while (reader.Read()) - { - type = reader.GetString(0); - pipe = reader.GetString(1); - } - } - - GSOLabel label = new GSOLabel(); - label.Text = "标识器编号:" + flagno + "\r\n" + - "标识器类型:" + type + "\r\n" + - //"标识对象编号:" + pipe + "\r\n" + - "所属道路:" + flagstreet; - label.Style = new GSOLabelStyle(); - label.Style.TextStyle.FontSize = 18; - label.Style.TextStyle.ForeColor = Color.FromArgb(0, 0, 0, 255); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 10; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); - this.globeControl1.Refresh(); - - } - catch (Exception ex) - { - MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - - } - } /// /// 标识器报废 /// @@ -363,13 +304,9 @@ //Thread downloadJob = new Thread(new ParameterizedThreadStart(doSave)); //downloadJob.IsBackground = true; //downloadJob.Start(e); - globeControl1.Globe.Layers["标识器"].Save(); + //globeControl1.Globe.Layers["标识器"].Save(); globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - foreach (GSOFeature f in Features) - { - f.Label = null; - } - Features.RemoveRange(0, Features.Count); + globeControl1.Refresh(); } @@ -525,6 +462,7 @@ } } + GSOLabel label = new GSOLabel(); label.Text = "标识器编号:" + flagno + "\r\n" + "标识器类型:" + type + "\r\n" + @@ -539,9 +477,13 @@ label.Style.TextStyle.FontName = "黑体"; label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); + GSOFeature f = new GSOFeature(); + f.Geometry = flagFeature.Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize=-1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + globeControl1.Globe.JumpToFeature(newFeature, 20); this.globeControl1.Refresh(); } diff --git a/Cyberpipe.suo b/Cyberpipe.suo index cc8242f..7b935a0 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EditTask.cs b/EMS_Forms/Form_EditTask.cs index 72d3e8e..30a9765 100644 --- a/EMS_Forms/Form_EditTask.cs +++ b/EMS_Forms/Form_EditTask.cs @@ -23,7 +23,6 @@ public static List checkLists = new List(); OracleConnection conn = null; - List BSQFeatures = new List(); public static List roadList = new List(); @@ -193,10 +192,8 @@ private void Form_EditTask_FormClosing(object sender, FormClosingEventArgs e) { - for (int i = 0; i < BSQFeatures.Count; i++) - { - BSQFeatures[i].Label = null; - } + + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); globeControl1.TrackPolygonEndEvent -= new TrackPolygonEndEventHandler(TrackPolygonEndEvent); } @@ -340,6 +337,7 @@ //f.Geometry = model; //GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + GSOLabel label = new GSOLabel(); label.Text = "标识器位置"; @@ -351,8 +349,14 @@ label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); features[0].Label = label; - BSQFeatures.Add(features[0]); - globeControl1.Globe.JumpToFeature(features[0], 10); + GSOFeature f = new GSOFeature(); + f.Geometry = features[0].Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + + globeControl1.Globe.JumpToFeature(newFeature, 10); } else diff --git a/FrmFlagEdits.cs b/FrmFlagEdits.cs index ff25a41..04a9f90 100644 --- a/FrmFlagEdits.cs +++ b/FrmFlagEdits.cs @@ -17,6 +17,9 @@ InitializeComponent(); } string id = ""; + public delegate void Handle(); + public event Handle refresh; + public FrmFlagEdits(string id, string flagid, string flagno, string flagtype, string deep, string street,string gc) { @@ -52,9 +55,10 @@ "t.所属道路 = '" + txt_street.Text.Trim() + "'" + "where t.LSSYS_ID =" + id; OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql); - if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.YesNo, MessageBoxIcon.Question)==DialogResult.Yes) + if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Question)==DialogResult.OK) { this.Close(); + refresh(); } } catch (Exception ex) diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 9bf9734..8d89f55 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -27,7 +27,6 @@ int rows = 0; public static GeoScene.Engine.GSODataSource ds = null; TreeNode layerManagerNode = null; - List Features = new List(); public FrmFlagManagers(GSOGlobeControl _globeControl1) { @@ -139,6 +138,7 @@ string street = row.Cells["所属道路"].Value.ToString(); FrmFlagEdits frm = new FrmFlagEdits(id, flagid, flagno,flagtype, deep, street,gc); + frm.refresh += new FrmFlagEdits.Handle(LoadData);//改变值的事件 frm.ShowDialog(); winGridViewPager1.Refresh(); } @@ -149,66 +149,7 @@ } } - /// - /// 对象查看 - /// - /// - /// - private void winGridViewPager1_OnAddNew(object sender, EventArgs e) - { - DataGridView grid = sender as DataGridView; - if (grid != null) - { - DataGridViewRow row = grid.SelectedRows[0]; - try - { - this.WindowState = FormWindowState.Minimized; - string id = row.Cells["LSSYS_ID"].Value.ToString(); - string flagno = row.Cells["编号"].Value.ToString(); - string flagstreet = row.Cells["所属道路"].Value.ToString(); - double x = Convert.ToDouble(row.Cells["X坐标"].Value); - double y = Convert.ToDouble(row.Cells["Y坐标"].Value); - GSOFeature flagFeature = globeControl1.Globe.Layers.GetLayerByCaption("标识器").GetFeatureByID(int.Parse(id)); - string type = ""; - string pipe = ""; - string sql = "select t.标识器型号,t.对象编号 from 标识器 t where t.编号='" + flagno + "'"; - using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) - { - while (reader.Read()) - { - type = reader.GetString(0); - pipe = reader.GetString(1); - } - } - - GSOLabel label = new GSOLabel(); - label.Text = "标识器编号:" + flagno + "\r\n" + - "标识器类型:" + type + "\r\n" + - //"标识对象编号:" + pipe + "\r\n" + - "所属道路:" + flagstreet; - label.Style = new GSOLabelStyle(); - label.Style.TextStyle.FontSize = 18; - label.Style.TextStyle.ForeColor = Color.FromArgb(0, 0, 0, 255); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 10; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); - this.globeControl1.Refresh(); - - } - catch (Exception ex) - { - MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - - } - } /// /// 标识器报废 /// @@ -363,13 +304,9 @@ //Thread downloadJob = new Thread(new ParameterizedThreadStart(doSave)); //downloadJob.IsBackground = true; //downloadJob.Start(e); - globeControl1.Globe.Layers["标识器"].Save(); + //globeControl1.Globe.Layers["标识器"].Save(); globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - foreach (GSOFeature f in Features) - { - f.Label = null; - } - Features.RemoveRange(0, Features.Count); + globeControl1.Refresh(); } @@ -525,6 +462,7 @@ } } + GSOLabel label = new GSOLabel(); label.Text = "标识器编号:" + flagno + "\r\n" + "标识器类型:" + type + "\r\n" + @@ -539,9 +477,13 @@ label.Style.TextStyle.FontName = "黑体"; label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); + GSOFeature f = new GSOFeature(); + f.Geometry = flagFeature.Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize=-1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + globeControl1.Globe.JumpToFeature(newFeature, 20); this.globeControl1.Refresh(); } diff --git a/FrmPatrolerEdit.Designer.cs b/FrmPatrolerEdit.Designer.cs index c551efc..34ee75b 100644 --- a/FrmPatrolerEdit.Designer.cs +++ b/FrmPatrolerEdit.Designer.cs @@ -132,6 +132,7 @@ this.txt_phone.Name = "txt_phone"; this.txt_phone.Size = new System.Drawing.Size(172, 21); this.txt_phone.TabIndex = 15; + this.txt_phone.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_phone_KeyPress); // // combo_sex // diff --git a/Cyberpipe.suo b/Cyberpipe.suo index cc8242f..7b935a0 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EditTask.cs b/EMS_Forms/Form_EditTask.cs index 72d3e8e..30a9765 100644 --- a/EMS_Forms/Form_EditTask.cs +++ b/EMS_Forms/Form_EditTask.cs @@ -23,7 +23,6 @@ public static List checkLists = new List(); OracleConnection conn = null; - List BSQFeatures = new List(); public static List roadList = new List(); @@ -193,10 +192,8 @@ private void Form_EditTask_FormClosing(object sender, FormClosingEventArgs e) { - for (int i = 0; i < BSQFeatures.Count; i++) - { - BSQFeatures[i].Label = null; - } + + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); globeControl1.TrackPolygonEndEvent -= new TrackPolygonEndEventHandler(TrackPolygonEndEvent); } @@ -340,6 +337,7 @@ //f.Geometry = model; //GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + GSOLabel label = new GSOLabel(); label.Text = "标识器位置"; @@ -351,8 +349,14 @@ label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); features[0].Label = label; - BSQFeatures.Add(features[0]); - globeControl1.Globe.JumpToFeature(features[0], 10); + GSOFeature f = new GSOFeature(); + f.Geometry = features[0].Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + + globeControl1.Globe.JumpToFeature(newFeature, 10); } else diff --git a/FrmFlagEdits.cs b/FrmFlagEdits.cs index ff25a41..04a9f90 100644 --- a/FrmFlagEdits.cs +++ b/FrmFlagEdits.cs @@ -17,6 +17,9 @@ InitializeComponent(); } string id = ""; + public delegate void Handle(); + public event Handle refresh; + public FrmFlagEdits(string id, string flagid, string flagno, string flagtype, string deep, string street,string gc) { @@ -52,9 +55,10 @@ "t.所属道路 = '" + txt_street.Text.Trim() + "'" + "where t.LSSYS_ID =" + id; OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql); - if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.YesNo, MessageBoxIcon.Question)==DialogResult.Yes) + if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Question)==DialogResult.OK) { this.Close(); + refresh(); } } catch (Exception ex) diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 9bf9734..8d89f55 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -27,7 +27,6 @@ int rows = 0; public static GeoScene.Engine.GSODataSource ds = null; TreeNode layerManagerNode = null; - List Features = new List(); public FrmFlagManagers(GSOGlobeControl _globeControl1) { @@ -139,6 +138,7 @@ string street = row.Cells["所属道路"].Value.ToString(); FrmFlagEdits frm = new FrmFlagEdits(id, flagid, flagno,flagtype, deep, street,gc); + frm.refresh += new FrmFlagEdits.Handle(LoadData);//改变值的事件 frm.ShowDialog(); winGridViewPager1.Refresh(); } @@ -149,66 +149,7 @@ } } - /// - /// 对象查看 - /// - /// - /// - private void winGridViewPager1_OnAddNew(object sender, EventArgs e) - { - DataGridView grid = sender as DataGridView; - if (grid != null) - { - DataGridViewRow row = grid.SelectedRows[0]; - try - { - this.WindowState = FormWindowState.Minimized; - string id = row.Cells["LSSYS_ID"].Value.ToString(); - string flagno = row.Cells["编号"].Value.ToString(); - string flagstreet = row.Cells["所属道路"].Value.ToString(); - double x = Convert.ToDouble(row.Cells["X坐标"].Value); - double y = Convert.ToDouble(row.Cells["Y坐标"].Value); - GSOFeature flagFeature = globeControl1.Globe.Layers.GetLayerByCaption("标识器").GetFeatureByID(int.Parse(id)); - string type = ""; - string pipe = ""; - string sql = "select t.标识器型号,t.对象编号 from 标识器 t where t.编号='" + flagno + "'"; - using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) - { - while (reader.Read()) - { - type = reader.GetString(0); - pipe = reader.GetString(1); - } - } - - GSOLabel label = new GSOLabel(); - label.Text = "标识器编号:" + flagno + "\r\n" + - "标识器类型:" + type + "\r\n" + - //"标识对象编号:" + pipe + "\r\n" + - "所属道路:" + flagstreet; - label.Style = new GSOLabelStyle(); - label.Style.TextStyle.FontSize = 18; - label.Style.TextStyle.ForeColor = Color.FromArgb(0, 0, 0, 255); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 10; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); - this.globeControl1.Refresh(); - - } - catch (Exception ex) - { - MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - - } - } /// /// 标识器报废 /// @@ -363,13 +304,9 @@ //Thread downloadJob = new Thread(new ParameterizedThreadStart(doSave)); //downloadJob.IsBackground = true; //downloadJob.Start(e); - globeControl1.Globe.Layers["标识器"].Save(); + //globeControl1.Globe.Layers["标识器"].Save(); globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - foreach (GSOFeature f in Features) - { - f.Label = null; - } - Features.RemoveRange(0, Features.Count); + globeControl1.Refresh(); } @@ -525,6 +462,7 @@ } } + GSOLabel label = new GSOLabel(); label.Text = "标识器编号:" + flagno + "\r\n" + "标识器类型:" + type + "\r\n" + @@ -539,9 +477,13 @@ label.Style.TextStyle.FontName = "黑体"; label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); + GSOFeature f = new GSOFeature(); + f.Geometry = flagFeature.Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize=-1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + globeControl1.Globe.JumpToFeature(newFeature, 20); this.globeControl1.Refresh(); } diff --git a/FrmPatrolerEdit.Designer.cs b/FrmPatrolerEdit.Designer.cs index c551efc..34ee75b 100644 --- a/FrmPatrolerEdit.Designer.cs +++ b/FrmPatrolerEdit.Designer.cs @@ -132,6 +132,7 @@ this.txt_phone.Name = "txt_phone"; this.txt_phone.Size = new System.Drawing.Size(172, 21); this.txt_phone.TabIndex = 15; + this.txt_phone.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_phone_KeyPress); // // combo_sex // diff --git a/FrmPatrolerEdit.cs b/FrmPatrolerEdit.cs index f45b5ae..f0ee553 100644 --- a/FrmPatrolerEdit.cs +++ b/FrmPatrolerEdit.cs @@ -54,6 +54,15 @@ } try { + string sqlCount = "select count(*) from patroler where username='"+txt_name.Text.Trim()+"'"; + int rows = 0; + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + if (rows>0) + { + MessageBox.Show("巡检人员已存在,请更换用户名", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + if (String.IsNullOrEmpty(lab_dbid.Text.Trim())) { String sql = "insert into patroler t (t.username,t.sex,t.age,t.phonenum,t.accountstate,t.password) values ('" + txt_name.Text.Trim() + "','" + combo_sex.SelectedItem.ToString() + "','" + txt_age.Value.ToString() + "','" + txt_phone.Text.Trim() + "','OFFLINE','" + Utility.MD5Encrypt3("111111") + "')"; @@ -84,5 +93,17 @@ this.txt_phone.Text = ""; this.txt_name.Focus(); } + + private void txt_phone_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar != 8 && !Char.IsDigit(e.KeyChar)) + { + e.Handled = true; + } + else + { + + } + } } } diff --git a/Cyberpipe.suo b/Cyberpipe.suo index cc8242f..7b935a0 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EditTask.cs b/EMS_Forms/Form_EditTask.cs index 72d3e8e..30a9765 100644 --- a/EMS_Forms/Form_EditTask.cs +++ b/EMS_Forms/Form_EditTask.cs @@ -23,7 +23,6 @@ public static List checkLists = new List(); OracleConnection conn = null; - List BSQFeatures = new List(); public static List roadList = new List(); @@ -193,10 +192,8 @@ private void Form_EditTask_FormClosing(object sender, FormClosingEventArgs e) { - for (int i = 0; i < BSQFeatures.Count; i++) - { - BSQFeatures[i].Label = null; - } + + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); globeControl1.TrackPolygonEndEvent -= new TrackPolygonEndEventHandler(TrackPolygonEndEvent); } @@ -340,6 +337,7 @@ //f.Geometry = model; //GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + GSOLabel label = new GSOLabel(); label.Text = "标识器位置"; @@ -351,8 +349,14 @@ label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); features[0].Label = label; - BSQFeatures.Add(features[0]); - globeControl1.Globe.JumpToFeature(features[0], 10); + GSOFeature f = new GSOFeature(); + f.Geometry = features[0].Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + + globeControl1.Globe.JumpToFeature(newFeature, 10); } else diff --git a/FrmFlagEdits.cs b/FrmFlagEdits.cs index ff25a41..04a9f90 100644 --- a/FrmFlagEdits.cs +++ b/FrmFlagEdits.cs @@ -17,6 +17,9 @@ InitializeComponent(); } string id = ""; + public delegate void Handle(); + public event Handle refresh; + public FrmFlagEdits(string id, string flagid, string flagno, string flagtype, string deep, string street,string gc) { @@ -52,9 +55,10 @@ "t.所属道路 = '" + txt_street.Text.Trim() + "'" + "where t.LSSYS_ID =" + id; OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql); - if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.YesNo, MessageBoxIcon.Question)==DialogResult.Yes) + if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Question)==DialogResult.OK) { this.Close(); + refresh(); } } catch (Exception ex) diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 9bf9734..8d89f55 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -27,7 +27,6 @@ int rows = 0; public static GeoScene.Engine.GSODataSource ds = null; TreeNode layerManagerNode = null; - List Features = new List(); public FrmFlagManagers(GSOGlobeControl _globeControl1) { @@ -139,6 +138,7 @@ string street = row.Cells["所属道路"].Value.ToString(); FrmFlagEdits frm = new FrmFlagEdits(id, flagid, flagno,flagtype, deep, street,gc); + frm.refresh += new FrmFlagEdits.Handle(LoadData);//改变值的事件 frm.ShowDialog(); winGridViewPager1.Refresh(); } @@ -149,66 +149,7 @@ } } - /// - /// 对象查看 - /// - /// - /// - private void winGridViewPager1_OnAddNew(object sender, EventArgs e) - { - DataGridView grid = sender as DataGridView; - if (grid != null) - { - DataGridViewRow row = grid.SelectedRows[0]; - try - { - this.WindowState = FormWindowState.Minimized; - string id = row.Cells["LSSYS_ID"].Value.ToString(); - string flagno = row.Cells["编号"].Value.ToString(); - string flagstreet = row.Cells["所属道路"].Value.ToString(); - double x = Convert.ToDouble(row.Cells["X坐标"].Value); - double y = Convert.ToDouble(row.Cells["Y坐标"].Value); - GSOFeature flagFeature = globeControl1.Globe.Layers.GetLayerByCaption("标识器").GetFeatureByID(int.Parse(id)); - string type = ""; - string pipe = ""; - string sql = "select t.标识器型号,t.对象编号 from 标识器 t where t.编号='" + flagno + "'"; - using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) - { - while (reader.Read()) - { - type = reader.GetString(0); - pipe = reader.GetString(1); - } - } - - GSOLabel label = new GSOLabel(); - label.Text = "标识器编号:" + flagno + "\r\n" + - "标识器类型:" + type + "\r\n" + - //"标识对象编号:" + pipe + "\r\n" + - "所属道路:" + flagstreet; - label.Style = new GSOLabelStyle(); - label.Style.TextStyle.FontSize = 18; - label.Style.TextStyle.ForeColor = Color.FromArgb(0, 0, 0, 255); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 10; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); - this.globeControl1.Refresh(); - - } - catch (Exception ex) - { - MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - - } - } /// /// 标识器报废 /// @@ -363,13 +304,9 @@ //Thread downloadJob = new Thread(new ParameterizedThreadStart(doSave)); //downloadJob.IsBackground = true; //downloadJob.Start(e); - globeControl1.Globe.Layers["标识器"].Save(); + //globeControl1.Globe.Layers["标识器"].Save(); globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - foreach (GSOFeature f in Features) - { - f.Label = null; - } - Features.RemoveRange(0, Features.Count); + globeControl1.Refresh(); } @@ -525,6 +462,7 @@ } } + GSOLabel label = new GSOLabel(); label.Text = "标识器编号:" + flagno + "\r\n" + "标识器类型:" + type + "\r\n" + @@ -539,9 +477,13 @@ label.Style.TextStyle.FontName = "黑体"; label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); + GSOFeature f = new GSOFeature(); + f.Geometry = flagFeature.Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize=-1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + globeControl1.Globe.JumpToFeature(newFeature, 20); this.globeControl1.Refresh(); } diff --git a/FrmPatrolerEdit.Designer.cs b/FrmPatrolerEdit.Designer.cs index c551efc..34ee75b 100644 --- a/FrmPatrolerEdit.Designer.cs +++ b/FrmPatrolerEdit.Designer.cs @@ -132,6 +132,7 @@ this.txt_phone.Name = "txt_phone"; this.txt_phone.Size = new System.Drawing.Size(172, 21); this.txt_phone.TabIndex = 15; + this.txt_phone.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_phone_KeyPress); // // combo_sex // diff --git a/FrmPatrolerEdit.cs b/FrmPatrolerEdit.cs index f45b5ae..f0ee553 100644 --- a/FrmPatrolerEdit.cs +++ b/FrmPatrolerEdit.cs @@ -54,6 +54,15 @@ } try { + string sqlCount = "select count(*) from patroler where username='"+txt_name.Text.Trim()+"'"; + int rows = 0; + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + if (rows>0) + { + MessageBox.Show("巡检人员已存在,请更换用户名", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + if (String.IsNullOrEmpty(lab_dbid.Text.Trim())) { String sql = "insert into patroler t (t.username,t.sex,t.age,t.phonenum,t.accountstate,t.password) values ('" + txt_name.Text.Trim() + "','" + combo_sex.SelectedItem.ToString() + "','" + txt_age.Value.ToString() + "','" + txt_phone.Text.Trim() + "','OFFLINE','" + Utility.MD5Encrypt3("111111") + "')"; @@ -84,5 +93,17 @@ this.txt_phone.Text = ""; this.txt_name.Focus(); } + + private void txt_phone_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar != 8 && !Char.IsDigit(e.KeyChar)) + { + e.Handled = true; + } + else + { + + } + } } } diff --git a/MainFrm.cs b/MainFrm.cs index 0cd5881..d36e22c 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -3454,7 +3454,7 @@ //{ // j++; //} - while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称") + while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称" || field1.Name == "模型路径") { j++; fieldName = fieldNames[j].Trim(); @@ -3506,7 +3506,7 @@ //{ // j++; //} - while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称") + while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称" || field2.Name == "模型路径") { j++; field2 = (GSOFieldDefn)feature.GetFieldDefn(j + 1); diff --git a/Cyberpipe.suo b/Cyberpipe.suo index cc8242f..7b935a0 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EditTask.cs b/EMS_Forms/Form_EditTask.cs index 72d3e8e..30a9765 100644 --- a/EMS_Forms/Form_EditTask.cs +++ b/EMS_Forms/Form_EditTask.cs @@ -23,7 +23,6 @@ public static List checkLists = new List(); OracleConnection conn = null; - List BSQFeatures = new List(); public static List roadList = new List(); @@ -193,10 +192,8 @@ private void Form_EditTask_FormClosing(object sender, FormClosingEventArgs e) { - for (int i = 0; i < BSQFeatures.Count; i++) - { - BSQFeatures[i].Label = null; - } + + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); globeControl1.TrackPolygonEndEvent -= new TrackPolygonEndEventHandler(TrackPolygonEndEvent); } @@ -340,6 +337,7 @@ //f.Geometry = model; //GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + GSOLabel label = new GSOLabel(); label.Text = "标识器位置"; @@ -351,8 +349,14 @@ label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); features[0].Label = label; - BSQFeatures.Add(features[0]); - globeControl1.Globe.JumpToFeature(features[0], 10); + GSOFeature f = new GSOFeature(); + f.Geometry = features[0].Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + + globeControl1.Globe.JumpToFeature(newFeature, 10); } else diff --git a/FrmFlagEdits.cs b/FrmFlagEdits.cs index ff25a41..04a9f90 100644 --- a/FrmFlagEdits.cs +++ b/FrmFlagEdits.cs @@ -17,6 +17,9 @@ InitializeComponent(); } string id = ""; + public delegate void Handle(); + public event Handle refresh; + public FrmFlagEdits(string id, string flagid, string flagno, string flagtype, string deep, string street,string gc) { @@ -52,9 +55,10 @@ "t.所属道路 = '" + txt_street.Text.Trim() + "'" + "where t.LSSYS_ID =" + id; OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql); - if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.YesNo, MessageBoxIcon.Question)==DialogResult.Yes) + if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Question)==DialogResult.OK) { this.Close(); + refresh(); } } catch (Exception ex) diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 9bf9734..8d89f55 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -27,7 +27,6 @@ int rows = 0; public static GeoScene.Engine.GSODataSource ds = null; TreeNode layerManagerNode = null; - List Features = new List(); public FrmFlagManagers(GSOGlobeControl _globeControl1) { @@ -139,6 +138,7 @@ string street = row.Cells["所属道路"].Value.ToString(); FrmFlagEdits frm = new FrmFlagEdits(id, flagid, flagno,flagtype, deep, street,gc); + frm.refresh += new FrmFlagEdits.Handle(LoadData);//改变值的事件 frm.ShowDialog(); winGridViewPager1.Refresh(); } @@ -149,66 +149,7 @@ } } - /// - /// 对象查看 - /// - /// - /// - private void winGridViewPager1_OnAddNew(object sender, EventArgs e) - { - DataGridView grid = sender as DataGridView; - if (grid != null) - { - DataGridViewRow row = grid.SelectedRows[0]; - try - { - this.WindowState = FormWindowState.Minimized; - string id = row.Cells["LSSYS_ID"].Value.ToString(); - string flagno = row.Cells["编号"].Value.ToString(); - string flagstreet = row.Cells["所属道路"].Value.ToString(); - double x = Convert.ToDouble(row.Cells["X坐标"].Value); - double y = Convert.ToDouble(row.Cells["Y坐标"].Value); - GSOFeature flagFeature = globeControl1.Globe.Layers.GetLayerByCaption("标识器").GetFeatureByID(int.Parse(id)); - string type = ""; - string pipe = ""; - string sql = "select t.标识器型号,t.对象编号 from 标识器 t where t.编号='" + flagno + "'"; - using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) - { - while (reader.Read()) - { - type = reader.GetString(0); - pipe = reader.GetString(1); - } - } - - GSOLabel label = new GSOLabel(); - label.Text = "标识器编号:" + flagno + "\r\n" + - "标识器类型:" + type + "\r\n" + - //"标识对象编号:" + pipe + "\r\n" + - "所属道路:" + flagstreet; - label.Style = new GSOLabelStyle(); - label.Style.TextStyle.FontSize = 18; - label.Style.TextStyle.ForeColor = Color.FromArgb(0, 0, 0, 255); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 10; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); - this.globeControl1.Refresh(); - - } - catch (Exception ex) - { - MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - - } - } /// /// 标识器报废 /// @@ -363,13 +304,9 @@ //Thread downloadJob = new Thread(new ParameterizedThreadStart(doSave)); //downloadJob.IsBackground = true; //downloadJob.Start(e); - globeControl1.Globe.Layers["标识器"].Save(); + //globeControl1.Globe.Layers["标识器"].Save(); globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - foreach (GSOFeature f in Features) - { - f.Label = null; - } - Features.RemoveRange(0, Features.Count); + globeControl1.Refresh(); } @@ -525,6 +462,7 @@ } } + GSOLabel label = new GSOLabel(); label.Text = "标识器编号:" + flagno + "\r\n" + "标识器类型:" + type + "\r\n" + @@ -539,9 +477,13 @@ label.Style.TextStyle.FontName = "黑体"; label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); + GSOFeature f = new GSOFeature(); + f.Geometry = flagFeature.Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize=-1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + globeControl1.Globe.JumpToFeature(newFeature, 20); this.globeControl1.Refresh(); } diff --git a/FrmPatrolerEdit.Designer.cs b/FrmPatrolerEdit.Designer.cs index c551efc..34ee75b 100644 --- a/FrmPatrolerEdit.Designer.cs +++ b/FrmPatrolerEdit.Designer.cs @@ -132,6 +132,7 @@ this.txt_phone.Name = "txt_phone"; this.txt_phone.Size = new System.Drawing.Size(172, 21); this.txt_phone.TabIndex = 15; + this.txt_phone.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_phone_KeyPress); // // combo_sex // diff --git a/FrmPatrolerEdit.cs b/FrmPatrolerEdit.cs index f45b5ae..f0ee553 100644 --- a/FrmPatrolerEdit.cs +++ b/FrmPatrolerEdit.cs @@ -54,6 +54,15 @@ } try { + string sqlCount = "select count(*) from patroler where username='"+txt_name.Text.Trim()+"'"; + int rows = 0; + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + if (rows>0) + { + MessageBox.Show("巡检人员已存在,请更换用户名", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + if (String.IsNullOrEmpty(lab_dbid.Text.Trim())) { String sql = "insert into patroler t (t.username,t.sex,t.age,t.phonenum,t.accountstate,t.password) values ('" + txt_name.Text.Trim() + "','" + combo_sex.SelectedItem.ToString() + "','" + txt_age.Value.ToString() + "','" + txt_phone.Text.Trim() + "','OFFLINE','" + Utility.MD5Encrypt3("111111") + "')"; @@ -84,5 +93,17 @@ this.txt_phone.Text = ""; this.txt_name.Focus(); } + + private void txt_phone_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar != 8 && !Char.IsDigit(e.KeyChar)) + { + e.Handled = true; + } + else + { + + } + } } } diff --git a/MainFrm.cs b/MainFrm.cs index 0cd5881..d36e22c 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -3454,7 +3454,7 @@ //{ // j++; //} - while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称") + while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称" || field1.Name == "模型路径") { j++; fieldName = fieldNames[j].Trim(); @@ -3506,7 +3506,7 @@ //{ // j++; //} - while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称") + while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称" || field2.Name == "模型路径") { j++; field2 = (GSOFieldDefn)feature.GetFieldDefn(j + 1); diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index e5f0003..5f7d3d2 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -82,6 +82,7 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); + this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -371,10 +372,11 @@ this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); + this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); + this.buttonItem_TaskManager = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem_OnlineTask = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem_Event = new DevComponents.DotNetBar.ButtonItem(); this.ribbonPanel8 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar_UserInfo = new DevComponents.DotNetBar.RibbonBar(); this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); @@ -384,11 +386,10 @@ this.btn_user_role = new DevComponents.DotNetBar.ButtonItem(); this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem(); this.btn_reset_password = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); - this.buttonItem_TaskManager = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem_OnlineTask = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem_Event = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -653,7 +654,6 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); - this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -691,9 +691,9 @@ this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); - this.ribbonPanel8.SuspendLayout(); this.ribbonPanel2.SuspendLayout(); + this.ribbonPanel8.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel12.SuspendLayout(); this.ribbonPanel5.SuspendLayout(); @@ -1094,6 +1094,16 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -4317,84 +4327,96 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // - // ribbonPanel7 + // ribbonPanel2 // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 0); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel2.Controls.Add(this.ribbonBar4); + this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel2.Name = "ribbonPanel2"; + this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); // // // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.Style.Class = ""; + this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.StyleMouseDown.Class = ""; + this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - this.ribbonPanel7.Visible = false; + this.ribbonPanel2.StyleMouseOver.Class = ""; + this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.TabIndex = 39; + this.ribbonPanel2.Visible = false; // - // ribbonBar5 + // ribbonBar4 // - this.ribbonBar5.AutoOverflowEnabled = true; + this.ribbonBar4.AutoOverflowEnabled = true; // // // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 92); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; + this.ribbonBar4.BackgroundStyle.Class = ""; + this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.ContainerControlProcessDialogKey = true; + this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.buttonItem_TaskManager, + this.buttonItem_OnlineTask, + this.buttonItem_Event}); + this.ribbonBar4.Location = new System.Drawing.Point(3, 0); + this.ribbonBar4.Name = "ribbonBar4"; + this.ribbonBar4.Size = new System.Drawing.Size(211, 59); + this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar4.TabIndex = 0; + this.ribbonBar4.Text = "ribbonBar4"; // // // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleStyle.Class = ""; + this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; + this.ribbonBar4.TitleStyleMouseOver.Class = ""; + this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleVisible = false; // - // btn_flag + // buttonItem_TaskManager // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + this.buttonItem_TaskManager.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__76; + this.buttonItem_TaskManager.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_TaskManager.Name = "buttonItem_TaskManager"; + this.buttonItem_TaskManager.SubItemsExpandWidth = 14; + this.buttonItem_TaskManager.Text = "工单管理"; + this.buttonItem_TaskManager.Click += new System.EventHandler(this.buttonItem_TaskManager_Click); // - // slider4ground + // buttonItem_OnlineTask // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + this.buttonItem_OnlineTask.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__69; + this.buttonItem_OnlineTask.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_OnlineTask.Name = "buttonItem_OnlineTask"; + this.buttonItem_OnlineTask.SubItemsExpandWidth = 14; + this.buttonItem_OnlineTask.Text = "在线任务"; + this.buttonItem_OnlineTask.Click += new System.EventHandler(this.buttonItem_OnlineTask_Click); + // + // buttonItem_Event + // + this.buttonItem_Event.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__72; + this.buttonItem_Event.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_Event.Name = "buttonItem_Event"; + this.buttonItem_Event.SubItemsExpandWidth = 14; + this.buttonItem_Event.Text = "事件管理"; + this.buttonItem_Event.Click += new System.EventHandler(this.buttonItem_Event_Click); // // ribbonPanel8 // @@ -4525,96 +4547,84 @@ this.btn_reset_password.Text = "重置密码"; this.btn_reset_password.Click += new System.EventHandler(this.btn_reset_password_Click); // - // ribbonPanel2 + // ribbonPanel7 // - this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel2.Controls.Add(this.ribbonBar4); - this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel2.Name = "ribbonPanel2"; - this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 95); // // // - this.ribbonPanel2.Style.Class = ""; - this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel2.StyleMouseDown.Class = ""; - this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel2.StyleMouseOver.Class = ""; - this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; // - // ribbonBar4 + // ribbonBar5 // - this.ribbonBar4.AutoOverflowEnabled = true; + this.ribbonBar5.AutoOverflowEnabled = true; // // // - this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar4.BackgroundStyle.Class = ""; - this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.ContainerControlProcessDialogKey = true; - this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.buttonItem_TaskManager, - this.buttonItem_OnlineTask, - this.buttonItem_Event}); - this.ribbonBar4.Location = new System.Drawing.Point(3, 0); - this.ribbonBar4.Name = "ribbonBar4"; - this.ribbonBar4.Size = new System.Drawing.Size(211, 59); - this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar4.TabIndex = 0; - this.ribbonBar4.Text = "ribbonBar4"; + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 92); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; // // // - this.ribbonBar4.TitleStyle.Class = ""; - this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar4.TitleStyleMouseOver.Class = ""; - this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.TitleVisible = false; + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; // - // buttonItem_TaskManager + // btn_flag // - this.buttonItem_TaskManager.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__76; - this.buttonItem_TaskManager.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_TaskManager.Name = "buttonItem_TaskManager"; - this.buttonItem_TaskManager.SubItemsExpandWidth = 14; - this.buttonItem_TaskManager.Text = "工单管理"; - this.buttonItem_TaskManager.Click += new System.EventHandler(this.buttonItem_TaskManager_Click); + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); // - // buttonItem_OnlineTask + // slider4ground // - this.buttonItem_OnlineTask.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__69; - this.buttonItem_OnlineTask.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_OnlineTask.Name = "buttonItem_OnlineTask"; - this.buttonItem_OnlineTask.SubItemsExpandWidth = 14; - this.buttonItem_OnlineTask.Text = "在线任务"; - this.buttonItem_OnlineTask.Click += new System.EventHandler(this.buttonItem_OnlineTask_Click); - // - // buttonItem_Event - // - this.buttonItem_Event.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__72; - this.buttonItem_Event.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_Event.Name = "buttonItem_Event"; - this.buttonItem_Event.SubItemsExpandWidth = 14; - this.buttonItem_Event.Text = "事件管理"; - this.buttonItem_Event.Click += new System.EventHandler(this.buttonItem_Event_Click); + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); // // ribbonPanel15 // @@ -7098,16 +7108,6 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7182,9 +7182,9 @@ this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); this.ribbonPanel3.ResumeLayout(false); - this.ribbonPanel7.ResumeLayout(false); - this.ribbonPanel8.ResumeLayout(false); this.ribbonPanel2.ResumeLayout(false); + this.ribbonPanel8.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel12.ResumeLayout(false); this.ribbonPanel5.ResumeLayout(false); diff --git a/Cyberpipe.suo b/Cyberpipe.suo index cc8242f..7b935a0 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EditTask.cs b/EMS_Forms/Form_EditTask.cs index 72d3e8e..30a9765 100644 --- a/EMS_Forms/Form_EditTask.cs +++ b/EMS_Forms/Form_EditTask.cs @@ -23,7 +23,6 @@ public static List checkLists = new List(); OracleConnection conn = null; - List BSQFeatures = new List(); public static List roadList = new List(); @@ -193,10 +192,8 @@ private void Form_EditTask_FormClosing(object sender, FormClosingEventArgs e) { - for (int i = 0; i < BSQFeatures.Count; i++) - { - BSQFeatures[i].Label = null; - } + + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); globeControl1.TrackPolygonEndEvent -= new TrackPolygonEndEventHandler(TrackPolygonEndEvent); } @@ -340,6 +337,7 @@ //f.Geometry = model; //GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + GSOLabel label = new GSOLabel(); label.Text = "标识器位置"; @@ -351,8 +349,14 @@ label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); features[0].Label = label; - BSQFeatures.Add(features[0]); - globeControl1.Globe.JumpToFeature(features[0], 10); + GSOFeature f = new GSOFeature(); + f.Geometry = features[0].Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + + globeControl1.Globe.JumpToFeature(newFeature, 10); } else diff --git a/FrmFlagEdits.cs b/FrmFlagEdits.cs index ff25a41..04a9f90 100644 --- a/FrmFlagEdits.cs +++ b/FrmFlagEdits.cs @@ -17,6 +17,9 @@ InitializeComponent(); } string id = ""; + public delegate void Handle(); + public event Handle refresh; + public FrmFlagEdits(string id, string flagid, string flagno, string flagtype, string deep, string street,string gc) { @@ -52,9 +55,10 @@ "t.所属道路 = '" + txt_street.Text.Trim() + "'" + "where t.LSSYS_ID =" + id; OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql); - if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.YesNo, MessageBoxIcon.Question)==DialogResult.Yes) + if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Question)==DialogResult.OK) { this.Close(); + refresh(); } } catch (Exception ex) diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 9bf9734..8d89f55 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -27,7 +27,6 @@ int rows = 0; public static GeoScene.Engine.GSODataSource ds = null; TreeNode layerManagerNode = null; - List Features = new List(); public FrmFlagManagers(GSOGlobeControl _globeControl1) { @@ -139,6 +138,7 @@ string street = row.Cells["所属道路"].Value.ToString(); FrmFlagEdits frm = new FrmFlagEdits(id, flagid, flagno,flagtype, deep, street,gc); + frm.refresh += new FrmFlagEdits.Handle(LoadData);//改变值的事件 frm.ShowDialog(); winGridViewPager1.Refresh(); } @@ -149,66 +149,7 @@ } } - /// - /// 对象查看 - /// - /// - /// - private void winGridViewPager1_OnAddNew(object sender, EventArgs e) - { - DataGridView grid = sender as DataGridView; - if (grid != null) - { - DataGridViewRow row = grid.SelectedRows[0]; - try - { - this.WindowState = FormWindowState.Minimized; - string id = row.Cells["LSSYS_ID"].Value.ToString(); - string flagno = row.Cells["编号"].Value.ToString(); - string flagstreet = row.Cells["所属道路"].Value.ToString(); - double x = Convert.ToDouble(row.Cells["X坐标"].Value); - double y = Convert.ToDouble(row.Cells["Y坐标"].Value); - GSOFeature flagFeature = globeControl1.Globe.Layers.GetLayerByCaption("标识器").GetFeatureByID(int.Parse(id)); - string type = ""; - string pipe = ""; - string sql = "select t.标识器型号,t.对象编号 from 标识器 t where t.编号='" + flagno + "'"; - using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) - { - while (reader.Read()) - { - type = reader.GetString(0); - pipe = reader.GetString(1); - } - } - - GSOLabel label = new GSOLabel(); - label.Text = "标识器编号:" + flagno + "\r\n" + - "标识器类型:" + type + "\r\n" + - //"标识对象编号:" + pipe + "\r\n" + - "所属道路:" + flagstreet; - label.Style = new GSOLabelStyle(); - label.Style.TextStyle.FontSize = 18; - label.Style.TextStyle.ForeColor = Color.FromArgb(0, 0, 0, 255); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 10; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); - this.globeControl1.Refresh(); - - } - catch (Exception ex) - { - MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - - } - } /// /// 标识器报废 /// @@ -363,13 +304,9 @@ //Thread downloadJob = new Thread(new ParameterizedThreadStart(doSave)); //downloadJob.IsBackground = true; //downloadJob.Start(e); - globeControl1.Globe.Layers["标识器"].Save(); + //globeControl1.Globe.Layers["标识器"].Save(); globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - foreach (GSOFeature f in Features) - { - f.Label = null; - } - Features.RemoveRange(0, Features.Count); + globeControl1.Refresh(); } @@ -525,6 +462,7 @@ } } + GSOLabel label = new GSOLabel(); label.Text = "标识器编号:" + flagno + "\r\n" + "标识器类型:" + type + "\r\n" + @@ -539,9 +477,13 @@ label.Style.TextStyle.FontName = "黑体"; label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); + GSOFeature f = new GSOFeature(); + f.Geometry = flagFeature.Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize=-1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + globeControl1.Globe.JumpToFeature(newFeature, 20); this.globeControl1.Refresh(); } diff --git a/FrmPatrolerEdit.Designer.cs b/FrmPatrolerEdit.Designer.cs index c551efc..34ee75b 100644 --- a/FrmPatrolerEdit.Designer.cs +++ b/FrmPatrolerEdit.Designer.cs @@ -132,6 +132,7 @@ this.txt_phone.Name = "txt_phone"; this.txt_phone.Size = new System.Drawing.Size(172, 21); this.txt_phone.TabIndex = 15; + this.txt_phone.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_phone_KeyPress); // // combo_sex // diff --git a/FrmPatrolerEdit.cs b/FrmPatrolerEdit.cs index f45b5ae..f0ee553 100644 --- a/FrmPatrolerEdit.cs +++ b/FrmPatrolerEdit.cs @@ -54,6 +54,15 @@ } try { + string sqlCount = "select count(*) from patroler where username='"+txt_name.Text.Trim()+"'"; + int rows = 0; + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + if (rows>0) + { + MessageBox.Show("巡检人员已存在,请更换用户名", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + if (String.IsNullOrEmpty(lab_dbid.Text.Trim())) { String sql = "insert into patroler t (t.username,t.sex,t.age,t.phonenum,t.accountstate,t.password) values ('" + txt_name.Text.Trim() + "','" + combo_sex.SelectedItem.ToString() + "','" + txt_age.Value.ToString() + "','" + txt_phone.Text.Trim() + "','OFFLINE','" + Utility.MD5Encrypt3("111111") + "')"; @@ -84,5 +93,17 @@ this.txt_phone.Text = ""; this.txt_name.Focus(); } + + private void txt_phone_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar != 8 && !Char.IsDigit(e.KeyChar)) + { + e.Handled = true; + } + else + { + + } + } } } diff --git a/MainFrm.cs b/MainFrm.cs index 0cd5881..d36e22c 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -3454,7 +3454,7 @@ //{ // j++; //} - while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称") + while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称" || field1.Name == "模型路径") { j++; fieldName = fieldNames[j].Trim(); @@ -3506,7 +3506,7 @@ //{ // j++; //} - while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称") + while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称" || field2.Name == "模型路径") { j++; field2 = (GSOFieldDefn)feature.GetFieldDefn(j + 1); diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index e5f0003..5f7d3d2 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -82,6 +82,7 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); + this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -371,10 +372,11 @@ this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); + this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); + this.buttonItem_TaskManager = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem_OnlineTask = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem_Event = new DevComponents.DotNetBar.ButtonItem(); this.ribbonPanel8 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar_UserInfo = new DevComponents.DotNetBar.RibbonBar(); this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); @@ -384,11 +386,10 @@ this.btn_user_role = new DevComponents.DotNetBar.ButtonItem(); this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem(); this.btn_reset_password = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); - this.buttonItem_TaskManager = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem_OnlineTask = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem_Event = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -653,7 +654,6 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); - this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -691,9 +691,9 @@ this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); - this.ribbonPanel8.SuspendLayout(); this.ribbonPanel2.SuspendLayout(); + this.ribbonPanel8.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel12.SuspendLayout(); this.ribbonPanel5.SuspendLayout(); @@ -1094,6 +1094,16 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -4317,84 +4327,96 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // - // ribbonPanel7 + // ribbonPanel2 // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 0); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel2.Controls.Add(this.ribbonBar4); + this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel2.Name = "ribbonPanel2"; + this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); // // // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.Style.Class = ""; + this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.StyleMouseDown.Class = ""; + this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - this.ribbonPanel7.Visible = false; + this.ribbonPanel2.StyleMouseOver.Class = ""; + this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.TabIndex = 39; + this.ribbonPanel2.Visible = false; // - // ribbonBar5 + // ribbonBar4 // - this.ribbonBar5.AutoOverflowEnabled = true; + this.ribbonBar4.AutoOverflowEnabled = true; // // // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 92); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; + this.ribbonBar4.BackgroundStyle.Class = ""; + this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.ContainerControlProcessDialogKey = true; + this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.buttonItem_TaskManager, + this.buttonItem_OnlineTask, + this.buttonItem_Event}); + this.ribbonBar4.Location = new System.Drawing.Point(3, 0); + this.ribbonBar4.Name = "ribbonBar4"; + this.ribbonBar4.Size = new System.Drawing.Size(211, 59); + this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar4.TabIndex = 0; + this.ribbonBar4.Text = "ribbonBar4"; // // // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleStyle.Class = ""; + this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; + this.ribbonBar4.TitleStyleMouseOver.Class = ""; + this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleVisible = false; // - // btn_flag + // buttonItem_TaskManager // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + this.buttonItem_TaskManager.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__76; + this.buttonItem_TaskManager.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_TaskManager.Name = "buttonItem_TaskManager"; + this.buttonItem_TaskManager.SubItemsExpandWidth = 14; + this.buttonItem_TaskManager.Text = "工单管理"; + this.buttonItem_TaskManager.Click += new System.EventHandler(this.buttonItem_TaskManager_Click); // - // slider4ground + // buttonItem_OnlineTask // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + this.buttonItem_OnlineTask.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__69; + this.buttonItem_OnlineTask.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_OnlineTask.Name = "buttonItem_OnlineTask"; + this.buttonItem_OnlineTask.SubItemsExpandWidth = 14; + this.buttonItem_OnlineTask.Text = "在线任务"; + this.buttonItem_OnlineTask.Click += new System.EventHandler(this.buttonItem_OnlineTask_Click); + // + // buttonItem_Event + // + this.buttonItem_Event.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__72; + this.buttonItem_Event.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_Event.Name = "buttonItem_Event"; + this.buttonItem_Event.SubItemsExpandWidth = 14; + this.buttonItem_Event.Text = "事件管理"; + this.buttonItem_Event.Click += new System.EventHandler(this.buttonItem_Event_Click); // // ribbonPanel8 // @@ -4525,96 +4547,84 @@ this.btn_reset_password.Text = "重置密码"; this.btn_reset_password.Click += new System.EventHandler(this.btn_reset_password_Click); // - // ribbonPanel2 + // ribbonPanel7 // - this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel2.Controls.Add(this.ribbonBar4); - this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel2.Name = "ribbonPanel2"; - this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 95); // // // - this.ribbonPanel2.Style.Class = ""; - this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel2.StyleMouseDown.Class = ""; - this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel2.StyleMouseOver.Class = ""; - this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; // - // ribbonBar4 + // ribbonBar5 // - this.ribbonBar4.AutoOverflowEnabled = true; + this.ribbonBar5.AutoOverflowEnabled = true; // // // - this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar4.BackgroundStyle.Class = ""; - this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.ContainerControlProcessDialogKey = true; - this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.buttonItem_TaskManager, - this.buttonItem_OnlineTask, - this.buttonItem_Event}); - this.ribbonBar4.Location = new System.Drawing.Point(3, 0); - this.ribbonBar4.Name = "ribbonBar4"; - this.ribbonBar4.Size = new System.Drawing.Size(211, 59); - this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar4.TabIndex = 0; - this.ribbonBar4.Text = "ribbonBar4"; + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 92); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; // // // - this.ribbonBar4.TitleStyle.Class = ""; - this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar4.TitleStyleMouseOver.Class = ""; - this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.TitleVisible = false; + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; // - // buttonItem_TaskManager + // btn_flag // - this.buttonItem_TaskManager.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__76; - this.buttonItem_TaskManager.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_TaskManager.Name = "buttonItem_TaskManager"; - this.buttonItem_TaskManager.SubItemsExpandWidth = 14; - this.buttonItem_TaskManager.Text = "工单管理"; - this.buttonItem_TaskManager.Click += new System.EventHandler(this.buttonItem_TaskManager_Click); + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); // - // buttonItem_OnlineTask + // slider4ground // - this.buttonItem_OnlineTask.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__69; - this.buttonItem_OnlineTask.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_OnlineTask.Name = "buttonItem_OnlineTask"; - this.buttonItem_OnlineTask.SubItemsExpandWidth = 14; - this.buttonItem_OnlineTask.Text = "在线任务"; - this.buttonItem_OnlineTask.Click += new System.EventHandler(this.buttonItem_OnlineTask_Click); - // - // buttonItem_Event - // - this.buttonItem_Event.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__72; - this.buttonItem_Event.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_Event.Name = "buttonItem_Event"; - this.buttonItem_Event.SubItemsExpandWidth = 14; - this.buttonItem_Event.Text = "事件管理"; - this.buttonItem_Event.Click += new System.EventHandler(this.buttonItem_Event_Click); + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); // // ribbonPanel15 // @@ -7098,16 +7108,6 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7182,9 +7182,9 @@ this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); this.ribbonPanel3.ResumeLayout(false); - this.ribbonPanel7.ResumeLayout(false); - this.ribbonPanel8.ResumeLayout(false); this.ribbonPanel2.ResumeLayout(false); + this.ribbonPanel8.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel12.ResumeLayout(false); this.ribbonPanel5.ResumeLayout(false); diff --git a/Program.cs b/Program.cs index f009c8a..12e6ecf 100644 --- a/Program.cs +++ b/Program.cs @@ -10,6 +10,7 @@ { static class Program { + static string ent = "C:\\EMSCyberPipe"; /// /// The main entry point for the application. /// @@ -30,18 +31,31 @@ String newVersionCode = getVersionCode(configUrl, currentVersionCode); if (newVersionCode != currentVersionCode) { - if (MessageBox.Show("检测到新版本,是否立即更新?", "智慧管网太湖新城规划分析系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + if (MessageBox.Show("检测到新版本,是否立即更新?", "智慧管网太湖新城电子标识系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { + + remoteUpDate(); + string programUrl = getProgramUrl(localConfigPath, "programurl"); if (programUrl != "") { - FrmDownloadProgress frmdownload = FrmDownloadProgress.getForm(programUrl); + + //FrmDownloadProgress frmdownload = FrmDownloadProgress.getForm(programUrl); + Process.Start(ent + "/UpDateProgress.exe").WaitForExit(); return; } + } else { - + /* + System.Diagnostics.Process[] proc = System.Diagnostics.Process.GetProcessesByName("UpDateProgress"); + //关闭原有应用程序的所有进程 + foreach (System.Diagnostics.Process pro in proc) + { + pro.Kill(); + } + * */ } } } @@ -51,7 +65,55 @@ FrmLogin frm = new FrmLogin(); if (frm.ShowDialog() == DialogResult.OK) { - Application.Run(new MainFrm()); + if (Utility.userRole != null) + { + Application.Run(new MainFrm()); + } + else + { + MessageBox.Show("该用户没有分配任何角色!"); + return; + } + } + } + + private static void remoteUpDate() + { + if (!File.Exists(ent)) + { + Directory.CreateDirectory(ent); + } + string filePath_exe = ent + "\\UpDateProgress.exe"; + string filePath_exeConfig = ent + "\\UpDateProgress.exe.config"; + string filePath_exePdb = ent + "\\UpDateProgress.pdb"; + string filePath_config = ent + "\\Config.xml"; + + string localPath_exe = Application.StartupPath + "\\UpDateProgress.exe"; + string localPath_exeConfig = Application.StartupPath + "\\UpDateProgress.exe.config"; + string localPath_exePdb = Application.StartupPath + "\\UpDateProgress.pdb"; + string localPath_config = Application.StartupPath + "\\Config.xml"; + + //TODO LIST:判断文件是否存在,存在就删除 + //delOldVersion(filePath_exe); + File.Copy(localPath_exe, filePath_exe, true); + File.Copy(localPath_exeConfig, filePath_exeConfig, true); + File.Copy(localPath_exePdb, filePath_exePdb, true); + File.Copy(localPath_config, filePath_config, true); + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); } } @@ -96,7 +158,6 @@ } xmlReader.Close(); - } catch (Exception e) { @@ -106,6 +167,5 @@ return versionCode; } - } } diff --git a/Cyberpipe.suo b/Cyberpipe.suo index cc8242f..7b935a0 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EditTask.cs b/EMS_Forms/Form_EditTask.cs index 72d3e8e..30a9765 100644 --- a/EMS_Forms/Form_EditTask.cs +++ b/EMS_Forms/Form_EditTask.cs @@ -23,7 +23,6 @@ public static List checkLists = new List(); OracleConnection conn = null; - List BSQFeatures = new List(); public static List roadList = new List(); @@ -193,10 +192,8 @@ private void Form_EditTask_FormClosing(object sender, FormClosingEventArgs e) { - for (int i = 0; i < BSQFeatures.Count; i++) - { - BSQFeatures[i].Label = null; - } + + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); globeControl1.TrackPolygonEndEvent -= new TrackPolygonEndEventHandler(TrackPolygonEndEvent); } @@ -340,6 +337,7 @@ //f.Geometry = model; //GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + GSOLabel label = new GSOLabel(); label.Text = "标识器位置"; @@ -351,8 +349,14 @@ label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); features[0].Label = label; - BSQFeatures.Add(features[0]); - globeControl1.Globe.JumpToFeature(features[0], 10); + GSOFeature f = new GSOFeature(); + f.Geometry = features[0].Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + + globeControl1.Globe.JumpToFeature(newFeature, 10); } else diff --git a/FrmFlagEdits.cs b/FrmFlagEdits.cs index ff25a41..04a9f90 100644 --- a/FrmFlagEdits.cs +++ b/FrmFlagEdits.cs @@ -17,6 +17,9 @@ InitializeComponent(); } string id = ""; + public delegate void Handle(); + public event Handle refresh; + public FrmFlagEdits(string id, string flagid, string flagno, string flagtype, string deep, string street,string gc) { @@ -52,9 +55,10 @@ "t.所属道路 = '" + txt_street.Text.Trim() + "'" + "where t.LSSYS_ID =" + id; OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql); - if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.YesNo, MessageBoxIcon.Question)==DialogResult.Yes) + if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Question)==DialogResult.OK) { this.Close(); + refresh(); } } catch (Exception ex) diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 9bf9734..8d89f55 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -27,7 +27,6 @@ int rows = 0; public static GeoScene.Engine.GSODataSource ds = null; TreeNode layerManagerNode = null; - List Features = new List(); public FrmFlagManagers(GSOGlobeControl _globeControl1) { @@ -139,6 +138,7 @@ string street = row.Cells["所属道路"].Value.ToString(); FrmFlagEdits frm = new FrmFlagEdits(id, flagid, flagno,flagtype, deep, street,gc); + frm.refresh += new FrmFlagEdits.Handle(LoadData);//改变值的事件 frm.ShowDialog(); winGridViewPager1.Refresh(); } @@ -149,66 +149,7 @@ } } - /// - /// 对象查看 - /// - /// - /// - private void winGridViewPager1_OnAddNew(object sender, EventArgs e) - { - DataGridView grid = sender as DataGridView; - if (grid != null) - { - DataGridViewRow row = grid.SelectedRows[0]; - try - { - this.WindowState = FormWindowState.Minimized; - string id = row.Cells["LSSYS_ID"].Value.ToString(); - string flagno = row.Cells["编号"].Value.ToString(); - string flagstreet = row.Cells["所属道路"].Value.ToString(); - double x = Convert.ToDouble(row.Cells["X坐标"].Value); - double y = Convert.ToDouble(row.Cells["Y坐标"].Value); - GSOFeature flagFeature = globeControl1.Globe.Layers.GetLayerByCaption("标识器").GetFeatureByID(int.Parse(id)); - string type = ""; - string pipe = ""; - string sql = "select t.标识器型号,t.对象编号 from 标识器 t where t.编号='" + flagno + "'"; - using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) - { - while (reader.Read()) - { - type = reader.GetString(0); - pipe = reader.GetString(1); - } - } - - GSOLabel label = new GSOLabel(); - label.Text = "标识器编号:" + flagno + "\r\n" + - "标识器类型:" + type + "\r\n" + - //"标识对象编号:" + pipe + "\r\n" + - "所属道路:" + flagstreet; - label.Style = new GSOLabelStyle(); - label.Style.TextStyle.FontSize = 18; - label.Style.TextStyle.ForeColor = Color.FromArgb(0, 0, 0, 255); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 10; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); - this.globeControl1.Refresh(); - - } - catch (Exception ex) - { - MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - - } - } /// /// 标识器报废 /// @@ -363,13 +304,9 @@ //Thread downloadJob = new Thread(new ParameterizedThreadStart(doSave)); //downloadJob.IsBackground = true; //downloadJob.Start(e); - globeControl1.Globe.Layers["标识器"].Save(); + //globeControl1.Globe.Layers["标识器"].Save(); globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - foreach (GSOFeature f in Features) - { - f.Label = null; - } - Features.RemoveRange(0, Features.Count); + globeControl1.Refresh(); } @@ -525,6 +462,7 @@ } } + GSOLabel label = new GSOLabel(); label.Text = "标识器编号:" + flagno + "\r\n" + "标识器类型:" + type + "\r\n" + @@ -539,9 +477,13 @@ label.Style.TextStyle.FontName = "黑体"; label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); + GSOFeature f = new GSOFeature(); + f.Geometry = flagFeature.Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize=-1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + globeControl1.Globe.JumpToFeature(newFeature, 20); this.globeControl1.Refresh(); } diff --git a/FrmPatrolerEdit.Designer.cs b/FrmPatrolerEdit.Designer.cs index c551efc..34ee75b 100644 --- a/FrmPatrolerEdit.Designer.cs +++ b/FrmPatrolerEdit.Designer.cs @@ -132,6 +132,7 @@ this.txt_phone.Name = "txt_phone"; this.txt_phone.Size = new System.Drawing.Size(172, 21); this.txt_phone.TabIndex = 15; + this.txt_phone.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_phone_KeyPress); // // combo_sex // diff --git a/FrmPatrolerEdit.cs b/FrmPatrolerEdit.cs index f45b5ae..f0ee553 100644 --- a/FrmPatrolerEdit.cs +++ b/FrmPatrolerEdit.cs @@ -54,6 +54,15 @@ } try { + string sqlCount = "select count(*) from patroler where username='"+txt_name.Text.Trim()+"'"; + int rows = 0; + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + if (rows>0) + { + MessageBox.Show("巡检人员已存在,请更换用户名", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + if (String.IsNullOrEmpty(lab_dbid.Text.Trim())) { String sql = "insert into patroler t (t.username,t.sex,t.age,t.phonenum,t.accountstate,t.password) values ('" + txt_name.Text.Trim() + "','" + combo_sex.SelectedItem.ToString() + "','" + txt_age.Value.ToString() + "','" + txt_phone.Text.Trim() + "','OFFLINE','" + Utility.MD5Encrypt3("111111") + "')"; @@ -84,5 +93,17 @@ this.txt_phone.Text = ""; this.txt_name.Focus(); } + + private void txt_phone_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar != 8 && !Char.IsDigit(e.KeyChar)) + { + e.Handled = true; + } + else + { + + } + } } } diff --git a/MainFrm.cs b/MainFrm.cs index 0cd5881..d36e22c 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -3454,7 +3454,7 @@ //{ // j++; //} - while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称") + while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称" || field1.Name == "模型路径") { j++; fieldName = fieldNames[j].Trim(); @@ -3506,7 +3506,7 @@ //{ // j++; //} - while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称") + while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称" || field2.Name == "模型路径") { j++; field2 = (GSOFieldDefn)feature.GetFieldDefn(j + 1); diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index e5f0003..5f7d3d2 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -82,6 +82,7 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); + this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -371,10 +372,11 @@ this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); + this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); + this.buttonItem_TaskManager = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem_OnlineTask = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem_Event = new DevComponents.DotNetBar.ButtonItem(); this.ribbonPanel8 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar_UserInfo = new DevComponents.DotNetBar.RibbonBar(); this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); @@ -384,11 +386,10 @@ this.btn_user_role = new DevComponents.DotNetBar.ButtonItem(); this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem(); this.btn_reset_password = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); - this.buttonItem_TaskManager = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem_OnlineTask = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem_Event = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -653,7 +654,6 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); - this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -691,9 +691,9 @@ this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); - this.ribbonPanel8.SuspendLayout(); this.ribbonPanel2.SuspendLayout(); + this.ribbonPanel8.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel12.SuspendLayout(); this.ribbonPanel5.SuspendLayout(); @@ -1094,6 +1094,16 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -4317,84 +4327,96 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // - // ribbonPanel7 + // ribbonPanel2 // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 0); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel2.Controls.Add(this.ribbonBar4); + this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel2.Name = "ribbonPanel2"; + this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); // // // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.Style.Class = ""; + this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.StyleMouseDown.Class = ""; + this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - this.ribbonPanel7.Visible = false; + this.ribbonPanel2.StyleMouseOver.Class = ""; + this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.TabIndex = 39; + this.ribbonPanel2.Visible = false; // - // ribbonBar5 + // ribbonBar4 // - this.ribbonBar5.AutoOverflowEnabled = true; + this.ribbonBar4.AutoOverflowEnabled = true; // // // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 92); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; + this.ribbonBar4.BackgroundStyle.Class = ""; + this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.ContainerControlProcessDialogKey = true; + this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.buttonItem_TaskManager, + this.buttonItem_OnlineTask, + this.buttonItem_Event}); + this.ribbonBar4.Location = new System.Drawing.Point(3, 0); + this.ribbonBar4.Name = "ribbonBar4"; + this.ribbonBar4.Size = new System.Drawing.Size(211, 59); + this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar4.TabIndex = 0; + this.ribbonBar4.Text = "ribbonBar4"; // // // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleStyle.Class = ""; + this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; + this.ribbonBar4.TitleStyleMouseOver.Class = ""; + this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleVisible = false; // - // btn_flag + // buttonItem_TaskManager // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + this.buttonItem_TaskManager.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__76; + this.buttonItem_TaskManager.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_TaskManager.Name = "buttonItem_TaskManager"; + this.buttonItem_TaskManager.SubItemsExpandWidth = 14; + this.buttonItem_TaskManager.Text = "工单管理"; + this.buttonItem_TaskManager.Click += new System.EventHandler(this.buttonItem_TaskManager_Click); // - // slider4ground + // buttonItem_OnlineTask // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + this.buttonItem_OnlineTask.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__69; + this.buttonItem_OnlineTask.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_OnlineTask.Name = "buttonItem_OnlineTask"; + this.buttonItem_OnlineTask.SubItemsExpandWidth = 14; + this.buttonItem_OnlineTask.Text = "在线任务"; + this.buttonItem_OnlineTask.Click += new System.EventHandler(this.buttonItem_OnlineTask_Click); + // + // buttonItem_Event + // + this.buttonItem_Event.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__72; + this.buttonItem_Event.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_Event.Name = "buttonItem_Event"; + this.buttonItem_Event.SubItemsExpandWidth = 14; + this.buttonItem_Event.Text = "事件管理"; + this.buttonItem_Event.Click += new System.EventHandler(this.buttonItem_Event_Click); // // ribbonPanel8 // @@ -4525,96 +4547,84 @@ this.btn_reset_password.Text = "重置密码"; this.btn_reset_password.Click += new System.EventHandler(this.btn_reset_password_Click); // - // ribbonPanel2 + // ribbonPanel7 // - this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel2.Controls.Add(this.ribbonBar4); - this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel2.Name = "ribbonPanel2"; - this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 95); // // // - this.ribbonPanel2.Style.Class = ""; - this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel2.StyleMouseDown.Class = ""; - this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel2.StyleMouseOver.Class = ""; - this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; // - // ribbonBar4 + // ribbonBar5 // - this.ribbonBar4.AutoOverflowEnabled = true; + this.ribbonBar5.AutoOverflowEnabled = true; // // // - this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar4.BackgroundStyle.Class = ""; - this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.ContainerControlProcessDialogKey = true; - this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.buttonItem_TaskManager, - this.buttonItem_OnlineTask, - this.buttonItem_Event}); - this.ribbonBar4.Location = new System.Drawing.Point(3, 0); - this.ribbonBar4.Name = "ribbonBar4"; - this.ribbonBar4.Size = new System.Drawing.Size(211, 59); - this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar4.TabIndex = 0; - this.ribbonBar4.Text = "ribbonBar4"; + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 92); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; // // // - this.ribbonBar4.TitleStyle.Class = ""; - this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar4.TitleStyleMouseOver.Class = ""; - this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.TitleVisible = false; + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; // - // buttonItem_TaskManager + // btn_flag // - this.buttonItem_TaskManager.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__76; - this.buttonItem_TaskManager.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_TaskManager.Name = "buttonItem_TaskManager"; - this.buttonItem_TaskManager.SubItemsExpandWidth = 14; - this.buttonItem_TaskManager.Text = "工单管理"; - this.buttonItem_TaskManager.Click += new System.EventHandler(this.buttonItem_TaskManager_Click); + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); // - // buttonItem_OnlineTask + // slider4ground // - this.buttonItem_OnlineTask.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__69; - this.buttonItem_OnlineTask.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_OnlineTask.Name = "buttonItem_OnlineTask"; - this.buttonItem_OnlineTask.SubItemsExpandWidth = 14; - this.buttonItem_OnlineTask.Text = "在线任务"; - this.buttonItem_OnlineTask.Click += new System.EventHandler(this.buttonItem_OnlineTask_Click); - // - // buttonItem_Event - // - this.buttonItem_Event.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__72; - this.buttonItem_Event.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_Event.Name = "buttonItem_Event"; - this.buttonItem_Event.SubItemsExpandWidth = 14; - this.buttonItem_Event.Text = "事件管理"; - this.buttonItem_Event.Click += new System.EventHandler(this.buttonItem_Event_Click); + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); // // ribbonPanel15 // @@ -7098,16 +7108,6 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7182,9 +7182,9 @@ this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); this.ribbonPanel3.ResumeLayout(false); - this.ribbonPanel7.ResumeLayout(false); - this.ribbonPanel8.ResumeLayout(false); this.ribbonPanel2.ResumeLayout(false); + this.ribbonPanel8.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel12.ResumeLayout(false); this.ribbonPanel5.ResumeLayout(false); diff --git a/Program.cs b/Program.cs index f009c8a..12e6ecf 100644 --- a/Program.cs +++ b/Program.cs @@ -10,6 +10,7 @@ { static class Program { + static string ent = "C:\\EMSCyberPipe"; /// /// The main entry point for the application. /// @@ -30,18 +31,31 @@ String newVersionCode = getVersionCode(configUrl, currentVersionCode); if (newVersionCode != currentVersionCode) { - if (MessageBox.Show("检测到新版本,是否立即更新?", "智慧管网太湖新城规划分析系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + if (MessageBox.Show("检测到新版本,是否立即更新?", "智慧管网太湖新城电子标识系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { + + remoteUpDate(); + string programUrl = getProgramUrl(localConfigPath, "programurl"); if (programUrl != "") { - FrmDownloadProgress frmdownload = FrmDownloadProgress.getForm(programUrl); + + //FrmDownloadProgress frmdownload = FrmDownloadProgress.getForm(programUrl); + Process.Start(ent + "/UpDateProgress.exe").WaitForExit(); return; } + } else { - + /* + System.Diagnostics.Process[] proc = System.Diagnostics.Process.GetProcessesByName("UpDateProgress"); + //关闭原有应用程序的所有进程 + foreach (System.Diagnostics.Process pro in proc) + { + pro.Kill(); + } + * */ } } } @@ -51,7 +65,55 @@ FrmLogin frm = new FrmLogin(); if (frm.ShowDialog() == DialogResult.OK) { - Application.Run(new MainFrm()); + if (Utility.userRole != null) + { + Application.Run(new MainFrm()); + } + else + { + MessageBox.Show("该用户没有分配任何角色!"); + return; + } + } + } + + private static void remoteUpDate() + { + if (!File.Exists(ent)) + { + Directory.CreateDirectory(ent); + } + string filePath_exe = ent + "\\UpDateProgress.exe"; + string filePath_exeConfig = ent + "\\UpDateProgress.exe.config"; + string filePath_exePdb = ent + "\\UpDateProgress.pdb"; + string filePath_config = ent + "\\Config.xml"; + + string localPath_exe = Application.StartupPath + "\\UpDateProgress.exe"; + string localPath_exeConfig = Application.StartupPath + "\\UpDateProgress.exe.config"; + string localPath_exePdb = Application.StartupPath + "\\UpDateProgress.pdb"; + string localPath_config = Application.StartupPath + "\\Config.xml"; + + //TODO LIST:判断文件是否存在,存在就删除 + //delOldVersion(filePath_exe); + File.Copy(localPath_exe, filePath_exe, true); + File.Copy(localPath_exeConfig, filePath_exeConfig, true); + File.Copy(localPath_exePdb, filePath_exePdb, true); + File.Copy(localPath_config, filePath_config, true); + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); } } @@ -96,7 +158,6 @@ } xmlReader.Close(); - } catch (Exception e) { @@ -106,6 +167,5 @@ return versionCode; } - } } diff --git a/bin/x86/Debug/Config.xml b/bin/x86/Debug/Config.xml index 560a163..5431500 100644 --- a/bin/x86/Debug/Config.xml +++ b/bin/x86/Debug/Config.xml @@ -14,8 +14,8 @@ http://192.168.0.122:8088/UpDownFile.asmx - http://192.168.10.229/EMSCyberpipe.msi - http://192.168.10.229/EMSConfig.xml + http://192.168.0.203/EMSCyberpipe.msi + http://192.168.0.203/EMSConfig.xml diff --git a/Cyberpipe.suo b/Cyberpipe.suo index cc8242f..7b935a0 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EditTask.cs b/EMS_Forms/Form_EditTask.cs index 72d3e8e..30a9765 100644 --- a/EMS_Forms/Form_EditTask.cs +++ b/EMS_Forms/Form_EditTask.cs @@ -23,7 +23,6 @@ public static List checkLists = new List(); OracleConnection conn = null; - List BSQFeatures = new List(); public static List roadList = new List(); @@ -193,10 +192,8 @@ private void Form_EditTask_FormClosing(object sender, FormClosingEventArgs e) { - for (int i = 0; i < BSQFeatures.Count; i++) - { - BSQFeatures[i].Label = null; - } + + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); globeControl1.TrackPolygonEndEvent -= new TrackPolygonEndEventHandler(TrackPolygonEndEvent); } @@ -340,6 +337,7 @@ //f.Geometry = model; //GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + GSOLabel label = new GSOLabel(); label.Text = "标识器位置"; @@ -351,8 +349,14 @@ label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); features[0].Label = label; - BSQFeatures.Add(features[0]); - globeControl1.Globe.JumpToFeature(features[0], 10); + GSOFeature f = new GSOFeature(); + f.Geometry = features[0].Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + + globeControl1.Globe.JumpToFeature(newFeature, 10); } else diff --git a/FrmFlagEdits.cs b/FrmFlagEdits.cs index ff25a41..04a9f90 100644 --- a/FrmFlagEdits.cs +++ b/FrmFlagEdits.cs @@ -17,6 +17,9 @@ InitializeComponent(); } string id = ""; + public delegate void Handle(); + public event Handle refresh; + public FrmFlagEdits(string id, string flagid, string flagno, string flagtype, string deep, string street,string gc) { @@ -52,9 +55,10 @@ "t.所属道路 = '" + txt_street.Text.Trim() + "'" + "where t.LSSYS_ID =" + id; OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql); - if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.YesNo, MessageBoxIcon.Question)==DialogResult.Yes) + if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Question)==DialogResult.OK) { this.Close(); + refresh(); } } catch (Exception ex) diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 9bf9734..8d89f55 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -27,7 +27,6 @@ int rows = 0; public static GeoScene.Engine.GSODataSource ds = null; TreeNode layerManagerNode = null; - List Features = new List(); public FrmFlagManagers(GSOGlobeControl _globeControl1) { @@ -139,6 +138,7 @@ string street = row.Cells["所属道路"].Value.ToString(); FrmFlagEdits frm = new FrmFlagEdits(id, flagid, flagno,flagtype, deep, street,gc); + frm.refresh += new FrmFlagEdits.Handle(LoadData);//改变值的事件 frm.ShowDialog(); winGridViewPager1.Refresh(); } @@ -149,66 +149,7 @@ } } - /// - /// 对象查看 - /// - /// - /// - private void winGridViewPager1_OnAddNew(object sender, EventArgs e) - { - DataGridView grid = sender as DataGridView; - if (grid != null) - { - DataGridViewRow row = grid.SelectedRows[0]; - try - { - this.WindowState = FormWindowState.Minimized; - string id = row.Cells["LSSYS_ID"].Value.ToString(); - string flagno = row.Cells["编号"].Value.ToString(); - string flagstreet = row.Cells["所属道路"].Value.ToString(); - double x = Convert.ToDouble(row.Cells["X坐标"].Value); - double y = Convert.ToDouble(row.Cells["Y坐标"].Value); - GSOFeature flagFeature = globeControl1.Globe.Layers.GetLayerByCaption("标识器").GetFeatureByID(int.Parse(id)); - string type = ""; - string pipe = ""; - string sql = "select t.标识器型号,t.对象编号 from 标识器 t where t.编号='" + flagno + "'"; - using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) - { - while (reader.Read()) - { - type = reader.GetString(0); - pipe = reader.GetString(1); - } - } - - GSOLabel label = new GSOLabel(); - label.Text = "标识器编号:" + flagno + "\r\n" + - "标识器类型:" + type + "\r\n" + - //"标识对象编号:" + pipe + "\r\n" + - "所属道路:" + flagstreet; - label.Style = new GSOLabelStyle(); - label.Style.TextStyle.FontSize = 18; - label.Style.TextStyle.ForeColor = Color.FromArgb(0, 0, 0, 255); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 10; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); - this.globeControl1.Refresh(); - - } - catch (Exception ex) - { - MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - - } - } /// /// 标识器报废 /// @@ -363,13 +304,9 @@ //Thread downloadJob = new Thread(new ParameterizedThreadStart(doSave)); //downloadJob.IsBackground = true; //downloadJob.Start(e); - globeControl1.Globe.Layers["标识器"].Save(); + //globeControl1.Globe.Layers["标识器"].Save(); globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - foreach (GSOFeature f in Features) - { - f.Label = null; - } - Features.RemoveRange(0, Features.Count); + globeControl1.Refresh(); } @@ -525,6 +462,7 @@ } } + GSOLabel label = new GSOLabel(); label.Text = "标识器编号:" + flagno + "\r\n" + "标识器类型:" + type + "\r\n" + @@ -539,9 +477,13 @@ label.Style.TextStyle.FontName = "黑体"; label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); + GSOFeature f = new GSOFeature(); + f.Geometry = flagFeature.Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize=-1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + globeControl1.Globe.JumpToFeature(newFeature, 20); this.globeControl1.Refresh(); } diff --git a/FrmPatrolerEdit.Designer.cs b/FrmPatrolerEdit.Designer.cs index c551efc..34ee75b 100644 --- a/FrmPatrolerEdit.Designer.cs +++ b/FrmPatrolerEdit.Designer.cs @@ -132,6 +132,7 @@ this.txt_phone.Name = "txt_phone"; this.txt_phone.Size = new System.Drawing.Size(172, 21); this.txt_phone.TabIndex = 15; + this.txt_phone.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_phone_KeyPress); // // combo_sex // diff --git a/FrmPatrolerEdit.cs b/FrmPatrolerEdit.cs index f45b5ae..f0ee553 100644 --- a/FrmPatrolerEdit.cs +++ b/FrmPatrolerEdit.cs @@ -54,6 +54,15 @@ } try { + string sqlCount = "select count(*) from patroler where username='"+txt_name.Text.Trim()+"'"; + int rows = 0; + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + if (rows>0) + { + MessageBox.Show("巡检人员已存在,请更换用户名", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + if (String.IsNullOrEmpty(lab_dbid.Text.Trim())) { String sql = "insert into patroler t (t.username,t.sex,t.age,t.phonenum,t.accountstate,t.password) values ('" + txt_name.Text.Trim() + "','" + combo_sex.SelectedItem.ToString() + "','" + txt_age.Value.ToString() + "','" + txt_phone.Text.Trim() + "','OFFLINE','" + Utility.MD5Encrypt3("111111") + "')"; @@ -84,5 +93,17 @@ this.txt_phone.Text = ""; this.txt_name.Focus(); } + + private void txt_phone_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar != 8 && !Char.IsDigit(e.KeyChar)) + { + e.Handled = true; + } + else + { + + } + } } } diff --git a/MainFrm.cs b/MainFrm.cs index 0cd5881..d36e22c 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -3454,7 +3454,7 @@ //{ // j++; //} - while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称") + while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称" || field1.Name == "模型路径") { j++; fieldName = fieldNames[j].Trim(); @@ -3506,7 +3506,7 @@ //{ // j++; //} - while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称") + while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称" || field2.Name == "模型路径") { j++; field2 = (GSOFieldDefn)feature.GetFieldDefn(j + 1); diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index e5f0003..5f7d3d2 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -82,6 +82,7 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); + this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -371,10 +372,11 @@ this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); + this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); + this.buttonItem_TaskManager = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem_OnlineTask = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem_Event = new DevComponents.DotNetBar.ButtonItem(); this.ribbonPanel8 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar_UserInfo = new DevComponents.DotNetBar.RibbonBar(); this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); @@ -384,11 +386,10 @@ this.btn_user_role = new DevComponents.DotNetBar.ButtonItem(); this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem(); this.btn_reset_password = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); - this.buttonItem_TaskManager = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem_OnlineTask = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem_Event = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -653,7 +654,6 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); - this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -691,9 +691,9 @@ this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); - this.ribbonPanel8.SuspendLayout(); this.ribbonPanel2.SuspendLayout(); + this.ribbonPanel8.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel12.SuspendLayout(); this.ribbonPanel5.SuspendLayout(); @@ -1094,6 +1094,16 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -4317,84 +4327,96 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // - // ribbonPanel7 + // ribbonPanel2 // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 0); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel2.Controls.Add(this.ribbonBar4); + this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel2.Name = "ribbonPanel2"; + this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); // // // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.Style.Class = ""; + this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.StyleMouseDown.Class = ""; + this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - this.ribbonPanel7.Visible = false; + this.ribbonPanel2.StyleMouseOver.Class = ""; + this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.TabIndex = 39; + this.ribbonPanel2.Visible = false; // - // ribbonBar5 + // ribbonBar4 // - this.ribbonBar5.AutoOverflowEnabled = true; + this.ribbonBar4.AutoOverflowEnabled = true; // // // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 92); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; + this.ribbonBar4.BackgroundStyle.Class = ""; + this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.ContainerControlProcessDialogKey = true; + this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.buttonItem_TaskManager, + this.buttonItem_OnlineTask, + this.buttonItem_Event}); + this.ribbonBar4.Location = new System.Drawing.Point(3, 0); + this.ribbonBar4.Name = "ribbonBar4"; + this.ribbonBar4.Size = new System.Drawing.Size(211, 59); + this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar4.TabIndex = 0; + this.ribbonBar4.Text = "ribbonBar4"; // // // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleStyle.Class = ""; + this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; + this.ribbonBar4.TitleStyleMouseOver.Class = ""; + this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleVisible = false; // - // btn_flag + // buttonItem_TaskManager // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + this.buttonItem_TaskManager.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__76; + this.buttonItem_TaskManager.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_TaskManager.Name = "buttonItem_TaskManager"; + this.buttonItem_TaskManager.SubItemsExpandWidth = 14; + this.buttonItem_TaskManager.Text = "工单管理"; + this.buttonItem_TaskManager.Click += new System.EventHandler(this.buttonItem_TaskManager_Click); // - // slider4ground + // buttonItem_OnlineTask // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + this.buttonItem_OnlineTask.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__69; + this.buttonItem_OnlineTask.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_OnlineTask.Name = "buttonItem_OnlineTask"; + this.buttonItem_OnlineTask.SubItemsExpandWidth = 14; + this.buttonItem_OnlineTask.Text = "在线任务"; + this.buttonItem_OnlineTask.Click += new System.EventHandler(this.buttonItem_OnlineTask_Click); + // + // buttonItem_Event + // + this.buttonItem_Event.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__72; + this.buttonItem_Event.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_Event.Name = "buttonItem_Event"; + this.buttonItem_Event.SubItemsExpandWidth = 14; + this.buttonItem_Event.Text = "事件管理"; + this.buttonItem_Event.Click += new System.EventHandler(this.buttonItem_Event_Click); // // ribbonPanel8 // @@ -4525,96 +4547,84 @@ this.btn_reset_password.Text = "重置密码"; this.btn_reset_password.Click += new System.EventHandler(this.btn_reset_password_Click); // - // ribbonPanel2 + // ribbonPanel7 // - this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel2.Controls.Add(this.ribbonBar4); - this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel2.Name = "ribbonPanel2"; - this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 95); // // // - this.ribbonPanel2.Style.Class = ""; - this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel2.StyleMouseDown.Class = ""; - this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel2.StyleMouseOver.Class = ""; - this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; // - // ribbonBar4 + // ribbonBar5 // - this.ribbonBar4.AutoOverflowEnabled = true; + this.ribbonBar5.AutoOverflowEnabled = true; // // // - this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar4.BackgroundStyle.Class = ""; - this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.ContainerControlProcessDialogKey = true; - this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.buttonItem_TaskManager, - this.buttonItem_OnlineTask, - this.buttonItem_Event}); - this.ribbonBar4.Location = new System.Drawing.Point(3, 0); - this.ribbonBar4.Name = "ribbonBar4"; - this.ribbonBar4.Size = new System.Drawing.Size(211, 59); - this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar4.TabIndex = 0; - this.ribbonBar4.Text = "ribbonBar4"; + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 92); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; // // // - this.ribbonBar4.TitleStyle.Class = ""; - this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar4.TitleStyleMouseOver.Class = ""; - this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.TitleVisible = false; + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; // - // buttonItem_TaskManager + // btn_flag // - this.buttonItem_TaskManager.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__76; - this.buttonItem_TaskManager.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_TaskManager.Name = "buttonItem_TaskManager"; - this.buttonItem_TaskManager.SubItemsExpandWidth = 14; - this.buttonItem_TaskManager.Text = "工单管理"; - this.buttonItem_TaskManager.Click += new System.EventHandler(this.buttonItem_TaskManager_Click); + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); // - // buttonItem_OnlineTask + // slider4ground // - this.buttonItem_OnlineTask.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__69; - this.buttonItem_OnlineTask.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_OnlineTask.Name = "buttonItem_OnlineTask"; - this.buttonItem_OnlineTask.SubItemsExpandWidth = 14; - this.buttonItem_OnlineTask.Text = "在线任务"; - this.buttonItem_OnlineTask.Click += new System.EventHandler(this.buttonItem_OnlineTask_Click); - // - // buttonItem_Event - // - this.buttonItem_Event.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__72; - this.buttonItem_Event.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_Event.Name = "buttonItem_Event"; - this.buttonItem_Event.SubItemsExpandWidth = 14; - this.buttonItem_Event.Text = "事件管理"; - this.buttonItem_Event.Click += new System.EventHandler(this.buttonItem_Event_Click); + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); // // ribbonPanel15 // @@ -7098,16 +7108,6 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7182,9 +7182,9 @@ this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); this.ribbonPanel3.ResumeLayout(false); - this.ribbonPanel7.ResumeLayout(false); - this.ribbonPanel8.ResumeLayout(false); this.ribbonPanel2.ResumeLayout(false); + this.ribbonPanel8.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel12.ResumeLayout(false); this.ribbonPanel5.ResumeLayout(false); diff --git a/Program.cs b/Program.cs index f009c8a..12e6ecf 100644 --- a/Program.cs +++ b/Program.cs @@ -10,6 +10,7 @@ { static class Program { + static string ent = "C:\\EMSCyberPipe"; /// /// The main entry point for the application. /// @@ -30,18 +31,31 @@ String newVersionCode = getVersionCode(configUrl, currentVersionCode); if (newVersionCode != currentVersionCode) { - if (MessageBox.Show("检测到新版本,是否立即更新?", "智慧管网太湖新城规划分析系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + if (MessageBox.Show("检测到新版本,是否立即更新?", "智慧管网太湖新城电子标识系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { + + remoteUpDate(); + string programUrl = getProgramUrl(localConfigPath, "programurl"); if (programUrl != "") { - FrmDownloadProgress frmdownload = FrmDownloadProgress.getForm(programUrl); + + //FrmDownloadProgress frmdownload = FrmDownloadProgress.getForm(programUrl); + Process.Start(ent + "/UpDateProgress.exe").WaitForExit(); return; } + } else { - + /* + System.Diagnostics.Process[] proc = System.Diagnostics.Process.GetProcessesByName("UpDateProgress"); + //关闭原有应用程序的所有进程 + foreach (System.Diagnostics.Process pro in proc) + { + pro.Kill(); + } + * */ } } } @@ -51,7 +65,55 @@ FrmLogin frm = new FrmLogin(); if (frm.ShowDialog() == DialogResult.OK) { - Application.Run(new MainFrm()); + if (Utility.userRole != null) + { + Application.Run(new MainFrm()); + } + else + { + MessageBox.Show("该用户没有分配任何角色!"); + return; + } + } + } + + private static void remoteUpDate() + { + if (!File.Exists(ent)) + { + Directory.CreateDirectory(ent); + } + string filePath_exe = ent + "\\UpDateProgress.exe"; + string filePath_exeConfig = ent + "\\UpDateProgress.exe.config"; + string filePath_exePdb = ent + "\\UpDateProgress.pdb"; + string filePath_config = ent + "\\Config.xml"; + + string localPath_exe = Application.StartupPath + "\\UpDateProgress.exe"; + string localPath_exeConfig = Application.StartupPath + "\\UpDateProgress.exe.config"; + string localPath_exePdb = Application.StartupPath + "\\UpDateProgress.pdb"; + string localPath_config = Application.StartupPath + "\\Config.xml"; + + //TODO LIST:判断文件是否存在,存在就删除 + //delOldVersion(filePath_exe); + File.Copy(localPath_exe, filePath_exe, true); + File.Copy(localPath_exeConfig, filePath_exeConfig, true); + File.Copy(localPath_exePdb, filePath_exePdb, true); + File.Copy(localPath_config, filePath_config, true); + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); } } @@ -96,7 +158,6 @@ } xmlReader.Close(); - } catch (Exception e) { @@ -106,6 +167,5 @@ return versionCode; } - } } diff --git a/bin/x86/Debug/Config.xml b/bin/x86/Debug/Config.xml index 560a163..5431500 100644 --- a/bin/x86/Debug/Config.xml +++ b/bin/x86/Debug/Config.xml @@ -14,8 +14,8 @@ http://192.168.0.122:8088/UpDownFile.asmx - http://192.168.10.229/EMSCyberpipe.msi - http://192.168.10.229/EMSConfig.xml + http://192.168.0.203/EMSCyberpipe.msi + http://192.168.0.203/EMSConfig.xml diff --git a/bin/x86/Debug/EMSCyberpipe.exe b/bin/x86/Debug/EMSCyberpipe.exe index 9188a0f..65317a1 100644 --- a/bin/x86/Debug/EMSCyberpipe.exe +++ b/bin/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/Cyberpipe.suo b/Cyberpipe.suo index cc8242f..7b935a0 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EditTask.cs b/EMS_Forms/Form_EditTask.cs index 72d3e8e..30a9765 100644 --- a/EMS_Forms/Form_EditTask.cs +++ b/EMS_Forms/Form_EditTask.cs @@ -23,7 +23,6 @@ public static List checkLists = new List(); OracleConnection conn = null; - List BSQFeatures = new List(); public static List roadList = new List(); @@ -193,10 +192,8 @@ private void Form_EditTask_FormClosing(object sender, FormClosingEventArgs e) { - for (int i = 0; i < BSQFeatures.Count; i++) - { - BSQFeatures[i].Label = null; - } + + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); globeControl1.TrackPolygonEndEvent -= new TrackPolygonEndEventHandler(TrackPolygonEndEvent); } @@ -340,6 +337,7 @@ //f.Geometry = model; //GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + GSOLabel label = new GSOLabel(); label.Text = "标识器位置"; @@ -351,8 +349,14 @@ label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); features[0].Label = label; - BSQFeatures.Add(features[0]); - globeControl1.Globe.JumpToFeature(features[0], 10); + GSOFeature f = new GSOFeature(); + f.Geometry = features[0].Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + + globeControl1.Globe.JumpToFeature(newFeature, 10); } else diff --git a/FrmFlagEdits.cs b/FrmFlagEdits.cs index ff25a41..04a9f90 100644 --- a/FrmFlagEdits.cs +++ b/FrmFlagEdits.cs @@ -17,6 +17,9 @@ InitializeComponent(); } string id = ""; + public delegate void Handle(); + public event Handle refresh; + public FrmFlagEdits(string id, string flagid, string flagno, string flagtype, string deep, string street,string gc) { @@ -52,9 +55,10 @@ "t.所属道路 = '" + txt_street.Text.Trim() + "'" + "where t.LSSYS_ID =" + id; OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql); - if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.YesNo, MessageBoxIcon.Question)==DialogResult.Yes) + if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Question)==DialogResult.OK) { this.Close(); + refresh(); } } catch (Exception ex) diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 9bf9734..8d89f55 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -27,7 +27,6 @@ int rows = 0; public static GeoScene.Engine.GSODataSource ds = null; TreeNode layerManagerNode = null; - List Features = new List(); public FrmFlagManagers(GSOGlobeControl _globeControl1) { @@ -139,6 +138,7 @@ string street = row.Cells["所属道路"].Value.ToString(); FrmFlagEdits frm = new FrmFlagEdits(id, flagid, flagno,flagtype, deep, street,gc); + frm.refresh += new FrmFlagEdits.Handle(LoadData);//改变值的事件 frm.ShowDialog(); winGridViewPager1.Refresh(); } @@ -149,66 +149,7 @@ } } - /// - /// 对象查看 - /// - /// - /// - private void winGridViewPager1_OnAddNew(object sender, EventArgs e) - { - DataGridView grid = sender as DataGridView; - if (grid != null) - { - DataGridViewRow row = grid.SelectedRows[0]; - try - { - this.WindowState = FormWindowState.Minimized; - string id = row.Cells["LSSYS_ID"].Value.ToString(); - string flagno = row.Cells["编号"].Value.ToString(); - string flagstreet = row.Cells["所属道路"].Value.ToString(); - double x = Convert.ToDouble(row.Cells["X坐标"].Value); - double y = Convert.ToDouble(row.Cells["Y坐标"].Value); - GSOFeature flagFeature = globeControl1.Globe.Layers.GetLayerByCaption("标识器").GetFeatureByID(int.Parse(id)); - string type = ""; - string pipe = ""; - string sql = "select t.标识器型号,t.对象编号 from 标识器 t where t.编号='" + flagno + "'"; - using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) - { - while (reader.Read()) - { - type = reader.GetString(0); - pipe = reader.GetString(1); - } - } - - GSOLabel label = new GSOLabel(); - label.Text = "标识器编号:" + flagno + "\r\n" + - "标识器类型:" + type + "\r\n" + - //"标识对象编号:" + pipe + "\r\n" + - "所属道路:" + flagstreet; - label.Style = new GSOLabelStyle(); - label.Style.TextStyle.FontSize = 18; - label.Style.TextStyle.ForeColor = Color.FromArgb(0, 0, 0, 255); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 10; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); - this.globeControl1.Refresh(); - - } - catch (Exception ex) - { - MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - - } - } /// /// 标识器报废 /// @@ -363,13 +304,9 @@ //Thread downloadJob = new Thread(new ParameterizedThreadStart(doSave)); //downloadJob.IsBackground = true; //downloadJob.Start(e); - globeControl1.Globe.Layers["标识器"].Save(); + //globeControl1.Globe.Layers["标识器"].Save(); globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - foreach (GSOFeature f in Features) - { - f.Label = null; - } - Features.RemoveRange(0, Features.Count); + globeControl1.Refresh(); } @@ -525,6 +462,7 @@ } } + GSOLabel label = new GSOLabel(); label.Text = "标识器编号:" + flagno + "\r\n" + "标识器类型:" + type + "\r\n" + @@ -539,9 +477,13 @@ label.Style.TextStyle.FontName = "黑体"; label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); + GSOFeature f = new GSOFeature(); + f.Geometry = flagFeature.Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize=-1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + globeControl1.Globe.JumpToFeature(newFeature, 20); this.globeControl1.Refresh(); } diff --git a/FrmPatrolerEdit.Designer.cs b/FrmPatrolerEdit.Designer.cs index c551efc..34ee75b 100644 --- a/FrmPatrolerEdit.Designer.cs +++ b/FrmPatrolerEdit.Designer.cs @@ -132,6 +132,7 @@ this.txt_phone.Name = "txt_phone"; this.txt_phone.Size = new System.Drawing.Size(172, 21); this.txt_phone.TabIndex = 15; + this.txt_phone.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_phone_KeyPress); // // combo_sex // diff --git a/FrmPatrolerEdit.cs b/FrmPatrolerEdit.cs index f45b5ae..f0ee553 100644 --- a/FrmPatrolerEdit.cs +++ b/FrmPatrolerEdit.cs @@ -54,6 +54,15 @@ } try { + string sqlCount = "select count(*) from patroler where username='"+txt_name.Text.Trim()+"'"; + int rows = 0; + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + if (rows>0) + { + MessageBox.Show("巡检人员已存在,请更换用户名", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + if (String.IsNullOrEmpty(lab_dbid.Text.Trim())) { String sql = "insert into patroler t (t.username,t.sex,t.age,t.phonenum,t.accountstate,t.password) values ('" + txt_name.Text.Trim() + "','" + combo_sex.SelectedItem.ToString() + "','" + txt_age.Value.ToString() + "','" + txt_phone.Text.Trim() + "','OFFLINE','" + Utility.MD5Encrypt3("111111") + "')"; @@ -84,5 +93,17 @@ this.txt_phone.Text = ""; this.txt_name.Focus(); } + + private void txt_phone_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar != 8 && !Char.IsDigit(e.KeyChar)) + { + e.Handled = true; + } + else + { + + } + } } } diff --git a/MainFrm.cs b/MainFrm.cs index 0cd5881..d36e22c 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -3454,7 +3454,7 @@ //{ // j++; //} - while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称") + while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称" || field1.Name == "模型路径") { j++; fieldName = fieldNames[j].Trim(); @@ -3506,7 +3506,7 @@ //{ // j++; //} - while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称") + while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称" || field2.Name == "模型路径") { j++; field2 = (GSOFieldDefn)feature.GetFieldDefn(j + 1); diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index e5f0003..5f7d3d2 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -82,6 +82,7 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); + this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -371,10 +372,11 @@ this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); + this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); + this.buttonItem_TaskManager = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem_OnlineTask = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem_Event = new DevComponents.DotNetBar.ButtonItem(); this.ribbonPanel8 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar_UserInfo = new DevComponents.DotNetBar.RibbonBar(); this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); @@ -384,11 +386,10 @@ this.btn_user_role = new DevComponents.DotNetBar.ButtonItem(); this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem(); this.btn_reset_password = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); - this.buttonItem_TaskManager = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem_OnlineTask = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem_Event = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -653,7 +654,6 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); - this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -691,9 +691,9 @@ this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); - this.ribbonPanel8.SuspendLayout(); this.ribbonPanel2.SuspendLayout(); + this.ribbonPanel8.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel12.SuspendLayout(); this.ribbonPanel5.SuspendLayout(); @@ -1094,6 +1094,16 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -4317,84 +4327,96 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // - // ribbonPanel7 + // ribbonPanel2 // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 0); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel2.Controls.Add(this.ribbonBar4); + this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel2.Name = "ribbonPanel2"; + this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); // // // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.Style.Class = ""; + this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.StyleMouseDown.Class = ""; + this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - this.ribbonPanel7.Visible = false; + this.ribbonPanel2.StyleMouseOver.Class = ""; + this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.TabIndex = 39; + this.ribbonPanel2.Visible = false; // - // ribbonBar5 + // ribbonBar4 // - this.ribbonBar5.AutoOverflowEnabled = true; + this.ribbonBar4.AutoOverflowEnabled = true; // // // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 92); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; + this.ribbonBar4.BackgroundStyle.Class = ""; + this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.ContainerControlProcessDialogKey = true; + this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.buttonItem_TaskManager, + this.buttonItem_OnlineTask, + this.buttonItem_Event}); + this.ribbonBar4.Location = new System.Drawing.Point(3, 0); + this.ribbonBar4.Name = "ribbonBar4"; + this.ribbonBar4.Size = new System.Drawing.Size(211, 59); + this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar4.TabIndex = 0; + this.ribbonBar4.Text = "ribbonBar4"; // // // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleStyle.Class = ""; + this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; + this.ribbonBar4.TitleStyleMouseOver.Class = ""; + this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleVisible = false; // - // btn_flag + // buttonItem_TaskManager // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + this.buttonItem_TaskManager.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__76; + this.buttonItem_TaskManager.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_TaskManager.Name = "buttonItem_TaskManager"; + this.buttonItem_TaskManager.SubItemsExpandWidth = 14; + this.buttonItem_TaskManager.Text = "工单管理"; + this.buttonItem_TaskManager.Click += new System.EventHandler(this.buttonItem_TaskManager_Click); // - // slider4ground + // buttonItem_OnlineTask // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + this.buttonItem_OnlineTask.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__69; + this.buttonItem_OnlineTask.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_OnlineTask.Name = "buttonItem_OnlineTask"; + this.buttonItem_OnlineTask.SubItemsExpandWidth = 14; + this.buttonItem_OnlineTask.Text = "在线任务"; + this.buttonItem_OnlineTask.Click += new System.EventHandler(this.buttonItem_OnlineTask_Click); + // + // buttonItem_Event + // + this.buttonItem_Event.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__72; + this.buttonItem_Event.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_Event.Name = "buttonItem_Event"; + this.buttonItem_Event.SubItemsExpandWidth = 14; + this.buttonItem_Event.Text = "事件管理"; + this.buttonItem_Event.Click += new System.EventHandler(this.buttonItem_Event_Click); // // ribbonPanel8 // @@ -4525,96 +4547,84 @@ this.btn_reset_password.Text = "重置密码"; this.btn_reset_password.Click += new System.EventHandler(this.btn_reset_password_Click); // - // ribbonPanel2 + // ribbonPanel7 // - this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel2.Controls.Add(this.ribbonBar4); - this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel2.Name = "ribbonPanel2"; - this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 95); // // // - this.ribbonPanel2.Style.Class = ""; - this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel2.StyleMouseDown.Class = ""; - this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel2.StyleMouseOver.Class = ""; - this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; // - // ribbonBar4 + // ribbonBar5 // - this.ribbonBar4.AutoOverflowEnabled = true; + this.ribbonBar5.AutoOverflowEnabled = true; // // // - this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar4.BackgroundStyle.Class = ""; - this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.ContainerControlProcessDialogKey = true; - this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.buttonItem_TaskManager, - this.buttonItem_OnlineTask, - this.buttonItem_Event}); - this.ribbonBar4.Location = new System.Drawing.Point(3, 0); - this.ribbonBar4.Name = "ribbonBar4"; - this.ribbonBar4.Size = new System.Drawing.Size(211, 59); - this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar4.TabIndex = 0; - this.ribbonBar4.Text = "ribbonBar4"; + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 92); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; // // // - this.ribbonBar4.TitleStyle.Class = ""; - this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar4.TitleStyleMouseOver.Class = ""; - this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.TitleVisible = false; + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; // - // buttonItem_TaskManager + // btn_flag // - this.buttonItem_TaskManager.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__76; - this.buttonItem_TaskManager.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_TaskManager.Name = "buttonItem_TaskManager"; - this.buttonItem_TaskManager.SubItemsExpandWidth = 14; - this.buttonItem_TaskManager.Text = "工单管理"; - this.buttonItem_TaskManager.Click += new System.EventHandler(this.buttonItem_TaskManager_Click); + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); // - // buttonItem_OnlineTask + // slider4ground // - this.buttonItem_OnlineTask.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__69; - this.buttonItem_OnlineTask.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_OnlineTask.Name = "buttonItem_OnlineTask"; - this.buttonItem_OnlineTask.SubItemsExpandWidth = 14; - this.buttonItem_OnlineTask.Text = "在线任务"; - this.buttonItem_OnlineTask.Click += new System.EventHandler(this.buttonItem_OnlineTask_Click); - // - // buttonItem_Event - // - this.buttonItem_Event.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__72; - this.buttonItem_Event.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_Event.Name = "buttonItem_Event"; - this.buttonItem_Event.SubItemsExpandWidth = 14; - this.buttonItem_Event.Text = "事件管理"; - this.buttonItem_Event.Click += new System.EventHandler(this.buttonItem_Event_Click); + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); // // ribbonPanel15 // @@ -7098,16 +7108,6 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7182,9 +7182,9 @@ this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); this.ribbonPanel3.ResumeLayout(false); - this.ribbonPanel7.ResumeLayout(false); - this.ribbonPanel8.ResumeLayout(false); this.ribbonPanel2.ResumeLayout(false); + this.ribbonPanel8.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel12.ResumeLayout(false); this.ribbonPanel5.ResumeLayout(false); diff --git a/Program.cs b/Program.cs index f009c8a..12e6ecf 100644 --- a/Program.cs +++ b/Program.cs @@ -10,6 +10,7 @@ { static class Program { + static string ent = "C:\\EMSCyberPipe"; /// /// The main entry point for the application. /// @@ -30,18 +31,31 @@ String newVersionCode = getVersionCode(configUrl, currentVersionCode); if (newVersionCode != currentVersionCode) { - if (MessageBox.Show("检测到新版本,是否立即更新?", "智慧管网太湖新城规划分析系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + if (MessageBox.Show("检测到新版本,是否立即更新?", "智慧管网太湖新城电子标识系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { + + remoteUpDate(); + string programUrl = getProgramUrl(localConfigPath, "programurl"); if (programUrl != "") { - FrmDownloadProgress frmdownload = FrmDownloadProgress.getForm(programUrl); + + //FrmDownloadProgress frmdownload = FrmDownloadProgress.getForm(programUrl); + Process.Start(ent + "/UpDateProgress.exe").WaitForExit(); return; } + } else { - + /* + System.Diagnostics.Process[] proc = System.Diagnostics.Process.GetProcessesByName("UpDateProgress"); + //关闭原有应用程序的所有进程 + foreach (System.Diagnostics.Process pro in proc) + { + pro.Kill(); + } + * */ } } } @@ -51,7 +65,55 @@ FrmLogin frm = new FrmLogin(); if (frm.ShowDialog() == DialogResult.OK) { - Application.Run(new MainFrm()); + if (Utility.userRole != null) + { + Application.Run(new MainFrm()); + } + else + { + MessageBox.Show("该用户没有分配任何角色!"); + return; + } + } + } + + private static void remoteUpDate() + { + if (!File.Exists(ent)) + { + Directory.CreateDirectory(ent); + } + string filePath_exe = ent + "\\UpDateProgress.exe"; + string filePath_exeConfig = ent + "\\UpDateProgress.exe.config"; + string filePath_exePdb = ent + "\\UpDateProgress.pdb"; + string filePath_config = ent + "\\Config.xml"; + + string localPath_exe = Application.StartupPath + "\\UpDateProgress.exe"; + string localPath_exeConfig = Application.StartupPath + "\\UpDateProgress.exe.config"; + string localPath_exePdb = Application.StartupPath + "\\UpDateProgress.pdb"; + string localPath_config = Application.StartupPath + "\\Config.xml"; + + //TODO LIST:判断文件是否存在,存在就删除 + //delOldVersion(filePath_exe); + File.Copy(localPath_exe, filePath_exe, true); + File.Copy(localPath_exeConfig, filePath_exeConfig, true); + File.Copy(localPath_exePdb, filePath_exePdb, true); + File.Copy(localPath_config, filePath_config, true); + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); } } @@ -96,7 +158,6 @@ } xmlReader.Close(); - } catch (Exception e) { @@ -106,6 +167,5 @@ return versionCode; } - } } diff --git a/bin/x86/Debug/Config.xml b/bin/x86/Debug/Config.xml index 560a163..5431500 100644 --- a/bin/x86/Debug/Config.xml +++ b/bin/x86/Debug/Config.xml @@ -14,8 +14,8 @@ http://192.168.0.122:8088/UpDownFile.asmx - http://192.168.10.229/EMSCyberpipe.msi - http://192.168.10.229/EMSConfig.xml + http://192.168.0.203/EMSCyberpipe.msi + http://192.168.0.203/EMSConfig.xml diff --git a/bin/x86/Debug/EMSCyberpipe.exe b/bin/x86/Debug/EMSCyberpipe.exe index 9188a0f..65317a1 100644 --- a/bin/x86/Debug/EMSCyberpipe.exe +++ b/bin/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.pdb b/bin/x86/Debug/EMSCyberpipe.pdb index 1be6757..51a61bb 100644 --- a/bin/x86/Debug/EMSCyberpipe.pdb +++ b/bin/x86/Debug/EMSCyberpipe.pdb Binary files differ diff --git a/Cyberpipe.suo b/Cyberpipe.suo index cc8242f..7b935a0 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EditTask.cs b/EMS_Forms/Form_EditTask.cs index 72d3e8e..30a9765 100644 --- a/EMS_Forms/Form_EditTask.cs +++ b/EMS_Forms/Form_EditTask.cs @@ -23,7 +23,6 @@ public static List checkLists = new List(); OracleConnection conn = null; - List BSQFeatures = new List(); public static List roadList = new List(); @@ -193,10 +192,8 @@ private void Form_EditTask_FormClosing(object sender, FormClosingEventArgs e) { - for (int i = 0; i < BSQFeatures.Count; i++) - { - BSQFeatures[i].Label = null; - } + + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); globeControl1.TrackPolygonEndEvent -= new TrackPolygonEndEventHandler(TrackPolygonEndEvent); } @@ -340,6 +337,7 @@ //f.Geometry = model; //GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + GSOLabel label = new GSOLabel(); label.Text = "标识器位置"; @@ -351,8 +349,14 @@ label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); features[0].Label = label; - BSQFeatures.Add(features[0]); - globeControl1.Globe.JumpToFeature(features[0], 10); + GSOFeature f = new GSOFeature(); + f.Geometry = features[0].Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + + globeControl1.Globe.JumpToFeature(newFeature, 10); } else diff --git a/FrmFlagEdits.cs b/FrmFlagEdits.cs index ff25a41..04a9f90 100644 --- a/FrmFlagEdits.cs +++ b/FrmFlagEdits.cs @@ -17,6 +17,9 @@ InitializeComponent(); } string id = ""; + public delegate void Handle(); + public event Handle refresh; + public FrmFlagEdits(string id, string flagid, string flagno, string flagtype, string deep, string street,string gc) { @@ -52,9 +55,10 @@ "t.所属道路 = '" + txt_street.Text.Trim() + "'" + "where t.LSSYS_ID =" + id; OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql); - if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.YesNo, MessageBoxIcon.Question)==DialogResult.Yes) + if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Question)==DialogResult.OK) { this.Close(); + refresh(); } } catch (Exception ex) diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 9bf9734..8d89f55 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -27,7 +27,6 @@ int rows = 0; public static GeoScene.Engine.GSODataSource ds = null; TreeNode layerManagerNode = null; - List Features = new List(); public FrmFlagManagers(GSOGlobeControl _globeControl1) { @@ -139,6 +138,7 @@ string street = row.Cells["所属道路"].Value.ToString(); FrmFlagEdits frm = new FrmFlagEdits(id, flagid, flagno,flagtype, deep, street,gc); + frm.refresh += new FrmFlagEdits.Handle(LoadData);//改变值的事件 frm.ShowDialog(); winGridViewPager1.Refresh(); } @@ -149,66 +149,7 @@ } } - /// - /// 对象查看 - /// - /// - /// - private void winGridViewPager1_OnAddNew(object sender, EventArgs e) - { - DataGridView grid = sender as DataGridView; - if (grid != null) - { - DataGridViewRow row = grid.SelectedRows[0]; - try - { - this.WindowState = FormWindowState.Minimized; - string id = row.Cells["LSSYS_ID"].Value.ToString(); - string flagno = row.Cells["编号"].Value.ToString(); - string flagstreet = row.Cells["所属道路"].Value.ToString(); - double x = Convert.ToDouble(row.Cells["X坐标"].Value); - double y = Convert.ToDouble(row.Cells["Y坐标"].Value); - GSOFeature flagFeature = globeControl1.Globe.Layers.GetLayerByCaption("标识器").GetFeatureByID(int.Parse(id)); - string type = ""; - string pipe = ""; - string sql = "select t.标识器型号,t.对象编号 from 标识器 t where t.编号='" + flagno + "'"; - using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) - { - while (reader.Read()) - { - type = reader.GetString(0); - pipe = reader.GetString(1); - } - } - - GSOLabel label = new GSOLabel(); - label.Text = "标识器编号:" + flagno + "\r\n" + - "标识器类型:" + type + "\r\n" + - //"标识对象编号:" + pipe + "\r\n" + - "所属道路:" + flagstreet; - label.Style = new GSOLabelStyle(); - label.Style.TextStyle.FontSize = 18; - label.Style.TextStyle.ForeColor = Color.FromArgb(0, 0, 0, 255); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 10; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); - this.globeControl1.Refresh(); - - } - catch (Exception ex) - { - MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - - } - } /// /// 标识器报废 /// @@ -363,13 +304,9 @@ //Thread downloadJob = new Thread(new ParameterizedThreadStart(doSave)); //downloadJob.IsBackground = true; //downloadJob.Start(e); - globeControl1.Globe.Layers["标识器"].Save(); + //globeControl1.Globe.Layers["标识器"].Save(); globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - foreach (GSOFeature f in Features) - { - f.Label = null; - } - Features.RemoveRange(0, Features.Count); + globeControl1.Refresh(); } @@ -525,6 +462,7 @@ } } + GSOLabel label = new GSOLabel(); label.Text = "标识器编号:" + flagno + "\r\n" + "标识器类型:" + type + "\r\n" + @@ -539,9 +477,13 @@ label.Style.TextStyle.FontName = "黑体"; label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); + GSOFeature f = new GSOFeature(); + f.Geometry = flagFeature.Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize=-1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + globeControl1.Globe.JumpToFeature(newFeature, 20); this.globeControl1.Refresh(); } diff --git a/FrmPatrolerEdit.Designer.cs b/FrmPatrolerEdit.Designer.cs index c551efc..34ee75b 100644 --- a/FrmPatrolerEdit.Designer.cs +++ b/FrmPatrolerEdit.Designer.cs @@ -132,6 +132,7 @@ this.txt_phone.Name = "txt_phone"; this.txt_phone.Size = new System.Drawing.Size(172, 21); this.txt_phone.TabIndex = 15; + this.txt_phone.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_phone_KeyPress); // // combo_sex // diff --git a/FrmPatrolerEdit.cs b/FrmPatrolerEdit.cs index f45b5ae..f0ee553 100644 --- a/FrmPatrolerEdit.cs +++ b/FrmPatrolerEdit.cs @@ -54,6 +54,15 @@ } try { + string sqlCount = "select count(*) from patroler where username='"+txt_name.Text.Trim()+"'"; + int rows = 0; + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + if (rows>0) + { + MessageBox.Show("巡检人员已存在,请更换用户名", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + if (String.IsNullOrEmpty(lab_dbid.Text.Trim())) { String sql = "insert into patroler t (t.username,t.sex,t.age,t.phonenum,t.accountstate,t.password) values ('" + txt_name.Text.Trim() + "','" + combo_sex.SelectedItem.ToString() + "','" + txt_age.Value.ToString() + "','" + txt_phone.Text.Trim() + "','OFFLINE','" + Utility.MD5Encrypt3("111111") + "')"; @@ -84,5 +93,17 @@ this.txt_phone.Text = ""; this.txt_name.Focus(); } + + private void txt_phone_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar != 8 && !Char.IsDigit(e.KeyChar)) + { + e.Handled = true; + } + else + { + + } + } } } diff --git a/MainFrm.cs b/MainFrm.cs index 0cd5881..d36e22c 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -3454,7 +3454,7 @@ //{ // j++; //} - while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称") + while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称" || field1.Name == "模型路径") { j++; fieldName = fieldNames[j].Trim(); @@ -3506,7 +3506,7 @@ //{ // j++; //} - while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称") + while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称" || field2.Name == "模型路径") { j++; field2 = (GSOFieldDefn)feature.GetFieldDefn(j + 1); diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index e5f0003..5f7d3d2 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -82,6 +82,7 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); + this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -371,10 +372,11 @@ this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); + this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); + this.buttonItem_TaskManager = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem_OnlineTask = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem_Event = new DevComponents.DotNetBar.ButtonItem(); this.ribbonPanel8 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar_UserInfo = new DevComponents.DotNetBar.RibbonBar(); this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); @@ -384,11 +386,10 @@ this.btn_user_role = new DevComponents.DotNetBar.ButtonItem(); this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem(); this.btn_reset_password = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); - this.buttonItem_TaskManager = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem_OnlineTask = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem_Event = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -653,7 +654,6 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); - this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -691,9 +691,9 @@ this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); - this.ribbonPanel8.SuspendLayout(); this.ribbonPanel2.SuspendLayout(); + this.ribbonPanel8.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel12.SuspendLayout(); this.ribbonPanel5.SuspendLayout(); @@ -1094,6 +1094,16 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -4317,84 +4327,96 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // - // ribbonPanel7 + // ribbonPanel2 // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 0); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel2.Controls.Add(this.ribbonBar4); + this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel2.Name = "ribbonPanel2"; + this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); // // // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.Style.Class = ""; + this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.StyleMouseDown.Class = ""; + this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - this.ribbonPanel7.Visible = false; + this.ribbonPanel2.StyleMouseOver.Class = ""; + this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.TabIndex = 39; + this.ribbonPanel2.Visible = false; // - // ribbonBar5 + // ribbonBar4 // - this.ribbonBar5.AutoOverflowEnabled = true; + this.ribbonBar4.AutoOverflowEnabled = true; // // // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 92); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; + this.ribbonBar4.BackgroundStyle.Class = ""; + this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.ContainerControlProcessDialogKey = true; + this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.buttonItem_TaskManager, + this.buttonItem_OnlineTask, + this.buttonItem_Event}); + this.ribbonBar4.Location = new System.Drawing.Point(3, 0); + this.ribbonBar4.Name = "ribbonBar4"; + this.ribbonBar4.Size = new System.Drawing.Size(211, 59); + this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar4.TabIndex = 0; + this.ribbonBar4.Text = "ribbonBar4"; // // // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleStyle.Class = ""; + this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; + this.ribbonBar4.TitleStyleMouseOver.Class = ""; + this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleVisible = false; // - // btn_flag + // buttonItem_TaskManager // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + this.buttonItem_TaskManager.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__76; + this.buttonItem_TaskManager.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_TaskManager.Name = "buttonItem_TaskManager"; + this.buttonItem_TaskManager.SubItemsExpandWidth = 14; + this.buttonItem_TaskManager.Text = "工单管理"; + this.buttonItem_TaskManager.Click += new System.EventHandler(this.buttonItem_TaskManager_Click); // - // slider4ground + // buttonItem_OnlineTask // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + this.buttonItem_OnlineTask.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__69; + this.buttonItem_OnlineTask.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_OnlineTask.Name = "buttonItem_OnlineTask"; + this.buttonItem_OnlineTask.SubItemsExpandWidth = 14; + this.buttonItem_OnlineTask.Text = "在线任务"; + this.buttonItem_OnlineTask.Click += new System.EventHandler(this.buttonItem_OnlineTask_Click); + // + // buttonItem_Event + // + this.buttonItem_Event.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__72; + this.buttonItem_Event.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_Event.Name = "buttonItem_Event"; + this.buttonItem_Event.SubItemsExpandWidth = 14; + this.buttonItem_Event.Text = "事件管理"; + this.buttonItem_Event.Click += new System.EventHandler(this.buttonItem_Event_Click); // // ribbonPanel8 // @@ -4525,96 +4547,84 @@ this.btn_reset_password.Text = "重置密码"; this.btn_reset_password.Click += new System.EventHandler(this.btn_reset_password_Click); // - // ribbonPanel2 + // ribbonPanel7 // - this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel2.Controls.Add(this.ribbonBar4); - this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel2.Name = "ribbonPanel2"; - this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 95); // // // - this.ribbonPanel2.Style.Class = ""; - this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel2.StyleMouseDown.Class = ""; - this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel2.StyleMouseOver.Class = ""; - this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; // - // ribbonBar4 + // ribbonBar5 // - this.ribbonBar4.AutoOverflowEnabled = true; + this.ribbonBar5.AutoOverflowEnabled = true; // // // - this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar4.BackgroundStyle.Class = ""; - this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.ContainerControlProcessDialogKey = true; - this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.buttonItem_TaskManager, - this.buttonItem_OnlineTask, - this.buttonItem_Event}); - this.ribbonBar4.Location = new System.Drawing.Point(3, 0); - this.ribbonBar4.Name = "ribbonBar4"; - this.ribbonBar4.Size = new System.Drawing.Size(211, 59); - this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar4.TabIndex = 0; - this.ribbonBar4.Text = "ribbonBar4"; + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 92); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; // // // - this.ribbonBar4.TitleStyle.Class = ""; - this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar4.TitleStyleMouseOver.Class = ""; - this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.TitleVisible = false; + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; // - // buttonItem_TaskManager + // btn_flag // - this.buttonItem_TaskManager.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__76; - this.buttonItem_TaskManager.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_TaskManager.Name = "buttonItem_TaskManager"; - this.buttonItem_TaskManager.SubItemsExpandWidth = 14; - this.buttonItem_TaskManager.Text = "工单管理"; - this.buttonItem_TaskManager.Click += new System.EventHandler(this.buttonItem_TaskManager_Click); + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); // - // buttonItem_OnlineTask + // slider4ground // - this.buttonItem_OnlineTask.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__69; - this.buttonItem_OnlineTask.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_OnlineTask.Name = "buttonItem_OnlineTask"; - this.buttonItem_OnlineTask.SubItemsExpandWidth = 14; - this.buttonItem_OnlineTask.Text = "在线任务"; - this.buttonItem_OnlineTask.Click += new System.EventHandler(this.buttonItem_OnlineTask_Click); - // - // buttonItem_Event - // - this.buttonItem_Event.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__72; - this.buttonItem_Event.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_Event.Name = "buttonItem_Event"; - this.buttonItem_Event.SubItemsExpandWidth = 14; - this.buttonItem_Event.Text = "事件管理"; - this.buttonItem_Event.Click += new System.EventHandler(this.buttonItem_Event_Click); + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); // // ribbonPanel15 // @@ -7098,16 +7108,6 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7182,9 +7182,9 @@ this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); this.ribbonPanel3.ResumeLayout(false); - this.ribbonPanel7.ResumeLayout(false); - this.ribbonPanel8.ResumeLayout(false); this.ribbonPanel2.ResumeLayout(false); + this.ribbonPanel8.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel12.ResumeLayout(false); this.ribbonPanel5.ResumeLayout(false); diff --git a/Program.cs b/Program.cs index f009c8a..12e6ecf 100644 --- a/Program.cs +++ b/Program.cs @@ -10,6 +10,7 @@ { static class Program { + static string ent = "C:\\EMSCyberPipe"; /// /// The main entry point for the application. /// @@ -30,18 +31,31 @@ String newVersionCode = getVersionCode(configUrl, currentVersionCode); if (newVersionCode != currentVersionCode) { - if (MessageBox.Show("检测到新版本,是否立即更新?", "智慧管网太湖新城规划分析系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + if (MessageBox.Show("检测到新版本,是否立即更新?", "智慧管网太湖新城电子标识系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { + + remoteUpDate(); + string programUrl = getProgramUrl(localConfigPath, "programurl"); if (programUrl != "") { - FrmDownloadProgress frmdownload = FrmDownloadProgress.getForm(programUrl); + + //FrmDownloadProgress frmdownload = FrmDownloadProgress.getForm(programUrl); + Process.Start(ent + "/UpDateProgress.exe").WaitForExit(); return; } + } else { - + /* + System.Diagnostics.Process[] proc = System.Diagnostics.Process.GetProcessesByName("UpDateProgress"); + //关闭原有应用程序的所有进程 + foreach (System.Diagnostics.Process pro in proc) + { + pro.Kill(); + } + * */ } } } @@ -51,7 +65,55 @@ FrmLogin frm = new FrmLogin(); if (frm.ShowDialog() == DialogResult.OK) { - Application.Run(new MainFrm()); + if (Utility.userRole != null) + { + Application.Run(new MainFrm()); + } + else + { + MessageBox.Show("该用户没有分配任何角色!"); + return; + } + } + } + + private static void remoteUpDate() + { + if (!File.Exists(ent)) + { + Directory.CreateDirectory(ent); + } + string filePath_exe = ent + "\\UpDateProgress.exe"; + string filePath_exeConfig = ent + "\\UpDateProgress.exe.config"; + string filePath_exePdb = ent + "\\UpDateProgress.pdb"; + string filePath_config = ent + "\\Config.xml"; + + string localPath_exe = Application.StartupPath + "\\UpDateProgress.exe"; + string localPath_exeConfig = Application.StartupPath + "\\UpDateProgress.exe.config"; + string localPath_exePdb = Application.StartupPath + "\\UpDateProgress.pdb"; + string localPath_config = Application.StartupPath + "\\Config.xml"; + + //TODO LIST:判断文件是否存在,存在就删除 + //delOldVersion(filePath_exe); + File.Copy(localPath_exe, filePath_exe, true); + File.Copy(localPath_exeConfig, filePath_exeConfig, true); + File.Copy(localPath_exePdb, filePath_exePdb, true); + File.Copy(localPath_config, filePath_config, true); + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); } } @@ -96,7 +158,6 @@ } xmlReader.Close(); - } catch (Exception e) { @@ -106,6 +167,5 @@ return versionCode; } - } } diff --git a/bin/x86/Debug/Config.xml b/bin/x86/Debug/Config.xml index 560a163..5431500 100644 --- a/bin/x86/Debug/Config.xml +++ b/bin/x86/Debug/Config.xml @@ -14,8 +14,8 @@ http://192.168.0.122:8088/UpDownFile.asmx - http://192.168.10.229/EMSCyberpipe.msi - http://192.168.10.229/EMSConfig.xml + http://192.168.0.203/EMSCyberpipe.msi + http://192.168.0.203/EMSConfig.xml diff --git a/bin/x86/Debug/EMSCyberpipe.exe b/bin/x86/Debug/EMSCyberpipe.exe index 9188a0f..65317a1 100644 --- a/bin/x86/Debug/EMSCyberpipe.exe +++ b/bin/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.pdb b/bin/x86/Debug/EMSCyberpipe.pdb index 1be6757..51a61bb 100644 --- a/bin/x86/Debug/EMSCyberpipe.pdb +++ b/bin/x86/Debug/EMSCyberpipe.pdb Binary files differ diff --git a/bin/x86/Debug/UpDateProgress.exe.config b/bin/x86/Debug/UpDateProgress.exe.config new file mode 100644 index 0000000..e365603 --- /dev/null +++ b/bin/x86/Debug/UpDateProgress.exe.config @@ -0,0 +1,3 @@ + + + diff --git a/Cyberpipe.suo b/Cyberpipe.suo index cc8242f..7b935a0 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EditTask.cs b/EMS_Forms/Form_EditTask.cs index 72d3e8e..30a9765 100644 --- a/EMS_Forms/Form_EditTask.cs +++ b/EMS_Forms/Form_EditTask.cs @@ -23,7 +23,6 @@ public static List checkLists = new List(); OracleConnection conn = null; - List BSQFeatures = new List(); public static List roadList = new List(); @@ -193,10 +192,8 @@ private void Form_EditTask_FormClosing(object sender, FormClosingEventArgs e) { - for (int i = 0; i < BSQFeatures.Count; i++) - { - BSQFeatures[i].Label = null; - } + + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); globeControl1.TrackPolygonEndEvent -= new TrackPolygonEndEventHandler(TrackPolygonEndEvent); } @@ -340,6 +337,7 @@ //f.Geometry = model; //GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + GSOLabel label = new GSOLabel(); label.Text = "标识器位置"; @@ -351,8 +349,14 @@ label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); features[0].Label = label; - BSQFeatures.Add(features[0]); - globeControl1.Globe.JumpToFeature(features[0], 10); + GSOFeature f = new GSOFeature(); + f.Geometry = features[0].Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + + globeControl1.Globe.JumpToFeature(newFeature, 10); } else diff --git a/FrmFlagEdits.cs b/FrmFlagEdits.cs index ff25a41..04a9f90 100644 --- a/FrmFlagEdits.cs +++ b/FrmFlagEdits.cs @@ -17,6 +17,9 @@ InitializeComponent(); } string id = ""; + public delegate void Handle(); + public event Handle refresh; + public FrmFlagEdits(string id, string flagid, string flagno, string flagtype, string deep, string street,string gc) { @@ -52,9 +55,10 @@ "t.所属道路 = '" + txt_street.Text.Trim() + "'" + "where t.LSSYS_ID =" + id; OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql); - if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.YesNo, MessageBoxIcon.Question)==DialogResult.Yes) + if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Question)==DialogResult.OK) { this.Close(); + refresh(); } } catch (Exception ex) diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 9bf9734..8d89f55 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -27,7 +27,6 @@ int rows = 0; public static GeoScene.Engine.GSODataSource ds = null; TreeNode layerManagerNode = null; - List Features = new List(); public FrmFlagManagers(GSOGlobeControl _globeControl1) { @@ -139,6 +138,7 @@ string street = row.Cells["所属道路"].Value.ToString(); FrmFlagEdits frm = new FrmFlagEdits(id, flagid, flagno,flagtype, deep, street,gc); + frm.refresh += new FrmFlagEdits.Handle(LoadData);//改变值的事件 frm.ShowDialog(); winGridViewPager1.Refresh(); } @@ -149,66 +149,7 @@ } } - /// - /// 对象查看 - /// - /// - /// - private void winGridViewPager1_OnAddNew(object sender, EventArgs e) - { - DataGridView grid = sender as DataGridView; - if (grid != null) - { - DataGridViewRow row = grid.SelectedRows[0]; - try - { - this.WindowState = FormWindowState.Minimized; - string id = row.Cells["LSSYS_ID"].Value.ToString(); - string flagno = row.Cells["编号"].Value.ToString(); - string flagstreet = row.Cells["所属道路"].Value.ToString(); - double x = Convert.ToDouble(row.Cells["X坐标"].Value); - double y = Convert.ToDouble(row.Cells["Y坐标"].Value); - GSOFeature flagFeature = globeControl1.Globe.Layers.GetLayerByCaption("标识器").GetFeatureByID(int.Parse(id)); - string type = ""; - string pipe = ""; - string sql = "select t.标识器型号,t.对象编号 from 标识器 t where t.编号='" + flagno + "'"; - using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) - { - while (reader.Read()) - { - type = reader.GetString(0); - pipe = reader.GetString(1); - } - } - - GSOLabel label = new GSOLabel(); - label.Text = "标识器编号:" + flagno + "\r\n" + - "标识器类型:" + type + "\r\n" + - //"标识对象编号:" + pipe + "\r\n" + - "所属道路:" + flagstreet; - label.Style = new GSOLabelStyle(); - label.Style.TextStyle.FontSize = 18; - label.Style.TextStyle.ForeColor = Color.FromArgb(0, 0, 0, 255); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 10; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); - this.globeControl1.Refresh(); - - } - catch (Exception ex) - { - MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - - } - } /// /// 标识器报废 /// @@ -363,13 +304,9 @@ //Thread downloadJob = new Thread(new ParameterizedThreadStart(doSave)); //downloadJob.IsBackground = true; //downloadJob.Start(e); - globeControl1.Globe.Layers["标识器"].Save(); + //globeControl1.Globe.Layers["标识器"].Save(); globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - foreach (GSOFeature f in Features) - { - f.Label = null; - } - Features.RemoveRange(0, Features.Count); + globeControl1.Refresh(); } @@ -525,6 +462,7 @@ } } + GSOLabel label = new GSOLabel(); label.Text = "标识器编号:" + flagno + "\r\n" + "标识器类型:" + type + "\r\n" + @@ -539,9 +477,13 @@ label.Style.TextStyle.FontName = "黑体"; label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); + GSOFeature f = new GSOFeature(); + f.Geometry = flagFeature.Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize=-1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + globeControl1.Globe.JumpToFeature(newFeature, 20); this.globeControl1.Refresh(); } diff --git a/FrmPatrolerEdit.Designer.cs b/FrmPatrolerEdit.Designer.cs index c551efc..34ee75b 100644 --- a/FrmPatrolerEdit.Designer.cs +++ b/FrmPatrolerEdit.Designer.cs @@ -132,6 +132,7 @@ this.txt_phone.Name = "txt_phone"; this.txt_phone.Size = new System.Drawing.Size(172, 21); this.txt_phone.TabIndex = 15; + this.txt_phone.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_phone_KeyPress); // // combo_sex // diff --git a/FrmPatrolerEdit.cs b/FrmPatrolerEdit.cs index f45b5ae..f0ee553 100644 --- a/FrmPatrolerEdit.cs +++ b/FrmPatrolerEdit.cs @@ -54,6 +54,15 @@ } try { + string sqlCount = "select count(*) from patroler where username='"+txt_name.Text.Trim()+"'"; + int rows = 0; + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + if (rows>0) + { + MessageBox.Show("巡检人员已存在,请更换用户名", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + if (String.IsNullOrEmpty(lab_dbid.Text.Trim())) { String sql = "insert into patroler t (t.username,t.sex,t.age,t.phonenum,t.accountstate,t.password) values ('" + txt_name.Text.Trim() + "','" + combo_sex.SelectedItem.ToString() + "','" + txt_age.Value.ToString() + "','" + txt_phone.Text.Trim() + "','OFFLINE','" + Utility.MD5Encrypt3("111111") + "')"; @@ -84,5 +93,17 @@ this.txt_phone.Text = ""; this.txt_name.Focus(); } + + private void txt_phone_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar != 8 && !Char.IsDigit(e.KeyChar)) + { + e.Handled = true; + } + else + { + + } + } } } diff --git a/MainFrm.cs b/MainFrm.cs index 0cd5881..d36e22c 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -3454,7 +3454,7 @@ //{ // j++; //} - while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称") + while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称" || field1.Name == "模型路径") { j++; fieldName = fieldNames[j].Trim(); @@ -3506,7 +3506,7 @@ //{ // j++; //} - while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称") + while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称" || field2.Name == "模型路径") { j++; field2 = (GSOFieldDefn)feature.GetFieldDefn(j + 1); diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index e5f0003..5f7d3d2 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -82,6 +82,7 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); + this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -371,10 +372,11 @@ this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); + this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); + this.buttonItem_TaskManager = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem_OnlineTask = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem_Event = new DevComponents.DotNetBar.ButtonItem(); this.ribbonPanel8 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar_UserInfo = new DevComponents.DotNetBar.RibbonBar(); this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); @@ -384,11 +386,10 @@ this.btn_user_role = new DevComponents.DotNetBar.ButtonItem(); this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem(); this.btn_reset_password = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); - this.buttonItem_TaskManager = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem_OnlineTask = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem_Event = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -653,7 +654,6 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); - this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -691,9 +691,9 @@ this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); - this.ribbonPanel8.SuspendLayout(); this.ribbonPanel2.SuspendLayout(); + this.ribbonPanel8.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel12.SuspendLayout(); this.ribbonPanel5.SuspendLayout(); @@ -1094,6 +1094,16 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -4317,84 +4327,96 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // - // ribbonPanel7 + // ribbonPanel2 // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 0); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel2.Controls.Add(this.ribbonBar4); + this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel2.Name = "ribbonPanel2"; + this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); // // // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.Style.Class = ""; + this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.StyleMouseDown.Class = ""; + this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - this.ribbonPanel7.Visible = false; + this.ribbonPanel2.StyleMouseOver.Class = ""; + this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.TabIndex = 39; + this.ribbonPanel2.Visible = false; // - // ribbonBar5 + // ribbonBar4 // - this.ribbonBar5.AutoOverflowEnabled = true; + this.ribbonBar4.AutoOverflowEnabled = true; // // // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 92); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; + this.ribbonBar4.BackgroundStyle.Class = ""; + this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.ContainerControlProcessDialogKey = true; + this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.buttonItem_TaskManager, + this.buttonItem_OnlineTask, + this.buttonItem_Event}); + this.ribbonBar4.Location = new System.Drawing.Point(3, 0); + this.ribbonBar4.Name = "ribbonBar4"; + this.ribbonBar4.Size = new System.Drawing.Size(211, 59); + this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar4.TabIndex = 0; + this.ribbonBar4.Text = "ribbonBar4"; // // // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleStyle.Class = ""; + this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; + this.ribbonBar4.TitleStyleMouseOver.Class = ""; + this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleVisible = false; // - // btn_flag + // buttonItem_TaskManager // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + this.buttonItem_TaskManager.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__76; + this.buttonItem_TaskManager.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_TaskManager.Name = "buttonItem_TaskManager"; + this.buttonItem_TaskManager.SubItemsExpandWidth = 14; + this.buttonItem_TaskManager.Text = "工单管理"; + this.buttonItem_TaskManager.Click += new System.EventHandler(this.buttonItem_TaskManager_Click); // - // slider4ground + // buttonItem_OnlineTask // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + this.buttonItem_OnlineTask.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__69; + this.buttonItem_OnlineTask.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_OnlineTask.Name = "buttonItem_OnlineTask"; + this.buttonItem_OnlineTask.SubItemsExpandWidth = 14; + this.buttonItem_OnlineTask.Text = "在线任务"; + this.buttonItem_OnlineTask.Click += new System.EventHandler(this.buttonItem_OnlineTask_Click); + // + // buttonItem_Event + // + this.buttonItem_Event.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__72; + this.buttonItem_Event.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_Event.Name = "buttonItem_Event"; + this.buttonItem_Event.SubItemsExpandWidth = 14; + this.buttonItem_Event.Text = "事件管理"; + this.buttonItem_Event.Click += new System.EventHandler(this.buttonItem_Event_Click); // // ribbonPanel8 // @@ -4525,96 +4547,84 @@ this.btn_reset_password.Text = "重置密码"; this.btn_reset_password.Click += new System.EventHandler(this.btn_reset_password_Click); // - // ribbonPanel2 + // ribbonPanel7 // - this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel2.Controls.Add(this.ribbonBar4); - this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel2.Name = "ribbonPanel2"; - this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 95); // // // - this.ribbonPanel2.Style.Class = ""; - this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel2.StyleMouseDown.Class = ""; - this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel2.StyleMouseOver.Class = ""; - this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; // - // ribbonBar4 + // ribbonBar5 // - this.ribbonBar4.AutoOverflowEnabled = true; + this.ribbonBar5.AutoOverflowEnabled = true; // // // - this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar4.BackgroundStyle.Class = ""; - this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.ContainerControlProcessDialogKey = true; - this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.buttonItem_TaskManager, - this.buttonItem_OnlineTask, - this.buttonItem_Event}); - this.ribbonBar4.Location = new System.Drawing.Point(3, 0); - this.ribbonBar4.Name = "ribbonBar4"; - this.ribbonBar4.Size = new System.Drawing.Size(211, 59); - this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar4.TabIndex = 0; - this.ribbonBar4.Text = "ribbonBar4"; + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 92); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; // // // - this.ribbonBar4.TitleStyle.Class = ""; - this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar4.TitleStyleMouseOver.Class = ""; - this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.TitleVisible = false; + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; // - // buttonItem_TaskManager + // btn_flag // - this.buttonItem_TaskManager.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__76; - this.buttonItem_TaskManager.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_TaskManager.Name = "buttonItem_TaskManager"; - this.buttonItem_TaskManager.SubItemsExpandWidth = 14; - this.buttonItem_TaskManager.Text = "工单管理"; - this.buttonItem_TaskManager.Click += new System.EventHandler(this.buttonItem_TaskManager_Click); + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); // - // buttonItem_OnlineTask + // slider4ground // - this.buttonItem_OnlineTask.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__69; - this.buttonItem_OnlineTask.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_OnlineTask.Name = "buttonItem_OnlineTask"; - this.buttonItem_OnlineTask.SubItemsExpandWidth = 14; - this.buttonItem_OnlineTask.Text = "在线任务"; - this.buttonItem_OnlineTask.Click += new System.EventHandler(this.buttonItem_OnlineTask_Click); - // - // buttonItem_Event - // - this.buttonItem_Event.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__72; - this.buttonItem_Event.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_Event.Name = "buttonItem_Event"; - this.buttonItem_Event.SubItemsExpandWidth = 14; - this.buttonItem_Event.Text = "事件管理"; - this.buttonItem_Event.Click += new System.EventHandler(this.buttonItem_Event_Click); + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); // // ribbonPanel15 // @@ -7098,16 +7108,6 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7182,9 +7182,9 @@ this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); this.ribbonPanel3.ResumeLayout(false); - this.ribbonPanel7.ResumeLayout(false); - this.ribbonPanel8.ResumeLayout(false); this.ribbonPanel2.ResumeLayout(false); + this.ribbonPanel8.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel12.ResumeLayout(false); this.ribbonPanel5.ResumeLayout(false); diff --git a/Program.cs b/Program.cs index f009c8a..12e6ecf 100644 --- a/Program.cs +++ b/Program.cs @@ -10,6 +10,7 @@ { static class Program { + static string ent = "C:\\EMSCyberPipe"; /// /// The main entry point for the application. /// @@ -30,18 +31,31 @@ String newVersionCode = getVersionCode(configUrl, currentVersionCode); if (newVersionCode != currentVersionCode) { - if (MessageBox.Show("检测到新版本,是否立即更新?", "智慧管网太湖新城规划分析系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + if (MessageBox.Show("检测到新版本,是否立即更新?", "智慧管网太湖新城电子标识系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { + + remoteUpDate(); + string programUrl = getProgramUrl(localConfigPath, "programurl"); if (programUrl != "") { - FrmDownloadProgress frmdownload = FrmDownloadProgress.getForm(programUrl); + + //FrmDownloadProgress frmdownload = FrmDownloadProgress.getForm(programUrl); + Process.Start(ent + "/UpDateProgress.exe").WaitForExit(); return; } + } else { - + /* + System.Diagnostics.Process[] proc = System.Diagnostics.Process.GetProcessesByName("UpDateProgress"); + //关闭原有应用程序的所有进程 + foreach (System.Diagnostics.Process pro in proc) + { + pro.Kill(); + } + * */ } } } @@ -51,7 +65,55 @@ FrmLogin frm = new FrmLogin(); if (frm.ShowDialog() == DialogResult.OK) { - Application.Run(new MainFrm()); + if (Utility.userRole != null) + { + Application.Run(new MainFrm()); + } + else + { + MessageBox.Show("该用户没有分配任何角色!"); + return; + } + } + } + + private static void remoteUpDate() + { + if (!File.Exists(ent)) + { + Directory.CreateDirectory(ent); + } + string filePath_exe = ent + "\\UpDateProgress.exe"; + string filePath_exeConfig = ent + "\\UpDateProgress.exe.config"; + string filePath_exePdb = ent + "\\UpDateProgress.pdb"; + string filePath_config = ent + "\\Config.xml"; + + string localPath_exe = Application.StartupPath + "\\UpDateProgress.exe"; + string localPath_exeConfig = Application.StartupPath + "\\UpDateProgress.exe.config"; + string localPath_exePdb = Application.StartupPath + "\\UpDateProgress.pdb"; + string localPath_config = Application.StartupPath + "\\Config.xml"; + + //TODO LIST:判断文件是否存在,存在就删除 + //delOldVersion(filePath_exe); + File.Copy(localPath_exe, filePath_exe, true); + File.Copy(localPath_exeConfig, filePath_exeConfig, true); + File.Copy(localPath_exePdb, filePath_exePdb, true); + File.Copy(localPath_config, filePath_config, true); + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); } } @@ -96,7 +158,6 @@ } xmlReader.Close(); - } catch (Exception e) { @@ -106,6 +167,5 @@ return versionCode; } - } } diff --git a/bin/x86/Debug/Config.xml b/bin/x86/Debug/Config.xml index 560a163..5431500 100644 --- a/bin/x86/Debug/Config.xml +++ b/bin/x86/Debug/Config.xml @@ -14,8 +14,8 @@ http://192.168.0.122:8088/UpDownFile.asmx - http://192.168.10.229/EMSCyberpipe.msi - http://192.168.10.229/EMSConfig.xml + http://192.168.0.203/EMSCyberpipe.msi + http://192.168.0.203/EMSConfig.xml diff --git a/bin/x86/Debug/EMSCyberpipe.exe b/bin/x86/Debug/EMSCyberpipe.exe index 9188a0f..65317a1 100644 --- a/bin/x86/Debug/EMSCyberpipe.exe +++ b/bin/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.pdb b/bin/x86/Debug/EMSCyberpipe.pdb index 1be6757..51a61bb 100644 --- a/bin/x86/Debug/EMSCyberpipe.pdb +++ b/bin/x86/Debug/EMSCyberpipe.pdb Binary files differ diff --git a/bin/x86/Debug/UpDateProgress.exe.config b/bin/x86/Debug/UpDateProgress.exe.config new file mode 100644 index 0000000..e365603 --- /dev/null +++ b/bin/x86/Debug/UpDateProgress.exe.config @@ -0,0 +1,3 @@ + + + diff --git "a/bin/x86/Debug/download/\345\233\233\345\267\235\347\234\201\345\234\260\344\270\213\347\256\241\347\272\277\347\233\221\347\235\243\347\256\241\347\220\206\345\255\220\347\263\273\347\273\237\350\256\276\350\256\241.docx" "b/bin/x86/Debug/download/\345\233\233\345\267\235\347\234\201\345\234\260\344\270\213\347\256\241\347\272\277\347\233\221\347\235\243\347\256\241\347\220\206\345\255\220\347\263\273\347\273\237\350\256\276\350\256\241.docx" new file mode 100644 index 0000000..699bebe --- /dev/null +++ "b/bin/x86/Debug/download/\345\233\233\345\267\235\347\234\201\345\234\260\344\270\213\347\256\241\347\272\277\347\233\221\347\235\243\347\256\241\347\220\206\345\255\220\347\263\273\347\273\237\350\256\276\350\256\241.docx" Binary files differ diff --git a/Cyberpipe.suo b/Cyberpipe.suo index cc8242f..7b935a0 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EditTask.cs b/EMS_Forms/Form_EditTask.cs index 72d3e8e..30a9765 100644 --- a/EMS_Forms/Form_EditTask.cs +++ b/EMS_Forms/Form_EditTask.cs @@ -23,7 +23,6 @@ public static List checkLists = new List(); OracleConnection conn = null; - List BSQFeatures = new List(); public static List roadList = new List(); @@ -193,10 +192,8 @@ private void Form_EditTask_FormClosing(object sender, FormClosingEventArgs e) { - for (int i = 0; i < BSQFeatures.Count; i++) - { - BSQFeatures[i].Label = null; - } + + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); globeControl1.TrackPolygonEndEvent -= new TrackPolygonEndEventHandler(TrackPolygonEndEvent); } @@ -340,6 +337,7 @@ //f.Geometry = model; //GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + GSOLabel label = new GSOLabel(); label.Text = "标识器位置"; @@ -351,8 +349,14 @@ label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); features[0].Label = label; - BSQFeatures.Add(features[0]); - globeControl1.Globe.JumpToFeature(features[0], 10); + GSOFeature f = new GSOFeature(); + f.Geometry = features[0].Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + + globeControl1.Globe.JumpToFeature(newFeature, 10); } else diff --git a/FrmFlagEdits.cs b/FrmFlagEdits.cs index ff25a41..04a9f90 100644 --- a/FrmFlagEdits.cs +++ b/FrmFlagEdits.cs @@ -17,6 +17,9 @@ InitializeComponent(); } string id = ""; + public delegate void Handle(); + public event Handle refresh; + public FrmFlagEdits(string id, string flagid, string flagno, string flagtype, string deep, string street,string gc) { @@ -52,9 +55,10 @@ "t.所属道路 = '" + txt_street.Text.Trim() + "'" + "where t.LSSYS_ID =" + id; OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql); - if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.YesNo, MessageBoxIcon.Question)==DialogResult.Yes) + if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Question)==DialogResult.OK) { this.Close(); + refresh(); } } catch (Exception ex) diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 9bf9734..8d89f55 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -27,7 +27,6 @@ int rows = 0; public static GeoScene.Engine.GSODataSource ds = null; TreeNode layerManagerNode = null; - List Features = new List(); public FrmFlagManagers(GSOGlobeControl _globeControl1) { @@ -139,6 +138,7 @@ string street = row.Cells["所属道路"].Value.ToString(); FrmFlagEdits frm = new FrmFlagEdits(id, flagid, flagno,flagtype, deep, street,gc); + frm.refresh += new FrmFlagEdits.Handle(LoadData);//改变值的事件 frm.ShowDialog(); winGridViewPager1.Refresh(); } @@ -149,66 +149,7 @@ } } - /// - /// 对象查看 - /// - /// - /// - private void winGridViewPager1_OnAddNew(object sender, EventArgs e) - { - DataGridView grid = sender as DataGridView; - if (grid != null) - { - DataGridViewRow row = grid.SelectedRows[0]; - try - { - this.WindowState = FormWindowState.Minimized; - string id = row.Cells["LSSYS_ID"].Value.ToString(); - string flagno = row.Cells["编号"].Value.ToString(); - string flagstreet = row.Cells["所属道路"].Value.ToString(); - double x = Convert.ToDouble(row.Cells["X坐标"].Value); - double y = Convert.ToDouble(row.Cells["Y坐标"].Value); - GSOFeature flagFeature = globeControl1.Globe.Layers.GetLayerByCaption("标识器").GetFeatureByID(int.Parse(id)); - string type = ""; - string pipe = ""; - string sql = "select t.标识器型号,t.对象编号 from 标识器 t where t.编号='" + flagno + "'"; - using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) - { - while (reader.Read()) - { - type = reader.GetString(0); - pipe = reader.GetString(1); - } - } - - GSOLabel label = new GSOLabel(); - label.Text = "标识器编号:" + flagno + "\r\n" + - "标识器类型:" + type + "\r\n" + - //"标识对象编号:" + pipe + "\r\n" + - "所属道路:" + flagstreet; - label.Style = new GSOLabelStyle(); - label.Style.TextStyle.FontSize = 18; - label.Style.TextStyle.ForeColor = Color.FromArgb(0, 0, 0, 255); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 10; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); - this.globeControl1.Refresh(); - - } - catch (Exception ex) - { - MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - - } - } /// /// 标识器报废 /// @@ -363,13 +304,9 @@ //Thread downloadJob = new Thread(new ParameterizedThreadStart(doSave)); //downloadJob.IsBackground = true; //downloadJob.Start(e); - globeControl1.Globe.Layers["标识器"].Save(); + //globeControl1.Globe.Layers["标识器"].Save(); globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - foreach (GSOFeature f in Features) - { - f.Label = null; - } - Features.RemoveRange(0, Features.Count); + globeControl1.Refresh(); } @@ -525,6 +462,7 @@ } } + GSOLabel label = new GSOLabel(); label.Text = "标识器编号:" + flagno + "\r\n" + "标识器类型:" + type + "\r\n" + @@ -539,9 +477,13 @@ label.Style.TextStyle.FontName = "黑体"; label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); + GSOFeature f = new GSOFeature(); + f.Geometry = flagFeature.Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize=-1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + globeControl1.Globe.JumpToFeature(newFeature, 20); this.globeControl1.Refresh(); } diff --git a/FrmPatrolerEdit.Designer.cs b/FrmPatrolerEdit.Designer.cs index c551efc..34ee75b 100644 --- a/FrmPatrolerEdit.Designer.cs +++ b/FrmPatrolerEdit.Designer.cs @@ -132,6 +132,7 @@ this.txt_phone.Name = "txt_phone"; this.txt_phone.Size = new System.Drawing.Size(172, 21); this.txt_phone.TabIndex = 15; + this.txt_phone.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_phone_KeyPress); // // combo_sex // diff --git a/FrmPatrolerEdit.cs b/FrmPatrolerEdit.cs index f45b5ae..f0ee553 100644 --- a/FrmPatrolerEdit.cs +++ b/FrmPatrolerEdit.cs @@ -54,6 +54,15 @@ } try { + string sqlCount = "select count(*) from patroler where username='"+txt_name.Text.Trim()+"'"; + int rows = 0; + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + if (rows>0) + { + MessageBox.Show("巡检人员已存在,请更换用户名", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + if (String.IsNullOrEmpty(lab_dbid.Text.Trim())) { String sql = "insert into patroler t (t.username,t.sex,t.age,t.phonenum,t.accountstate,t.password) values ('" + txt_name.Text.Trim() + "','" + combo_sex.SelectedItem.ToString() + "','" + txt_age.Value.ToString() + "','" + txt_phone.Text.Trim() + "','OFFLINE','" + Utility.MD5Encrypt3("111111") + "')"; @@ -84,5 +93,17 @@ this.txt_phone.Text = ""; this.txt_name.Focus(); } + + private void txt_phone_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar != 8 && !Char.IsDigit(e.KeyChar)) + { + e.Handled = true; + } + else + { + + } + } } } diff --git a/MainFrm.cs b/MainFrm.cs index 0cd5881..d36e22c 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -3454,7 +3454,7 @@ //{ // j++; //} - while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称") + while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称" || field1.Name == "模型路径") { j++; fieldName = fieldNames[j].Trim(); @@ -3506,7 +3506,7 @@ //{ // j++; //} - while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称") + while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称" || field2.Name == "模型路径") { j++; field2 = (GSOFieldDefn)feature.GetFieldDefn(j + 1); diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index e5f0003..5f7d3d2 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -82,6 +82,7 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); + this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -371,10 +372,11 @@ this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); + this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); + this.buttonItem_TaskManager = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem_OnlineTask = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem_Event = new DevComponents.DotNetBar.ButtonItem(); this.ribbonPanel8 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar_UserInfo = new DevComponents.DotNetBar.RibbonBar(); this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); @@ -384,11 +386,10 @@ this.btn_user_role = new DevComponents.DotNetBar.ButtonItem(); this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem(); this.btn_reset_password = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); - this.buttonItem_TaskManager = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem_OnlineTask = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem_Event = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -653,7 +654,6 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); - this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -691,9 +691,9 @@ this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); - this.ribbonPanel8.SuspendLayout(); this.ribbonPanel2.SuspendLayout(); + this.ribbonPanel8.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel12.SuspendLayout(); this.ribbonPanel5.SuspendLayout(); @@ -1094,6 +1094,16 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -4317,84 +4327,96 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // - // ribbonPanel7 + // ribbonPanel2 // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 0); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel2.Controls.Add(this.ribbonBar4); + this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel2.Name = "ribbonPanel2"; + this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); // // // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.Style.Class = ""; + this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.StyleMouseDown.Class = ""; + this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - this.ribbonPanel7.Visible = false; + this.ribbonPanel2.StyleMouseOver.Class = ""; + this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.TabIndex = 39; + this.ribbonPanel2.Visible = false; // - // ribbonBar5 + // ribbonBar4 // - this.ribbonBar5.AutoOverflowEnabled = true; + this.ribbonBar4.AutoOverflowEnabled = true; // // // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 92); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; + this.ribbonBar4.BackgroundStyle.Class = ""; + this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.ContainerControlProcessDialogKey = true; + this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.buttonItem_TaskManager, + this.buttonItem_OnlineTask, + this.buttonItem_Event}); + this.ribbonBar4.Location = new System.Drawing.Point(3, 0); + this.ribbonBar4.Name = "ribbonBar4"; + this.ribbonBar4.Size = new System.Drawing.Size(211, 59); + this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar4.TabIndex = 0; + this.ribbonBar4.Text = "ribbonBar4"; // // // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleStyle.Class = ""; + this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; + this.ribbonBar4.TitleStyleMouseOver.Class = ""; + this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleVisible = false; // - // btn_flag + // buttonItem_TaskManager // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + this.buttonItem_TaskManager.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__76; + this.buttonItem_TaskManager.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_TaskManager.Name = "buttonItem_TaskManager"; + this.buttonItem_TaskManager.SubItemsExpandWidth = 14; + this.buttonItem_TaskManager.Text = "工单管理"; + this.buttonItem_TaskManager.Click += new System.EventHandler(this.buttonItem_TaskManager_Click); // - // slider4ground + // buttonItem_OnlineTask // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + this.buttonItem_OnlineTask.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__69; + this.buttonItem_OnlineTask.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_OnlineTask.Name = "buttonItem_OnlineTask"; + this.buttonItem_OnlineTask.SubItemsExpandWidth = 14; + this.buttonItem_OnlineTask.Text = "在线任务"; + this.buttonItem_OnlineTask.Click += new System.EventHandler(this.buttonItem_OnlineTask_Click); + // + // buttonItem_Event + // + this.buttonItem_Event.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__72; + this.buttonItem_Event.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_Event.Name = "buttonItem_Event"; + this.buttonItem_Event.SubItemsExpandWidth = 14; + this.buttonItem_Event.Text = "事件管理"; + this.buttonItem_Event.Click += new System.EventHandler(this.buttonItem_Event_Click); // // ribbonPanel8 // @@ -4525,96 +4547,84 @@ this.btn_reset_password.Text = "重置密码"; this.btn_reset_password.Click += new System.EventHandler(this.btn_reset_password_Click); // - // ribbonPanel2 + // ribbonPanel7 // - this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel2.Controls.Add(this.ribbonBar4); - this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel2.Name = "ribbonPanel2"; - this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 95); // // // - this.ribbonPanel2.Style.Class = ""; - this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel2.StyleMouseDown.Class = ""; - this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel2.StyleMouseOver.Class = ""; - this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; // - // ribbonBar4 + // ribbonBar5 // - this.ribbonBar4.AutoOverflowEnabled = true; + this.ribbonBar5.AutoOverflowEnabled = true; // // // - this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar4.BackgroundStyle.Class = ""; - this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.ContainerControlProcessDialogKey = true; - this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.buttonItem_TaskManager, - this.buttonItem_OnlineTask, - this.buttonItem_Event}); - this.ribbonBar4.Location = new System.Drawing.Point(3, 0); - this.ribbonBar4.Name = "ribbonBar4"; - this.ribbonBar4.Size = new System.Drawing.Size(211, 59); - this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar4.TabIndex = 0; - this.ribbonBar4.Text = "ribbonBar4"; + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 92); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; // // // - this.ribbonBar4.TitleStyle.Class = ""; - this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar4.TitleStyleMouseOver.Class = ""; - this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.TitleVisible = false; + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; // - // buttonItem_TaskManager + // btn_flag // - this.buttonItem_TaskManager.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__76; - this.buttonItem_TaskManager.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_TaskManager.Name = "buttonItem_TaskManager"; - this.buttonItem_TaskManager.SubItemsExpandWidth = 14; - this.buttonItem_TaskManager.Text = "工单管理"; - this.buttonItem_TaskManager.Click += new System.EventHandler(this.buttonItem_TaskManager_Click); + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); // - // buttonItem_OnlineTask + // slider4ground // - this.buttonItem_OnlineTask.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__69; - this.buttonItem_OnlineTask.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_OnlineTask.Name = "buttonItem_OnlineTask"; - this.buttonItem_OnlineTask.SubItemsExpandWidth = 14; - this.buttonItem_OnlineTask.Text = "在线任务"; - this.buttonItem_OnlineTask.Click += new System.EventHandler(this.buttonItem_OnlineTask_Click); - // - // buttonItem_Event - // - this.buttonItem_Event.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__72; - this.buttonItem_Event.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_Event.Name = "buttonItem_Event"; - this.buttonItem_Event.SubItemsExpandWidth = 14; - this.buttonItem_Event.Text = "事件管理"; - this.buttonItem_Event.Click += new System.EventHandler(this.buttonItem_Event_Click); + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); // // ribbonPanel15 // @@ -7098,16 +7108,6 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7182,9 +7182,9 @@ this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); this.ribbonPanel3.ResumeLayout(false); - this.ribbonPanel7.ResumeLayout(false); - this.ribbonPanel8.ResumeLayout(false); this.ribbonPanel2.ResumeLayout(false); + this.ribbonPanel8.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel12.ResumeLayout(false); this.ribbonPanel5.ResumeLayout(false); diff --git a/Program.cs b/Program.cs index f009c8a..12e6ecf 100644 --- a/Program.cs +++ b/Program.cs @@ -10,6 +10,7 @@ { static class Program { + static string ent = "C:\\EMSCyberPipe"; /// /// The main entry point for the application. /// @@ -30,18 +31,31 @@ String newVersionCode = getVersionCode(configUrl, currentVersionCode); if (newVersionCode != currentVersionCode) { - if (MessageBox.Show("检测到新版本,是否立即更新?", "智慧管网太湖新城规划分析系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + if (MessageBox.Show("检测到新版本,是否立即更新?", "智慧管网太湖新城电子标识系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { + + remoteUpDate(); + string programUrl = getProgramUrl(localConfigPath, "programurl"); if (programUrl != "") { - FrmDownloadProgress frmdownload = FrmDownloadProgress.getForm(programUrl); + + //FrmDownloadProgress frmdownload = FrmDownloadProgress.getForm(programUrl); + Process.Start(ent + "/UpDateProgress.exe").WaitForExit(); return; } + } else { - + /* + System.Diagnostics.Process[] proc = System.Diagnostics.Process.GetProcessesByName("UpDateProgress"); + //关闭原有应用程序的所有进程 + foreach (System.Diagnostics.Process pro in proc) + { + pro.Kill(); + } + * */ } } } @@ -51,7 +65,55 @@ FrmLogin frm = new FrmLogin(); if (frm.ShowDialog() == DialogResult.OK) { - Application.Run(new MainFrm()); + if (Utility.userRole != null) + { + Application.Run(new MainFrm()); + } + else + { + MessageBox.Show("该用户没有分配任何角色!"); + return; + } + } + } + + private static void remoteUpDate() + { + if (!File.Exists(ent)) + { + Directory.CreateDirectory(ent); + } + string filePath_exe = ent + "\\UpDateProgress.exe"; + string filePath_exeConfig = ent + "\\UpDateProgress.exe.config"; + string filePath_exePdb = ent + "\\UpDateProgress.pdb"; + string filePath_config = ent + "\\Config.xml"; + + string localPath_exe = Application.StartupPath + "\\UpDateProgress.exe"; + string localPath_exeConfig = Application.StartupPath + "\\UpDateProgress.exe.config"; + string localPath_exePdb = Application.StartupPath + "\\UpDateProgress.pdb"; + string localPath_config = Application.StartupPath + "\\Config.xml"; + + //TODO LIST:判断文件是否存在,存在就删除 + //delOldVersion(filePath_exe); + File.Copy(localPath_exe, filePath_exe, true); + File.Copy(localPath_exeConfig, filePath_exeConfig, true); + File.Copy(localPath_exePdb, filePath_exePdb, true); + File.Copy(localPath_config, filePath_config, true); + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); } } @@ -96,7 +158,6 @@ } xmlReader.Close(); - } catch (Exception e) { @@ -106,6 +167,5 @@ return versionCode; } - } } diff --git a/bin/x86/Debug/Config.xml b/bin/x86/Debug/Config.xml index 560a163..5431500 100644 --- a/bin/x86/Debug/Config.xml +++ b/bin/x86/Debug/Config.xml @@ -14,8 +14,8 @@ http://192.168.0.122:8088/UpDownFile.asmx - http://192.168.10.229/EMSCyberpipe.msi - http://192.168.10.229/EMSConfig.xml + http://192.168.0.203/EMSCyberpipe.msi + http://192.168.0.203/EMSConfig.xml diff --git a/bin/x86/Debug/EMSCyberpipe.exe b/bin/x86/Debug/EMSCyberpipe.exe index 9188a0f..65317a1 100644 --- a/bin/x86/Debug/EMSCyberpipe.exe +++ b/bin/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.pdb b/bin/x86/Debug/EMSCyberpipe.pdb index 1be6757..51a61bb 100644 --- a/bin/x86/Debug/EMSCyberpipe.pdb +++ b/bin/x86/Debug/EMSCyberpipe.pdb Binary files differ diff --git a/bin/x86/Debug/UpDateProgress.exe.config b/bin/x86/Debug/UpDateProgress.exe.config new file mode 100644 index 0000000..e365603 --- /dev/null +++ b/bin/x86/Debug/UpDateProgress.exe.config @@ -0,0 +1,3 @@ + + + diff --git "a/bin/x86/Debug/download/\345\233\233\345\267\235\347\234\201\345\234\260\344\270\213\347\256\241\347\272\277\347\233\221\347\235\243\347\256\241\347\220\206\345\255\220\347\263\273\347\273\237\350\256\276\350\256\241.docx" "b/bin/x86/Debug/download/\345\233\233\345\267\235\347\234\201\345\234\260\344\270\213\347\256\241\347\272\277\347\233\221\347\235\243\347\256\241\347\220\206\345\255\220\347\263\273\347\273\237\350\256\276\350\256\241.docx" new file mode 100644 index 0000000..699bebe --- /dev/null +++ "b/bin/x86/Debug/download/\345\233\233\345\267\235\347\234\201\345\234\260\344\270\213\347\256\241\347\272\277\347\233\221\347\235\243\347\256\241\347\220\206\345\255\220\347\263\273\347\273\237\350\256\276\350\256\241.docx" Binary files differ diff --git a/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache b/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache index 5bddb42..6ed8e69 100644 --- a/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache +++ b/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache Binary files differ diff --git a/Cyberpipe.suo b/Cyberpipe.suo index cc8242f..7b935a0 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EditTask.cs b/EMS_Forms/Form_EditTask.cs index 72d3e8e..30a9765 100644 --- a/EMS_Forms/Form_EditTask.cs +++ b/EMS_Forms/Form_EditTask.cs @@ -23,7 +23,6 @@ public static List checkLists = new List(); OracleConnection conn = null; - List BSQFeatures = new List(); public static List roadList = new List(); @@ -193,10 +192,8 @@ private void Form_EditTask_FormClosing(object sender, FormClosingEventArgs e) { - for (int i = 0; i < BSQFeatures.Count; i++) - { - BSQFeatures[i].Label = null; - } + + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); globeControl1.TrackPolygonEndEvent -= new TrackPolygonEndEventHandler(TrackPolygonEndEvent); } @@ -340,6 +337,7 @@ //f.Geometry = model; //GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + GSOLabel label = new GSOLabel(); label.Text = "标识器位置"; @@ -351,8 +349,14 @@ label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); features[0].Label = label; - BSQFeatures.Add(features[0]); - globeControl1.Globe.JumpToFeature(features[0], 10); + GSOFeature f = new GSOFeature(); + f.Geometry = features[0].Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + + globeControl1.Globe.JumpToFeature(newFeature, 10); } else diff --git a/FrmFlagEdits.cs b/FrmFlagEdits.cs index ff25a41..04a9f90 100644 --- a/FrmFlagEdits.cs +++ b/FrmFlagEdits.cs @@ -17,6 +17,9 @@ InitializeComponent(); } string id = ""; + public delegate void Handle(); + public event Handle refresh; + public FrmFlagEdits(string id, string flagid, string flagno, string flagtype, string deep, string street,string gc) { @@ -52,9 +55,10 @@ "t.所属道路 = '" + txt_street.Text.Trim() + "'" + "where t.LSSYS_ID =" + id; OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql); - if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.YesNo, MessageBoxIcon.Question)==DialogResult.Yes) + if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Question)==DialogResult.OK) { this.Close(); + refresh(); } } catch (Exception ex) diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 9bf9734..8d89f55 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -27,7 +27,6 @@ int rows = 0; public static GeoScene.Engine.GSODataSource ds = null; TreeNode layerManagerNode = null; - List Features = new List(); public FrmFlagManagers(GSOGlobeControl _globeControl1) { @@ -139,6 +138,7 @@ string street = row.Cells["所属道路"].Value.ToString(); FrmFlagEdits frm = new FrmFlagEdits(id, flagid, flagno,flagtype, deep, street,gc); + frm.refresh += new FrmFlagEdits.Handle(LoadData);//改变值的事件 frm.ShowDialog(); winGridViewPager1.Refresh(); } @@ -149,66 +149,7 @@ } } - /// - /// 对象查看 - /// - /// - /// - private void winGridViewPager1_OnAddNew(object sender, EventArgs e) - { - DataGridView grid = sender as DataGridView; - if (grid != null) - { - DataGridViewRow row = grid.SelectedRows[0]; - try - { - this.WindowState = FormWindowState.Minimized; - string id = row.Cells["LSSYS_ID"].Value.ToString(); - string flagno = row.Cells["编号"].Value.ToString(); - string flagstreet = row.Cells["所属道路"].Value.ToString(); - double x = Convert.ToDouble(row.Cells["X坐标"].Value); - double y = Convert.ToDouble(row.Cells["Y坐标"].Value); - GSOFeature flagFeature = globeControl1.Globe.Layers.GetLayerByCaption("标识器").GetFeatureByID(int.Parse(id)); - string type = ""; - string pipe = ""; - string sql = "select t.标识器型号,t.对象编号 from 标识器 t where t.编号='" + flagno + "'"; - using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) - { - while (reader.Read()) - { - type = reader.GetString(0); - pipe = reader.GetString(1); - } - } - - GSOLabel label = new GSOLabel(); - label.Text = "标识器编号:" + flagno + "\r\n" + - "标识器类型:" + type + "\r\n" + - //"标识对象编号:" + pipe + "\r\n" + - "所属道路:" + flagstreet; - label.Style = new GSOLabelStyle(); - label.Style.TextStyle.FontSize = 18; - label.Style.TextStyle.ForeColor = Color.FromArgb(0, 0, 0, 255); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 10; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); - this.globeControl1.Refresh(); - - } - catch (Exception ex) - { - MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - - } - } /// /// 标识器报废 /// @@ -363,13 +304,9 @@ //Thread downloadJob = new Thread(new ParameterizedThreadStart(doSave)); //downloadJob.IsBackground = true; //downloadJob.Start(e); - globeControl1.Globe.Layers["标识器"].Save(); + //globeControl1.Globe.Layers["标识器"].Save(); globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - foreach (GSOFeature f in Features) - { - f.Label = null; - } - Features.RemoveRange(0, Features.Count); + globeControl1.Refresh(); } @@ -525,6 +462,7 @@ } } + GSOLabel label = new GSOLabel(); label.Text = "标识器编号:" + flagno + "\r\n" + "标识器类型:" + type + "\r\n" + @@ -539,9 +477,13 @@ label.Style.TextStyle.FontName = "黑体"; label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); + GSOFeature f = new GSOFeature(); + f.Geometry = flagFeature.Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize=-1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + globeControl1.Globe.JumpToFeature(newFeature, 20); this.globeControl1.Refresh(); } diff --git a/FrmPatrolerEdit.Designer.cs b/FrmPatrolerEdit.Designer.cs index c551efc..34ee75b 100644 --- a/FrmPatrolerEdit.Designer.cs +++ b/FrmPatrolerEdit.Designer.cs @@ -132,6 +132,7 @@ this.txt_phone.Name = "txt_phone"; this.txt_phone.Size = new System.Drawing.Size(172, 21); this.txt_phone.TabIndex = 15; + this.txt_phone.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_phone_KeyPress); // // combo_sex // diff --git a/FrmPatrolerEdit.cs b/FrmPatrolerEdit.cs index f45b5ae..f0ee553 100644 --- a/FrmPatrolerEdit.cs +++ b/FrmPatrolerEdit.cs @@ -54,6 +54,15 @@ } try { + string sqlCount = "select count(*) from patroler where username='"+txt_name.Text.Trim()+"'"; + int rows = 0; + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + if (rows>0) + { + MessageBox.Show("巡检人员已存在,请更换用户名", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + if (String.IsNullOrEmpty(lab_dbid.Text.Trim())) { String sql = "insert into patroler t (t.username,t.sex,t.age,t.phonenum,t.accountstate,t.password) values ('" + txt_name.Text.Trim() + "','" + combo_sex.SelectedItem.ToString() + "','" + txt_age.Value.ToString() + "','" + txt_phone.Text.Trim() + "','OFFLINE','" + Utility.MD5Encrypt3("111111") + "')"; @@ -84,5 +93,17 @@ this.txt_phone.Text = ""; this.txt_name.Focus(); } + + private void txt_phone_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar != 8 && !Char.IsDigit(e.KeyChar)) + { + e.Handled = true; + } + else + { + + } + } } } diff --git a/MainFrm.cs b/MainFrm.cs index 0cd5881..d36e22c 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -3454,7 +3454,7 @@ //{ // j++; //} - while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称") + while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称" || field1.Name == "模型路径") { j++; fieldName = fieldNames[j].Trim(); @@ -3506,7 +3506,7 @@ //{ // j++; //} - while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称") + while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称" || field2.Name == "模型路径") { j++; field2 = (GSOFieldDefn)feature.GetFieldDefn(j + 1); diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index e5f0003..5f7d3d2 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -82,6 +82,7 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); + this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -371,10 +372,11 @@ this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); + this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); + this.buttonItem_TaskManager = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem_OnlineTask = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem_Event = new DevComponents.DotNetBar.ButtonItem(); this.ribbonPanel8 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar_UserInfo = new DevComponents.DotNetBar.RibbonBar(); this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); @@ -384,11 +386,10 @@ this.btn_user_role = new DevComponents.DotNetBar.ButtonItem(); this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem(); this.btn_reset_password = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); - this.buttonItem_TaskManager = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem_OnlineTask = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem_Event = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -653,7 +654,6 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); - this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -691,9 +691,9 @@ this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); - this.ribbonPanel8.SuspendLayout(); this.ribbonPanel2.SuspendLayout(); + this.ribbonPanel8.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel12.SuspendLayout(); this.ribbonPanel5.SuspendLayout(); @@ -1094,6 +1094,16 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -4317,84 +4327,96 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // - // ribbonPanel7 + // ribbonPanel2 // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 0); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel2.Controls.Add(this.ribbonBar4); + this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel2.Name = "ribbonPanel2"; + this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); // // // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.Style.Class = ""; + this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.StyleMouseDown.Class = ""; + this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - this.ribbonPanel7.Visible = false; + this.ribbonPanel2.StyleMouseOver.Class = ""; + this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.TabIndex = 39; + this.ribbonPanel2.Visible = false; // - // ribbonBar5 + // ribbonBar4 // - this.ribbonBar5.AutoOverflowEnabled = true; + this.ribbonBar4.AutoOverflowEnabled = true; // // // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 92); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; + this.ribbonBar4.BackgroundStyle.Class = ""; + this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.ContainerControlProcessDialogKey = true; + this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.buttonItem_TaskManager, + this.buttonItem_OnlineTask, + this.buttonItem_Event}); + this.ribbonBar4.Location = new System.Drawing.Point(3, 0); + this.ribbonBar4.Name = "ribbonBar4"; + this.ribbonBar4.Size = new System.Drawing.Size(211, 59); + this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar4.TabIndex = 0; + this.ribbonBar4.Text = "ribbonBar4"; // // // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleStyle.Class = ""; + this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; + this.ribbonBar4.TitleStyleMouseOver.Class = ""; + this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleVisible = false; // - // btn_flag + // buttonItem_TaskManager // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + this.buttonItem_TaskManager.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__76; + this.buttonItem_TaskManager.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_TaskManager.Name = "buttonItem_TaskManager"; + this.buttonItem_TaskManager.SubItemsExpandWidth = 14; + this.buttonItem_TaskManager.Text = "工单管理"; + this.buttonItem_TaskManager.Click += new System.EventHandler(this.buttonItem_TaskManager_Click); // - // slider4ground + // buttonItem_OnlineTask // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + this.buttonItem_OnlineTask.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__69; + this.buttonItem_OnlineTask.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_OnlineTask.Name = "buttonItem_OnlineTask"; + this.buttonItem_OnlineTask.SubItemsExpandWidth = 14; + this.buttonItem_OnlineTask.Text = "在线任务"; + this.buttonItem_OnlineTask.Click += new System.EventHandler(this.buttonItem_OnlineTask_Click); + // + // buttonItem_Event + // + this.buttonItem_Event.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__72; + this.buttonItem_Event.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_Event.Name = "buttonItem_Event"; + this.buttonItem_Event.SubItemsExpandWidth = 14; + this.buttonItem_Event.Text = "事件管理"; + this.buttonItem_Event.Click += new System.EventHandler(this.buttonItem_Event_Click); // // ribbonPanel8 // @@ -4525,96 +4547,84 @@ this.btn_reset_password.Text = "重置密码"; this.btn_reset_password.Click += new System.EventHandler(this.btn_reset_password_Click); // - // ribbonPanel2 + // ribbonPanel7 // - this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel2.Controls.Add(this.ribbonBar4); - this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel2.Name = "ribbonPanel2"; - this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 95); // // // - this.ribbonPanel2.Style.Class = ""; - this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel2.StyleMouseDown.Class = ""; - this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel2.StyleMouseOver.Class = ""; - this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; // - // ribbonBar4 + // ribbonBar5 // - this.ribbonBar4.AutoOverflowEnabled = true; + this.ribbonBar5.AutoOverflowEnabled = true; // // // - this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar4.BackgroundStyle.Class = ""; - this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.ContainerControlProcessDialogKey = true; - this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.buttonItem_TaskManager, - this.buttonItem_OnlineTask, - this.buttonItem_Event}); - this.ribbonBar4.Location = new System.Drawing.Point(3, 0); - this.ribbonBar4.Name = "ribbonBar4"; - this.ribbonBar4.Size = new System.Drawing.Size(211, 59); - this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar4.TabIndex = 0; - this.ribbonBar4.Text = "ribbonBar4"; + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 92); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; // // // - this.ribbonBar4.TitleStyle.Class = ""; - this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar4.TitleStyleMouseOver.Class = ""; - this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.TitleVisible = false; + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; // - // buttonItem_TaskManager + // btn_flag // - this.buttonItem_TaskManager.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__76; - this.buttonItem_TaskManager.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_TaskManager.Name = "buttonItem_TaskManager"; - this.buttonItem_TaskManager.SubItemsExpandWidth = 14; - this.buttonItem_TaskManager.Text = "工单管理"; - this.buttonItem_TaskManager.Click += new System.EventHandler(this.buttonItem_TaskManager_Click); + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); // - // buttonItem_OnlineTask + // slider4ground // - this.buttonItem_OnlineTask.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__69; - this.buttonItem_OnlineTask.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_OnlineTask.Name = "buttonItem_OnlineTask"; - this.buttonItem_OnlineTask.SubItemsExpandWidth = 14; - this.buttonItem_OnlineTask.Text = "在线任务"; - this.buttonItem_OnlineTask.Click += new System.EventHandler(this.buttonItem_OnlineTask_Click); - // - // buttonItem_Event - // - this.buttonItem_Event.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__72; - this.buttonItem_Event.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_Event.Name = "buttonItem_Event"; - this.buttonItem_Event.SubItemsExpandWidth = 14; - this.buttonItem_Event.Text = "事件管理"; - this.buttonItem_Event.Click += new System.EventHandler(this.buttonItem_Event_Click); + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); // // ribbonPanel15 // @@ -7098,16 +7108,6 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7182,9 +7182,9 @@ this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); this.ribbonPanel3.ResumeLayout(false); - this.ribbonPanel7.ResumeLayout(false); - this.ribbonPanel8.ResumeLayout(false); this.ribbonPanel2.ResumeLayout(false); + this.ribbonPanel8.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel12.ResumeLayout(false); this.ribbonPanel5.ResumeLayout(false); diff --git a/Program.cs b/Program.cs index f009c8a..12e6ecf 100644 --- a/Program.cs +++ b/Program.cs @@ -10,6 +10,7 @@ { static class Program { + static string ent = "C:\\EMSCyberPipe"; /// /// The main entry point for the application. /// @@ -30,18 +31,31 @@ String newVersionCode = getVersionCode(configUrl, currentVersionCode); if (newVersionCode != currentVersionCode) { - if (MessageBox.Show("检测到新版本,是否立即更新?", "智慧管网太湖新城规划分析系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + if (MessageBox.Show("检测到新版本,是否立即更新?", "智慧管网太湖新城电子标识系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { + + remoteUpDate(); + string programUrl = getProgramUrl(localConfigPath, "programurl"); if (programUrl != "") { - FrmDownloadProgress frmdownload = FrmDownloadProgress.getForm(programUrl); + + //FrmDownloadProgress frmdownload = FrmDownloadProgress.getForm(programUrl); + Process.Start(ent + "/UpDateProgress.exe").WaitForExit(); return; } + } else { - + /* + System.Diagnostics.Process[] proc = System.Diagnostics.Process.GetProcessesByName("UpDateProgress"); + //关闭原有应用程序的所有进程 + foreach (System.Diagnostics.Process pro in proc) + { + pro.Kill(); + } + * */ } } } @@ -51,7 +65,55 @@ FrmLogin frm = new FrmLogin(); if (frm.ShowDialog() == DialogResult.OK) { - Application.Run(new MainFrm()); + if (Utility.userRole != null) + { + Application.Run(new MainFrm()); + } + else + { + MessageBox.Show("该用户没有分配任何角色!"); + return; + } + } + } + + private static void remoteUpDate() + { + if (!File.Exists(ent)) + { + Directory.CreateDirectory(ent); + } + string filePath_exe = ent + "\\UpDateProgress.exe"; + string filePath_exeConfig = ent + "\\UpDateProgress.exe.config"; + string filePath_exePdb = ent + "\\UpDateProgress.pdb"; + string filePath_config = ent + "\\Config.xml"; + + string localPath_exe = Application.StartupPath + "\\UpDateProgress.exe"; + string localPath_exeConfig = Application.StartupPath + "\\UpDateProgress.exe.config"; + string localPath_exePdb = Application.StartupPath + "\\UpDateProgress.pdb"; + string localPath_config = Application.StartupPath + "\\Config.xml"; + + //TODO LIST:判断文件是否存在,存在就删除 + //delOldVersion(filePath_exe); + File.Copy(localPath_exe, filePath_exe, true); + File.Copy(localPath_exeConfig, filePath_exeConfig, true); + File.Copy(localPath_exePdb, filePath_exePdb, true); + File.Copy(localPath_config, filePath_config, true); + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); } } @@ -96,7 +158,6 @@ } xmlReader.Close(); - } catch (Exception e) { @@ -106,6 +167,5 @@ return versionCode; } - } } diff --git a/bin/x86/Debug/Config.xml b/bin/x86/Debug/Config.xml index 560a163..5431500 100644 --- a/bin/x86/Debug/Config.xml +++ b/bin/x86/Debug/Config.xml @@ -14,8 +14,8 @@ http://192.168.0.122:8088/UpDownFile.asmx - http://192.168.10.229/EMSCyberpipe.msi - http://192.168.10.229/EMSConfig.xml + http://192.168.0.203/EMSCyberpipe.msi + http://192.168.0.203/EMSConfig.xml diff --git a/bin/x86/Debug/EMSCyberpipe.exe b/bin/x86/Debug/EMSCyberpipe.exe index 9188a0f..65317a1 100644 --- a/bin/x86/Debug/EMSCyberpipe.exe +++ b/bin/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.pdb b/bin/x86/Debug/EMSCyberpipe.pdb index 1be6757..51a61bb 100644 --- a/bin/x86/Debug/EMSCyberpipe.pdb +++ b/bin/x86/Debug/EMSCyberpipe.pdb Binary files differ diff --git a/bin/x86/Debug/UpDateProgress.exe.config b/bin/x86/Debug/UpDateProgress.exe.config new file mode 100644 index 0000000..e365603 --- /dev/null +++ b/bin/x86/Debug/UpDateProgress.exe.config @@ -0,0 +1,3 @@ + + + diff --git "a/bin/x86/Debug/download/\345\233\233\345\267\235\347\234\201\345\234\260\344\270\213\347\256\241\347\272\277\347\233\221\347\235\243\347\256\241\347\220\206\345\255\220\347\263\273\347\273\237\350\256\276\350\256\241.docx" "b/bin/x86/Debug/download/\345\233\233\345\267\235\347\234\201\345\234\260\344\270\213\347\256\241\347\272\277\347\233\221\347\235\243\347\256\241\347\220\206\345\255\220\347\263\273\347\273\237\350\256\276\350\256\241.docx" new file mode 100644 index 0000000..699bebe --- /dev/null +++ "b/bin/x86/Debug/download/\345\233\233\345\267\235\347\234\201\345\234\260\344\270\213\347\256\241\347\272\277\347\233\221\347\235\243\347\256\241\347\220\206\345\255\220\347\263\273\347\273\237\350\256\276\350\256\241.docx" Binary files differ diff --git a/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache b/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache index 5bddb42..6ed8e69 100644 --- a/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache +++ b/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache Binary files differ diff --git a/obj/x86/Debug/EMSCyberpipe.exe b/obj/x86/Debug/EMSCyberpipe.exe index 9188a0f..65317a1 100644 --- a/obj/x86/Debug/EMSCyberpipe.exe +++ b/obj/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/Cyberpipe.suo b/Cyberpipe.suo index cc8242f..7b935a0 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EditTask.cs b/EMS_Forms/Form_EditTask.cs index 72d3e8e..30a9765 100644 --- a/EMS_Forms/Form_EditTask.cs +++ b/EMS_Forms/Form_EditTask.cs @@ -23,7 +23,6 @@ public static List checkLists = new List(); OracleConnection conn = null; - List BSQFeatures = new List(); public static List roadList = new List(); @@ -193,10 +192,8 @@ private void Form_EditTask_FormClosing(object sender, FormClosingEventArgs e) { - for (int i = 0; i < BSQFeatures.Count; i++) - { - BSQFeatures[i].Label = null; - } + + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); globeControl1.TrackPolygonEndEvent -= new TrackPolygonEndEventHandler(TrackPolygonEndEvent); } @@ -340,6 +337,7 @@ //f.Geometry = model; //GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + GSOLabel label = new GSOLabel(); label.Text = "标识器位置"; @@ -351,8 +349,14 @@ label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); features[0].Label = label; - BSQFeatures.Add(features[0]); - globeControl1.Globe.JumpToFeature(features[0], 10); + GSOFeature f = new GSOFeature(); + f.Geometry = features[0].Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + + globeControl1.Globe.JumpToFeature(newFeature, 10); } else diff --git a/FrmFlagEdits.cs b/FrmFlagEdits.cs index ff25a41..04a9f90 100644 --- a/FrmFlagEdits.cs +++ b/FrmFlagEdits.cs @@ -17,6 +17,9 @@ InitializeComponent(); } string id = ""; + public delegate void Handle(); + public event Handle refresh; + public FrmFlagEdits(string id, string flagid, string flagno, string flagtype, string deep, string street,string gc) { @@ -52,9 +55,10 @@ "t.所属道路 = '" + txt_street.Text.Trim() + "'" + "where t.LSSYS_ID =" + id; OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql); - if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.YesNo, MessageBoxIcon.Question)==DialogResult.Yes) + if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Question)==DialogResult.OK) { this.Close(); + refresh(); } } catch (Exception ex) diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 9bf9734..8d89f55 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -27,7 +27,6 @@ int rows = 0; public static GeoScene.Engine.GSODataSource ds = null; TreeNode layerManagerNode = null; - List Features = new List(); public FrmFlagManagers(GSOGlobeControl _globeControl1) { @@ -139,6 +138,7 @@ string street = row.Cells["所属道路"].Value.ToString(); FrmFlagEdits frm = new FrmFlagEdits(id, flagid, flagno,flagtype, deep, street,gc); + frm.refresh += new FrmFlagEdits.Handle(LoadData);//改变值的事件 frm.ShowDialog(); winGridViewPager1.Refresh(); } @@ -149,66 +149,7 @@ } } - /// - /// 对象查看 - /// - /// - /// - private void winGridViewPager1_OnAddNew(object sender, EventArgs e) - { - DataGridView grid = sender as DataGridView; - if (grid != null) - { - DataGridViewRow row = grid.SelectedRows[0]; - try - { - this.WindowState = FormWindowState.Minimized; - string id = row.Cells["LSSYS_ID"].Value.ToString(); - string flagno = row.Cells["编号"].Value.ToString(); - string flagstreet = row.Cells["所属道路"].Value.ToString(); - double x = Convert.ToDouble(row.Cells["X坐标"].Value); - double y = Convert.ToDouble(row.Cells["Y坐标"].Value); - GSOFeature flagFeature = globeControl1.Globe.Layers.GetLayerByCaption("标识器").GetFeatureByID(int.Parse(id)); - string type = ""; - string pipe = ""; - string sql = "select t.标识器型号,t.对象编号 from 标识器 t where t.编号='" + flagno + "'"; - using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) - { - while (reader.Read()) - { - type = reader.GetString(0); - pipe = reader.GetString(1); - } - } - - GSOLabel label = new GSOLabel(); - label.Text = "标识器编号:" + flagno + "\r\n" + - "标识器类型:" + type + "\r\n" + - //"标识对象编号:" + pipe + "\r\n" + - "所属道路:" + flagstreet; - label.Style = new GSOLabelStyle(); - label.Style.TextStyle.FontSize = 18; - label.Style.TextStyle.ForeColor = Color.FromArgb(0, 0, 0, 255); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 10; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); - this.globeControl1.Refresh(); - - } - catch (Exception ex) - { - MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - - } - } /// /// 标识器报废 /// @@ -363,13 +304,9 @@ //Thread downloadJob = new Thread(new ParameterizedThreadStart(doSave)); //downloadJob.IsBackground = true; //downloadJob.Start(e); - globeControl1.Globe.Layers["标识器"].Save(); + //globeControl1.Globe.Layers["标识器"].Save(); globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - foreach (GSOFeature f in Features) - { - f.Label = null; - } - Features.RemoveRange(0, Features.Count); + globeControl1.Refresh(); } @@ -525,6 +462,7 @@ } } + GSOLabel label = new GSOLabel(); label.Text = "标识器编号:" + flagno + "\r\n" + "标识器类型:" + type + "\r\n" + @@ -539,9 +477,13 @@ label.Style.TextStyle.FontName = "黑体"; label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); + GSOFeature f = new GSOFeature(); + f.Geometry = flagFeature.Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize=-1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + globeControl1.Globe.JumpToFeature(newFeature, 20); this.globeControl1.Refresh(); } diff --git a/FrmPatrolerEdit.Designer.cs b/FrmPatrolerEdit.Designer.cs index c551efc..34ee75b 100644 --- a/FrmPatrolerEdit.Designer.cs +++ b/FrmPatrolerEdit.Designer.cs @@ -132,6 +132,7 @@ this.txt_phone.Name = "txt_phone"; this.txt_phone.Size = new System.Drawing.Size(172, 21); this.txt_phone.TabIndex = 15; + this.txt_phone.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_phone_KeyPress); // // combo_sex // diff --git a/FrmPatrolerEdit.cs b/FrmPatrolerEdit.cs index f45b5ae..f0ee553 100644 --- a/FrmPatrolerEdit.cs +++ b/FrmPatrolerEdit.cs @@ -54,6 +54,15 @@ } try { + string sqlCount = "select count(*) from patroler where username='"+txt_name.Text.Trim()+"'"; + int rows = 0; + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + if (rows>0) + { + MessageBox.Show("巡检人员已存在,请更换用户名", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + if (String.IsNullOrEmpty(lab_dbid.Text.Trim())) { String sql = "insert into patroler t (t.username,t.sex,t.age,t.phonenum,t.accountstate,t.password) values ('" + txt_name.Text.Trim() + "','" + combo_sex.SelectedItem.ToString() + "','" + txt_age.Value.ToString() + "','" + txt_phone.Text.Trim() + "','OFFLINE','" + Utility.MD5Encrypt3("111111") + "')"; @@ -84,5 +93,17 @@ this.txt_phone.Text = ""; this.txt_name.Focus(); } + + private void txt_phone_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar != 8 && !Char.IsDigit(e.KeyChar)) + { + e.Handled = true; + } + else + { + + } + } } } diff --git a/MainFrm.cs b/MainFrm.cs index 0cd5881..d36e22c 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -3454,7 +3454,7 @@ //{ // j++; //} - while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称") + while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称" || field1.Name == "模型路径") { j++; fieldName = fieldNames[j].Trim(); @@ -3506,7 +3506,7 @@ //{ // j++; //} - while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称") + while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称" || field2.Name == "模型路径") { j++; field2 = (GSOFieldDefn)feature.GetFieldDefn(j + 1); diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index e5f0003..5f7d3d2 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -82,6 +82,7 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); + this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -371,10 +372,11 @@ this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); + this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); + this.buttonItem_TaskManager = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem_OnlineTask = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem_Event = new DevComponents.DotNetBar.ButtonItem(); this.ribbonPanel8 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar_UserInfo = new DevComponents.DotNetBar.RibbonBar(); this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); @@ -384,11 +386,10 @@ this.btn_user_role = new DevComponents.DotNetBar.ButtonItem(); this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem(); this.btn_reset_password = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); - this.buttonItem_TaskManager = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem_OnlineTask = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem_Event = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -653,7 +654,6 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); - this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -691,9 +691,9 @@ this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); - this.ribbonPanel8.SuspendLayout(); this.ribbonPanel2.SuspendLayout(); + this.ribbonPanel8.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel12.SuspendLayout(); this.ribbonPanel5.SuspendLayout(); @@ -1094,6 +1094,16 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -4317,84 +4327,96 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // - // ribbonPanel7 + // ribbonPanel2 // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 0); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel2.Controls.Add(this.ribbonBar4); + this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel2.Name = "ribbonPanel2"; + this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); // // // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.Style.Class = ""; + this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.StyleMouseDown.Class = ""; + this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - this.ribbonPanel7.Visible = false; + this.ribbonPanel2.StyleMouseOver.Class = ""; + this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.TabIndex = 39; + this.ribbonPanel2.Visible = false; // - // ribbonBar5 + // ribbonBar4 // - this.ribbonBar5.AutoOverflowEnabled = true; + this.ribbonBar4.AutoOverflowEnabled = true; // // // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 92); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; + this.ribbonBar4.BackgroundStyle.Class = ""; + this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.ContainerControlProcessDialogKey = true; + this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.buttonItem_TaskManager, + this.buttonItem_OnlineTask, + this.buttonItem_Event}); + this.ribbonBar4.Location = new System.Drawing.Point(3, 0); + this.ribbonBar4.Name = "ribbonBar4"; + this.ribbonBar4.Size = new System.Drawing.Size(211, 59); + this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar4.TabIndex = 0; + this.ribbonBar4.Text = "ribbonBar4"; // // // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleStyle.Class = ""; + this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; + this.ribbonBar4.TitleStyleMouseOver.Class = ""; + this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleVisible = false; // - // btn_flag + // buttonItem_TaskManager // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + this.buttonItem_TaskManager.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__76; + this.buttonItem_TaskManager.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_TaskManager.Name = "buttonItem_TaskManager"; + this.buttonItem_TaskManager.SubItemsExpandWidth = 14; + this.buttonItem_TaskManager.Text = "工单管理"; + this.buttonItem_TaskManager.Click += new System.EventHandler(this.buttonItem_TaskManager_Click); // - // slider4ground + // buttonItem_OnlineTask // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + this.buttonItem_OnlineTask.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__69; + this.buttonItem_OnlineTask.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_OnlineTask.Name = "buttonItem_OnlineTask"; + this.buttonItem_OnlineTask.SubItemsExpandWidth = 14; + this.buttonItem_OnlineTask.Text = "在线任务"; + this.buttonItem_OnlineTask.Click += new System.EventHandler(this.buttonItem_OnlineTask_Click); + // + // buttonItem_Event + // + this.buttonItem_Event.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__72; + this.buttonItem_Event.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_Event.Name = "buttonItem_Event"; + this.buttonItem_Event.SubItemsExpandWidth = 14; + this.buttonItem_Event.Text = "事件管理"; + this.buttonItem_Event.Click += new System.EventHandler(this.buttonItem_Event_Click); // // ribbonPanel8 // @@ -4525,96 +4547,84 @@ this.btn_reset_password.Text = "重置密码"; this.btn_reset_password.Click += new System.EventHandler(this.btn_reset_password_Click); // - // ribbonPanel2 + // ribbonPanel7 // - this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel2.Controls.Add(this.ribbonBar4); - this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel2.Name = "ribbonPanel2"; - this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 95); // // // - this.ribbonPanel2.Style.Class = ""; - this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel2.StyleMouseDown.Class = ""; - this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel2.StyleMouseOver.Class = ""; - this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; // - // ribbonBar4 + // ribbonBar5 // - this.ribbonBar4.AutoOverflowEnabled = true; + this.ribbonBar5.AutoOverflowEnabled = true; // // // - this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar4.BackgroundStyle.Class = ""; - this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.ContainerControlProcessDialogKey = true; - this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.buttonItem_TaskManager, - this.buttonItem_OnlineTask, - this.buttonItem_Event}); - this.ribbonBar4.Location = new System.Drawing.Point(3, 0); - this.ribbonBar4.Name = "ribbonBar4"; - this.ribbonBar4.Size = new System.Drawing.Size(211, 59); - this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar4.TabIndex = 0; - this.ribbonBar4.Text = "ribbonBar4"; + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 92); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; // // // - this.ribbonBar4.TitleStyle.Class = ""; - this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar4.TitleStyleMouseOver.Class = ""; - this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.TitleVisible = false; + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; // - // buttonItem_TaskManager + // btn_flag // - this.buttonItem_TaskManager.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__76; - this.buttonItem_TaskManager.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_TaskManager.Name = "buttonItem_TaskManager"; - this.buttonItem_TaskManager.SubItemsExpandWidth = 14; - this.buttonItem_TaskManager.Text = "工单管理"; - this.buttonItem_TaskManager.Click += new System.EventHandler(this.buttonItem_TaskManager_Click); + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); // - // buttonItem_OnlineTask + // slider4ground // - this.buttonItem_OnlineTask.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__69; - this.buttonItem_OnlineTask.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_OnlineTask.Name = "buttonItem_OnlineTask"; - this.buttonItem_OnlineTask.SubItemsExpandWidth = 14; - this.buttonItem_OnlineTask.Text = "在线任务"; - this.buttonItem_OnlineTask.Click += new System.EventHandler(this.buttonItem_OnlineTask_Click); - // - // buttonItem_Event - // - this.buttonItem_Event.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__72; - this.buttonItem_Event.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_Event.Name = "buttonItem_Event"; - this.buttonItem_Event.SubItemsExpandWidth = 14; - this.buttonItem_Event.Text = "事件管理"; - this.buttonItem_Event.Click += new System.EventHandler(this.buttonItem_Event_Click); + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); // // ribbonPanel15 // @@ -7098,16 +7108,6 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7182,9 +7182,9 @@ this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); this.ribbonPanel3.ResumeLayout(false); - this.ribbonPanel7.ResumeLayout(false); - this.ribbonPanel8.ResumeLayout(false); this.ribbonPanel2.ResumeLayout(false); + this.ribbonPanel8.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel12.ResumeLayout(false); this.ribbonPanel5.ResumeLayout(false); diff --git a/Program.cs b/Program.cs index f009c8a..12e6ecf 100644 --- a/Program.cs +++ b/Program.cs @@ -10,6 +10,7 @@ { static class Program { + static string ent = "C:\\EMSCyberPipe"; /// /// The main entry point for the application. /// @@ -30,18 +31,31 @@ String newVersionCode = getVersionCode(configUrl, currentVersionCode); if (newVersionCode != currentVersionCode) { - if (MessageBox.Show("检测到新版本,是否立即更新?", "智慧管网太湖新城规划分析系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + if (MessageBox.Show("检测到新版本,是否立即更新?", "智慧管网太湖新城电子标识系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { + + remoteUpDate(); + string programUrl = getProgramUrl(localConfigPath, "programurl"); if (programUrl != "") { - FrmDownloadProgress frmdownload = FrmDownloadProgress.getForm(programUrl); + + //FrmDownloadProgress frmdownload = FrmDownloadProgress.getForm(programUrl); + Process.Start(ent + "/UpDateProgress.exe").WaitForExit(); return; } + } else { - + /* + System.Diagnostics.Process[] proc = System.Diagnostics.Process.GetProcessesByName("UpDateProgress"); + //关闭原有应用程序的所有进程 + foreach (System.Diagnostics.Process pro in proc) + { + pro.Kill(); + } + * */ } } } @@ -51,7 +65,55 @@ FrmLogin frm = new FrmLogin(); if (frm.ShowDialog() == DialogResult.OK) { - Application.Run(new MainFrm()); + if (Utility.userRole != null) + { + Application.Run(new MainFrm()); + } + else + { + MessageBox.Show("该用户没有分配任何角色!"); + return; + } + } + } + + private static void remoteUpDate() + { + if (!File.Exists(ent)) + { + Directory.CreateDirectory(ent); + } + string filePath_exe = ent + "\\UpDateProgress.exe"; + string filePath_exeConfig = ent + "\\UpDateProgress.exe.config"; + string filePath_exePdb = ent + "\\UpDateProgress.pdb"; + string filePath_config = ent + "\\Config.xml"; + + string localPath_exe = Application.StartupPath + "\\UpDateProgress.exe"; + string localPath_exeConfig = Application.StartupPath + "\\UpDateProgress.exe.config"; + string localPath_exePdb = Application.StartupPath + "\\UpDateProgress.pdb"; + string localPath_config = Application.StartupPath + "\\Config.xml"; + + //TODO LIST:判断文件是否存在,存在就删除 + //delOldVersion(filePath_exe); + File.Copy(localPath_exe, filePath_exe, true); + File.Copy(localPath_exeConfig, filePath_exeConfig, true); + File.Copy(localPath_exePdb, filePath_exePdb, true); + File.Copy(localPath_config, filePath_config, true); + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); } } @@ -96,7 +158,6 @@ } xmlReader.Close(); - } catch (Exception e) { @@ -106,6 +167,5 @@ return versionCode; } - } } diff --git a/bin/x86/Debug/Config.xml b/bin/x86/Debug/Config.xml index 560a163..5431500 100644 --- a/bin/x86/Debug/Config.xml +++ b/bin/x86/Debug/Config.xml @@ -14,8 +14,8 @@ http://192.168.0.122:8088/UpDownFile.asmx - http://192.168.10.229/EMSCyberpipe.msi - http://192.168.10.229/EMSConfig.xml + http://192.168.0.203/EMSCyberpipe.msi + http://192.168.0.203/EMSConfig.xml diff --git a/bin/x86/Debug/EMSCyberpipe.exe b/bin/x86/Debug/EMSCyberpipe.exe index 9188a0f..65317a1 100644 --- a/bin/x86/Debug/EMSCyberpipe.exe +++ b/bin/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.pdb b/bin/x86/Debug/EMSCyberpipe.pdb index 1be6757..51a61bb 100644 --- a/bin/x86/Debug/EMSCyberpipe.pdb +++ b/bin/x86/Debug/EMSCyberpipe.pdb Binary files differ diff --git a/bin/x86/Debug/UpDateProgress.exe.config b/bin/x86/Debug/UpDateProgress.exe.config new file mode 100644 index 0000000..e365603 --- /dev/null +++ b/bin/x86/Debug/UpDateProgress.exe.config @@ -0,0 +1,3 @@ + + + diff --git "a/bin/x86/Debug/download/\345\233\233\345\267\235\347\234\201\345\234\260\344\270\213\347\256\241\347\272\277\347\233\221\347\235\243\347\256\241\347\220\206\345\255\220\347\263\273\347\273\237\350\256\276\350\256\241.docx" "b/bin/x86/Debug/download/\345\233\233\345\267\235\347\234\201\345\234\260\344\270\213\347\256\241\347\272\277\347\233\221\347\235\243\347\256\241\347\220\206\345\255\220\347\263\273\347\273\237\350\256\276\350\256\241.docx" new file mode 100644 index 0000000..699bebe --- /dev/null +++ "b/bin/x86/Debug/download/\345\233\233\345\267\235\347\234\201\345\234\260\344\270\213\347\256\241\347\272\277\347\233\221\347\235\243\347\256\241\347\220\206\345\255\220\347\263\273\347\273\237\350\256\276\350\256\241.docx" Binary files differ diff --git a/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache b/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache index 5bddb42..6ed8e69 100644 --- a/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache +++ b/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache Binary files differ diff --git a/obj/x86/Debug/EMSCyberpipe.exe b/obj/x86/Debug/EMSCyberpipe.exe index 9188a0f..65317a1 100644 --- a/obj/x86/Debug/EMSCyberpipe.exe +++ b/obj/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/obj/x86/Debug/EMSCyberpipe.pdb b/obj/x86/Debug/EMSCyberpipe.pdb index 1be6757..51a61bb 100644 --- a/obj/x86/Debug/EMSCyberpipe.pdb +++ b/obj/x86/Debug/EMSCyberpipe.pdb Binary files differ diff --git a/Cyberpipe.suo b/Cyberpipe.suo index cc8242f..7b935a0 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EditTask.cs b/EMS_Forms/Form_EditTask.cs index 72d3e8e..30a9765 100644 --- a/EMS_Forms/Form_EditTask.cs +++ b/EMS_Forms/Form_EditTask.cs @@ -23,7 +23,6 @@ public static List checkLists = new List(); OracleConnection conn = null; - List BSQFeatures = new List(); public static List roadList = new List(); @@ -193,10 +192,8 @@ private void Form_EditTask_FormClosing(object sender, FormClosingEventArgs e) { - for (int i = 0; i < BSQFeatures.Count; i++) - { - BSQFeatures[i].Label = null; - } + + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); globeControl1.TrackPolygonEndEvent -= new TrackPolygonEndEventHandler(TrackPolygonEndEvent); } @@ -340,6 +337,7 @@ //f.Geometry = model; //GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + GSOLabel label = new GSOLabel(); label.Text = "标识器位置"; @@ -351,8 +349,14 @@ label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); features[0].Label = label; - BSQFeatures.Add(features[0]); - globeControl1.Globe.JumpToFeature(features[0], 10); + GSOFeature f = new GSOFeature(); + f.Geometry = features[0].Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + + globeControl1.Globe.JumpToFeature(newFeature, 10); } else diff --git a/FrmFlagEdits.cs b/FrmFlagEdits.cs index ff25a41..04a9f90 100644 --- a/FrmFlagEdits.cs +++ b/FrmFlagEdits.cs @@ -17,6 +17,9 @@ InitializeComponent(); } string id = ""; + public delegate void Handle(); + public event Handle refresh; + public FrmFlagEdits(string id, string flagid, string flagno, string flagtype, string deep, string street,string gc) { @@ -52,9 +55,10 @@ "t.所属道路 = '" + txt_street.Text.Trim() + "'" + "where t.LSSYS_ID =" + id; OracleUtils.ExecuteNonQuery(OracleUtils.ConnectionString, CommandType.Text, sql); - if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.YesNo, MessageBoxIcon.Question)==DialogResult.Yes) + if (MessageBox.Show("属性编辑成功!", "结果", MessageBoxButtons.OK, MessageBoxIcon.Question)==DialogResult.OK) { this.Close(); + refresh(); } } catch (Exception ex) diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 9bf9734..8d89f55 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -27,7 +27,6 @@ int rows = 0; public static GeoScene.Engine.GSODataSource ds = null; TreeNode layerManagerNode = null; - List Features = new List(); public FrmFlagManagers(GSOGlobeControl _globeControl1) { @@ -139,6 +138,7 @@ string street = row.Cells["所属道路"].Value.ToString(); FrmFlagEdits frm = new FrmFlagEdits(id, flagid, flagno,flagtype, deep, street,gc); + frm.refresh += new FrmFlagEdits.Handle(LoadData);//改变值的事件 frm.ShowDialog(); winGridViewPager1.Refresh(); } @@ -149,66 +149,7 @@ } } - /// - /// 对象查看 - /// - /// - /// - private void winGridViewPager1_OnAddNew(object sender, EventArgs e) - { - DataGridView grid = sender as DataGridView; - if (grid != null) - { - DataGridViewRow row = grid.SelectedRows[0]; - try - { - this.WindowState = FormWindowState.Minimized; - string id = row.Cells["LSSYS_ID"].Value.ToString(); - string flagno = row.Cells["编号"].Value.ToString(); - string flagstreet = row.Cells["所属道路"].Value.ToString(); - double x = Convert.ToDouble(row.Cells["X坐标"].Value); - double y = Convert.ToDouble(row.Cells["Y坐标"].Value); - GSOFeature flagFeature = globeControl1.Globe.Layers.GetLayerByCaption("标识器").GetFeatureByID(int.Parse(id)); - string type = ""; - string pipe = ""; - string sql = "select t.标识器型号,t.对象编号 from 标识器 t where t.编号='" + flagno + "'"; - using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) - { - while (reader.Read()) - { - type = reader.GetString(0); - pipe = reader.GetString(1); - } - } - - GSOLabel label = new GSOLabel(); - label.Text = "标识器编号:" + flagno + "\r\n" + - "标识器类型:" + type + "\r\n" + - //"标识对象编号:" + pipe + "\r\n" + - "所属道路:" + flagstreet; - label.Style = new GSOLabelStyle(); - label.Style.TextStyle.FontSize = 18; - label.Style.TextStyle.ForeColor = Color.FromArgb(0, 0, 0, 255); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 10; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); - this.globeControl1.Refresh(); - - } - catch (Exception ex) - { - MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - - } - } /// /// 标识器报废 /// @@ -363,13 +304,9 @@ //Thread downloadJob = new Thread(new ParameterizedThreadStart(doSave)); //downloadJob.IsBackground = true; //downloadJob.Start(e); - globeControl1.Globe.Layers["标识器"].Save(); + //globeControl1.Globe.Layers["标识器"].Save(); globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - foreach (GSOFeature f in Features) - { - f.Label = null; - } - Features.RemoveRange(0, Features.Count); + globeControl1.Refresh(); } @@ -525,6 +462,7 @@ } } + GSOLabel label = new GSOLabel(); label.Text = "标识器编号:" + flagno + "\r\n" + "标识器类型:" + type + "\r\n" + @@ -539,9 +477,13 @@ label.Style.TextStyle.FontName = "黑体"; label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - flagFeature.Label = label; - Features.Add(flagFeature); - globeControl1.Globe.JumpToFeature(flagFeature, 20); + GSOFeature f = new GSOFeature(); + f.Geometry = flagFeature.Geometry; + f.Label = label; + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize=-1; + globeControl1.Globe.MemoryLayer.ObjectMaxVisibleDistance = -1; + globeControl1.Globe.JumpToFeature(newFeature, 20); this.globeControl1.Refresh(); } diff --git a/FrmPatrolerEdit.Designer.cs b/FrmPatrolerEdit.Designer.cs index c551efc..34ee75b 100644 --- a/FrmPatrolerEdit.Designer.cs +++ b/FrmPatrolerEdit.Designer.cs @@ -132,6 +132,7 @@ this.txt_phone.Name = "txt_phone"; this.txt_phone.Size = new System.Drawing.Size(172, 21); this.txt_phone.TabIndex = 15; + this.txt_phone.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_phone_KeyPress); // // combo_sex // diff --git a/FrmPatrolerEdit.cs b/FrmPatrolerEdit.cs index f45b5ae..f0ee553 100644 --- a/FrmPatrolerEdit.cs +++ b/FrmPatrolerEdit.cs @@ -54,6 +54,15 @@ } try { + string sqlCount = "select count(*) from patroler where username='"+txt_name.Text.Trim()+"'"; + int rows = 0; + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + if (rows>0) + { + MessageBox.Show("巡检人员已存在,请更换用户名", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + if (String.IsNullOrEmpty(lab_dbid.Text.Trim())) { String sql = "insert into patroler t (t.username,t.sex,t.age,t.phonenum,t.accountstate,t.password) values ('" + txt_name.Text.Trim() + "','" + combo_sex.SelectedItem.ToString() + "','" + txt_age.Value.ToString() + "','" + txt_phone.Text.Trim() + "','OFFLINE','" + Utility.MD5Encrypt3("111111") + "')"; @@ -84,5 +93,17 @@ this.txt_phone.Text = ""; this.txt_name.Focus(); } + + private void txt_phone_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar != 8 && !Char.IsDigit(e.KeyChar)) + { + e.Handled = true; + } + else + { + + } + } } } diff --git a/MainFrm.cs b/MainFrm.cs index 0cd5881..d36e22c 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -3454,7 +3454,7 @@ //{ // j++; //} - while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称") + while (field1.Name == "图片编码" || field1.Name == "对象编号" || field1.Name == "对象类型" || field1.Name == "对象名称" || field1.Name == "模型路径") { j++; fieldName = fieldNames[j].Trim(); @@ -3506,7 +3506,7 @@ //{ // j++; //} - while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称") + while (field2.Name == "图片编码" || field2.Name == "对象编号" || field2.Name == "对象类型" || field2.Name == "对象名称" || field2.Name == "模型路径") { j++; field2 = (GSOFieldDefn)feature.GetFieldDefn(j + 1); diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index e5f0003..5f7d3d2 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -82,6 +82,7 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); + this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -371,10 +372,11 @@ this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); + this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); + this.buttonItem_TaskManager = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem_OnlineTask = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem_Event = new DevComponents.DotNetBar.ButtonItem(); this.ribbonPanel8 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar_UserInfo = new DevComponents.DotNetBar.RibbonBar(); this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); @@ -384,11 +386,10 @@ this.btn_user_role = new DevComponents.DotNetBar.ButtonItem(); this.btn_password_edit = new DevComponents.DotNetBar.ButtonItem(); this.btn_reset_password = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar4 = new DevComponents.DotNetBar.RibbonBar(); - this.buttonItem_TaskManager = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem_OnlineTask = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem_Event = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -653,7 +654,6 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); - this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -691,9 +691,9 @@ this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); - this.ribbonPanel8.SuspendLayout(); this.ribbonPanel2.SuspendLayout(); + this.ribbonPanel8.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel12.SuspendLayout(); this.ribbonPanel5.SuspendLayout(); @@ -1094,6 +1094,16 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -4317,84 +4327,96 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // - // ribbonPanel7 + // ribbonPanel2 // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 0); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel2.Controls.Add(this.ribbonBar4); + this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel2.Name = "ribbonPanel2"; + this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); // // // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.Style.Class = ""; + this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.StyleMouseDown.Class = ""; + this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - this.ribbonPanel7.Visible = false; + this.ribbonPanel2.StyleMouseOver.Class = ""; + this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel2.TabIndex = 39; + this.ribbonPanel2.Visible = false; // - // ribbonBar5 + // ribbonBar4 // - this.ribbonBar5.AutoOverflowEnabled = true; + this.ribbonBar4.AutoOverflowEnabled = true; // // // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 92); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; + this.ribbonBar4.BackgroundStyle.Class = ""; + this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.ContainerControlProcessDialogKey = true; + this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.buttonItem_TaskManager, + this.buttonItem_OnlineTask, + this.buttonItem_Event}); + this.ribbonBar4.Location = new System.Drawing.Point(3, 0); + this.ribbonBar4.Name = "ribbonBar4"; + this.ribbonBar4.Size = new System.Drawing.Size(211, 59); + this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar4.TabIndex = 0; + this.ribbonBar4.Text = "ribbonBar4"; // // // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleStyle.Class = ""; + this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; + this.ribbonBar4.TitleStyleMouseOver.Class = ""; + this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar4.TitleVisible = false; // - // btn_flag + // buttonItem_TaskManager // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + this.buttonItem_TaskManager.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__76; + this.buttonItem_TaskManager.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_TaskManager.Name = "buttonItem_TaskManager"; + this.buttonItem_TaskManager.SubItemsExpandWidth = 14; + this.buttonItem_TaskManager.Text = "工单管理"; + this.buttonItem_TaskManager.Click += new System.EventHandler(this.buttonItem_TaskManager_Click); // - // slider4ground + // buttonItem_OnlineTask // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + this.buttonItem_OnlineTask.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__69; + this.buttonItem_OnlineTask.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_OnlineTask.Name = "buttonItem_OnlineTask"; + this.buttonItem_OnlineTask.SubItemsExpandWidth = 14; + this.buttonItem_OnlineTask.Text = "在线任务"; + this.buttonItem_OnlineTask.Click += new System.EventHandler(this.buttonItem_OnlineTask_Click); + // + // buttonItem_Event + // + this.buttonItem_Event.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__72; + this.buttonItem_Event.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem_Event.Name = "buttonItem_Event"; + this.buttonItem_Event.SubItemsExpandWidth = 14; + this.buttonItem_Event.Text = "事件管理"; + this.buttonItem_Event.Click += new System.EventHandler(this.buttonItem_Event_Click); // // ribbonPanel8 // @@ -4525,96 +4547,84 @@ this.btn_reset_password.Text = "重置密码"; this.btn_reset_password.Click += new System.EventHandler(this.btn_reset_password_Click); // - // ribbonPanel2 + // ribbonPanel7 // - this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel2.Controls.Add(this.ribbonBar4); - this.ribbonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel2.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel2.Name = "ribbonPanel2"; - this.ribbonPanel2.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel2.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 95); // // // - this.ribbonPanel2.Style.Class = ""; - this.ribbonPanel2.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel2.StyleMouseDown.Class = ""; - this.ribbonPanel2.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonPanel2.StyleMouseOver.Class = ""; - this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; // - // ribbonBar4 + // ribbonBar5 // - this.ribbonBar4.AutoOverflowEnabled = true; + this.ribbonBar5.AutoOverflowEnabled = true; // // // - this.ribbonBar4.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar4.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar4.BackgroundStyle.Class = ""; - this.ribbonBar4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.ContainerControlProcessDialogKey = true; - this.ribbonBar4.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar4.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.buttonItem_TaskManager, - this.buttonItem_OnlineTask, - this.buttonItem_Event}); - this.ribbonBar4.Location = new System.Drawing.Point(3, 0); - this.ribbonBar4.Name = "ribbonBar4"; - this.ribbonBar4.Size = new System.Drawing.Size(211, 59); - this.ribbonBar4.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar4.TabIndex = 0; - this.ribbonBar4.Text = "ribbonBar4"; + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 92); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; // // // - this.ribbonBar4.TitleStyle.Class = ""; - this.ribbonBar4.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ribbonBar4.TitleStyleMouseOver.Class = ""; - this.ribbonBar4.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar4.TitleVisible = false; + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; // - // buttonItem_TaskManager + // btn_flag // - this.buttonItem_TaskManager.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__76; - this.buttonItem_TaskManager.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_TaskManager.Name = "buttonItem_TaskManager"; - this.buttonItem_TaskManager.SubItemsExpandWidth = 14; - this.buttonItem_TaskManager.Text = "工单管理"; - this.buttonItem_TaskManager.Click += new System.EventHandler(this.buttonItem_TaskManager_Click); + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); // - // buttonItem_OnlineTask + // slider4ground // - this.buttonItem_OnlineTask.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__69; - this.buttonItem_OnlineTask.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_OnlineTask.Name = "buttonItem_OnlineTask"; - this.buttonItem_OnlineTask.SubItemsExpandWidth = 14; - this.buttonItem_OnlineTask.Text = "在线任务"; - this.buttonItem_OnlineTask.Click += new System.EventHandler(this.buttonItem_OnlineTask_Click); - // - // buttonItem_Event - // - this.buttonItem_Event.Image = global::Cyberpipe.Properties.Resources._24x24icon__2__72; - this.buttonItem_Event.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem_Event.Name = "buttonItem_Event"; - this.buttonItem_Event.SubItemsExpandWidth = 14; - this.buttonItem_Event.Text = "事件管理"; - this.buttonItem_Event.Click += new System.EventHandler(this.buttonItem_Event_Click); + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); // // ribbonPanel15 // @@ -7098,16 +7108,6 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7182,9 +7182,9 @@ this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); this.ribbonPanel3.ResumeLayout(false); - this.ribbonPanel7.ResumeLayout(false); - this.ribbonPanel8.ResumeLayout(false); this.ribbonPanel2.ResumeLayout(false); + this.ribbonPanel8.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel12.ResumeLayout(false); this.ribbonPanel5.ResumeLayout(false); diff --git a/Program.cs b/Program.cs index f009c8a..12e6ecf 100644 --- a/Program.cs +++ b/Program.cs @@ -10,6 +10,7 @@ { static class Program { + static string ent = "C:\\EMSCyberPipe"; /// /// The main entry point for the application. /// @@ -30,18 +31,31 @@ String newVersionCode = getVersionCode(configUrl, currentVersionCode); if (newVersionCode != currentVersionCode) { - if (MessageBox.Show("检测到新版本,是否立即更新?", "智慧管网太湖新城规划分析系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + if (MessageBox.Show("检测到新版本,是否立即更新?", "智慧管网太湖新城电子标识系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { + + remoteUpDate(); + string programUrl = getProgramUrl(localConfigPath, "programurl"); if (programUrl != "") { - FrmDownloadProgress frmdownload = FrmDownloadProgress.getForm(programUrl); + + //FrmDownloadProgress frmdownload = FrmDownloadProgress.getForm(programUrl); + Process.Start(ent + "/UpDateProgress.exe").WaitForExit(); return; } + } else { - + /* + System.Diagnostics.Process[] proc = System.Diagnostics.Process.GetProcessesByName("UpDateProgress"); + //关闭原有应用程序的所有进程 + foreach (System.Diagnostics.Process pro in proc) + { + pro.Kill(); + } + * */ } } } @@ -51,7 +65,55 @@ FrmLogin frm = new FrmLogin(); if (frm.ShowDialog() == DialogResult.OK) { - Application.Run(new MainFrm()); + if (Utility.userRole != null) + { + Application.Run(new MainFrm()); + } + else + { + MessageBox.Show("该用户没有分配任何角色!"); + return; + } + } + } + + private static void remoteUpDate() + { + if (!File.Exists(ent)) + { + Directory.CreateDirectory(ent); + } + string filePath_exe = ent + "\\UpDateProgress.exe"; + string filePath_exeConfig = ent + "\\UpDateProgress.exe.config"; + string filePath_exePdb = ent + "\\UpDateProgress.pdb"; + string filePath_config = ent + "\\Config.xml"; + + string localPath_exe = Application.StartupPath + "\\UpDateProgress.exe"; + string localPath_exeConfig = Application.StartupPath + "\\UpDateProgress.exe.config"; + string localPath_exePdb = Application.StartupPath + "\\UpDateProgress.pdb"; + string localPath_config = Application.StartupPath + "\\Config.xml"; + + //TODO LIST:判断文件是否存在,存在就删除 + //delOldVersion(filePath_exe); + File.Copy(localPath_exe, filePath_exe, true); + File.Copy(localPath_exeConfig, filePath_exeConfig, true); + File.Copy(localPath_exePdb, filePath_exePdb, true); + File.Copy(localPath_config, filePath_config, true); + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); } } @@ -96,7 +158,6 @@ } xmlReader.Close(); - } catch (Exception e) { @@ -106,6 +167,5 @@ return versionCode; } - } } diff --git a/bin/x86/Debug/Config.xml b/bin/x86/Debug/Config.xml index 560a163..5431500 100644 --- a/bin/x86/Debug/Config.xml +++ b/bin/x86/Debug/Config.xml @@ -14,8 +14,8 @@ http://192.168.0.122:8088/UpDownFile.asmx - http://192.168.10.229/EMSCyberpipe.msi - http://192.168.10.229/EMSConfig.xml + http://192.168.0.203/EMSCyberpipe.msi + http://192.168.0.203/EMSConfig.xml diff --git a/bin/x86/Debug/EMSCyberpipe.exe b/bin/x86/Debug/EMSCyberpipe.exe index 9188a0f..65317a1 100644 --- a/bin/x86/Debug/EMSCyberpipe.exe +++ b/bin/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.pdb b/bin/x86/Debug/EMSCyberpipe.pdb index 1be6757..51a61bb 100644 --- a/bin/x86/Debug/EMSCyberpipe.pdb +++ b/bin/x86/Debug/EMSCyberpipe.pdb Binary files differ diff --git a/bin/x86/Debug/UpDateProgress.exe.config b/bin/x86/Debug/UpDateProgress.exe.config new file mode 100644 index 0000000..e365603 --- /dev/null +++ b/bin/x86/Debug/UpDateProgress.exe.config @@ -0,0 +1,3 @@ + + + diff --git "a/bin/x86/Debug/download/\345\233\233\345\267\235\347\234\201\345\234\260\344\270\213\347\256\241\347\272\277\347\233\221\347\235\243\347\256\241\347\220\206\345\255\220\347\263\273\347\273\237\350\256\276\350\256\241.docx" "b/bin/x86/Debug/download/\345\233\233\345\267\235\347\234\201\345\234\260\344\270\213\347\256\241\347\272\277\347\233\221\347\235\243\347\256\241\347\220\206\345\255\220\347\263\273\347\273\237\350\256\276\350\256\241.docx" new file mode 100644 index 0000000..699bebe --- /dev/null +++ "b/bin/x86/Debug/download/\345\233\233\345\267\235\347\234\201\345\234\260\344\270\213\347\256\241\347\272\277\347\233\221\347\235\243\347\256\241\347\220\206\345\255\220\347\263\273\347\273\237\350\256\276\350\256\241.docx" Binary files differ diff --git a/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache b/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache index 5bddb42..6ed8e69 100644 --- a/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache +++ b/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache Binary files differ diff --git a/obj/x86/Debug/EMSCyberpipe.exe b/obj/x86/Debug/EMSCyberpipe.exe index 9188a0f..65317a1 100644 --- a/obj/x86/Debug/EMSCyberpipe.exe +++ b/obj/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/obj/x86/Debug/EMSCyberpipe.pdb b/obj/x86/Debug/EMSCyberpipe.pdb index 1be6757..51a61bb 100644 --- a/obj/x86/Debug/EMSCyberpipe.pdb +++ b/obj/x86/Debug/EMSCyberpipe.pdb Binary files differ diff --git a/obj/x86/Debug/GenerateResource.read.1.tlog b/obj/x86/Debug/GenerateResource.read.1.tlog index 7ee40f5..f4b71db 100644 --- a/obj/x86/Debug/GenerateResource.read.1.tlog +++ b/obj/x86/Debug/GenerateResource.read.1.tlog Binary files differ