diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index 4baac92..63bdc82 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index 4baac92..63bdc82 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/MainFrm.cs b/MainFrm.cs
index 5e77983..2e3ba7f 100644
--- a/MainFrm.cs
+++ b/MainFrm.cs
@@ -1,40 +1,30 @@
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Data;
using System.Drawing;
-using System.Text;
using System.Windows.Forms;
using System.IO;
using GeoScene.Globe;
using GeoScene.Data;
using GeoScene.Engine;
using System.Runtime.InteropServices;
-using DevComponents.DotNetBar.Rendering;
using DevComponents.DotNetBar;
using System.Xml;
using System.Collections;
-using System.Data.SqlClient;
-using System.Diagnostics;
-using Microsoft.Win32;
using System.Threading;
-using System.Net.NetworkInformation;
-using System.Net.Sockets;
-using MySql.Data.MySqlClient;
using System.Data.OracleClient;
-using Cyberpipe.PATM_Forms;
using Cyberpipe.Forms;
namespace Cyberpipe
{
public partial class MainFrm : Office2007Form
{
- TreeNode terrainManagerNode = null;
+
TreeNode layerManagerNode = null;
TreeNode myPlaceNode = null;
bool m_bFullScreen = false;
- Rectangle m_rcOld = new Rectangle(0, 0, 0, 0);
- GeoScene.Globe.GSOGlobeControl globeControl1;
+
+ GSOGlobeControl globeControl1;
GSOGlobeControl globeControl2;
private GSOHudButton legend;//定义图例
private GSOHudButton btnToolNone;
@@ -78,8 +68,6 @@
//管线间距分析
private GSOFeature disFeature = new GSOFeature();
private GSOFeature featureDis = new GSOFeature();
- ArrayList m_CloseValvesList = new ArrayList();//声明集合存储阀门分析的阀门Feature对象
- ArrayList m_BoosterValvesList = new ArrayList();//声明集合存储阀门分析的阀门Feature对象
//记录沿线飞行设置
//int m_nFlyMode = 2;
@@ -95,8 +83,8 @@
private OracleConnection connBackup = null;
//数据集合
- public static GeoScene.Engine.GSODataSource ds = null;
- public static GeoScene.Engine.GSODataSource shds = null;
+ public static GSODataSource ds = null;
+ public static GSODataSource shds = null;
//审核layer
string shlayername = "";
string redlinelayername = "";
@@ -130,8 +118,8 @@
FrmWait frmWait = null;//一键审核等待窗口
//FrmWait frmWait2 = null;//文档操作等待窗口
- float mouseDownX1,mouseDownY1;
- float mouseDownX2,mouseDownY2;
+ float mouseDownX1, mouseDownY1;
+ float mouseDownX2, mouseDownY2;
///
///
///
@@ -188,10 +176,10 @@
RigthMenuSet();
MenuSet();
-
+
}
-
-
+
+
///
/// 右屏中添加管纵图片
///
@@ -733,7 +721,7 @@
}
else
{
-
+
if (Utility.userRole.IndexOf("用户管理") < 0)
{
btn_user_info.Visible = false;
@@ -945,7 +933,7 @@
sliderItem1.Value = optiValue;
sliderItem2.Value = optiValue;
sliderItem3.Value = optiValue;
-
+
}
//初始化地球控件
@@ -1136,8 +1124,8 @@
Thread t1 = new Thread(new ThreadStart(doLoadDataForGlobalControl1));
t1.IsBackground = true;
t1.Start();
-
-
+
+
}
delegate void LoadDataForGlobalControl();
@@ -1414,18 +1402,18 @@
this.initMarkerTree();
this.initLayout();
this.loadData();
-
-
+
+
double x = Convert.ToDouble(Utility.Query_Roads["绿岛"].ToString().Split(',')[0]);
double y = Convert.ToDouble(Utility.Query_Roads["绿岛"].ToString().Split(',')[1]);
double z = Convert.ToDouble(Utility.Query_Roads["绿岛"].ToString().Split(',')[2]);
jumpToCameraState(x, y, z);
-
+
}
#endregion
-
+
Dictionary dictionaryNetLayerNameAndCaption = new Dictionary();
void globeControl1_AfterNetLayerAddEvent(object sender, AfterNetLayerAddEventArgs e)
{
@@ -1434,203 +1422,6 @@
e.Layer.Caption = dictionaryNetLayerNameAndCaption[e.Layer.Caption];
}
}
-
- void AddFeaturesNodeToMyPlace(GSOFeatures features)
- {
- if (features == null || features.Length == 0)
- {
- return;
- }
-
- for (Int32 i = 0; i < features.Length; i++)
- {
- GSOFeature feature = features[i];
- if (feature.Type == EnumFeatureType.FeatureFolder)
- {
-
- GSOFeatureFolder featureFolder = (GSOFeatureFolder)feature;
- AddFeaturesNodeToMyPlace(featureFolder.Features);
-
- }
- else
- {
- TreeNode tempnode = new TreeNode();
- tempnode.Text = feature.Name;
- if (feature.Geometry != null)
- {
- switch (feature.Geometry.Type)
- {
- case EnumGeometryType.GeoPoint3D:
- case EnumGeometryType.GeoMarker:
- tempnode.ImageIndex = 3;
- tempnode.SelectedImageIndex = 3;
- break;
- case EnumGeometryType.GeoPolyline3D:
- tempnode.ImageIndex = 4;
- tempnode.SelectedImageIndex = 4;
- break;
- case EnumGeometryType.GeoPolygon3D:
- tempnode.ImageIndex = 5;
- tempnode.SelectedImageIndex = 5;
- break;
- case EnumGeometryType.GeoModel:
- case EnumGeometryType.GeoEntity:
- case EnumGeometryType.GeoGroupEntity:
- case EnumGeometryType.GeoSphereEntity:
- case EnumGeometryType.GeoBoxEntity:
- case EnumGeometryType.GeoEllipsoidEntity:
- case EnumGeometryType.GeoCylinderEntity:
- case EnumGeometryType.GeoFrustumEntity:
- case EnumGeometryType.GeoEllipCylinderEntity:
- case EnumGeometryType.GeoEllipFrustumEntity:
- case EnumGeometryType.GeoRangeEllipsoidEntity:
- case EnumGeometryType.GeoRangeEllipCylinderEntity:
- case EnumGeometryType.GeoRangeEllipFrustumEntity:
-
-
- tempnode.ImageIndex = 6;
- tempnode.SelectedImageIndex = 6;
- break;
- case EnumGeometryType.GeoGroundOverlay:
- tempnode.ImageIndex = 7;
- tempnode.SelectedImageIndex = 7;
- break;
- }
-
- }
- GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(feature);
- tempnode.Checked = newFeature.Visible;
- tempnode.Tag = newFeature;
- myPlaceNode.Nodes.Add(tempnode);
- }
- }
- }
-
-
- private bool isContainName(string[] array, string name)
- {
- bool bl = false;
- for (int i = 0; i < array.Length; i++)
- {
- if (array[i] == name)
- {
- bl = true;
- break;
- }
- }
- return bl;
- }
-
- //private void setControlVisilbe(string[] resourceNames)
- //{
- // ArrayList listItem = new ArrayList();
- // ArrayList subListItem = new ArrayList();
- // System.Windows.Forms.Control.ControlCollection cc = ribbonControl1.Controls;
- // for (int i = 0; i < cc.Count; i++)
- // {
- // if (cc[i].GetType() == typeof(DevComponents.DotNetBar.RibbonStrip))
- // {
- // DevComponents.DotNetBar.RibbonStrip ribbonStripResource = cc[i] as DevComponents.DotNetBar.RibbonStrip;
- // for (int j = 0; j < ribbonStripResource.Items.Count; j++)
- // {
- // if (ribbonStripResource.Items[j].GetType() == typeof(DevComponents.DotNetBar.RibbonTabItem))
- // {
- // DevComponents.DotNetBar.RibbonTabItem ribbonTabItemResource = ribbonStripResource.Items[j] as DevComponents.DotNetBar.RibbonTabItem;
- // string tabItemResourceName = ribbonTabItemResource.Text;
- // listItem.Add(tabItemResourceName);
- // subListItem.Add(tabItemResourceName);
- // if (!isContainName(resourceNames, tabItemResourceName))
- // {
- // ribbonTabItemResource.Visible = false;
- // }
- // if (ribbonTabItemResource.SubItems.Count > 0)
- // {
- // for (int k = 0; k < ribbonTabItemResource.SubItems.Count; k++)
- // {
- // if (ribbonTabItemResource.SubItems[k].GetType() == typeof(DevComponents.DotNetBar.ButtonItem))
- // {
- // DevComponents.DotNetBar.ButtonItem buttonItemResource = ribbonTabItemResource.SubItems[k] as DevComponents.DotNetBar.ButtonItem;
- // string buttonItemResourceName = buttonItemResource.Text;
- // subListItem.Add(buttonItemResourceName);
- // if (!isContainName(resourceNames, buttonItemResourceName))
- // {
- // buttonItemResource.Visible = false;
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // else if (cc[i].GetType() == typeof(DevComponents.DotNetBar.RibbonPanel))
- // {
- // DevComponents.DotNetBar.RibbonPanel ribbonPanelResource = cc[i] as DevComponents.DotNetBar.RibbonPanel;
- // for (int j = 0; j < ribbonPanelResource.Controls.Count; j++)
- // {
- // if (ribbonPanelResource.Controls[j].GetType() == typeof(DevComponents.DotNetBar.RibbonBar))
- // {
- // DevComponents.DotNetBar.RibbonBar ribbonBarResource = ribbonPanelResource.Controls[j] as DevComponents.DotNetBar.RibbonBar;
- // for (int k = 0; k < ribbonBarResource.Items.Count; k++)
- // {
- // if (ribbonBarResource.Items[k].GetType() == typeof(DevComponents.DotNetBar.ButtonItem))
- // {
- // DevComponents.DotNetBar.ButtonItem buttonItemResource = ribbonBarResource.Items[k] as DevComponents.DotNetBar.ButtonItem;
- // string buttonItemResourceName = buttonItemResource.Text;
- // subListItem.Add(buttonItemResourceName);
- // if (!isContainName(resourceNames, buttonItemResourceName))
- // {
- // buttonItemResource.Visible = false;
- // }
- // if (buttonItemResource.SubItems.Count > 0)
- // {
- // for (int m = 0; m < buttonItemResource.SubItems.Count; m++)
- // {
- // if (buttonItemResource.SubItems[m].GetType() == typeof(DevComponents.DotNetBar.ButtonItem))
- // {
- // DevComponents.DotNetBar.ButtonItem subButtonItemResource = buttonItemResource.SubItems[m] as DevComponents.DotNetBar.ButtonItem;
- // string SubButtonItemResourceName = subButtonItemResource.Text;
- // subListItem.Add(SubButtonItemResourceName);
- // if (!isContainName(resourceNames, SubButtonItemResourceName))
- // {
- // subButtonItemResource.Visible = false;
- // }
- // }
- // }
- // }
- // }
- // else
- // {
- // if (ribbonBarResource.Items[k].GetType() == typeof(DevComponents.DotNetBar.SliderItem))
- // {
- // DevComponents.DotNetBar.SliderItem sliderItemResource = ribbonBarResource.Items[k] as DevComponents.DotNetBar.SliderItem;
- // if (!isContainName(resourceNames, sliderItemResource.Text.Trim()))
- // {
- // sliderItemResource.Visible = false;
- // }
-
- // if (sliderItemResource.SubItems.Count > 0)
- // {
- // for (int m = 0; m < sliderItemResource.SubItems.Count; m++)
- // {
- // if (sliderItemResource.SubItems[m].GetType() == typeof(DevComponents.DotNetBar.ButtonItem))
- // {
- // DevComponents.DotNetBar.ButtonItem subButtonItemResource = sliderItemResource.SubItems[m] as DevComponents.DotNetBar.ButtonItem;
- // if (!isContainName(resourceNames, subButtonItemResource.Text.Trim()))
- // {
- // subButtonItemResource.Visible = false;
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- //}
- //#endregion
void globeControl2_HudControlMouseDownEvent(object sender, HudControlMouseDownEventArgs e)
{
@@ -1662,7 +1453,7 @@
globeControl2.Globe.JumpToCameraState(camera);
}
}
-
+
private void VisitFeature3Ds(GSOFeatures feature3ds, TreeNode node)
{
for (int i = 0; i < feature3ds.Length; i++)
@@ -1786,7 +1577,7 @@
globeControl1.SwapBuffer();
Point pt1 = new Point(Convert.ToInt32(e.StartPos.X), Convert.ToInt32(e.StartPos.Y));
Point pt2 = new Point(Convert.ToInt32(e.EndPos.X), Convert.ToInt32(e.EndPos.Y));
-
+
/*Point pt = getUpperLeftPoint(pt1, pt2);
Image myImg = new Bitmap(Convert.ToInt32(e.Rect.Width), Convert.ToInt32(e.Rect.Height));
Graphics g = Graphics.FromImage(myImg);
@@ -1994,18 +1785,18 @@
{
if (e.Button == MouseButtons.Right && e.Node.Tag.ToString().Contains("|"))
{
-
+
if (e.Node.Tag.ToString().Split('|')[0] == "locaserver")
{
-
+
foreach (ToolStripItem item in layerNodeContexMenu.Items)
{
item.Visible = false;
}
return;
-
+
}
-
+
if (e.Node.Tag.ToString().Split('|')[0] == "new")
{
LayerEditableMenuItem.Enabled = true;
@@ -2072,7 +1863,7 @@
GSOLayer layer = node.Tag as GSOLayer;
//globeControl1.Globe.Layers.Remove(layer);
- for (int i = globeControl1.Globe.Layers.Count-1; i >=0; i--)
+ for (int i = globeControl1.Globe.Layers.Count - 1; i >= 0; i--)
{
if (globeControl1.Globe.Layers[i].Caption == layer.Caption)
{
@@ -2180,7 +1971,7 @@
private void layerTree_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
{
- if(this.layerTree.SelectedNode!=null)
+ if (this.layerTree.SelectedNode != null)
{
if (this.layerTree.SelectedNode.Tag.ToString().Contains("|"))
{
@@ -2201,7 +1992,8 @@
}
globeControl1.Refresh();
}
- else {
+ else
+ {
double x = layer.LatLonBounds.Center.X;
double y = layer.LatLonBounds.Center.Y;
globeControl1.Globe.FlyToPosition(new GSOPoint3d(x, y, 0), EnumAltitudeMode.Absolute);
@@ -2306,12 +2098,12 @@
void globeControl1_TrackPolylineEndEvent(object sender, TrackPolylineEndEventArgs e)
{
//横断面分析、道路横断面分析
- if (trackPolylineEndMode == EnumTrackPolylineEndMode.HDM_Analysis||
+ if (trackPolylineEndMode == EnumTrackPolylineEndMode.HDM_Analysis ||
trackPolylineEndMode == EnumTrackPolylineEndMode.DLDM_Analysis)
{
Dictionary hdmDic = SectionAnalysisTool.HDMAnalysis(this.globeControl1,
e.Polyline, this.m_PipelineLayerNames);
- FrmHDMAnalysis3 frm = new FrmHDMAnalysis3(hdmDic, this.globeControl1,
+ FrmHDMAnalysis3 frm = new FrmHDMAnalysis3(hdmDic, this.globeControl1,
trackPolylineEndMode);
frm.Show(this);
}
@@ -2512,7 +2304,7 @@
* **/
}
#endregion
-
+
///
/// 根据范围统计阀门、管线、工井等, 开挖分析, 挖方量分析
///
@@ -2527,7 +2319,7 @@
switch (trackflag)
{
case "valvequery":
- FrmValveStatistics frm = new FrmValveStatistics(globeControl1,polygon, new DataGridViewDelegate(InitDataGridViewX1));
+ FrmValveStatistics frm = new FrmValveStatistics(globeControl1, polygon, new DataGridViewDelegate(InitDataGridViewX1));
frm.Show(this);
//panelEx6.Visible = true;
//toolStripFeatureLength.Text = "";
@@ -2535,15 +2327,15 @@
break;
case "PipelineDistanceStatistics":
-
+
FrmAllPipelineStatis frm1 = new FrmAllPipelineStatis(globeControl1, polygon, new DataGridViewDelegate(InitDataGridViewX1), m_PipelineLayerNames);
frm1.Show(this);
globeControl1.Globe.Action = EnumAction3D.ActionNull;
break;
case "PipelineSpatialQuery":
-
- FrmAllPipelineStatis.ShowForm(globeControl1,polygon,new DataGridViewDelegate(InitDataGridViewX1),m_PipelineLayerNames);
+
+ FrmAllPipelineStatis.ShowForm(globeControl1, polygon, new DataGridViewDelegate(InitDataGridViewX1), m_PipelineLayerNames);
globeControl1.Globe.ClearAnalysis();
globeControl1.Globe.Action = EnumAction3D.ActionNull;
@@ -2603,7 +2395,7 @@
//listBSQ.Add(bsqFeatures);
//FrmBSQDuoBianXingStatis bsqFrm = new FrmBSQDuoBianXingStatis(workWellLen, globeControl1, listBSQ);
- FrmBSQStatis bsqFrm = new FrmBSQStatis(globeControl1,e.Polygon);
+ FrmBSQStatis bsqFrm = new FrmBSQStatis(globeControl1, e.Polygon);
bsqFrm.Show(this);
globeControl1.Globe.Action = EnumAction3D.ActionNull;
break;
@@ -2616,74 +2408,6 @@
}
}
- #region 验证端口
- /*
- ///
- /// 验证端口
- ///
- ///
- private bool ValiPort()
- {
- Ping p = new Ping();//创建Ping对象p
- PingReply pr = p.Send(Utility.localicenseserverip);//向指定IP或者主机名的计算机发送ICMP协议的ping数据包
- if (pr.Status == IPStatus.Success)//如果ping成功
- {
- try
- {
- TcpClient tcpc = new TcpClient(Utility.localicenseserverip, Utility.localicenseserverport);//对IP地址为"192.168.0.105"的计算机的1500端口提出连接申请
- tcpc.Close();
- return true;
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- MessageBox.Show("端口连接错误!" + ex.Message);
- return false;
- }
- }
- else
- {
- int times = 0;//重新连接次数;
- int count = 2;//设置尝试次数
- while (times < count)
- {
- //Thread.Sleep(1000);//等待时间(方便测试的话,你可以改为1000)
- pr = p.Send(Utility.localicenseserverip);
-
- if (pr.Status == IPStatus.Success)
- {
- try
- {
- TcpClient tcpc = new TcpClient(Utility.localicenseserverip, Utility.localicenseserverport);//对IP地址为"192.168.0.105"的计算机的1500端口提出连接申请
- tcpc.Close();
- return true;
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- MessageBox.Show("端口连接错误!" + ex.Message);
- return false;
- }
- }
- else
- {
- times++;
- if (times < count)
- {
- continue;
- }
- else
- {
- MessageBox.Show("重新尝试连接失败");
- return false;
- }
- }
- }
- return false;
- }
- }
- */
- #endregion
///
/// 鼠标悬浮提示
@@ -2721,7 +2445,7 @@
{
if (e.Button == MouseButtons.Left)
{
-
+
if (m_AddPipeLine == true && globeControl1.Globe.Action == EnumAction3D.DrawPolyline)//添加管线
{
GSOLayer layerDest = globeControl1.Globe.DestLayerFeatureAdd;
@@ -2904,7 +2628,7 @@
m_isDrawRedPology = false;
globeControl1.Globe.Action = EnumAction3D.ActionNull;
-
+
}
}
@@ -3318,7 +3042,7 @@
///
///
///
- private string GetBubbleInfo(GSOFeature feature,GSOGlobeControl globeControl)
+ private string GetBubbleInfo(GSOFeature feature, GSOGlobeControl globeControl)
{
if (feature == null)
{
@@ -3470,7 +3194,7 @@
{
name2 += "_米";
}
- value2 = dl2.ToString("0.00");
+ value2 = dl2.ToString("0.00");
}
else
{
@@ -3581,16 +3305,7 @@
}
return null;
}
-
- ///
- /// 菜单上的 三维导航 工具按钮
- ///
- ///
- ///
- private void buttonItem86_Click(object sender, EventArgs e)
- {
- globeControl1.Globe.Action = EnumAction3D.ActionNull;
- }
+
///
/// 地上模式 菜单按钮
@@ -3776,7 +3491,7 @@
sideBarPanelItem3.Visible = false;
layerTree.Visible = false;
controlContainerItem3.Visible = false;
-
+
//修改图层管理与标注管理、覆土审查、水平净距分析、垂直净距分析和碰撞分析控件之间的逻辑关系
controlContainerItem5.Visible = false;
sideBar1.Visible = false;
@@ -3798,7 +3513,7 @@
}
*/
Refresh();
-
+
}
}
///
@@ -3851,7 +3566,7 @@
int widthFull = Screen.PrimaryScreen.Bounds.Width;
int heightFull = Screen.PrimaryScreen.Bounds.Height;
-
+
this.FormBorderStyle = FormBorderStyle.None;
this.WindowState = FormWindowState.Normal;
@@ -3966,44 +3681,7 @@
buttonItem130_Click_1(this, EventArgs.Empty);
}
}
- /*
- ///
- /// 输出地图
- ///
- ///
- ///
- ///
- private Point getUpperLeftPoint(Point p1, Point p2) //
- {
- Rectangle rc = new Rectangle();
- p1 = this.globeControl1.PointToScreen(p1);
- p2 = this.globeControl1.PointToScreen(p2);
- if (p1.X < p2.X)
- {
- rc.X = p1.X;
- rc.Width = p2.X - p1.X;
- }
- else
- {
- rc.X = p2.X;
- rc.Width = p1.X - p2.X;
- }
- if (p1.Y < p2.Y)
- {
- rc.Y = p1.Y;
- rc.Height = p2.Y - p1.Y;
- }
- else
- {
- rc.Y = p2.Y;
- rc.Height = p1.Y - p2.Y;
- }
-
- Point pt = new Point(rc.Left, rc.Top);
- return pt;
- }
- * */
private Point getUpperLeftPoint(Point p1, Point p2, out int mapWidth, out int mapHeight) //
{
@@ -4050,7 +3728,7 @@
}
Image printImage;
-
+
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawImage(printImage, 10, 10);
@@ -4106,7 +3784,7 @@
}
}
}
-
+
///
/// 窗体下方属性表格 右键菜单中的 “定位”菜单
///
@@ -4220,29 +3898,6 @@
count = 0;
}
}
- #region wxl 删除无用??有疑问,功能用在哪里?
- ///
- /// 绘制线 菜单
- ///
- ///
- ///
- //private void btnAddLine_Click(object sender, EventArgs e)
- //{
- // globeControl1.Globe.DestLayerFeatureAdd = globeControl1.Globe.MemoryLayer;
- // globeControl1.Globe.Action = EnumAction3D.DrawPolyline;
- //}
-
- ///
- /// 绘制面 菜单
- ///
- ///
- ///
- //private void btnAddPolygon_Click(object sender, EventArgs e)
- //{
- // globeControl1.Globe.DestLayerFeatureAdd = globeControl1.Globe.MemoryLayer;
- // globeControl1.Globe.Action = EnumAction3D.DrawPolygon;
- //}
- #endregion
///
/// 图层目录树 右键菜单中的 目标图层 菜单
///
@@ -4298,7 +3953,7 @@
GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerCaption);
layer.Dataset.Save();
}
-
+
#region wxl feature的公共方法
///
@@ -4359,10 +4014,10 @@
if (globeControl1.Globe.Action != EnumAction3D.NormalHit)
{
buttonItemFX3_6.Checked = false;
- // ClearConnexityAnalysis();
+ // ClearConnexityAnalysis();
buttonItemFX3_5.Checked = false;
- // ClearCloseValvesAnalysis();
+ // ClearCloseValvesAnalysis();
}
if (globeControl1.Globe.Action != EnumAction3D.TrackPolygon)
{
@@ -4383,15 +4038,16 @@
{
e.Cancel = true;
}
- else {
+ else
+ {
globeControl1.Globe.MemoryLayer.SaveAs(Application.StartupPath + "/MyPlace.kml");
}
-
+
//saveLayerList(layerManagerNode.Nodes);
//注销id号为103的热键设定
// UnregisterHotKey(Handle, 103);
}
-
+
///
/// 垂直净距分析 功能界面中的 选择图层复选框 选中状态改变事件处理
///
@@ -4488,7 +4144,6 @@
comboBoxEx4.Enabled = true;
}
}
- GSOFeatures feats_vertical = new GSOFeatures();
///
/// 垂直净距分析 功能界面中的 选择图层下拉框 选中项改变 事件处理
///
@@ -5731,7 +5386,7 @@
}
}
-
+
///
/// 添加指定路径下的数据 功能
@@ -5825,7 +5480,7 @@
}
return objRes;
}
-
+
///
/// 碰撞分析功能界面中 选择管线复选框 选中状态改变事件处理
///
@@ -5938,7 +5593,7 @@
}
}
}
-
+
if (globeControl1.Globe.Action == EnumAction3D.SelectObject)
{
globeControl1.Globe.Action = EnumAction3D.ActionNull;
@@ -5983,7 +5638,7 @@
MessageBox.Show("表格内容为空!", "提示");
}
}
-
+
/////
///// 区域分析 菜单
/////
@@ -6040,134 +5695,6 @@
}
}
}
-
-
-
- #region Fan 去掉
- ////GSOFeature emitterFeature; // 粒子要素
- /////
- ///// 添加火苗 功能
- /////
- /////
- /////
- /////
- //private void AddFire(double x, double y, double z)
- //{
- // GSOFeatures feats = globeControl1.Globe.MemoryLayer.GetFeatureByName("粒子要素", true);
- // if (feats.Length > 0)
- // globeControl1.Globe.MemoryLayer.RemoveFeatureByID(feats[0].ID);
-
- // string strResPath = Application.StartupPath + "/Resource";
- // // 烟火粒子示例,由三个发射器构成
- // GSOGeoParticle geoParticle = new GSOGeoParticle();
- // geoParticle.SetPosition(x, y, z); // 添加到这个经纬度位置
- // geoParticle.AltitudeMode = EnumAltitudeMode.RelativeToGround;
-
- // GSORingParticleEmitter emitter = new GSORingParticleEmitter();
- // emitter.TexturePath = strResPath + "/ParticleImage/flare1.png";//烟1111111111111
-
- // emitter.SetSizeFix(1, 1);
- // emitter.VelFix = 1;
- // emitter.VelRnd = 5;
-
- // emitter.AngleXYFix = 0;
- // emitter.AngleXYRnd = 180;
-
- // emitter.AngleXZFix = 90;
- // emitter.AngleXZRnd = 0;
-
- // emitter.LifeFix = 0.5f;
- // emitter.LifeRnd = 0.0f;
-
- // emitter.RotFix = 0;
- // emitter.RotRnd = 0;
-
- // emitter.RotVelFix = 0;
- // emitter.RotVelRnd = 0;
-
- // emitter.EmitPerSec = 100;
- // emitter.IsLumAdded = true;
-
- // // 采用线性插值生成粒子的初始颜色
- // emitter.ColorRndStart = Color.White;
- // emitter.ColorRndEnd = Color.Red;
-
-
- // GSOColorParticleEffector effector2 = new GSOColorParticleEffector();
- // effector2.SetColorChanged(0, -1, -1, 0);
- // effector2.StartTime = 0.0f;
- // effector2.EndTime = -1.0f;
- // emitter.AddEffector(effector2);
-
- // // 将三个发射器添加到粒子对象中
- // geoParticle.AddEmitter(emitter);
-
- // geoParticle.Play();
-
- // GSOFeature emitterFeature = new GSOFeature();
- // emitterFeature.Geometry = geoParticle;
- // emitterFeature.Name = "粒子要素"; //
- // globeControl1.Globe.MemoryLayer.AddFeature(emitterFeature);
-
- //}
- /////
- ///// 添加喷泉 功能
- /////
- /////
- /////
- /////
- //private void AddFountain(double x, double y, double z)
- //{
- // GSOFeatures feats = globeControl1.Globe.MemoryLayer.GetFeatureByName("粒子要素", true);
- // if (feats.Length > 0)
- // globeControl1.Globe.MemoryLayer.RemoveFeatureByID(feats[0].ID);
-
- // string strResPath = Application.StartupPath + "/Resource";
-
- // GSOGeoParticle geoParticle = new GSOGeoParticle();
- // geoParticle.SetPosition(x, y, z); // 添加到这个经纬度位置
- // geoParticle.AltitudeMode = EnumAltitudeMode.RelativeToGround;
-
- // GSOPointParticleEmitter emitter = new GSOPointParticleEmitter();
- // emitter.TexturePath = strResPath + "/ParticleImage/test.png";
-
- // emitter.SetSizeFix(0.5f, 2);
- // emitter.VelFix = 10;
- // emitter.VelRnd = 2;
-
- // emitter.GravityAcc = 9.8f;
- // emitter.AngleXYFix = 0;
- // emitter.AngleXYRnd = 180;
-
- // emitter.AngleXZFix = 88;
- // emitter.AngleXZRnd = 2;
-
- // emitter.LifeFix = 5.0f;
- // emitter.LifeRnd = 1.0f;
-
- // emitter.RotFix = 0;
- // emitter.RotRnd = 0;
-
- // emitter.RotVelFix = 0;
- // emitter.RotVelRnd = 0;
-
- // emitter.EmitPerSec = 1000;
- // emitter.ColorRndStart = Color.FromArgb(33, 255, 255, 255);
- // emitter.ColorRndEnd = Color.FromArgb(11, 255, 255, 255);
- // emitter.IsLumAdded = false;
-
- // // 将三个发射器添加到粒子对象中
- // geoParticle.AddEmitter(emitter);
-
- // geoParticle.Play();
- // GSOFeature emitterFeature = new GSOFeature();
- // emitterFeature.Geometry = geoParticle;
- // emitterFeature.Name = "粒子要素"; //
-
- // globeControl1.Globe.MemoryLayer.AddFeature(emitterFeature);
- // //globeControl1.Globe.FlyToFeature(emitterFeature);
- //}
- #endregion
///
/// 获取指定图层中最后一个feature对象的名称对应的整数
@@ -6269,7 +5796,7 @@
}
return resFeature;
}
-
+
///
/// 图层节点树中 节点 右键单击事件处理
///
@@ -6445,82 +5972,9 @@
}
}
- ///
- /// 双屏对比 菜单
- ///
- ///
- ///
- //private void buttonItem94_Click(object sender, EventArgs e)
- //{
- // buttonItem94.Checked = !buttonItem94.Checked;
- // splitContainer1.Panel2Collapsed = !buttonItem94.Checked;
- // if (buttonItem94.Checked)
- // {
- // buttonItem95.Enabled = true;
- // buttonItem96.Enabled = true;
- // sideBar1.Visible = false;
- // buttonItem1.Checked = false;
- // for (int i = globeControl2.Globe.Layers.Count - 1; i >= 0 ; i--)
- // {
- // GSOLayer layer = globeControl2.Globe.Layers[i];
- // if (!layer.Name.Contains("fttp:"))
- // {
- // globeControl2.Globe.Layers.Remove(layer);
- // }
- // }
- // globeControl2.Globe.GroundOpaque = globeControl1.Globe.GroundOpaque;
- // FrmDataBaseOpt frm = new FrmDataBaseOpt(globeControl2);
- // frm.Show(this);
- // globeControl2.Globe.Refresh();
- // }
- // else
- // {
- // buttonItem95.Enabled = false;
- // buttonItem96.Enabled = false;
- // sideBar1.Visible = true;
- // buttonItem1.Checked = true;
- // sideBarPanelItem3.Visible = true;
- // layerTree.Visible = true;
- // controlContainerItem3.Visible = true;
- // Refresh();
- // }
- //}
- ///
- /// 模拟分析 菜单
- ///
- ///
- ///
- //private void buttonItem51_Click(object sender, EventArgs e)
- //{
- // buttonItem51.Checked = !buttonItem51.Checked;
- // ribbonBarMN.Visible = buttonItem51.Checked;
- // ribbonBarMN.Location = new Point(0, 0);
- //}
-
- ///
- /// 双屏设置 菜单
- ///
- ///
- ///
- //private void buttonItem96_Click(object sender, EventArgs e)
- //{
- // FrmLayerControl frm = new FrmLayerControl(layerTree,globeControl1,globeControl2);
- // frm.Show(this);
- //}
- ///
- /// 双屏联动 菜单
- ///
- ///
- ///
- //private void buttonItem95_Click(object sender, EventArgs e)
- //{
- // buttonItem95.Checked = !buttonItem95.Checked;
- //}
- /////
-
//定时检查传感器的状态
public System.Windows.Forms.Timer timerOfSensor = null;
-
+
///
/// 碰撞分析 功能界面中 关闭按钮 事件处理
@@ -6545,7 +5999,7 @@
}
else
{
- sideBar1.Visible = false;
+ sideBar1.Visible = false;
}
Refresh();
@@ -6855,67 +6309,6 @@
}
}
-
- ////
- ////导出路由专题图
- ////
- //private void btnOutputR_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.btnOutputR.Text);
-
- // Point pt1 = new Point(Convert.ToInt32(0), Convert.ToInt32(0));
- // Point pt2 = new Point(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Point pt = getUpperLeftPoint(pt1, pt2);
- // Image myImg = new Bitmap(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Graphics g = Graphics.FromImage(myImg);
- // g.CopyFromScreen(pt, new Point(0, 0), new Size(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height)));
-
- // F_PATMTitle frm = new F_PATMTitle("R", myImg);
- // frm.ShowDialog();
- //}
- //
- //导出配件专题图
- //
- //private void btnOutputF_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.btnOutputF.Text);
-
- // Point pt1 = new Point(Convert.ToInt32(0), Convert.ToInt32(0));
- // Point pt2 = new Point(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Point pt = getUpperLeftPoint(pt1, pt2);
- // Image myImg = new Bitmap(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Graphics g = Graphics.FromImage(myImg);
- // g.CopyFromScreen(pt, new Point(0, 0), new Size(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height)));
-
- // F_PATMTitle frm = new F_PATMTitle("F", myImg);
- // frm.ShowDialog();
- //}
-
-
-
-
- ////交越点入库
- //private void fmrk_Click(object sender, EventArgs e)
- //{
- // //保存日志
- // LogManager.saveLog(Utility.userName, this.fmrk.Text);
-
- // if (ds == null)
- // {
- // MessageBox.Show("请先连接数据库", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
- // ConnectDB(null, null);
- // }
- // if (ds == null)
- // return;
- // FrmAddValve frm = new FrmAddValve(globeControl1, ds);
- // if (frm.ShowDialog() == DialogResult.OK)
- // {
- // addNodeToLayerManagerNode(frm.rukuLayer);
- // }
- //}
-
///
/// 一键审核---导入数据
///
@@ -6949,7 +6342,7 @@
MessageBox.Show("内存过载请清理内存,并重新启动规划分析!", "提示");
return;
}
-
+
}
///
@@ -7012,7 +6405,7 @@
LogManager.saveLog(Utility.userName, this.buttonItem128.Text);
//垂直净距标准
- frmSh = new FrmYJSHTC(globeControl1, globeControl2,layerTree);
+ frmSh = new FrmYJSHTC(globeControl1, globeControl2, layerTree);
if (frmSh.ShowDialog() == DialogResult.OK)
{
@@ -7033,7 +6426,7 @@
double dVerticalJingJuBiaoZhun = 1, dHorizontalJingJuBiaoZhun = 1;
if (frmSh.rukuLayer != null)
{
- #region
+ #region
this.Invoke((EventHandler)delegate
{
try
@@ -7122,11 +6515,11 @@
}
else
{
-
+
}
}
-
+
///
/// 清除渲染结果
///
@@ -7207,7 +6600,7 @@
private void buttonItem134_Click_1(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, "模拟设计修改");
-
+
frmModify = new FrmMnModify(globeControl1, shlayername, shresultLists);
if (boolfrmModify == false)
@@ -7224,7 +6617,7 @@
}
-
+
///
/// 一键审核中调节透明度
@@ -7241,7 +6634,7 @@
{
layer.Opaque = 100 - sliderItem1.Value;
}
-
+
optiValue = sliderItem1.Value;
}
///
@@ -7541,9 +6934,9 @@
buttonClearAnalysisResult_Click(null, null);
NetworkAnalysisTool.ClearAllTopAnalysis(this.globeControl1);
- // ClearConnexityAnalysis();//清除连通性分析
- // ClearCloseValvesAnalysis();//清除阀门分析
-
+ // ClearConnexityAnalysis();//清除连通性分析
+ // ClearCloseValvesAnalysis();//清除阀门分析
+
//清除管线间距分析
if (disFeature != null)
{
@@ -7566,7 +6959,7 @@
globeControl1.Globe.UnderGroundFloor.Visible = false;//隐藏地下网格线
- // ClearUpDownTraceAnalysis(); //清除上下游分析
+ // ClearUpDownTraceAnalysis(); //清除上下游分析
globeControl1.Globe.RemoveAllPits();//清除所有坑
string[] markerStrs = new string[9];
@@ -7613,18 +7006,7 @@
{
//日志记录
LogManager.saveLog(Utility.userName, "管线长度统计");
-
- //pipeLineDis.Clear();
- //List list = new List();
- //for (int i = 0; i < m_PipelineLayerNames.Count; i++)
- //{
- // GSOFeatures fs = Intersects_Pipeline(null, m_PipelineLayerNames[i]);
- // if (fs!=null)
- // list.Add(fs);
- //}
-
- //FrmAllPipelineStatis frm = new FrmAllPipelineStatis(0, pipeLineDis, list, globeControl1, new DataGridViewDelegate(InitDataGridViewX1));
- FrmAllPipelineStatis frm = new FrmAllPipelineStatis(globeControl1,null, new DataGridViewDelegate(InitDataGridViewX1), m_PipelineLayerNames);
+ FrmAllPipelineStatis frm = new FrmAllPipelineStatis(globeControl1, null, new DataGridViewDelegate(InitDataGridViewX1), m_PipelineLayerNames);
frm.Show(this);
}
@@ -7651,26 +7033,6 @@
{
//日志记录
LogManager.saveLog(Utility.userName, "阀门数量统计");
-
- //workWellLen.Clear();
- //List list = new List();
- ////找到所有阀门
- //if (Utility.LayerNamesList != null)
- //{
- // ArrayList listpt = Utility.LayerNamesList;
-
- // for (int i = 0; i < listpt.Count; i++)
- // {
- // string pipelineType = (string)Utility.LayerNamesList[i];
-
- // if ((pipelineType == "给水") || (pipelineType == "天然气") || (pipelineType == "热力"))
- // {
- //GSOFeatures fs = Intersect_PointLayerByType(null, pipelineType, "阀门");
- // list.Add(fs);
- // }
- // }
- //}
- //FrmValveStatistics frm = new FrmValveStatistics(workWellLen, list, globeControl1, new DataGridViewDelegate(InitDataGridViewX1));
FrmValveStatistics frm = new FrmValveStatistics(globeControl1, null, new DataGridViewDelegate(InitDataGridViewX1));
frm.Show(this);
@@ -7696,7 +7058,7 @@
///
///
private void buttonItemTJ3_ALL_Click(object sender, EventArgs e)
- {
+ {
FrmAllWorkWellStatis frm = new FrmAllWorkWellStatis(globeControl1, null, new DataGridViewDelegate(InitDataGridViewX1));
frm.Show(this);
}
@@ -7709,7 +7071,7 @@
{
//日志记录
LogManager.saveLog(Utility.userName, "井盖数量统计");
-
+
trackflag = "workwellquery";
globeControl1.Globe.Action = EnumAction3D.TrackPolygon;
globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack;
@@ -8003,7 +7365,7 @@
globeControl1.Globe.TrackPolylineTool.VerticalLineVisible = true;
globeControl1.Globe.TrackPolylineTool.TrackMode = EnumTrackMode.SpaceTrack;
trackPolylineEndMode = EnumTrackPolylineEndMode.HDM_Analysis;
-
+
}
///
/// 纵断面分析
@@ -8012,9 +7374,9 @@
///
private void buttonItemFX2_2_Click(object sender, EventArgs e)
{
- if (globeControl1.Globe.SelObjectCount<1)
+ if (globeControl1.Globe.SelObjectCount < 1)
{
- MessageBox.Show("请选择一条或者多条管线!", "提示", MessageBoxButtons.OK,
+ MessageBox.Show("请选择一条或者多条管线!", "提示", MessageBoxButtons.OK,
MessageBoxIcon.Information);
return;
}
@@ -8060,7 +7422,7 @@
globeControl1.Globe.TrackPolylineTool.VerticalLineVisible = true;
globeControl1.Globe.TrackPolylineTool.TrackMode = EnumTrackMode.SpaceTrack;
trackPolylineEndMode = EnumTrackPolylineEndMode.JXPM_Analysis;
-
+
}
#endregion
@@ -8154,11 +7516,11 @@
GSOLayer valveLayer = globeControl1.Globe.Layers[pipeLayerNamePrefix + "阀门"];
if (valveLayer == null)
{
- MessageBox.Show("无" + pipeLayerNamePrefix+"阀门图层", "提示");
+ MessageBox.Show("无" + pipeLayerNamePrefix + "阀门图层", "提示");
return;
}
- GSOFeatures valveFeats = NetworkAnalysisTool.CloseValvesAnalysis(resFeature,
+ GSOFeatures valveFeats = NetworkAnalysisTool.CloseValvesAnalysis(resFeature,
resLayer, valveLayer);
if (valveFeats != null)
@@ -8166,7 +7528,7 @@
FrmCloseValves frm = new FrmCloseValves(this.globeControl1, valveFeats);
frm.Show(this);
}
- else
+ else
{
MessageBox.Show("未找到关闭阀门");
}
@@ -8186,7 +7548,7 @@
return;
}
GSOFeature selFeat0, selFeat1;
- GSOLayer layer0,layer1;
+ GSOLayer layer0, layer1;
globeControl1.Globe.GetSelectObject(0, out selFeat0, out layer0);
globeControl1.Globe.GetSelectObject(1, out selFeat1, out layer1);
@@ -8206,7 +7568,7 @@
private void buttonItemFX3_7_Click(object sender, EventArgs e)
{
NetworkTraceUpDown(true); //上游追踪:
-
+
GSOFeature selLineFeature = globeControl1.Globe.SelectedObject;
if (selLineFeature == null || selLineFeature.Geometry == null || selLineFeature.Geometry.Type != EnumGeometryType.GeoPolyline3D)
{
@@ -8215,7 +7577,7 @@
}
GSOLayer selLayer = globeControl1.Globe.SelectedObjectLayer;
- NetworkAnalysisTool.ExplodeAnalysis(this.globeControl1,selLineFeature,selLayer);
+ NetworkAnalysisTool.ExplodeAnalysis(this.globeControl1, selLineFeature, selLayer);
this.buttonItemFX3_5_Click(sender, e); //关阀分析:
@@ -8442,7 +7804,7 @@
FrmBufferAnalysisBSQ frm = new FrmBufferAnalysisBSQ(globeControl1, layerTemp, bsqPT);
frm.Show(this);
}
-
+
}
///
/// 附属物分析
@@ -8571,7 +7933,7 @@
buttonItemLS5.Checked = false;
globeControl1.Globe.Action = EnumAction3D.MeasureArea;
globeControl1.Globe.AreaRuler.SpaceMeasure = false;
-
+
}
# region Fan 重构标注代码
@@ -8632,14 +7994,14 @@
return;
}
GSOGeoPolyline3D selLine = resFeature.Geometry as GSOGeoPolyline3D;
- if (selLine[0].Count <=1)
+ if (selLine[0].Count <= 1)
{
- return;
+ return;
}
- MarkTools.getInstance().showMarker(resFeature,
+ MarkTools.getInstance().showMarker(resFeature,
globeControl1, EnumMarkLayer.Mark_Depth, "");
-
+
}
///
/// 坐标标注
@@ -9089,7 +8451,7 @@
FrmAPPregion appregion = new FrmAPPregion("拷贝审核");
appregion.Show();
}
-
+
private void buttonItemSPSZ_Click(object sender, EventArgs e)
{
//日志记录
@@ -9241,137 +8603,7 @@
FrmCityServerLineAnalysis frm = new FrmCityServerLineAnalysis(globeControl1, m_PipelineLayerNames);
frm.Show(this);
}
- #region 数据管理-导入文件
- /////
- ///// 数据管理-导入本地坐标系文件
- /////
- /////
- /////
- //private void buttonItemSJGL1_1_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.buttonItemSJGL1_1.Text);
-
- // OpenFileDialog dlg = new OpenFileDialog();
- // dlg.Filter = "矢量数据(*.shp)|*.shp|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|CAD文件(*.dxf)|*.dxf|全部支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft,*.dxf)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft;*.dxf";
- // //dlg.Filter = "支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|其它格式(*.*)|*.*||";
- // dlg.Multiselect = true;
- // if (dlg.ShowDialog() == DialogResult.OK)
- // {
- // //自定义lprj文件名,从程序中复制一lprj文件。
- // int bindex = dlg.FileName.Split('\\').Length;
- // string lastname = dlg.FileName.Split('\\')[bindex - 1];
- // if (lastname.IndexOf(".dxf") != -1)
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".lprj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.lprj");
- // if (!OFInfo.Exists)
- // {
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
- // }
- // else if (lastname.IndexOf(".shp") != -1)//只能对苏州本地坐标系进行纠正
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".prj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.prj");
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
-
- // for (int i = 0; i < dlg.FileNames.Length; i++)
- // {
- // AddLayerData(dlg.FileNames[i]);
- // }
- // layerManagerNode.Expand();
-
-
- // //放大到新导入的图层
- // GSOLayer lyr = globeControl1.Globe.Layers.GetLayerByCaption(newlayername);
- // if (newlayername != "")
- // {
- // GSOFeatures features = lyr.GetAllFeatures();
- // GSORect2d rd = lyr.LatLonBounds;
- // GSOPoint2d rdcenter = rd.Center;
-
- // globeControl1.Globe.JumpToPosition(new GSOPoint3d(rdcenter.X, rdcenter.Y, 0), EnumAltitudeMode.Absolute, 1000);
-
- // globeControl1.Refresh();
- // }
- // }
- //}
-
- /////
- ///// 数据管理-导入其他坐标系文件
- /////
- /////
- /////
- //private void buttonItemSJGL1_2_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.buttonItemSJGL1_2.Text);
-
- // OpenFileDialog dlg = new OpenFileDialog();
- // dlg.Filter = "矢量数据(*.shp)|*.shp|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|CAD文件(*.dxf)|*.dxf|全部支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft,*.dxf)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft;*.dxf";
- // //dlg.Filter = "支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|其它格式(*.*)|*.*||";
- // dlg.Multiselect = true;
- // if (dlg.ShowDialog() == DialogResult.OK)
- // {
- // //自定义lprj文件名,从程序中复制一lprj文件。
- // int bindex = dlg.FileName.Split('\\').Length;
- // string lastname = dlg.FileName.Split('\\')[bindex - 1];
- // if (lastname.IndexOf(".dxf") != -1)
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".lprj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.lprj");
- // if (!OFInfo.Exists)
- // {
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
- // }
- // else if (lastname.IndexOf(".shp") != -1)//只能对苏州本地坐标系进行纠正
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".prj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\xian80.prj");
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
-
- // for (int i = 0; i < dlg.FileNames.Length; i++)
- // {
- // AddLayerData(dlg.FileNames[i]);
- // }
- // layerManagerNode.Expand();
-
-
- // //放大到新导入的图层
- // GSOLayer lyr = globeControl1.Globe.Layers.GetLayerByCaption(newlayername);
- // if (newlayername != "")
- // {
- // GSOFeatures features = lyr.GetAllFeatures();
- // GSORect2d rd = lyr.LatLonBounds;
- // GSOPoint2d rdcenter = rd.Center;
-
- // globeControl1.Globe.JumpToPosition(new GSOPoint3d(rdcenter.X, rdcenter.Y, 0), EnumAltitudeMode.Absolute, 1000);
-
- // globeControl1.Refresh();
- // }
- // }
- //}
- #endregion
+
///
/// 数据质量检查
///
@@ -9435,9 +8667,9 @@
if (ds == null)
return;
Cyberpipe.Forms.FrmPipelineModelDB frm = new Cyberpipe.Forms.FrmPipelineModelDB(globeControl1, ds);
-
- //frm.Show();
-
+
+ //frm.Show();
+
if (frm.ShowDialog() == DialogResult.OK)
{
addNodeToLayerManagerNode(frm.rukuLayer);
@@ -9578,7 +8810,7 @@
//日志记录
LogManager.saveLog(Utility.userName, this.buttonItemBJ2.Text);
- FrmSetGoalLayer frm = new FrmSetGoalLayer(globeControl1, instrumenLayerNames,"附属物");
+ FrmSetGoalLayer frm = new FrmSetGoalLayer(globeControl1, instrumenLayerNames, "附属物");
if (frm.ShowDialog() == DialogResult.OK)
{
GSOLayer featureAddLayer = TreeNodeFeatureLayer();
@@ -9600,7 +8832,7 @@
//日志记录
LogManager.saveLog(Utility.userName, this.buttonItemBJ3.Text);
- FrmSetGoalLayer frm = new FrmSetGoalLayer(globeControl1, pipefittingLayerNames,"管点");
+ FrmSetGoalLayer frm = new FrmSetGoalLayer(globeControl1, pipefittingLayerNames, "管点");
if (frm.ShowDialog() == DialogResult.OK)
{
GSOLayer featureAddLayer = TreeNodeFeatureLayer();
@@ -9929,7 +9161,7 @@
globeControl1.Globe.Action = EnumAction3D.ActionNull;
}
-
+
public struct LineStruct
{
public string layerName;
@@ -9953,7 +9185,7 @@
featsList.Clear();
lineStruct.Clear();
List listPipelineLayers = new List();
-
+
GSOLayer layer = null;
for (int i = 0; i < m_PipelineLayerNames.Count; i++)
{
@@ -9964,17 +9196,17 @@
}
}
//yanxiaowei 重构
- GSOFeatures selectFeatures=new GSOFeatures();
+ GSOFeatures selectFeatures = new GSOFeatures();
for (int i = 0; i < globeControl1.Globe.SelObjectCount; i++)
{
GSOFeature feature = null;
globeControl1.Globe.GetSelectObject(i, out feature, out layer);
selectFeatures.Add(feature);
}
- DataTable table=new DataTable();
+ DataTable table = new DataTable();
- ClassGSOTool.CalculateRedLineResult(out table, redSH, selectFeatures, globeControl1,
- listPipelineLayers,out lineStruct, out featsList);
+ ClassGSOTool.CalculateRedLineResult(out table, redSH, selectFeatures, globeControl1,
+ listPipelineLayers, out lineStruct, out featsList);
if (table.Rows.Count != 0)
AddDatagridView(table);
@@ -10020,7 +9252,7 @@
ExpEXCEL.ExpToExcel(dataGridViewX1, strSaveFile, "红线审核", lineStruct, featsList);
MessageBox.Show("导出成功!");
}
-
+
private void sliderItem2_ValueChanged(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, this.sliderItem2.Text);
@@ -10058,7 +9290,7 @@
//自定义lprj文件名,从程序中复制一lprj文件。
string filePath = dlg.FileName;
string lastname = Path.GetFileName(filePath);
-
+
for (int i = 0; i < dlg.FileNames.Length; i++)
{
AddLayerData(dlg.FileNames[i]);
@@ -10179,7 +9411,7 @@
#endregion
}
- #endregion
+ #endregion
}
///
/// 定位
@@ -10190,7 +9422,7 @@
{
LogManager.saveLog(Utility.userName, this.buttonItemLocation.Text);
- FrmFlyToPosition fly = new FrmFlyToPosition(globeControl1,globeControl2);
+ FrmFlyToPosition fly = new FrmFlyToPosition(globeControl1, globeControl2);
fly.Show(this);
}
///
@@ -10202,10 +9434,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.FlyToPosition(new GSOPoint3d(120.610963, 31.188121, 50), EnumAltitudeMode.Absolute, -4, 50, 800);
globeControl1.Globe.FlyToPointSpeed = 10000000;
@@ -10241,10 +9473,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.Action = EnumAction3D.ActionNull;
dataGridViewX1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
@@ -10277,10 +9509,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.Action = EnumAction3D.ActionNull;
//zhanshi = false;
@@ -10340,7 +9572,7 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent += new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent += new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
@@ -10377,10 +9609,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.Action = EnumAction3D.ActionNull;
panelOfTable.Visible = false;
@@ -10411,10 +9643,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.Action = EnumAction3D.ActionNull;
panelOfTable.Visible = false;
@@ -10447,10 +9679,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.Action = EnumAction3D.ActionNull;
panelOfTable.Visible = false;
@@ -10487,7 +9719,7 @@
//FrmCompareFeature frmCompareFeature = new FrmCompareFeature(globeControl1, globeControl2, layerTemp, layerTemp2,m_PipelineLayerNames,sgPipeLayersNames);
int width = this.Width;
- FrmCompareFeature.ShowForm(globeControl1, globeControl2, layerTemp, layerTemp2, m_PipelineLayerNames, sgPipeLayersNames,width);
+ FrmCompareFeature.ShowForm(globeControl1, globeControl2, layerTemp, layerTemp2, m_PipelineLayerNames, sgPipeLayersNames, width);
//frmCompareFeature.Location = new Point((this.Width - frmCompareFeature.Width)/2,50);
//frmCompareFeature.Show(this);
@@ -10549,7 +9781,7 @@
private void 标识器分类统计ToolStripMenuItem_Click(object sender, EventArgs e)
{
globeControl1.Globe.Action = EnumAction3D.ActionNull;
- FrmBSQStatis bsqStatis = new FrmBSQStatis(globeControl1,null);
+ FrmBSQStatis bsqStatis = new FrmBSQStatis(globeControl1, null);
//FrmBSQStatis bsqStatis = new FrmBSQStatis();
bsqStatis.Show(this);
}
@@ -10564,230 +9796,6 @@
globeControl1.Globe.Action = EnumAction3D.TrackPolygon;
}
- #region 保存和加载审核库加载的图层
- /*
- private void saveLayerList(TreeNodeCollection treeNodeList)
- {
- string configPath = Application.StartupPath + "\\configLayerList.xml";
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(configPath);
- XmlNode dbParams = doc.SelectSingleNode("Params/dbparams");
- XmlNode dbLayers = doc.SelectSingleNode("Params/dblayers");
- XmlNode layers = doc.SelectSingleNode("Params/layers");
- dbParams.RemoveAll();
- dbLayers.RemoveAll();
- layers.RemoveAll();
-
- List listDS = new List();
- String shDatasourceName = Utility.sgdbip + "/" + Utility.sgdbname + "_" + Utility.sgdbuser;
- bool flag = false;
-
- for (int i = 0; i < globeControl1.Globe.DataManager.DataSourceCount; i++)
- {
- GSODataSource ds = globeControl1.Globe.DataManager.GetDataSourceAt(i);
- if (ds != null && ds.Type == EnumDataSourceType.SqlServer || ds.Type == EnumDataSourceType.Oracle)
- {
- if (ds.Name == shDatasourceName)
- {
- //防止因为多次连接同一个数据库
- if (flag == true)
- {
- break;
- }
- flag = true;
- listDS.Add(ds);
- GSODataSourceCnn conn = ds.GetConnectionInfo();
-
- XmlElement dbparam = doc.CreateElement("shdbparam");
- XmlElement ip = doc.CreateElement("ship");
- ip.InnerText = conn.Server;
-
- XmlElement dbname = doc.CreateElement("shdbname");
- dbname.InnerText = conn.Database;
-
- XmlElement username = doc.CreateElement("shusername");
- username.InnerText = conn.User;
-
- XmlElement password = doc.CreateElement("shpassword");
- password.InnerText = conn.Password;
-
- XmlElement type = doc.CreateElement("shtype");
- if (ds.Type == EnumDataSourceType.SqlServer)
- {
- type.InnerText = "sqlserver";
- }
- else
- {
- type.InnerText = "oracle";
- }
-
- dbparam.AppendChild(ip);
- dbparam.AppendChild(dbname);
- dbparam.AppendChild(username);
- dbparam.AppendChild(password);
- dbparam.AppendChild(type);
- dbParams.AppendChild(dbparam);
- }
-
- }
- }
-
- for (int i = 0; i < treeNodeList.Count; i++)
- {
- GSOLayer layer = treeNodeList[i].Tag as GSOLayer;
- if (Path.GetExtension(layer.Name) == "")
- {
- XmlElement dbLayer = doc.CreateElement("dblayer");
- XmlAttribute attri = doc.CreateAttribute("dbindex");
- for (int j = 0; j < listDS.Count; j++)
- {
- if (layer.Dataset.DataSource.Name == listDS[j].Name)
- {
- attri.Value = j.ToString();
- break;
- }
- }
- dbLayer.Attributes.Append(attri);
- dbLayer.InnerText = layer.Name;
-
- dbLayers.AppendChild(dbLayer);
- }
- else
- {
- XmlElement dbLayer = doc.CreateElement("layer");
- dbLayer.InnerText = layer.Name;
- layers.AppendChild(dbLayer);
- }
- }
-
- doc.Save(configPath);
- }
- catch (Exception e)
- {
-
- }
- }
-
- private void openLayerList()
- {
- layerManagerNode.Nodes.Clear();
-
- string configPath = Application.StartupPath + "\\configLayerList.xml";
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(configPath);
- XmlNode dbParams = doc.SelectSingleNode("Params/dbparams");
- XmlNode dbLayers = doc.SelectSingleNode("Params/dblayers");
- XmlNode layers = doc.SelectSingleNode("Params/layers");
-
- List listDS = new List();
- for (int i = 0; i < dbParams.ChildNodes.Count; i++)
- {
- string ip = "";
- string dbname = "";
- string username = "";
- string password = "";
- string type = "";
- XmlNode node = dbParams.ChildNodes.Item(i);
- for (int j = 0; j < node.ChildNodes.Count; j++)
- {
- XmlNode nodeChild = node.ChildNodes.Item(j);
-
- if (nodeChild != null && nodeChild.Name == "ship")
- {
- ip = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shdbname")
- {
- dbname = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shusername")
- {
- username = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shpassword")
- {
- password = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shtype")
- {
- type = nodeChild.InnerText;
- }
- }
-
- if (type == "sqlserver")
- {
- GSODataSource ds = globeControl1.Globe.DataManager.OpenSqlServerDataSource(ip, "", dbname, username, password);
- listDS.Add(ds);
- }
- else if (type == "oracle")
- {
- GSODataSource ds = globeControl1.Globe.DataManager.OpenOracleDataSource(ip + "/" + dbname, "", "", username, password);
- listDS.Add(ds);
- }
- }
-
- for (int i = 0; i < dbLayers.ChildNodes.Count; i++)
- {
- XmlNode node = dbLayers.ChildNodes.Item(i);
- if (node != null)
- {
- string layerName = node.InnerText;
- XmlAttribute attri = node.Attributes["dbindex"];
- if (attri != null)
- {
- int dbIndex = -1;
- if (int.TryParse(attri.Value, out dbIndex))
- {
- GSODataset dataset = listDS[dbIndex].GetDatasetByName(layerName);
- globeControl1.Globe.Layers.Add(dataset);
- //更新树节点
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerName);
- TreeNode layerNode = new TreeNode();
- layerNode.Tag = layer;
- layerNode.Text = layer.Dataset.Caption;
- layerNode.ImageIndex = 0;
- layerNode.SelectedImageIndex = 0;
- layerNode.Checked = layer.Visible;
- layerManagerNode.Nodes.Insert(0, layerNode);
- // layerManagerNode.Expand();
-
-
- }
- }
- }
- }
- for (int i = 0; i < layers.ChildNodes.Count; i++)
- {
- XmlNode node = layers.ChildNodes.Item(i);
- if (node != null)
- {
- string layerName = node.InnerText;
- globeControl1.Globe.Layers.Add(layerName);
-
- //更新树节点
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerName);
- TreeNode layerNode = new TreeNode();
- layerNode.Tag = layer;
- layerNode.Text = layer.Dataset.Caption;
- layerNode.ImageIndex = 0;
- layerNode.SelectedImageIndex = 0;
- layerNode.Checked = layer.Visible;
- layerManagerNode.Nodes.Insert(0, layerNode);
- }
- }
- layerManagerNode.Expand();
- }
- catch (Exception e)
- {
-
- }
- }
- * */
- #endregion
private void btn_check_history_Click(object sender, EventArgs e)
{
@@ -10873,7 +9881,7 @@
frm.ShowDialog();
}
}
-
+
private void btn_user_role_Click(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, this.btn_user_role.Text);
@@ -10918,7 +9926,7 @@
{
this.Cursor = Cursors.Default;
}
-
+
private void buttonItemexp_CAD_Click(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, this.buttonItemexp_CAD.Text);
@@ -10956,7 +9964,7 @@
// }
// AddLayerData(strDataPath);
// //globeControl1.Globe.Layers.Add(strDataPath);
-
+
// this.Cursor = Cursors.Default;
// }
// else
@@ -10970,7 +9978,7 @@
// AddLayerData(strDataPath);
// //globeControl1.Globe.Layers.Add(strDataPath);
// }
-
+
//}
//else
//{
@@ -11181,7 +10189,7 @@
lendendGZ24_2.Visible = false;
lendendGZ24_3.Visible = false;
}
- #endregion
+ #endregion
private void buttonItemPasswordReset_Click(object sender, EventArgs e)
{
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index 4baac92..63bdc82 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/MainFrm.cs b/MainFrm.cs
index 5e77983..2e3ba7f 100644
--- a/MainFrm.cs
+++ b/MainFrm.cs
@@ -1,40 +1,30 @@
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Data;
using System.Drawing;
-using System.Text;
using System.Windows.Forms;
using System.IO;
using GeoScene.Globe;
using GeoScene.Data;
using GeoScene.Engine;
using System.Runtime.InteropServices;
-using DevComponents.DotNetBar.Rendering;
using DevComponents.DotNetBar;
using System.Xml;
using System.Collections;
-using System.Data.SqlClient;
-using System.Diagnostics;
-using Microsoft.Win32;
using System.Threading;
-using System.Net.NetworkInformation;
-using System.Net.Sockets;
-using MySql.Data.MySqlClient;
using System.Data.OracleClient;
-using Cyberpipe.PATM_Forms;
using Cyberpipe.Forms;
namespace Cyberpipe
{
public partial class MainFrm : Office2007Form
{
- TreeNode terrainManagerNode = null;
+
TreeNode layerManagerNode = null;
TreeNode myPlaceNode = null;
bool m_bFullScreen = false;
- Rectangle m_rcOld = new Rectangle(0, 0, 0, 0);
- GeoScene.Globe.GSOGlobeControl globeControl1;
+
+ GSOGlobeControl globeControl1;
GSOGlobeControl globeControl2;
private GSOHudButton legend;//定义图例
private GSOHudButton btnToolNone;
@@ -78,8 +68,6 @@
//管线间距分析
private GSOFeature disFeature = new GSOFeature();
private GSOFeature featureDis = new GSOFeature();
- ArrayList m_CloseValvesList = new ArrayList();//声明集合存储阀门分析的阀门Feature对象
- ArrayList m_BoosterValvesList = new ArrayList();//声明集合存储阀门分析的阀门Feature对象
//记录沿线飞行设置
//int m_nFlyMode = 2;
@@ -95,8 +83,8 @@
private OracleConnection connBackup = null;
//数据集合
- public static GeoScene.Engine.GSODataSource ds = null;
- public static GeoScene.Engine.GSODataSource shds = null;
+ public static GSODataSource ds = null;
+ public static GSODataSource shds = null;
//审核layer
string shlayername = "";
string redlinelayername = "";
@@ -130,8 +118,8 @@
FrmWait frmWait = null;//一键审核等待窗口
//FrmWait frmWait2 = null;//文档操作等待窗口
- float mouseDownX1,mouseDownY1;
- float mouseDownX2,mouseDownY2;
+ float mouseDownX1, mouseDownY1;
+ float mouseDownX2, mouseDownY2;
///
///
///
@@ -188,10 +176,10 @@
RigthMenuSet();
MenuSet();
-
+
}
-
-
+
+
///
/// 右屏中添加管纵图片
///
@@ -733,7 +721,7 @@
}
else
{
-
+
if (Utility.userRole.IndexOf("用户管理") < 0)
{
btn_user_info.Visible = false;
@@ -945,7 +933,7 @@
sliderItem1.Value = optiValue;
sliderItem2.Value = optiValue;
sliderItem3.Value = optiValue;
-
+
}
//初始化地球控件
@@ -1136,8 +1124,8 @@
Thread t1 = new Thread(new ThreadStart(doLoadDataForGlobalControl1));
t1.IsBackground = true;
t1.Start();
-
-
+
+
}
delegate void LoadDataForGlobalControl();
@@ -1414,18 +1402,18 @@
this.initMarkerTree();
this.initLayout();
this.loadData();
-
-
+
+
double x = Convert.ToDouble(Utility.Query_Roads["绿岛"].ToString().Split(',')[0]);
double y = Convert.ToDouble(Utility.Query_Roads["绿岛"].ToString().Split(',')[1]);
double z = Convert.ToDouble(Utility.Query_Roads["绿岛"].ToString().Split(',')[2]);
jumpToCameraState(x, y, z);
-
+
}
#endregion
-
+
Dictionary dictionaryNetLayerNameAndCaption = new Dictionary();
void globeControl1_AfterNetLayerAddEvent(object sender, AfterNetLayerAddEventArgs e)
{
@@ -1434,203 +1422,6 @@
e.Layer.Caption = dictionaryNetLayerNameAndCaption[e.Layer.Caption];
}
}
-
- void AddFeaturesNodeToMyPlace(GSOFeatures features)
- {
- if (features == null || features.Length == 0)
- {
- return;
- }
-
- for (Int32 i = 0; i < features.Length; i++)
- {
- GSOFeature feature = features[i];
- if (feature.Type == EnumFeatureType.FeatureFolder)
- {
-
- GSOFeatureFolder featureFolder = (GSOFeatureFolder)feature;
- AddFeaturesNodeToMyPlace(featureFolder.Features);
-
- }
- else
- {
- TreeNode tempnode = new TreeNode();
- tempnode.Text = feature.Name;
- if (feature.Geometry != null)
- {
- switch (feature.Geometry.Type)
- {
- case EnumGeometryType.GeoPoint3D:
- case EnumGeometryType.GeoMarker:
- tempnode.ImageIndex = 3;
- tempnode.SelectedImageIndex = 3;
- break;
- case EnumGeometryType.GeoPolyline3D:
- tempnode.ImageIndex = 4;
- tempnode.SelectedImageIndex = 4;
- break;
- case EnumGeometryType.GeoPolygon3D:
- tempnode.ImageIndex = 5;
- tempnode.SelectedImageIndex = 5;
- break;
- case EnumGeometryType.GeoModel:
- case EnumGeometryType.GeoEntity:
- case EnumGeometryType.GeoGroupEntity:
- case EnumGeometryType.GeoSphereEntity:
- case EnumGeometryType.GeoBoxEntity:
- case EnumGeometryType.GeoEllipsoidEntity:
- case EnumGeometryType.GeoCylinderEntity:
- case EnumGeometryType.GeoFrustumEntity:
- case EnumGeometryType.GeoEllipCylinderEntity:
- case EnumGeometryType.GeoEllipFrustumEntity:
- case EnumGeometryType.GeoRangeEllipsoidEntity:
- case EnumGeometryType.GeoRangeEllipCylinderEntity:
- case EnumGeometryType.GeoRangeEllipFrustumEntity:
-
-
- tempnode.ImageIndex = 6;
- tempnode.SelectedImageIndex = 6;
- break;
- case EnumGeometryType.GeoGroundOverlay:
- tempnode.ImageIndex = 7;
- tempnode.SelectedImageIndex = 7;
- break;
- }
-
- }
- GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(feature);
- tempnode.Checked = newFeature.Visible;
- tempnode.Tag = newFeature;
- myPlaceNode.Nodes.Add(tempnode);
- }
- }
- }
-
-
- private bool isContainName(string[] array, string name)
- {
- bool bl = false;
- for (int i = 0; i < array.Length; i++)
- {
- if (array[i] == name)
- {
- bl = true;
- break;
- }
- }
- return bl;
- }
-
- //private void setControlVisilbe(string[] resourceNames)
- //{
- // ArrayList listItem = new ArrayList();
- // ArrayList subListItem = new ArrayList();
- // System.Windows.Forms.Control.ControlCollection cc = ribbonControl1.Controls;
- // for (int i = 0; i < cc.Count; i++)
- // {
- // if (cc[i].GetType() == typeof(DevComponents.DotNetBar.RibbonStrip))
- // {
- // DevComponents.DotNetBar.RibbonStrip ribbonStripResource = cc[i] as DevComponents.DotNetBar.RibbonStrip;
- // for (int j = 0; j < ribbonStripResource.Items.Count; j++)
- // {
- // if (ribbonStripResource.Items[j].GetType() == typeof(DevComponents.DotNetBar.RibbonTabItem))
- // {
- // DevComponents.DotNetBar.RibbonTabItem ribbonTabItemResource = ribbonStripResource.Items[j] as DevComponents.DotNetBar.RibbonTabItem;
- // string tabItemResourceName = ribbonTabItemResource.Text;
- // listItem.Add(tabItemResourceName);
- // subListItem.Add(tabItemResourceName);
- // if (!isContainName(resourceNames, tabItemResourceName))
- // {
- // ribbonTabItemResource.Visible = false;
- // }
- // if (ribbonTabItemResource.SubItems.Count > 0)
- // {
- // for (int k = 0; k < ribbonTabItemResource.SubItems.Count; k++)
- // {
- // if (ribbonTabItemResource.SubItems[k].GetType() == typeof(DevComponents.DotNetBar.ButtonItem))
- // {
- // DevComponents.DotNetBar.ButtonItem buttonItemResource = ribbonTabItemResource.SubItems[k] as DevComponents.DotNetBar.ButtonItem;
- // string buttonItemResourceName = buttonItemResource.Text;
- // subListItem.Add(buttonItemResourceName);
- // if (!isContainName(resourceNames, buttonItemResourceName))
- // {
- // buttonItemResource.Visible = false;
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // else if (cc[i].GetType() == typeof(DevComponents.DotNetBar.RibbonPanel))
- // {
- // DevComponents.DotNetBar.RibbonPanel ribbonPanelResource = cc[i] as DevComponents.DotNetBar.RibbonPanel;
- // for (int j = 0; j < ribbonPanelResource.Controls.Count; j++)
- // {
- // if (ribbonPanelResource.Controls[j].GetType() == typeof(DevComponents.DotNetBar.RibbonBar))
- // {
- // DevComponents.DotNetBar.RibbonBar ribbonBarResource = ribbonPanelResource.Controls[j] as DevComponents.DotNetBar.RibbonBar;
- // for (int k = 0; k < ribbonBarResource.Items.Count; k++)
- // {
- // if (ribbonBarResource.Items[k].GetType() == typeof(DevComponents.DotNetBar.ButtonItem))
- // {
- // DevComponents.DotNetBar.ButtonItem buttonItemResource = ribbonBarResource.Items[k] as DevComponents.DotNetBar.ButtonItem;
- // string buttonItemResourceName = buttonItemResource.Text;
- // subListItem.Add(buttonItemResourceName);
- // if (!isContainName(resourceNames, buttonItemResourceName))
- // {
- // buttonItemResource.Visible = false;
- // }
- // if (buttonItemResource.SubItems.Count > 0)
- // {
- // for (int m = 0; m < buttonItemResource.SubItems.Count; m++)
- // {
- // if (buttonItemResource.SubItems[m].GetType() == typeof(DevComponents.DotNetBar.ButtonItem))
- // {
- // DevComponents.DotNetBar.ButtonItem subButtonItemResource = buttonItemResource.SubItems[m] as DevComponents.DotNetBar.ButtonItem;
- // string SubButtonItemResourceName = subButtonItemResource.Text;
- // subListItem.Add(SubButtonItemResourceName);
- // if (!isContainName(resourceNames, SubButtonItemResourceName))
- // {
- // subButtonItemResource.Visible = false;
- // }
- // }
- // }
- // }
- // }
- // else
- // {
- // if (ribbonBarResource.Items[k].GetType() == typeof(DevComponents.DotNetBar.SliderItem))
- // {
- // DevComponents.DotNetBar.SliderItem sliderItemResource = ribbonBarResource.Items[k] as DevComponents.DotNetBar.SliderItem;
- // if (!isContainName(resourceNames, sliderItemResource.Text.Trim()))
- // {
- // sliderItemResource.Visible = false;
- // }
-
- // if (sliderItemResource.SubItems.Count > 0)
- // {
- // for (int m = 0; m < sliderItemResource.SubItems.Count; m++)
- // {
- // if (sliderItemResource.SubItems[m].GetType() == typeof(DevComponents.DotNetBar.ButtonItem))
- // {
- // DevComponents.DotNetBar.ButtonItem subButtonItemResource = sliderItemResource.SubItems[m] as DevComponents.DotNetBar.ButtonItem;
- // if (!isContainName(resourceNames, subButtonItemResource.Text.Trim()))
- // {
- // subButtonItemResource.Visible = false;
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- //}
- //#endregion
void globeControl2_HudControlMouseDownEvent(object sender, HudControlMouseDownEventArgs e)
{
@@ -1662,7 +1453,7 @@
globeControl2.Globe.JumpToCameraState(camera);
}
}
-
+
private void VisitFeature3Ds(GSOFeatures feature3ds, TreeNode node)
{
for (int i = 0; i < feature3ds.Length; i++)
@@ -1786,7 +1577,7 @@
globeControl1.SwapBuffer();
Point pt1 = new Point(Convert.ToInt32(e.StartPos.X), Convert.ToInt32(e.StartPos.Y));
Point pt2 = new Point(Convert.ToInt32(e.EndPos.X), Convert.ToInt32(e.EndPos.Y));
-
+
/*Point pt = getUpperLeftPoint(pt1, pt2);
Image myImg = new Bitmap(Convert.ToInt32(e.Rect.Width), Convert.ToInt32(e.Rect.Height));
Graphics g = Graphics.FromImage(myImg);
@@ -1994,18 +1785,18 @@
{
if (e.Button == MouseButtons.Right && e.Node.Tag.ToString().Contains("|"))
{
-
+
if (e.Node.Tag.ToString().Split('|')[0] == "locaserver")
{
-
+
foreach (ToolStripItem item in layerNodeContexMenu.Items)
{
item.Visible = false;
}
return;
-
+
}
-
+
if (e.Node.Tag.ToString().Split('|')[0] == "new")
{
LayerEditableMenuItem.Enabled = true;
@@ -2072,7 +1863,7 @@
GSOLayer layer = node.Tag as GSOLayer;
//globeControl1.Globe.Layers.Remove(layer);
- for (int i = globeControl1.Globe.Layers.Count-1; i >=0; i--)
+ for (int i = globeControl1.Globe.Layers.Count - 1; i >= 0; i--)
{
if (globeControl1.Globe.Layers[i].Caption == layer.Caption)
{
@@ -2180,7 +1971,7 @@
private void layerTree_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
{
- if(this.layerTree.SelectedNode!=null)
+ if (this.layerTree.SelectedNode != null)
{
if (this.layerTree.SelectedNode.Tag.ToString().Contains("|"))
{
@@ -2201,7 +1992,8 @@
}
globeControl1.Refresh();
}
- else {
+ else
+ {
double x = layer.LatLonBounds.Center.X;
double y = layer.LatLonBounds.Center.Y;
globeControl1.Globe.FlyToPosition(new GSOPoint3d(x, y, 0), EnumAltitudeMode.Absolute);
@@ -2306,12 +2098,12 @@
void globeControl1_TrackPolylineEndEvent(object sender, TrackPolylineEndEventArgs e)
{
//横断面分析、道路横断面分析
- if (trackPolylineEndMode == EnumTrackPolylineEndMode.HDM_Analysis||
+ if (trackPolylineEndMode == EnumTrackPolylineEndMode.HDM_Analysis ||
trackPolylineEndMode == EnumTrackPolylineEndMode.DLDM_Analysis)
{
Dictionary hdmDic = SectionAnalysisTool.HDMAnalysis(this.globeControl1,
e.Polyline, this.m_PipelineLayerNames);
- FrmHDMAnalysis3 frm = new FrmHDMAnalysis3(hdmDic, this.globeControl1,
+ FrmHDMAnalysis3 frm = new FrmHDMAnalysis3(hdmDic, this.globeControl1,
trackPolylineEndMode);
frm.Show(this);
}
@@ -2512,7 +2304,7 @@
* **/
}
#endregion
-
+
///
/// 根据范围统计阀门、管线、工井等, 开挖分析, 挖方量分析
///
@@ -2527,7 +2319,7 @@
switch (trackflag)
{
case "valvequery":
- FrmValveStatistics frm = new FrmValveStatistics(globeControl1,polygon, new DataGridViewDelegate(InitDataGridViewX1));
+ FrmValveStatistics frm = new FrmValveStatistics(globeControl1, polygon, new DataGridViewDelegate(InitDataGridViewX1));
frm.Show(this);
//panelEx6.Visible = true;
//toolStripFeatureLength.Text = "";
@@ -2535,15 +2327,15 @@
break;
case "PipelineDistanceStatistics":
-
+
FrmAllPipelineStatis frm1 = new FrmAllPipelineStatis(globeControl1, polygon, new DataGridViewDelegate(InitDataGridViewX1), m_PipelineLayerNames);
frm1.Show(this);
globeControl1.Globe.Action = EnumAction3D.ActionNull;
break;
case "PipelineSpatialQuery":
-
- FrmAllPipelineStatis.ShowForm(globeControl1,polygon,new DataGridViewDelegate(InitDataGridViewX1),m_PipelineLayerNames);
+
+ FrmAllPipelineStatis.ShowForm(globeControl1, polygon, new DataGridViewDelegate(InitDataGridViewX1), m_PipelineLayerNames);
globeControl1.Globe.ClearAnalysis();
globeControl1.Globe.Action = EnumAction3D.ActionNull;
@@ -2603,7 +2395,7 @@
//listBSQ.Add(bsqFeatures);
//FrmBSQDuoBianXingStatis bsqFrm = new FrmBSQDuoBianXingStatis(workWellLen, globeControl1, listBSQ);
- FrmBSQStatis bsqFrm = new FrmBSQStatis(globeControl1,e.Polygon);
+ FrmBSQStatis bsqFrm = new FrmBSQStatis(globeControl1, e.Polygon);
bsqFrm.Show(this);
globeControl1.Globe.Action = EnumAction3D.ActionNull;
break;
@@ -2616,74 +2408,6 @@
}
}
- #region 验证端口
- /*
- ///
- /// 验证端口
- ///
- ///
- private bool ValiPort()
- {
- Ping p = new Ping();//创建Ping对象p
- PingReply pr = p.Send(Utility.localicenseserverip);//向指定IP或者主机名的计算机发送ICMP协议的ping数据包
- if (pr.Status == IPStatus.Success)//如果ping成功
- {
- try
- {
- TcpClient tcpc = new TcpClient(Utility.localicenseserverip, Utility.localicenseserverport);//对IP地址为"192.168.0.105"的计算机的1500端口提出连接申请
- tcpc.Close();
- return true;
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- MessageBox.Show("端口连接错误!" + ex.Message);
- return false;
- }
- }
- else
- {
- int times = 0;//重新连接次数;
- int count = 2;//设置尝试次数
- while (times < count)
- {
- //Thread.Sleep(1000);//等待时间(方便测试的话,你可以改为1000)
- pr = p.Send(Utility.localicenseserverip);
-
- if (pr.Status == IPStatus.Success)
- {
- try
- {
- TcpClient tcpc = new TcpClient(Utility.localicenseserverip, Utility.localicenseserverport);//对IP地址为"192.168.0.105"的计算机的1500端口提出连接申请
- tcpc.Close();
- return true;
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- MessageBox.Show("端口连接错误!" + ex.Message);
- return false;
- }
- }
- else
- {
- times++;
- if (times < count)
- {
- continue;
- }
- else
- {
- MessageBox.Show("重新尝试连接失败");
- return false;
- }
- }
- }
- return false;
- }
- }
- */
- #endregion
///
/// 鼠标悬浮提示
@@ -2721,7 +2445,7 @@
{
if (e.Button == MouseButtons.Left)
{
-
+
if (m_AddPipeLine == true && globeControl1.Globe.Action == EnumAction3D.DrawPolyline)//添加管线
{
GSOLayer layerDest = globeControl1.Globe.DestLayerFeatureAdd;
@@ -2904,7 +2628,7 @@
m_isDrawRedPology = false;
globeControl1.Globe.Action = EnumAction3D.ActionNull;
-
+
}
}
@@ -3318,7 +3042,7 @@
///
///
///
- private string GetBubbleInfo(GSOFeature feature,GSOGlobeControl globeControl)
+ private string GetBubbleInfo(GSOFeature feature, GSOGlobeControl globeControl)
{
if (feature == null)
{
@@ -3470,7 +3194,7 @@
{
name2 += "_米";
}
- value2 = dl2.ToString("0.00");
+ value2 = dl2.ToString("0.00");
}
else
{
@@ -3581,16 +3305,7 @@
}
return null;
}
-
- ///
- /// 菜单上的 三维导航 工具按钮
- ///
- ///
- ///
- private void buttonItem86_Click(object sender, EventArgs e)
- {
- globeControl1.Globe.Action = EnumAction3D.ActionNull;
- }
+
///
/// 地上模式 菜单按钮
@@ -3776,7 +3491,7 @@
sideBarPanelItem3.Visible = false;
layerTree.Visible = false;
controlContainerItem3.Visible = false;
-
+
//修改图层管理与标注管理、覆土审查、水平净距分析、垂直净距分析和碰撞分析控件之间的逻辑关系
controlContainerItem5.Visible = false;
sideBar1.Visible = false;
@@ -3798,7 +3513,7 @@
}
*/
Refresh();
-
+
}
}
///
@@ -3851,7 +3566,7 @@
int widthFull = Screen.PrimaryScreen.Bounds.Width;
int heightFull = Screen.PrimaryScreen.Bounds.Height;
-
+
this.FormBorderStyle = FormBorderStyle.None;
this.WindowState = FormWindowState.Normal;
@@ -3966,44 +3681,7 @@
buttonItem130_Click_1(this, EventArgs.Empty);
}
}
- /*
- ///
- /// 输出地图
- ///
- ///
- ///
- ///
- private Point getUpperLeftPoint(Point p1, Point p2) //
- {
- Rectangle rc = new Rectangle();
- p1 = this.globeControl1.PointToScreen(p1);
- p2 = this.globeControl1.PointToScreen(p2);
- if (p1.X < p2.X)
- {
- rc.X = p1.X;
- rc.Width = p2.X - p1.X;
- }
- else
- {
- rc.X = p2.X;
- rc.Width = p1.X - p2.X;
- }
- if (p1.Y < p2.Y)
- {
- rc.Y = p1.Y;
- rc.Height = p2.Y - p1.Y;
- }
- else
- {
- rc.Y = p2.Y;
- rc.Height = p1.Y - p2.Y;
- }
-
- Point pt = new Point(rc.Left, rc.Top);
- return pt;
- }
- * */
private Point getUpperLeftPoint(Point p1, Point p2, out int mapWidth, out int mapHeight) //
{
@@ -4050,7 +3728,7 @@
}
Image printImage;
-
+
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawImage(printImage, 10, 10);
@@ -4106,7 +3784,7 @@
}
}
}
-
+
///
/// 窗体下方属性表格 右键菜单中的 “定位”菜单
///
@@ -4220,29 +3898,6 @@
count = 0;
}
}
- #region wxl 删除无用??有疑问,功能用在哪里?
- ///
- /// 绘制线 菜单
- ///
- ///
- ///
- //private void btnAddLine_Click(object sender, EventArgs e)
- //{
- // globeControl1.Globe.DestLayerFeatureAdd = globeControl1.Globe.MemoryLayer;
- // globeControl1.Globe.Action = EnumAction3D.DrawPolyline;
- //}
-
- ///
- /// 绘制面 菜单
- ///
- ///
- ///
- //private void btnAddPolygon_Click(object sender, EventArgs e)
- //{
- // globeControl1.Globe.DestLayerFeatureAdd = globeControl1.Globe.MemoryLayer;
- // globeControl1.Globe.Action = EnumAction3D.DrawPolygon;
- //}
- #endregion
///
/// 图层目录树 右键菜单中的 目标图层 菜单
///
@@ -4298,7 +3953,7 @@
GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerCaption);
layer.Dataset.Save();
}
-
+
#region wxl feature的公共方法
///
@@ -4359,10 +4014,10 @@
if (globeControl1.Globe.Action != EnumAction3D.NormalHit)
{
buttonItemFX3_6.Checked = false;
- // ClearConnexityAnalysis();
+ // ClearConnexityAnalysis();
buttonItemFX3_5.Checked = false;
- // ClearCloseValvesAnalysis();
+ // ClearCloseValvesAnalysis();
}
if (globeControl1.Globe.Action != EnumAction3D.TrackPolygon)
{
@@ -4383,15 +4038,16 @@
{
e.Cancel = true;
}
- else {
+ else
+ {
globeControl1.Globe.MemoryLayer.SaveAs(Application.StartupPath + "/MyPlace.kml");
}
-
+
//saveLayerList(layerManagerNode.Nodes);
//注销id号为103的热键设定
// UnregisterHotKey(Handle, 103);
}
-
+
///
/// 垂直净距分析 功能界面中的 选择图层复选框 选中状态改变事件处理
///
@@ -4488,7 +4144,6 @@
comboBoxEx4.Enabled = true;
}
}
- GSOFeatures feats_vertical = new GSOFeatures();
///
/// 垂直净距分析 功能界面中的 选择图层下拉框 选中项改变 事件处理
///
@@ -5731,7 +5386,7 @@
}
}
-
+
///
/// 添加指定路径下的数据 功能
@@ -5825,7 +5480,7 @@
}
return objRes;
}
-
+
///
/// 碰撞分析功能界面中 选择管线复选框 选中状态改变事件处理
///
@@ -5938,7 +5593,7 @@
}
}
}
-
+
if (globeControl1.Globe.Action == EnumAction3D.SelectObject)
{
globeControl1.Globe.Action = EnumAction3D.ActionNull;
@@ -5983,7 +5638,7 @@
MessageBox.Show("表格内容为空!", "提示");
}
}
-
+
/////
///// 区域分析 菜单
/////
@@ -6040,134 +5695,6 @@
}
}
}
-
-
-
- #region Fan 去掉
- ////GSOFeature emitterFeature; // 粒子要素
- /////
- ///// 添加火苗 功能
- /////
- /////
- /////
- /////
- //private void AddFire(double x, double y, double z)
- //{
- // GSOFeatures feats = globeControl1.Globe.MemoryLayer.GetFeatureByName("粒子要素", true);
- // if (feats.Length > 0)
- // globeControl1.Globe.MemoryLayer.RemoveFeatureByID(feats[0].ID);
-
- // string strResPath = Application.StartupPath + "/Resource";
- // // 烟火粒子示例,由三个发射器构成
- // GSOGeoParticle geoParticle = new GSOGeoParticle();
- // geoParticle.SetPosition(x, y, z); // 添加到这个经纬度位置
- // geoParticle.AltitudeMode = EnumAltitudeMode.RelativeToGround;
-
- // GSORingParticleEmitter emitter = new GSORingParticleEmitter();
- // emitter.TexturePath = strResPath + "/ParticleImage/flare1.png";//烟1111111111111
-
- // emitter.SetSizeFix(1, 1);
- // emitter.VelFix = 1;
- // emitter.VelRnd = 5;
-
- // emitter.AngleXYFix = 0;
- // emitter.AngleXYRnd = 180;
-
- // emitter.AngleXZFix = 90;
- // emitter.AngleXZRnd = 0;
-
- // emitter.LifeFix = 0.5f;
- // emitter.LifeRnd = 0.0f;
-
- // emitter.RotFix = 0;
- // emitter.RotRnd = 0;
-
- // emitter.RotVelFix = 0;
- // emitter.RotVelRnd = 0;
-
- // emitter.EmitPerSec = 100;
- // emitter.IsLumAdded = true;
-
- // // 采用线性插值生成粒子的初始颜色
- // emitter.ColorRndStart = Color.White;
- // emitter.ColorRndEnd = Color.Red;
-
-
- // GSOColorParticleEffector effector2 = new GSOColorParticleEffector();
- // effector2.SetColorChanged(0, -1, -1, 0);
- // effector2.StartTime = 0.0f;
- // effector2.EndTime = -1.0f;
- // emitter.AddEffector(effector2);
-
- // // 将三个发射器添加到粒子对象中
- // geoParticle.AddEmitter(emitter);
-
- // geoParticle.Play();
-
- // GSOFeature emitterFeature = new GSOFeature();
- // emitterFeature.Geometry = geoParticle;
- // emitterFeature.Name = "粒子要素"; //
- // globeControl1.Globe.MemoryLayer.AddFeature(emitterFeature);
-
- //}
- /////
- ///// 添加喷泉 功能
- /////
- /////
- /////
- /////
- //private void AddFountain(double x, double y, double z)
- //{
- // GSOFeatures feats = globeControl1.Globe.MemoryLayer.GetFeatureByName("粒子要素", true);
- // if (feats.Length > 0)
- // globeControl1.Globe.MemoryLayer.RemoveFeatureByID(feats[0].ID);
-
- // string strResPath = Application.StartupPath + "/Resource";
-
- // GSOGeoParticle geoParticle = new GSOGeoParticle();
- // geoParticle.SetPosition(x, y, z); // 添加到这个经纬度位置
- // geoParticle.AltitudeMode = EnumAltitudeMode.RelativeToGround;
-
- // GSOPointParticleEmitter emitter = new GSOPointParticleEmitter();
- // emitter.TexturePath = strResPath + "/ParticleImage/test.png";
-
- // emitter.SetSizeFix(0.5f, 2);
- // emitter.VelFix = 10;
- // emitter.VelRnd = 2;
-
- // emitter.GravityAcc = 9.8f;
- // emitter.AngleXYFix = 0;
- // emitter.AngleXYRnd = 180;
-
- // emitter.AngleXZFix = 88;
- // emitter.AngleXZRnd = 2;
-
- // emitter.LifeFix = 5.0f;
- // emitter.LifeRnd = 1.0f;
-
- // emitter.RotFix = 0;
- // emitter.RotRnd = 0;
-
- // emitter.RotVelFix = 0;
- // emitter.RotVelRnd = 0;
-
- // emitter.EmitPerSec = 1000;
- // emitter.ColorRndStart = Color.FromArgb(33, 255, 255, 255);
- // emitter.ColorRndEnd = Color.FromArgb(11, 255, 255, 255);
- // emitter.IsLumAdded = false;
-
- // // 将三个发射器添加到粒子对象中
- // geoParticle.AddEmitter(emitter);
-
- // geoParticle.Play();
- // GSOFeature emitterFeature = new GSOFeature();
- // emitterFeature.Geometry = geoParticle;
- // emitterFeature.Name = "粒子要素"; //
-
- // globeControl1.Globe.MemoryLayer.AddFeature(emitterFeature);
- // //globeControl1.Globe.FlyToFeature(emitterFeature);
- //}
- #endregion
///
/// 获取指定图层中最后一个feature对象的名称对应的整数
@@ -6269,7 +5796,7 @@
}
return resFeature;
}
-
+
///
/// 图层节点树中 节点 右键单击事件处理
///
@@ -6445,82 +5972,9 @@
}
}
- ///
- /// 双屏对比 菜单
- ///
- ///
- ///
- //private void buttonItem94_Click(object sender, EventArgs e)
- //{
- // buttonItem94.Checked = !buttonItem94.Checked;
- // splitContainer1.Panel2Collapsed = !buttonItem94.Checked;
- // if (buttonItem94.Checked)
- // {
- // buttonItem95.Enabled = true;
- // buttonItem96.Enabled = true;
- // sideBar1.Visible = false;
- // buttonItem1.Checked = false;
- // for (int i = globeControl2.Globe.Layers.Count - 1; i >= 0 ; i--)
- // {
- // GSOLayer layer = globeControl2.Globe.Layers[i];
- // if (!layer.Name.Contains("fttp:"))
- // {
- // globeControl2.Globe.Layers.Remove(layer);
- // }
- // }
- // globeControl2.Globe.GroundOpaque = globeControl1.Globe.GroundOpaque;
- // FrmDataBaseOpt frm = new FrmDataBaseOpt(globeControl2);
- // frm.Show(this);
- // globeControl2.Globe.Refresh();
- // }
- // else
- // {
- // buttonItem95.Enabled = false;
- // buttonItem96.Enabled = false;
- // sideBar1.Visible = true;
- // buttonItem1.Checked = true;
- // sideBarPanelItem3.Visible = true;
- // layerTree.Visible = true;
- // controlContainerItem3.Visible = true;
- // Refresh();
- // }
- //}
- ///
- /// 模拟分析 菜单
- ///
- ///
- ///
- //private void buttonItem51_Click(object sender, EventArgs e)
- //{
- // buttonItem51.Checked = !buttonItem51.Checked;
- // ribbonBarMN.Visible = buttonItem51.Checked;
- // ribbonBarMN.Location = new Point(0, 0);
- //}
-
- ///
- /// 双屏设置 菜单
- ///
- ///
- ///
- //private void buttonItem96_Click(object sender, EventArgs e)
- //{
- // FrmLayerControl frm = new FrmLayerControl(layerTree,globeControl1,globeControl2);
- // frm.Show(this);
- //}
- ///
- /// 双屏联动 菜单
- ///
- ///
- ///
- //private void buttonItem95_Click(object sender, EventArgs e)
- //{
- // buttonItem95.Checked = !buttonItem95.Checked;
- //}
- /////
-
//定时检查传感器的状态
public System.Windows.Forms.Timer timerOfSensor = null;
-
+
///
/// 碰撞分析 功能界面中 关闭按钮 事件处理
@@ -6545,7 +5999,7 @@
}
else
{
- sideBar1.Visible = false;
+ sideBar1.Visible = false;
}
Refresh();
@@ -6855,67 +6309,6 @@
}
}
-
- ////
- ////导出路由专题图
- ////
- //private void btnOutputR_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.btnOutputR.Text);
-
- // Point pt1 = new Point(Convert.ToInt32(0), Convert.ToInt32(0));
- // Point pt2 = new Point(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Point pt = getUpperLeftPoint(pt1, pt2);
- // Image myImg = new Bitmap(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Graphics g = Graphics.FromImage(myImg);
- // g.CopyFromScreen(pt, new Point(0, 0), new Size(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height)));
-
- // F_PATMTitle frm = new F_PATMTitle("R", myImg);
- // frm.ShowDialog();
- //}
- //
- //导出配件专题图
- //
- //private void btnOutputF_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.btnOutputF.Text);
-
- // Point pt1 = new Point(Convert.ToInt32(0), Convert.ToInt32(0));
- // Point pt2 = new Point(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Point pt = getUpperLeftPoint(pt1, pt2);
- // Image myImg = new Bitmap(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Graphics g = Graphics.FromImage(myImg);
- // g.CopyFromScreen(pt, new Point(0, 0), new Size(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height)));
-
- // F_PATMTitle frm = new F_PATMTitle("F", myImg);
- // frm.ShowDialog();
- //}
-
-
-
-
- ////交越点入库
- //private void fmrk_Click(object sender, EventArgs e)
- //{
- // //保存日志
- // LogManager.saveLog(Utility.userName, this.fmrk.Text);
-
- // if (ds == null)
- // {
- // MessageBox.Show("请先连接数据库", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
- // ConnectDB(null, null);
- // }
- // if (ds == null)
- // return;
- // FrmAddValve frm = new FrmAddValve(globeControl1, ds);
- // if (frm.ShowDialog() == DialogResult.OK)
- // {
- // addNodeToLayerManagerNode(frm.rukuLayer);
- // }
- //}
-
///
/// 一键审核---导入数据
///
@@ -6949,7 +6342,7 @@
MessageBox.Show("内存过载请清理内存,并重新启动规划分析!", "提示");
return;
}
-
+
}
///
@@ -7012,7 +6405,7 @@
LogManager.saveLog(Utility.userName, this.buttonItem128.Text);
//垂直净距标准
- frmSh = new FrmYJSHTC(globeControl1, globeControl2,layerTree);
+ frmSh = new FrmYJSHTC(globeControl1, globeControl2, layerTree);
if (frmSh.ShowDialog() == DialogResult.OK)
{
@@ -7033,7 +6426,7 @@
double dVerticalJingJuBiaoZhun = 1, dHorizontalJingJuBiaoZhun = 1;
if (frmSh.rukuLayer != null)
{
- #region
+ #region
this.Invoke((EventHandler)delegate
{
try
@@ -7122,11 +6515,11 @@
}
else
{
-
+
}
}
-
+
///
/// 清除渲染结果
///
@@ -7207,7 +6600,7 @@
private void buttonItem134_Click_1(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, "模拟设计修改");
-
+
frmModify = new FrmMnModify(globeControl1, shlayername, shresultLists);
if (boolfrmModify == false)
@@ -7224,7 +6617,7 @@
}
-
+
///
/// 一键审核中调节透明度
@@ -7241,7 +6634,7 @@
{
layer.Opaque = 100 - sliderItem1.Value;
}
-
+
optiValue = sliderItem1.Value;
}
///
@@ -7541,9 +6934,9 @@
buttonClearAnalysisResult_Click(null, null);
NetworkAnalysisTool.ClearAllTopAnalysis(this.globeControl1);
- // ClearConnexityAnalysis();//清除连通性分析
- // ClearCloseValvesAnalysis();//清除阀门分析
-
+ // ClearConnexityAnalysis();//清除连通性分析
+ // ClearCloseValvesAnalysis();//清除阀门分析
+
//清除管线间距分析
if (disFeature != null)
{
@@ -7566,7 +6959,7 @@
globeControl1.Globe.UnderGroundFloor.Visible = false;//隐藏地下网格线
- // ClearUpDownTraceAnalysis(); //清除上下游分析
+ // ClearUpDownTraceAnalysis(); //清除上下游分析
globeControl1.Globe.RemoveAllPits();//清除所有坑
string[] markerStrs = new string[9];
@@ -7613,18 +7006,7 @@
{
//日志记录
LogManager.saveLog(Utility.userName, "管线长度统计");
-
- //pipeLineDis.Clear();
- //List list = new List();
- //for (int i = 0; i < m_PipelineLayerNames.Count; i++)
- //{
- // GSOFeatures fs = Intersects_Pipeline(null, m_PipelineLayerNames[i]);
- // if (fs!=null)
- // list.Add(fs);
- //}
-
- //FrmAllPipelineStatis frm = new FrmAllPipelineStatis(0, pipeLineDis, list, globeControl1, new DataGridViewDelegate(InitDataGridViewX1));
- FrmAllPipelineStatis frm = new FrmAllPipelineStatis(globeControl1,null, new DataGridViewDelegate(InitDataGridViewX1), m_PipelineLayerNames);
+ FrmAllPipelineStatis frm = new FrmAllPipelineStatis(globeControl1, null, new DataGridViewDelegate(InitDataGridViewX1), m_PipelineLayerNames);
frm.Show(this);
}
@@ -7651,26 +7033,6 @@
{
//日志记录
LogManager.saveLog(Utility.userName, "阀门数量统计");
-
- //workWellLen.Clear();
- //List list = new List();
- ////找到所有阀门
- //if (Utility.LayerNamesList != null)
- //{
- // ArrayList listpt = Utility.LayerNamesList;
-
- // for (int i = 0; i < listpt.Count; i++)
- // {
- // string pipelineType = (string)Utility.LayerNamesList[i];
-
- // if ((pipelineType == "给水") || (pipelineType == "天然气") || (pipelineType == "热力"))
- // {
- //GSOFeatures fs = Intersect_PointLayerByType(null, pipelineType, "阀门");
- // list.Add(fs);
- // }
- // }
- //}
- //FrmValveStatistics frm = new FrmValveStatistics(workWellLen, list, globeControl1, new DataGridViewDelegate(InitDataGridViewX1));
FrmValveStatistics frm = new FrmValveStatistics(globeControl1, null, new DataGridViewDelegate(InitDataGridViewX1));
frm.Show(this);
@@ -7696,7 +7058,7 @@
///
///
private void buttonItemTJ3_ALL_Click(object sender, EventArgs e)
- {
+ {
FrmAllWorkWellStatis frm = new FrmAllWorkWellStatis(globeControl1, null, new DataGridViewDelegate(InitDataGridViewX1));
frm.Show(this);
}
@@ -7709,7 +7071,7 @@
{
//日志记录
LogManager.saveLog(Utility.userName, "井盖数量统计");
-
+
trackflag = "workwellquery";
globeControl1.Globe.Action = EnumAction3D.TrackPolygon;
globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack;
@@ -8003,7 +7365,7 @@
globeControl1.Globe.TrackPolylineTool.VerticalLineVisible = true;
globeControl1.Globe.TrackPolylineTool.TrackMode = EnumTrackMode.SpaceTrack;
trackPolylineEndMode = EnumTrackPolylineEndMode.HDM_Analysis;
-
+
}
///
/// 纵断面分析
@@ -8012,9 +7374,9 @@
///
private void buttonItemFX2_2_Click(object sender, EventArgs e)
{
- if (globeControl1.Globe.SelObjectCount<1)
+ if (globeControl1.Globe.SelObjectCount < 1)
{
- MessageBox.Show("请选择一条或者多条管线!", "提示", MessageBoxButtons.OK,
+ MessageBox.Show("请选择一条或者多条管线!", "提示", MessageBoxButtons.OK,
MessageBoxIcon.Information);
return;
}
@@ -8060,7 +7422,7 @@
globeControl1.Globe.TrackPolylineTool.VerticalLineVisible = true;
globeControl1.Globe.TrackPolylineTool.TrackMode = EnumTrackMode.SpaceTrack;
trackPolylineEndMode = EnumTrackPolylineEndMode.JXPM_Analysis;
-
+
}
#endregion
@@ -8154,11 +7516,11 @@
GSOLayer valveLayer = globeControl1.Globe.Layers[pipeLayerNamePrefix + "阀门"];
if (valveLayer == null)
{
- MessageBox.Show("无" + pipeLayerNamePrefix+"阀门图层", "提示");
+ MessageBox.Show("无" + pipeLayerNamePrefix + "阀门图层", "提示");
return;
}
- GSOFeatures valveFeats = NetworkAnalysisTool.CloseValvesAnalysis(resFeature,
+ GSOFeatures valveFeats = NetworkAnalysisTool.CloseValvesAnalysis(resFeature,
resLayer, valveLayer);
if (valveFeats != null)
@@ -8166,7 +7528,7 @@
FrmCloseValves frm = new FrmCloseValves(this.globeControl1, valveFeats);
frm.Show(this);
}
- else
+ else
{
MessageBox.Show("未找到关闭阀门");
}
@@ -8186,7 +7548,7 @@
return;
}
GSOFeature selFeat0, selFeat1;
- GSOLayer layer0,layer1;
+ GSOLayer layer0, layer1;
globeControl1.Globe.GetSelectObject(0, out selFeat0, out layer0);
globeControl1.Globe.GetSelectObject(1, out selFeat1, out layer1);
@@ -8206,7 +7568,7 @@
private void buttonItemFX3_7_Click(object sender, EventArgs e)
{
NetworkTraceUpDown(true); //上游追踪:
-
+
GSOFeature selLineFeature = globeControl1.Globe.SelectedObject;
if (selLineFeature == null || selLineFeature.Geometry == null || selLineFeature.Geometry.Type != EnumGeometryType.GeoPolyline3D)
{
@@ -8215,7 +7577,7 @@
}
GSOLayer selLayer = globeControl1.Globe.SelectedObjectLayer;
- NetworkAnalysisTool.ExplodeAnalysis(this.globeControl1,selLineFeature,selLayer);
+ NetworkAnalysisTool.ExplodeAnalysis(this.globeControl1, selLineFeature, selLayer);
this.buttonItemFX3_5_Click(sender, e); //关阀分析:
@@ -8442,7 +7804,7 @@
FrmBufferAnalysisBSQ frm = new FrmBufferAnalysisBSQ(globeControl1, layerTemp, bsqPT);
frm.Show(this);
}
-
+
}
///
/// 附属物分析
@@ -8571,7 +7933,7 @@
buttonItemLS5.Checked = false;
globeControl1.Globe.Action = EnumAction3D.MeasureArea;
globeControl1.Globe.AreaRuler.SpaceMeasure = false;
-
+
}
# region Fan 重构标注代码
@@ -8632,14 +7994,14 @@
return;
}
GSOGeoPolyline3D selLine = resFeature.Geometry as GSOGeoPolyline3D;
- if (selLine[0].Count <=1)
+ if (selLine[0].Count <= 1)
{
- return;
+ return;
}
- MarkTools.getInstance().showMarker(resFeature,
+ MarkTools.getInstance().showMarker(resFeature,
globeControl1, EnumMarkLayer.Mark_Depth, "");
-
+
}
///
/// 坐标标注
@@ -9089,7 +8451,7 @@
FrmAPPregion appregion = new FrmAPPregion("拷贝审核");
appregion.Show();
}
-
+
private void buttonItemSPSZ_Click(object sender, EventArgs e)
{
//日志记录
@@ -9241,137 +8603,7 @@
FrmCityServerLineAnalysis frm = new FrmCityServerLineAnalysis(globeControl1, m_PipelineLayerNames);
frm.Show(this);
}
- #region 数据管理-导入文件
- /////
- ///// 数据管理-导入本地坐标系文件
- /////
- /////
- /////
- //private void buttonItemSJGL1_1_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.buttonItemSJGL1_1.Text);
-
- // OpenFileDialog dlg = new OpenFileDialog();
- // dlg.Filter = "矢量数据(*.shp)|*.shp|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|CAD文件(*.dxf)|*.dxf|全部支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft,*.dxf)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft;*.dxf";
- // //dlg.Filter = "支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|其它格式(*.*)|*.*||";
- // dlg.Multiselect = true;
- // if (dlg.ShowDialog() == DialogResult.OK)
- // {
- // //自定义lprj文件名,从程序中复制一lprj文件。
- // int bindex = dlg.FileName.Split('\\').Length;
- // string lastname = dlg.FileName.Split('\\')[bindex - 1];
- // if (lastname.IndexOf(".dxf") != -1)
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".lprj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.lprj");
- // if (!OFInfo.Exists)
- // {
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
- // }
- // else if (lastname.IndexOf(".shp") != -1)//只能对苏州本地坐标系进行纠正
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".prj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.prj");
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
-
- // for (int i = 0; i < dlg.FileNames.Length; i++)
- // {
- // AddLayerData(dlg.FileNames[i]);
- // }
- // layerManagerNode.Expand();
-
-
- // //放大到新导入的图层
- // GSOLayer lyr = globeControl1.Globe.Layers.GetLayerByCaption(newlayername);
- // if (newlayername != "")
- // {
- // GSOFeatures features = lyr.GetAllFeatures();
- // GSORect2d rd = lyr.LatLonBounds;
- // GSOPoint2d rdcenter = rd.Center;
-
- // globeControl1.Globe.JumpToPosition(new GSOPoint3d(rdcenter.X, rdcenter.Y, 0), EnumAltitudeMode.Absolute, 1000);
-
- // globeControl1.Refresh();
- // }
- // }
- //}
-
- /////
- ///// 数据管理-导入其他坐标系文件
- /////
- /////
- /////
- //private void buttonItemSJGL1_2_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.buttonItemSJGL1_2.Text);
-
- // OpenFileDialog dlg = new OpenFileDialog();
- // dlg.Filter = "矢量数据(*.shp)|*.shp|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|CAD文件(*.dxf)|*.dxf|全部支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft,*.dxf)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft;*.dxf";
- // //dlg.Filter = "支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|其它格式(*.*)|*.*||";
- // dlg.Multiselect = true;
- // if (dlg.ShowDialog() == DialogResult.OK)
- // {
- // //自定义lprj文件名,从程序中复制一lprj文件。
- // int bindex = dlg.FileName.Split('\\').Length;
- // string lastname = dlg.FileName.Split('\\')[bindex - 1];
- // if (lastname.IndexOf(".dxf") != -1)
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".lprj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.lprj");
- // if (!OFInfo.Exists)
- // {
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
- // }
- // else if (lastname.IndexOf(".shp") != -1)//只能对苏州本地坐标系进行纠正
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".prj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\xian80.prj");
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
-
- // for (int i = 0; i < dlg.FileNames.Length; i++)
- // {
- // AddLayerData(dlg.FileNames[i]);
- // }
- // layerManagerNode.Expand();
-
-
- // //放大到新导入的图层
- // GSOLayer lyr = globeControl1.Globe.Layers.GetLayerByCaption(newlayername);
- // if (newlayername != "")
- // {
- // GSOFeatures features = lyr.GetAllFeatures();
- // GSORect2d rd = lyr.LatLonBounds;
- // GSOPoint2d rdcenter = rd.Center;
-
- // globeControl1.Globe.JumpToPosition(new GSOPoint3d(rdcenter.X, rdcenter.Y, 0), EnumAltitudeMode.Absolute, 1000);
-
- // globeControl1.Refresh();
- // }
- // }
- //}
- #endregion
+
///
/// 数据质量检查
///
@@ -9435,9 +8667,9 @@
if (ds == null)
return;
Cyberpipe.Forms.FrmPipelineModelDB frm = new Cyberpipe.Forms.FrmPipelineModelDB(globeControl1, ds);
-
- //frm.Show();
-
+
+ //frm.Show();
+
if (frm.ShowDialog() == DialogResult.OK)
{
addNodeToLayerManagerNode(frm.rukuLayer);
@@ -9578,7 +8810,7 @@
//日志记录
LogManager.saveLog(Utility.userName, this.buttonItemBJ2.Text);
- FrmSetGoalLayer frm = new FrmSetGoalLayer(globeControl1, instrumenLayerNames,"附属物");
+ FrmSetGoalLayer frm = new FrmSetGoalLayer(globeControl1, instrumenLayerNames, "附属物");
if (frm.ShowDialog() == DialogResult.OK)
{
GSOLayer featureAddLayer = TreeNodeFeatureLayer();
@@ -9600,7 +8832,7 @@
//日志记录
LogManager.saveLog(Utility.userName, this.buttonItemBJ3.Text);
- FrmSetGoalLayer frm = new FrmSetGoalLayer(globeControl1, pipefittingLayerNames,"管点");
+ FrmSetGoalLayer frm = new FrmSetGoalLayer(globeControl1, pipefittingLayerNames, "管点");
if (frm.ShowDialog() == DialogResult.OK)
{
GSOLayer featureAddLayer = TreeNodeFeatureLayer();
@@ -9929,7 +9161,7 @@
globeControl1.Globe.Action = EnumAction3D.ActionNull;
}
-
+
public struct LineStruct
{
public string layerName;
@@ -9953,7 +9185,7 @@
featsList.Clear();
lineStruct.Clear();
List listPipelineLayers = new List();
-
+
GSOLayer layer = null;
for (int i = 0; i < m_PipelineLayerNames.Count; i++)
{
@@ -9964,17 +9196,17 @@
}
}
//yanxiaowei 重构
- GSOFeatures selectFeatures=new GSOFeatures();
+ GSOFeatures selectFeatures = new GSOFeatures();
for (int i = 0; i < globeControl1.Globe.SelObjectCount; i++)
{
GSOFeature feature = null;
globeControl1.Globe.GetSelectObject(i, out feature, out layer);
selectFeatures.Add(feature);
}
- DataTable table=new DataTable();
+ DataTable table = new DataTable();
- ClassGSOTool.CalculateRedLineResult(out table, redSH, selectFeatures, globeControl1,
- listPipelineLayers,out lineStruct, out featsList);
+ ClassGSOTool.CalculateRedLineResult(out table, redSH, selectFeatures, globeControl1,
+ listPipelineLayers, out lineStruct, out featsList);
if (table.Rows.Count != 0)
AddDatagridView(table);
@@ -10020,7 +9252,7 @@
ExpEXCEL.ExpToExcel(dataGridViewX1, strSaveFile, "红线审核", lineStruct, featsList);
MessageBox.Show("导出成功!");
}
-
+
private void sliderItem2_ValueChanged(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, this.sliderItem2.Text);
@@ -10058,7 +9290,7 @@
//自定义lprj文件名,从程序中复制一lprj文件。
string filePath = dlg.FileName;
string lastname = Path.GetFileName(filePath);
-
+
for (int i = 0; i < dlg.FileNames.Length; i++)
{
AddLayerData(dlg.FileNames[i]);
@@ -10179,7 +9411,7 @@
#endregion
}
- #endregion
+ #endregion
}
///
/// 定位
@@ -10190,7 +9422,7 @@
{
LogManager.saveLog(Utility.userName, this.buttonItemLocation.Text);
- FrmFlyToPosition fly = new FrmFlyToPosition(globeControl1,globeControl2);
+ FrmFlyToPosition fly = new FrmFlyToPosition(globeControl1, globeControl2);
fly.Show(this);
}
///
@@ -10202,10 +9434,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.FlyToPosition(new GSOPoint3d(120.610963, 31.188121, 50), EnumAltitudeMode.Absolute, -4, 50, 800);
globeControl1.Globe.FlyToPointSpeed = 10000000;
@@ -10241,10 +9473,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.Action = EnumAction3D.ActionNull;
dataGridViewX1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
@@ -10277,10 +9509,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.Action = EnumAction3D.ActionNull;
//zhanshi = false;
@@ -10340,7 +9572,7 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent += new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent += new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
@@ -10377,10 +9609,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.Action = EnumAction3D.ActionNull;
panelOfTable.Visible = false;
@@ -10411,10 +9643,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.Action = EnumAction3D.ActionNull;
panelOfTable.Visible = false;
@@ -10447,10 +9679,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.Action = EnumAction3D.ActionNull;
panelOfTable.Visible = false;
@@ -10487,7 +9719,7 @@
//FrmCompareFeature frmCompareFeature = new FrmCompareFeature(globeControl1, globeControl2, layerTemp, layerTemp2,m_PipelineLayerNames,sgPipeLayersNames);
int width = this.Width;
- FrmCompareFeature.ShowForm(globeControl1, globeControl2, layerTemp, layerTemp2, m_PipelineLayerNames, sgPipeLayersNames,width);
+ FrmCompareFeature.ShowForm(globeControl1, globeControl2, layerTemp, layerTemp2, m_PipelineLayerNames, sgPipeLayersNames, width);
//frmCompareFeature.Location = new Point((this.Width - frmCompareFeature.Width)/2,50);
//frmCompareFeature.Show(this);
@@ -10549,7 +9781,7 @@
private void 标识器分类统计ToolStripMenuItem_Click(object sender, EventArgs e)
{
globeControl1.Globe.Action = EnumAction3D.ActionNull;
- FrmBSQStatis bsqStatis = new FrmBSQStatis(globeControl1,null);
+ FrmBSQStatis bsqStatis = new FrmBSQStatis(globeControl1, null);
//FrmBSQStatis bsqStatis = new FrmBSQStatis();
bsqStatis.Show(this);
}
@@ -10564,230 +9796,6 @@
globeControl1.Globe.Action = EnumAction3D.TrackPolygon;
}
- #region 保存和加载审核库加载的图层
- /*
- private void saveLayerList(TreeNodeCollection treeNodeList)
- {
- string configPath = Application.StartupPath + "\\configLayerList.xml";
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(configPath);
- XmlNode dbParams = doc.SelectSingleNode("Params/dbparams");
- XmlNode dbLayers = doc.SelectSingleNode("Params/dblayers");
- XmlNode layers = doc.SelectSingleNode("Params/layers");
- dbParams.RemoveAll();
- dbLayers.RemoveAll();
- layers.RemoveAll();
-
- List listDS = new List();
- String shDatasourceName = Utility.sgdbip + "/" + Utility.sgdbname + "_" + Utility.sgdbuser;
- bool flag = false;
-
- for (int i = 0; i < globeControl1.Globe.DataManager.DataSourceCount; i++)
- {
- GSODataSource ds = globeControl1.Globe.DataManager.GetDataSourceAt(i);
- if (ds != null && ds.Type == EnumDataSourceType.SqlServer || ds.Type == EnumDataSourceType.Oracle)
- {
- if (ds.Name == shDatasourceName)
- {
- //防止因为多次连接同一个数据库
- if (flag == true)
- {
- break;
- }
- flag = true;
- listDS.Add(ds);
- GSODataSourceCnn conn = ds.GetConnectionInfo();
-
- XmlElement dbparam = doc.CreateElement("shdbparam");
- XmlElement ip = doc.CreateElement("ship");
- ip.InnerText = conn.Server;
-
- XmlElement dbname = doc.CreateElement("shdbname");
- dbname.InnerText = conn.Database;
-
- XmlElement username = doc.CreateElement("shusername");
- username.InnerText = conn.User;
-
- XmlElement password = doc.CreateElement("shpassword");
- password.InnerText = conn.Password;
-
- XmlElement type = doc.CreateElement("shtype");
- if (ds.Type == EnumDataSourceType.SqlServer)
- {
- type.InnerText = "sqlserver";
- }
- else
- {
- type.InnerText = "oracle";
- }
-
- dbparam.AppendChild(ip);
- dbparam.AppendChild(dbname);
- dbparam.AppendChild(username);
- dbparam.AppendChild(password);
- dbparam.AppendChild(type);
- dbParams.AppendChild(dbparam);
- }
-
- }
- }
-
- for (int i = 0; i < treeNodeList.Count; i++)
- {
- GSOLayer layer = treeNodeList[i].Tag as GSOLayer;
- if (Path.GetExtension(layer.Name) == "")
- {
- XmlElement dbLayer = doc.CreateElement("dblayer");
- XmlAttribute attri = doc.CreateAttribute("dbindex");
- for (int j = 0; j < listDS.Count; j++)
- {
- if (layer.Dataset.DataSource.Name == listDS[j].Name)
- {
- attri.Value = j.ToString();
- break;
- }
- }
- dbLayer.Attributes.Append(attri);
- dbLayer.InnerText = layer.Name;
-
- dbLayers.AppendChild(dbLayer);
- }
- else
- {
- XmlElement dbLayer = doc.CreateElement("layer");
- dbLayer.InnerText = layer.Name;
- layers.AppendChild(dbLayer);
- }
- }
-
- doc.Save(configPath);
- }
- catch (Exception e)
- {
-
- }
- }
-
- private void openLayerList()
- {
- layerManagerNode.Nodes.Clear();
-
- string configPath = Application.StartupPath + "\\configLayerList.xml";
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(configPath);
- XmlNode dbParams = doc.SelectSingleNode("Params/dbparams");
- XmlNode dbLayers = doc.SelectSingleNode("Params/dblayers");
- XmlNode layers = doc.SelectSingleNode("Params/layers");
-
- List listDS = new List();
- for (int i = 0; i < dbParams.ChildNodes.Count; i++)
- {
- string ip = "";
- string dbname = "";
- string username = "";
- string password = "";
- string type = "";
- XmlNode node = dbParams.ChildNodes.Item(i);
- for (int j = 0; j < node.ChildNodes.Count; j++)
- {
- XmlNode nodeChild = node.ChildNodes.Item(j);
-
- if (nodeChild != null && nodeChild.Name == "ship")
- {
- ip = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shdbname")
- {
- dbname = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shusername")
- {
- username = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shpassword")
- {
- password = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shtype")
- {
- type = nodeChild.InnerText;
- }
- }
-
- if (type == "sqlserver")
- {
- GSODataSource ds = globeControl1.Globe.DataManager.OpenSqlServerDataSource(ip, "", dbname, username, password);
- listDS.Add(ds);
- }
- else if (type == "oracle")
- {
- GSODataSource ds = globeControl1.Globe.DataManager.OpenOracleDataSource(ip + "/" + dbname, "", "", username, password);
- listDS.Add(ds);
- }
- }
-
- for (int i = 0; i < dbLayers.ChildNodes.Count; i++)
- {
- XmlNode node = dbLayers.ChildNodes.Item(i);
- if (node != null)
- {
- string layerName = node.InnerText;
- XmlAttribute attri = node.Attributes["dbindex"];
- if (attri != null)
- {
- int dbIndex = -1;
- if (int.TryParse(attri.Value, out dbIndex))
- {
- GSODataset dataset = listDS[dbIndex].GetDatasetByName(layerName);
- globeControl1.Globe.Layers.Add(dataset);
- //更新树节点
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerName);
- TreeNode layerNode = new TreeNode();
- layerNode.Tag = layer;
- layerNode.Text = layer.Dataset.Caption;
- layerNode.ImageIndex = 0;
- layerNode.SelectedImageIndex = 0;
- layerNode.Checked = layer.Visible;
- layerManagerNode.Nodes.Insert(0, layerNode);
- // layerManagerNode.Expand();
-
-
- }
- }
- }
- }
- for (int i = 0; i < layers.ChildNodes.Count; i++)
- {
- XmlNode node = layers.ChildNodes.Item(i);
- if (node != null)
- {
- string layerName = node.InnerText;
- globeControl1.Globe.Layers.Add(layerName);
-
- //更新树节点
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerName);
- TreeNode layerNode = new TreeNode();
- layerNode.Tag = layer;
- layerNode.Text = layer.Dataset.Caption;
- layerNode.ImageIndex = 0;
- layerNode.SelectedImageIndex = 0;
- layerNode.Checked = layer.Visible;
- layerManagerNode.Nodes.Insert(0, layerNode);
- }
- }
- layerManagerNode.Expand();
- }
- catch (Exception e)
- {
-
- }
- }
- * */
- #endregion
private void btn_check_history_Click(object sender, EventArgs e)
{
@@ -10873,7 +9881,7 @@
frm.ShowDialog();
}
}
-
+
private void btn_user_role_Click(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, this.btn_user_role.Text);
@@ -10918,7 +9926,7 @@
{
this.Cursor = Cursors.Default;
}
-
+
private void buttonItemexp_CAD_Click(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, this.buttonItemexp_CAD.Text);
@@ -10956,7 +9964,7 @@
// }
// AddLayerData(strDataPath);
// //globeControl1.Globe.Layers.Add(strDataPath);
-
+
// this.Cursor = Cursors.Default;
// }
// else
@@ -10970,7 +9978,7 @@
// AddLayerData(strDataPath);
// //globeControl1.Globe.Layers.Add(strDataPath);
// }
-
+
//}
//else
//{
@@ -11181,7 +10189,7 @@
lendendGZ24_2.Visible = false;
lendendGZ24_3.Visible = false;
}
- #endregion
+ #endregion
private void buttonItemPasswordReset_Click(object sender, EventArgs e)
{
diff --git a/bin/x86/Debug/Cyberpipe.exe b/bin/x86/Debug/Cyberpipe.exe
index f3be992..33e93f9 100644
--- a/bin/x86/Debug/Cyberpipe.exe
+++ b/bin/x86/Debug/Cyberpipe.exe
Binary files differ
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index 4baac92..63bdc82 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/MainFrm.cs b/MainFrm.cs
index 5e77983..2e3ba7f 100644
--- a/MainFrm.cs
+++ b/MainFrm.cs
@@ -1,40 +1,30 @@
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Data;
using System.Drawing;
-using System.Text;
using System.Windows.Forms;
using System.IO;
using GeoScene.Globe;
using GeoScene.Data;
using GeoScene.Engine;
using System.Runtime.InteropServices;
-using DevComponents.DotNetBar.Rendering;
using DevComponents.DotNetBar;
using System.Xml;
using System.Collections;
-using System.Data.SqlClient;
-using System.Diagnostics;
-using Microsoft.Win32;
using System.Threading;
-using System.Net.NetworkInformation;
-using System.Net.Sockets;
-using MySql.Data.MySqlClient;
using System.Data.OracleClient;
-using Cyberpipe.PATM_Forms;
using Cyberpipe.Forms;
namespace Cyberpipe
{
public partial class MainFrm : Office2007Form
{
- TreeNode terrainManagerNode = null;
+
TreeNode layerManagerNode = null;
TreeNode myPlaceNode = null;
bool m_bFullScreen = false;
- Rectangle m_rcOld = new Rectangle(0, 0, 0, 0);
- GeoScene.Globe.GSOGlobeControl globeControl1;
+
+ GSOGlobeControl globeControl1;
GSOGlobeControl globeControl2;
private GSOHudButton legend;//定义图例
private GSOHudButton btnToolNone;
@@ -78,8 +68,6 @@
//管线间距分析
private GSOFeature disFeature = new GSOFeature();
private GSOFeature featureDis = new GSOFeature();
- ArrayList m_CloseValvesList = new ArrayList();//声明集合存储阀门分析的阀门Feature对象
- ArrayList m_BoosterValvesList = new ArrayList();//声明集合存储阀门分析的阀门Feature对象
//记录沿线飞行设置
//int m_nFlyMode = 2;
@@ -95,8 +83,8 @@
private OracleConnection connBackup = null;
//数据集合
- public static GeoScene.Engine.GSODataSource ds = null;
- public static GeoScene.Engine.GSODataSource shds = null;
+ public static GSODataSource ds = null;
+ public static GSODataSource shds = null;
//审核layer
string shlayername = "";
string redlinelayername = "";
@@ -130,8 +118,8 @@
FrmWait frmWait = null;//一键审核等待窗口
//FrmWait frmWait2 = null;//文档操作等待窗口
- float mouseDownX1,mouseDownY1;
- float mouseDownX2,mouseDownY2;
+ float mouseDownX1, mouseDownY1;
+ float mouseDownX2, mouseDownY2;
///
///
///
@@ -188,10 +176,10 @@
RigthMenuSet();
MenuSet();
-
+
}
-
-
+
+
///
/// 右屏中添加管纵图片
///
@@ -733,7 +721,7 @@
}
else
{
-
+
if (Utility.userRole.IndexOf("用户管理") < 0)
{
btn_user_info.Visible = false;
@@ -945,7 +933,7 @@
sliderItem1.Value = optiValue;
sliderItem2.Value = optiValue;
sliderItem3.Value = optiValue;
-
+
}
//初始化地球控件
@@ -1136,8 +1124,8 @@
Thread t1 = new Thread(new ThreadStart(doLoadDataForGlobalControl1));
t1.IsBackground = true;
t1.Start();
-
-
+
+
}
delegate void LoadDataForGlobalControl();
@@ -1414,18 +1402,18 @@
this.initMarkerTree();
this.initLayout();
this.loadData();
-
-
+
+
double x = Convert.ToDouble(Utility.Query_Roads["绿岛"].ToString().Split(',')[0]);
double y = Convert.ToDouble(Utility.Query_Roads["绿岛"].ToString().Split(',')[1]);
double z = Convert.ToDouble(Utility.Query_Roads["绿岛"].ToString().Split(',')[2]);
jumpToCameraState(x, y, z);
-
+
}
#endregion
-
+
Dictionary dictionaryNetLayerNameAndCaption = new Dictionary();
void globeControl1_AfterNetLayerAddEvent(object sender, AfterNetLayerAddEventArgs e)
{
@@ -1434,203 +1422,6 @@
e.Layer.Caption = dictionaryNetLayerNameAndCaption[e.Layer.Caption];
}
}
-
- void AddFeaturesNodeToMyPlace(GSOFeatures features)
- {
- if (features == null || features.Length == 0)
- {
- return;
- }
-
- for (Int32 i = 0; i < features.Length; i++)
- {
- GSOFeature feature = features[i];
- if (feature.Type == EnumFeatureType.FeatureFolder)
- {
-
- GSOFeatureFolder featureFolder = (GSOFeatureFolder)feature;
- AddFeaturesNodeToMyPlace(featureFolder.Features);
-
- }
- else
- {
- TreeNode tempnode = new TreeNode();
- tempnode.Text = feature.Name;
- if (feature.Geometry != null)
- {
- switch (feature.Geometry.Type)
- {
- case EnumGeometryType.GeoPoint3D:
- case EnumGeometryType.GeoMarker:
- tempnode.ImageIndex = 3;
- tempnode.SelectedImageIndex = 3;
- break;
- case EnumGeometryType.GeoPolyline3D:
- tempnode.ImageIndex = 4;
- tempnode.SelectedImageIndex = 4;
- break;
- case EnumGeometryType.GeoPolygon3D:
- tempnode.ImageIndex = 5;
- tempnode.SelectedImageIndex = 5;
- break;
- case EnumGeometryType.GeoModel:
- case EnumGeometryType.GeoEntity:
- case EnumGeometryType.GeoGroupEntity:
- case EnumGeometryType.GeoSphereEntity:
- case EnumGeometryType.GeoBoxEntity:
- case EnumGeometryType.GeoEllipsoidEntity:
- case EnumGeometryType.GeoCylinderEntity:
- case EnumGeometryType.GeoFrustumEntity:
- case EnumGeometryType.GeoEllipCylinderEntity:
- case EnumGeometryType.GeoEllipFrustumEntity:
- case EnumGeometryType.GeoRangeEllipsoidEntity:
- case EnumGeometryType.GeoRangeEllipCylinderEntity:
- case EnumGeometryType.GeoRangeEllipFrustumEntity:
-
-
- tempnode.ImageIndex = 6;
- tempnode.SelectedImageIndex = 6;
- break;
- case EnumGeometryType.GeoGroundOverlay:
- tempnode.ImageIndex = 7;
- tempnode.SelectedImageIndex = 7;
- break;
- }
-
- }
- GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(feature);
- tempnode.Checked = newFeature.Visible;
- tempnode.Tag = newFeature;
- myPlaceNode.Nodes.Add(tempnode);
- }
- }
- }
-
-
- private bool isContainName(string[] array, string name)
- {
- bool bl = false;
- for (int i = 0; i < array.Length; i++)
- {
- if (array[i] == name)
- {
- bl = true;
- break;
- }
- }
- return bl;
- }
-
- //private void setControlVisilbe(string[] resourceNames)
- //{
- // ArrayList listItem = new ArrayList();
- // ArrayList subListItem = new ArrayList();
- // System.Windows.Forms.Control.ControlCollection cc = ribbonControl1.Controls;
- // for (int i = 0; i < cc.Count; i++)
- // {
- // if (cc[i].GetType() == typeof(DevComponents.DotNetBar.RibbonStrip))
- // {
- // DevComponents.DotNetBar.RibbonStrip ribbonStripResource = cc[i] as DevComponents.DotNetBar.RibbonStrip;
- // for (int j = 0; j < ribbonStripResource.Items.Count; j++)
- // {
- // if (ribbonStripResource.Items[j].GetType() == typeof(DevComponents.DotNetBar.RibbonTabItem))
- // {
- // DevComponents.DotNetBar.RibbonTabItem ribbonTabItemResource = ribbonStripResource.Items[j] as DevComponents.DotNetBar.RibbonTabItem;
- // string tabItemResourceName = ribbonTabItemResource.Text;
- // listItem.Add(tabItemResourceName);
- // subListItem.Add(tabItemResourceName);
- // if (!isContainName(resourceNames, tabItemResourceName))
- // {
- // ribbonTabItemResource.Visible = false;
- // }
- // if (ribbonTabItemResource.SubItems.Count > 0)
- // {
- // for (int k = 0; k < ribbonTabItemResource.SubItems.Count; k++)
- // {
- // if (ribbonTabItemResource.SubItems[k].GetType() == typeof(DevComponents.DotNetBar.ButtonItem))
- // {
- // DevComponents.DotNetBar.ButtonItem buttonItemResource = ribbonTabItemResource.SubItems[k] as DevComponents.DotNetBar.ButtonItem;
- // string buttonItemResourceName = buttonItemResource.Text;
- // subListItem.Add(buttonItemResourceName);
- // if (!isContainName(resourceNames, buttonItemResourceName))
- // {
- // buttonItemResource.Visible = false;
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // else if (cc[i].GetType() == typeof(DevComponents.DotNetBar.RibbonPanel))
- // {
- // DevComponents.DotNetBar.RibbonPanel ribbonPanelResource = cc[i] as DevComponents.DotNetBar.RibbonPanel;
- // for (int j = 0; j < ribbonPanelResource.Controls.Count; j++)
- // {
- // if (ribbonPanelResource.Controls[j].GetType() == typeof(DevComponents.DotNetBar.RibbonBar))
- // {
- // DevComponents.DotNetBar.RibbonBar ribbonBarResource = ribbonPanelResource.Controls[j] as DevComponents.DotNetBar.RibbonBar;
- // for (int k = 0; k < ribbonBarResource.Items.Count; k++)
- // {
- // if (ribbonBarResource.Items[k].GetType() == typeof(DevComponents.DotNetBar.ButtonItem))
- // {
- // DevComponents.DotNetBar.ButtonItem buttonItemResource = ribbonBarResource.Items[k] as DevComponents.DotNetBar.ButtonItem;
- // string buttonItemResourceName = buttonItemResource.Text;
- // subListItem.Add(buttonItemResourceName);
- // if (!isContainName(resourceNames, buttonItemResourceName))
- // {
- // buttonItemResource.Visible = false;
- // }
- // if (buttonItemResource.SubItems.Count > 0)
- // {
- // for (int m = 0; m < buttonItemResource.SubItems.Count; m++)
- // {
- // if (buttonItemResource.SubItems[m].GetType() == typeof(DevComponents.DotNetBar.ButtonItem))
- // {
- // DevComponents.DotNetBar.ButtonItem subButtonItemResource = buttonItemResource.SubItems[m] as DevComponents.DotNetBar.ButtonItem;
- // string SubButtonItemResourceName = subButtonItemResource.Text;
- // subListItem.Add(SubButtonItemResourceName);
- // if (!isContainName(resourceNames, SubButtonItemResourceName))
- // {
- // subButtonItemResource.Visible = false;
- // }
- // }
- // }
- // }
- // }
- // else
- // {
- // if (ribbonBarResource.Items[k].GetType() == typeof(DevComponents.DotNetBar.SliderItem))
- // {
- // DevComponents.DotNetBar.SliderItem sliderItemResource = ribbonBarResource.Items[k] as DevComponents.DotNetBar.SliderItem;
- // if (!isContainName(resourceNames, sliderItemResource.Text.Trim()))
- // {
- // sliderItemResource.Visible = false;
- // }
-
- // if (sliderItemResource.SubItems.Count > 0)
- // {
- // for (int m = 0; m < sliderItemResource.SubItems.Count; m++)
- // {
- // if (sliderItemResource.SubItems[m].GetType() == typeof(DevComponents.DotNetBar.ButtonItem))
- // {
- // DevComponents.DotNetBar.ButtonItem subButtonItemResource = sliderItemResource.SubItems[m] as DevComponents.DotNetBar.ButtonItem;
- // if (!isContainName(resourceNames, subButtonItemResource.Text.Trim()))
- // {
- // subButtonItemResource.Visible = false;
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- //}
- //#endregion
void globeControl2_HudControlMouseDownEvent(object sender, HudControlMouseDownEventArgs e)
{
@@ -1662,7 +1453,7 @@
globeControl2.Globe.JumpToCameraState(camera);
}
}
-
+
private void VisitFeature3Ds(GSOFeatures feature3ds, TreeNode node)
{
for (int i = 0; i < feature3ds.Length; i++)
@@ -1786,7 +1577,7 @@
globeControl1.SwapBuffer();
Point pt1 = new Point(Convert.ToInt32(e.StartPos.X), Convert.ToInt32(e.StartPos.Y));
Point pt2 = new Point(Convert.ToInt32(e.EndPos.X), Convert.ToInt32(e.EndPos.Y));
-
+
/*Point pt = getUpperLeftPoint(pt1, pt2);
Image myImg = new Bitmap(Convert.ToInt32(e.Rect.Width), Convert.ToInt32(e.Rect.Height));
Graphics g = Graphics.FromImage(myImg);
@@ -1994,18 +1785,18 @@
{
if (e.Button == MouseButtons.Right && e.Node.Tag.ToString().Contains("|"))
{
-
+
if (e.Node.Tag.ToString().Split('|')[0] == "locaserver")
{
-
+
foreach (ToolStripItem item in layerNodeContexMenu.Items)
{
item.Visible = false;
}
return;
-
+
}
-
+
if (e.Node.Tag.ToString().Split('|')[0] == "new")
{
LayerEditableMenuItem.Enabled = true;
@@ -2072,7 +1863,7 @@
GSOLayer layer = node.Tag as GSOLayer;
//globeControl1.Globe.Layers.Remove(layer);
- for (int i = globeControl1.Globe.Layers.Count-1; i >=0; i--)
+ for (int i = globeControl1.Globe.Layers.Count - 1; i >= 0; i--)
{
if (globeControl1.Globe.Layers[i].Caption == layer.Caption)
{
@@ -2180,7 +1971,7 @@
private void layerTree_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
{
- if(this.layerTree.SelectedNode!=null)
+ if (this.layerTree.SelectedNode != null)
{
if (this.layerTree.SelectedNode.Tag.ToString().Contains("|"))
{
@@ -2201,7 +1992,8 @@
}
globeControl1.Refresh();
}
- else {
+ else
+ {
double x = layer.LatLonBounds.Center.X;
double y = layer.LatLonBounds.Center.Y;
globeControl1.Globe.FlyToPosition(new GSOPoint3d(x, y, 0), EnumAltitudeMode.Absolute);
@@ -2306,12 +2098,12 @@
void globeControl1_TrackPolylineEndEvent(object sender, TrackPolylineEndEventArgs e)
{
//横断面分析、道路横断面分析
- if (trackPolylineEndMode == EnumTrackPolylineEndMode.HDM_Analysis||
+ if (trackPolylineEndMode == EnumTrackPolylineEndMode.HDM_Analysis ||
trackPolylineEndMode == EnumTrackPolylineEndMode.DLDM_Analysis)
{
Dictionary hdmDic = SectionAnalysisTool.HDMAnalysis(this.globeControl1,
e.Polyline, this.m_PipelineLayerNames);
- FrmHDMAnalysis3 frm = new FrmHDMAnalysis3(hdmDic, this.globeControl1,
+ FrmHDMAnalysis3 frm = new FrmHDMAnalysis3(hdmDic, this.globeControl1,
trackPolylineEndMode);
frm.Show(this);
}
@@ -2512,7 +2304,7 @@
* **/
}
#endregion
-
+
///
/// 根据范围统计阀门、管线、工井等, 开挖分析, 挖方量分析
///
@@ -2527,7 +2319,7 @@
switch (trackflag)
{
case "valvequery":
- FrmValveStatistics frm = new FrmValveStatistics(globeControl1,polygon, new DataGridViewDelegate(InitDataGridViewX1));
+ FrmValveStatistics frm = new FrmValveStatistics(globeControl1, polygon, new DataGridViewDelegate(InitDataGridViewX1));
frm.Show(this);
//panelEx6.Visible = true;
//toolStripFeatureLength.Text = "";
@@ -2535,15 +2327,15 @@
break;
case "PipelineDistanceStatistics":
-
+
FrmAllPipelineStatis frm1 = new FrmAllPipelineStatis(globeControl1, polygon, new DataGridViewDelegate(InitDataGridViewX1), m_PipelineLayerNames);
frm1.Show(this);
globeControl1.Globe.Action = EnumAction3D.ActionNull;
break;
case "PipelineSpatialQuery":
-
- FrmAllPipelineStatis.ShowForm(globeControl1,polygon,new DataGridViewDelegate(InitDataGridViewX1),m_PipelineLayerNames);
+
+ FrmAllPipelineStatis.ShowForm(globeControl1, polygon, new DataGridViewDelegate(InitDataGridViewX1), m_PipelineLayerNames);
globeControl1.Globe.ClearAnalysis();
globeControl1.Globe.Action = EnumAction3D.ActionNull;
@@ -2603,7 +2395,7 @@
//listBSQ.Add(bsqFeatures);
//FrmBSQDuoBianXingStatis bsqFrm = new FrmBSQDuoBianXingStatis(workWellLen, globeControl1, listBSQ);
- FrmBSQStatis bsqFrm = new FrmBSQStatis(globeControl1,e.Polygon);
+ FrmBSQStatis bsqFrm = new FrmBSQStatis(globeControl1, e.Polygon);
bsqFrm.Show(this);
globeControl1.Globe.Action = EnumAction3D.ActionNull;
break;
@@ -2616,74 +2408,6 @@
}
}
- #region 验证端口
- /*
- ///
- /// 验证端口
- ///
- ///
- private bool ValiPort()
- {
- Ping p = new Ping();//创建Ping对象p
- PingReply pr = p.Send(Utility.localicenseserverip);//向指定IP或者主机名的计算机发送ICMP协议的ping数据包
- if (pr.Status == IPStatus.Success)//如果ping成功
- {
- try
- {
- TcpClient tcpc = new TcpClient(Utility.localicenseserverip, Utility.localicenseserverport);//对IP地址为"192.168.0.105"的计算机的1500端口提出连接申请
- tcpc.Close();
- return true;
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- MessageBox.Show("端口连接错误!" + ex.Message);
- return false;
- }
- }
- else
- {
- int times = 0;//重新连接次数;
- int count = 2;//设置尝试次数
- while (times < count)
- {
- //Thread.Sleep(1000);//等待时间(方便测试的话,你可以改为1000)
- pr = p.Send(Utility.localicenseserverip);
-
- if (pr.Status == IPStatus.Success)
- {
- try
- {
- TcpClient tcpc = new TcpClient(Utility.localicenseserverip, Utility.localicenseserverport);//对IP地址为"192.168.0.105"的计算机的1500端口提出连接申请
- tcpc.Close();
- return true;
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- MessageBox.Show("端口连接错误!" + ex.Message);
- return false;
- }
- }
- else
- {
- times++;
- if (times < count)
- {
- continue;
- }
- else
- {
- MessageBox.Show("重新尝试连接失败");
- return false;
- }
- }
- }
- return false;
- }
- }
- */
- #endregion
///
/// 鼠标悬浮提示
@@ -2721,7 +2445,7 @@
{
if (e.Button == MouseButtons.Left)
{
-
+
if (m_AddPipeLine == true && globeControl1.Globe.Action == EnumAction3D.DrawPolyline)//添加管线
{
GSOLayer layerDest = globeControl1.Globe.DestLayerFeatureAdd;
@@ -2904,7 +2628,7 @@
m_isDrawRedPology = false;
globeControl1.Globe.Action = EnumAction3D.ActionNull;
-
+
}
}
@@ -3318,7 +3042,7 @@
///
///
///
- private string GetBubbleInfo(GSOFeature feature,GSOGlobeControl globeControl)
+ private string GetBubbleInfo(GSOFeature feature, GSOGlobeControl globeControl)
{
if (feature == null)
{
@@ -3470,7 +3194,7 @@
{
name2 += "_米";
}
- value2 = dl2.ToString("0.00");
+ value2 = dl2.ToString("0.00");
}
else
{
@@ -3581,16 +3305,7 @@
}
return null;
}
-
- ///
- /// 菜单上的 三维导航 工具按钮
- ///
- ///
- ///
- private void buttonItem86_Click(object sender, EventArgs e)
- {
- globeControl1.Globe.Action = EnumAction3D.ActionNull;
- }
+
///
/// 地上模式 菜单按钮
@@ -3776,7 +3491,7 @@
sideBarPanelItem3.Visible = false;
layerTree.Visible = false;
controlContainerItem3.Visible = false;
-
+
//修改图层管理与标注管理、覆土审查、水平净距分析、垂直净距分析和碰撞分析控件之间的逻辑关系
controlContainerItem5.Visible = false;
sideBar1.Visible = false;
@@ -3798,7 +3513,7 @@
}
*/
Refresh();
-
+
}
}
///
@@ -3851,7 +3566,7 @@
int widthFull = Screen.PrimaryScreen.Bounds.Width;
int heightFull = Screen.PrimaryScreen.Bounds.Height;
-
+
this.FormBorderStyle = FormBorderStyle.None;
this.WindowState = FormWindowState.Normal;
@@ -3966,44 +3681,7 @@
buttonItem130_Click_1(this, EventArgs.Empty);
}
}
- /*
- ///
- /// 输出地图
- ///
- ///
- ///
- ///
- private Point getUpperLeftPoint(Point p1, Point p2) //
- {
- Rectangle rc = new Rectangle();
- p1 = this.globeControl1.PointToScreen(p1);
- p2 = this.globeControl1.PointToScreen(p2);
- if (p1.X < p2.X)
- {
- rc.X = p1.X;
- rc.Width = p2.X - p1.X;
- }
- else
- {
- rc.X = p2.X;
- rc.Width = p1.X - p2.X;
- }
- if (p1.Y < p2.Y)
- {
- rc.Y = p1.Y;
- rc.Height = p2.Y - p1.Y;
- }
- else
- {
- rc.Y = p2.Y;
- rc.Height = p1.Y - p2.Y;
- }
-
- Point pt = new Point(rc.Left, rc.Top);
- return pt;
- }
- * */
private Point getUpperLeftPoint(Point p1, Point p2, out int mapWidth, out int mapHeight) //
{
@@ -4050,7 +3728,7 @@
}
Image printImage;
-
+
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawImage(printImage, 10, 10);
@@ -4106,7 +3784,7 @@
}
}
}
-
+
///
/// 窗体下方属性表格 右键菜单中的 “定位”菜单
///
@@ -4220,29 +3898,6 @@
count = 0;
}
}
- #region wxl 删除无用??有疑问,功能用在哪里?
- ///
- /// 绘制线 菜单
- ///
- ///
- ///
- //private void btnAddLine_Click(object sender, EventArgs e)
- //{
- // globeControl1.Globe.DestLayerFeatureAdd = globeControl1.Globe.MemoryLayer;
- // globeControl1.Globe.Action = EnumAction3D.DrawPolyline;
- //}
-
- ///
- /// 绘制面 菜单
- ///
- ///
- ///
- //private void btnAddPolygon_Click(object sender, EventArgs e)
- //{
- // globeControl1.Globe.DestLayerFeatureAdd = globeControl1.Globe.MemoryLayer;
- // globeControl1.Globe.Action = EnumAction3D.DrawPolygon;
- //}
- #endregion
///
/// 图层目录树 右键菜单中的 目标图层 菜单
///
@@ -4298,7 +3953,7 @@
GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerCaption);
layer.Dataset.Save();
}
-
+
#region wxl feature的公共方法
///
@@ -4359,10 +4014,10 @@
if (globeControl1.Globe.Action != EnumAction3D.NormalHit)
{
buttonItemFX3_6.Checked = false;
- // ClearConnexityAnalysis();
+ // ClearConnexityAnalysis();
buttonItemFX3_5.Checked = false;
- // ClearCloseValvesAnalysis();
+ // ClearCloseValvesAnalysis();
}
if (globeControl1.Globe.Action != EnumAction3D.TrackPolygon)
{
@@ -4383,15 +4038,16 @@
{
e.Cancel = true;
}
- else {
+ else
+ {
globeControl1.Globe.MemoryLayer.SaveAs(Application.StartupPath + "/MyPlace.kml");
}
-
+
//saveLayerList(layerManagerNode.Nodes);
//注销id号为103的热键设定
// UnregisterHotKey(Handle, 103);
}
-
+
///
/// 垂直净距分析 功能界面中的 选择图层复选框 选中状态改变事件处理
///
@@ -4488,7 +4144,6 @@
comboBoxEx4.Enabled = true;
}
}
- GSOFeatures feats_vertical = new GSOFeatures();
///
/// 垂直净距分析 功能界面中的 选择图层下拉框 选中项改变 事件处理
///
@@ -5731,7 +5386,7 @@
}
}
-
+
///
/// 添加指定路径下的数据 功能
@@ -5825,7 +5480,7 @@
}
return objRes;
}
-
+
///
/// 碰撞分析功能界面中 选择管线复选框 选中状态改变事件处理
///
@@ -5938,7 +5593,7 @@
}
}
}
-
+
if (globeControl1.Globe.Action == EnumAction3D.SelectObject)
{
globeControl1.Globe.Action = EnumAction3D.ActionNull;
@@ -5983,7 +5638,7 @@
MessageBox.Show("表格内容为空!", "提示");
}
}
-
+
/////
///// 区域分析 菜单
/////
@@ -6040,134 +5695,6 @@
}
}
}
-
-
-
- #region Fan 去掉
- ////GSOFeature emitterFeature; // 粒子要素
- /////
- ///// 添加火苗 功能
- /////
- /////
- /////
- /////
- //private void AddFire(double x, double y, double z)
- //{
- // GSOFeatures feats = globeControl1.Globe.MemoryLayer.GetFeatureByName("粒子要素", true);
- // if (feats.Length > 0)
- // globeControl1.Globe.MemoryLayer.RemoveFeatureByID(feats[0].ID);
-
- // string strResPath = Application.StartupPath + "/Resource";
- // // 烟火粒子示例,由三个发射器构成
- // GSOGeoParticle geoParticle = new GSOGeoParticle();
- // geoParticle.SetPosition(x, y, z); // 添加到这个经纬度位置
- // geoParticle.AltitudeMode = EnumAltitudeMode.RelativeToGround;
-
- // GSORingParticleEmitter emitter = new GSORingParticleEmitter();
- // emitter.TexturePath = strResPath + "/ParticleImage/flare1.png";//烟1111111111111
-
- // emitter.SetSizeFix(1, 1);
- // emitter.VelFix = 1;
- // emitter.VelRnd = 5;
-
- // emitter.AngleXYFix = 0;
- // emitter.AngleXYRnd = 180;
-
- // emitter.AngleXZFix = 90;
- // emitter.AngleXZRnd = 0;
-
- // emitter.LifeFix = 0.5f;
- // emitter.LifeRnd = 0.0f;
-
- // emitter.RotFix = 0;
- // emitter.RotRnd = 0;
-
- // emitter.RotVelFix = 0;
- // emitter.RotVelRnd = 0;
-
- // emitter.EmitPerSec = 100;
- // emitter.IsLumAdded = true;
-
- // // 采用线性插值生成粒子的初始颜色
- // emitter.ColorRndStart = Color.White;
- // emitter.ColorRndEnd = Color.Red;
-
-
- // GSOColorParticleEffector effector2 = new GSOColorParticleEffector();
- // effector2.SetColorChanged(0, -1, -1, 0);
- // effector2.StartTime = 0.0f;
- // effector2.EndTime = -1.0f;
- // emitter.AddEffector(effector2);
-
- // // 将三个发射器添加到粒子对象中
- // geoParticle.AddEmitter(emitter);
-
- // geoParticle.Play();
-
- // GSOFeature emitterFeature = new GSOFeature();
- // emitterFeature.Geometry = geoParticle;
- // emitterFeature.Name = "粒子要素"; //
- // globeControl1.Globe.MemoryLayer.AddFeature(emitterFeature);
-
- //}
- /////
- ///// 添加喷泉 功能
- /////
- /////
- /////
- /////
- //private void AddFountain(double x, double y, double z)
- //{
- // GSOFeatures feats = globeControl1.Globe.MemoryLayer.GetFeatureByName("粒子要素", true);
- // if (feats.Length > 0)
- // globeControl1.Globe.MemoryLayer.RemoveFeatureByID(feats[0].ID);
-
- // string strResPath = Application.StartupPath + "/Resource";
-
- // GSOGeoParticle geoParticle = new GSOGeoParticle();
- // geoParticle.SetPosition(x, y, z); // 添加到这个经纬度位置
- // geoParticle.AltitudeMode = EnumAltitudeMode.RelativeToGround;
-
- // GSOPointParticleEmitter emitter = new GSOPointParticleEmitter();
- // emitter.TexturePath = strResPath + "/ParticleImage/test.png";
-
- // emitter.SetSizeFix(0.5f, 2);
- // emitter.VelFix = 10;
- // emitter.VelRnd = 2;
-
- // emitter.GravityAcc = 9.8f;
- // emitter.AngleXYFix = 0;
- // emitter.AngleXYRnd = 180;
-
- // emitter.AngleXZFix = 88;
- // emitter.AngleXZRnd = 2;
-
- // emitter.LifeFix = 5.0f;
- // emitter.LifeRnd = 1.0f;
-
- // emitter.RotFix = 0;
- // emitter.RotRnd = 0;
-
- // emitter.RotVelFix = 0;
- // emitter.RotVelRnd = 0;
-
- // emitter.EmitPerSec = 1000;
- // emitter.ColorRndStart = Color.FromArgb(33, 255, 255, 255);
- // emitter.ColorRndEnd = Color.FromArgb(11, 255, 255, 255);
- // emitter.IsLumAdded = false;
-
- // // 将三个发射器添加到粒子对象中
- // geoParticle.AddEmitter(emitter);
-
- // geoParticle.Play();
- // GSOFeature emitterFeature = new GSOFeature();
- // emitterFeature.Geometry = geoParticle;
- // emitterFeature.Name = "粒子要素"; //
-
- // globeControl1.Globe.MemoryLayer.AddFeature(emitterFeature);
- // //globeControl1.Globe.FlyToFeature(emitterFeature);
- //}
- #endregion
///
/// 获取指定图层中最后一个feature对象的名称对应的整数
@@ -6269,7 +5796,7 @@
}
return resFeature;
}
-
+
///
/// 图层节点树中 节点 右键单击事件处理
///
@@ -6445,82 +5972,9 @@
}
}
- ///
- /// 双屏对比 菜单
- ///
- ///
- ///
- //private void buttonItem94_Click(object sender, EventArgs e)
- //{
- // buttonItem94.Checked = !buttonItem94.Checked;
- // splitContainer1.Panel2Collapsed = !buttonItem94.Checked;
- // if (buttonItem94.Checked)
- // {
- // buttonItem95.Enabled = true;
- // buttonItem96.Enabled = true;
- // sideBar1.Visible = false;
- // buttonItem1.Checked = false;
- // for (int i = globeControl2.Globe.Layers.Count - 1; i >= 0 ; i--)
- // {
- // GSOLayer layer = globeControl2.Globe.Layers[i];
- // if (!layer.Name.Contains("fttp:"))
- // {
- // globeControl2.Globe.Layers.Remove(layer);
- // }
- // }
- // globeControl2.Globe.GroundOpaque = globeControl1.Globe.GroundOpaque;
- // FrmDataBaseOpt frm = new FrmDataBaseOpt(globeControl2);
- // frm.Show(this);
- // globeControl2.Globe.Refresh();
- // }
- // else
- // {
- // buttonItem95.Enabled = false;
- // buttonItem96.Enabled = false;
- // sideBar1.Visible = true;
- // buttonItem1.Checked = true;
- // sideBarPanelItem3.Visible = true;
- // layerTree.Visible = true;
- // controlContainerItem3.Visible = true;
- // Refresh();
- // }
- //}
- ///
- /// 模拟分析 菜单
- ///
- ///
- ///
- //private void buttonItem51_Click(object sender, EventArgs e)
- //{
- // buttonItem51.Checked = !buttonItem51.Checked;
- // ribbonBarMN.Visible = buttonItem51.Checked;
- // ribbonBarMN.Location = new Point(0, 0);
- //}
-
- ///
- /// 双屏设置 菜单
- ///
- ///
- ///
- //private void buttonItem96_Click(object sender, EventArgs e)
- //{
- // FrmLayerControl frm = new FrmLayerControl(layerTree,globeControl1,globeControl2);
- // frm.Show(this);
- //}
- ///
- /// 双屏联动 菜单
- ///
- ///
- ///
- //private void buttonItem95_Click(object sender, EventArgs e)
- //{
- // buttonItem95.Checked = !buttonItem95.Checked;
- //}
- /////
-
//定时检查传感器的状态
public System.Windows.Forms.Timer timerOfSensor = null;
-
+
///
/// 碰撞分析 功能界面中 关闭按钮 事件处理
@@ -6545,7 +5999,7 @@
}
else
{
- sideBar1.Visible = false;
+ sideBar1.Visible = false;
}
Refresh();
@@ -6855,67 +6309,6 @@
}
}
-
- ////
- ////导出路由专题图
- ////
- //private void btnOutputR_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.btnOutputR.Text);
-
- // Point pt1 = new Point(Convert.ToInt32(0), Convert.ToInt32(0));
- // Point pt2 = new Point(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Point pt = getUpperLeftPoint(pt1, pt2);
- // Image myImg = new Bitmap(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Graphics g = Graphics.FromImage(myImg);
- // g.CopyFromScreen(pt, new Point(0, 0), new Size(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height)));
-
- // F_PATMTitle frm = new F_PATMTitle("R", myImg);
- // frm.ShowDialog();
- //}
- //
- //导出配件专题图
- //
- //private void btnOutputF_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.btnOutputF.Text);
-
- // Point pt1 = new Point(Convert.ToInt32(0), Convert.ToInt32(0));
- // Point pt2 = new Point(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Point pt = getUpperLeftPoint(pt1, pt2);
- // Image myImg = new Bitmap(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Graphics g = Graphics.FromImage(myImg);
- // g.CopyFromScreen(pt, new Point(0, 0), new Size(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height)));
-
- // F_PATMTitle frm = new F_PATMTitle("F", myImg);
- // frm.ShowDialog();
- //}
-
-
-
-
- ////交越点入库
- //private void fmrk_Click(object sender, EventArgs e)
- //{
- // //保存日志
- // LogManager.saveLog(Utility.userName, this.fmrk.Text);
-
- // if (ds == null)
- // {
- // MessageBox.Show("请先连接数据库", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
- // ConnectDB(null, null);
- // }
- // if (ds == null)
- // return;
- // FrmAddValve frm = new FrmAddValve(globeControl1, ds);
- // if (frm.ShowDialog() == DialogResult.OK)
- // {
- // addNodeToLayerManagerNode(frm.rukuLayer);
- // }
- //}
-
///
/// 一键审核---导入数据
///
@@ -6949,7 +6342,7 @@
MessageBox.Show("内存过载请清理内存,并重新启动规划分析!", "提示");
return;
}
-
+
}
///
@@ -7012,7 +6405,7 @@
LogManager.saveLog(Utility.userName, this.buttonItem128.Text);
//垂直净距标准
- frmSh = new FrmYJSHTC(globeControl1, globeControl2,layerTree);
+ frmSh = new FrmYJSHTC(globeControl1, globeControl2, layerTree);
if (frmSh.ShowDialog() == DialogResult.OK)
{
@@ -7033,7 +6426,7 @@
double dVerticalJingJuBiaoZhun = 1, dHorizontalJingJuBiaoZhun = 1;
if (frmSh.rukuLayer != null)
{
- #region
+ #region
this.Invoke((EventHandler)delegate
{
try
@@ -7122,11 +6515,11 @@
}
else
{
-
+
}
}
-
+
///
/// 清除渲染结果
///
@@ -7207,7 +6600,7 @@
private void buttonItem134_Click_1(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, "模拟设计修改");
-
+
frmModify = new FrmMnModify(globeControl1, shlayername, shresultLists);
if (boolfrmModify == false)
@@ -7224,7 +6617,7 @@
}
-
+
///
/// 一键审核中调节透明度
@@ -7241,7 +6634,7 @@
{
layer.Opaque = 100 - sliderItem1.Value;
}
-
+
optiValue = sliderItem1.Value;
}
///
@@ -7541,9 +6934,9 @@
buttonClearAnalysisResult_Click(null, null);
NetworkAnalysisTool.ClearAllTopAnalysis(this.globeControl1);
- // ClearConnexityAnalysis();//清除连通性分析
- // ClearCloseValvesAnalysis();//清除阀门分析
-
+ // ClearConnexityAnalysis();//清除连通性分析
+ // ClearCloseValvesAnalysis();//清除阀门分析
+
//清除管线间距分析
if (disFeature != null)
{
@@ -7566,7 +6959,7 @@
globeControl1.Globe.UnderGroundFloor.Visible = false;//隐藏地下网格线
- // ClearUpDownTraceAnalysis(); //清除上下游分析
+ // ClearUpDownTraceAnalysis(); //清除上下游分析
globeControl1.Globe.RemoveAllPits();//清除所有坑
string[] markerStrs = new string[9];
@@ -7613,18 +7006,7 @@
{
//日志记录
LogManager.saveLog(Utility.userName, "管线长度统计");
-
- //pipeLineDis.Clear();
- //List list = new List();
- //for (int i = 0; i < m_PipelineLayerNames.Count; i++)
- //{
- // GSOFeatures fs = Intersects_Pipeline(null, m_PipelineLayerNames[i]);
- // if (fs!=null)
- // list.Add(fs);
- //}
-
- //FrmAllPipelineStatis frm = new FrmAllPipelineStatis(0, pipeLineDis, list, globeControl1, new DataGridViewDelegate(InitDataGridViewX1));
- FrmAllPipelineStatis frm = new FrmAllPipelineStatis(globeControl1,null, new DataGridViewDelegate(InitDataGridViewX1), m_PipelineLayerNames);
+ FrmAllPipelineStatis frm = new FrmAllPipelineStatis(globeControl1, null, new DataGridViewDelegate(InitDataGridViewX1), m_PipelineLayerNames);
frm.Show(this);
}
@@ -7651,26 +7033,6 @@
{
//日志记录
LogManager.saveLog(Utility.userName, "阀门数量统计");
-
- //workWellLen.Clear();
- //List list = new List();
- ////找到所有阀门
- //if (Utility.LayerNamesList != null)
- //{
- // ArrayList listpt = Utility.LayerNamesList;
-
- // for (int i = 0; i < listpt.Count; i++)
- // {
- // string pipelineType = (string)Utility.LayerNamesList[i];
-
- // if ((pipelineType == "给水") || (pipelineType == "天然气") || (pipelineType == "热力"))
- // {
- //GSOFeatures fs = Intersect_PointLayerByType(null, pipelineType, "阀门");
- // list.Add(fs);
- // }
- // }
- //}
- //FrmValveStatistics frm = new FrmValveStatistics(workWellLen, list, globeControl1, new DataGridViewDelegate(InitDataGridViewX1));
FrmValveStatistics frm = new FrmValveStatistics(globeControl1, null, new DataGridViewDelegate(InitDataGridViewX1));
frm.Show(this);
@@ -7696,7 +7058,7 @@
///
///
private void buttonItemTJ3_ALL_Click(object sender, EventArgs e)
- {
+ {
FrmAllWorkWellStatis frm = new FrmAllWorkWellStatis(globeControl1, null, new DataGridViewDelegate(InitDataGridViewX1));
frm.Show(this);
}
@@ -7709,7 +7071,7 @@
{
//日志记录
LogManager.saveLog(Utility.userName, "井盖数量统计");
-
+
trackflag = "workwellquery";
globeControl1.Globe.Action = EnumAction3D.TrackPolygon;
globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack;
@@ -8003,7 +7365,7 @@
globeControl1.Globe.TrackPolylineTool.VerticalLineVisible = true;
globeControl1.Globe.TrackPolylineTool.TrackMode = EnumTrackMode.SpaceTrack;
trackPolylineEndMode = EnumTrackPolylineEndMode.HDM_Analysis;
-
+
}
///
/// 纵断面分析
@@ -8012,9 +7374,9 @@
///
private void buttonItemFX2_2_Click(object sender, EventArgs e)
{
- if (globeControl1.Globe.SelObjectCount<1)
+ if (globeControl1.Globe.SelObjectCount < 1)
{
- MessageBox.Show("请选择一条或者多条管线!", "提示", MessageBoxButtons.OK,
+ MessageBox.Show("请选择一条或者多条管线!", "提示", MessageBoxButtons.OK,
MessageBoxIcon.Information);
return;
}
@@ -8060,7 +7422,7 @@
globeControl1.Globe.TrackPolylineTool.VerticalLineVisible = true;
globeControl1.Globe.TrackPolylineTool.TrackMode = EnumTrackMode.SpaceTrack;
trackPolylineEndMode = EnumTrackPolylineEndMode.JXPM_Analysis;
-
+
}
#endregion
@@ -8154,11 +7516,11 @@
GSOLayer valveLayer = globeControl1.Globe.Layers[pipeLayerNamePrefix + "阀门"];
if (valveLayer == null)
{
- MessageBox.Show("无" + pipeLayerNamePrefix+"阀门图层", "提示");
+ MessageBox.Show("无" + pipeLayerNamePrefix + "阀门图层", "提示");
return;
}
- GSOFeatures valveFeats = NetworkAnalysisTool.CloseValvesAnalysis(resFeature,
+ GSOFeatures valveFeats = NetworkAnalysisTool.CloseValvesAnalysis(resFeature,
resLayer, valveLayer);
if (valveFeats != null)
@@ -8166,7 +7528,7 @@
FrmCloseValves frm = new FrmCloseValves(this.globeControl1, valveFeats);
frm.Show(this);
}
- else
+ else
{
MessageBox.Show("未找到关闭阀门");
}
@@ -8186,7 +7548,7 @@
return;
}
GSOFeature selFeat0, selFeat1;
- GSOLayer layer0,layer1;
+ GSOLayer layer0, layer1;
globeControl1.Globe.GetSelectObject(0, out selFeat0, out layer0);
globeControl1.Globe.GetSelectObject(1, out selFeat1, out layer1);
@@ -8206,7 +7568,7 @@
private void buttonItemFX3_7_Click(object sender, EventArgs e)
{
NetworkTraceUpDown(true); //上游追踪:
-
+
GSOFeature selLineFeature = globeControl1.Globe.SelectedObject;
if (selLineFeature == null || selLineFeature.Geometry == null || selLineFeature.Geometry.Type != EnumGeometryType.GeoPolyline3D)
{
@@ -8215,7 +7577,7 @@
}
GSOLayer selLayer = globeControl1.Globe.SelectedObjectLayer;
- NetworkAnalysisTool.ExplodeAnalysis(this.globeControl1,selLineFeature,selLayer);
+ NetworkAnalysisTool.ExplodeAnalysis(this.globeControl1, selLineFeature, selLayer);
this.buttonItemFX3_5_Click(sender, e); //关阀分析:
@@ -8442,7 +7804,7 @@
FrmBufferAnalysisBSQ frm = new FrmBufferAnalysisBSQ(globeControl1, layerTemp, bsqPT);
frm.Show(this);
}
-
+
}
///
/// 附属物分析
@@ -8571,7 +7933,7 @@
buttonItemLS5.Checked = false;
globeControl1.Globe.Action = EnumAction3D.MeasureArea;
globeControl1.Globe.AreaRuler.SpaceMeasure = false;
-
+
}
# region Fan 重构标注代码
@@ -8632,14 +7994,14 @@
return;
}
GSOGeoPolyline3D selLine = resFeature.Geometry as GSOGeoPolyline3D;
- if (selLine[0].Count <=1)
+ if (selLine[0].Count <= 1)
{
- return;
+ return;
}
- MarkTools.getInstance().showMarker(resFeature,
+ MarkTools.getInstance().showMarker(resFeature,
globeControl1, EnumMarkLayer.Mark_Depth, "");
-
+
}
///
/// 坐标标注
@@ -9089,7 +8451,7 @@
FrmAPPregion appregion = new FrmAPPregion("拷贝审核");
appregion.Show();
}
-
+
private void buttonItemSPSZ_Click(object sender, EventArgs e)
{
//日志记录
@@ -9241,137 +8603,7 @@
FrmCityServerLineAnalysis frm = new FrmCityServerLineAnalysis(globeControl1, m_PipelineLayerNames);
frm.Show(this);
}
- #region 数据管理-导入文件
- /////
- ///// 数据管理-导入本地坐标系文件
- /////
- /////
- /////
- //private void buttonItemSJGL1_1_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.buttonItemSJGL1_1.Text);
-
- // OpenFileDialog dlg = new OpenFileDialog();
- // dlg.Filter = "矢量数据(*.shp)|*.shp|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|CAD文件(*.dxf)|*.dxf|全部支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft,*.dxf)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft;*.dxf";
- // //dlg.Filter = "支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|其它格式(*.*)|*.*||";
- // dlg.Multiselect = true;
- // if (dlg.ShowDialog() == DialogResult.OK)
- // {
- // //自定义lprj文件名,从程序中复制一lprj文件。
- // int bindex = dlg.FileName.Split('\\').Length;
- // string lastname = dlg.FileName.Split('\\')[bindex - 1];
- // if (lastname.IndexOf(".dxf") != -1)
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".lprj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.lprj");
- // if (!OFInfo.Exists)
- // {
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
- // }
- // else if (lastname.IndexOf(".shp") != -1)//只能对苏州本地坐标系进行纠正
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".prj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.prj");
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
-
- // for (int i = 0; i < dlg.FileNames.Length; i++)
- // {
- // AddLayerData(dlg.FileNames[i]);
- // }
- // layerManagerNode.Expand();
-
-
- // //放大到新导入的图层
- // GSOLayer lyr = globeControl1.Globe.Layers.GetLayerByCaption(newlayername);
- // if (newlayername != "")
- // {
- // GSOFeatures features = lyr.GetAllFeatures();
- // GSORect2d rd = lyr.LatLonBounds;
- // GSOPoint2d rdcenter = rd.Center;
-
- // globeControl1.Globe.JumpToPosition(new GSOPoint3d(rdcenter.X, rdcenter.Y, 0), EnumAltitudeMode.Absolute, 1000);
-
- // globeControl1.Refresh();
- // }
- // }
- //}
-
- /////
- ///// 数据管理-导入其他坐标系文件
- /////
- /////
- /////
- //private void buttonItemSJGL1_2_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.buttonItemSJGL1_2.Text);
-
- // OpenFileDialog dlg = new OpenFileDialog();
- // dlg.Filter = "矢量数据(*.shp)|*.shp|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|CAD文件(*.dxf)|*.dxf|全部支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft,*.dxf)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft;*.dxf";
- // //dlg.Filter = "支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|其它格式(*.*)|*.*||";
- // dlg.Multiselect = true;
- // if (dlg.ShowDialog() == DialogResult.OK)
- // {
- // //自定义lprj文件名,从程序中复制一lprj文件。
- // int bindex = dlg.FileName.Split('\\').Length;
- // string lastname = dlg.FileName.Split('\\')[bindex - 1];
- // if (lastname.IndexOf(".dxf") != -1)
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".lprj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.lprj");
- // if (!OFInfo.Exists)
- // {
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
- // }
- // else if (lastname.IndexOf(".shp") != -1)//只能对苏州本地坐标系进行纠正
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".prj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\xian80.prj");
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
-
- // for (int i = 0; i < dlg.FileNames.Length; i++)
- // {
- // AddLayerData(dlg.FileNames[i]);
- // }
- // layerManagerNode.Expand();
-
-
- // //放大到新导入的图层
- // GSOLayer lyr = globeControl1.Globe.Layers.GetLayerByCaption(newlayername);
- // if (newlayername != "")
- // {
- // GSOFeatures features = lyr.GetAllFeatures();
- // GSORect2d rd = lyr.LatLonBounds;
- // GSOPoint2d rdcenter = rd.Center;
-
- // globeControl1.Globe.JumpToPosition(new GSOPoint3d(rdcenter.X, rdcenter.Y, 0), EnumAltitudeMode.Absolute, 1000);
-
- // globeControl1.Refresh();
- // }
- // }
- //}
- #endregion
+
///
/// 数据质量检查
///
@@ -9435,9 +8667,9 @@
if (ds == null)
return;
Cyberpipe.Forms.FrmPipelineModelDB frm = new Cyberpipe.Forms.FrmPipelineModelDB(globeControl1, ds);
-
- //frm.Show();
-
+
+ //frm.Show();
+
if (frm.ShowDialog() == DialogResult.OK)
{
addNodeToLayerManagerNode(frm.rukuLayer);
@@ -9578,7 +8810,7 @@
//日志记录
LogManager.saveLog(Utility.userName, this.buttonItemBJ2.Text);
- FrmSetGoalLayer frm = new FrmSetGoalLayer(globeControl1, instrumenLayerNames,"附属物");
+ FrmSetGoalLayer frm = new FrmSetGoalLayer(globeControl1, instrumenLayerNames, "附属物");
if (frm.ShowDialog() == DialogResult.OK)
{
GSOLayer featureAddLayer = TreeNodeFeatureLayer();
@@ -9600,7 +8832,7 @@
//日志记录
LogManager.saveLog(Utility.userName, this.buttonItemBJ3.Text);
- FrmSetGoalLayer frm = new FrmSetGoalLayer(globeControl1, pipefittingLayerNames,"管点");
+ FrmSetGoalLayer frm = new FrmSetGoalLayer(globeControl1, pipefittingLayerNames, "管点");
if (frm.ShowDialog() == DialogResult.OK)
{
GSOLayer featureAddLayer = TreeNodeFeatureLayer();
@@ -9929,7 +9161,7 @@
globeControl1.Globe.Action = EnumAction3D.ActionNull;
}
-
+
public struct LineStruct
{
public string layerName;
@@ -9953,7 +9185,7 @@
featsList.Clear();
lineStruct.Clear();
List listPipelineLayers = new List();
-
+
GSOLayer layer = null;
for (int i = 0; i < m_PipelineLayerNames.Count; i++)
{
@@ -9964,17 +9196,17 @@
}
}
//yanxiaowei 重构
- GSOFeatures selectFeatures=new GSOFeatures();
+ GSOFeatures selectFeatures = new GSOFeatures();
for (int i = 0; i < globeControl1.Globe.SelObjectCount; i++)
{
GSOFeature feature = null;
globeControl1.Globe.GetSelectObject(i, out feature, out layer);
selectFeatures.Add(feature);
}
- DataTable table=new DataTable();
+ DataTable table = new DataTable();
- ClassGSOTool.CalculateRedLineResult(out table, redSH, selectFeatures, globeControl1,
- listPipelineLayers,out lineStruct, out featsList);
+ ClassGSOTool.CalculateRedLineResult(out table, redSH, selectFeatures, globeControl1,
+ listPipelineLayers, out lineStruct, out featsList);
if (table.Rows.Count != 0)
AddDatagridView(table);
@@ -10020,7 +9252,7 @@
ExpEXCEL.ExpToExcel(dataGridViewX1, strSaveFile, "红线审核", lineStruct, featsList);
MessageBox.Show("导出成功!");
}
-
+
private void sliderItem2_ValueChanged(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, this.sliderItem2.Text);
@@ -10058,7 +9290,7 @@
//自定义lprj文件名,从程序中复制一lprj文件。
string filePath = dlg.FileName;
string lastname = Path.GetFileName(filePath);
-
+
for (int i = 0; i < dlg.FileNames.Length; i++)
{
AddLayerData(dlg.FileNames[i]);
@@ -10179,7 +9411,7 @@
#endregion
}
- #endregion
+ #endregion
}
///
/// 定位
@@ -10190,7 +9422,7 @@
{
LogManager.saveLog(Utility.userName, this.buttonItemLocation.Text);
- FrmFlyToPosition fly = new FrmFlyToPosition(globeControl1,globeControl2);
+ FrmFlyToPosition fly = new FrmFlyToPosition(globeControl1, globeControl2);
fly.Show(this);
}
///
@@ -10202,10 +9434,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.FlyToPosition(new GSOPoint3d(120.610963, 31.188121, 50), EnumAltitudeMode.Absolute, -4, 50, 800);
globeControl1.Globe.FlyToPointSpeed = 10000000;
@@ -10241,10 +9473,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.Action = EnumAction3D.ActionNull;
dataGridViewX1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
@@ -10277,10 +9509,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.Action = EnumAction3D.ActionNull;
//zhanshi = false;
@@ -10340,7 +9572,7 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent += new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent += new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
@@ -10377,10 +9609,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.Action = EnumAction3D.ActionNull;
panelOfTable.Visible = false;
@@ -10411,10 +9643,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.Action = EnumAction3D.ActionNull;
panelOfTable.Visible = false;
@@ -10447,10 +9679,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.Action = EnumAction3D.ActionNull;
panelOfTable.Visible = false;
@@ -10487,7 +9719,7 @@
//FrmCompareFeature frmCompareFeature = new FrmCompareFeature(globeControl1, globeControl2, layerTemp, layerTemp2,m_PipelineLayerNames,sgPipeLayersNames);
int width = this.Width;
- FrmCompareFeature.ShowForm(globeControl1, globeControl2, layerTemp, layerTemp2, m_PipelineLayerNames, sgPipeLayersNames,width);
+ FrmCompareFeature.ShowForm(globeControl1, globeControl2, layerTemp, layerTemp2, m_PipelineLayerNames, sgPipeLayersNames, width);
//frmCompareFeature.Location = new Point((this.Width - frmCompareFeature.Width)/2,50);
//frmCompareFeature.Show(this);
@@ -10549,7 +9781,7 @@
private void 标识器分类统计ToolStripMenuItem_Click(object sender, EventArgs e)
{
globeControl1.Globe.Action = EnumAction3D.ActionNull;
- FrmBSQStatis bsqStatis = new FrmBSQStatis(globeControl1,null);
+ FrmBSQStatis bsqStatis = new FrmBSQStatis(globeControl1, null);
//FrmBSQStatis bsqStatis = new FrmBSQStatis();
bsqStatis.Show(this);
}
@@ -10564,230 +9796,6 @@
globeControl1.Globe.Action = EnumAction3D.TrackPolygon;
}
- #region 保存和加载审核库加载的图层
- /*
- private void saveLayerList(TreeNodeCollection treeNodeList)
- {
- string configPath = Application.StartupPath + "\\configLayerList.xml";
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(configPath);
- XmlNode dbParams = doc.SelectSingleNode("Params/dbparams");
- XmlNode dbLayers = doc.SelectSingleNode("Params/dblayers");
- XmlNode layers = doc.SelectSingleNode("Params/layers");
- dbParams.RemoveAll();
- dbLayers.RemoveAll();
- layers.RemoveAll();
-
- List listDS = new List();
- String shDatasourceName = Utility.sgdbip + "/" + Utility.sgdbname + "_" + Utility.sgdbuser;
- bool flag = false;
-
- for (int i = 0; i < globeControl1.Globe.DataManager.DataSourceCount; i++)
- {
- GSODataSource ds = globeControl1.Globe.DataManager.GetDataSourceAt(i);
- if (ds != null && ds.Type == EnumDataSourceType.SqlServer || ds.Type == EnumDataSourceType.Oracle)
- {
- if (ds.Name == shDatasourceName)
- {
- //防止因为多次连接同一个数据库
- if (flag == true)
- {
- break;
- }
- flag = true;
- listDS.Add(ds);
- GSODataSourceCnn conn = ds.GetConnectionInfo();
-
- XmlElement dbparam = doc.CreateElement("shdbparam");
- XmlElement ip = doc.CreateElement("ship");
- ip.InnerText = conn.Server;
-
- XmlElement dbname = doc.CreateElement("shdbname");
- dbname.InnerText = conn.Database;
-
- XmlElement username = doc.CreateElement("shusername");
- username.InnerText = conn.User;
-
- XmlElement password = doc.CreateElement("shpassword");
- password.InnerText = conn.Password;
-
- XmlElement type = doc.CreateElement("shtype");
- if (ds.Type == EnumDataSourceType.SqlServer)
- {
- type.InnerText = "sqlserver";
- }
- else
- {
- type.InnerText = "oracle";
- }
-
- dbparam.AppendChild(ip);
- dbparam.AppendChild(dbname);
- dbparam.AppendChild(username);
- dbparam.AppendChild(password);
- dbparam.AppendChild(type);
- dbParams.AppendChild(dbparam);
- }
-
- }
- }
-
- for (int i = 0; i < treeNodeList.Count; i++)
- {
- GSOLayer layer = treeNodeList[i].Tag as GSOLayer;
- if (Path.GetExtension(layer.Name) == "")
- {
- XmlElement dbLayer = doc.CreateElement("dblayer");
- XmlAttribute attri = doc.CreateAttribute("dbindex");
- for (int j = 0; j < listDS.Count; j++)
- {
- if (layer.Dataset.DataSource.Name == listDS[j].Name)
- {
- attri.Value = j.ToString();
- break;
- }
- }
- dbLayer.Attributes.Append(attri);
- dbLayer.InnerText = layer.Name;
-
- dbLayers.AppendChild(dbLayer);
- }
- else
- {
- XmlElement dbLayer = doc.CreateElement("layer");
- dbLayer.InnerText = layer.Name;
- layers.AppendChild(dbLayer);
- }
- }
-
- doc.Save(configPath);
- }
- catch (Exception e)
- {
-
- }
- }
-
- private void openLayerList()
- {
- layerManagerNode.Nodes.Clear();
-
- string configPath = Application.StartupPath + "\\configLayerList.xml";
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(configPath);
- XmlNode dbParams = doc.SelectSingleNode("Params/dbparams");
- XmlNode dbLayers = doc.SelectSingleNode("Params/dblayers");
- XmlNode layers = doc.SelectSingleNode("Params/layers");
-
- List listDS = new List();
- for (int i = 0; i < dbParams.ChildNodes.Count; i++)
- {
- string ip = "";
- string dbname = "";
- string username = "";
- string password = "";
- string type = "";
- XmlNode node = dbParams.ChildNodes.Item(i);
- for (int j = 0; j < node.ChildNodes.Count; j++)
- {
- XmlNode nodeChild = node.ChildNodes.Item(j);
-
- if (nodeChild != null && nodeChild.Name == "ship")
- {
- ip = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shdbname")
- {
- dbname = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shusername")
- {
- username = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shpassword")
- {
- password = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shtype")
- {
- type = nodeChild.InnerText;
- }
- }
-
- if (type == "sqlserver")
- {
- GSODataSource ds = globeControl1.Globe.DataManager.OpenSqlServerDataSource(ip, "", dbname, username, password);
- listDS.Add(ds);
- }
- else if (type == "oracle")
- {
- GSODataSource ds = globeControl1.Globe.DataManager.OpenOracleDataSource(ip + "/" + dbname, "", "", username, password);
- listDS.Add(ds);
- }
- }
-
- for (int i = 0; i < dbLayers.ChildNodes.Count; i++)
- {
- XmlNode node = dbLayers.ChildNodes.Item(i);
- if (node != null)
- {
- string layerName = node.InnerText;
- XmlAttribute attri = node.Attributes["dbindex"];
- if (attri != null)
- {
- int dbIndex = -1;
- if (int.TryParse(attri.Value, out dbIndex))
- {
- GSODataset dataset = listDS[dbIndex].GetDatasetByName(layerName);
- globeControl1.Globe.Layers.Add(dataset);
- //更新树节点
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerName);
- TreeNode layerNode = new TreeNode();
- layerNode.Tag = layer;
- layerNode.Text = layer.Dataset.Caption;
- layerNode.ImageIndex = 0;
- layerNode.SelectedImageIndex = 0;
- layerNode.Checked = layer.Visible;
- layerManagerNode.Nodes.Insert(0, layerNode);
- // layerManagerNode.Expand();
-
-
- }
- }
- }
- }
- for (int i = 0; i < layers.ChildNodes.Count; i++)
- {
- XmlNode node = layers.ChildNodes.Item(i);
- if (node != null)
- {
- string layerName = node.InnerText;
- globeControl1.Globe.Layers.Add(layerName);
-
- //更新树节点
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerName);
- TreeNode layerNode = new TreeNode();
- layerNode.Tag = layer;
- layerNode.Text = layer.Dataset.Caption;
- layerNode.ImageIndex = 0;
- layerNode.SelectedImageIndex = 0;
- layerNode.Checked = layer.Visible;
- layerManagerNode.Nodes.Insert(0, layerNode);
- }
- }
- layerManagerNode.Expand();
- }
- catch (Exception e)
- {
-
- }
- }
- * */
- #endregion
private void btn_check_history_Click(object sender, EventArgs e)
{
@@ -10873,7 +9881,7 @@
frm.ShowDialog();
}
}
-
+
private void btn_user_role_Click(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, this.btn_user_role.Text);
@@ -10918,7 +9926,7 @@
{
this.Cursor = Cursors.Default;
}
-
+
private void buttonItemexp_CAD_Click(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, this.buttonItemexp_CAD.Text);
@@ -10956,7 +9964,7 @@
// }
// AddLayerData(strDataPath);
// //globeControl1.Globe.Layers.Add(strDataPath);
-
+
// this.Cursor = Cursors.Default;
// }
// else
@@ -10970,7 +9978,7 @@
// AddLayerData(strDataPath);
// //globeControl1.Globe.Layers.Add(strDataPath);
// }
-
+
//}
//else
//{
@@ -11181,7 +10189,7 @@
lendendGZ24_2.Visible = false;
lendendGZ24_3.Visible = false;
}
- #endregion
+ #endregion
private void buttonItemPasswordReset_Click(object sender, EventArgs e)
{
diff --git a/bin/x86/Debug/Cyberpipe.exe b/bin/x86/Debug/Cyberpipe.exe
index f3be992..33e93f9 100644
--- a/bin/x86/Debug/Cyberpipe.exe
+++ b/bin/x86/Debug/Cyberpipe.exe
Binary files differ
diff --git a/bin/x86/Debug/Cyberpipe.pdb b/bin/x86/Debug/Cyberpipe.pdb
index fa71d60..3963a72 100644
--- a/bin/x86/Debug/Cyberpipe.pdb
+++ b/bin/x86/Debug/Cyberpipe.pdb
Binary files differ
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index 4baac92..63bdc82 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/MainFrm.cs b/MainFrm.cs
index 5e77983..2e3ba7f 100644
--- a/MainFrm.cs
+++ b/MainFrm.cs
@@ -1,40 +1,30 @@
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Data;
using System.Drawing;
-using System.Text;
using System.Windows.Forms;
using System.IO;
using GeoScene.Globe;
using GeoScene.Data;
using GeoScene.Engine;
using System.Runtime.InteropServices;
-using DevComponents.DotNetBar.Rendering;
using DevComponents.DotNetBar;
using System.Xml;
using System.Collections;
-using System.Data.SqlClient;
-using System.Diagnostics;
-using Microsoft.Win32;
using System.Threading;
-using System.Net.NetworkInformation;
-using System.Net.Sockets;
-using MySql.Data.MySqlClient;
using System.Data.OracleClient;
-using Cyberpipe.PATM_Forms;
using Cyberpipe.Forms;
namespace Cyberpipe
{
public partial class MainFrm : Office2007Form
{
- TreeNode terrainManagerNode = null;
+
TreeNode layerManagerNode = null;
TreeNode myPlaceNode = null;
bool m_bFullScreen = false;
- Rectangle m_rcOld = new Rectangle(0, 0, 0, 0);
- GeoScene.Globe.GSOGlobeControl globeControl1;
+
+ GSOGlobeControl globeControl1;
GSOGlobeControl globeControl2;
private GSOHudButton legend;//定义图例
private GSOHudButton btnToolNone;
@@ -78,8 +68,6 @@
//管线间距分析
private GSOFeature disFeature = new GSOFeature();
private GSOFeature featureDis = new GSOFeature();
- ArrayList m_CloseValvesList = new ArrayList();//声明集合存储阀门分析的阀门Feature对象
- ArrayList m_BoosterValvesList = new ArrayList();//声明集合存储阀门分析的阀门Feature对象
//记录沿线飞行设置
//int m_nFlyMode = 2;
@@ -95,8 +83,8 @@
private OracleConnection connBackup = null;
//数据集合
- public static GeoScene.Engine.GSODataSource ds = null;
- public static GeoScene.Engine.GSODataSource shds = null;
+ public static GSODataSource ds = null;
+ public static GSODataSource shds = null;
//审核layer
string shlayername = "";
string redlinelayername = "";
@@ -130,8 +118,8 @@
FrmWait frmWait = null;//一键审核等待窗口
//FrmWait frmWait2 = null;//文档操作等待窗口
- float mouseDownX1,mouseDownY1;
- float mouseDownX2,mouseDownY2;
+ float mouseDownX1, mouseDownY1;
+ float mouseDownX2, mouseDownY2;
///
///
///
@@ -188,10 +176,10 @@
RigthMenuSet();
MenuSet();
-
+
}
-
-
+
+
///
/// 右屏中添加管纵图片
///
@@ -733,7 +721,7 @@
}
else
{
-
+
if (Utility.userRole.IndexOf("用户管理") < 0)
{
btn_user_info.Visible = false;
@@ -945,7 +933,7 @@
sliderItem1.Value = optiValue;
sliderItem2.Value = optiValue;
sliderItem3.Value = optiValue;
-
+
}
//初始化地球控件
@@ -1136,8 +1124,8 @@
Thread t1 = new Thread(new ThreadStart(doLoadDataForGlobalControl1));
t1.IsBackground = true;
t1.Start();
-
-
+
+
}
delegate void LoadDataForGlobalControl();
@@ -1414,18 +1402,18 @@
this.initMarkerTree();
this.initLayout();
this.loadData();
-
-
+
+
double x = Convert.ToDouble(Utility.Query_Roads["绿岛"].ToString().Split(',')[0]);
double y = Convert.ToDouble(Utility.Query_Roads["绿岛"].ToString().Split(',')[1]);
double z = Convert.ToDouble(Utility.Query_Roads["绿岛"].ToString().Split(',')[2]);
jumpToCameraState(x, y, z);
-
+
}
#endregion
-
+
Dictionary dictionaryNetLayerNameAndCaption = new Dictionary();
void globeControl1_AfterNetLayerAddEvent(object sender, AfterNetLayerAddEventArgs e)
{
@@ -1434,203 +1422,6 @@
e.Layer.Caption = dictionaryNetLayerNameAndCaption[e.Layer.Caption];
}
}
-
- void AddFeaturesNodeToMyPlace(GSOFeatures features)
- {
- if (features == null || features.Length == 0)
- {
- return;
- }
-
- for (Int32 i = 0; i < features.Length; i++)
- {
- GSOFeature feature = features[i];
- if (feature.Type == EnumFeatureType.FeatureFolder)
- {
-
- GSOFeatureFolder featureFolder = (GSOFeatureFolder)feature;
- AddFeaturesNodeToMyPlace(featureFolder.Features);
-
- }
- else
- {
- TreeNode tempnode = new TreeNode();
- tempnode.Text = feature.Name;
- if (feature.Geometry != null)
- {
- switch (feature.Geometry.Type)
- {
- case EnumGeometryType.GeoPoint3D:
- case EnumGeometryType.GeoMarker:
- tempnode.ImageIndex = 3;
- tempnode.SelectedImageIndex = 3;
- break;
- case EnumGeometryType.GeoPolyline3D:
- tempnode.ImageIndex = 4;
- tempnode.SelectedImageIndex = 4;
- break;
- case EnumGeometryType.GeoPolygon3D:
- tempnode.ImageIndex = 5;
- tempnode.SelectedImageIndex = 5;
- break;
- case EnumGeometryType.GeoModel:
- case EnumGeometryType.GeoEntity:
- case EnumGeometryType.GeoGroupEntity:
- case EnumGeometryType.GeoSphereEntity:
- case EnumGeometryType.GeoBoxEntity:
- case EnumGeometryType.GeoEllipsoidEntity:
- case EnumGeometryType.GeoCylinderEntity:
- case EnumGeometryType.GeoFrustumEntity:
- case EnumGeometryType.GeoEllipCylinderEntity:
- case EnumGeometryType.GeoEllipFrustumEntity:
- case EnumGeometryType.GeoRangeEllipsoidEntity:
- case EnumGeometryType.GeoRangeEllipCylinderEntity:
- case EnumGeometryType.GeoRangeEllipFrustumEntity:
-
-
- tempnode.ImageIndex = 6;
- tempnode.SelectedImageIndex = 6;
- break;
- case EnumGeometryType.GeoGroundOverlay:
- tempnode.ImageIndex = 7;
- tempnode.SelectedImageIndex = 7;
- break;
- }
-
- }
- GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(feature);
- tempnode.Checked = newFeature.Visible;
- tempnode.Tag = newFeature;
- myPlaceNode.Nodes.Add(tempnode);
- }
- }
- }
-
-
- private bool isContainName(string[] array, string name)
- {
- bool bl = false;
- for (int i = 0; i < array.Length; i++)
- {
- if (array[i] == name)
- {
- bl = true;
- break;
- }
- }
- return bl;
- }
-
- //private void setControlVisilbe(string[] resourceNames)
- //{
- // ArrayList listItem = new ArrayList();
- // ArrayList subListItem = new ArrayList();
- // System.Windows.Forms.Control.ControlCollection cc = ribbonControl1.Controls;
- // for (int i = 0; i < cc.Count; i++)
- // {
- // if (cc[i].GetType() == typeof(DevComponents.DotNetBar.RibbonStrip))
- // {
- // DevComponents.DotNetBar.RibbonStrip ribbonStripResource = cc[i] as DevComponents.DotNetBar.RibbonStrip;
- // for (int j = 0; j < ribbonStripResource.Items.Count; j++)
- // {
- // if (ribbonStripResource.Items[j].GetType() == typeof(DevComponents.DotNetBar.RibbonTabItem))
- // {
- // DevComponents.DotNetBar.RibbonTabItem ribbonTabItemResource = ribbonStripResource.Items[j] as DevComponents.DotNetBar.RibbonTabItem;
- // string tabItemResourceName = ribbonTabItemResource.Text;
- // listItem.Add(tabItemResourceName);
- // subListItem.Add(tabItemResourceName);
- // if (!isContainName(resourceNames, tabItemResourceName))
- // {
- // ribbonTabItemResource.Visible = false;
- // }
- // if (ribbonTabItemResource.SubItems.Count > 0)
- // {
- // for (int k = 0; k < ribbonTabItemResource.SubItems.Count; k++)
- // {
- // if (ribbonTabItemResource.SubItems[k].GetType() == typeof(DevComponents.DotNetBar.ButtonItem))
- // {
- // DevComponents.DotNetBar.ButtonItem buttonItemResource = ribbonTabItemResource.SubItems[k] as DevComponents.DotNetBar.ButtonItem;
- // string buttonItemResourceName = buttonItemResource.Text;
- // subListItem.Add(buttonItemResourceName);
- // if (!isContainName(resourceNames, buttonItemResourceName))
- // {
- // buttonItemResource.Visible = false;
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // else if (cc[i].GetType() == typeof(DevComponents.DotNetBar.RibbonPanel))
- // {
- // DevComponents.DotNetBar.RibbonPanel ribbonPanelResource = cc[i] as DevComponents.DotNetBar.RibbonPanel;
- // for (int j = 0; j < ribbonPanelResource.Controls.Count; j++)
- // {
- // if (ribbonPanelResource.Controls[j].GetType() == typeof(DevComponents.DotNetBar.RibbonBar))
- // {
- // DevComponents.DotNetBar.RibbonBar ribbonBarResource = ribbonPanelResource.Controls[j] as DevComponents.DotNetBar.RibbonBar;
- // for (int k = 0; k < ribbonBarResource.Items.Count; k++)
- // {
- // if (ribbonBarResource.Items[k].GetType() == typeof(DevComponents.DotNetBar.ButtonItem))
- // {
- // DevComponents.DotNetBar.ButtonItem buttonItemResource = ribbonBarResource.Items[k] as DevComponents.DotNetBar.ButtonItem;
- // string buttonItemResourceName = buttonItemResource.Text;
- // subListItem.Add(buttonItemResourceName);
- // if (!isContainName(resourceNames, buttonItemResourceName))
- // {
- // buttonItemResource.Visible = false;
- // }
- // if (buttonItemResource.SubItems.Count > 0)
- // {
- // for (int m = 0; m < buttonItemResource.SubItems.Count; m++)
- // {
- // if (buttonItemResource.SubItems[m].GetType() == typeof(DevComponents.DotNetBar.ButtonItem))
- // {
- // DevComponents.DotNetBar.ButtonItem subButtonItemResource = buttonItemResource.SubItems[m] as DevComponents.DotNetBar.ButtonItem;
- // string SubButtonItemResourceName = subButtonItemResource.Text;
- // subListItem.Add(SubButtonItemResourceName);
- // if (!isContainName(resourceNames, SubButtonItemResourceName))
- // {
- // subButtonItemResource.Visible = false;
- // }
- // }
- // }
- // }
- // }
- // else
- // {
- // if (ribbonBarResource.Items[k].GetType() == typeof(DevComponents.DotNetBar.SliderItem))
- // {
- // DevComponents.DotNetBar.SliderItem sliderItemResource = ribbonBarResource.Items[k] as DevComponents.DotNetBar.SliderItem;
- // if (!isContainName(resourceNames, sliderItemResource.Text.Trim()))
- // {
- // sliderItemResource.Visible = false;
- // }
-
- // if (sliderItemResource.SubItems.Count > 0)
- // {
- // for (int m = 0; m < sliderItemResource.SubItems.Count; m++)
- // {
- // if (sliderItemResource.SubItems[m].GetType() == typeof(DevComponents.DotNetBar.ButtonItem))
- // {
- // DevComponents.DotNetBar.ButtonItem subButtonItemResource = sliderItemResource.SubItems[m] as DevComponents.DotNetBar.ButtonItem;
- // if (!isContainName(resourceNames, subButtonItemResource.Text.Trim()))
- // {
- // subButtonItemResource.Visible = false;
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- //}
- //#endregion
void globeControl2_HudControlMouseDownEvent(object sender, HudControlMouseDownEventArgs e)
{
@@ -1662,7 +1453,7 @@
globeControl2.Globe.JumpToCameraState(camera);
}
}
-
+
private void VisitFeature3Ds(GSOFeatures feature3ds, TreeNode node)
{
for (int i = 0; i < feature3ds.Length; i++)
@@ -1786,7 +1577,7 @@
globeControl1.SwapBuffer();
Point pt1 = new Point(Convert.ToInt32(e.StartPos.X), Convert.ToInt32(e.StartPos.Y));
Point pt2 = new Point(Convert.ToInt32(e.EndPos.X), Convert.ToInt32(e.EndPos.Y));
-
+
/*Point pt = getUpperLeftPoint(pt1, pt2);
Image myImg = new Bitmap(Convert.ToInt32(e.Rect.Width), Convert.ToInt32(e.Rect.Height));
Graphics g = Graphics.FromImage(myImg);
@@ -1994,18 +1785,18 @@
{
if (e.Button == MouseButtons.Right && e.Node.Tag.ToString().Contains("|"))
{
-
+
if (e.Node.Tag.ToString().Split('|')[0] == "locaserver")
{
-
+
foreach (ToolStripItem item in layerNodeContexMenu.Items)
{
item.Visible = false;
}
return;
-
+
}
-
+
if (e.Node.Tag.ToString().Split('|')[0] == "new")
{
LayerEditableMenuItem.Enabled = true;
@@ -2072,7 +1863,7 @@
GSOLayer layer = node.Tag as GSOLayer;
//globeControl1.Globe.Layers.Remove(layer);
- for (int i = globeControl1.Globe.Layers.Count-1; i >=0; i--)
+ for (int i = globeControl1.Globe.Layers.Count - 1; i >= 0; i--)
{
if (globeControl1.Globe.Layers[i].Caption == layer.Caption)
{
@@ -2180,7 +1971,7 @@
private void layerTree_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
{
- if(this.layerTree.SelectedNode!=null)
+ if (this.layerTree.SelectedNode != null)
{
if (this.layerTree.SelectedNode.Tag.ToString().Contains("|"))
{
@@ -2201,7 +1992,8 @@
}
globeControl1.Refresh();
}
- else {
+ else
+ {
double x = layer.LatLonBounds.Center.X;
double y = layer.LatLonBounds.Center.Y;
globeControl1.Globe.FlyToPosition(new GSOPoint3d(x, y, 0), EnumAltitudeMode.Absolute);
@@ -2306,12 +2098,12 @@
void globeControl1_TrackPolylineEndEvent(object sender, TrackPolylineEndEventArgs e)
{
//横断面分析、道路横断面分析
- if (trackPolylineEndMode == EnumTrackPolylineEndMode.HDM_Analysis||
+ if (trackPolylineEndMode == EnumTrackPolylineEndMode.HDM_Analysis ||
trackPolylineEndMode == EnumTrackPolylineEndMode.DLDM_Analysis)
{
Dictionary hdmDic = SectionAnalysisTool.HDMAnalysis(this.globeControl1,
e.Polyline, this.m_PipelineLayerNames);
- FrmHDMAnalysis3 frm = new FrmHDMAnalysis3(hdmDic, this.globeControl1,
+ FrmHDMAnalysis3 frm = new FrmHDMAnalysis3(hdmDic, this.globeControl1,
trackPolylineEndMode);
frm.Show(this);
}
@@ -2512,7 +2304,7 @@
* **/
}
#endregion
-
+
///
/// 根据范围统计阀门、管线、工井等, 开挖分析, 挖方量分析
///
@@ -2527,7 +2319,7 @@
switch (trackflag)
{
case "valvequery":
- FrmValveStatistics frm = new FrmValveStatistics(globeControl1,polygon, new DataGridViewDelegate(InitDataGridViewX1));
+ FrmValveStatistics frm = new FrmValveStatistics(globeControl1, polygon, new DataGridViewDelegate(InitDataGridViewX1));
frm.Show(this);
//panelEx6.Visible = true;
//toolStripFeatureLength.Text = "";
@@ -2535,15 +2327,15 @@
break;
case "PipelineDistanceStatistics":
-
+
FrmAllPipelineStatis frm1 = new FrmAllPipelineStatis(globeControl1, polygon, new DataGridViewDelegate(InitDataGridViewX1), m_PipelineLayerNames);
frm1.Show(this);
globeControl1.Globe.Action = EnumAction3D.ActionNull;
break;
case "PipelineSpatialQuery":
-
- FrmAllPipelineStatis.ShowForm(globeControl1,polygon,new DataGridViewDelegate(InitDataGridViewX1),m_PipelineLayerNames);
+
+ FrmAllPipelineStatis.ShowForm(globeControl1, polygon, new DataGridViewDelegate(InitDataGridViewX1), m_PipelineLayerNames);
globeControl1.Globe.ClearAnalysis();
globeControl1.Globe.Action = EnumAction3D.ActionNull;
@@ -2603,7 +2395,7 @@
//listBSQ.Add(bsqFeatures);
//FrmBSQDuoBianXingStatis bsqFrm = new FrmBSQDuoBianXingStatis(workWellLen, globeControl1, listBSQ);
- FrmBSQStatis bsqFrm = new FrmBSQStatis(globeControl1,e.Polygon);
+ FrmBSQStatis bsqFrm = new FrmBSQStatis(globeControl1, e.Polygon);
bsqFrm.Show(this);
globeControl1.Globe.Action = EnumAction3D.ActionNull;
break;
@@ -2616,74 +2408,6 @@
}
}
- #region 验证端口
- /*
- ///
- /// 验证端口
- ///
- ///
- private bool ValiPort()
- {
- Ping p = new Ping();//创建Ping对象p
- PingReply pr = p.Send(Utility.localicenseserverip);//向指定IP或者主机名的计算机发送ICMP协议的ping数据包
- if (pr.Status == IPStatus.Success)//如果ping成功
- {
- try
- {
- TcpClient tcpc = new TcpClient(Utility.localicenseserverip, Utility.localicenseserverport);//对IP地址为"192.168.0.105"的计算机的1500端口提出连接申请
- tcpc.Close();
- return true;
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- MessageBox.Show("端口连接错误!" + ex.Message);
- return false;
- }
- }
- else
- {
- int times = 0;//重新连接次数;
- int count = 2;//设置尝试次数
- while (times < count)
- {
- //Thread.Sleep(1000);//等待时间(方便测试的话,你可以改为1000)
- pr = p.Send(Utility.localicenseserverip);
-
- if (pr.Status == IPStatus.Success)
- {
- try
- {
- TcpClient tcpc = new TcpClient(Utility.localicenseserverip, Utility.localicenseserverport);//对IP地址为"192.168.0.105"的计算机的1500端口提出连接申请
- tcpc.Close();
- return true;
- }
- catch (Exception ex)
- {
- LogError.PublishError(ex);
- MessageBox.Show("端口连接错误!" + ex.Message);
- return false;
- }
- }
- else
- {
- times++;
- if (times < count)
- {
- continue;
- }
- else
- {
- MessageBox.Show("重新尝试连接失败");
- return false;
- }
- }
- }
- return false;
- }
- }
- */
- #endregion
///
/// 鼠标悬浮提示
@@ -2721,7 +2445,7 @@
{
if (e.Button == MouseButtons.Left)
{
-
+
if (m_AddPipeLine == true && globeControl1.Globe.Action == EnumAction3D.DrawPolyline)//添加管线
{
GSOLayer layerDest = globeControl1.Globe.DestLayerFeatureAdd;
@@ -2904,7 +2628,7 @@
m_isDrawRedPology = false;
globeControl1.Globe.Action = EnumAction3D.ActionNull;
-
+
}
}
@@ -3318,7 +3042,7 @@
///
///
///
- private string GetBubbleInfo(GSOFeature feature,GSOGlobeControl globeControl)
+ private string GetBubbleInfo(GSOFeature feature, GSOGlobeControl globeControl)
{
if (feature == null)
{
@@ -3470,7 +3194,7 @@
{
name2 += "_米";
}
- value2 = dl2.ToString("0.00");
+ value2 = dl2.ToString("0.00");
}
else
{
@@ -3581,16 +3305,7 @@
}
return null;
}
-
- ///
- /// 菜单上的 三维导航 工具按钮
- ///
- ///
- ///
- private void buttonItem86_Click(object sender, EventArgs e)
- {
- globeControl1.Globe.Action = EnumAction3D.ActionNull;
- }
+
///
/// 地上模式 菜单按钮
@@ -3776,7 +3491,7 @@
sideBarPanelItem3.Visible = false;
layerTree.Visible = false;
controlContainerItem3.Visible = false;
-
+
//修改图层管理与标注管理、覆土审查、水平净距分析、垂直净距分析和碰撞分析控件之间的逻辑关系
controlContainerItem5.Visible = false;
sideBar1.Visible = false;
@@ -3798,7 +3513,7 @@
}
*/
Refresh();
-
+
}
}
///
@@ -3851,7 +3566,7 @@
int widthFull = Screen.PrimaryScreen.Bounds.Width;
int heightFull = Screen.PrimaryScreen.Bounds.Height;
-
+
this.FormBorderStyle = FormBorderStyle.None;
this.WindowState = FormWindowState.Normal;
@@ -3966,44 +3681,7 @@
buttonItem130_Click_1(this, EventArgs.Empty);
}
}
- /*
- ///
- /// 输出地图
- ///
- ///
- ///
- ///
- private Point getUpperLeftPoint(Point p1, Point p2) //
- {
- Rectangle rc = new Rectangle();
- p1 = this.globeControl1.PointToScreen(p1);
- p2 = this.globeControl1.PointToScreen(p2);
- if (p1.X < p2.X)
- {
- rc.X = p1.X;
- rc.Width = p2.X - p1.X;
- }
- else
- {
- rc.X = p2.X;
- rc.Width = p1.X - p2.X;
- }
- if (p1.Y < p2.Y)
- {
- rc.Y = p1.Y;
- rc.Height = p2.Y - p1.Y;
- }
- else
- {
- rc.Y = p2.Y;
- rc.Height = p1.Y - p2.Y;
- }
-
- Point pt = new Point(rc.Left, rc.Top);
- return pt;
- }
- * */
private Point getUpperLeftPoint(Point p1, Point p2, out int mapWidth, out int mapHeight) //
{
@@ -4050,7 +3728,7 @@
}
Image printImage;
-
+
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawImage(printImage, 10, 10);
@@ -4106,7 +3784,7 @@
}
}
}
-
+
///
/// 窗体下方属性表格 右键菜单中的 “定位”菜单
///
@@ -4220,29 +3898,6 @@
count = 0;
}
}
- #region wxl 删除无用??有疑问,功能用在哪里?
- ///
- /// 绘制线 菜单
- ///
- ///
- ///
- //private void btnAddLine_Click(object sender, EventArgs e)
- //{
- // globeControl1.Globe.DestLayerFeatureAdd = globeControl1.Globe.MemoryLayer;
- // globeControl1.Globe.Action = EnumAction3D.DrawPolyline;
- //}
-
- ///
- /// 绘制面 菜单
- ///
- ///
- ///
- //private void btnAddPolygon_Click(object sender, EventArgs e)
- //{
- // globeControl1.Globe.DestLayerFeatureAdd = globeControl1.Globe.MemoryLayer;
- // globeControl1.Globe.Action = EnumAction3D.DrawPolygon;
- //}
- #endregion
///
/// 图层目录树 右键菜单中的 目标图层 菜单
///
@@ -4298,7 +3953,7 @@
GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerCaption);
layer.Dataset.Save();
}
-
+
#region wxl feature的公共方法
///
@@ -4359,10 +4014,10 @@
if (globeControl1.Globe.Action != EnumAction3D.NormalHit)
{
buttonItemFX3_6.Checked = false;
- // ClearConnexityAnalysis();
+ // ClearConnexityAnalysis();
buttonItemFX3_5.Checked = false;
- // ClearCloseValvesAnalysis();
+ // ClearCloseValvesAnalysis();
}
if (globeControl1.Globe.Action != EnumAction3D.TrackPolygon)
{
@@ -4383,15 +4038,16 @@
{
e.Cancel = true;
}
- else {
+ else
+ {
globeControl1.Globe.MemoryLayer.SaveAs(Application.StartupPath + "/MyPlace.kml");
}
-
+
//saveLayerList(layerManagerNode.Nodes);
//注销id号为103的热键设定
// UnregisterHotKey(Handle, 103);
}
-
+
///
/// 垂直净距分析 功能界面中的 选择图层复选框 选中状态改变事件处理
///
@@ -4488,7 +4144,6 @@
comboBoxEx4.Enabled = true;
}
}
- GSOFeatures feats_vertical = new GSOFeatures();
///
/// 垂直净距分析 功能界面中的 选择图层下拉框 选中项改变 事件处理
///
@@ -5731,7 +5386,7 @@
}
}
-
+
///
/// 添加指定路径下的数据 功能
@@ -5825,7 +5480,7 @@
}
return objRes;
}
-
+
///
/// 碰撞分析功能界面中 选择管线复选框 选中状态改变事件处理
///
@@ -5938,7 +5593,7 @@
}
}
}
-
+
if (globeControl1.Globe.Action == EnumAction3D.SelectObject)
{
globeControl1.Globe.Action = EnumAction3D.ActionNull;
@@ -5983,7 +5638,7 @@
MessageBox.Show("表格内容为空!", "提示");
}
}
-
+
/////
///// 区域分析 菜单
/////
@@ -6040,134 +5695,6 @@
}
}
}
-
-
-
- #region Fan 去掉
- ////GSOFeature emitterFeature; // 粒子要素
- /////
- ///// 添加火苗 功能
- /////
- /////
- /////
- /////
- //private void AddFire(double x, double y, double z)
- //{
- // GSOFeatures feats = globeControl1.Globe.MemoryLayer.GetFeatureByName("粒子要素", true);
- // if (feats.Length > 0)
- // globeControl1.Globe.MemoryLayer.RemoveFeatureByID(feats[0].ID);
-
- // string strResPath = Application.StartupPath + "/Resource";
- // // 烟火粒子示例,由三个发射器构成
- // GSOGeoParticle geoParticle = new GSOGeoParticle();
- // geoParticle.SetPosition(x, y, z); // 添加到这个经纬度位置
- // geoParticle.AltitudeMode = EnumAltitudeMode.RelativeToGround;
-
- // GSORingParticleEmitter emitter = new GSORingParticleEmitter();
- // emitter.TexturePath = strResPath + "/ParticleImage/flare1.png";//烟1111111111111
-
- // emitter.SetSizeFix(1, 1);
- // emitter.VelFix = 1;
- // emitter.VelRnd = 5;
-
- // emitter.AngleXYFix = 0;
- // emitter.AngleXYRnd = 180;
-
- // emitter.AngleXZFix = 90;
- // emitter.AngleXZRnd = 0;
-
- // emitter.LifeFix = 0.5f;
- // emitter.LifeRnd = 0.0f;
-
- // emitter.RotFix = 0;
- // emitter.RotRnd = 0;
-
- // emitter.RotVelFix = 0;
- // emitter.RotVelRnd = 0;
-
- // emitter.EmitPerSec = 100;
- // emitter.IsLumAdded = true;
-
- // // 采用线性插值生成粒子的初始颜色
- // emitter.ColorRndStart = Color.White;
- // emitter.ColorRndEnd = Color.Red;
-
-
- // GSOColorParticleEffector effector2 = new GSOColorParticleEffector();
- // effector2.SetColorChanged(0, -1, -1, 0);
- // effector2.StartTime = 0.0f;
- // effector2.EndTime = -1.0f;
- // emitter.AddEffector(effector2);
-
- // // 将三个发射器添加到粒子对象中
- // geoParticle.AddEmitter(emitter);
-
- // geoParticle.Play();
-
- // GSOFeature emitterFeature = new GSOFeature();
- // emitterFeature.Geometry = geoParticle;
- // emitterFeature.Name = "粒子要素"; //
- // globeControl1.Globe.MemoryLayer.AddFeature(emitterFeature);
-
- //}
- /////
- ///// 添加喷泉 功能
- /////
- /////
- /////
- /////
- //private void AddFountain(double x, double y, double z)
- //{
- // GSOFeatures feats = globeControl1.Globe.MemoryLayer.GetFeatureByName("粒子要素", true);
- // if (feats.Length > 0)
- // globeControl1.Globe.MemoryLayer.RemoveFeatureByID(feats[0].ID);
-
- // string strResPath = Application.StartupPath + "/Resource";
-
- // GSOGeoParticle geoParticle = new GSOGeoParticle();
- // geoParticle.SetPosition(x, y, z); // 添加到这个经纬度位置
- // geoParticle.AltitudeMode = EnumAltitudeMode.RelativeToGround;
-
- // GSOPointParticleEmitter emitter = new GSOPointParticleEmitter();
- // emitter.TexturePath = strResPath + "/ParticleImage/test.png";
-
- // emitter.SetSizeFix(0.5f, 2);
- // emitter.VelFix = 10;
- // emitter.VelRnd = 2;
-
- // emitter.GravityAcc = 9.8f;
- // emitter.AngleXYFix = 0;
- // emitter.AngleXYRnd = 180;
-
- // emitter.AngleXZFix = 88;
- // emitter.AngleXZRnd = 2;
-
- // emitter.LifeFix = 5.0f;
- // emitter.LifeRnd = 1.0f;
-
- // emitter.RotFix = 0;
- // emitter.RotRnd = 0;
-
- // emitter.RotVelFix = 0;
- // emitter.RotVelRnd = 0;
-
- // emitter.EmitPerSec = 1000;
- // emitter.ColorRndStart = Color.FromArgb(33, 255, 255, 255);
- // emitter.ColorRndEnd = Color.FromArgb(11, 255, 255, 255);
- // emitter.IsLumAdded = false;
-
- // // 将三个发射器添加到粒子对象中
- // geoParticle.AddEmitter(emitter);
-
- // geoParticle.Play();
- // GSOFeature emitterFeature = new GSOFeature();
- // emitterFeature.Geometry = geoParticle;
- // emitterFeature.Name = "粒子要素"; //
-
- // globeControl1.Globe.MemoryLayer.AddFeature(emitterFeature);
- // //globeControl1.Globe.FlyToFeature(emitterFeature);
- //}
- #endregion
///
/// 获取指定图层中最后一个feature对象的名称对应的整数
@@ -6269,7 +5796,7 @@
}
return resFeature;
}
-
+
///
/// 图层节点树中 节点 右键单击事件处理
///
@@ -6445,82 +5972,9 @@
}
}
- ///
- /// 双屏对比 菜单
- ///
- ///
- ///
- //private void buttonItem94_Click(object sender, EventArgs e)
- //{
- // buttonItem94.Checked = !buttonItem94.Checked;
- // splitContainer1.Panel2Collapsed = !buttonItem94.Checked;
- // if (buttonItem94.Checked)
- // {
- // buttonItem95.Enabled = true;
- // buttonItem96.Enabled = true;
- // sideBar1.Visible = false;
- // buttonItem1.Checked = false;
- // for (int i = globeControl2.Globe.Layers.Count - 1; i >= 0 ; i--)
- // {
- // GSOLayer layer = globeControl2.Globe.Layers[i];
- // if (!layer.Name.Contains("fttp:"))
- // {
- // globeControl2.Globe.Layers.Remove(layer);
- // }
- // }
- // globeControl2.Globe.GroundOpaque = globeControl1.Globe.GroundOpaque;
- // FrmDataBaseOpt frm = new FrmDataBaseOpt(globeControl2);
- // frm.Show(this);
- // globeControl2.Globe.Refresh();
- // }
- // else
- // {
- // buttonItem95.Enabled = false;
- // buttonItem96.Enabled = false;
- // sideBar1.Visible = true;
- // buttonItem1.Checked = true;
- // sideBarPanelItem3.Visible = true;
- // layerTree.Visible = true;
- // controlContainerItem3.Visible = true;
- // Refresh();
- // }
- //}
- ///
- /// 模拟分析 菜单
- ///
- ///
- ///
- //private void buttonItem51_Click(object sender, EventArgs e)
- //{
- // buttonItem51.Checked = !buttonItem51.Checked;
- // ribbonBarMN.Visible = buttonItem51.Checked;
- // ribbonBarMN.Location = new Point(0, 0);
- //}
-
- ///
- /// 双屏设置 菜单
- ///
- ///
- ///
- //private void buttonItem96_Click(object sender, EventArgs e)
- //{
- // FrmLayerControl frm = new FrmLayerControl(layerTree,globeControl1,globeControl2);
- // frm.Show(this);
- //}
- ///
- /// 双屏联动 菜单
- ///
- ///
- ///
- //private void buttonItem95_Click(object sender, EventArgs e)
- //{
- // buttonItem95.Checked = !buttonItem95.Checked;
- //}
- /////
-
//定时检查传感器的状态
public System.Windows.Forms.Timer timerOfSensor = null;
-
+
///
/// 碰撞分析 功能界面中 关闭按钮 事件处理
@@ -6545,7 +5999,7 @@
}
else
{
- sideBar1.Visible = false;
+ sideBar1.Visible = false;
}
Refresh();
@@ -6855,67 +6309,6 @@
}
}
-
- ////
- ////导出路由专题图
- ////
- //private void btnOutputR_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.btnOutputR.Text);
-
- // Point pt1 = new Point(Convert.ToInt32(0), Convert.ToInt32(0));
- // Point pt2 = new Point(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Point pt = getUpperLeftPoint(pt1, pt2);
- // Image myImg = new Bitmap(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Graphics g = Graphics.FromImage(myImg);
- // g.CopyFromScreen(pt, new Point(0, 0), new Size(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height)));
-
- // F_PATMTitle frm = new F_PATMTitle("R", myImg);
- // frm.ShowDialog();
- //}
- //
- //导出配件专题图
- //
- //private void btnOutputF_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.btnOutputF.Text);
-
- // Point pt1 = new Point(Convert.ToInt32(0), Convert.ToInt32(0));
- // Point pt2 = new Point(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Point pt = getUpperLeftPoint(pt1, pt2);
- // Image myImg = new Bitmap(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height));
- // Graphics g = Graphics.FromImage(myImg);
- // g.CopyFromScreen(pt, new Point(0, 0), new Size(Convert.ToInt32(panelEx5.Width), Convert.ToInt32(panelEx5.Height)));
-
- // F_PATMTitle frm = new F_PATMTitle("F", myImg);
- // frm.ShowDialog();
- //}
-
-
-
-
- ////交越点入库
- //private void fmrk_Click(object sender, EventArgs e)
- //{
- // //保存日志
- // LogManager.saveLog(Utility.userName, this.fmrk.Text);
-
- // if (ds == null)
- // {
- // MessageBox.Show("请先连接数据库", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
- // ConnectDB(null, null);
- // }
- // if (ds == null)
- // return;
- // FrmAddValve frm = new FrmAddValve(globeControl1, ds);
- // if (frm.ShowDialog() == DialogResult.OK)
- // {
- // addNodeToLayerManagerNode(frm.rukuLayer);
- // }
- //}
-
///
/// 一键审核---导入数据
///
@@ -6949,7 +6342,7 @@
MessageBox.Show("内存过载请清理内存,并重新启动规划分析!", "提示");
return;
}
-
+
}
///
@@ -7012,7 +6405,7 @@
LogManager.saveLog(Utility.userName, this.buttonItem128.Text);
//垂直净距标准
- frmSh = new FrmYJSHTC(globeControl1, globeControl2,layerTree);
+ frmSh = new FrmYJSHTC(globeControl1, globeControl2, layerTree);
if (frmSh.ShowDialog() == DialogResult.OK)
{
@@ -7033,7 +6426,7 @@
double dVerticalJingJuBiaoZhun = 1, dHorizontalJingJuBiaoZhun = 1;
if (frmSh.rukuLayer != null)
{
- #region
+ #region
this.Invoke((EventHandler)delegate
{
try
@@ -7122,11 +6515,11 @@
}
else
{
-
+
}
}
-
+
///
/// 清除渲染结果
///
@@ -7207,7 +6600,7 @@
private void buttonItem134_Click_1(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, "模拟设计修改");
-
+
frmModify = new FrmMnModify(globeControl1, shlayername, shresultLists);
if (boolfrmModify == false)
@@ -7224,7 +6617,7 @@
}
-
+
///
/// 一键审核中调节透明度
@@ -7241,7 +6634,7 @@
{
layer.Opaque = 100 - sliderItem1.Value;
}
-
+
optiValue = sliderItem1.Value;
}
///
@@ -7541,9 +6934,9 @@
buttonClearAnalysisResult_Click(null, null);
NetworkAnalysisTool.ClearAllTopAnalysis(this.globeControl1);
- // ClearConnexityAnalysis();//清除连通性分析
- // ClearCloseValvesAnalysis();//清除阀门分析
-
+ // ClearConnexityAnalysis();//清除连通性分析
+ // ClearCloseValvesAnalysis();//清除阀门分析
+
//清除管线间距分析
if (disFeature != null)
{
@@ -7566,7 +6959,7 @@
globeControl1.Globe.UnderGroundFloor.Visible = false;//隐藏地下网格线
- // ClearUpDownTraceAnalysis(); //清除上下游分析
+ // ClearUpDownTraceAnalysis(); //清除上下游分析
globeControl1.Globe.RemoveAllPits();//清除所有坑
string[] markerStrs = new string[9];
@@ -7613,18 +7006,7 @@
{
//日志记录
LogManager.saveLog(Utility.userName, "管线长度统计");
-
- //pipeLineDis.Clear();
- //List list = new List();
- //for (int i = 0; i < m_PipelineLayerNames.Count; i++)
- //{
- // GSOFeatures fs = Intersects_Pipeline(null, m_PipelineLayerNames[i]);
- // if (fs!=null)
- // list.Add(fs);
- //}
-
- //FrmAllPipelineStatis frm = new FrmAllPipelineStatis(0, pipeLineDis, list, globeControl1, new DataGridViewDelegate(InitDataGridViewX1));
- FrmAllPipelineStatis frm = new FrmAllPipelineStatis(globeControl1,null, new DataGridViewDelegate(InitDataGridViewX1), m_PipelineLayerNames);
+ FrmAllPipelineStatis frm = new FrmAllPipelineStatis(globeControl1, null, new DataGridViewDelegate(InitDataGridViewX1), m_PipelineLayerNames);
frm.Show(this);
}
@@ -7651,26 +7033,6 @@
{
//日志记录
LogManager.saveLog(Utility.userName, "阀门数量统计");
-
- //workWellLen.Clear();
- //List list = new List();
- ////找到所有阀门
- //if (Utility.LayerNamesList != null)
- //{
- // ArrayList listpt = Utility.LayerNamesList;
-
- // for (int i = 0; i < listpt.Count; i++)
- // {
- // string pipelineType = (string)Utility.LayerNamesList[i];
-
- // if ((pipelineType == "给水") || (pipelineType == "天然气") || (pipelineType == "热力"))
- // {
- //GSOFeatures fs = Intersect_PointLayerByType(null, pipelineType, "阀门");
- // list.Add(fs);
- // }
- // }
- //}
- //FrmValveStatistics frm = new FrmValveStatistics(workWellLen, list, globeControl1, new DataGridViewDelegate(InitDataGridViewX1));
FrmValveStatistics frm = new FrmValveStatistics(globeControl1, null, new DataGridViewDelegate(InitDataGridViewX1));
frm.Show(this);
@@ -7696,7 +7058,7 @@
///
///
private void buttonItemTJ3_ALL_Click(object sender, EventArgs e)
- {
+ {
FrmAllWorkWellStatis frm = new FrmAllWorkWellStatis(globeControl1, null, new DataGridViewDelegate(InitDataGridViewX1));
frm.Show(this);
}
@@ -7709,7 +7071,7 @@
{
//日志记录
LogManager.saveLog(Utility.userName, "井盖数量统计");
-
+
trackflag = "workwellquery";
globeControl1.Globe.Action = EnumAction3D.TrackPolygon;
globeControl1.Globe.TrackPolygonTool.TrackMode = EnumTrackMode.SpaceTrack;
@@ -8003,7 +7365,7 @@
globeControl1.Globe.TrackPolylineTool.VerticalLineVisible = true;
globeControl1.Globe.TrackPolylineTool.TrackMode = EnumTrackMode.SpaceTrack;
trackPolylineEndMode = EnumTrackPolylineEndMode.HDM_Analysis;
-
+
}
///
/// 纵断面分析
@@ -8012,9 +7374,9 @@
///
private void buttonItemFX2_2_Click(object sender, EventArgs e)
{
- if (globeControl1.Globe.SelObjectCount<1)
+ if (globeControl1.Globe.SelObjectCount < 1)
{
- MessageBox.Show("请选择一条或者多条管线!", "提示", MessageBoxButtons.OK,
+ MessageBox.Show("请选择一条或者多条管线!", "提示", MessageBoxButtons.OK,
MessageBoxIcon.Information);
return;
}
@@ -8060,7 +7422,7 @@
globeControl1.Globe.TrackPolylineTool.VerticalLineVisible = true;
globeControl1.Globe.TrackPolylineTool.TrackMode = EnumTrackMode.SpaceTrack;
trackPolylineEndMode = EnumTrackPolylineEndMode.JXPM_Analysis;
-
+
}
#endregion
@@ -8154,11 +7516,11 @@
GSOLayer valveLayer = globeControl1.Globe.Layers[pipeLayerNamePrefix + "阀门"];
if (valveLayer == null)
{
- MessageBox.Show("无" + pipeLayerNamePrefix+"阀门图层", "提示");
+ MessageBox.Show("无" + pipeLayerNamePrefix + "阀门图层", "提示");
return;
}
- GSOFeatures valveFeats = NetworkAnalysisTool.CloseValvesAnalysis(resFeature,
+ GSOFeatures valveFeats = NetworkAnalysisTool.CloseValvesAnalysis(resFeature,
resLayer, valveLayer);
if (valveFeats != null)
@@ -8166,7 +7528,7 @@
FrmCloseValves frm = new FrmCloseValves(this.globeControl1, valveFeats);
frm.Show(this);
}
- else
+ else
{
MessageBox.Show("未找到关闭阀门");
}
@@ -8186,7 +7548,7 @@
return;
}
GSOFeature selFeat0, selFeat1;
- GSOLayer layer0,layer1;
+ GSOLayer layer0, layer1;
globeControl1.Globe.GetSelectObject(0, out selFeat0, out layer0);
globeControl1.Globe.GetSelectObject(1, out selFeat1, out layer1);
@@ -8206,7 +7568,7 @@
private void buttonItemFX3_7_Click(object sender, EventArgs e)
{
NetworkTraceUpDown(true); //上游追踪:
-
+
GSOFeature selLineFeature = globeControl1.Globe.SelectedObject;
if (selLineFeature == null || selLineFeature.Geometry == null || selLineFeature.Geometry.Type != EnumGeometryType.GeoPolyline3D)
{
@@ -8215,7 +7577,7 @@
}
GSOLayer selLayer = globeControl1.Globe.SelectedObjectLayer;
- NetworkAnalysisTool.ExplodeAnalysis(this.globeControl1,selLineFeature,selLayer);
+ NetworkAnalysisTool.ExplodeAnalysis(this.globeControl1, selLineFeature, selLayer);
this.buttonItemFX3_5_Click(sender, e); //关阀分析:
@@ -8442,7 +7804,7 @@
FrmBufferAnalysisBSQ frm = new FrmBufferAnalysisBSQ(globeControl1, layerTemp, bsqPT);
frm.Show(this);
}
-
+
}
///
/// 附属物分析
@@ -8571,7 +7933,7 @@
buttonItemLS5.Checked = false;
globeControl1.Globe.Action = EnumAction3D.MeasureArea;
globeControl1.Globe.AreaRuler.SpaceMeasure = false;
-
+
}
# region Fan 重构标注代码
@@ -8632,14 +7994,14 @@
return;
}
GSOGeoPolyline3D selLine = resFeature.Geometry as GSOGeoPolyline3D;
- if (selLine[0].Count <=1)
+ if (selLine[0].Count <= 1)
{
- return;
+ return;
}
- MarkTools.getInstance().showMarker(resFeature,
+ MarkTools.getInstance().showMarker(resFeature,
globeControl1, EnumMarkLayer.Mark_Depth, "");
-
+
}
///
/// 坐标标注
@@ -9089,7 +8451,7 @@
FrmAPPregion appregion = new FrmAPPregion("拷贝审核");
appregion.Show();
}
-
+
private void buttonItemSPSZ_Click(object sender, EventArgs e)
{
//日志记录
@@ -9241,137 +8603,7 @@
FrmCityServerLineAnalysis frm = new FrmCityServerLineAnalysis(globeControl1, m_PipelineLayerNames);
frm.Show(this);
}
- #region 数据管理-导入文件
- /////
- ///// 数据管理-导入本地坐标系文件
- /////
- /////
- /////
- //private void buttonItemSJGL1_1_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.buttonItemSJGL1_1.Text);
-
- // OpenFileDialog dlg = new OpenFileDialog();
- // dlg.Filter = "矢量数据(*.shp)|*.shp|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|CAD文件(*.dxf)|*.dxf|全部支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft,*.dxf)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft;*.dxf";
- // //dlg.Filter = "支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|其它格式(*.*)|*.*||";
- // dlg.Multiselect = true;
- // if (dlg.ShowDialog() == DialogResult.OK)
- // {
- // //自定义lprj文件名,从程序中复制一lprj文件。
- // int bindex = dlg.FileName.Split('\\').Length;
- // string lastname = dlg.FileName.Split('\\')[bindex - 1];
- // if (lastname.IndexOf(".dxf") != -1)
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".lprj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.lprj");
- // if (!OFInfo.Exists)
- // {
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
- // }
- // else if (lastname.IndexOf(".shp") != -1)//只能对苏州本地坐标系进行纠正
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".prj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.prj");
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
-
- // for (int i = 0; i < dlg.FileNames.Length; i++)
- // {
- // AddLayerData(dlg.FileNames[i]);
- // }
- // layerManagerNode.Expand();
-
-
- // //放大到新导入的图层
- // GSOLayer lyr = globeControl1.Globe.Layers.GetLayerByCaption(newlayername);
- // if (newlayername != "")
- // {
- // GSOFeatures features = lyr.GetAllFeatures();
- // GSORect2d rd = lyr.LatLonBounds;
- // GSOPoint2d rdcenter = rd.Center;
-
- // globeControl1.Globe.JumpToPosition(new GSOPoint3d(rdcenter.X, rdcenter.Y, 0), EnumAltitudeMode.Absolute, 1000);
-
- // globeControl1.Refresh();
- // }
- // }
- //}
-
- /////
- ///// 数据管理-导入其他坐标系文件
- /////
- /////
- /////
- //private void buttonItemSJGL1_2_Click(object sender, EventArgs e)
- //{
- // //日志记录
- // LogManager.saveLog(Utility.userName, this.buttonItemSJGL1_2.Text);
-
- // OpenFileDialog dlg = new OpenFileDialog();
- // dlg.Filter = "矢量数据(*.shp)|*.shp|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|CAD文件(*.dxf)|*.dxf|全部支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft,*.dxf)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft;*.dxf";
- // //dlg.Filter = "支持格式(*.lrp,*.tif,*.img,*.lrc,*.kml,*.lgd,*.shp,*.gft)|*.lrp;*.tif;*.img;*.lrc;*.kml;*.lgd;*.shp;*.gft|栅格数据(*.lrp)|*.lrp|栅格缓存(*.lrc)|*.lrc|KML数据(*.kml)|*.kml|矢量数据(*.lgd)|*.lgd|矢量缓存(*.gft)|*.gft|其它格式(*.*)|*.*||";
- // dlg.Multiselect = true;
- // if (dlg.ShowDialog() == DialogResult.OK)
- // {
- // //自定义lprj文件名,从程序中复制一lprj文件。
- // int bindex = dlg.FileName.Split('\\').Length;
- // string lastname = dlg.FileName.Split('\\')[bindex - 1];
- // if (lastname.IndexOf(".dxf") != -1)
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".lprj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\sz.lprj");
- // if (!OFInfo.Exists)
- // {
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
- // }
- // else if (lastname.IndexOf(".shp") != -1)//只能对苏州本地坐标系进行纠正
- // {
- // string firstname = dlg.FileName.Substring(0, dlg.FileName.Length - lastname.Length);
- // string filename = lastname.Substring(0, lastname.Length - 4) + ".prj";
- // //复制lprj
- // string lprjfilepath = firstname + filename;
- // FileInfo OFInfo = new FileInfo(lprjfilepath);//获取目标文件所在的路径
- // FileInfo SFInfo = new FileInfo(Application.StartupPath + "\\lprj\\xian80.prj");
- // SFInfo.CopyTo(lprjfilepath, true);//将文件复制到指定的路径中
- // }
-
- // for (int i = 0; i < dlg.FileNames.Length; i++)
- // {
- // AddLayerData(dlg.FileNames[i]);
- // }
- // layerManagerNode.Expand();
-
-
- // //放大到新导入的图层
- // GSOLayer lyr = globeControl1.Globe.Layers.GetLayerByCaption(newlayername);
- // if (newlayername != "")
- // {
- // GSOFeatures features = lyr.GetAllFeatures();
- // GSORect2d rd = lyr.LatLonBounds;
- // GSOPoint2d rdcenter = rd.Center;
-
- // globeControl1.Globe.JumpToPosition(new GSOPoint3d(rdcenter.X, rdcenter.Y, 0), EnumAltitudeMode.Absolute, 1000);
-
- // globeControl1.Refresh();
- // }
- // }
- //}
- #endregion
+
///
/// 数据质量检查
///
@@ -9435,9 +8667,9 @@
if (ds == null)
return;
Cyberpipe.Forms.FrmPipelineModelDB frm = new Cyberpipe.Forms.FrmPipelineModelDB(globeControl1, ds);
-
- //frm.Show();
-
+
+ //frm.Show();
+
if (frm.ShowDialog() == DialogResult.OK)
{
addNodeToLayerManagerNode(frm.rukuLayer);
@@ -9578,7 +8810,7 @@
//日志记录
LogManager.saveLog(Utility.userName, this.buttonItemBJ2.Text);
- FrmSetGoalLayer frm = new FrmSetGoalLayer(globeControl1, instrumenLayerNames,"附属物");
+ FrmSetGoalLayer frm = new FrmSetGoalLayer(globeControl1, instrumenLayerNames, "附属物");
if (frm.ShowDialog() == DialogResult.OK)
{
GSOLayer featureAddLayer = TreeNodeFeatureLayer();
@@ -9600,7 +8832,7 @@
//日志记录
LogManager.saveLog(Utility.userName, this.buttonItemBJ3.Text);
- FrmSetGoalLayer frm = new FrmSetGoalLayer(globeControl1, pipefittingLayerNames,"管点");
+ FrmSetGoalLayer frm = new FrmSetGoalLayer(globeControl1, pipefittingLayerNames, "管点");
if (frm.ShowDialog() == DialogResult.OK)
{
GSOLayer featureAddLayer = TreeNodeFeatureLayer();
@@ -9929,7 +9161,7 @@
globeControl1.Globe.Action = EnumAction3D.ActionNull;
}
-
+
public struct LineStruct
{
public string layerName;
@@ -9953,7 +9185,7 @@
featsList.Clear();
lineStruct.Clear();
List listPipelineLayers = new List();
-
+
GSOLayer layer = null;
for (int i = 0; i < m_PipelineLayerNames.Count; i++)
{
@@ -9964,17 +9196,17 @@
}
}
//yanxiaowei 重构
- GSOFeatures selectFeatures=new GSOFeatures();
+ GSOFeatures selectFeatures = new GSOFeatures();
for (int i = 0; i < globeControl1.Globe.SelObjectCount; i++)
{
GSOFeature feature = null;
globeControl1.Globe.GetSelectObject(i, out feature, out layer);
selectFeatures.Add(feature);
}
- DataTable table=new DataTable();
+ DataTable table = new DataTable();
- ClassGSOTool.CalculateRedLineResult(out table, redSH, selectFeatures, globeControl1,
- listPipelineLayers,out lineStruct, out featsList);
+ ClassGSOTool.CalculateRedLineResult(out table, redSH, selectFeatures, globeControl1,
+ listPipelineLayers, out lineStruct, out featsList);
if (table.Rows.Count != 0)
AddDatagridView(table);
@@ -10020,7 +9252,7 @@
ExpEXCEL.ExpToExcel(dataGridViewX1, strSaveFile, "红线审核", lineStruct, featsList);
MessageBox.Show("导出成功!");
}
-
+
private void sliderItem2_ValueChanged(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, this.sliderItem2.Text);
@@ -10058,7 +9290,7 @@
//自定义lprj文件名,从程序中复制一lprj文件。
string filePath = dlg.FileName;
string lastname = Path.GetFileName(filePath);
-
+
for (int i = 0; i < dlg.FileNames.Length; i++)
{
AddLayerData(dlg.FileNames[i]);
@@ -10179,7 +9411,7 @@
#endregion
}
- #endregion
+ #endregion
}
///
/// 定位
@@ -10190,7 +9422,7 @@
{
LogManager.saveLog(Utility.userName, this.buttonItemLocation.Text);
- FrmFlyToPosition fly = new FrmFlyToPosition(globeControl1,globeControl2);
+ FrmFlyToPosition fly = new FrmFlyToPosition(globeControl1, globeControl2);
fly.Show(this);
}
///
@@ -10202,10 +9434,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.FlyToPosition(new GSOPoint3d(120.610963, 31.188121, 50), EnumAltitudeMode.Absolute, -4, 50, 800);
globeControl1.Globe.FlyToPointSpeed = 10000000;
@@ -10241,10 +9473,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.Action = EnumAction3D.ActionNull;
dataGridViewX1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
@@ -10277,10 +9509,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.Action = EnumAction3D.ActionNull;
//zhanshi = false;
@@ -10340,7 +9572,7 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent += new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent += new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
@@ -10377,10 +9609,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.Action = EnumAction3D.ActionNull;
panelOfTable.Visible = false;
@@ -10411,10 +9643,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.Action = EnumAction3D.ActionNull;
panelOfTable.Visible = false;
@@ -10447,10 +9679,10 @@
{
try
{
-
+
globeControl1.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl1_BeforeSceneRenderEvent);
globeControl2.BeforeSceneRenderEvent -= new BeforeSceneRenderEventHandler(globeControl2_BeforeSceneRenderEvent);
-
+
globeControl1.Globe.Action = EnumAction3D.ActionNull;
panelOfTable.Visible = false;
@@ -10487,7 +9719,7 @@
//FrmCompareFeature frmCompareFeature = new FrmCompareFeature(globeControl1, globeControl2, layerTemp, layerTemp2,m_PipelineLayerNames,sgPipeLayersNames);
int width = this.Width;
- FrmCompareFeature.ShowForm(globeControl1, globeControl2, layerTemp, layerTemp2, m_PipelineLayerNames, sgPipeLayersNames,width);
+ FrmCompareFeature.ShowForm(globeControl1, globeControl2, layerTemp, layerTemp2, m_PipelineLayerNames, sgPipeLayersNames, width);
//frmCompareFeature.Location = new Point((this.Width - frmCompareFeature.Width)/2,50);
//frmCompareFeature.Show(this);
@@ -10549,7 +9781,7 @@
private void 标识器分类统计ToolStripMenuItem_Click(object sender, EventArgs e)
{
globeControl1.Globe.Action = EnumAction3D.ActionNull;
- FrmBSQStatis bsqStatis = new FrmBSQStatis(globeControl1,null);
+ FrmBSQStatis bsqStatis = new FrmBSQStatis(globeControl1, null);
//FrmBSQStatis bsqStatis = new FrmBSQStatis();
bsqStatis.Show(this);
}
@@ -10564,230 +9796,6 @@
globeControl1.Globe.Action = EnumAction3D.TrackPolygon;
}
- #region 保存和加载审核库加载的图层
- /*
- private void saveLayerList(TreeNodeCollection treeNodeList)
- {
- string configPath = Application.StartupPath + "\\configLayerList.xml";
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(configPath);
- XmlNode dbParams = doc.SelectSingleNode("Params/dbparams");
- XmlNode dbLayers = doc.SelectSingleNode("Params/dblayers");
- XmlNode layers = doc.SelectSingleNode("Params/layers");
- dbParams.RemoveAll();
- dbLayers.RemoveAll();
- layers.RemoveAll();
-
- List listDS = new List();
- String shDatasourceName = Utility.sgdbip + "/" + Utility.sgdbname + "_" + Utility.sgdbuser;
- bool flag = false;
-
- for (int i = 0; i < globeControl1.Globe.DataManager.DataSourceCount; i++)
- {
- GSODataSource ds = globeControl1.Globe.DataManager.GetDataSourceAt(i);
- if (ds != null && ds.Type == EnumDataSourceType.SqlServer || ds.Type == EnumDataSourceType.Oracle)
- {
- if (ds.Name == shDatasourceName)
- {
- //防止因为多次连接同一个数据库
- if (flag == true)
- {
- break;
- }
- flag = true;
- listDS.Add(ds);
- GSODataSourceCnn conn = ds.GetConnectionInfo();
-
- XmlElement dbparam = doc.CreateElement("shdbparam");
- XmlElement ip = doc.CreateElement("ship");
- ip.InnerText = conn.Server;
-
- XmlElement dbname = doc.CreateElement("shdbname");
- dbname.InnerText = conn.Database;
-
- XmlElement username = doc.CreateElement("shusername");
- username.InnerText = conn.User;
-
- XmlElement password = doc.CreateElement("shpassword");
- password.InnerText = conn.Password;
-
- XmlElement type = doc.CreateElement("shtype");
- if (ds.Type == EnumDataSourceType.SqlServer)
- {
- type.InnerText = "sqlserver";
- }
- else
- {
- type.InnerText = "oracle";
- }
-
- dbparam.AppendChild(ip);
- dbparam.AppendChild(dbname);
- dbparam.AppendChild(username);
- dbparam.AppendChild(password);
- dbparam.AppendChild(type);
- dbParams.AppendChild(dbparam);
- }
-
- }
- }
-
- for (int i = 0; i < treeNodeList.Count; i++)
- {
- GSOLayer layer = treeNodeList[i].Tag as GSOLayer;
- if (Path.GetExtension(layer.Name) == "")
- {
- XmlElement dbLayer = doc.CreateElement("dblayer");
- XmlAttribute attri = doc.CreateAttribute("dbindex");
- for (int j = 0; j < listDS.Count; j++)
- {
- if (layer.Dataset.DataSource.Name == listDS[j].Name)
- {
- attri.Value = j.ToString();
- break;
- }
- }
- dbLayer.Attributes.Append(attri);
- dbLayer.InnerText = layer.Name;
-
- dbLayers.AppendChild(dbLayer);
- }
- else
- {
- XmlElement dbLayer = doc.CreateElement("layer");
- dbLayer.InnerText = layer.Name;
- layers.AppendChild(dbLayer);
- }
- }
-
- doc.Save(configPath);
- }
- catch (Exception e)
- {
-
- }
- }
-
- private void openLayerList()
- {
- layerManagerNode.Nodes.Clear();
-
- string configPath = Application.StartupPath + "\\configLayerList.xml";
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(configPath);
- XmlNode dbParams = doc.SelectSingleNode("Params/dbparams");
- XmlNode dbLayers = doc.SelectSingleNode("Params/dblayers");
- XmlNode layers = doc.SelectSingleNode("Params/layers");
-
- List listDS = new List();
- for (int i = 0; i < dbParams.ChildNodes.Count; i++)
- {
- string ip = "";
- string dbname = "";
- string username = "";
- string password = "";
- string type = "";
- XmlNode node = dbParams.ChildNodes.Item(i);
- for (int j = 0; j < node.ChildNodes.Count; j++)
- {
- XmlNode nodeChild = node.ChildNodes.Item(j);
-
- if (nodeChild != null && nodeChild.Name == "ship")
- {
- ip = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shdbname")
- {
- dbname = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shusername")
- {
- username = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shpassword")
- {
- password = nodeChild.InnerText;
- }
- else if (nodeChild != null && nodeChild.Name == "shtype")
- {
- type = nodeChild.InnerText;
- }
- }
-
- if (type == "sqlserver")
- {
- GSODataSource ds = globeControl1.Globe.DataManager.OpenSqlServerDataSource(ip, "", dbname, username, password);
- listDS.Add(ds);
- }
- else if (type == "oracle")
- {
- GSODataSource ds = globeControl1.Globe.DataManager.OpenOracleDataSource(ip + "/" + dbname, "", "", username, password);
- listDS.Add(ds);
- }
- }
-
- for (int i = 0; i < dbLayers.ChildNodes.Count; i++)
- {
- XmlNode node = dbLayers.ChildNodes.Item(i);
- if (node != null)
- {
- string layerName = node.InnerText;
- XmlAttribute attri = node.Attributes["dbindex"];
- if (attri != null)
- {
- int dbIndex = -1;
- if (int.TryParse(attri.Value, out dbIndex))
- {
- GSODataset dataset = listDS[dbIndex].GetDatasetByName(layerName);
- globeControl1.Globe.Layers.Add(dataset);
- //更新树节点
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerName);
- TreeNode layerNode = new TreeNode();
- layerNode.Tag = layer;
- layerNode.Text = layer.Dataset.Caption;
- layerNode.ImageIndex = 0;
- layerNode.SelectedImageIndex = 0;
- layerNode.Checked = layer.Visible;
- layerManagerNode.Nodes.Insert(0, layerNode);
- // layerManagerNode.Expand();
-
-
- }
- }
- }
- }
- for (int i = 0; i < layers.ChildNodes.Count; i++)
- {
- XmlNode node = layers.ChildNodes.Item(i);
- if (node != null)
- {
- string layerName = node.InnerText;
- globeControl1.Globe.Layers.Add(layerName);
-
- //更新树节点
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(layerName);
- TreeNode layerNode = new TreeNode();
- layerNode.Tag = layer;
- layerNode.Text = layer.Dataset.Caption;
- layerNode.ImageIndex = 0;
- layerNode.SelectedImageIndex = 0;
- layerNode.Checked = layer.Visible;
- layerManagerNode.Nodes.Insert(0, layerNode);
- }
- }
- layerManagerNode.Expand();
- }
- catch (Exception e)
- {
-
- }
- }
- * */
- #endregion
private void btn_check_history_Click(object sender, EventArgs e)
{
@@ -10873,7 +9881,7 @@
frm.ShowDialog();
}
}
-
+
private void btn_user_role_Click(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, this.btn_user_role.Text);
@@ -10918,7 +9926,7 @@
{
this.Cursor = Cursors.Default;
}
-
+
private void buttonItemexp_CAD_Click(object sender, EventArgs e)
{
LogManager.saveLog(Utility.userName, this.buttonItemexp_CAD.Text);
@@ -10956,7 +9964,7 @@
// }
// AddLayerData(strDataPath);
// //globeControl1.Globe.Layers.Add(strDataPath);
-
+
// this.Cursor = Cursors.Default;
// }
// else
@@ -10970,7 +9978,7 @@
// AddLayerData(strDataPath);
// //globeControl1.Globe.Layers.Add(strDataPath);
// }
-
+
//}
//else
//{
@@ -11181,7 +10189,7 @@
lendendGZ24_2.Visible = false;
lendendGZ24_3.Visible = false;
}
- #endregion
+ #endregion
private void buttonItemPasswordReset_Click(object sender, EventArgs e)
{
diff --git a/bin/x86/Debug/Cyberpipe.exe b/bin/x86/Debug/Cyberpipe.exe
index f3be992..33e93f9 100644
--- a/bin/x86/Debug/Cyberpipe.exe
+++ b/bin/x86/Debug/Cyberpipe.exe
Binary files differ
diff --git a/bin/x86/Debug/Cyberpipe.pdb b/bin/x86/Debug/Cyberpipe.pdb
index fa71d60..3963a72 100644
--- a/bin/x86/Debug/Cyberpipe.pdb
+++ b/bin/x86/Debug/Cyberpipe.pdb
Binary files differ
diff --git a/bin/x86/Debug/Cyberpipe.vshost.exe.manifest b/bin/x86/Debug/Cyberpipe.vshost.exe.manifest
new file mode 100644
index 0000000..061c9ca
--- /dev/null
+++ b/bin/x86/Debug/Cyberpipe.vshost.exe.manifest
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+