zoulei 1 year ago
parent
commit
91c3666e13

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

@@ -845,7 +845,7 @@ public static class MapControlEx
     }
     private static void RemoveWmtsLyaer(MapControl ctrl)
     {
-        var layers = ctrl.Layers.Where(p => p.Name.StartsWith("WMTS:"));
+        var layers = ctrl.Layers.Where(p => p.Name.StartsWith("WMTS:")).ToList();
         foreach (var item in layers)
         {
             ctrl.Layers.Remove(item);

+ 6 - 6
XdCxRhDW.App/MainForm.Designer.cs

@@ -28,10 +28,11 @@
         /// </summary>
         private void InitializeComponent()
         {
+            this.components = new System.ComponentModel.Container();
             this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
-            DevExpress.Utils.SuperToolTip superToolTip1 = new DevExpress.Utils.SuperToolTip();
-            DevExpress.Utils.ToolTipItem toolTipItem1 = new DevExpress.Utils.ToolTipItem();
+            DevExpress.Utils.SuperToolTip superToolTip5 = new DevExpress.Utils.SuperToolTip();
+            DevExpress.Utils.ToolTipItem toolTipItem5 = new DevExpress.Utils.ToolTipItem();
             this.ribbon = new DevExpress.XtraBars.Ribbon.RibbonControl();
             this.skinPaletteDropDownButtonItem1 = new DevExpress.XtraBars.SkinPaletteDropDownButtonItem();
             this.btnOpenApi = new DevExpress.XtraBars.BarButtonItem();
@@ -112,9 +113,9 @@
             this.btnOpenApi.Id = 21;
             this.btnOpenApi.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnOpenApi.ImageOptions.SvgImage")));
             this.btnOpenApi.Name = "btnOpenApi";
-            toolTipItem1.Text = "查看接口文档";
-            superToolTip1.Items.Add(toolTipItem1);
-            this.btnOpenApi.SuperTip = superToolTip1;
+            toolTipItem5.Text = "查看接口文档";
+            superToolTip5.Items.Add(toolTipItem5);
+            this.btnOpenApi.SuperTip = superToolTip5;
             this.btnOpenApi.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btnOpenApi_ItemClick);
             // 
             // btnTask
@@ -302,7 +303,6 @@
             this.IsMdiContainer = true;
             this.Name = "MainForm";
             this.Ribbon = this.ribbon;
-            this.Text = "多模式融合定位平台";
             this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
             this.Load += new System.EventHandler(this.MainForm_Load);
             ((System.ComponentModel.ISupportInitialize)(this.ribbon)).EndInit();

+ 15 - 0
XdCxRhDW.App/MainForm.cs

@@ -54,8 +54,23 @@ namespace XdCxRhDW
             btn_ItemClick(null, null);
             ServerContext.Instance.Init();
         }
+        private string text;
         private async void MainForm_Load(object sender, EventArgs e)
         {
+            this.text = this.Text;
+            this.HtmlText = $"<size=12>{this.text}";
+            using (RHDWContext db = new RHDWContext())
+            {
+               var settings = await db.SysSetings.FirstOrDefaultAsync();
+                if (settings != null)
+                {
+                    this.HtmlText = $"<size=12>{text}(<size=9>{settings.TimeZoneDisplayName}</size>)";
+                }
+            }
+            Messenger.Defalut.Sub<SysSetings>("时区改变", settings=>
+            {
+                this.HtmlText = $"<size=12>{text}(<size=9>{settings.TimeZoneDisplayName}</size>)";
+            });
             _ = XlScan();
             _ = XlClear();
             await XlLonCalc();

+ 1 - 1
XdCxRhDW.App/UserControl/CtrlHome.cs

@@ -122,7 +122,7 @@ namespace XdCxRhDW.App.UserControl
                 if (settings == null)
                 {
                     mapControl1.UseLocalDb();
-                    DxHelper.MsgBoxHelper.ShowWarning($"请在系统设置中配置IP端口信息");
+                    DxHelper.MsgBoxHelper.ShowWarning($"请在系统设置中配置基础信息");
                     return;
                 }
                 try

+ 94 - 48
XdCxRhDW.App/UserControl/CtrlSysSettings.Designer.cs

@@ -29,13 +29,15 @@ namespace XdCxRhDW.App.UserControl
         /// </summary>
         private void InitializeComponent()
         {
-            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.components = new System.ComponentModel.Container();
+            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();
             this.tablePanel1 = new DevExpress.Utils.Layout.TablePanel();
             this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
+            this.txtTimeZone = new DevExpress.XtraScheduler.UI.TimeZoneEdit();
             this.txtLayer = new DevExpress.XtraEditors.CheckedListBoxControl();
             this.txtMapType = new DevExpress.XtraEditors.RadioGroup();
             this.btnSave = new DevExpress.XtraEditors.SimpleButton();
@@ -43,6 +45,7 @@ namespace XdCxRhDW.App.UserControl
             this.txtXLDirectory = new DevExpress.XtraEditors.TextEdit();
             this.txtYDPZThreshold = new DevExpress.XtraEditors.ButtonEdit();
             this.txtWmtsSource = new DevExpress.XtraEditors.RadioGroup();
+            this.toolTipController1 = new DevExpress.Utils.ToolTipController(this.components);
             this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
             this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
@@ -53,10 +56,12 @@ namespace XdCxRhDW.App.UserControl
             this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem();
             this.itemWmtsSource = new DevExpress.XtraLayout.LayoutControlItem();
             this.itemMapLayer = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
             ((System.ComponentModel.ISupportInitialize)(this.tablePanel1)).BeginInit();
             this.tablePanel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.txtTimeZone.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtLayer)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtMapType.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtHttpPort.Properties)).BeginInit();
@@ -73,6 +78,7 @@ namespace XdCxRhDW.App.UserControl
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.itemWmtsSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.itemMapLayer)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
             this.SuspendLayout();
             // 
             // tablePanel1
@@ -87,15 +93,16 @@ 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, 374F),
+            new DevExpress.Utils.Layout.TablePanelRow(DevExpress.Utils.Layout.TablePanelEntityStyle.Absolute, 450F),
             new DevExpress.Utils.Layout.TablePanelRow(DevExpress.Utils.Layout.TablePanelEntityStyle.Relative, 1F)});
-            this.tablePanel1.Size = new System.Drawing.Size(599, 466);
+            this.tablePanel1.Size = new System.Drawing.Size(619, 527);
             this.tablePanel1.TabIndex = 0;
             this.tablePanel1.UseSkinIndents = true;
             // 
             // layoutControl1
             // 
             this.tablePanel1.SetColumn(this.layoutControl1, 1);
+            this.layoutControl1.Controls.Add(this.txtTimeZone);
             this.layoutControl1.Controls.Add(this.txtLayer);
             this.layoutControl1.Controls.Add(this.txtMapType);
             this.layoutControl1.Controls.Add(this.btnSave);
@@ -104,31 +111,44 @@ namespace XdCxRhDW.App.UserControl
             this.layoutControl1.Controls.Add(this.txtYDPZThreshold);
             this.layoutControl1.Controls.Add(this.txtWmtsSource);
             this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.layoutControl1.Location = new System.Drawing.Point(102, 48);
+            this.layoutControl1.Location = new System.Drawing.Point(112, 40);
             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, 370);
+            this.layoutControl1.Size = new System.Drawing.Size(396, 446);
             this.layoutControl1.TabIndex = 0;
             this.layoutControl1.Text = "layoutControl1";
             // 
+            // txtTimeZone
+            // 
+            this.txtTimeZone.Location = new System.Drawing.Point(12, 29);
+            this.txtTimeZone.Name = "txtTimeZone";
+            this.txtTimeZone.Properties.AutoHeight = false;
+            this.txtTimeZone.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.txtTimeZone.Size = new System.Drawing.Size(372, 22);
+            this.txtTimeZone.StyleController = this.layoutControl1;
+            this.txtTimeZone.TabIndex = 13;
+            // 
             // txtLayer
             // 
+            this.txtLayer.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
             this.txtLayer.CheckOnClick = true;
-            this.txtLayer.Location = new System.Drawing.Point(12, 296);
+            this.txtLayer.Location = new System.Drawing.Point(12, 337);
             this.txtLayer.MultiColumn = true;
             this.txtLayer.Name = "txtLayer";
             this.txtLayer.SelectionMode = System.Windows.Forms.SelectionMode.None;
-            this.txtLayer.Size = new System.Drawing.Size(372, 23);
+            this.txtLayer.Size = new System.Drawing.Size(372, 25);
             this.txtLayer.StyleController = this.layoutControl1;
             this.txtLayer.TabIndex = 12;
             // 
             // txtMapType
             // 
             this.txtMapType.EditValue = 0;
-            this.txtMapType.Location = new System.Drawing.Point(12, 182);
+            this.txtMapType.Location = new System.Drawing.Point(12, 229);
             this.txtMapType.Name = "txtMapType";
+            this.txtMapType.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
             this.txtMapType.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.RadioGroupItem[] {
             new DevExpress.XtraEditors.Controls.RadioGroupItem(0, "本地地图"),
             new DevExpress.XtraEditors.Controls.RadioGroupItem(1, "WMTS")});
@@ -139,7 +159,7 @@ namespace XdCxRhDW.App.UserControl
             // 
             // btnSave
             // 
-            this.btnSave.Location = new System.Drawing.Point(137, 331);
+            this.btnSave.Location = new System.Drawing.Point(137, 374);
             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);
@@ -153,7 +173,7 @@ namespace XdCxRhDW.App.UserControl
             // txtHttpPort
             // 
             this.txtHttpPort.EditValue = "";
-            this.txtHttpPort.Location = new System.Drawing.Point(12, 29);
+            this.txtHttpPort.Location = new System.Drawing.Point(12, 79);
             this.txtHttpPort.Name = "txtHttpPort";
             this.txtHttpPort.Properties.AutoHeight = false;
             this.txtHttpPort.Size = new System.Drawing.Size(372, 22);
@@ -162,7 +182,7 @@ namespace XdCxRhDW.App.UserControl
             // 
             // txtXLDirectory
             // 
-            this.txtXLDirectory.Location = new System.Drawing.Point(12, 79);
+            this.txtXLDirectory.Location = new System.Drawing.Point(12, 129);
             this.txtXLDirectory.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.txtXLDirectory.Name = "txtXLDirectory";
             this.txtXLDirectory.Properties.AutoHeight = false;
@@ -172,11 +192,11 @@ namespace XdCxRhDW.App.UserControl
             // 
             // txtYDPZThreshold
             // 
-            this.txtYDPZThreshold.Location = new System.Drawing.Point(12, 129);
+            this.txtYDPZThreshold.Location = new System.Drawing.Point(12, 179);
             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, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            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)});
             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");
@@ -187,11 +207,17 @@ namespace XdCxRhDW.App.UserControl
             // txtWmtsSource
             // 
             this.txtWmtsSource.EditValue = 0;
-            this.txtWmtsSource.Location = new System.Drawing.Point(12, 238);
+            this.txtWmtsSource.Location = new System.Drawing.Point(12, 282);
             this.txtWmtsSource.Name = "txtWmtsSource";
+            this.txtWmtsSource.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
             this.txtWmtsSource.Size = new System.Drawing.Size(372, 25);
             this.txtWmtsSource.StyleController = this.layoutControl1;
             this.txtWmtsSource.TabIndex = 7;
+            this.txtWmtsSource.ToolTipController = this.toolTipController1;
+            // 
+            // toolTipController1
+            // 
+            this.toolTipController1.GetActiveObjectInfo += new DevExpress.Utils.ToolTipControllerGetActiveObjectInfoEventHandler(this.toolTipController1_GetActiveObjectInfo);
             // 
             // Root
             // 
@@ -206,19 +232,20 @@ namespace XdCxRhDW.App.UserControl
             this.emptySpaceItem1,
             this.emptySpaceItem2,
             this.itemWmtsSource,
-            this.itemMapLayer});
+            this.itemMapLayer,
+            this.layoutControlItem6});
             this.Root.Name = "Root";
-            this.Root.Size = new System.Drawing.Size(396, 370);
+            this.Root.Size = new System.Drawing.Size(396, 446);
             this.Root.TextVisible = false;
             // 
             // layoutControlItem3
             // 
             this.layoutControlItem3.Control = this.btnSave;
-            this.layoutControlItem3.Location = new System.Drawing.Point(125, 311);
+            this.layoutControlItem3.Location = new System.Drawing.Point(125, 354);
             this.layoutControlItem3.MinSize = new System.Drawing.Size(36, 27);
             this.layoutControlItem3.Name = "layoutControlItem3";
             this.layoutControlItem3.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 10, 2);
-            this.layoutControlItem3.Size = new System.Drawing.Size(125, 39);
+            this.layoutControlItem3.Size = new System.Drawing.Size(125, 72);
             this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem3.TextVisible = false;
@@ -228,11 +255,12 @@ namespace XdCxRhDW.App.UserControl
             this.layoutControlItem4.Control = this.txtHttpPort;
             this.layoutControlItem4.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.layoutControlItem4.CustomizationFormText = "HTTP服务端口";
-            this.layoutControlItem4.Location = new System.Drawing.Point(0, 0);
-            this.layoutControlItem4.MaxSize = new System.Drawing.Size(0, 43);
-            this.layoutControlItem4.MinSize = new System.Drawing.Size(100, 43);
+            this.layoutControlItem4.Location = new System.Drawing.Point(0, 43);
+            this.layoutControlItem4.MaxSize = new System.Drawing.Size(0, 50);
+            this.layoutControlItem4.MinSize = new System.Drawing.Size(100, 50);
             this.layoutControlItem4.Name = "layoutControlItem4";
-            this.layoutControlItem4.Size = new System.Drawing.Size(376, 43);
+            this.layoutControlItem4.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 9, 2);
+            this.layoutControlItem4.Size = new System.Drawing.Size(376, 50);
             this.layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem4.Text = "HTTP服务端口";
             this.layoutControlItem4.TextLocation = DevExpress.Utils.Locations.Top;
@@ -242,7 +270,7 @@ namespace XdCxRhDW.App.UserControl
             // 
             this.layoutControlItem5.Control = this.txtXLDirectory;
             this.layoutControlItem5.CustomizationFormText = "星历自动导入目录";
-            this.layoutControlItem5.Location = new System.Drawing.Point(0, 43);
+            this.layoutControlItem5.Location = new System.Drawing.Point(0, 93);
             this.layoutControlItem5.MaxSize = new System.Drawing.Size(0, 50);
             this.layoutControlItem5.MinSize = new System.Drawing.Size(100, 50);
             this.layoutControlItem5.Name = "layoutControlItem5";
@@ -258,7 +286,7 @@ namespace XdCxRhDW.App.UserControl
             this.layoutControlItem1.Control = this.txtYDPZThreshold;
             this.layoutControlItem1.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.layoutControlItem1.CustomizationFormText = "运动判证阈值";
-            this.layoutControlItem1.Location = new System.Drawing.Point(0, 93);
+            this.layoutControlItem1.Location = new System.Drawing.Point(0, 143);
             this.layoutControlItem1.MaxSize = new System.Drawing.Size(0, 50);
             this.layoutControlItem1.MinSize = new System.Drawing.Size(100, 50);
             this.layoutControlItem1.Name = "layoutControlItem1";
@@ -272,12 +300,12 @@ namespace XdCxRhDW.App.UserControl
             // layoutControlItem8
             // 
             this.layoutControlItem8.Control = this.txtMapType;
-            this.layoutControlItem8.Location = new System.Drawing.Point(0, 143);
-            this.layoutControlItem8.MaxSize = new System.Drawing.Size(0, 56);
-            this.layoutControlItem8.MinSize = new System.Drawing.Size(54, 56);
+            this.layoutControlItem8.Location = new System.Drawing.Point(0, 193);
+            this.layoutControlItem8.MaxSize = new System.Drawing.Size(0, 53);
+            this.layoutControlItem8.MinSize = new System.Drawing.Size(54, 53);
             this.layoutControlItem8.Name = "layoutControlItem8";
-            this.layoutControlItem8.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
-            this.layoutControlItem8.Size = new System.Drawing.Size(376, 56);
+            this.layoutControlItem8.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 9, 2);
+            this.layoutControlItem8.Size = new System.Drawing.Size(376, 53);
             this.layoutControlItem8.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem8.Text = "地图图源";
             this.layoutControlItem8.TextLocation = DevExpress.Utils.Locations.Top;
@@ -286,28 +314,28 @@ namespace XdCxRhDW.App.UserControl
             // emptySpaceItem1
             // 
             this.emptySpaceItem1.AllowHotTrack = false;
-            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 311);
+            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 354);
             this.emptySpaceItem1.Name = "emptySpaceItem1";
-            this.emptySpaceItem1.Size = new System.Drawing.Size(125, 39);
+            this.emptySpaceItem1.Size = new System.Drawing.Size(125, 72);
             this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
             // 
             // emptySpaceItem2
             // 
             this.emptySpaceItem2.AllowHotTrack = false;
-            this.emptySpaceItem2.Location = new System.Drawing.Point(250, 311);
+            this.emptySpaceItem2.Location = new System.Drawing.Point(250, 354);
             this.emptySpaceItem2.Name = "emptySpaceItem2";
-            this.emptySpaceItem2.Size = new System.Drawing.Size(126, 39);
+            this.emptySpaceItem2.Size = new System.Drawing.Size(126, 72);
             this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
             // 
             // itemWmtsSource
             // 
             this.itemWmtsSource.Control = this.txtWmtsSource;
-            this.itemWmtsSource.Location = new System.Drawing.Point(0, 199);
-            this.itemWmtsSource.MaxSize = new System.Drawing.Size(0, 56);
-            this.itemWmtsSource.MinSize = new System.Drawing.Size(50, 56);
+            this.itemWmtsSource.Location = new System.Drawing.Point(0, 246);
+            this.itemWmtsSource.MaxSize = new System.Drawing.Size(0, 53);
+            this.itemWmtsSource.MinSize = new System.Drawing.Size(50, 53);
             this.itemWmtsSource.Name = "itemWmtsSource";
-            this.itemWmtsSource.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
-            this.itemWmtsSource.Size = new System.Drawing.Size(376, 56);
+            this.itemWmtsSource.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 9, 2);
+            this.itemWmtsSource.Size = new System.Drawing.Size(376, 53);
             this.itemWmtsSource.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.itemWmtsSource.Text = "地图来源";
             this.itemWmtsSource.TextLocation = DevExpress.Utils.Locations.Top;
@@ -317,12 +345,12 @@ namespace XdCxRhDW.App.UserControl
             // itemMapLayer
             // 
             this.itemMapLayer.Control = this.txtLayer;
-            this.itemMapLayer.Location = new System.Drawing.Point(0, 255);
-            this.itemMapLayer.MaxSize = new System.Drawing.Size(0, 56);
-            this.itemMapLayer.MinSize = new System.Drawing.Size(50, 56);
+            this.itemMapLayer.Location = new System.Drawing.Point(0, 299);
+            this.itemMapLayer.MaxSize = new System.Drawing.Size(0, 55);
+            this.itemMapLayer.MinSize = new System.Drawing.Size(54, 55);
             this.itemMapLayer.Name = "itemMapLayer";
-            this.itemMapLayer.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
-            this.itemMapLayer.Size = new System.Drawing.Size(376, 56);
+            this.itemMapLayer.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 9, 2);
+            this.itemMapLayer.Size = new System.Drawing.Size(376, 55);
             this.itemMapLayer.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.itemMapLayer.Text = "图层类型";
             this.itemMapLayer.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.AutoSize;
@@ -331,18 +359,32 @@ namespace XdCxRhDW.App.UserControl
             this.itemMapLayer.TextToControlDistance = 5;
             this.itemMapLayer.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
             // 
+            // layoutControlItem6
+            // 
+            this.layoutControlItem6.Control = this.txtTimeZone;
+            this.layoutControlItem6.Location = new System.Drawing.Point(0, 0);
+            this.layoutControlItem6.MaxSize = new System.Drawing.Size(0, 43);
+            this.layoutControlItem6.MinSize = new System.Drawing.Size(100, 43);
+            this.layoutControlItem6.Name = "layoutControlItem6";
+            this.layoutControlItem6.Size = new System.Drawing.Size(376, 43);
+            this.layoutControlItem6.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            this.layoutControlItem6.Text = "系统时区";
+            this.layoutControlItem6.TextLocation = DevExpress.Utils.Locations.Top;
+            this.layoutControlItem6.TextSize = new System.Drawing.Size(96, 14);
+            // 
             // CtrlSysSettings
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.Controls.Add(this.tablePanel1);
             this.Name = "CtrlSysSettings";
-            this.Size = new System.Drawing.Size(599, 466);
+            this.Size = new System.Drawing.Size(619, 527);
             this.Load += new System.EventHandler(this.CtrlSysSettings_Load);
             ((System.ComponentModel.ISupportInitialize)(this.tablePanel1)).EndInit();
             this.tablePanel1.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
             this.layoutControl1.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.txtTimeZone.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtLayer)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtMapType.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtHttpPort.Properties)).EndInit();
@@ -359,6 +401,7 @@ namespace XdCxRhDW.App.UserControl
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.itemWmtsSource)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.itemMapLayer)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -384,5 +427,8 @@ namespace XdCxRhDW.App.UserControl
         private DevExpress.XtraEditors.RadioGroup txtWmtsSource;
         private DevExpress.XtraEditors.CheckedListBoxControl txtLayer;
         private DevExpress.XtraLayout.LayoutControlItem itemMapLayer;
+        private DevExpress.Utils.ToolTipController toolTipController1;
+        private DevExpress.XtraScheduler.UI.TimeZoneEdit txtTimeZone;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
     }
 }

+ 63 - 32
XdCxRhDW.App/UserControl/CtrlSysSettings.cs

@@ -25,6 +25,7 @@ using DevExpress.XtraEditors.Controls;
 using System.Security.Policy;
 using DevExpress.Utils.About;
 using XdCxRhDW.Dto;
+using System.Configuration;
 
 namespace XdCxRhDW.App.UserControl
 {
@@ -51,6 +52,7 @@ namespace XdCxRhDW.App.UserControl
                     if (res != null)
                     {
                         this.txtHttpPort.Text = res.HttpPort.ToString();
+                        this.txtTimeZone.TimeZoneId = res.TimeZoneID;
                         if (!string.IsNullOrEmpty(res.XLDirectory))
                             this.txtXLDirectory.Text = res.XLDirectory.ToString();
                         if (res.YDPZThreshold > 0)
@@ -95,7 +97,6 @@ namespace XdCxRhDW.App.UserControl
         private async void btnSave_Click(object sender, EventArgs e)
         {
             bool needStartHttpSvr = false;
-            bool mapChanged = false;
             try
             {
                 if (!int.TryParse(txtHttpPort.Text, out int port))
@@ -103,15 +104,24 @@ namespace XdCxRhDW.App.UserControl
                     DxHelper.MsgBoxHelper.ShowError("Http端口错误!");
                     return;
                 }
+                if (string.IsNullOrWhiteSpace(txtTimeZone.TimeZoneId))
+                {
+                    DxHelper.MsgBoxHelper.ShowError("系统时区错误!");
+                    return;
+                }
                 using (RHDWContext db = new RHDWContext())
                 {
                     var res = await db.SysSetings.FirstOrDefaultAsync();
                     if (res == null) res = new SysSetings();
+                    res.TimeZoneID = txtTimeZone.TimeZoneId;
+                    TimeZoneInfo tz = TimeZoneInfo.FindSystemTimeZoneById(txtTimeZone.TimeZoneId);
+                    res.TimeZoneDisplayName = tz.DisplayName.Replace(" ", "").Replace("(", "").Replace(")", "");
+                    res.ZoneHours = tz.BaseUtcOffset.TotalHours;
                     needStartHttpSvr = res.HttpPort != port;
                     res.HttpPort = port;
                     res.XLDirectory = txtXLDirectory.Text;
                     res.YDPZThreshold = string.IsNullOrWhiteSpace(txtYDPZThreshold.Text) ? 0 : Convert.ToInt32(txtYDPZThreshold.Text);
-                    mapChanged = res.MapType != txtMapType.SelectedIndex;
+                    bool mapChanged = res.MapType != txtMapType.SelectedIndex;
                     res.MapType = txtMapType.SelectedIndex;
                     if (txtMapType.SelectedIndex != 0)
                     {
@@ -133,8 +143,33 @@ namespace XdCxRhDW.App.UserControl
                     db.SysSetings.AddOrUpdate(res);
                     await db.SaveChangesAsync();
                     if (mapChanged)
-                        Messenger.Defalut.Pub("地图类型改变", await db.SysSetings.FirstOrDefaultAsync());
+                        Messenger.Defalut.Pub("地图类型改变", res);
+                    Messenger.Defalut.Pub("时区改变", res);
                     DxHelper.MsgBoxHelper.ShowInfo("配置信息保存成功!");
+                    if (needStartHttpSvr)
+                    {
+                        try
+                        {
+                            Startup.Start(res.HttpPort, "多模式融合定位平台.Xml", "XdCxRhDW.Dto.xml");
+                        }
+                        catch (System.Reflection.TargetInvocationException ex)
+                        {
+                            Serilog.Log.Error(ex, $"启动Http服务失败!");
+                            if (ex.InnerException is HttpListenerException)
+                            {
+                                DxHelper.MsgBoxHelper.ShowWarning($"{ex.InnerException.Message}");
+                            }
+                            else
+                            {
+                                DxHelper.MsgBoxHelper.ShowWarning($"启动Http服务失败!");
+                            }
+                        }
+                        catch (Exception ex)
+                        {
+                            Serilog.Log.Error(ex, $"启动Http服务失败!");
+                            DxHelper.MsgBoxHelper.ShowWarning($"启动Http服务失败!");
+                        }
+                    }
                 }
             }
             catch (Exception ex)
@@ -142,34 +177,7 @@ namespace XdCxRhDW.App.UserControl
                 Serilog.Log.Error(ex, "配置信息保存异常");
                 DxHelper.MsgBoxHelper.ShowError("配置信息保存异常");
             }
-            if (needStartHttpSvr)
-            {
-                try
-                {
-                    using (RHDWContext db = new RHDWContext())
-                    {
-                        var settings = await db.SysSetings.FirstOrDefaultAsync();
-                        Startup.Start(settings.HttpPort, "多模式融合定位平台.Xml", "XdCxRhDW.Dto.xml");
-                    }
-                }
-                catch (System.Reflection.TargetInvocationException ex)
-                {
-                    Serilog.Log.Error(ex, $"启动Http服务失败!");
-                    if (ex.InnerException is HttpListenerException)
-                    {
-                        DxHelper.MsgBoxHelper.ShowWarning($"{ex.InnerException.Message}");
-                    }
-                    else
-                    {
-                        DxHelper.MsgBoxHelper.ShowWarning($"启动Http服务失败!");
-                    }
-                }
-                catch (Exception ex)
-                {
-                    Serilog.Log.Error(ex, $"启动Http服务失败!");
-                    DxHelper.MsgBoxHelper.ShowWarning($"启动Http服务失败!");
-                }
-            }
+
         }
 
         private void txtMapType_SelectedIndexChanged(object sender, EventArgs e)
@@ -187,6 +195,29 @@ namespace XdCxRhDW.App.UserControl
             layoutControl1.BestFit();
         }
 
-
+        private void toolTipController1_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
+        {
+            RadioGroup rg = e.SelectedControl as RadioGroup;
+            if (rg == null) return;
+            for (int i = 0; i < rg.Properties.Items.Count; i++)
+            {
+                Rectangle rect = rg.GetItemRectangle(i);
+                if (rect.Contains(e.ControlMousePosition))
+                {
+                    var val = (EnumWmtsSource)rg.Properties.Items[i].Value;
+                    if (val == EnumWmtsSource.ZCJ)
+                    {
+                        var str = ConfigurationManager.AppSettings["ZCJ_URL"];
+                        e.Info = new ToolTipControlInfo(i, $"{rg.Properties.Items[i].Description}:{str}");
+                    }
+                    else
+                    {
+                        var str = ConfigurationManager.AppSettings["SJZX_URL"];
+                        e.Info = new ToolTipControlInfo(i, $"{rg.Properties.Items[i].Description}:{str}");
+                    }
+                    break;
+                }
+            }
+        }
     }
 }

+ 3 - 0
XdCxRhDW.App/UserControl/CtrlSysSettings.resx

@@ -117,4 +117,7 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="toolTipController1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
 </root>

+ 15 - 12
XdCxRhDW.App/XdCxRhDW.App.csproj

@@ -82,6 +82,9 @@
     <Reference Include="DevExpress.XtraLayout.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
     <Reference Include="DevExpress.XtraMap.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
     <Reference Include="DevExpress.XtraPrinting.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
+    <Reference Include="DevExpress.XtraScheduler.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
+    <Reference Include="DevExpress.XtraScheduler.v23.2.Core, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
+    <Reference Include="DevExpress.XtraScheduler.v23.2.Core.Desktop, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
     <Reference Include="DevExpress.XtraTreeList.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
     <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
       <HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
@@ -185,18 +188,18 @@
     <Compile Include="DxHelper\PopupHelper.cs" />
     <Compile Include="DxHelper\SvgHelper.cs" />
     <Compile Include="DxHelper\WaitHelper.cs" />
-	  <Compile Include="EditForms\PosTimeEditor.cs">
-		  <SubType>Form</SubType>
-	  </Compile>
-	  <Compile Include="EditForms\PosTimeEditor.Designer.cs">
-		  <DependentUpon>PosTimeEditor.cs</DependentUpon>
-	  </Compile>
-	  <Compile Include="EditForms\SigEditor.cs">
-		  <SubType>Form</SubType>
-	  </Compile>
-	  <Compile Include="EditForms\SigEditor.Designer.cs">
-		  <DependentUpon>SigEditor.cs</DependentUpon>
-	  </Compile>
+    <Compile Include="EditForms\PosTimeEditor.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="EditForms\PosTimeEditor.Designer.cs">
+      <DependentUpon>PosTimeEditor.cs</DependentUpon>
+    </Compile>
+    <Compile Include="EditForms\SigEditor.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="EditForms\SigEditor.Designer.cs">
+      <DependentUpon>SigEditor.cs</DependentUpon>
+    </Compile>
     <Compile Include="EditForms\TaskHistoryTimeEditor.cs">
       <SubType>Form</SubType>
     </Compile>

+ 17 - 0
XdCxRhDW.Entity/SysSetings.cs

@@ -11,7 +11,24 @@ namespace XdCxRhDW.Entity
     [Table("SysSetings")]
     public class SysSetings : BaseEntity
     {
+        /// <summary>
+        /// 系统时区ID
+        /// </summary>
+        public string TimeZoneID { get; set; }
+
+        /// <summary>
+        /// 系统时区显示的文本
+        /// </summary>
+        public string TimeZoneDisplayName {  get; set; }    
+
+        /// <summary>
+        /// 时区值(北京时间就是8)
+        /// </summary>
+        public double ZoneHours { get; set; }
+
         public int HttpPort { get; set; }
+
+
         public string XLDirectory { get; set; }
 
         public int YDPZThreshold { get; set; }

+ 3 - 2
XdCxRhDW.WebApi/Startup.cs

@@ -171,12 +171,13 @@ namespace XdCxRhDW.WebApi
         private static void ConfigureSwagger(HttpConfiguration config)
         {
             var thisAssembly = typeof(Startup).Assembly;
+            string exeName = Assembly.GetEntryAssembly().GetName().Name;
             config.EnableSwagger(c =>
              {
                  c.IgnoreObsoleteActions();//忽略过时的方法
                  c.IgnoreObsoleteProperties();//忽略过时的属性
                  c.PrettyPrint();//漂亮缩进
-                 c.SingleApiVersion("v1", "多模式融合定位平台Http接口");
+                 c.SingleApiVersion("v1", $"{exeName}Http接口");
                  c.ApiKey("123456");
 
                  var webApiXmlPath1 = $"{AppDomain.CurrentDomain.BaseDirectory}{Path.GetFileNameWithoutExtension(_dtoXmlName)}.xml";
@@ -196,7 +197,7 @@ namespace XdCxRhDW.WebApi
              .EnableSwaggerUi(c =>
              {
                  c.InjectJavaScript(thisAssembly, $"{Assembly.GetExecutingAssembly().GetName().Name}.Swagger.js");
-                 c.DocumentTitle("多模式融合定位平台Http接口");
+                 c.DocumentTitle($"{exeName}Http接口");
              });
         }