zoulei 1 gadu atpakaļ
vecāks
revīzija
8d4c8715ae

+ 0 - 2
XdCxRhDW.App/App.config

@@ -11,8 +11,6 @@
 		<add key="Company" value="" />
 		<!--本机IP,没有则由程序自动获取-->
 		<add key="LocalIP" value="" />
-		<!--WMS地图IP-->
-		<add key="WMSIP" value="192.168.1.5:8091" />
 	</appSettings>
 	<startup>
 		<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />

+ 20 - 11
XdCxRhDW.App/ExtensionsDev/GridControlEx.cs

@@ -685,7 +685,7 @@ public static class GridControlEx
                 return showCondition((T)view.GetFocusedRow());
         };
         item.Tag = showConditionAll;
-        item.Events().AddHandler(menuText, new ItemClickEventHandler(async (sender, e) =>
+        var handle = new ItemClickEventHandler(async (sender, e) =>
         {
             if (action != null)
             {
@@ -694,7 +694,9 @@ public static class GridControlEx
                 await action.Invoke((T)view.GetFocusedRow());
                 item.Enabled = true;
             }
-        }));
+        });
+        item.Events().AddHandler(menuText, handle);
+        item.ItemClick += handle;
         item.ImageOptions.SvgImage = meunImage;
         item.Caption = menuText;
         tag.BarM.Items.Add(item);
@@ -733,7 +735,7 @@ public static class GridControlEx
         }
         var popupMenu = tag.PopupMenu;
         BarButtonItem item = new BarButtonItem();
-        item.Events().AddHandler(menuText, new ItemClickEventHandler((sender, e) =>
+        var handle = new ItemClickEventHandler((sender, e) =>
         {
             if (action != null)
             {
@@ -747,7 +749,9 @@ public static class GridControlEx
                 if (list.Any())
                     action.Invoke(list);
             }
-        }));
+        });
+        item.Events().AddHandler(menuText, handle);
+        item.ItemClick += handle;
         item.ImageOptions.SvgImage = meunImage;
         item.Caption = menuText;
         Func<bool> showCondition = () => view.GetSelectedRows().Any();
@@ -785,7 +789,7 @@ public static class GridControlEx
         }
         var popupMenu = tag.PopupMenu;
         BarButtonItem item = new BarButtonItem();
-        item.Events().AddHandler(menuText, new ItemClickEventHandler(async (sender, e) =>
+        var handle = new ItemClickEventHandler(async (sender, e) =>
         {
             if (action != null)
             {
@@ -799,7 +803,9 @@ public static class GridControlEx
                 if (list.Any())
                     await action.Invoke(list);
             }
-        }));
+        });
+        item.Events().AddHandler(menuText, handle);
+        item.ItemClick += handle;
         item.ImageOptions.SvgImage = meunImage;
         item.Caption = menuText;
         Func<bool> showCondition = () => view.GetSelectedRows().Any();
@@ -837,7 +843,7 @@ public static class GridControlEx
         }
         var popupMenu = tag.PopupMenu;
         BarButtonItem item = new BarButtonItem();
-        item.Events().AddHandler(menuText, new ItemClickEventHandler((sender, e) =>
+        var handle = new ItemClickEventHandler((sender, e) =>
         {
             if (action != null)
             {
@@ -847,7 +853,9 @@ public static class GridControlEx
                 action.Invoke(ds);
                 item.Enabled = true;
             }
-        }));
+        });
+        item.Events().AddHandler(menuText, handle);
+        item.ItemClick += handle;
         item.ImageOptions.SvgImage = meunImage;
         item.Caption = menuText;
         tag.BarM.Items.Add(item);
@@ -882,8 +890,7 @@ public static class GridControlEx
         }
         var popupMenu = tag.PopupMenu;
         BarButtonItem item = new BarButtonItem();
-
-        item.Events().AddHandler(menuText, new ItemClickEventHandler(async (sender, e) =>
+        var handle = new ItemClickEventHandler(async (sender, e) =>
         {
             if (action != null)
             {
@@ -893,7 +900,9 @@ public static class GridControlEx
                 await action.Invoke(ds);
                 item.Enabled = true;
             }
-        }));
+        });
+        item.Events().AddHandler(menuText, handle);
+        item.ItemClick += handle;
         item.ImageOptions.SvgImage = meunImage;
         item.Caption = menuText;
         tag.BarM.Items.Add(item);

+ 35 - 35
XdCxRhDW.App/ExtensionsDev/MapControlEx.cs

@@ -842,7 +842,7 @@ public static class MapControlEx
     /// <param name="ctrl"></param>
     /// <param name="url">such as http://192.168.100.63:58089</param>
     /// <returns></returns>
-    public static MapControl UseWMTS(this MapControl ctrl, string url)
+    public static MapControl UseWMTS(this MapControl ctrl, string url,string layerName)
     {
         var provider = new HttpMapDataProvider();
         var tileSource = provider.TileSource as HttpTileSource;
@@ -854,10 +854,10 @@ public static class MapControlEx
     /// 使用WMS图源
     /// </summary>
     /// <param name="ctrl"></param>
-    /// <param name="wmsType"></param>
+    /// <param name="url"></param>
     /// <param name="layerName"></param>
     /// <returns></returns>
-    public static MapControl UseWMS(this MapControl ctrl, EnumWmsType wmsType, string layerName)
+    public static MapControl UseWMS(this MapControl ctrl,string url, string layerName)
     {
         if (ctrl is null)
         {
@@ -872,37 +872,37 @@ public static class MapControlEx
         //{
         //    throw new ArgumentNullException(nameof(layerName));
         //}
-        var wmsIp = ConfigurationManager.AppSettings["WMSIP"].Trim();
-        if (string.IsNullOrEmpty(wmsIp))
-        {
-            throw new ArgumentNullException("请在配置文件中配置WMSIP值");
-        }
-        if (wmsType == EnumWmsType.ZKXT)//中科星图
-        {
-            var provider = new WmsDataProvider();//地图瓦片提供者
-            provider.ServerUri = $"http://{wmsIp}/tilecache/service/wms";
-            if (!string.IsNullOrWhiteSpace(layerName))
-                provider.ActiveLayerName = layerName;
-            provider.CustomParameters.Add("format", "image/JPEG");
-            // provider.CustomParameters.Add("srs", "EPSG:4326");
-            var cs = (GeoMapCoordinateSystem)ctrl.CoordinateSystem;
-            cs.Projection = new EPSG4326Projection();
-            provider.ResponseCapabilities += (sender, e) =>
-            {
-                if (string.IsNullOrWhiteSpace(layerName))
-                    provider.ActiveLayerName = e.Layers[0].Name;
-            };
-            ctrl.GetImageLayer().DataProvider = provider;
-        }
-        else//数据中心、路网
-        {
-            var provider = new HttpMapDataProvider();
-            var tileSource = provider.TileSource as HttpTileSource;
-            tileSource.HttpServerAddr = wmsIp;
-            ctrl.GetImageLayer().DataProvider = provider;
-            ctrl.MinZoomLevel = 3;
-            ctrl.MaxZoomLevel = 20;
-        }
+        //var wmsIp = ConfigurationManager.AppSettings["WMSIP"].Trim();
+        //if (string.IsNullOrEmpty(wmsIp))
+        //{
+        //    throw new ArgumentNullException("请在配置文件中配置WMSIP值");
+        //}
+        //if (wmsType == EnumWmsType.ZKXT)//中科星图
+        //{
+        //    var provider = new WmsDataProvider();//地图瓦片提供者
+        //    provider.ServerUri = $"http://{wmsIp}/tilecache/service/wms";
+        //    if (!string.IsNullOrWhiteSpace(layerName))
+        //        provider.ActiveLayerName = layerName;
+        //    provider.CustomParameters.Add("format", "image/JPEG");
+        //    // provider.CustomParameters.Add("srs", "EPSG:4326");
+        //    var cs = (GeoMapCoordinateSystem)ctrl.CoordinateSystem;
+        //    cs.Projection = new EPSG4326Projection();
+        //    provider.ResponseCapabilities += (sender, e) =>
+        //    {
+        //        if (string.IsNullOrWhiteSpace(layerName))
+        //            provider.ActiveLayerName = e.Layers[0].Name;
+        //    };
+        //    ctrl.GetImageLayer().DataProvider = provider;
+        //}
+        //else//数据中心、路网
+        //{
+        //    var provider = new HttpMapDataProvider();
+        //    var tileSource = provider.TileSource as HttpTileSource;
+        //    tileSource.HttpServerAddr = wmsIp;
+        //    ctrl.GetImageLayer().DataProvider = provider;
+        //    ctrl.MinZoomLevel = 3;
+        //    ctrl.MaxZoomLevel = 20;
+        //}
 
         return ctrl;
     }
@@ -2592,7 +2592,7 @@ public static class MapControlEx
                 {
                     string imgUrl = string.Empty;
                     // imgUrl = $"{HttpServerAddr}/{(int)MapType}/{zoomLevel}/{tilePositionX}/{tilePositionY}";
-                    if (WmsType == EnumWmsType.DataCenter)
+                    if (WmsType == EnumWmsType.SJZX)
                         imgUrl = $"{HttpServerAddr}/MapServer?lyr={layerName}&x={tilePositionX}&y={tilePositionY}&z={zoomLevel}";
                     else
                         imgUrl = $"{HttpServerAddr}/static/Source/Assets/Textures/overlay-final/{zoomLevel}/{tilePositionX}/{-tilePositionY}.png";

+ 65 - 7
XdCxRhDW.App/UserControl/CtrlHome.cs

@@ -40,6 +40,7 @@ using static DevExpress.Utils.Drawing.Helpers.NativeMethods;
 using DevExpress.Utils.Filtering;
 using DevExpress.Data.Svg;
 using DevExpress.Utils.About;
+using XdCxRhDW.App.App.Properties;
 
 namespace XdCxRhDW.App.UserControl
 {
@@ -64,11 +65,11 @@ namespace XdCxRhDW.App.UserControl
             gridHomePosRes.UseDefault(new List<ModelPosRes>()).UseMultiSelect().UseRowNumber().UseNullValueText()
                 .AddRowMenu<ModelPosRes>("绘制时差线", SvgHelper.CreateDtoLine(), DrawDtoLine, item => item.PosResType != EnumPosResType.RH)
                 .AddRowMenuAsync<ModelPosRes>("绘制频差线", SvgHelper.CreateDfoLine(), DrawDfoLine, item => item.PosResType == EnumPosResType.X2Dfo || item.PosResType == EnumPosResType.X3TwoDfo)
-                .AddRowMenuAsync<ModelPosRes>("绘制频差线", SvgHelper.CreateDfoLine(), DrawDfoLine, item => item.PosResType == EnumPosResType.X1D1CX)
+                .AddRowMenuAsync<ModelPosRes>("绘制测向线", SvgHelper.CreateDfoLine(), DrawCxLine, item => item.PosResType == EnumPosResType.X1D1CX || item.PosResType == EnumPosResType.RH)
                 .AddRowMenu<ModelPosRes>("GDOP分析", SvgHelper.CreateGDOP(), DrawGdopLine, item => item.PosResType != EnumPosResType.RH)
                 .AddRowMenu<ModelPosRes>("查看参估", SvgHelper.CreateShowCafRes(), ShowCafRes)
                 .AddRowMenu<ModelPosRes>("查看测向", SvgHelper.CreateShowCxRes(), ShowCxRes)
-                .AddRowMenu<ModelPosRes>("查看检测", SvgHelper.CreateShowCheckRes(), ShowCheckRes)
+                .AddRowMenu<ModelPosRes>("查看检测", SvgHelper.CreateShowCheckRes(), ShowCheckRes, item => item.PosResType == EnumPosResType.X1D1CX || item.PosResType == EnumPosResType.RH)
                 .AddRowMenu<ModelPosRes>("手动定位", SvgHelper.CreatePosManual(), PosManual)
                 .AddContentMenu<ModelPosRes>("重新定位", SvgHelper.CreateRepos(), Repos, true)
                 .UseDeleteAsync<ModelPosRes>(DelPos, "删除记录")
@@ -128,7 +129,12 @@ namespace XdCxRhDW.App.UserControl
             }
             else
             {
-                mapControl1.UseWMS(settings.WMSType.Value, settings.LayerName);
+                if (settings.WMSType == EnumWmsType.ZKXT)
+                    mapControl1.UseWMS(settings.ZKXT_Url, settings.ZKXT_LayerName);
+                else if (settings.WMSType == EnumWmsType.SJZX)
+                    mapControl1.UseWMTS(settings.SJZX_Url, settings.SJZX_LayerName);
+                else
+                    mapControl1.UseWMTS(settings.LW_Url, settings.LW_LayerName);
             }
             gridView1.FocusedRowObjectChanged += GridView1_FocusedRowObjectChanged;
             gridView2.FocusedRowObjectChanged += GridView2_FocusedRowObjectChanged;
@@ -174,12 +180,19 @@ namespace XdCxRhDW.App.UserControl
             WaitHelper.CloseForm();
         }
 
-        private void OnSysSetingsChanged(SysSetings cfg)
+        private void OnSysSetingsChanged(SysSetings settings)
         {
-            if (cfg.MapType == 0)
+            if (settings.MapType == 0)
                 mapControl1.UseLocalDb();
-            else if (cfg.MapType == 1)
-                mapControl1.UseWMS(cfg.WMSType.Value, cfg.LayerName);
+            else
+            {
+                if (settings.WMSType == EnumWmsType.ZKXT)
+                    mapControl1.UseWMS(settings.ZKXT_Url, settings.ZKXT_LayerName);
+                else if (settings.WMSType == EnumWmsType.SJZX)
+                    mapControl1.UseWMTS(settings.SJZX_Url, settings.SJZX_LayerName);
+                else
+                    mapControl1.UseWMTS(settings.LW_Url, settings.LW_LayerName);
+            }
         }
         private void OnPosAdd(ModelPosRes posRes)
         {
@@ -857,6 +870,51 @@ namespace XdCxRhDW.App.UserControl
                     break;
             }
         }
+        private async Task DrawCxLine(ModelPosRes item)
+        {
+            try
+            {
+                CxRes cx;
+                StationRes station;
+                using (RHDWPartContext db = RHDWPartContext.GetContext(item.SigTime))
+                {
+                    cx = await db.CxRes.Where(m => m.ID == item.CxResID.Value).FirstOrDefaultAsync();
+                    station = await db.StationRes.Where(m => m.ID == item.StationResID).FirstOrDefaultAsync();
+                }
+                if (cx == null)
+                {
+                    Serilog.Log.Error($"绘制测向线错误,未找到定位关联的测向信息.PosID={item.ID},SigTime={item.SigTime}");
+                    DxHelper.MsgBoxHelper.ShowError($"未找到定位关联的测向信息");
+                    return;
+                }
+                if (station == null)
+                {
+                    Serilog.Log.Error($"绘制测向线错误,未找到定位关联的站点信息.PosID={item.ID},SigTime={item.SigTime}");
+                    DxHelper.MsgBoxHelper.ShowError($"未找到定位关联的站点信息!");
+                    return;
+                }
+
+                if (station.CxLon == 0 || station.CxLat == 0)
+                {
+                    Serilog.Log.Error($"绘制测向线错误,测向站信息为空.PosID={item.ID},SigTime={item.SigTime}");
+                    DxHelper.MsgBoxHelper.ShowError($"测向站信息为空!");
+                    return;
+                }
+                double deg = cx.Fx;//向北顺时针方向为夹角
+                //计算测向站到定位点之间的距离
+                var km = MapControlEx.CalcLineKm(station.CxLon.Value, station.CxLat.Value, item.PosLon, item.PosLat);
+                var endpoint = MapControlEx.CalcSituation(station.CxLon.Value, station.CxLat.Value, deg, (km + 100) * 1000);
+                List<(double, double)> points = new List<(double, double)>();
+                points.Add((station.CxLon.Value, station.CxLat.Value));
+                points.Add((endpoint.Item1, endpoint.Item2));
+                mapControl1.DrawCXLine($"测向线角度:{cx.Fx}°\t\n", points, true);
+            }
+            catch (Exception ex)
+            {
+                Serilog.Log.Error(ex, $"绘制测向线失败.PosID={item.ID},SigTime={item.SigTime}");
+                DxHelper.MsgBoxHelper.ShowWarning($"绘制测向线失败");
+            }
+        }
         //绘制GDOP
         public void DrawGdopLine(ModelPosRes item)
         {

+ 105 - 70
XdCxRhDW.App/UserControl/CtrlSysSettings.Designer.cs

@@ -29,11 +29,11 @@ namespace XdCxRhDW.App.UserControl
         /// </summary>
         private void InitializeComponent()
         {
-            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions2 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject();
             this.tablePanel1 = new DevExpress.Utils.Layout.TablePanel();
             this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
             this.txtMapType = new DevExpress.XtraEditors.RadioGroup();
@@ -42,17 +42,19 @@ namespace XdCxRhDW.App.UserControl
             this.txtXLDirectory = new DevExpress.XtraEditors.TextEdit();
             this.txtYDPZThreshold = new DevExpress.XtraEditors.ButtonEdit();
             this.txtLayer = new DevExpress.XtraEditors.TextEdit();
+            this.txtWMSType = new DevExpress.XtraEditors.ImageComboBoxEdit();
             this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
             this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.itemLayer = new DevExpress.XtraLayout.LayoutControlItem();
+            this.itemMapLayer = new DevExpress.XtraLayout.LayoutControlItem();
             this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
             this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem();
-            this.itemUrl = new DevExpress.XtraLayout.LayoutControlItem();
-            this.txtWMSType = new DevExpress.XtraEditors.ImageComboBoxEdit();
+            this.itemMapSource = new DevExpress.XtraLayout.LayoutControlItem();
+            this.txtUrl = new DevExpress.XtraEditors.TextEdit();
+            this.itemMapUrl = new DevExpress.XtraLayout.LayoutControlItem();
             ((System.ComponentModel.ISupportInitialize)(this.tablePanel1)).BeginInit();
             this.tablePanel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
@@ -62,17 +64,19 @@ namespace XdCxRhDW.App.UserControl
             ((System.ComponentModel.ISupportInitialize)(this.txtXLDirectory.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtYDPZThreshold.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtLayer.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtWMSType.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.itemLayer)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.itemMapLayer)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.itemUrl)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtWMSType.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.itemMapSource)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtUrl.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.itemMapUrl)).BeginInit();
             this.SuspendLayout();
             // 
             // tablePanel1
@@ -87,9 +91,9 @@ namespace XdCxRhDW.App.UserControl
             this.tablePanel1.Name = "tablePanel1";
             this.tablePanel1.Rows.AddRange(new DevExpress.Utils.Layout.TablePanelRow[] {
             new DevExpress.Utils.Layout.TablePanelRow(DevExpress.Utils.Layout.TablePanelEntityStyle.Relative, 1F),
-            new DevExpress.Utils.Layout.TablePanelRow(DevExpress.Utils.Layout.TablePanelEntityStyle.Absolute, 370F),
+            new DevExpress.Utils.Layout.TablePanelRow(DevExpress.Utils.Layout.TablePanelEntityStyle.Absolute, 420F),
             new DevExpress.Utils.Layout.TablePanelRow(DevExpress.Utils.Layout.TablePanelEntityStyle.Relative, 1F)});
-            this.tablePanel1.Size = new System.Drawing.Size(690, 443);
+            this.tablePanel1.Size = new System.Drawing.Size(779, 586);
             this.tablePanel1.TabIndex = 0;
             this.tablePanel1.UseSkinIndents = true;
             // 
@@ -103,13 +107,14 @@ namespace XdCxRhDW.App.UserControl
             this.layoutControl1.Controls.Add(this.txtYDPZThreshold);
             this.layoutControl1.Controls.Add(this.txtLayer);
             this.layoutControl1.Controls.Add(this.txtWMSType);
+            this.layoutControl1.Controls.Add(this.txtUrl);
             this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.layoutControl1.Location = new System.Drawing.Point(147, 38);
+            this.layoutControl1.Location = new System.Drawing.Point(192, 85);
             this.layoutControl1.Name = "layoutControl1";
             this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(941, 140, 650, 400);
             this.layoutControl1.Root = this.Root;
             this.tablePanel1.SetRow(this.layoutControl1, 1);
-            this.layoutControl1.Size = new System.Drawing.Size(396, 366);
+            this.layoutControl1.Size = new System.Drawing.Size(396, 416);
             this.layoutControl1.TabIndex = 0;
             this.layoutControl1.Text = "layoutControl1";
             // 
@@ -128,7 +133,7 @@ namespace XdCxRhDW.App.UserControl
             // 
             // btnSave
             // 
-            this.btnSave.Location = new System.Drawing.Point(137, 319);
+            this.btnSave.Location = new System.Drawing.Point(137, 372);
             this.btnSave.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.btnSave.MaximumSize = new System.Drawing.Size(0, 22);
             this.btnSave.MinimumSize = new System.Drawing.Size(0, 22);
@@ -165,7 +170,7 @@ namespace XdCxRhDW.App.UserControl
             this.txtYDPZThreshold.Name = "txtYDPZThreshold";
             this.txtYDPZThreshold.Properties.AutoHeight = false;
             this.txtYDPZThreshold.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.txtYDPZThreshold.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.txtYDPZThreshold.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
             this.txtYDPZThreshold.Properties.MaskSettings.Set("mask", "f0");
@@ -175,13 +180,25 @@ namespace XdCxRhDW.App.UserControl
             // 
             // txtLayer
             // 
-            this.txtLayer.Location = new System.Drawing.Point(12, 285);
+            this.txtLayer.Location = new System.Drawing.Point(12, 338);
             this.txtLayer.Name = "txtLayer";
             this.txtLayer.Properties.AutoHeight = false;
             this.txtLayer.Size = new System.Drawing.Size(372, 22);
             this.txtLayer.StyleController = this.layoutControl1;
             this.txtLayer.TabIndex = 10;
             // 
+            // txtWMSType
+            // 
+            this.txtWMSType.Location = new System.Drawing.Point(12, 238);
+            this.txtWMSType.Name = "txtWMSType";
+            this.txtWMSType.Properties.AutoHeight = false;
+            this.txtWMSType.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.txtWMSType.Size = new System.Drawing.Size(372, 22);
+            this.txtWMSType.StyleController = this.layoutControl1;
+            this.txtWMSType.TabIndex = 7;
+            this.txtWMSType.ToolTip = "支持瓦片数据和wms";
+            // 
             // Root
             // 
             this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
@@ -192,22 +209,23 @@ namespace XdCxRhDW.App.UserControl
             this.layoutControlItem5,
             this.layoutControlItem1,
             this.layoutControlItem8,
-            this.itemLayer,
+            this.itemMapLayer,
             this.emptySpaceItem1,
             this.emptySpaceItem2,
-            this.itemUrl});
+            this.itemMapSource,
+            this.itemMapUrl});
             this.Root.Name = "Root";
-            this.Root.Size = new System.Drawing.Size(396, 366);
+            this.Root.Size = new System.Drawing.Size(396, 416);
             this.Root.TextVisible = false;
             // 
             // layoutControlItem3
             // 
             this.layoutControlItem3.Control = this.btnSave;
-            this.layoutControlItem3.Location = new System.Drawing.Point(125, 299);
+            this.layoutControlItem3.Location = new System.Drawing.Point(125, 352);
             this.layoutControlItem3.MinSize = new System.Drawing.Size(36, 26);
             this.layoutControlItem3.Name = "layoutControlItem3";
             this.layoutControlItem3.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 10, 2);
-            this.layoutControlItem3.Size = new System.Drawing.Size(125, 47);
+            this.layoutControlItem3.Size = new System.Drawing.Size(125, 44);
             this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem3.TextVisible = false;
@@ -272,61 +290,74 @@ namespace XdCxRhDW.App.UserControl
             this.layoutControlItem8.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem8.TextSize = new System.Drawing.Size(96, 14);
             // 
-            // itemLayer
+            // itemMapLayer
             // 
-            this.itemLayer.Control = this.txtLayer;
-            this.itemLayer.Location = new System.Drawing.Point(0, 249);
-            this.itemLayer.MinSize = new System.Drawing.Size(50, 25);
-            this.itemLayer.Name = "itemLayer";
-            this.itemLayer.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 9, 2);
-            this.itemLayer.Size = new System.Drawing.Size(376, 50);
-            this.itemLayer.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.itemLayer.Text = "地图图层名称";
-            this.itemLayer.TextLocation = DevExpress.Utils.Locations.Top;
-            this.itemLayer.TextSize = new System.Drawing.Size(96, 14);
-            this.itemLayer.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+            this.itemMapLayer.Control = this.txtLayer;
+            this.itemMapLayer.Location = new System.Drawing.Point(0, 302);
+            this.itemMapLayer.MaxSize = new System.Drawing.Size(0, 50);
+            this.itemMapLayer.MinSize = new System.Drawing.Size(100, 50);
+            this.itemMapLayer.Name = "itemMapLayer";
+            this.itemMapLayer.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 9, 2);
+            this.itemMapLayer.Size = new System.Drawing.Size(376, 50);
+            this.itemMapLayer.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            this.itemMapLayer.Text = "图层名称";
+            this.itemMapLayer.TextLocation = DevExpress.Utils.Locations.Top;
+            this.itemMapLayer.TextSize = new System.Drawing.Size(96, 14);
             // 
             // emptySpaceItem1
             // 
             this.emptySpaceItem1.AllowHotTrack = false;
-            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 299);
+            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 352);
             this.emptySpaceItem1.Name = "emptySpaceItem1";
-            this.emptySpaceItem1.Size = new System.Drawing.Size(125, 47);
+            this.emptySpaceItem1.Size = new System.Drawing.Size(125, 44);
             this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
             // 
             // emptySpaceItem2
             // 
             this.emptySpaceItem2.AllowHotTrack = false;
-            this.emptySpaceItem2.Location = new System.Drawing.Point(250, 299);
+            this.emptySpaceItem2.Location = new System.Drawing.Point(250, 352);
             this.emptySpaceItem2.Name = "emptySpaceItem2";
-            this.emptySpaceItem2.Size = new System.Drawing.Size(126, 47);
+            this.emptySpaceItem2.Size = new System.Drawing.Size(126, 44);
             this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
             // 
-            // itemUrl
-            // 
-            this.itemUrl.Control = this.txtWMSType;
-            this.itemUrl.Location = new System.Drawing.Point(0, 199);
-            this.itemUrl.MinSize = new System.Drawing.Size(50, 25);
-            this.itemUrl.Name = "itemUrl";
-            this.itemUrl.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 9, 2);
-            this.itemUrl.Size = new System.Drawing.Size(376, 50);
-            this.itemUrl.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.itemUrl.Text = "行政图类型";
-            this.itemUrl.TextLocation = DevExpress.Utils.Locations.Top;
-            this.itemUrl.TextSize = new System.Drawing.Size(96, 14);
-            this.itemUrl.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
-            // 
-            // txtWMSType
-            // 
-            this.txtWMSType.Location = new System.Drawing.Point(12, 235);
-            this.txtWMSType.Name = "txtWMSType";
-            this.txtWMSType.Properties.AutoHeight = false;
-            this.txtWMSType.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
-            this.txtWMSType.Size = new System.Drawing.Size(372, 22);
-            this.txtWMSType.StyleController = this.layoutControl1;
-            this.txtWMSType.TabIndex = 7;
-            this.txtWMSType.ToolTip = "支持瓦片数据和wms";
+            // itemMapSource
+            // 
+            this.itemMapSource.Control = this.txtWMSType;
+            this.itemMapSource.Location = new System.Drawing.Point(0, 199);
+            this.itemMapSource.MaxSize = new System.Drawing.Size(0, 53);
+            this.itemMapSource.MinSize = new System.Drawing.Size(50, 53);
+            this.itemMapSource.Name = "itemMapSource";
+            this.itemMapSource.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
+            this.itemMapSource.Size = new System.Drawing.Size(376, 53);
+            this.itemMapSource.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            this.itemMapSource.Text = "地图来源";
+            this.itemMapSource.TextLocation = DevExpress.Utils.Locations.Top;
+            this.itemMapSource.TextSize = new System.Drawing.Size(96, 14);
+            // 
+            // txtUrl
+            // 
+            this.txtUrl.Location = new System.Drawing.Point(12, 288);
+            this.txtUrl.Name = "txtUrl";
+            this.txtUrl.Properties.AutoHeight = false;
+            this.txtUrl.Size = new System.Drawing.Size(372, 22);
+            this.txtUrl.StyleController = this.layoutControl1;
+            this.txtUrl.TabIndex = 10;
+            // 
+            // itemMapUrl
+            // 
+            this.itemMapUrl.Control = this.txtUrl;
+            this.itemMapUrl.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
+            this.itemMapUrl.CustomizationFormText = "图层名称";
+            this.itemMapUrl.Location = new System.Drawing.Point(0, 252);
+            this.itemMapUrl.MaxSize = new System.Drawing.Size(0, 50);
+            this.itemMapUrl.MinSize = new System.Drawing.Size(100, 50);
+            this.itemMapUrl.Name = "itemMapUrl";
+            this.itemMapUrl.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 9, 2);
+            this.itemMapUrl.Size = new System.Drawing.Size(376, 50);
+            this.itemMapUrl.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            this.itemMapUrl.Text = "地图URL";
+            this.itemMapUrl.TextLocation = DevExpress.Utils.Locations.Top;
+            this.itemMapUrl.TextSize = new System.Drawing.Size(96, 14);
             // 
             // CtrlSysSettings
             // 
@@ -334,7 +365,7 @@ namespace XdCxRhDW.App.UserControl
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.Controls.Add(this.tablePanel1);
             this.Name = "CtrlSysSettings";
-            this.Size = new System.Drawing.Size(690, 443);
+            this.Size = new System.Drawing.Size(779, 586);
             this.Load += new System.EventHandler(this.CtrlSysSettings_Load);
             ((System.ComponentModel.ISupportInitialize)(this.tablePanel1)).EndInit();
             this.tablePanel1.ResumeLayout(false);
@@ -345,17 +376,19 @@ namespace XdCxRhDW.App.UserControl
             ((System.ComponentModel.ISupportInitialize)(this.txtXLDirectory.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtYDPZThreshold.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtLayer.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtWMSType.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.itemLayer)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.itemMapLayer)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.itemUrl)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtWMSType.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.itemMapSource)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtUrl.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.itemMapUrl)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -371,15 +404,17 @@ namespace XdCxRhDW.App.UserControl
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
         private DevExpress.XtraEditors.TextEdit txtXLDirectory;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
-        private DevExpress.XtraLayout.LayoutControlItem itemUrl;
+        private DevExpress.XtraLayout.LayoutControlItem itemMapSource;
         private DevExpress.XtraEditors.ButtonEdit txtYDPZThreshold;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
         private DevExpress.XtraEditors.RadioGroup txtMapType;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
-        private DevExpress.XtraLayout.LayoutControlItem itemLayer;
+        private DevExpress.XtraLayout.LayoutControlItem itemMapLayer;
         private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
         private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2;
         private DevExpress.XtraEditors.TextEdit txtLayer;
         private DevExpress.XtraEditors.ImageComboBoxEdit txtWMSType;
+        private DevExpress.XtraEditors.TextEdit txtUrl;
+        private DevExpress.XtraLayout.LayoutControlItem itemMapUrl;
     }
 }

+ 27 - 29
XdCxRhDW.App/UserControl/CtrlSysSettings.cs

@@ -37,7 +37,6 @@ namespace XdCxRhDW.App.UserControl
         {
             try
             {
-                txtWMSType.Properties.Items.Add(new ImageComboBoxItem("请选择", null, -1));
                 txtWMSType.Properties.Items.AddEnum<EnumWmsType>();
                 using (RHDWContext db = new RHDWContext())
                 {
@@ -47,11 +46,10 @@ namespace XdCxRhDW.App.UserControl
                         this.txtHttpPort.Text = res.HttpPort.ToString();
                         if (!string.IsNullOrEmpty(res.XLDirectory))
                             this.txtXLDirectory.Text = res.XLDirectory.ToString();
-                        if (res.WMSType != null)
-                            this.txtWMSType.EditValue = res.WMSType;
+                        this.txtWMSType.EditValue = res.WMSType;
                         if (res.YDPZThreshold > 0)
                             this.txtYDPZThreshold.Text = res.YDPZThreshold.ToString();
-                        this.txtLayer.Text = res.LayerName;
+                        //this.txtLayer.Text = res.LayerName;
                         if (this.txtMapType.SelectedIndex == res.MapType)
                         {
                             txtMapType_SelectedIndexChanged(null, null);
@@ -94,16 +92,16 @@ namespace XdCxRhDW.App.UserControl
                         resNull.XLDirectory = txtXLDirectory.Text;
                         resNull.YDPZThreshold = string.IsNullOrWhiteSpace(txtYDPZThreshold.Text) ? 0 : Convert.ToInt32(txtYDPZThreshold.Text);
                         resNull.MapType = txtMapType.SelectedIndex;
-                        if (txtMapType.SelectedIndex == 0)
-                        {
-                            resNull.WMSType = null;
-                            resNull.LayerName = null;
-                        }
-                        else
-                        {
-                            resNull.WMSType = (EnumWmsType)txtWMSType.EditValue;
-                            resNull.LayerName = txtLayer.Text;
-                        }
+                        //if (txtMapType.SelectedIndex == 0)
+                        //{
+                        //    resNull.WMSType = null;
+                        //    resNull.LayerName = null;
+                        //}
+                        //else
+                        //{
+                        //    resNull.WMSType = (EnumWmsType)txtWMSType.EditValue;
+                        //    resNull.LayerName = txtLayer.Text;
+                        //}
 
                         db.SysSetings.Add(resNull);
                         needStartHttpSvr = true;
@@ -115,16 +113,16 @@ namespace XdCxRhDW.App.UserControl
                         res.XLDirectory = txtXLDirectory.Text;
                         res.YDPZThreshold = string.IsNullOrWhiteSpace(txtYDPZThreshold.Text) ? 0 : Convert.ToInt32(txtYDPZThreshold.Text);
                         res.MapType = txtMapType.SelectedIndex;
-                        if (txtMapType.SelectedIndex == 0)
-                        {
-                            res.WMSType = null;
-                            res.LayerName = null;
-                        }
-                        else
-                        {
-                            res.WMSType = (EnumWmsType)txtWMSType.EditValue;
-                            res.LayerName = txtLayer.Text;
-                        }
+                        //if (txtMapType.SelectedIndex == 0)
+                        //{
+                        //    res.WMSType = null;
+                        //    res.LayerName = null;
+                        //}
+                        //else
+                        //{
+                        //    res.WMSType = (EnumWmsType)txtWMSType.EditValue;
+                        //    res.LayerName = txtLayer.Text;
+                        //}
                     }
 
                     await db.SaveChangesAsync();
@@ -171,14 +169,14 @@ namespace XdCxRhDW.App.UserControl
         {
             if (txtMapType.SelectedIndex == 0)
             {
-                itemUrl.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
-                itemLayer.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+                itemMapSource.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+                itemMapLayer.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
             }
             else
             {
-                itemUrl.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
-                itemUrl.Text = "WMS地址";
-                itemLayer.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
+                itemMapSource.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
+                itemMapSource.Text = "WMS地址";
+                itemMapLayer.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
             }
             layoutControl1.BestFit();
         }

+ 8 - 0
XdCxRhDW.App/XdCxRhDW.App.csproj

@@ -58,6 +58,7 @@
     <ApplicationIcon>定位.ico</ApplicationIcon>
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="Accessibility" />
     <Reference Include="DevExpress.BonusSkins.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
     <Reference Include="DevExpress.Charts.v23.2.Core, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
     <Reference Include="DevExpress.Data.Desktop.v23.2" />
@@ -108,9 +109,11 @@
     <Reference Include="System.ComponentModel.DataAnnotations" />
     <Reference Include="System.Configuration" />
     <Reference Include="System.Core" />
+    <Reference Include="System.Data.Linq" />
     <Reference Include="System.Data.SQLite, Version=1.0.118.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
       <HintPath>..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.118.0\lib\net46\System.Data.SQLite.dll</HintPath>
     </Reference>
+    <Reference Include="System.Deployment" />
     <Reference Include="System.Management" />
     <Reference Include="Microsoft.CSharp" />
     <Reference Include="System.Data" />
@@ -122,12 +125,17 @@
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\System.Net.Http.Formatting.dll</HintPath>
     </Reference>
+    <Reference Include="System.Runtime.Serialization" />
+    <Reference Include="System.Runtime.Serialization.Formatters.Soap" />
+    <Reference Include="System.Security" />
+    <Reference Include="System.Transactions" />
     <Reference Include="System.Web.Extensions" />
     <Reference Include="System.Web.Http">
       <HintPath>..\System.Web.Http.dll</HintPath>
     </Reference>
     <Reference Include="System.Windows.Forms" />
     <Reference Include="System.Xml" />
+    <Reference Include="System.Xml.Linq" />
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Basic\BaseVm.cs" />

+ 1 - 1
XdCxRhDW.Entity/EntityEnum.cs

@@ -131,7 +131,7 @@ namespace XdCxRhDW.Entity
         /// 数据中心
         /// </summary>
         [Display(Name = "数据中心")]
-        DataCenter,
+        SJZX,
         /// <summary>
         /// 路网
         /// </summary>

+ 14 - 7
XdCxRhDW.Entity/SysSetings.cs

@@ -20,15 +20,22 @@ namespace XdCxRhDW.Entity
         /// 地图类型.本地地图=0,WMS=1
         /// </summary>
         public int MapType { get; set; }
-
+        
         /// <summary>
-        /// 图源地址
+        /// 选中的WMS类型.(MapType=1时候有效)
         /// </summary>
-        public EnumWmsType? WMSType { get; set; }
+        public EnumWmsType WMSType { get; set; }
 
-        /// <summary>
-        /// 瓦片
-        /// </summary>
-        public string LayerName { get; set; }
+        public string ZKXT_Url { get; set; }
+
+        public string ZKXT_LayerName { get; set; }
+
+        public string SJZX_Url { get; set; }
+
+        public string SJZX_LayerName { get; set; }
+
+        public string LW_Url { get; set; }
+
+        public string LW_LayerName { get; set; }
     }
 }

+ 1 - 1
XdCxRhDW.Sender/Form1.cs

@@ -22,7 +22,7 @@ namespace XdCxRhDW.Sender
         public Form1()
         {
             InitializeComponent();
-            this.IconOptions.SvgImage = SvgHelper.LoadFromFile("Service.svg");
+            this.IconOptions.SvgImage = DxHelper.SvgHelper.LoadFromFile("Service.svg");
         }
         CancellationTokenSource cts1;
         private async void btn1_Click(object sender, EventArgs e)

+ 3 - 0
XdCxRhDW.Sender/XdCxRhDW.Sender.csproj

@@ -83,6 +83,9 @@
     <Compile Include="..\XdCxRhDW.App\DxHelper\MsgBoxHelper.cs">
       <Link>MsgBoxHelper.cs</Link>
     </Compile>
+    <Compile Include="..\XdCxRhDW.App\DxHelper\SvgHelper.cs">
+      <Link>SvgHelper.cs</Link>
+    </Compile>
     <Compile Include="ColorRGB.cs" />
     <Compile Include="Form1.cs">
       <SubType>Form</SubType>

+ 1 - 1
XdCxRhDW.X2D1TaskServer/MainForm.cs

@@ -18,7 +18,7 @@ namespace XdCxRhDW.X2D1TaskServer
             gridLog.UseDefault(list).UseExportCsv().UseClear<LogInfo>();
             gridView1.Columns[0].MaxWidth = 150;
             gridView1.Columns[1].MaxWidth = 120;
-            this.IconOptions.SvgImage = SvgHelper.LoadFromFile("Service.svg");
+            this.IconOptions.SvgImage = DxHelper.SvgHelper.LoadFromFile("Service.svg");
             LogHelper.Logger = info =>
             {
                 list.Insert(0, info);

+ 1 - 1
XdCxRhDW.X2D1TaskServer54/MainForm.cs

@@ -17,7 +17,7 @@ namespace XdCxRhDW.X2D1TaskServer54
             gridLog.UseDefault(list).UseExportCsv().UseClear<LogInfo>();
             gridView1.Columns[0].MaxWidth = 150;
             gridView1.Columns[1].MaxWidth = 120;
-            this.IconOptions.SvgImage = SvgHelper.LoadFromFile("Service.svg");
+            this.IconOptions.SvgImage = DxHelper.SvgHelper.LoadFromFile("Service.svg");
             LogHelper.Logger = info =>
             {
                 list.Insert(0, info);