From c0be7c001375f73e2c3b49a1b1d447b6fc297bdd Mon Sep 17 00:00:00 2001 From: duheng <2286773002@qq.com> Date: 星期五, 21 三月 2025 13:43:00 +0800 Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0 --- WinFrmUI/PBS.WinFrmUI.Hydro/Properties/Resources.Designer.cs | 50 WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/info/SchoolPlaceInfoCtrl.cs | 76 WinFrmUI/PBS.WinFrmUI.Hydro/Resources/flipimage_vertical.svg | 20 Dto/PBS.Dto/02-facility/FacilityDto.cs | 12 WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/QuickModelingPlaceWizardPage.cs | 238 ++ WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/InputDlg.Designer.cs | 168 + WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/EditFloors.cs | 322 +++ WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/InputDlg.resx | 123 + WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/01-tree/FacilityTreeListCtrl.resx | 270 ++ WinFrmUI/PBS.WinFrmUI.Hydro/01-model-template/00-core/SetMapBaseMapDlg.cs | 4 WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/01-core/QuickModelingPage.cs | 28 WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/TemplateChoice.cs | 109 + Vmo/PBS.Vmo/02-facility/FacilityVmo.cs | 12 WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/01-tree/FacilityTreeListCtrl.cs | 245 ++ WinFrmUI/PBS.WinFrmUI.Hydro/Resources/connector.svg | 19 WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/00-core/ModelEditPage.resx | 75 WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/EditFloors.Designer.cs | 763 +++++++ WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/InputDlg.cs | 56 Service/PBS.Service/01-entity/02-facility/Facility.cs | 12 WinFrmUI/PBS.WinFrmUI.Hydro/01-model-template/01-model-template/AddModelTemplateDlg.cs | 4 WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/QuickModelingPlaceWizardPage - 复制.Designer.cs | 384 +++ WinFrmUI/PBS.WinFrmUI.Hydro/PBS.WinFrmUI.Hydro.csproj | 11 WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/info/SchoolPlaceInfoCtrl.Designer.cs | 3 WinFrmUI/PBS.WinFrmUI.Hydro/template/Form_EditFloors.cs | 2 WinFrmUI/PBS.WinFrmUI.Hydro/Resources/actions_checkcircled.svg | 15 WinFrmUI/PBS.WinFrmUI.Hydro/01-model-template/00-core/ModelTemplatePage.cs | 38 WinFrmUI/PBS.WinFrmUI.Hydro/Properties/Resources.resx | 15 WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/QuickModelingPlaceWizardPage - 复制.resx | 123 + WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/01-tree/FacilityTreeViewModel.cs | 70 WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/TemplateChoice.Designer.cs | 233 ++ WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/00-core/ModelEditPage.Designer.cs | 154 WinFrmUI/PBS.WinFrmUI.Hydro/Resources/tableproperties.svg | 14 WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/01-core/QuickModelingViewModel.cs | 32 Service/PBS.Service/02-model/02-facility/Facility.cs | 14 /dev/null | 521 ----- WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/00-core/ModelEditPage.cs | 798 ++++++++ WinFrmUI/PBS.WinFrmUI.Hydro/PBS.WinFrmUI.Hydro.csproj.user | 6 WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/QuickModelingPlaceWizardPage.Designer.cs | 92 WinFrmUI/PBS.WinFrmUI.Hydro/Resources/flipimage_horizontal.svg | 20 WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/QuickModelingPlaceWizardPage - 复制.cs | 207 ++ WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/TemplateChoice.resx | 120 + WinFrmUI/PBS.WinFrmUI.Hydro/01-model-template/01-model-template/EditModelTemplateDlg.cs | 4 WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/01-tree/FacilityTreeListCtrl.Designer.cs | 299 +++ WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/EditFloors.resx | 126 + 44 files changed, 5,054 insertions(+), 853 deletions(-) diff --git a/Dto/PBS.Dto/02-facility/FacilityDto.cs b/Dto/PBS.Dto/02-facility/FacilityDto.cs index 3939bd7..e424a55 100644 --- a/Dto/PBS.Dto/02-facility/FacilityDto.cs +++ b/Dto/PBS.Dto/02-facility/FacilityDto.cs @@ -31,6 +31,8 @@ this.MaxHeight = rhs.MaxHeight; this.ConnectionAddress = rhs.ConnectionAddress; this.ConnectionType = rhs.ConnectionType; + this.ModelInfo = rhs.ModelInfo; + this.ModelPath = rhs.ModelPath; this.Paras = rhs.Paras == null ? null : new(rhs.Paras); this.Flags = rhs.Flags?.ToList(); this.TagName = rhs.TagName; @@ -115,6 +117,16 @@ public eConnectionType ConnectionType { get; set; } /// <summary> + /// 妯″瀷淇℃伅 + ///</summary> + public string ModelInfo { get; set; } + + /// <summary> + /// 妯″瀷璺緞 + ///</summary> + public string ModelPath { get; set; } + + /// <summary> /// IP鍦板潃 /// </summary> public string ConnectionAddress { get; set; } diff --git a/Service/PBS.Service/01-entity/02-facility/Facility.cs b/Service/PBS.Service/01-entity/02-facility/Facility.cs index f57c627..5f731c8 100644 --- a/Service/PBS.Service/01-entity/02-facility/Facility.cs +++ b/Service/PBS.Service/01-entity/02-facility/Facility.cs @@ -114,6 +114,18 @@ public string ConnectionAddress { get; set; } /// <summary> + /// 妯″瀷淇℃伅 + ///</summary> + [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] + public string ModelInfo { get; set; } + + /// <summary> + /// 妯″瀷璺緞 + ///</summary> + [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] + public string ModelPath { get; set; } + + /// <summary> /// 鍙傛暟 ///</summary> [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] diff --git a/Service/PBS.Service/02-model/02-facility/Facility.cs b/Service/PBS.Service/02-model/02-facility/Facility.cs index 0c9dc25..4e9d156 100644 --- a/Service/PBS.Service/02-model/02-facility/Facility.cs +++ b/Service/PBS.Service/02-model/02-facility/Facility.cs @@ -32,6 +32,8 @@ this.TerminalPressure = rhs.TerminalPressure; this.ConnectionAddress = rhs.ConnectionAddress; this.ConnectionType = rhs.ConnectionType; + this.ModelInfo = rhs.ModelInfo; + this.ModelPath = rhs.ModelPath; this.Paras = rhs.Paras == null ? null : new(rhs.Paras); this.Flags = rhs.Flags?.ToList(); this.TagName = rhs.TagName; @@ -60,6 +62,8 @@ this.MaxHeight = rhs.MaxHeight; this.ConnectionAddress = rhs.ConnectionAddress; this.ConnectionType = rhs.ConnectionType; + this.ModelInfo = rhs.ModelInfo; + this.ModelPath = rhs.ModelPath; this.Paras = rhs.Paras == null ? null : new(rhs.Paras); this.Flags = rhs.Flags?.ToList(); this.TagName = rhs.TagName; @@ -139,6 +143,16 @@ public string ConnectionAddress { get; set; } /// <summary> + /// 妯″瀷淇℃伅 + ///</summary> + public string ModelInfo { get; set; } + + /// <summary> + /// 妯″瀷璺緞 + ///</summary> + public string ModelPath { get; set; } + + /// <summary> /// 鍙傛暟 ///</summary> public Dictionary<string, string> Paras { get; set; } diff --git a/Vmo/PBS.Vmo/02-facility/FacilityVmo.cs b/Vmo/PBS.Vmo/02-facility/FacilityVmo.cs index 20d4ee0..243e7ce 100644 --- a/Vmo/PBS.Vmo/02-facility/FacilityVmo.cs +++ b/Vmo/PBS.Vmo/02-facility/FacilityVmo.cs @@ -32,6 +32,8 @@ this.MaxHeight = rhs.MaxHeight; this.ConnectionAddress = rhs.ConnectionAddress; this.ConnectionType = rhs.ConnectionType; + this.ModelInfo = rhs.ModelInfo; + this.ModelPath = rhs.ModelPath; this.Flags = rhs.Flags?.ToList(); this.TagName = rhs.TagName; this.UseStatus = (Yw.Vmo.eUseStatus)(int)rhs.UseStatus; @@ -115,6 +117,16 @@ public string ConnectionAddress { get; set; } /// <summary> + /// 妯″瀷淇℃伅 + ///</summary> + public string ModelInfo { get; set; } + + /// <summary> + /// 妯″瀷璺緞 + ///</summary> + public string ModelPath { get; set; } + + /// <summary> /// 鍙傛暟 ///</summary> public Dictionary<string, string> Paras { get; set; } diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/01-model-template/00-core/ModelTemplatePage.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/01-model-template/00-core/ModelTemplatePage.cs index a1e6962..f077da8 100644 --- a/WinFrmUI/PBS.WinFrmUI.Hydro/01-model-template/00-core/ModelTemplatePage.cs +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/01-model-template/00-core/ModelTemplatePage.cs @@ -1,4 +1,6 @@ -锘縰sing Hydro; +锘縰sing DevExpress.Drawing.Internal.Fonts.Interop; +using DevExpress.XtraPrinting.Native; +using Hydro; namespace PBS.WinFrmUI.Hydro { @@ -309,19 +311,7 @@ this.modelTemplateTreeListCtrl1.SaveModelTemplate(_modelTemplate); } - private void SetZoom() - { - if (_template != null) - { - if (_template.view == null) _template.view = new MapDimensions(); - _template.view.Center = _mapView.MapCenter; - _template.view.zoom = _mapView.zoom; - _template.view.rotation = _mapView.Rotation; - _template.view.rotationF = _mapView.RotationF; - - } - - } + private void barBtnSaveModelTemplate_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) @@ -488,17 +478,21 @@ _mapView.閲嶇疆瑙嗚ToolStripMenuItem_Click(1, new EventArgs()); } + private void SetZoom() + { + if (_template == null) return; + _template.view ??= new MapDimensions(); + _template.view.Center = _mapView.MapCenter; + _template.view.zoom = _mapView.zoom; + _template.view.rotation = _mapView.Rotation; + _template.view.rotationF = _mapView.RotationF; + } + + private void SaveView() { - //if (_mapDimensions == null) - // _mapDimensions = new MapDimensions(); - //_mapDimensions.Center = map.MapCenter; - //_mapDimensions.zoom = map.zoom; - //_mapDimensions.rotation = map.Rotation; - //_mapDimensions.rotationF = map.RotationF; - if (_template == null) return; - if (_template.view == null) _template.view = new MapDimensions(); + _template.view ??= new MapDimensions(); _template.view.Center = _mapView.MapCenter; _template.view.zoom = _mapView.zoom; _template.view.rotation = _mapView.Rotation; diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/01-model-template/00-core/SetMapBaseMapDlg.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/01-model-template/00-core/SetMapBaseMapDlg.cs index 4741642..701b5e4 100644 --- a/WinFrmUI/PBS.WinFrmUI.Hydro/01-model-template/00-core/SetMapBaseMapDlg.cs +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/01-model-template/00-core/SetMapBaseMapDlg.cs @@ -61,7 +61,7 @@ //鏁版嵁楠岃瘉 - private bool Valid() + private bool Verify() { this.dxErrorProvider1.ClearErrors(); if (string.IsNullOrEmpty(_filePath)) @@ -81,7 +81,7 @@ //纭畾 private void GeneralOkAndCancelCtrl1_OkEvent() { - if (!Valid()) + if (!Verify()) { return; } diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/01-model-template/01-model-template/AddModelTemplateDlg.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/01-model-template/01-model-template/AddModelTemplateDlg.cs index a001826..f7c4768 100644 --- a/WinFrmUI/PBS.WinFrmUI.Hydro/01-model-template/01-model-template/AddModelTemplateDlg.cs +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/01-model-template/01-model-template/AddModelTemplateDlg.cs @@ -33,7 +33,7 @@ } //鏁版嵁楠岃瘉 - private async Task<bool> Valid() + private async Task<bool> Verify() { this.dxErrorProvider1.ClearErrors(); if (string.IsNullOrEmpty(txtName.Text.Trim())) @@ -60,7 +60,7 @@ { return; } - if (!await Valid()) + if (!await Verify()) { return; } diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/01-model-template/01-model-template/EditModelTemplateDlg.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/01-model-template/01-model-template/EditModelTemplateDlg.cs index e0a1b6e..1255281 100644 --- a/WinFrmUI/PBS.WinFrmUI.Hydro/01-model-template/01-model-template/EditModelTemplateDlg.cs +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/01-model-template/01-model-template/EditModelTemplateDlg.cs @@ -41,7 +41,7 @@ } //鏁版嵁楠岃瘉 - private async Task<bool> Valid() + private async Task<bool> Verify() { this.dxErrorProvider1.ClearErrors(); if (string.IsNullOrEmpty(txtName.Text.Trim())) @@ -68,7 +68,7 @@ { return; } - if (!await Valid()) + if (!await Verify()) { return; } diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/01-core/QuickModelingPage.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/01-core/QuickModelingPage.cs index 6d2f794..4169bb9 100644 --- a/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/01-core/QuickModelingPage.cs +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/01-core/QuickModelingPage.cs @@ -89,18 +89,18 @@ this.navigationFrame.AddPage(pageFacility); - //var pageModelEdit = _allPageList.Find(x => x is QuickModelingFacilityWizardPage) as QuickModelingFacilityWizardPage; - //if (pageModelEdit == null) - //{ - // pageModelEdit = new QuickModelingFacilityWizardPage(); - // pageModelEdit.Dock = DockStyle.Fill; - // _allPageList.Add(pageModelEdit); - //} + var pageModelEdit = _allPageList.Find(x => x is ModelEditPage) as ModelEditPage; + if (pageModelEdit == null) + { + pageModelEdit = new ModelEditPage(); + pageModelEdit.Dock = DockStyle.Fill; + _allPageList.Add(pageModelEdit); + } - //_bindingPageList.Add(pageModelEdit); - //this.navigationFrame.AddPage(pageModelEdit); + _bindingPageList.Add(pageModelEdit); + this.navigationFrame.AddPage(pageModelEdit); - + } //鍒濆鍖栨楠� @@ -119,10 +119,10 @@ { AddStepItem("璁炬柦"); } - //else if (page is QuickModelingFacilityWizardPage) - //{ - // AddStepItem("妯″瀷"); - //} + else if (page is ModelEditPage) + { + AddStepItem("妯″瀷"); + } } } diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/01-core/QuickModelingViewModel.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/01-core/QuickModelingViewModel.cs index 2ca3936..1d07cdf 100644 --- a/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/01-core/QuickModelingViewModel.cs +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/01-core/QuickModelingViewModel.cs @@ -44,6 +44,38 @@ public Yw.Model.Map.Marker Marker { get; set; } + /// <summary> + /// + /// </summary> + public string tempBackgroundImageUrl = AppDomain.CurrentDomain.BaseDirectory + "Data\\temp.png"; + + /// <summary> + /// + /// </summary> + public double BackgroundWidth; + + /// <summary> + /// + /// </summary> + public double BackgroundHeight; + + /// <summary> + /// + /// </summary> + public double Zoom; + + /// <summary> + /// + /// </summary> + public string NorthEast; + + /// <summary> + /// + /// </summary> + public string SouthWest; + + public bool IsCaptureImage { get; set; } + #endregion diff --git "a/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/QuickModelingPlaceWizardPage - \345\244\215\345\210\266.Designer.cs" "b/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/QuickModelingPlaceWizardPage - \345\244\215\345\210\266.Designer.cs" new file mode 100644 index 0000000..99cf2b7 --- /dev/null +++ "b/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/QuickModelingPlaceWizardPage - \345\244\215\345\210\266.Designer.cs" @@ -0,0 +1,384 @@ +锘縩amespace PBS.WinFrmUI.Hydro +{ + partial class QuickModelingPlaceWizardPage + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + components = new Container(); + DevExpress.XtraLayout.ColumnDefinition columnDefinition1 = new DevExpress.XtraLayout.ColumnDefinition(); + DevExpress.XtraLayout.ColumnDefinition columnDefinition2 = new DevExpress.XtraLayout.ColumnDefinition(); + DevExpress.XtraLayout.RowDefinition rowDefinition1 = new DevExpress.XtraLayout.RowDefinition(); + DevExpress.XtraLayout.RowDefinition rowDefinition2 = new DevExpress.XtraLayout.RowDefinition(); + DevExpress.XtraLayout.RowDefinition rowDefinition3 = new DevExpress.XtraLayout.RowDefinition(); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + placeInfoCtrl1 = new PlaceInfoCtrl(); + setFlagsEditCtrl1 = new SetFlagsEditCtrl(); + txtTagName = new TextEdit(); + txtDescription = new MemoEdit(); + imgCmbPlaceType = new ImageComboBoxEdit(); + mapSetSimpleMarkerContainer1 = new MapSetSimpleMarkerContainer(); + txtName = new TextEdit(); + txtAddress = new TextEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + ((ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((ISupportInitialize)txtTagName.Properties).BeginInit(); + ((ISupportInitialize)txtDescription.Properties).BeginInit(); + ((ISupportInitialize)imgCmbPlaceType.Properties).BeginInit(); + ((ISupportInitialize)txtName.Properties).BeginInit(); + ((ISupportInitialize)txtAddress.Properties).BeginInit(); + ((ISupportInitialize)Root).BeginInit(); + ((ISupportInitialize)layoutControlGroup2).BeginInit(); + ((ISupportInitialize)layoutControlItem2).BeginInit(); + ((ISupportInitialize)layoutControlItem5).BeginInit(); + ((ISupportInitialize)layoutControlItem6).BeginInit(); + ((ISupportInitialize)layoutControlItem4).BeginInit(); + ((ISupportInitialize)layoutControlItem7).BeginInit(); + ((ISupportInitialize)layoutControlGroup4).BeginInit(); + ((ISupportInitialize)layoutControlItem8).BeginInit(); + ((ISupportInitialize)layoutControlGroup1).BeginInit(); + ((ISupportInitialize)layoutControlItem1).BeginInit(); + ((ISupportInitialize)layoutControlGroup3).BeginInit(); + ((ISupportInitialize)layoutControlItem3).BeginInit(); + ((ISupportInitialize)dxErrorProvider1).BeginInit(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(placeInfoCtrl1); + layoutControl1.Controls.Add(setFlagsEditCtrl1); + layoutControl1.Controls.Add(txtTagName); + layoutControl1.Controls.Add(txtDescription); + layoutControl1.Controls.Add(imgCmbPlaceType); + layoutControl1.Controls.Add(mapSetSimpleMarkerContainer1); + layoutControl1.Controls.Add(txtName); + layoutControl1.Controls.Add(txtAddress); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Name = "layoutControl1"; + layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(884, 343, 812, 500); + layoutControl1.Root = Root; + layoutControl1.Size = new Size(824, 649); + layoutControl1.TabIndex = 0; + layoutControl1.Text = "layoutControl1"; + // + // placeInfoCtrl1 + // + placeInfoCtrl1.Location = new Point(506, 232); + placeInfoCtrl1.Margin = new Padding(3, 4, 3, 4); + placeInfoCtrl1.Name = "placeInfoCtrl1"; + placeInfoCtrl1.Size = new Size(306, 210); + placeInfoCtrl1.TabIndex = 7; + // + // setFlagsEditCtrl1 + // + setFlagsEditCtrl1.Location = new Point(591, 66); + setFlagsEditCtrl1.Margin = new Padding(3, 5, 3, 5); + setFlagsEditCtrl1.Name = "setFlagsEditCtrl1"; + setFlagsEditCtrl1.Size = new Size(66, 24); + setFlagsEditCtrl1.TabIndex = 5; + // + // txtTagName + // + txtTagName.Location = new Point(746, 66); + txtTagName.Margin = new Padding(3, 4, 3, 4); + txtTagName.Name = "txtTagName"; + txtTagName.Size = new Size(66, 24); + txtTagName.StyleController = layoutControl1; + txtTagName.TabIndex = 4; + // + // txtDescription + // + txtDescription.Location = new Point(506, 492); + txtDescription.Margin = new Padding(3, 4, 3, 4); + txtDescription.Name = "txtDescription"; + txtDescription.Size = new Size(306, 145); + txtDescription.StyleController = layoutControl1; + txtDescription.TabIndex = 8; + // + // imgCmbPlaceType + // + imgCmbPlaceType.Location = new Point(746, 38); + imgCmbPlaceType.Margin = new Padding(3, 4, 3, 4); + imgCmbPlaceType.Name = "imgCmbPlaceType"; + imgCmbPlaceType.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) }); + imgCmbPlaceType.Size = new Size(66, 24); + imgCmbPlaceType.StyleController = layoutControl1; + imgCmbPlaceType.TabIndex = 3; + imgCmbPlaceType.EditValueChanged += imgCmbPlaceType_EditValueChanged; + // + // mapSetSimpleMarkerContainer1 + // + mapSetSimpleMarkerContainer1.BorderColor = Color.LightGray; + mapSetSimpleMarkerContainer1.BorderWidth = 1; + mapSetSimpleMarkerContainer1.Location = new Point(1, 27); + mapSetSimpleMarkerContainer1.Margin = new Padding(4, 4, 4, 4); + mapSetSimpleMarkerContainer1.Name = "mapSetSimpleMarkerContainer1"; + mapSetSimpleMarkerContainer1.ShowBorder = false; + mapSetSimpleMarkerContainer1.Size = new Size(492, 621); + mapSetSimpleMarkerContainer1.TabIndex = 0; + // + // txtName + // + txtName.Location = new Point(591, 38); + txtName.Name = "txtName"; + txtName.Size = new Size(66, 24); + txtName.StyleController = layoutControl1; + txtName.TabIndex = 2; + // + // txtAddress + // + txtAddress.Location = new Point(591, 94); + txtAddress.Name = "txtAddress"; + txtAddress.Size = new Size(221, 24); + txtAddress.StyleController = layoutControl1; + txtAddress.TabIndex = 6; + // + // Root + // + Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + Root.GroupBordersVisible = false; + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup2, layoutControlGroup4, layoutControlGroup1, layoutControlGroup3 }); + Root.LayoutMode = DevExpress.XtraLayout.Utils.LayoutMode.Table; + Root.Name = "Root"; + columnDefinition1.SizeType = SizeType.Percent; + columnDefinition1.Width = 60D; + columnDefinition2.SizeType = SizeType.Percent; + columnDefinition2.Width = 40D; + Root.OptionsTableLayoutGroup.ColumnDefinitions.AddRange(new DevExpress.XtraLayout.ColumnDefinition[] { columnDefinition1, columnDefinition2 }); + rowDefinition1.Height = 30D; + rowDefinition1.SizeType = SizeType.Percent; + rowDefinition2.Height = 40D; + rowDefinition2.SizeType = SizeType.Percent; + rowDefinition3.Height = 30D; + rowDefinition3.SizeType = SizeType.Percent; + Root.OptionsTableLayoutGroup.RowDefinitions.AddRange(new DevExpress.XtraLayout.RowDefinition[] { rowDefinition1, rowDefinition2, rowDefinition3 }); + Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + Root.Size = new Size(824, 649); + Root.TextVisible = false; + // + // layoutControlGroup2 + // + layoutControlGroup2.AppearanceItemCaption.Options.UseTextOptions = true; + layoutControlGroup2.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + layoutControlGroup2.GroupStyle = DevExpress.Utils.GroupStyle.Card; + layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem2, layoutControlItem5, layoutControlItem6, layoutControlItem4, layoutControlItem7 }); + layoutControlGroup2.Location = new Point(494, 0); + layoutControlGroup2.Name = "layoutControlGroup2"; + layoutControlGroup2.OptionsTableLayoutItem.ColumnIndex = 1; + layoutControlGroup2.Size = new Size(330, 194); + layoutControlGroup2.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup2.Text = "鍩虹淇℃伅"; + // + // layoutControlItem2 + // + layoutControlItem2.AllowHtmlStringInCaption = true; + layoutControlItem2.Control = txtName; + layoutControlItem2.Location = new Point(0, 0); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(155, 28); + layoutControlItem2.Text = "<color=red>*</color>鍚嶇О:"; + layoutControlItem2.TextSize = new Size(73, 18); + // + // layoutControlItem5 + // + layoutControlItem5.AllowHtmlStringInCaption = true; + layoutControlItem5.Control = imgCmbPlaceType; + layoutControlItem5.Location = new Point(155, 0); + layoutControlItem5.Name = "layoutControlItem5"; + layoutControlItem5.Size = new Size(155, 28); + layoutControlItem5.Text = "<color=red>*</color>鍦烘墍绫诲瀷:"; + layoutControlItem5.TextSize = new Size(73, 18); + // + // layoutControlItem6 + // + layoutControlItem6.Control = txtTagName; + layoutControlItem6.Location = new Point(155, 28); + layoutControlItem6.Name = "layoutControlItem6"; + layoutControlItem6.Size = new Size(155, 28); + layoutControlItem6.Text = "鏍囧織:"; + layoutControlItem6.TextSize = new Size(73, 18); + // + // layoutControlItem4 + // + layoutControlItem4.Control = txtAddress; + layoutControlItem4.Location = new Point(0, 56); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(310, 92); + layoutControlItem4.Text = "鍦板潃:"; + layoutControlItem4.TextSize = new Size(73, 18); + // + // layoutControlItem7 + // + layoutControlItem7.Control = setFlagsEditCtrl1; + layoutControlItem7.Location = new Point(0, 28); + layoutControlItem7.Name = "layoutControlItem7"; + layoutControlItem7.Size = new Size(155, 28); + layoutControlItem7.Text = "鏍囩:"; + layoutControlItem7.TextSize = new Size(73, 18); + // + // layoutControlGroup4 + // + layoutControlGroup4.GroupStyle = DevExpress.Utils.GroupStyle.Card; + layoutControlGroup4.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem8 }); + layoutControlGroup4.Location = new Point(494, 194); + layoutControlGroup4.Name = "layoutControlGroup4"; + layoutControlGroup4.OptionsTableLayoutItem.ColumnIndex = 1; + layoutControlGroup4.OptionsTableLayoutItem.RowIndex = 1; + layoutControlGroup4.Size = new Size(330, 260); + layoutControlGroup4.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup4.Text = "璇︾粏淇℃伅"; + // + // layoutControlItem8 + // + layoutControlItem8.Control = placeInfoCtrl1; + layoutControlItem8.Location = new Point(0, 0); + layoutControlItem8.Name = "layoutControlItem8"; + layoutControlItem8.Size = new Size(310, 214); + layoutControlItem8.TextSize = new Size(0, 0); + layoutControlItem8.TextVisible = false; + // + // layoutControlGroup1 + // + layoutControlGroup1.GroupStyle = DevExpress.Utils.GroupStyle.Card; + layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1 }); + layoutControlGroup1.Location = new Point(0, 0); + layoutControlGroup1.Name = "layoutControlGroup1"; + layoutControlGroup1.OptionsTableLayoutItem.RowSpan = 3; + layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup1.Size = new Size(494, 649); + layoutControlGroup1.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup1.Text = "鍦板浘"; + // + // layoutControlItem1 + // + layoutControlItem1.Control = mapSetSimpleMarkerContainer1; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlItem1.Size = new Size(492, 621); + layoutControlItem1.TextSize = new Size(0, 0); + layoutControlItem1.TextVisible = false; + // + // layoutControlGroup3 + // + layoutControlGroup3.GroupStyle = DevExpress.Utils.GroupStyle.Card; + layoutControlGroup3.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem3 }); + layoutControlGroup3.Location = new Point(494, 454); + layoutControlGroup3.Name = "layoutControlGroup3"; + layoutControlGroup3.OptionsTableLayoutItem.ColumnIndex = 1; + layoutControlGroup3.OptionsTableLayoutItem.RowIndex = 2; + layoutControlGroup3.Size = new Size(330, 195); + layoutControlGroup3.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup3.Text = "璇存槑"; + // + // layoutControlItem3 + // + layoutControlItem3.Control = txtDescription; + layoutControlItem3.Location = new Point(0, 0); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(310, 149); + layoutControlItem3.Text = "璇存槑"; + layoutControlItem3.TextSize = new Size(0, 0); + layoutControlItem3.TextVisible = false; + // + // dxErrorProvider1 + // + dxErrorProvider1.ContainerControl = this; + // + // QuickModelingPlaceWizardPage + // + AutoScaleDimensions = new SizeF(8F, 18F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(layoutControl1); + Margin = new Padding(3, 4, 3, 4); + Name = "QuickModelingPlaceWizardPage"; + Size = new Size(824, 649); + ((ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((ISupportInitialize)txtTagName.Properties).EndInit(); + ((ISupportInitialize)txtDescription.Properties).EndInit(); + ((ISupportInitialize)imgCmbPlaceType.Properties).EndInit(); + ((ISupportInitialize)txtName.Properties).EndInit(); + ((ISupportInitialize)txtAddress.Properties).EndInit(); + ((ISupportInitialize)Root).EndInit(); + ((ISupportInitialize)layoutControlGroup2).EndInit(); + ((ISupportInitialize)layoutControlItem2).EndInit(); + ((ISupportInitialize)layoutControlItem5).EndInit(); + ((ISupportInitialize)layoutControlItem6).EndInit(); + ((ISupportInitialize)layoutControlItem4).EndInit(); + ((ISupportInitialize)layoutControlItem7).EndInit(); + ((ISupportInitialize)layoutControlGroup4).EndInit(); + ((ISupportInitialize)layoutControlItem8).EndInit(); + ((ISupportInitialize)layoutControlGroup1).EndInit(); + ((ISupportInitialize)layoutControlItem1).EndInit(); + ((ISupportInitialize)layoutControlGroup3).EndInit(); + ((ISupportInitialize)layoutControlItem3).EndInit(); + ((ISupportInitialize)dxErrorProvider1).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private MapSetSimpleMarkerContainer mapSetSimpleMarkerContainer1; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private TextEdit txtName; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private SetFlagsEditCtrl setFlagsEditCtrl1; + private TextEdit txtTagName; + private MemoEdit txtDescription; + private ImageComboBoxEdit imgCmbPlaceType; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private TextEdit txtAddress; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private PlaceInfoCtrl placeInfoCtrl1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + } +} diff --git "a/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/QuickModelingPlaceWizardPage - \345\244\215\345\210\266.cs" "b/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/QuickModelingPlaceWizardPage - \345\244\215\345\210\266.cs" new file mode 100644 index 0000000..5aab912 --- /dev/null +++ "b/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/QuickModelingPlaceWizardPage - \345\244\215\345\210\266.cs" @@ -0,0 +1,207 @@ +锘縩amespace PBS.WinFrmUI.Hydro +{ + public partial class QuickModelingPlaceWizardPage : DevExpress.XtraEditors.XtraUserControl, IWizardPageAsync<QuickModelingViewModel> + { + public QuickModelingPlaceWizardPage() + { + InitializeComponent(); + this.layoutControl1.SetupLayoutControl(); + this.mapSetSimpleMarkerContainer1.LoadCompletedEvent += MapSetSimpleMarkerContainer1_LoadCompletedEvent; + this.mapSetSimpleMarkerContainer1.SetMarkerEvent += MapSetSimpleMarkerContainer1_SetMarkerEvent; + this.imgCmbPlaceType.Properties.AddEnum<PBS.ePlaceType>(); + } + + /// <summary> + /// 鐘舵�佹敼鍙樹簨浠� + /// </summary> + public event Action PageStateChangedEvent; + + private QuickModelingViewModel _vm = null;//鎿嶄綔瀵硅薄 + private bool _isCompleted = false;//鏄惁鍒涘缓瀹屾垚 + + + + /// <summary> + /// 鍒濆鍖栭〉闈� + /// </summary> + public async void InitialPage(QuickModelingViewModel vm) + { + if (vm == null) + { + return; + } + _vm = vm; + _isCompleted = false; + + if (!this.mapSetSimpleMarkerContainer1.IsInitialized) + { + await this.mapSetSimpleMarkerContainer1.InitialContainer(); + } + + this.txtName.EditValue = _vm.Place.Name; + this.txtTagName.EditValue = _vm.Place.TagName; + this.txtAddress.EditValue = _vm.Place.Address; + this.txtDescription.EditValue = _vm.Place.Description; + this.placeInfoCtrl1.Set(_vm.Place.PlaceType, _vm.Place.PlaceInfo); + var allFlagsList = await BLLFactory<Yw.BLL.SysFlag>.Instance.GetBySysType(DataType.PBSPlace); + this.setFlagsEditCtrl1.SetBindingData(allFlagsList?.Select(x => x.Name).Distinct().ToList(), _vm.Place.Flags); + this.imgCmbPlaceType.EditValue = _vm.Place.PlaceType; + + _isCompleted = true; + this.PageStateChangedEvent?.Invoke(); + } + + + //鍔犺浇瀹屾垚浜嬩欢 + private async void MapSetSimpleMarkerContainer1_LoadCompletedEvent() + { + if (_vm.Marker != null) + { + await this.mapSetSimpleMarkerContainer1.LoadMarker(_vm.Marker); + } + } + + //璁剧疆 + private void MapSetSimpleMarkerContainer1_SetMarkerEvent(Yw.Model.Map.Marker obj) + { + _vm.Marker = obj; + this.txtAddress.EditValue = obj.Address; + } + + + //鍦烘墍绫诲瀷鍙樻崲 + private void imgCmbPlaceType_EditValueChanged(object sender, EventArgs e) + { + var placeType = (PBS.ePlaceType)this.imgCmbPlaceType.EditValue; + this.placeInfoCtrl1.Set(placeType); + } + + //楠岃瘉 + private bool Verify() + { + return this.Invoke(() => + { + var isExist = true; + this.dxErrorProvider1.ClearErrors(); + var name = this.txtName.Text.Trim(); + if (string.IsNullOrEmpty(name)) + { + this.dxErrorProvider1.SetError(this.txtName, "蹇呭~椤�"); + isExist= false; + } + if (!this.placeInfoCtrl1.Verify()) + { + isExist = false; + } + if (_vm.Marker==null) + { + isExist = false; + TipFormHelper.ShowWarn("璇疯缃湴鍥句俊鎭紒"); + } + return isExist; + }); + } + + //淇濆瓨 + private bool Save() + { + if (!Verify()) + { + return false; + } + + _vm.Place.Name = this.txtName.Text.Trim(); + _vm.Place.PlaceType = (ePlaceType)this.imgCmbPlaceType.EditValue; + _vm.Place.Flags = this.setFlagsEditCtrl1.SelectedFlagList; + _vm.Place.TagName = this.txtTagName.Text.Trim(); + _vm.Place.Address = this.txtAddress.Text.Trim(); + _vm.Place.Description = this.txtDescription.Text.Trim(); + _vm.Place.PlaceInfo=this.placeInfoCtrl1.Get(); + + return true; + } + + + /// <summary> + /// 鍏佽涓婁竴姝� + /// </summary> + public bool AllowPrev + { + get + { + return false; + } + } + + /// <summary> + /// 鍏佽涓嬩竴姝� + /// </summary> + public bool AllowNext + { + get + { + if (!_isCompleted) + { + return false; + } + return true; + } + } + + /// <summary> + /// 鍏佽鍙栨秷 + /// </summary> + public bool AllowCancel + { + get + { + return false; + } + } + + /// <summary> + /// 鍏佽瀹屾垚 + /// </summary> + public bool AllowComplete + { + get + { + return false; + } + } + + /// <summary> + /// 鑳藉惁涓婁竴姝� + /// </summary> + /// <returns></returns> + public Task<bool> CanPrev() + { + return Task.Run(() => this.AllowPrev); + } + + /// <summary> + /// 鑳藉惁涓嬩竴姝� + /// </summary> + public Task<bool> CanNext() + { + return Task.Run(() => Save()); + } + + /// <summary> + /// 鑳藉惁鍙栨秷 + /// </summary> + public Task<bool> CanCancel() + { + return Task.Run(() => this.AllowCancel); + } + + /// <summary> + /// 鑳藉惁瀹屾垚 + /// </summary> + public Task<bool> CanComplete() + { + return Task.Run(() => this.AllowComplete); + } + + } +} \ No newline at end of file diff --git "a/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/QuickModelingPlaceWizardPage - \345\244\215\345\210\266.resx" "b/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/QuickModelingPlaceWizardPage - \345\244\215\345\210\266.resx" new file mode 100644 index 0000000..43b467c --- /dev/null +++ "b/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/QuickModelingPlaceWizardPage - \345\244\215\345\210\266.resx" @@ -0,0 +1,123 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/QuickModelingPlaceWizardPage.Designer.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/QuickModelingPlaceWizardPage.Designer.cs index 99cf2b7..0fa45f8 100644 --- a/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/QuickModelingPlaceWizardPage.Designer.cs +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/QuickModelingPlaceWizardPage.Designer.cs @@ -29,18 +29,17 @@ private void InitializeComponent() { components = new Container(); - DevExpress.XtraLayout.ColumnDefinition columnDefinition1 = new DevExpress.XtraLayout.ColumnDefinition(); - DevExpress.XtraLayout.ColumnDefinition columnDefinition2 = new DevExpress.XtraLayout.ColumnDefinition(); - DevExpress.XtraLayout.RowDefinition rowDefinition1 = new DevExpress.XtraLayout.RowDefinition(); - DevExpress.XtraLayout.RowDefinition rowDefinition2 = new DevExpress.XtraLayout.RowDefinition(); - DevExpress.XtraLayout.RowDefinition rowDefinition3 = new DevExpress.XtraLayout.RowDefinition(); + DevExpress.XtraLayout.ColumnDefinition columnDefinition3 = new DevExpress.XtraLayout.ColumnDefinition(); + DevExpress.XtraLayout.ColumnDefinition columnDefinition4 = new DevExpress.XtraLayout.ColumnDefinition(); + DevExpress.XtraLayout.RowDefinition rowDefinition4 = new DevExpress.XtraLayout.RowDefinition(); + DevExpress.XtraLayout.RowDefinition rowDefinition5 = new DevExpress.XtraLayout.RowDefinition(); + DevExpress.XtraLayout.RowDefinition rowDefinition6 = new DevExpress.XtraLayout.RowDefinition(); layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); placeInfoCtrl1 = new PlaceInfoCtrl(); setFlagsEditCtrl1 = new SetFlagsEditCtrl(); txtTagName = new TextEdit(); txtDescription = new MemoEdit(); imgCmbPlaceType = new ImageComboBoxEdit(); - mapSetSimpleMarkerContainer1 = new MapSetSimpleMarkerContainer(); txtName = new TextEdit(); txtAddress = new TextEdit(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); @@ -53,10 +52,11 @@ layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); - layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + webView = new Microsoft.Web.WebView2.WinForms.WebView2(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); ((ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((ISupportInitialize)txtTagName.Properties).BeginInit(); @@ -74,20 +74,21 @@ ((ISupportInitialize)layoutControlGroup4).BeginInit(); ((ISupportInitialize)layoutControlItem8).BeginInit(); ((ISupportInitialize)layoutControlGroup1).BeginInit(); - ((ISupportInitialize)layoutControlItem1).BeginInit(); ((ISupportInitialize)layoutControlGroup3).BeginInit(); ((ISupportInitialize)layoutControlItem3).BeginInit(); ((ISupportInitialize)dxErrorProvider1).BeginInit(); + ((ISupportInitialize)webView).BeginInit(); + ((ISupportInitialize)layoutControlItem1).BeginInit(); SuspendLayout(); // // layoutControl1 // + layoutControl1.Controls.Add(webView); layoutControl1.Controls.Add(placeInfoCtrl1); layoutControl1.Controls.Add(setFlagsEditCtrl1); layoutControl1.Controls.Add(txtTagName); layoutControl1.Controls.Add(txtDescription); layoutControl1.Controls.Add(imgCmbPlaceType); - layoutControl1.Controls.Add(mapSetSimpleMarkerContainer1); layoutControl1.Controls.Add(txtName); layoutControl1.Controls.Add(txtAddress); layoutControl1.Dock = DockStyle.Fill; @@ -144,17 +145,6 @@ imgCmbPlaceType.TabIndex = 3; imgCmbPlaceType.EditValueChanged += imgCmbPlaceType_EditValueChanged; // - // mapSetSimpleMarkerContainer1 - // - mapSetSimpleMarkerContainer1.BorderColor = Color.LightGray; - mapSetSimpleMarkerContainer1.BorderWidth = 1; - mapSetSimpleMarkerContainer1.Location = new Point(1, 27); - mapSetSimpleMarkerContainer1.Margin = new Padding(4, 4, 4, 4); - mapSetSimpleMarkerContainer1.Name = "mapSetSimpleMarkerContainer1"; - mapSetSimpleMarkerContainer1.ShowBorder = false; - mapSetSimpleMarkerContainer1.Size = new Size(492, 621); - mapSetSimpleMarkerContainer1.TabIndex = 0; - // // txtName // txtName.Location = new Point(591, 38); @@ -178,18 +168,18 @@ Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup2, layoutControlGroup4, layoutControlGroup1, layoutControlGroup3 }); Root.LayoutMode = DevExpress.XtraLayout.Utils.LayoutMode.Table; Root.Name = "Root"; - columnDefinition1.SizeType = SizeType.Percent; - columnDefinition1.Width = 60D; - columnDefinition2.SizeType = SizeType.Percent; - columnDefinition2.Width = 40D; - Root.OptionsTableLayoutGroup.ColumnDefinitions.AddRange(new DevExpress.XtraLayout.ColumnDefinition[] { columnDefinition1, columnDefinition2 }); - rowDefinition1.Height = 30D; - rowDefinition1.SizeType = SizeType.Percent; - rowDefinition2.Height = 40D; - rowDefinition2.SizeType = SizeType.Percent; - rowDefinition3.Height = 30D; - rowDefinition3.SizeType = SizeType.Percent; - Root.OptionsTableLayoutGroup.RowDefinitions.AddRange(new DevExpress.XtraLayout.RowDefinition[] { rowDefinition1, rowDefinition2, rowDefinition3 }); + columnDefinition3.SizeType = SizeType.Percent; + columnDefinition3.Width = 60D; + columnDefinition4.SizeType = SizeType.Percent; + columnDefinition4.Width = 40D; + Root.OptionsTableLayoutGroup.ColumnDefinitions.AddRange(new DevExpress.XtraLayout.ColumnDefinition[] { columnDefinition3, columnDefinition4 }); + rowDefinition4.Height = 30D; + rowDefinition4.SizeType = SizeType.Percent; + rowDefinition5.Height = 40D; + rowDefinition5.SizeType = SizeType.Percent; + rowDefinition6.Height = 30D; + rowDefinition6.SizeType = SizeType.Percent; + Root.OptionsTableLayoutGroup.RowDefinitions.AddRange(new DevExpress.XtraLayout.RowDefinition[] { rowDefinition4, rowDefinition5, rowDefinition6 }); Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); Root.Size = new Size(824, 649); Root.TextVisible = false; @@ -287,16 +277,6 @@ layoutControlGroup1.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); layoutControlGroup1.Text = "鍦板浘"; // - // layoutControlItem1 - // - layoutControlItem1.Control = mapSetSimpleMarkerContainer1; - layoutControlItem1.Location = new Point(0, 0); - layoutControlItem1.Name = "layoutControlItem1"; - layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); - layoutControlItem1.Size = new Size(492, 621); - layoutControlItem1.TextSize = new Size(0, 0); - layoutControlItem1.TextVisible = false; - // // layoutControlGroup3 // layoutControlGroup3.GroupStyle = DevExpress.Utils.GroupStyle.Card; @@ -323,6 +303,27 @@ // dxErrorProvider1.ContainerControl = this; // + // webView + // + webView.AllowExternalDrop = true; + webView.CreationProperties = null; + webView.DefaultBackgroundColor = Color.White; + webView.Location = new Point(1, 27); + webView.Name = "webView"; + webView.Size = new Size(492, 621); + webView.TabIndex = 9; + webView.ZoomFactor = 1D; + // + // layoutControlItem1 + // + layoutControlItem1.Control = webView; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlItem1.Size = new Size(492, 621); + layoutControlItem1.TextSize = new Size(0, 0); + layoutControlItem1.TextVisible = false; + // // QuickModelingPlaceWizardPage // AutoScaleDimensions = new SizeF(8F, 18F); @@ -348,10 +349,11 @@ ((ISupportInitialize)layoutControlGroup4).EndInit(); ((ISupportInitialize)layoutControlItem8).EndInit(); ((ISupportInitialize)layoutControlGroup1).EndInit(); - ((ISupportInitialize)layoutControlItem1).EndInit(); ((ISupportInitialize)layoutControlGroup3).EndInit(); ((ISupportInitialize)layoutControlItem3).EndInit(); ((ISupportInitialize)dxErrorProvider1).EndInit(); + ((ISupportInitialize)webView).EndInit(); + ((ISupportInitialize)layoutControlItem1).EndInit(); ResumeLayout(false); } @@ -359,9 +361,7 @@ private DevExpress.XtraLayout.LayoutControl layoutControl1; private DevExpress.XtraLayout.LayoutControlGroup Root; - private MapSetSimpleMarkerContainer mapSetSimpleMarkerContainer1; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private TextEdit txtName; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; @@ -380,5 +380,7 @@ private PlaceInfoCtrl placeInfoCtrl1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + private Microsoft.Web.WebView2.WinForms.WebView2 webView; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; } } diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/QuickModelingPlaceWizardPage.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/QuickModelingPlaceWizardPage.cs index 5aab912..1406762 100644 --- a/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/QuickModelingPlaceWizardPage.cs +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/QuickModelingPlaceWizardPage.cs @@ -1,4 +1,6 @@ -锘縩amespace PBS.WinFrmUI.Hydro +锘縰sing Microsoft.Web.WebView2.Core; + +namespace PBS.WinFrmUI.Hydro { public partial class QuickModelingPlaceWizardPage : DevExpress.XtraEditors.XtraUserControl, IWizardPageAsync<QuickModelingViewModel> { @@ -6,9 +8,7 @@ { InitializeComponent(); this.layoutControl1.SetupLayoutControl(); - this.mapSetSimpleMarkerContainer1.LoadCompletedEvent += MapSetSimpleMarkerContainer1_LoadCompletedEvent; - this.mapSetSimpleMarkerContainer1.SetMarkerEvent += MapSetSimpleMarkerContainer1_SetMarkerEvent; - this.imgCmbPlaceType.Properties.AddEnum<PBS.ePlaceType>(); + this.imgCmbPlaceType.Properties.AddEnum<PBS.ePlaceType>(); } /// <summary> @@ -18,7 +18,7 @@ private QuickModelingViewModel _vm = null;//鎿嶄綔瀵硅薄 private bool _isCompleted = false;//鏄惁鍒涘缓瀹屾垚 - + private bool _isInitialMap = false;//鏄惁鍒濆鍖栧湴鍥� /// <summary> @@ -33,9 +33,10 @@ _vm = vm; _isCompleted = false; - if (!this.mapSetSimpleMarkerContainer1.IsInitialized) + if (!_isInitialMap) { - await this.mapSetSimpleMarkerContainer1.InitialContainer(); + this.webView.Source = new Uri(AppDomain.CurrentDomain.BaseDirectory + "/web/html/map_select.html"); + this.webView.WebMessageReceived += WebView_WebMessageReceived; } this.txtName.EditValue = _vm.Place.Name; @@ -51,22 +52,220 @@ this.PageStateChangedEvent?.Invoke(); } - - //鍔犺浇瀹屾垚浜嬩欢 - private async void MapSetSimpleMarkerContainer1_LoadCompletedEvent() + public class AmapLocationViewModel { - if (_vm.Marker != null) + public AmapLocationViewModel() { - await this.mapSetSimpleMarkerContainer1.LoadMarker(_vm.Marker); + location = new Location(); + } + public string id { get; set; } + public string name { get; set; } + public string address { get; set; } + public Location location { get; set; } + public long BuildTypeID { get; set; } + public string NorthEast { get; set; } + public string SouthWest { get; set; } + + } + public class FixationReceivedViewModel + { + public string Oper { get; set; } + + public string Json { get; set; } + } + + public new class Location + { + public float lng { get; set; } + public float lat { get; set; } + } + + public class Coordinate + { + public Coordinate(double lat, double lon) + { + this.lat = lat; + this.lon = lon; + } + /// <summary> + /// 绾害 + /// </summary> + public double lat { get; set; } + /// <summary> + /// 缁忓害 + /// </summary> + public double lon { get; set; } + } + + + public static class AmapBounds + { + public static double Distance(Coordinate coordinate1, Coordinate coordinate2) + { + var a = coordinate1; + var lat1 = a.lat; + var lon1 = a.lon; + var b = coordinate2; + var lat2 = b.lat; + var lon2 = b.lon; + + if (lat1 == lat2 && lon1 == lon2) + { + return 0; + } + + a.lon = VC(a.lon, -180, 180); + a.lat = aD(a.lat, -74, 74); + b.lon = VC(b.lon, -180, 180); + b.lat = aD(b.lat, -74, 74); + double ret; + ret = JF(JK(a.lon), JK(b.lon), JK(a.lat), JK(b.lat)); + return ret; + } + public static double aD(double a, double b, double c) + { + if (b != null) + { + a = Math.Max(a, b); + } + if (b != null) + { + a = Math.Min(a, c); + } + return a; + } + public static double VC(double a, double b, double c) + { + if (a > c) + { + a -= c - b; + } + if (a < b) + { + a += c - b; + } + return a; + } + public static double JK(double a) + { + double ret = Math.PI * a / 180.0; + return ret; + } + public static double JF(double a, double b, double c, double e) + { + const double Ou = 6370996.81; + return Ou * Math.Acos(Math.Sin(c) * Math.Sin(e) + Math.Cos(c) * Math.Cos(e) * Math.Cos(b - a)); } } - //璁剧疆 - private void MapSetSimpleMarkerContainer1_SetMarkerEvent(Yw.Model.Map.Marker obj) + private async void CaptureImage() { - _vm.Marker = obj; - this.txtAddress.EditValue = obj.Address; + await webView.EnsureCoreWebView2Async(); + CoreWebView2 coreWebView = webView.CoreWebView2; + int pageWidth = webView.ClientSize.Width; + int pageHeight = webView.ClientSize.Height; + webView.Width = pageWidth; + webView.Height = pageHeight; + + var directory = Path.GetDirectoryName(_vm.tempBackgroundImageUrl); + if (!Directory.Exists(directory)) + { + Directory.CreateDirectory(directory); + } + var fileStream = new FileStream(_vm.tempBackgroundImageUrl + "_t.png", FileMode.Create); + await coreWebView.CapturePreviewAsync(CoreWebView2CapturePreviewImageFormat.Png, fileStream); + var bt = new Bitmap(fileStream); + var pWidth = pageWidth - 50; + var pHeight = pageHeight - 50; + try + { + bt.Clone(new Rectangle(50, 50, pWidth, pHeight), System.Drawing.Imaging.PixelFormat.DontCare).Save(_vm.tempBackgroundImageUrl); + } + catch (Exception ex) + { + } + fileStream.Close(); + var screen = Screen.PrimaryScreen; + var bound = screen.Bounds; + var bo = (double)bound.Height / bound.Width; + var dpi = Math.Round(bo, 3);//0.56 + fileStream.Dispose(); + + #region 闀垮璁$畻 + + double lat = Convert.ToDouble(_vm.NorthEast.Split(',')[1]); + double lon = Convert.ToDouble(_vm.NorthEast.Split(',')[0]); + //鍙充笂瑙掑潗鏍� + Coordinate coordinate1 = new Coordinate(lat, lon); + + double lat2 = Convert.ToDouble(_vm.SouthWest.Split(',')[1]); + double lon2 = Convert.ToDouble(_vm.SouthWest.Split(',')[0]); + //宸︿笅瑙掑潗鏍� + Coordinate coordinate2 = new Coordinate(lat2, lon2); + + //鍙充笅瑙掑潗鏍� + Coordinate coordinate3 = new Coordinate(coordinate1.lat, coordinate2.lon); + + //宸︿笂瑙掑潗鏍� + Coordinate coordinate4 = new Coordinate(coordinate2.lat, coordinate1.lon); + //璋冪敤Distance鏂规硶璁$畻涓ょ偣涔嬮棿鐨勮窛绂� + //甯垜璁$畻coordinate1鍜宑oordinate4涔嬮棿鐨勮窛绂� + + double distanceHeight = AmapBounds.Distance(coordinate1, coordinate4); + double distanceWidth = AmapBounds.Distance(coordinate1, coordinate3); + _vm.BackgroundWidth = distanceWidth; + _vm.BackgroundHeight = distanceHeight; + var w = pageWidth / _vm.BackgroundWidth; + var h = pageHeight / _vm.BackgroundHeight; + _vm.Zoom = w > h ? w : h; + + #endregion 闀垮璁$畻 + + _vm.IsCaptureImage = true; + File.Delete(_vm.tempBackgroundImageUrl + "_t.png"); } + + private void WebView_WebMessageReceived(object sender, Microsoft.Web.WebView2.Core.CoreWebView2WebMessageReceivedEventArgs e) + { + var j = JsonHelper.Json2Object<FixationReceivedViewModel>(e.WebMessageAsJson); + switch (j.Oper) + { + case "loadCompleted": + + var obl = JsonHelper.Json2Object<AmapLocationViewModel>(j.Json); + _vm.NorthEast = obl.NorthEast; + _vm.SouthWest = obl.SouthWest; + break; + + case "save": + if (string.IsNullOrEmpty(_vm.SouthWest)) + { + TipFormHelper.ShowWarn("鍏堣杈撳叆鍏抽敭瀛楁煡鎵惧埌寤虹瓚!"); + return; + } + + CaptureImage(); + + break; + case "getMapBounds": + var ob = JsonHelper.Json2Object<AmapLocationViewModel>(j.Json); + _vm.NorthEast = ob.NorthEast; + _vm.SouthWest = ob.SouthWest; + break; + + case "getLocation": + var o = JsonHelper.Json2Object<AmapLocationViewModel>(j.Json); + _vm.Marker = new Yw.Model.Map.Marker(); + _vm.Marker.Point = new Yw.Model.Map.Point(o.location.lng, o.location.lat); + _vm.Marker.Address = o.name + o.address; + this.txtAddress.Text = _vm.Marker.Address; + break; + case "showMessage": + TipFormHelper.ShowInfo(j.Json.ToString()); + break; + } + } + //鍦烘墍绫诲瀷鍙樻崲 @@ -93,11 +292,16 @@ { isExist = false; } - if (_vm.Marker==null) + if (!_vm.IsCaptureImage) { isExist = false; TipFormHelper.ShowWarn("璇疯缃湴鍥句俊鎭紒"); } + //if (_vm.Marker==null) + //{ + // isExist = false; + // TipFormHelper.ShowWarn("璇疯缃湴鍥句俊鎭紒"); + //} return isExist; }); } diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/info/SchoolPlaceInfoCtrl.Designer.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/info/SchoolPlaceInfoCtrl.Designer.cs index 7273432..8ac0216 100644 --- a/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/info/SchoolPlaceInfoCtrl.Designer.cs +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/info/SchoolPlaceInfoCtrl.Designer.cs @@ -128,8 +128,7 @@ Controls.Add(layoutControl1); Margin = new Padding(2, 3, 2, 3); Name = "SchoolPlaceInfoCtrl"; - Size = new Size(600, 200); - Load += SchoolWizardForm_Load; + Size = new Size(600, 200); ((ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); ((ISupportInitialize)cbLevel.Properties).EndInit(); diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/info/SchoolPlaceInfoCtrl.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/info/SchoolPlaceInfoCtrl.cs index b1145ef..9293303 100644 --- a/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/info/SchoolPlaceInfoCtrl.cs +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/info/SchoolPlaceInfoCtrl.cs @@ -1,6 +1,4 @@ -锘縰sing PBS.Model; - -namespace PBS.WinFrmUI +锘縩amespace PBS.WinFrmUI { public partial class SchoolPlaceInfoCtrl : DevExpress.XtraEditors.XtraUserControl, IPlaceInfo { @@ -41,76 +39,6 @@ return _model.ToJson(); } - //鍩虹楠岃瘉 - public bool Valid() - { - bool isExist = true; - this.dxErrorProvider1.ClearErrors(); - - return isExist; - } - - public PlaceSchoolParasInfoVmo GetData() - { - if (!Valid()) - { - return null; - } - var m = new PlaceSchoolParasInfoVmo() - { - /*Address = txtAddress.Text, - Area = (long?)this.cbArea.EditValue, - City = (long?)this.cbCity.EditValue, - Dist = (long?)this.cbDist.EditValue, - Name = txtName.Text,*/ - SchoolType = cbSchoolType.Text, - Level = cbLevel.Text, - }; - - return m; - } - - public void SetData(PlaceSchoolParasInfoVmo model) - { - if (model == null) return; - /* txtAddress.Text = model.Address; - - txtName.Text = model.Name.ToString();*/ - - /* cbArea.EditValue = model.Area; - cbCity.EditValue = model.City; - cbDist.EditValue = model.Dist;*/ - } - - private void SchoolWizardForm_Load(object sender, EventArgs e) - { - /* var allProvince = new BLL.Region().GetAll().Where(x => x.Type == eRegionType.Province).ToList(); - foreach (var item in allProvince) - { - var imageItem = new ImageComboBoxItem(item.Name, item.ID); - cbArea.Properties.Items.Add(imageItem); - //鍩庡競娣诲姞鐪佷唤鍙槸涓轰簡涓存椂鐢�,鍚庢湡浼氭洿鏀� - cbCity.Properties.Items.Add(imageItem); - } - ValueChangeEvent(); //涓轰簡缂栬緫椤甸潰鐨勬椂鍊欏彲浠ラ�変腑鎵�閫夐」*/ - } - - private void cbDist_SelectedIndexChanged(object sender, EventArgs e) - { - ValueChangeEvent(); - } - - private void ValueChangeEvent() - { - /* if (cbArea.EditValue != null) - { - var AllDist = new BLL.Region().GetChildrenByID((long)cbArea.EditValue); - foreach (var item in AllDist) - { - var imageItem = new ImageComboBoxItem(item.Name, item.ID); - cbDist.Properties.Items.Add(imageItem); - } - }*/ - } + } } \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/ModelEditPage.Designer.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/00-core/ModelEditPage.Designer.cs similarity index 86% rename from WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/ModelEditPage.Designer.cs rename to WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/00-core/ModelEditPage.Designer.cs index 775bc2a..098b949 100644 --- a/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/ModelEditPage.Designer.cs +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/00-core/ModelEditPage.Designer.cs @@ -38,9 +38,6 @@ components = new Container(); ComponentResourceManager resources = new ComponentResourceManager(typeof(ModelEditPage)); ribbonControl1 = new DevExpress.XtraBars.Ribbon.RibbonControl(); - barBtnAddModelTemplate = new DevExpress.XtraBars.BarButtonItem(); - barBtnEditModelTemplate = new DevExpress.XtraBars.BarButtonItem(); - barBtnDeleteModelTemplate = new DevExpress.XtraBars.BarButtonItem(); barBtnAddBaseMap = new DevExpress.XtraBars.BarButtonItem(); barBtnSetBaseMap = new DevExpress.XtraBars.BarButtonItem(); barCekBaseMapVisible = new DevExpress.XtraBars.BarCheckItem(); @@ -53,6 +50,11 @@ barBtnFrontView = new DevExpress.XtraBars.BarButtonItem(); barBtnImportInp = new DevExpress.XtraBars.BarButtonItem(); barBtnSaveModelTemplate = new DevExpress.XtraBars.BarButtonItem(); + barBtnModelTemplate = new DevExpress.XtraBars.BarButtonItem(); + barBtnConnectivityCheck = new DevExpress.XtraBars.BarButtonItem(); + barBtnVerticalPipeDiameter = new DevExpress.XtraBars.BarButtonItem(); + barBtnHorizontalPipeDiameter = new DevExpress.XtraBars.BarButtonItem(); + barBtnElevationTranslation = new DevExpress.XtraBars.BarButtonItem(); ribbonPage = new DevExpress.XtraBars.Ribbon.RibbonPage(); ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); ribbonPageGroup2 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); @@ -81,10 +83,8 @@ toolTipController1 = new ToolTipController(components); panelControl1 = new PanelControl(); dockManager1 = new DevExpress.XtraBars.Docking.DockManager(components); - dockPanel2 = new DevExpress.XtraBars.Docking.DockPanel(); dockPanelModelTemplate = new DevExpress.XtraBars.Docking.DockPanel(); dockPanel1_Container = new DevExpress.XtraBars.Docking.ControlContainer(); - modelTemplateTreeListCtrl1 = new ModelTemplateTreeListCtrl(); dockPanelModelProperty = new DevExpress.XtraBars.Docking.DockPanel(); dockPanel2_Container = new DevExpress.XtraBars.Docking.ControlContainer(); dockPanel3 = new DevExpress.XtraBars.Docking.DockPanel(); @@ -92,9 +92,7 @@ ((ISupportInitialize)ribbonControl1).BeginInit(); ((ISupportInitialize)panelControl1).BeginInit(); ((ISupportInitialize)dockManager1).BeginInit(); - dockPanel2.SuspendLayout(); dockPanelModelTemplate.SuspendLayout(); - dockPanel1_Container.SuspendLayout(); dockPanelModelProperty.SuspendLayout(); SuspendLayout(); // @@ -103,10 +101,10 @@ ribbonControl1.EmptyAreaImageOptions.ImagePadding = new Padding(34, 39, 34, 39); ribbonControl1.ExpandCollapseItem.Id = 0; ribbonControl1.ItemPanelStyle = DevExpress.XtraBars.Ribbon.RibbonItemPanelStyle.Classic; - ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, barBtnAddModelTemplate, barBtnEditModelTemplate, barBtnDeleteModelTemplate, barBtnAddBaseMap, barBtnSetBaseMap, barCekBaseMapVisible, barBtnClearBaseMap, barBtnFullView, barBtnDefaultView, barBtnResetView, barBtnTopView, barBtnSaveView, barBtnFrontView, barBtnImportInp, barBtnSaveModelTemplate }); + ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, barBtnAddBaseMap, barBtnSetBaseMap, barCekBaseMapVisible, barBtnClearBaseMap, barBtnFullView, barBtnDefaultView, barBtnResetView, barBtnTopView, barBtnSaveView, barBtnFrontView, barBtnImportInp, barBtnSaveModelTemplate, barBtnModelTemplate, barBtnConnectivityCheck, barBtnVerticalPipeDiameter, barBtnHorizontalPipeDiameter, barBtnElevationTranslation }); ribbonControl1.Location = new Point(0, 0); ribbonControl1.Margin = new Padding(3, 4, 3, 4); - ribbonControl1.MaxItemId = 56; + ribbonControl1.MaxItemId = 61; ribbonControl1.Name = "ribbonControl1"; ribbonControl1.OptionsMenuMinWidth = 377; ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage }); @@ -115,30 +113,6 @@ ribbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide; ribbonControl1.Size = new Size(1007, 157); ribbonControl1.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Hidden; - // - // barBtnAddModelTemplate - // - barBtnAddModelTemplate.Caption = "娣诲姞"; - barBtnAddModelTemplate.Id = 40; - barBtnAddModelTemplate.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnAddModelTemplate.ImageOptions.SvgImage"); - barBtnAddModelTemplate.Name = "barBtnAddModelTemplate"; - barBtnAddModelTemplate.ItemClick += barBtnAddModelTemplate_ItemClick; - // - // barBtnEditModelTemplate - // - barBtnEditModelTemplate.Caption = "缂栬緫"; - barBtnEditModelTemplate.Id = 41; - barBtnEditModelTemplate.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnEditModelTemplate.ImageOptions.SvgImage"); - barBtnEditModelTemplate.Name = "barBtnEditModelTemplate"; - barBtnEditModelTemplate.ItemClick += barBtnEditModelTemplate_ItemClick; - // - // barBtnDeleteModelTemplate - // - barBtnDeleteModelTemplate.Caption = "鍒犻櫎"; - barBtnDeleteModelTemplate.Id = 42; - barBtnDeleteModelTemplate.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnDeleteModelTemplate.ImageOptions.SvgImage"); - barBtnDeleteModelTemplate.Name = "barBtnDeleteModelTemplate"; - barBtnDeleteModelTemplate.ItemClick += barBtnDeleteModelTemplate_ItemClick; // // barBtnAddBaseMap // @@ -238,6 +212,46 @@ barBtnSaveModelTemplate.Name = "barBtnSaveModelTemplate"; barBtnSaveModelTemplate.ItemClick += barBtnSaveModelTemplate_ItemClick; // + // barBtnModelTemplate + // + barBtnModelTemplate.Caption = "妯″瀷妯℃澘"; + barBtnModelTemplate.Id = 56; + barBtnModelTemplate.ImageOptions.SvgImage = Properties.Resources.connector; + barBtnModelTemplate.Name = "barBtnModelTemplate"; + barBtnModelTemplate.ItemClick += barBtnModelTemplate_ItemClick; + // + // barBtnConnectivityCheck + // + barBtnConnectivityCheck.Caption = "鑱旈�氭�ф鏌�"; + barBtnConnectivityCheck.Id = 57; + barBtnConnectivityCheck.ImageOptions.SvgImage = Properties.Resources.actions_checkcircled; + barBtnConnectivityCheck.Name = "barBtnConnectivityCheck"; + barBtnConnectivityCheck.ItemClick += barBtnConnectivityCheck_ItemClick; + // + // barBtnVerticalPipeDiameter + // + barBtnVerticalPipeDiameter.Caption = "绔嬬鍙e緞"; + barBtnVerticalPipeDiameter.Id = 58; + barBtnVerticalPipeDiameter.ImageOptions.SvgImage = Properties.Resources.flipimage_horizontal; + barBtnVerticalPipeDiameter.Name = "barBtnVerticalPipeDiameter"; + barBtnVerticalPipeDiameter.ItemClick += barBtnVerticalPipeDiameter_ItemClick; + // + // barBtnHorizontalPipeDiameter + // + barBtnHorizontalPipeDiameter.Caption = "妯鍙e緞"; + barBtnHorizontalPipeDiameter.Id = 59; + barBtnHorizontalPipeDiameter.ImageOptions.SvgImage = Properties.Resources.flipimage_vertical; + barBtnHorizontalPipeDiameter.Name = "barBtnHorizontalPipeDiameter"; + barBtnHorizontalPipeDiameter.ItemClick += barBtnHorizontalPipeDiameter_ItemClick; + // + // barBtnElevationTranslation + // + barBtnElevationTranslation.Caption = "鏍囬珮骞崇Щ"; + barBtnElevationTranslation.Id = 60; + barBtnElevationTranslation.ImageOptions.SvgImage = Properties.Resources.tableproperties; + barBtnElevationTranslation.Name = "barBtnElevationTranslation"; + barBtnElevationTranslation.ItemClick += barBtnElevationTranslation_ItemClick; + // // ribbonPage // ribbonPage.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { ribbonPageGroup1, ribbonPageGroup2, ribbonPageGroup3, ribbonPageGroup4 }); @@ -246,11 +260,13 @@ // // ribbonPageGroup1 // - ribbonPageGroup1.ItemLinks.Add(barBtnAddModelTemplate, true); - ribbonPageGroup1.ItemLinks.Add(barBtnEditModelTemplate); - ribbonPageGroup1.ItemLinks.Add(barBtnDeleteModelTemplate); + ribbonPageGroup1.ItemLinks.Add(barBtnModelTemplate); + ribbonPageGroup1.ItemLinks.Add(barBtnConnectivityCheck, true); + ribbonPageGroup1.ItemLinks.Add(barBtnVerticalPipeDiameter); + ribbonPageGroup1.ItemLinks.Add(barBtnHorizontalPipeDiameter); + ribbonPageGroup1.ItemLinks.Add(barBtnElevationTranslation); ribbonPageGroup1.Name = "ribbonPageGroup1"; - ribbonPageGroup1.Text = "妯″瀷妯℃澘"; + ribbonPageGroup1.Text = "蹇�熷缓妯�"; // // ribbonPageGroup2 // @@ -269,6 +285,7 @@ ribbonPageGroup3.ItemLinks.Add(barBtnFrontView); ribbonPageGroup3.ItemLinks.Add(barBtnResetView, true); ribbonPageGroup3.ItemLinks.Add(barBtnSaveView); + ribbonPageGroup3.ItemsLayout = DevExpress.XtraBars.Ribbon.RibbonPageGroupItemsLayout.TwoRows; ribbonPageGroup3.Name = "ribbonPageGroup3"; ribbonPageGroup3.Text = "瑙嗗浘"; // @@ -472,21 +489,10 @@ // dockManager1.DockingOptions.ShowCloseButton = false; dockManager1.Form = this; - dockManager1.RootPanels.AddRange(new DevExpress.XtraBars.Docking.DockPanel[] { dockPanel2 }); + dockManager1.HiddenPanels.AddRange(new DevExpress.XtraBars.Docking.DockPanel[] { dockPanelModelTemplate }); + dockManager1.RootPanels.AddRange(new DevExpress.XtraBars.Docking.DockPanel[] { dockPanelModelProperty }); dockManager1.Style = DevExpress.XtraBars.Docking2010.Views.DockingViewStyle.Light; dockManager1.TopZIndexControls.AddRange(new string[] { "DevExpress.XtraBars.BarDockControl", "DevExpress.XtraBars.StandaloneBarDockControl", "System.Windows.Forms.MenuStrip", "System.Windows.Forms.StatusStrip", "System.Windows.Forms.StatusBar", "DevExpress.XtraBars.Ribbon.RibbonStatusBar", "DevExpress.XtraBars.Ribbon.RibbonControl", "DevExpress.XtraBars.Navigation.OfficeNavigationBar", "DevExpress.XtraBars.Navigation.TileNavPane", "DevExpress.XtraBars.TabFormControl", "DevExpress.XtraBars.FluentDesignSystem.FluentDesignFormControl", "DevExpress.XtraBars.ToolbarForm.ToolbarFormControl" }); - // - // dockPanel2 - // - dockPanel2.Controls.Add(dockPanelModelTemplate); - dockPanel2.Controls.Add(dockPanelModelProperty); - dockPanel2.Dock = DevExpress.XtraBars.Docking.DockingStyle.Right; - dockPanel2.ID = new Guid("00b0d59d-81f4-40c6-b0bf-a2b1c596b96d"); - dockPanel2.Location = new Point(807, 157); - dockPanel2.Name = "dockPanel2"; - dockPanel2.OriginalSize = new Size(200, 200); - dockPanel2.Size = new Size(200, 719); - dockPanel2.Text = "panelContainer1"; // // dockPanelModelTemplate // @@ -497,45 +503,39 @@ dockPanelModelTemplate.Name = "dockPanelModelTemplate"; dockPanelModelTemplate.OriginalSize = new Size(200, 248); dockPanelModelTemplate.SavedDock = DevExpress.XtraBars.Docking.DockingStyle.Fill; - dockPanelModelTemplate.SavedIndex = 1; - dockPanelModelTemplate.SavedSizeFactor = 1.00139D; - dockPanelModelTemplate.SavedTabbed = true; + dockPanelModelTemplate.SavedIndex = 0; + dockPanelModelTemplate.SavedParent = dockPanelModelProperty; + dockPanelModelTemplate.SavedSizeFactor = 1.00209D; dockPanelModelTemplate.Size = new Size(200, 360); dockPanelModelTemplate.Text = "妯″瀷妯℃澘"; + dockPanelModelTemplate.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden; // // dockPanel1_Container // - dockPanel1_Container.Controls.Add(modelTemplateTreeListCtrl1); dockPanel1_Container.Location = new Point(1, 28); dockPanel1_Container.Name = "dockPanel1_Container"; dockPanel1_Container.Size = new Size(199, 332); dockPanel1_Container.TabIndex = 0; // - // modelTemplateTreeListCtrl1 - // - modelTemplateTreeListCtrl1.Dock = DockStyle.Fill; - modelTemplateTreeListCtrl1.Location = new Point(0, 0); - modelTemplateTreeListCtrl1.Margin = new Padding(3, 4, 3, 4); - modelTemplateTreeListCtrl1.Name = "modelTemplateTreeListCtrl1"; - modelTemplateTreeListCtrl1.Size = new Size(199, 332); - modelTemplateTreeListCtrl1.TabIndex = 0; - // // dockPanelModelProperty // dockPanelModelProperty.Controls.Add(dockPanel2_Container); - dockPanelModelProperty.Dock = DevExpress.XtraBars.Docking.DockingStyle.Fill; + dockPanelModelProperty.Dock = DevExpress.XtraBars.Docking.DockingStyle.Right; dockPanelModelProperty.ID = new Guid("af41a874-3629-4a50-927c-2b2441ca77bf"); - dockPanelModelProperty.Location = new Point(0, 360); + dockPanelModelProperty.Location = new Point(807, 157); dockPanelModelProperty.Name = "dockPanelModelProperty"; - dockPanelModelProperty.OriginalSize = new Size(200, 248); - dockPanelModelProperty.Size = new Size(200, 359); + dockPanelModelProperty.OriginalSize = new Size(200, 200); + dockPanelModelProperty.SavedDock = DevExpress.XtraBars.Docking.DockingStyle.Right; + dockPanelModelProperty.SavedIndex = 0; + dockPanelModelProperty.SavedSizeFactor = 0.9993D; + dockPanelModelProperty.Size = new Size(200, 719); dockPanelModelProperty.Text = "妯″瀷灞炴��"; // // dockPanel2_Container // - dockPanel2_Container.Location = new Point(1, 29); + dockPanel2_Container.Location = new Point(1, 28); dockPanel2_Container.Name = "dockPanel2_Container"; - dockPanel2_Container.Size = new Size(199, 330); + dockPanel2_Container.Size = new Size(199, 691); dockPanel2_Container.TabIndex = 0; // // dockPanel3 @@ -567,7 +567,7 @@ AutoScaleMode = AutoScaleMode.Font; Controls.Add(panelControl1); Controls.Add(toolboxControlDraw); - Controls.Add(dockPanel2); + Controls.Add(dockPanelModelProperty); Controls.Add(ribbonControl1); Margin = new Padding(3, 5, 3, 5); Name = "ModelEditPage"; @@ -575,9 +575,7 @@ ((ISupportInitialize)ribbonControl1).EndInit(); ((ISupportInitialize)panelControl1).EndInit(); ((ISupportInitialize)dockManager1).EndInit(); - dockPanel2.ResumeLayout(false); dockPanelModelTemplate.ResumeLayout(false); - dockPanel1_Container.ResumeLayout(false); dockPanelModelProperty.ResumeLayout(false); ResumeLayout(false); PerformLayout(); @@ -586,7 +584,6 @@ #endregion private DevExpress.XtraBars.Ribbon.RibbonControl ribbonControl1; private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage; - private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup1; private DevExpress.XtraToolbox.ToolboxControl toolboxControlDraw; private DevExpress.XtraToolbox.ToolboxGroup toolboxGroupOperate; private DevExpress.XtraToolbox.ToolboxItem toolboxItemSelect; @@ -598,9 +595,6 @@ private DevExpress.XtraToolbox.ToolboxItem toolboxItemAddWaterMeter; private DevExpress.XtraToolbox.ToolboxItem toolboxItemAddTank; private DevExpress.XtraToolbox.ToolboxItem toolboxItemAddReservoir; - private DevExpress.XtraBars.BarButtonItem barBtnAddModelTemplate; - private DevExpress.XtraBars.BarButtonItem barBtnEditModelTemplate; - private DevExpress.XtraBars.BarButtonItem barBtnDeleteModelTemplate; private DevExpress.XtraToolbox.ToolboxItem toolboxItemCopy; private DevExpress.XtraToolbox.ToolboxItem toolboxItemDelete; private DevExpress.XtraToolbox.ToolboxItem toolboxItemPaste; @@ -631,10 +625,14 @@ private DevExpress.XtraBars.Docking.ControlContainer dockPanel1_Container; private DevExpress.XtraBars.Docking.DockPanel dockPanelModelProperty; private DevExpress.XtraBars.Docking.ControlContainer dockPanel2_Container; - private ModelTemplateTreeListCtrl modelTemplateTreeListCtrl1; private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup4; private ToolTipController toolTipController1; private DevExpress.XtraBars.Docking.DockPanel dockPanel1; - private DevExpress.XtraBars.Docking.DockPanel dockPanel2; + private DevExpress.XtraBars.BarButtonItem barBtnModelTemplate; + private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup1; + private DevExpress.XtraBars.BarButtonItem barBtnConnectivityCheck; + private DevExpress.XtraBars.BarButtonItem barBtnVerticalPipeDiameter; + private DevExpress.XtraBars.BarButtonItem barBtnHorizontalPipeDiameter; + private DevExpress.XtraBars.BarButtonItem barBtnElevationTranslation; } } diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/00-core/ModelEditPage.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/00-core/ModelEditPage.cs new file mode 100644 index 0000000..36af036 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/00-core/ModelEditPage.cs @@ -0,0 +1,798 @@ +锘縰sing DevExpress.Drawing.Internal.Fonts.Interop; +using DevExpress.XtraPrinting.Native; +using Hydro; +using static System.Windows.Forms.VisualStyles.VisualStyleElement.Taskbar; + +namespace PBS.WinFrmUI.Hydro +{ + public partial class ModelEditPage : DocumentPage, IWizardPageAsync<QuickModelingViewModel> + { + public ModelEditPage() + { + InitializeComponent(); + //this.modelTemplateTreeListCtrl1.SelectModelTemplateEvent += ModelTemplateTreeListCtrl1_SelectModelTemplateEvent; + //this.modelTemplateTreeListCtrl1.RefreshDataEvent += () => { RefreshData(); }; + } + + + private FacilityVmo _facility = null; + private Template _template = null; + private MapViewer _mapView; + private PropertyForm _propertyForm; + + /// <summary> + /// 鍒濆鍖栨暟鎹簮 + /// </summary> + public override void InitialDataSource() + { + base.InitialDataSource(); + InitialMapViewer(); + } + + + /// <summary> + /// 鍒濆鍖栨暟鎹� + /// </summary> + public void InitialData(FacilityVmo obj) + { + if (obj == null) + { + _facility = null; + _template = null; + _mapView.Clear(); + return; + } + + if (string.IsNullOrEmpty(obj.ModelPath)) + { + var fullPath = Path.Combine(Directory.GetCurrentDirectory(), "Data\\Inp\\" + obj.ID + ".inp"); + var directoryPath = Path.GetDirectoryName(fullPath); + if (!Directory.Exists(directoryPath)) + Directory.CreateDirectory(directoryPath); + if (!File.Exists(fullPath)) + { + fullPath = Path.Combine(Directory.GetCurrentDirectory(), "Data\\Inp\\temp.inp"); + } + File.Create(fullPath).Close(); + + obj.ModelPath = fullPath; + } + + + if (string.IsNullOrEmpty(obj.ModelInfo)) + { + var templateTemp = new Template() + { + ID = obj.ID.ToString(), + Name = obj.Name, + Type = eModelTemplateType.Custom, + filePath = obj.ModelPath, + }; + if (_vm != null) + { + templateTemp.BackGroundImg_FullPath = _vm.tempBackgroundImageUrl; + templateTemp.BackGroundImgWidth = (float)_vm.BackgroundWidth; + templateTemp.BackGroundImgHeight = (float)_vm.BackgroundHeight; + templateTemp.BackGroundImgRotaAngle = 0; + templateTemp.BackGroundPoint1 = new PointF(0, 0); + } + obj.ModelInfo = Yw.JsonHelper.Object2Json(templateTemp); + + } + + _facility = obj; + _template = Yw.JsonHelper.Json2Object<Template>(obj.ModelInfo); + + + var template = _template; + template.network = new MapViewNetWork(); + template.network.BuildFromInp(Path.Combine(Directory.GetCurrentDirectory(), _template.filePath)); + _mapView.SetData(template); + } + + + + + + + //鍒濆鍖栬鍥� + private void InitialMapViewer() + { + _mapView = new MapViewer(); + //_mapView.Lock2DView = true; + _mapView.ShowPropertyForm = false; + //_mapView.Location = new System.Drawing.Point(0, 0); + _mapView.Dock = DockStyle.Fill; + _mapView.mapOption.isShowPic = true; + _mapView.mapOption.IsOrtho = false; + this.panelControl1.Controls.Add(_mapView); + + _propertyForm = new PropertyForm(); + _propertyForm.Dock = DockStyle.Fill; + this.dockPanelModelProperty.Controls.Add(_propertyForm); + + GlobalObject.PropertyForm = _propertyForm; + GlobalObject.map = _mapView; + } + + + public override void RefreshData() + { + base.RefreshData(); + } + + private void SetMapBackground(string backgroundUrl, float width, float height) + { + _mapView.mapOption.isShowPic = true; + _mapView.mapOption.isAutoBackgroundImage = true; + var img = Image.FromFile(backgroundUrl); + var imgWidth = img.Width; + var imgHeight = img.Height; + + var w = imgWidth / width; + var h = imgHeight / height; + var zoom = w > h ? w : h; + + _mapView.MapCenter = _mapView.mapOption.Center = new PointF(width / 2, height / 2); + _mapView.zoom = _mapView.mapOption.zoom = zoom; + + var temp = _mapView._Template; + var directory = Path.GetDirectoryName(temp.BackGroundImg_FullPath); + if (!Directory.Exists(directory)) + { + Directory.CreateDirectory(directory); + } + File.Copy(backgroundUrl, temp.BackGroundImg_FullPath, true); + temp.BackGroundImg_FullPath = temp.BackGroundImg_FullPath; + temp.BackGroundImgWidth = width; + temp.BackGroundImgHeight = height; + temp.BackGroundImgRotaAngle = 0; + temp.BackGroundPoint1 = new PointF(0, 0); + _mapView._Template = temp; + _mapView.SetMapInvalidate(); + + } + + #region Event + + #region Draw + + private void toolboxControlDraw_ItemClick(object sender, DevExpress.XtraToolbox.ToolboxItemClickEventArgs e) + { + if (e.Item.Tag is not string tag) + return; + switch (tag) + { + case "Select": + { + _mapView.toolStripButton_鏅�歘Click(1, new EventArgs()); + } + break; + case "AddNode": + { + _mapView.toolStripButton_鏂板缓鑺傜偣_Click(1, new EventArgs()); + } + break; + case "AddVerticalPipe": + { + _mapView.toolStripButton_鏂板缓绔嬬_Click(1, new EventArgs()); + } + break; + case "AddHorizontalPipe": + { + _mapView.toolStripButton_鏂板缓绠$嚎_Click(1, new EventArgs()); + } + break; + case "AddValve": + { + _mapView.toolStripButton_娣诲姞闃�闂╛Click(1, new EventArgs()); + } + break; + case "AddPump": + { + _mapView.toolStripButton_娣诲姞姘存车_Click(1, new EventArgs()); + } + break; + case "AddWaterMeter": + { + _mapView.toolStripButton_娣诲姞姘磋〃_Click(1, new EventArgs()); + } + break; + case "AddTank": + { + _mapView.toolStripButton_娣诲姞姘存睜_Click(1, new EventArgs()); + } + break; + case "AddReservoir": + { + _mapView.toolStripButton_娣诲姞姘村簱_Click(1, new EventArgs()); + } + break; + case "Copy": + { + _mapView.澶嶅埗ToolStripMenuItem_Click(1, new EventArgs()); + } + break; + case "Paste": + { + _mapView.绮樿创ToolStripMenuItem1_Click(1, new EventArgs()); + } + break; + case "Delete": + { + _mapView.鍒犻櫎ToolStripMenuItem_Click(1, new EventArgs()); + } + break; + + case "Undo": + { + _mapView.buttonUndo_Click(1, new EventArgs()); + } + break; + case "Redo": + { + _mapView.buttonRedo_Click(1, new EventArgs()); + } + break; + case "HorizontalAlign": + { + _mapView.涓滆タ瀵归綈ToolStripMenuItem_Click(1, new EventArgs()); + } + break; + case "VerticalAlign": + { + _mapView.鍗楀寳瀵归綈ToolStripMenuItem_Click(1, new EventArgs()); + } + break; + case "TopBottomAlign": + { + _mapView.绔栫洿瀵归綈ToolStripMenuItem_Click(1, new EventArgs()); + } + break; + case "AutoAlign": + { + _mapView.鑷姩瀵归綈ToolStripMenuItem_Click(1, new EventArgs()); + } + break; + default: + break; + } + + + } + + + + private void toolTipController1_GetActiveObjectInfo(object sender, DevExpress.Utils.ToolTipControllerGetActiveObjectInfoEventArgs e) + { + var hi = this.toolboxControlDraw.CalcHitInfo(e.ControlMousePosition); + if (hi.IsInItem) + { + var toolItem = hi.ItemInfo.Item; + this.toolTipController1.ShowHint(toolItem.Caption, MousePosition); + } + else + { + this.toolTipController1.HideHint(); + } + } + + #endregion + + #region QuickModeling + + private EditFloors dlg = new EditFloors(); + private void barBtnModelTemplate_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + if (dlg.ShowDialog() == DialogResult.OK) + { + } + } + + private void barBtnConnectivityCheck_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + _mapView.鍏抽榾鎼滅储ToolStripMenuItem_Click(1, new EventArgs()); + } + + private void barBtnVerticalPipeDiameter_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + var dlg = new InputDlg(); + dlg.SetBindingData("杈撳叆鍙e緞"); + dlg.ReloadDataEvent += (value) => + { + _mapView._Template.network.Links.ForEach(l => + { + if (l.StartNode != null && l.EndNode != null) + { + if (l.StartNode.Position == l.EndNode.Position) + { + l.Diameter = (float)value; + } + } + }); + }; + } + + private void barBtnHorizontalPipeDiameter_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + var dlg = new InputDlg(); + dlg.SetBindingData("杈撳叆鍙e緞"); + dlg.ReloadDataEvent += (value) => + { + _mapView._Template.network.Links.ForEach(l => + { + if (l.StartNode.Elev == 0 && l.EndNode.Elev == 0) + { + l.Diameter = (float)value; + } + }); + }; + + } + + private void barBtnElevationTranslation_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + var dlg = new InputDlg(); + dlg.SetBindingData("杈撳叆鏍囬珮鍋忕Щ閲�"); + dlg.ReloadDataEvent += (value) => + { + _mapView._Template.network.Nodes.ForEach(n => + { + if (n.Elev > 0) + { + n.Elev = n.Elev + (float)value; + } + }); + }; + dlg.ShowDialog(); + + } + + + /// <summary> + /// 淇濆瓨 + /// </summary> + private void SaveModelTemplate() + { + if (_facility == null) + { + TipFormHelper.ShowWarn("璇烽�夋嫨妯℃澘"); + return; + } + if (_template == null) + { + TipFormHelper.ShowWarn("璇烽�夋嫨妯℃澘"); + return; + } + SaveView(); + SetZoom(); + + _facility.ModelInfo = Yw.JsonHelper.Object2Json(_template); + this._mapView.toolStripButton_save_ButtonClick(1, new EventArgs()); + + } + + + + private void barBtnSaveModelTemplate_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + SaveModelTemplate(); + } + + #endregion + + #region Import + + private void ImportInp() + { + if (_facility == null) + { + return; + } + if (_template == null) + { + return; + } + var openFileDlg = new OpenFileDialog(); + openFileDlg.Filter = "INP鏂囦欢|*.inp"; + if (openFileDlg.ShowDialog() != DialogResult.OK) + return; + + _mapView.Clear(); + + var inpFilePath = openFileDlg.FileName; + var templateFilePath = _template.FullPath; + + Global.ClearFileReadOnly(templateFilePath); + File.Copy(inpFilePath, templateFilePath, true); + _template.network.BuildFromInp(templateFilePath); + + _mapView.SetData(_template); + + } + + + private void barBtnImportInp_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + ImportInp(); + } + + #endregion + + #region BaseMap + + private void SetBaseMap() + { + var dlg = new SetMapBaseMapDlg(); + dlg.ReloadDataEvent += (filePath, widht, height) => + { + SetMapBackground(filePath, (float)widht, (float)height); + }; + dlg.ShowDialog(); + } + + private void barBtnAddBaseMap_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + SetBaseMap(); + } + + private void barBtnSetBaseMap_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + _mapView.璁剧疆搴曞浘ToolStripMenuItem_Click(1, null); + } + + private void barBtnClearBaseMap_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + _mapView.娓呴櫎搴曞浘ToolStripMenuItem_Click(1, null); + } + + private void barCekBaseMapVisible_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + _mapView.鏄剧ず闅愯棌搴曞浘ToolStripMenuItem_Click(1, null); + } + + + #endregion + + #region View + + private void SetDefaultView() + { + var mapOption0 = _mapView.mapOption.Copy(); + var p = PointF.Empty; + float x0 = 99999999999f, y0 = 99999999999f, x1 = -99999999999f, y1 = -99999999999f; + + foreach (NodeViewModel junction in _mapView._Nodes) + { + p.X += (float)junction.X; + p.Y += (float)junction.Y; + if (x0 > junction.X) x0 = junction.X; + if (y0 > junction.Y) y0 = junction.Y; + if (x1 < junction.X) x1 = junction.X; + if (y1 < junction.Y) y1 = junction.Y; + } + + float x_span = x1 - x0, y_span = y1 - y0; + + _mapView.zoom = Math.Min(this._mapView.Width / x_span, this._mapView.Height / y_span); + _mapView.zoom = Math.Max(_mapView.zoom, 0.1f); + _mapView.zoom = Math.Min(_mapView.zoom, 1000.0f); + + _mapView.Rotation = 0; + _mapView.RotationF = 90; + + + if (_mapView._Nodes.Count > 0) + { + p.X /= _mapView._Nodes.Count; + p.Y /= _mapView._Nodes.Count; + } + _mapView.MapCenter = p; + _mapView.RotationF = 45; + _mapView.Rotation = -45; + MapObjectExtensions.AddCommand(_mapView.mapOption, "Map", mapOption0, _mapView.mapOption); + + _mapView.SetMapInvalidate(); + } + + private void barBtnDefaultView_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + SetDefaultView(); + } + + private void barBtnFullView_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + _mapView.閲嶇疆瑙嗚ToolStripMenuItem_Click(1, new EventArgs()); + } + + private void SetTopView() + { + var mapOption0 = _mapView.mapOption.Copy(); + _mapView.RotationF = 90; + MapObjectExtensions.AddCommand(_mapView.mapOption, "Map", mapOption0, _mapView.mapOption); + + _mapView.SetMapInvalidate(); + } + + private void barBtnTopView_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + SetTopView(); + } + + private void SetFrontView() + { + var mapOption0 = _mapView.mapOption.Copy(); + _mapView.RotationF = 0; + MapObjectExtensions.AddCommand(_mapView.mapOption, "Map", mapOption0, _mapView.mapOption); + + _mapView.SetMapInvalidate(); + } + + private void barBtnFrontView_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + SetFrontView(); + } + + private void barBtnResetView_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + _mapView.閲嶇疆瑙嗚ToolStripMenuItem_Click(1, new EventArgs()); + } + + + public void SetMapCenterAndZoom() + { + _mapView.MapCenter = _mapView.mapOption.Center = new PointF((float)_vm.BackgroundWidth / 2, (float)_vm.BackgroundHeight / 2); + _mapView.zoom = _mapView.mapOption.zoom = (float)_vm.Zoom; + _mapView.RotationF = 90; + _mapView.mapOption.isAutoBackgroundImage = true; + _mapView._Template.Colours = null; + _mapView.SetMapInvalidate(); + } + + + + private void SetZoom() + { + if (_template == null) return; + _template.view ??= new MapDimensions(); + _template.view.Center = _mapView.MapCenter; + _template.view.zoom = _mapView.zoom; + _template.view.rotation = _mapView.Rotation; + _template.view.rotationF = _mapView.RotationF; + + } + + private void SaveView() + { + if (_template == null) return; + _template.view ??= new MapDimensions(); + _template.view.Center = _mapView.MapCenter; + _template.view.zoom = _mapView.zoom; + _template.view.rotation = _mapView.Rotation; + _template.view.rotationF = _mapView.RotationF; + + } + + + private void barBtnSaveView_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + SaveView(); + } + #endregion + + #endregion + + + /// <summary> + /// 鐘舵�佹敼鍙樹簨浠� + /// </summary> + public event Action PageStateChangedEvent; + + private QuickModelingViewModel _vm = null;//鎿嶄綔瀵硅薄 + private bool _isCompleted = false;//鏄惁鍒涘缓瀹屾垚 + private bool _isInitialMapViewer = false;//鏄惁鍒濆鍖栧湴鍥� + + + /// <summary> + /// 鍒濆鍖栭〉闈� + /// </summary> + public void InitialPage(QuickModelingViewModel vm) + { + if (vm == null) + { + return; + } + _vm = vm; + _isCompleted = false; + if (!_isInitialMapViewer) + { + InitialMapViewer(); + } + + + InitialData(_vm.Facility); + SetMapCenterAndZoom(); + _isCompleted = true; + this.PageStateChangedEvent?.Invoke(); + } + + + //楠岃瘉 + public bool Verify() + { + return this.Invoke(() => + { + bool isExist = true; + + if (_mapView==null) + { + isExist = false; + } + if (_template==null) + { + isExist = false; + } + + return isExist; + }); + } + + //淇濆瓨 + private bool Save() + { + if (!Verify()) + { + return false; + } + + _vm.Facility.ModelInfo = Yw.JsonHelper.Object2Json(_template); + + + return true; + } + + //淇濆瓨 + private async Task<bool> Complete() + { + if (!Verify()) + { + return false; + } + + var place = _vm.Place; + var facility = _vm.Facility; + + place.ID = await BLLFactory<BLL.Place>.Instance.Insert(place); + if (place.ID < 1) + { + TipFormHelper.ShowError("鏂板鍦烘墍澶辫触!"); + return false; + } + facility.PlaceID = place.ID; + facility.ID = await BLLFactory<BLL.Facility>.Instance.Insert(facility); + if (facility.ID < 1) + { + TipFormHelper.ShowError("鏂板璁炬柦澶辫触!"); + return false; + } + + facility = await BLLFactory<BLL.Facility>.Instance.GetByID(facility.ID); + + var tempInpFile = facility.ModelPath; + + var fullPath = Path.Combine(Directory.GetCurrentDirectory(), "Data\\Inp\\" + facility.ID + ".inp"); + File.Copy(tempInpFile, fullPath, true); + var bgFile = tempInpFile.Replace(".inp", ".png"); + if (File.Exists(bgFile)) + { + File.Copy(bgFile, fullPath.Replace(".inp", ".png"), true); + File.Delete(bgFile); + } + if (File.Exists(tempInpFile)) + File.Delete(tempInpFile); + _template.filePath = fullPath; + _template.BackGroundImg_FullPath = fullPath.Replace(".inp", ".png"); + + facility.ModelInfo = Yw.JsonHelper.Object2Json(_template); + facility.ModelPath = fullPath; + + if (!await BLLFactory<BLL.Facility>.Instance.Update(facility)) + { + TipFormHelper.ShowError("鏂板妯″瀷淇℃伅澶辫触!"); + return false; + } + + return true; + } + + + /// <summary> + /// 鍏佽涓婁竴姝� + /// </summary> + public bool AllowPrev + { + get + { + if (!_isCompleted) + { + return false; + } + return true; + } + } + + /// <summary> + /// 鍏佽涓嬩竴姝� + /// </summary> + public bool AllowNext + { + get + { + return false; + } + } + + /// <summary> + /// 鍏佽鍙栨秷 + /// </summary> + public bool AllowCancel + { + get + { + return false; + } + } + + /// <summary> + /// 鍏佽瀹屾垚 + /// </summary> + public bool AllowComplete + { + get + { + return true; + } + } + + /// <summary> + /// 鑳藉惁涓婁竴姝� + /// </summary> + /// <returns></returns> + public Task<bool> CanPrev() + { + return Task.Run(() => + { + Save(); + return this.AllowPrev; + }); + } + + /// <summary> + /// 鑳藉惁涓嬩竴姝� + /// </summary> + public Task<bool> CanNext() + { + return Task.Run(() => this.AllowNext); + } + + /// <summary> + /// 鑳藉惁鍙栨秷 + /// </summary> + public Task<bool> CanCancel() + { + return Task.Run(() => this.AllowCancel); + } + + /// <summary> + /// 鑳藉惁瀹屾垚 + /// </summary> + public Task<bool> CanComplete() + { + return Task.Run(() => Complete()); + } + + + + } + +} \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/ModelEditPage.resx b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/00-core/ModelEditPage.resx similarity index 91% rename from WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/ModelEditPage.resx rename to WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/00-core/ModelEditPage.resx index 8426f6c..9792286 100644 --- a/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/ModelEditPage.resx +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/00-core/ModelEditPage.resx @@ -118,75 +118,6 @@ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <assembly alias="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> - <data name="barBtnAddModelTemplate.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 - LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl - dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAKcCAAAC77u/ - PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi - IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv - MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh - Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg - MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z - ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz - OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp - dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkFkZCI+DQogICAgPHBhdGggZD0iTTI3LDE0aC05VjVj - MC0wLjUtMC41LTEtMS0xaC0yYy0wLjUsMC0xLDAuNS0xLDF2OUg1Yy0wLjUsMC0xLDAuNS0xLDF2MmMw - LDAuNSwwLjUsMSwxLDFoOXY5ICAgYzAsMC41LDAuNSwxLDEsMWgyYzAuNSwwLDEtMC41LDEtMXYtOWg5 - YzAuNSwwLDEtMC41LDEtMXYtMkMyOCwxNC41LDI3LjUsMTQsMjcsMTR6IiBjbGFzcz0iR3JlZW4iIC8+ - DQogIDwvZz4NCjwvc3ZnPgs= -</value> - </data> - <data name="barBtnEditModelTemplate.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 - LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl - dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAABwFAAAC77u/ - PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi - IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv - MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh - Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg - MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ - LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuQmx1ZXtmaWxsOiMxMTc3 - RDc7fQoJLldoaXRle2ZpbGw6I0ZGRkZGRjt9CgkuR3JlZW57ZmlsbDojMDM5QzIzO30KCS5zdDB7b3Bh - Y2l0eTowLjc1O30KCS5zdDF7b3BhY2l0eTowLjU7fQoJLnN0MntvcGFjaXR5OjAuMjU7fQoJLnN0M3tm - aWxsOiNGRkIxMTU7fQo8L3N0eWxlPg0KICA8ZyAvPg0KICA8ZyBpZD0iUmVuYW1lXzFfIj4NCiAgICA8 - cGF0aCBkPSJNMi4xLDE2aDIuMmwwLjYtMi4zaDMuMkw4LjgsMTZIMTFMNy44LDZINS40TDIuMSwxNnog - TTYuNCw4LjdjMC4xLTAuMywwLjEtMC42LDAuMS0wLjloMC4xICAgYzAsMC4zLDAuMSwwLjYsMC4xLDAu - OWwxLDMuM0g1LjRMNi40LDguN3ogTTE3LjUsMTAuNmMwLjYtMC4yLDEuMS0wLjUsMS41LTAuOWMwLjQt - MC40LDAuNi0wLjksMC42LTEuNGMwLTAuNy0wLjMtMS4zLTAuOS0xLjcgICBDMTguMSw2LjIsMTcuMSw2 - LDE1LjksNkgxMnY5LjlWMTZoNGMxLjIsMCwyLjItMC4yLDIuOS0wLjhDMTkuNywxNC42LDIwLDE0LDIw - LDEzYzAtMC42LTAuMi0xLjItMC43LTEuNiAgIEMxOC45LDExLDE4LjMsMTAuNywxNy41LDEwLjZ6IE0x - NC40LDcuN2gwLjljMS4xLDAsMS43LDAuNCwxLjcsMS4xYzAsMC40LTAuMSwwLjctMC40LDAuOUMxNi40 - LDkuOSwxNiwxMCwxNS41LDEwaC0xLjFWNy43eiAgICBNMTcsMTMuOGMtMC4zLDAuMi0wLjgsMC40LTEu - MywwLjRoLTEuM3YtMi42aDEuM2MwLjUsMCwwLjksMC4xLDEuMywwLjNjMC4zLDAuMiwwLjUsMC42LDAu - NSwwLjlDMTcuNSwxMy4zLDE3LjQsMTMuNiwxNywxMy44eiIgY2xhc3M9IkJsYWNrIiAvPg0KICAgIDxw - YXRoIGQ9Ik0yNywxOWwtOCw4bC00LTRsOC04TDI3LDE5eiBNMjgsMThsMS43LTEuN2MwLjQtMC40LDAu - NC0xLDAtMS4zTDI3LDEyLjNjLTAuNC0wLjQtMS0wLjQtMS4zLDBMMjQsMTRMMjgsMTh6ICAgIE0xNCwy - NHY0aDRMMTQsMjR6IiBjbGFzcz0iQmx1ZSIgLz4NCiAgPC9nPg0KPC9zdmc+Cw== -</value> - </data> - <data name="barBtnDeleteModelTemplate.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 - LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl - dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAD0DAAAC77u/ - PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi - IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv - MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh - Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg - MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJs - YWNre2ZpbGw6IzcyNzI3Mjt9CgkuQmx1ZXtmaWxsOiMxMTc3RDc7fQoJLkdyZWVue2ZpbGw6IzAzOUMy - Mzt9CgkuWWVsbG93e2ZpbGw6I0ZGQjExNTt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh - Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iRGVsZXRlIj4N - CiAgICA8Zz4NCiAgICAgIDxwYXRoIGQ9Ik0xOC44LDE2bDYuOS02LjljMC40LTAuNCwwLjQtMSwwLTEu - NGwtMS40LTEuNGMtMC40LTAuNC0xLTAuNC0xLjQsMEwxNiwxMy4yTDkuMSw2LjNjLTAuNC0wLjQtMS0w - LjQtMS40LDAgICAgTDYuMyw3LjdjLTAuNCwwLjQtMC40LDEsMCwxLjRsNi45LDYuOWwtNi45LDYuOWMt - MC40LDAuNC0wLjQsMSwwLDEuNGwxLjQsMS40YzAuNCwwLjQsMSwwLjQsMS40LDBsNi45LTYuOWw2Ljks - Ni45ICAgIGMwLjQsMC40LDEsMC40LDEuNCwwbDEuNC0xLjRjMC40LTAuNCwwLjQtMSwwLTEuNEwxOC44 - LDE2eiIgY2xhc3M9IlJlZCIgLz4NCiAgICA8L2c+DQogIDwvZz4NCjwvc3ZnPgs= -</value> - </data> <data name="barBtnAddBaseMap.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 @@ -432,6 +363,9 @@ Mjh6IiBjbGFzcz0iQmxhY2siIC8+DQo8L3N2Zz4L </value> </data> + <metadata name="toolTipController1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>187, 17</value> + </metadata> <data name="toolboxItemSelect.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 @@ -871,9 +805,6 @@ L2c+DQo8L3N2Zz4L </value> </data> - <metadata name="toolTipController1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>187, 17</value> - </metadata> <metadata name="dockManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/01-tree/FacilityTreeListCtrl.Designer.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/01-tree/FacilityTreeListCtrl.Designer.cs new file mode 100644 index 0000000..42a4e84 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/01-tree/FacilityTreeListCtrl.Designer.cs @@ -0,0 +1,299 @@ +锘縩amespace PBS.WinFrmUI.Hydro +{ + partial class FacilityTreeListCtrl + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + components = new Container(); + ComponentResourceManager resources = new ComponentResourceManager(typeof(FacilityTreeListCtrl)); + DevExpress.Utils.SuperToolTip superToolTip1 = new DevExpress.Utils.SuperToolTip(); + DevExpress.Utils.ToolTipItem toolTipItem1 = new DevExpress.Utils.ToolTipItem(); + EditorButtonImageOptions editorButtonImageOptions1 = new 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(); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + treeList1 = new DevExpress.XtraTreeList.TreeList(); + colName = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + barManager1 = new DevExpress.XtraBars.BarManager(components); + bar1 = new DevExpress.XtraBars.Bar(); + barBtnExpandAll = new DevExpress.XtraBars.BarButtonItem(); + barBtnCollpseAll = new DevExpress.XtraBars.BarButtonItem(); + barBtnSearchBox = new DevExpress.XtraBars.BarButtonItem(); + barCkTreeLine = new DevExpress.XtraBars.BarCheckItem(); + barBtnRefresh = new DevExpress.XtraBars.BarButtonItem(); + barDockControlTop = new DevExpress.XtraBars.BarDockControl(); + barDockControlBottom = new DevExpress.XtraBars.BarDockControl(); + barDockControlLeft = new DevExpress.XtraBars.BarDockControl(); + barDockControlRight = new DevExpress.XtraBars.BarDockControl(); + repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); + imageCollection1 = new DevExpress.Utils.ImageCollection(components); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + ((ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((ISupportInitialize)treeList1).BeginInit(); + ((ISupportInitialize)barManager1).BeginInit(); + ((ISupportInitialize)repositoryItemButtonEdit1).BeginInit(); + ((ISupportInitialize)imageCollection1).BeginInit(); + ((ISupportInitialize)Root).BeginInit(); + ((ISupportInitialize)layoutControlItem2).BeginInit(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(treeList1); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 30); + layoutControl1.Margin = new Padding(3, 4, 3, 4); + layoutControl1.Name = "layoutControl1"; + layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(539, 371, 650, 536); + layoutControl1.Root = Root; + layoutControl1.Size = new Size(269, 819); + layoutControl1.TabIndex = 0; + layoutControl1.Text = "layoutControl1"; + // + // treeList1 + // + treeList1.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { colName }); + treeList1.Location = new Point(0, 0); + treeList1.Margin = new Padding(3, 4, 3, 4); + treeList1.MenuManager = barManager1; + treeList1.MinWidth = 23; + treeList1.Name = "treeList1"; + treeList1.OptionsMenu.EnableNodeMenu = false; + treeList1.OptionsSelection.EnableAppearanceFocusedCell = false; + treeList1.OptionsView.FocusRectStyle = DevExpress.XtraTreeList.DrawFocusRectStyle.None; + treeList1.OptionsView.RowImagesShowMode = DevExpress.XtraTreeList.RowImagesShowMode.InIndent; + treeList1.OptionsView.ShowIndentAsRowStyle = true; + treeList1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { repositoryItemButtonEdit1 }); + treeList1.SelectImageList = imageCollection1; + treeList1.Size = new Size(269, 819); + treeList1.TabIndex = 5; + treeList1.TreeLevelWidth = 21; + treeList1.TreeViewFieldName = "Name"; + treeList1.ViewStyle = DevExpress.XtraTreeList.TreeListViewStyle.TreeView; + treeList1.FocusedNodeChanged += treeList1_FocusedNodeChanged; + // + // colName + // + colName.AppearanceCell.Options.UseTextOptions = true; + colName.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near; + colName.Caption = "鍚嶇О"; + colName.FieldName = "Name"; + colName.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("colName.ImageOptions.SvgImage"); + colName.MinWidth = 23; + colName.Name = "colName"; + colName.Visible = true; + colName.VisibleIndex = 0; + colName.Width = 197; + // + // barManager1 + // + barManager1.Bars.AddRange(new DevExpress.XtraBars.Bar[] { bar1 }); + barManager1.DockControls.Add(barDockControlTop); + barManager1.DockControls.Add(barDockControlBottom); + barManager1.DockControls.Add(barDockControlLeft); + barManager1.DockControls.Add(barDockControlRight); + barManager1.Form = this; + barManager1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { barBtnExpandAll, barBtnCollpseAll, barBtnSearchBox, barCkTreeLine, barBtnRefresh }); + barManager1.MaxItemId = 6; + // + // bar1 + // + bar1.BarName = "Custom 1"; + bar1.CanDockStyle = DevExpress.XtraBars.BarCanDockStyle.Top; + bar1.DockCol = 0; + bar1.DockRow = 0; + bar1.DockStyle = DevExpress.XtraBars.BarDockStyle.Top; + bar1.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] { new DevExpress.XtraBars.LinkPersistInfo(barBtnExpandAll), new DevExpress.XtraBars.LinkPersistInfo(barBtnCollpseAll), new DevExpress.XtraBars.LinkPersistInfo(barBtnSearchBox), new DevExpress.XtraBars.LinkPersistInfo(barCkTreeLine), new DevExpress.XtraBars.LinkPersistInfo(barBtnRefresh) }); + bar1.OptionsBar.AllowQuickCustomization = false; + bar1.OptionsBar.DrawDragBorder = false; + bar1.OptionsBar.MultiLine = true; + bar1.OptionsBar.UseWholeRow = true; + bar1.Text = "Custom 1"; + // + // barBtnExpandAll + // + barBtnExpandAll.Caption = "灞曞紑"; + barBtnExpandAll.Id = 0; + barBtnExpandAll.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnExpandAll.ImageOptions.SvgImage"); + barBtnExpandAll.Name = "barBtnExpandAll"; + barBtnExpandAll.ItemClick += barBtnExpandAll_ItemClick; + // + // barBtnCollpseAll + // + barBtnCollpseAll.Caption = "鎶樺彔"; + barBtnCollpseAll.Id = 1; + barBtnCollpseAll.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnCollpseAll.ImageOptions.SvgImage"); + barBtnCollpseAll.Name = "barBtnCollpseAll"; + barBtnCollpseAll.ItemClick += barBtnCollpseAll_ItemClick; + // + // barBtnSearchBox + // + barBtnSearchBox.Caption = "鎼滅储"; + barBtnSearchBox.Id = 2; + barBtnSearchBox.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnSearchBox.ImageOptions.SvgImage"); + barBtnSearchBox.Name = "barBtnSearchBox"; + barBtnSearchBox.ItemClick += barBtnSearch_ItemClick; + // + // barCkTreeLine + // + barCkTreeLine.Caption = "鏍戠嚎"; + barCkTreeLine.Id = 4; + barCkTreeLine.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barCkTreeLine.ImageOptions.SvgImage"); + barCkTreeLine.Name = "barCkTreeLine"; + barCkTreeLine.CheckedChanged += barCkTreeLine_CheckedChanged; + // + // barBtnRefresh + // + barBtnRefresh.Caption = "鍒锋柊"; + barBtnRefresh.Id = 5; + barBtnRefresh.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnRefresh.ImageOptions.SvgImage"); + barBtnRefresh.Name = "barBtnRefresh"; + toolTipItem1.Text = "鍒锋柊"; + superToolTip1.Items.Add(toolTipItem1); + barBtnRefresh.SuperTip = superToolTip1; + barBtnRefresh.ItemClick += barBtnRefresh_ItemClick; + // + // barDockControlTop + // + barDockControlTop.CausesValidation = false; + barDockControlTop.Dock = DockStyle.Top; + barDockControlTop.Location = new Point(0, 0); + barDockControlTop.Manager = barManager1; + barDockControlTop.Margin = new Padding(3, 4, 3, 4); + barDockControlTop.Size = new Size(269, 30); + // + // barDockControlBottom + // + barDockControlBottom.CausesValidation = false; + barDockControlBottom.Dock = DockStyle.Bottom; + barDockControlBottom.Location = new Point(0, 849); + barDockControlBottom.Manager = barManager1; + barDockControlBottom.Margin = new Padding(3, 4, 3, 4); + barDockControlBottom.Size = new Size(269, 0); + // + // barDockControlLeft + // + barDockControlLeft.CausesValidation = false; + barDockControlLeft.Dock = DockStyle.Left; + barDockControlLeft.Location = new Point(0, 30); + barDockControlLeft.Manager = barManager1; + barDockControlLeft.Margin = new Padding(3, 4, 3, 4); + barDockControlLeft.Size = new Size(0, 819); + // + // barDockControlRight + // + barDockControlRight.CausesValidation = false; + barDockControlRight.Dock = DockStyle.Right; + barDockControlRight.Location = new Point(269, 30); + barDockControlRight.Manager = barManager1; + barDockControlRight.Margin = new Padding(3, 4, 3, 4); + barDockControlRight.Size = new Size(0, 819); + // + // repositoryItemButtonEdit1 + // + repositoryItemButtonEdit1.AutoHeight = false; + editorButtonImageOptions1.SvgImageSize = new Size(20, 20); + repositoryItemButtonEdit1.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) }); + repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1"; + repositoryItemButtonEdit1.TextEditStyle = TextEditStyles.HideTextEditor; + // + // imageCollection1 + // + imageCollection1.ImageStream = (DevExpress.Utils.ImageCollectionStreamer)resources.GetObject("imageCollection1.ImageStream"); + imageCollection1.Images.SetKeyName(0, "NotImported.png"); + imageCollection1.Images.SetKeyName(1, "Imported.png"); + // + // Root + // + Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + Root.GroupBordersVisible = false; + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem2 }); + Root.Name = "Root"; + Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + Root.Size = new Size(269, 819); + Root.TextVisible = false; + // + // layoutControlItem2 + // + layoutControlItem2.Control = treeList1; + layoutControlItem2.Location = new Point(0, 0); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlItem2.Size = new Size(269, 819); + layoutControlItem2.TextSize = new Size(0, 0); + layoutControlItem2.TextVisible = false; + // + // FacilityTreeListCtrl + // + AutoScaleDimensions = new SizeF(8F, 18F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(layoutControl1); + Controls.Add(barDockControlLeft); + Controls.Add(barDockControlRight); + Controls.Add(barDockControlBottom); + Controls.Add(barDockControlTop); + Margin = new Padding(3, 4, 3, 4); + Name = "FacilityTreeListCtrl"; + Size = new Size(269, 849); + ((ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((ISupportInitialize)treeList1).EndInit(); + ((ISupportInitialize)barManager1).EndInit(); + ((ISupportInitialize)repositoryItemButtonEdit1).EndInit(); + ((ISupportInitialize)imageCollection1).EndInit(); + ((ISupportInitialize)Root).EndInit(); + ((ISupportInitialize)layoutControlItem2).EndInit(); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraBars.BarManager barManager1; + private DevExpress.XtraBars.Bar bar1; + private DevExpress.XtraBars.BarButtonItem barBtnExpandAll; + private DevExpress.XtraBars.BarDockControl barDockControlTop; + private DevExpress.XtraBars.BarDockControl barDockControlBottom; + private DevExpress.XtraBars.BarDockControl barDockControlLeft; + private DevExpress.XtraBars.BarDockControl barDockControlRight; + private DevExpress.XtraBars.BarButtonItem barBtnCollpseAll; + private DevExpress.XtraBars.BarButtonItem barBtnSearchBox; + private DevExpress.XtraBars.BarCheckItem barCkTreeLine; + private DevExpress.XtraTreeList.TreeList treeList1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraTreeList.Columns.TreeListColumn colName; + private DevExpress.XtraBars.BarButtonItem barBtnRefresh; + private DevExpress.Utils.ImageCollection imageCollection1; + private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit1; + } +} diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/01-tree/FacilityTreeListCtrl.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/01-tree/FacilityTreeListCtrl.cs new file mode 100644 index 0000000..e788576 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/01-tree/FacilityTreeListCtrl.cs @@ -0,0 +1,245 @@ +锘縰sing DevExpress.Utils; +using DevExpress.XtraCharts; +using System.Windows.Media.Imaging; + +namespace PBS.WinFrmUI.Hydro +{ + public partial class FacilityTreeListCtrl : DevExpress.XtraEditors.XtraUserControl + { + public FacilityTreeListCtrl() + { + InitializeComponent(); + this.treeList1.InitialDefaultSettings(); + this.layoutControl1.SetupLayoutControl(); + } + + /// <summary> + /// 閫夋嫨椤圭洰浜嬩欢 + /// </summary> + public event Action<FacilityVmo> SelectFacilityEvent; + + /// <summary> + /// 鍒锋柊鏁版嵁浜嬩欢 + /// </summary> + public event Action RefreshDataEvent; + + + private List<FacilityTreeViewModel> _allBindingList = new(); + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public async void SetBindingData(List<FacilityVmo> allFacilityList) + { + _allBindingList = new List<FacilityTreeViewModel>(); + if (allFacilityList != null) + { + foreach (var item in allFacilityList) + { + if (await IsHaveInp(item.ID)) + { + var vm = new FacilityTreeViewModel(item, true); + _allBindingList.Add(vm); + } + else + { + var vm = new FacilityTreeViewModel(item, false); + _allBindingList.Add(vm); + } + } + } + this.treeList1.DataSource = _allBindingList; + this.treeList1.ForceInitialize(); + this.treeList1.ExpandAll(); + } + + //鏌ユ壘妯℃澘鏄惁瀛樺湪妯″瀷 + private async Task<bool> IsHaveInp(long FacilityID) + { + + return true; + } + + /// <summary> + /// 璁剧疆榛樿 + /// </summary> + public void SetFocused() + { + if (_allBindingList == null) + { + return; + } + var vm = _allBindingList.FirstOrDefault(); + if (vm != null) + { + this.treeList1.FocusedNode = this.treeList1.FindNodeByKeyID(vm.ID); + } + } + + /// <summary> + /// 璁剧疆鑱氱劍 + /// </summary> + public void SetFocused(long ID) + { + if (_allBindingList == null) + { + return; + } + this.treeList1.FocusedNode = this.treeList1.FindNodeByKeyID(ID); + } + + ///// <summary> + ///// 娣诲姞妯″瀷妯℃澘 + ///// </summary> + //public void AddFacility() + //{ + // if (_allBindingList == null) + // { + // return; + // } + // var dlg = new AddFacilityDlg(); + // dlg.SetBindingData(); + // dlg.ReloadDataEvent += (rhs) => + // { + // var vm = new FacilityTreeViewModel(rhs, true); + // _allBindingList.Add(vm); + // this.treeList1.RefreshDataSource(); + // SetFocused(vm.ID); + // TipFormHelper.ShowSucceed("妯″瀷妯℃澘娣诲姞鎴愬姛锛�"); + // }; + // dlg.ShowDialog(); + //} + + ///// <summary> + ///// 鏇存柊妯″瀷妯℃澘 + ///// </summary> + //public void UpdateFacility() + //{ + // if (_allBindingList == null) + // { + // return; + // } + // var vm = this.treeList1.GetFocusedRow() as FacilityTreeViewModel; + // if (vm == null) + // { + // return; + // } + + // var dlg = new EditFacilityDlg(); + // dlg.SetBindingData(vm.Facility); + // dlg.ReloadDataEvent += (rhs) => + // { + // vm.Name = rhs.Name; + // vm.Description=rhs.Description; + // vm.Facility = rhs; + // this.treeList1.RefreshNode(this.treeList1.FocusedNode); + // TipFormHelper.ShowSucceed("妯″瀷妯℃澘鏇存柊鎴愬姛锛�"); + // }; + // dlg.ShowDialog(); + //} + + + ///// <summary> + ///// 淇濆瓨妯″瀷妯℃澘 + ///// </summary> + //public async void SaveFacility(PBS.Vmo.FacilityVmo vmo) + //{ + // if (_allBindingList == null) + // { + // return ; + // } + // var vm = _allBindingList.Find(x => x.ID == vmo.ID); + // if (vm == null) + // { + // return ; + // } + + // var bol = await BLLFactory<PBS.BLL.Facility>.Instance.Update(vmo); + // if (!bol) + // { + // TipFormHelper.ShowError("淇濆瓨澶辫触锛�"); + // return ; + // } + // vm.Name = vmo.Name; + // vm.Description = vmo.Description; + // vm.Facility = await BLLFactory<PBS.BLL.Facility>.Instance.GetByID(vmo.ID); + // this.treeList1.RefreshNode(this.treeList1.FocusedNode); + // TipFormHelper.ShowSucceed("妯″瀷妯℃澘淇濆瓨鎴愬姛锛�"); + //} + + ///// <summary> + ///// 鍒犻櫎妯″瀷妯℃澘 + ///// </summary> + //public async void DeleteFacility() + //{ + // var bol = XtraMessageBox.Show("璇烽棶鏄惁鍒犻櫎褰撳墠妯″瀷妯℃澘锛�", "璇㈤棶", MessageBoxButtons.YesNo) == DialogResult.Yes; + // if (!bol) + // { + // return; + // } + // var vm = this.treeList1.GetCurrentViewModel(_allBindingList); + // if (vm == null) + // { + // TipFormHelper.ShowWarn("璇烽�夋嫨鏁版嵁琛岋紒"); + // return; + // } + + // // 闇�澧炲姞鍒犻櫎妯″瀷妯℃澘鏄犲皠璁炬柦鐨勯�昏緫 + // //.... + + // if (!await BLLFactory<PBS.BLL.Facility>.Instance.DeleteByID(vm.ID)) + // { + // TipFormHelper.ShowError("妯″瀷妯℃澘鍒犻櫎澶辫触锛岃閲嶈瘯锛�"); + // return; + // } + + // TipFormHelper.ShowSucceed("妯″瀷妯℃澘鍒犻櫎鎴愬姛锛�"); + + // _allBindingList.Remove(vm); + // this.treeList1.RefreshDataSource(); + //} + + //鍏ㄩ儴灞曞紑 + private void barBtnExpandAll_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + this.treeList1.ExpandAll(); + } + + //鍏ㄩ儴鎶樺彔 + private void barBtnCollpseAll_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + this.treeList1.CollapseAll(); + } + + //妫�绱紙menu锛� + private void barBtnSearch_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + if (this.treeList1.IsFindPanelVisible==false) + this.treeList1.ShowFindPanel(); + else + this.treeList1.HideFindPanel(); + } + + //鏍戠嚎 + private void barCkTreeLine_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + this.treeList1.OptionsView.ShowTreeLines = this.barCkTreeLine.Checked ? DefaultBoolean.True : DefaultBoolean.False; + } + + //鑱氱劍鑺傜偣鏀瑰彉 + private void treeList1_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e) + { + var vm = this.treeList1.GetDataRecordByNode(e.Node) as FacilityTreeViewModel; + this.SelectFacilityEvent?.Invoke(vm?.Facility); + } + + + //鍒锋柊 + private void barBtnRefresh_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + this.RefreshDataEvent?.Invoke(); + } + + + } +} \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/01-tree/FacilityTreeListCtrl.resx b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/01-tree/FacilityTreeListCtrl.resx new file mode 100644 index 0000000..64aba58 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/01-tree/FacilityTreeListCtrl.resx @@ -0,0 +1,270 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <assembly alias="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> + <data name="colName.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAOMCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTmV3VGFibGVTdHlsZSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5l + dyAwIDAgMzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3 + O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJLnN0MHtvcGFj + aXR5OjAuNTt9Cjwvc3R5bGU+DQogIDxnIGNsYXNzPSJzdDAiPg0KICAgIDxwYXRoIGQ9Ik0wLDIwaDh2 + NkgwVjIweiBNMTAsMjZoOHYtNmgtOFYyNnogTTIwLDEydjZoOHYtNkgyMHogTTIwLDI2aDh2LTZoLThW + MjZ6IiBjbGFzcz0iQmxhY2siIC8+DQogIDwvZz4NCiAgPHBhdGggZD0iTTAsNGg4djZIMFY0eiBNMCwx + OGg4di02SDBWMTh6IE0xMCwxMGg4VjRoLThWMTB6IE0xMCwxOGg4di02aC04VjE4eiIgY2xhc3M9IkJs + dWUiIC8+DQogIDxwb2x5Z29uIHBvaW50cz0iMjUsMiAyNywwIDI3LDMgMzAsMyAyOCw1IDMwLDcgMjcs + NyAyNywxMCAyNSw4IDIzLDEwIDIzLDcgMjAsNyAyMiw1IDIwLDMgMjMsMyAyMywwICIgY2xhc3M9Illl + bGxvdyIgLz4NCjwvc3ZnPgs= +</value> + </data> + <metadata name="barManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <data name="barBtnExpandAll.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAALACAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iRXhwYW5kX0ZpZWxkIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3 + IDAgMCAzMiAzMiI+DQogIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+CgkuQmxhY2t7ZmlsbDojNzI3Mjcy + O30KCS5HcmVlbntmaWxsOiMwMzlDMjM7fQoJLnN0MHtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8 + cG9seWdvbiBwb2ludHM9IjE0LDYgMTAsNiAxMCwyIDYsMiA2LDYgMiw2IDIsMTAgNiwxMCA2LDE0IDEw + LDE0IDEwLDEwIDE0LDEwICIgY2xhc3M9IkdyZWVuIiAvPg0KICA8ZyBjbGFzcz0ic3QwIj4NCiAgICA8 + cGF0aCBkPSJNMjIsNmgxMHYySDIyVjZ6IE0yMiwxMmgxMHYtMkgyMlYxMnogTTIyLDIwaDEwdi0ySDIy + VjIweiBNMjIsMjRoMTB2LTJIMjJWMjR6IiBjbGFzcz0iQmxhY2siIC8+DQogIDwvZz4NCiAgPHBhdGgg + ZD0iTTE4LDJoMTR2MkgxOFYyeiBNMTgsMTZoMTR2LTJIMThWMTZ6IE0xOCwyOGgxNHYtMkgxOFYyOHoi + IGNsYXNzPSJCbGFjayIgLz4NCjwvc3ZnPgs= +</value> + </data> + <data name="barBtnCollpseAll.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAIcCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iQ29sbGFwc2VfRmllbGQiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpu + ZXcgMCAwIDMyIDMyIj4NCiAgPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5CbGFja3tmaWxsOiM3Mjcy + NzI7fQoJLlJlZHtmaWxsOiNEMTFDMUM7fQoJLnN0MHtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8 + cmVjdCB4PSIyIiB5PSI2IiB3aWR0aD0iMTIiIGhlaWdodD0iNCIgY2xhc3M9IlJlZCIgLz4NCiAgPGcg + Y2xhc3M9InN0MCI+DQogICAgPHBhdGggZD0iTTIyLDZoMTB2MkgyMlY2eiBNMjIsMTJoMTB2LTJIMjJW + MTJ6IE0yMiwyMGgxMHYtMkgyMlYyMHogTTIyLDI0aDEwdi0ySDIyVjI0eiIgY2xhc3M9IkJsYWNrIiAv + Pg0KICA8L2c+DQogIDxwYXRoIGQ9Ik0xOCwyaDE0djJIMThWMnogTTE4LDE2aDE0di0ySDE4VjE2eiBN + MTgsMjhoMTR2LTJIMThWMjh6IiBjbGFzcz0iQmxhY2siIC8+DQo8L3N2Zz4L +</value> + </data> + <data name="barBtnSearchBox.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAANoCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz + OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp + dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9Ilpvb20iPg0KICAgIDxwYXRoIGQ9Ik0yNy43LDI1LjNM + MjAuNSwxOGMxLTEuNCwxLjUtMy4yLDEuNS01YzAtNS00LTktOS05cy05LDQtOSw5YzAsNSw0LDksOSw5 + YzEuOSwwLDMuNi0wLjYsNS0xLjVsNy4zLDcuMyAgIGMwLjMsMC4zLDAuOSwwLjMsMS4yLDBsMS4yLTEu + MkMyOC4xLDI2LjIsMjguMSwyNS42LDI3LjcsMjUuM3ogTTYsMTNjMC0zLjksMy4xLTcsNy03czcsMy4x + LDcsN2MwLDMuOS0zLjEsNy03LDdTNiwxNi45LDYsMTN6IiBjbGFzcz0iQmxhY2siIC8+DQogIDwvZz4N + Cjwvc3ZnPgs= +</value> + </data> + <data name="barCkTreeLine.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAIkDAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkdyZWVue2ZpbGw6IzAzOUMyMzt9Cgku + QmxhY2t7ZmlsbDojNzI3MjcyO30KCS5SZWR7ZmlsbDojRDExQzFDO30KCS5ZZWxsb3d7ZmlsbDojRkZC + MTE1O30KCS5CbHVle2ZpbGw6IzExNzdENzt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iSW5zZXJ0VHJl + ZVZpZXciPg0KICAgIDxwYXRoIGQ9Ik0xMyw4SDVDNC40LDgsNCw3LjYsNCw3VjNjMC0wLjUsMC40LTEs + MS0xaDhjMC42LDAsMSwwLjUsMSwxdjRDMTQsNy42LDEzLjYsOCwxMyw4eiBNMjYsMTd2LTQgICBjMC0w + LjYtMC41LTEtMS0xaC04Yy0wLjUsMC0xLDAuNC0xLDF2NGMwLDAuNSwwLjUsMSwxLDFoOEMyNS41LDE4 + LDI2LDE3LjUsMjYsMTd6IE0yNiwyN3YtNGMwLTAuNS0wLjUtMS0xLTFoLThjLTAuNSwwLTEsMC41LTEs + MSAgIHY0YzAsMC41LDAuNSwxLDEsMWg4QzI1LjUsMjgsMjYsMjcuNSwyNiwyN3oiIGNsYXNzPSJZZWxs + b3ciIC8+DQogICAgPHBvbHlnb24gcG9pbnRzPSIxNCwxNiAxNCwxNCAxMCwxNCAxMCwxMCA4LDEwIDgs + MjYgMTQsMjYgMTQsMjQgMTAsMjQgMTAsMTYgICIgY2xhc3M9IkJsYWNrIiAvPg0KICA8L2c+DQo8L3N2 + Zz4L +</value> + </data> + <data name="barBtnRefresh.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAIkDAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD + MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtkaXNwbGF5Om5vbmU7fQoJLnN0MntkaXNwbGF5OmlubGluZTtmaWxsOiMw + MzlDMjM7fQoJLnN0M3tkaXNwbGF5OmlubGluZTtmaWxsOiNEMTFDMUM7fQoJLnN0NHtkaXNwbGF5Omlu + bGluZTtmaWxsOiM3MjcyNzI7fQo8L3N0eWxlPg0KICA8ZyBpZD0iQ2hhbmdlVmlldyI+DQogICAgPHBh + dGggZD0iTTI0LjUsNy41QzIyLjMsNS4zLDE5LjMsNCwxNiw0QzEwLjEsNCw1LjEsOC4zLDQuMiwxNGg0 + LjFjMC45LTMuNCw0LTYsNy43LTZjMi4yLDAsNC4yLDAuOSw1LjYsMi40TDE4LDE0ICAgaDUuN2g0LjFI + MjhWNEwyNC41LDcuNXogTTE2LDI0Yy0yLjIsMC00LjItMC45LTUuNi0yLjRMMTQsMThIOC4yaC00SDR2 + MTBsMy41LTMuNUM5LjcsMjYuNywxMi43LDI4LDE2LDI4YzUuOSwwLDEwLjgtNC4zLDExLjgtMTAgICBo + LTQuMUMyMi44LDIxLjQsMTkuNywyNCwxNiwyNHoiIGNsYXNzPSJCbHVlIiAvPg0KICA8L2c+DQo8L3N2 + Zz4L +</value> + </data> + <metadata name="imageCollection1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>152, 17</value> + </metadata> + <assembly alias="DevExpress.Utils.v23.2" name="DevExpress.Utils.v23.2, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> + <data name="imageCollection1.ImageStream" type="DevExpress.Utils.ImageCollectionStreamer, DevExpress.Utils.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFpEZXZFeHByZXNzLlV0aWxzLnYyMy4yLCBWZXJzaW9uPTIzLjIu + NC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI4OGQxNzU0ZDcwMGU0OWEMAwAAAFFT + eXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRv + a2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAAChEZXZFeHByZXNzLlV0aWxzLkltYWdlQ29sbGVjdGlvblN0 + cmVhbWVyAgAAAAlJbWFnZVNpemUERGF0YQQHE1N5c3RlbS5EcmF3aW5nLlNpemUDAAAAAgIAAAAF/P// + /xNTeXN0ZW0uRHJhd2luZy5TaXplAgAAAAV3aWR0aAZoZWlnaHQAAAgIAwAAABAAAAAQAAAACQUAAAAP + BQAAABICAAACAAEAAIlQTkcNChoKAAAADUlIRFIAAAAQAAAAEAgGAAAAH/P/YQAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADrwAAA68AZW8ckkAAACiSURBVDhPY2AgAL4UFEiiixENvmZm+oIwujjRAGYAWYYg + a6aKASQZgqzppmXIfxj7X24uH7parABZMwh/Sk8PJNoV6LbDMEzse2amI7oeOPgfH8+BTTMI33UM307Q + Fci2P8qs/Y8MkF2B1ZCvubkWuGzH5hV0/XDbX4Qk5KNrwmYAiiHIguga0DFBA0jFIM2m6IKkYLALvmVm + WpGD78fHcwAA/rw5+nXFLjIAAAAASUVORK5CYIIKAQAAiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYA + AAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwAAADsABataJCQAAAKxJREFUOE+1kj0OgzAM + hSNxGy7UKzD3OByAsRNTr9AF9RANSTswdbQrA42SR0LdgSe9xfb3rPwYc4Qsu2lkz2hLrsXZRA8aG4Ry + Rm6WFi6G4IDGAS6dOfbtfd/UmLlSbRfY9DWfhnPaI+9UAQKLsT73cgExsAcXAy6vawD34GKA+HturMe2 + 9OyWVyDXYlPj9REXYfOXLfkhCfg3BNkgHERnN6Pkh8knScH1wkAfQcekgYCMgb0AAAAASUVORK5CYIIL +</value> + </data> +</root> \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/01-tree/FacilityTreeViewModel.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/01-tree/FacilityTreeViewModel.cs new file mode 100644 index 0000000..dffcdcf --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/01-tree/FacilityTreeViewModel.cs @@ -0,0 +1,70 @@ +锘縩amespace PBS.WinFrmUI.Hydro +{ + /// <summary> + /// + /// </summary> + public class FacilityTreeViewModel + { + /// <summary> + /// + /// </summary> + public FacilityTreeViewModel() { } + + + /// <summary> + /// + /// </summary> + public FacilityTreeViewModel(FacilityVmo rhs, bool IsHave) + { + this.ID = rhs.ID; + this.ParentID = rhs.PlaceID; + this.Name = rhs.Name; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + this.Facility = rhs; + if (IsHave) + { + this.ImageIndex = 1; + } + else + { + this.ImageIndex = 0; + } + } + + /// <summary> + /// ID + /// </summary> + public long ID { get; set; } + + /// <summary> + /// ParentID + /// </summary> + public long ParentID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + + /// <summary> + /// 椤圭洰 + /// </summary> + public FacilityVmo Facility { get; set; } + + /// <summary> + /// 鍥炬爣绱㈠紩 + /// </summary> + public int? ImageIndex { get; set; } + } +} \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/EditFloors.Designer.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/EditFloors.Designer.cs new file mode 100644 index 0000000..1a382f6 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/EditFloors.Designer.cs @@ -0,0 +1,763 @@ +锘縩amespace PBS.WinFrmUI.Hydro +{ + partial class EditFloors + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + this.layoutControl2 = new DevExpress.XtraLayout.LayoutControl(); + this.simpleButton4 = new DevExpress.XtraEditors.SimpleButton(); + this.gridControl1 = new DevExpress.XtraGrid.GridControl(); + this.floorTemplateViewModelBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.panelControl1 = new DevExpress.XtraEditors.PanelControl(); + this.textEdit2 = new DevExpress.XtraEditors.TextEdit(); + this.textEditlowerlayers = new DevExpress.XtraEditors.TextEdit(); + this.textEditHightlayers = new DevExpress.XtraEditors.TextEdit(); + this.textEditLevel = new DevExpress.XtraEditors.TextEdit(); + this.textEditFloor = new DevExpress.XtraEditors.TextEdit(); + this.textEdit7 = new DevExpress.XtraEditors.ComboBoxEdit(); + this.textEdit10 = new DevExpress.XtraEditors.TextEdit(); + this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton3 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleBtnFinish = new DevExpress.XtraEditors.SimpleButton(); + this.textEditChoice = new DevExpress.XtraEditors.ButtonEdit(); + this.textEditTemplate = new DevExpress.XtraEditors.ButtonEdit(); + this.listBoxControl1 = new DevExpress.XtraEditors.ImageComboBoxEdit(); + this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem(); + this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem(); + this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + this.layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlGroup6 = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem18 = new DevExpress.XtraLayout.LayoutControlItem(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem19 = new DevExpress.XtraLayout.LayoutControlItem(); + this.dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(this.components); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); + this.layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl2)).BeginInit(); + this.layoutControl2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.floorTemplateViewModelBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit2.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditlowerlayers.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditHightlayers.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditLevel.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditFloor.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit7.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit10.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditChoice.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditTemplate.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.listBoxControl1.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem18)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem19)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider1)).BeginInit(); + this.SuspendLayout(); + // + // layoutControl1 + // + this.layoutControl1.Controls.Add(this.layoutControl2); + this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.layoutControl1.Location = new System.Drawing.Point(0, 0); + this.layoutControl1.Name = "layoutControl1"; + this.layoutControl1.Root = this.Root; + this.layoutControl1.Size = new System.Drawing.Size(936, 479); + this.layoutControl1.TabIndex = 0; + this.layoutControl1.Text = "layoutControl1"; + // + // layoutControl2 + // + this.layoutControl2.Controls.Add(this.simpleButton4); + this.layoutControl2.Controls.Add(this.gridControl1); + this.layoutControl2.Controls.Add(this.panelControl1); + this.layoutControl2.Controls.Add(this.textEdit2); + this.layoutControl2.Controls.Add(this.textEditlowerlayers); + this.layoutControl2.Controls.Add(this.textEditHightlayers); + this.layoutControl2.Controls.Add(this.textEditLevel); + this.layoutControl2.Controls.Add(this.textEditFloor); + this.layoutControl2.Controls.Add(this.textEdit7); + this.layoutControl2.Controls.Add(this.textEdit10); + this.layoutControl2.Controls.Add(this.simpleButton1); + this.layoutControl2.Controls.Add(this.simpleButton2); + this.layoutControl2.Controls.Add(this.simpleButton3); + this.layoutControl2.Controls.Add(this.simpleBtnFinish); + this.layoutControl2.Controls.Add(this.textEditChoice); + this.layoutControl2.Controls.Add(this.textEditTemplate); + this.layoutControl2.Controls.Add(this.listBoxControl1); + this.layoutControl2.Location = new System.Drawing.Point(12, 12); + this.layoutControl2.Name = "layoutControl2"; + this.layoutControl2.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(554, 346, 650, 400); + this.layoutControl2.Root = this.layoutControlGroup1; + this.layoutControl2.Size = new System.Drawing.Size(912, 455); + this.layoutControl2.TabIndex = 4; + this.layoutControl2.Text = "layoutControl2"; + // + // simpleButton4 + // + this.simpleButton4.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.simpleButton4.Appearance.Options.UseBackColor = true; + this.simpleButton4.Location = new System.Drawing.Point(24, 213); + this.simpleButton4.Name = "simpleButton4"; + this.simpleButton4.Size = new System.Drawing.Size(115, 22); + this.simpleButton4.StyleController = this.layoutControl2; + this.simpleButton4.TabIndex = 22; + this.simpleButton4.Text = "鐢熸垚"; + this.simpleButton4.Click += new System.EventHandler(this.simpleButton4_Click_1); + // + // gridControl1 + // + this.gridControl1.DataSource = this.floorTemplateViewModelBindingSource; + this.gridControl1.Location = new System.Drawing.Point(288, 45); + this.gridControl1.MainView = this.gridView1; + this.gridControl1.Name = "gridControl1"; + this.gridControl1.Size = new System.Drawing.Size(284, 243); + this.gridControl1.TabIndex = 14; + this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.gridView1}); + // + // floorTemplateViewModelBindingSource + // + this.floorTemplateViewModelBindingSource.DataSource = typeof(PBS.WinFrmUI.Hydro.FloorTemplateViewModel); + // + // gridView1 + // + this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.gridColumn1, + this.gridColumn2}); + this.gridView1.GridControl = this.gridControl1; + this.gridView1.Name = "gridView1"; + this.gridView1.OptionsBehavior.Editable = false; + this.gridView1.OptionsView.ShowGroupPanel = false; + this.gridView1.RowClick += new DevExpress.XtraGrid.Views.Grid.RowClickEventHandler(this.gridView1_RowClick); + // + // gridColumn1 + // + this.gridColumn1.Caption = "妤煎眰鍚嶇О"; + this.gridColumn1.FieldName = "FloorIndex"; + this.gridColumn1.Name = "gridColumn1"; + this.gridColumn1.Visible = true; + this.gridColumn1.VisibleIndex = 0; + // + // gridColumn2 + // + this.gridColumn2.Caption = "妯℃澘鍚嶇О"; + this.gridColumn2.FieldName = "TemplateName"; + this.gridColumn2.Name = "gridColumn2"; + this.gridColumn2.Visible = true; + this.gridColumn2.VisibleIndex = 1; + // + // panelControl1 + // + this.panelControl1.Location = new System.Drawing.Point(600, 45); + this.panelControl1.Name = "panelControl1"; + this.panelControl1.Size = new System.Drawing.Size(288, 360); + this.panelControl1.TabIndex = 7; + // + // textEdit2 + // + this.textEdit2.Enabled = false; + this.textEdit2.Location = new System.Drawing.Point(377, 325); + this.textEdit2.Name = "textEdit2"; + this.textEdit2.Size = new System.Drawing.Size(183, 20); + this.textEdit2.StyleController = this.layoutControl2; + this.textEdit2.TabIndex = 6; + // + // textEditlowerlayers + // + this.textEditlowerlayers.Location = new System.Drawing.Point(101, 69); + this.textEditlowerlayers.Name = "textEditlowerlayers"; + this.textEditlowerlayers.Size = new System.Drawing.Size(159, 20); + this.textEditlowerlayers.StyleController = this.layoutControl2; + this.textEditlowerlayers.TabIndex = 8; + // + // textEditHightlayers + // + this.textEditHightlayers.Location = new System.Drawing.Point(101, 93); + this.textEditHightlayers.Name = "textEditHightlayers"; + this.textEditHightlayers.Size = new System.Drawing.Size(159, 20); + this.textEditHightlayers.StyleController = this.layoutControl2; + this.textEditHightlayers.TabIndex = 9; + // + // textEditLevel + // + this.textEditLevel.Location = new System.Drawing.Point(101, 117); + this.textEditLevel.Name = "textEditLevel"; + this.textEditLevel.Size = new System.Drawing.Size(159, 20); + this.textEditLevel.StyleController = this.layoutControl2; + this.textEditLevel.TabIndex = 10; + // + // textEditFloor + // + this.textEditFloor.Location = new System.Drawing.Point(101, 141); + this.textEditFloor.Name = "textEditFloor"; + this.textEditFloor.Size = new System.Drawing.Size(159, 20); + this.textEditFloor.StyleController = this.layoutControl2; + this.textEditFloor.TabIndex = 11; + // + // textEdit7 + // + this.textEdit7.EditValue = "鍚戜笂"; + this.textEdit7.Location = new System.Drawing.Point(101, 165); + this.textEdit7.Name = "textEdit7"; + this.textEdit7.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.textEdit7.Properties.Items.AddRange(new object[] { + "鍚戜笂", + "鍚戜笅"}); + this.textEdit7.Size = new System.Drawing.Size(159, 20); + this.textEdit7.StyleController = this.layoutControl2; + this.textEdit7.TabIndex = 12; + // + // textEdit10 + // + this.textEdit10.Location = new System.Drawing.Point(377, 349); + this.textEdit10.Name = "textEdit10"; + this.textEdit10.Size = new System.Drawing.Size(183, 20); + this.textEdit10.StyleController = this.layoutControl2; + this.textEdit10.TabIndex = 16; + // + // simpleButton1 + // + this.simpleButton1.Enabled = false; + this.simpleButton1.Location = new System.Drawing.Point(380, 397); + this.simpleButton1.Name = "simpleButton1"; + this.simpleButton1.Size = new System.Drawing.Size(80, 22); + this.simpleButton1.StyleController = this.layoutControl2; + this.simpleButton1.TabIndex = 17; + this.simpleButton1.Text = "淇濆瓨"; + this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click); + // + // simpleButton2 + // + this.simpleButton2.Location = new System.Drawing.Point(464, 397); + this.simpleButton2.Name = "simpleButton2"; + this.simpleButton2.Size = new System.Drawing.Size(96, 22); + this.simpleButton2.StyleController = this.layoutControl2; + this.simpleButton2.TabIndex = 18; + this.simpleButton2.Text = "鍙栨秷"; + this.simpleButton2.Click += new System.EventHandler(this.simpleButton2_Click); + // + // simpleButton3 + // + this.simpleButton3.Location = new System.Drawing.Point(143, 213); + this.simpleButton3.Name = "simpleButton3"; + this.simpleButton3.Size = new System.Drawing.Size(117, 22); + this.simpleButton3.StyleController = this.layoutControl2; + this.simpleButton3.TabIndex = 19; + this.simpleButton3.Text = "娓呯┖"; + this.simpleButton3.Click += new System.EventHandler(this.simpleButton3_Click); + // + // simpleBtnFinish + // + this.simpleBtnFinish.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Question; + this.simpleBtnFinish.Appearance.Options.UseBackColor = true; + this.simpleBtnFinish.Location = new System.Drawing.Point(600, 409); + this.simpleBtnFinish.Name = "simpleBtnFinish"; + this.simpleBtnFinish.Size = new System.Drawing.Size(288, 22); + this.simpleBtnFinish.StyleController = this.layoutControl2; + this.simpleBtnFinish.TabIndex = 21; + this.simpleBtnFinish.Text = "鎻掑叆绠$綉"; + this.simpleBtnFinish.ToolTip = "鎵嬪姩鐐瑰嚮閫夋嫨绔嬬寤虹珛妤煎眰妯″瀷"; + this.simpleBtnFinish.Click += new System.EventHandler(this.simpleBtnFinish_Click); + // + // textEditChoice + // + this.textEditChoice.Location = new System.Drawing.Point(101, 189); + this.textEditChoice.Name = "textEditChoice"; + this.textEditChoice.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton()}); + this.textEditChoice.Size = new System.Drawing.Size(159, 20); + this.textEditChoice.StyleController = this.layoutControl2; + this.textEditChoice.TabIndex = 13; + this.textEditChoice.Click += new System.EventHandler(this.textEditChoice_Click); + // + // textEditTemplate + // + this.textEditTemplate.Location = new System.Drawing.Point(377, 373); + this.textEditTemplate.Name = "textEditTemplate"; + this.textEditTemplate.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton()}); + this.textEditTemplate.Size = new System.Drawing.Size(183, 20); + this.textEditTemplate.StyleController = this.layoutControl2; + this.textEditTemplate.TabIndex = 15; + this.textEditTemplate.Click += new System.EventHandler(this.textEditTemplate_Click); + // + // listBoxControl1 + // + this.listBoxControl1.Location = new System.Drawing.Point(101, 45); + this.listBoxControl1.Name = "listBoxControl1"; + this.listBoxControl1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.listBoxControl1.Size = new System.Drawing.Size(159, 20); + this.listBoxControl1.StyleController = this.layoutControl2; + this.listBoxControl1.TabIndex = 5; + // + // layoutControlGroup1 + // + this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.layoutControlGroup1.GroupBordersVisible = false; + this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlGroup2, + this.layoutControlGroup3, + this.layoutControlGroup6}); + this.layoutControlGroup1.Name = "Root"; + this.layoutControlGroup1.Size = new System.Drawing.Size(912, 455); + this.layoutControlGroup1.TextVisible = false; + // + // layoutControlGroup2 + // + this.layoutControlGroup2.AppearanceGroup.FontSizeDelta = 3; + this.layoutControlGroup2.AppearanceGroup.Options.UseFont = true; + this.layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem2, + this.layoutControlItem5, + this.layoutControlItem6, + this.layoutControlItem7, + this.layoutControlItem8, + this.layoutControlItem9, + this.layoutControlItem10, + this.layoutControlItem16, + this.emptySpaceItem2, + this.layoutControlItem1}); + this.layoutControlGroup2.Location = new System.Drawing.Point(0, 0); + this.layoutControlGroup2.Name = "layoutControlGroup1"; + this.layoutControlGroup2.Size = new System.Drawing.Size(264, 435); + this.layoutControlGroup2.Text = "鍒嗗尯灞炴��"; + // + // layoutControlItem2 + // + this.layoutControlItem2.AppearanceItemCaption.FontSizeDelta = 2; + this.layoutControlItem2.AppearanceItemCaption.Options.UseFont = true; + this.layoutControlItem2.Control = this.listBoxControl1; + this.layoutControlItem2.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem2.Name = "layoutControlItem2"; + this.layoutControlItem2.Size = new System.Drawing.Size(240, 24); + this.layoutControlItem2.Text = "鍒嗗尯:"; + this.layoutControlItem2.TextSize = new System.Drawing.Size(65, 18); + // + // layoutControlItem5 + // + this.layoutControlItem5.AppearanceItemCaption.FontSizeDelta = 2; + this.layoutControlItem5.AppearanceItemCaption.Options.UseFont = true; + this.layoutControlItem5.Control = this.textEditlowerlayers; + this.layoutControlItem5.Location = new System.Drawing.Point(0, 24); + this.layoutControlItem5.Name = "layoutControlItem5"; + this.layoutControlItem5.Size = new System.Drawing.Size(240, 24); + this.layoutControlItem5.Text = "鏈�浣庡眰:"; + this.layoutControlItem5.TextSize = new System.Drawing.Size(65, 18); + // + // layoutControlItem6 + // + this.layoutControlItem6.AppearanceItemCaption.FontSizeDelta = 2; + this.layoutControlItem6.AppearanceItemCaption.Options.UseFont = true; + this.layoutControlItem6.Control = this.textEditHightlayers; + this.layoutControlItem6.Location = new System.Drawing.Point(0, 48); + this.layoutControlItem6.Name = "layoutControlItem6"; + this.layoutControlItem6.Size = new System.Drawing.Size(240, 24); + this.layoutControlItem6.Text = "鏈�楂樺眰:"; + this.layoutControlItem6.TextSize = new System.Drawing.Size(65, 18); + // + // layoutControlItem7 + // + this.layoutControlItem7.AppearanceItemCaption.FontSizeDelta = 2; + this.layoutControlItem7.AppearanceItemCaption.Options.UseFont = true; + this.layoutControlItem7.Control = this.textEditLevel; + this.layoutControlItem7.CustomizationFormText = "搴曞眰鏍�:"; + this.layoutControlItem7.Location = new System.Drawing.Point(0, 72); + this.layoutControlItem7.Name = "layoutControlItem7"; + this.layoutControlItem7.Size = new System.Drawing.Size(240, 24); + this.layoutControlItem7.Text = "搴曞眰鏍囬珮:"; + this.layoutControlItem7.TextSize = new System.Drawing.Size(65, 18); + // + // layoutControlItem8 + // + this.layoutControlItem8.AppearanceItemCaption.FontSizeDelta = 2; + this.layoutControlItem8.AppearanceItemCaption.Options.UseFont = true; + this.layoutControlItem8.Control = this.textEditFloor; + this.layoutControlItem8.Location = new System.Drawing.Point(0, 96); + this.layoutControlItem8.Name = "layoutControlItem8"; + this.layoutControlItem8.Size = new System.Drawing.Size(240, 24); + this.layoutControlItem8.Text = "妤煎眰楂�:"; + this.layoutControlItem8.TextSize = new System.Drawing.Size(65, 18); + // + // layoutControlItem9 + // + this.layoutControlItem9.AppearanceItemCaption.FontSizeDelta = 2; + this.layoutControlItem9.AppearanceItemCaption.Options.UseFont = true; + this.layoutControlItem9.Control = this.textEdit7; + this.layoutControlItem9.Location = new System.Drawing.Point(0, 120); + this.layoutControlItem9.Name = "layoutControlItem9"; + this.layoutControlItem9.Size = new System.Drawing.Size(240, 24); + this.layoutControlItem9.Text = "渚涙按鏂瑰紡:"; + this.layoutControlItem9.TextSize = new System.Drawing.Size(65, 18); + // + // layoutControlItem10 + // + this.layoutControlItem10.AppearanceItemCaption.FontSizeDelta = 2; + this.layoutControlItem10.AppearanceItemCaption.Options.UseFont = true; + this.layoutControlItem10.Control = this.textEditChoice; + this.layoutControlItem10.Location = new System.Drawing.Point(0, 144); + this.layoutControlItem10.Name = "layoutControlItem10"; + this.layoutControlItem10.Size = new System.Drawing.Size(240, 24); + this.layoutControlItem10.Text = "妯″瀷妯℃澘:"; + this.layoutControlItem10.TextSize = new System.Drawing.Size(65, 18); + // + // layoutControlItem16 + // + this.layoutControlItem16.Control = this.simpleButton3; + this.layoutControlItem16.Location = new System.Drawing.Point(119, 168); + this.layoutControlItem16.Name = "layoutControlItem16"; + this.layoutControlItem16.Size = new System.Drawing.Size(121, 222); + this.layoutControlItem16.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem16.TextVisible = false; + // + // emptySpaceItem2 + // + this.emptySpaceItem2.AllowHotTrack = false; + this.emptySpaceItem2.Location = new System.Drawing.Point(0, 194); + this.emptySpaceItem2.Name = "emptySpaceItem2"; + this.emptySpaceItem2.Size = new System.Drawing.Size(119, 196); + this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0); + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.simpleButton4; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 168); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(119, 26); + this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem1.TextVisible = false; + // + // layoutControlGroup3 + // + this.layoutControlGroup3.AppearanceGroup.FontSizeDelta = 3; + this.layoutControlGroup3.AppearanceGroup.Options.UseFont = true; + this.layoutControlGroup3.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem11, + this.layoutControlGroup4}); + this.layoutControlGroup3.Location = new System.Drawing.Point(264, 0); + this.layoutControlGroup3.Name = "layoutControlGroup2"; + this.layoutControlGroup3.Size = new System.Drawing.Size(312, 435); + this.layoutControlGroup3.Text = "妤煎眰娓呭崟"; + // + // layoutControlItem11 + // + this.layoutControlItem11.Control = this.gridControl1; + this.layoutControlItem11.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem11.Name = "layoutControlItem11"; + this.layoutControlItem11.Size = new System.Drawing.Size(288, 247); + this.layoutControlItem11.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem11.TextVisible = false; + // + // layoutControlGroup4 + // + this.layoutControlGroup4.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem3, + this.layoutControlItem12, + this.layoutControlItem14, + this.emptySpaceItem1, + this.layoutControlItem15, + this.layoutControlItem13}); + this.layoutControlGroup4.Location = new System.Drawing.Point(0, 247); + this.layoutControlGroup4.Name = "layoutControlGroup4"; + this.layoutControlGroup4.Size = new System.Drawing.Size(288, 143); + this.layoutControlGroup4.Text = "灞炴�х紪杈�"; + // + // layoutControlItem3 + // + this.layoutControlItem3.AppearanceItemCaption.FontSizeDelta = 2; + this.layoutControlItem3.AppearanceItemCaption.Options.UseFont = true; + this.layoutControlItem3.Control = this.textEdit2; + this.layoutControlItem3.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(264, 24); + this.layoutControlItem3.Text = "妤煎眰鍚嶇О:"; + this.layoutControlItem3.TextSize = new System.Drawing.Size(65, 18); + // + // layoutControlItem12 + // + this.layoutControlItem12.AppearanceItemCaption.FontSizeDelta = 2; + this.layoutControlItem12.AppearanceItemCaption.Options.UseFont = true; + this.layoutControlItem12.Control = this.textEditTemplate; + this.layoutControlItem12.Location = new System.Drawing.Point(0, 48); + this.layoutControlItem12.Name = "layoutControlItem12"; + this.layoutControlItem12.Size = new System.Drawing.Size(264, 24); + this.layoutControlItem12.Text = "妯″瀷妯℃澘:"; + this.layoutControlItem12.TextSize = new System.Drawing.Size(65, 18); + // + // layoutControlItem14 + // + this.layoutControlItem14.Control = this.simpleButton1; + this.layoutControlItem14.Location = new System.Drawing.Point(80, 72); + this.layoutControlItem14.Name = "layoutControlItem14"; + this.layoutControlItem14.Size = new System.Drawing.Size(84, 26); + this.layoutControlItem14.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem14.TextVisible = false; + // + // emptySpaceItem1 + // + this.emptySpaceItem1.AllowHotTrack = false; + this.emptySpaceItem1.Location = new System.Drawing.Point(0, 72); + this.emptySpaceItem1.Name = "emptySpaceItem1"; + this.emptySpaceItem1.Size = new System.Drawing.Size(80, 26); + this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0); + // + // layoutControlItem15 + // + this.layoutControlItem15.Control = this.simpleButton2; + this.layoutControlItem15.Location = new System.Drawing.Point(164, 72); + this.layoutControlItem15.Name = "layoutControlItem15"; + this.layoutControlItem15.Size = new System.Drawing.Size(100, 26); + this.layoutControlItem15.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem15.TextVisible = false; + // + // layoutControlItem13 + // + this.layoutControlItem13.AppearanceItemCaption.FontSizeDelta = 2; + this.layoutControlItem13.AppearanceItemCaption.Options.UseFont = true; + this.layoutControlItem13.Control = this.textEdit10; + this.layoutControlItem13.Location = new System.Drawing.Point(0, 24); + this.layoutControlItem13.Name = "layoutControlItem13"; + this.layoutControlItem13.Size = new System.Drawing.Size(264, 24); + this.layoutControlItem13.Text = "妤煎眰楂�:"; + this.layoutControlItem13.TextSize = new System.Drawing.Size(65, 18); + // + // layoutControlGroup6 + // + this.layoutControlGroup6.AppearanceGroup.FontSizeDelta = 3; + this.layoutControlGroup6.AppearanceGroup.Options.UseFont = true; + this.layoutControlGroup6.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem4, + this.layoutControlItem18}); + this.layoutControlGroup6.Location = new System.Drawing.Point(576, 0); + this.layoutControlGroup6.Name = "layoutControlGroup5"; + this.layoutControlGroup6.Size = new System.Drawing.Size(316, 435); + this.layoutControlGroup6.Text = "妯℃澘棰勮"; + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.panelControl1; + this.layoutControlItem4.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem4.Name = "layoutControlItem4"; + this.layoutControlItem4.Size = new System.Drawing.Size(292, 364); + this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem4.TextVisible = false; + // + // layoutControlItem18 + // + this.layoutControlItem18.Control = this.simpleBtnFinish; + this.layoutControlItem18.Location = new System.Drawing.Point(0, 364); + this.layoutControlItem18.Name = "layoutControlItem18"; + this.layoutControlItem18.Size = new System.Drawing.Size(292, 26); + this.layoutControlItem18.Text = "鎻掑叆瀹樼綉"; + this.layoutControlItem18.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem18.TextVisible = false; + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem19}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(936, 479); + this.Root.TextVisible = false; + // + // layoutControlItem19 + // + this.layoutControlItem19.Control = this.layoutControl2; + this.layoutControlItem19.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem19.Name = "layoutControlItem19"; + this.layoutControlItem19.Size = new System.Drawing.Size(916, 459); + this.layoutControlItem19.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem19.TextVisible = false; + // + // dxErrorProvider1 + // + this.dxErrorProvider1.ContainerControl = this; + // + // EditFloors + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(936, 479); + this.Controls.Add(this.layoutControl1); + this.Name = "EditFloors"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "妤煎眰璁剧疆"; + this.Load += new System.EventHandler(this.EditFloors_Load); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit(); + this.layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl2)).EndInit(); + this.layoutControl2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.floorTemplateViewModelBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit2.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditlowerlayers.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditHightlayers.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditLevel.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditFloor.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit7.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit10.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditChoice.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditTemplate.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.listBoxControl1.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem18)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem19)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraLayout.LayoutControl layoutControl2; + private DevExpress.XtraGrid.GridControl gridControl1; + private DevExpress.XtraGrid.Views.Grid.GridView gridView1; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn1; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn2; + private DevExpress.XtraEditors.PanelControl panelControl1; + private DevExpress.XtraEditors.TextEdit textEdit2; + private DevExpress.XtraEditors.TextEdit textEditlowerlayers; + private DevExpress.XtraEditors.TextEdit textEditHightlayers; + private DevExpress.XtraEditors.TextEdit textEditLevel; + private DevExpress.XtraEditors.TextEdit textEditFloor; + private DevExpress.XtraEditors.ComboBoxEdit textEdit7; + private DevExpress.XtraEditors.TextEdit textEdit10; + private DevExpress.XtraEditors.SimpleButton simpleButton1; + private DevExpress.XtraEditors.SimpleButton simpleButton2; + private DevExpress.XtraEditors.SimpleButton simpleButton3; + private DevExpress.XtraEditors.SimpleButton simpleBtnFinish; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem16; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem15; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup6; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem18; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem19; + private DevExpress.XtraEditors.ButtonEdit textEditChoice; + private DevExpress.XtraEditors.ButtonEdit textEditTemplate; + private System.Windows.Forms.BindingSource floorTemplateViewModelBindingSource; + private DevExpress.XtraEditors.ImageComboBoxEdit listBoxControl1; + private DevExpress.XtraEditors.SimpleButton simpleButton4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + } +} \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/EditFloors.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/EditFloors.cs new file mode 100644 index 0000000..810e008 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/EditFloors.cs @@ -0,0 +1,322 @@ +锘縰sing DevExpress.Utils.Extensions; +using Hydro; +using System.Data; + +namespace PBS.WinFrmUI.Hydro +{ + public partial class EditFloors : DevExpress.XtraEditors.XtraForm + { + public EditFloors() + { + InitializeComponent(); + } + + private List<FloorTemplateViewModel> floorTemplateViewModels = new List<FloorTemplateViewModel>(); + private Template _selectTemp { get; set; } + + private void EditFloors_Load(object sender, EventArgs e) + { + if (map == null) + { + map = new MapViewer(); + map.Lock2DView = true; + map.Location = new System.Drawing.Point(0, 0); + map.Dock = DockStyle.Fill; + + panelControl1.AddControl(map); + + this.floorTemplateViewModelBindingSource.DataSource = floorTemplateViewModels; + this.gridView1.RefreshData(); + } + } + + private MapViewer map = null; + + //妯¢�夋嫨 + private void textEditChoice_Click(object sender, EventArgs e) + { + var dlg = new TemplateChoice(); + if (dlg.ShowDialog() == DialogResult.OK) + { + template = ModelConvertToTemplate(dlg.modelTemplate); + SetMapData(template); + textEditChoice.Text = template.Name; + } + } + + + + private void textEditTemplate_Click(object sender, EventArgs e) + { + var dlg = new TemplateChoice(); + if (dlg.ShowDialog() == DialogResult.OK) + { + floorTemplate = ModelConvertToTemplate(dlg.modelTemplate); + SetMapData(floorTemplate); + textEditTemplate.Text = floorTemplate.Name; + } + } + + private void SetMapData(Template _template) + { + // 鑾峰彇褰撳墠閫変腑鐨勬ā鏉� + _selectTemp = _template; + + if (_selectTemp != null) + { + var temp = _selectTemp; + string filePath = temp.FullPath; + temp.network = new MapViewNetWork(); + temp.network.BuildFromInp(Path.Combine(Directory.GetCurrentDirectory(), filePath)); + map.SetData(temp); + } + } + + + private Template ModelConvertToTemplate(Vmo.ModelTemplateVmo model) + { + return Yw.JsonHelper.Json2Object<Template>(model.ModelInfo); + } + + + + private Template template; + private Template floorTemplate; + public List<Floor> floors = new List<Floor>(); + + private void simpleButton3_Click(object sender, EventArgs e) + { + //娓呯┖妤煎眰 + if (floorTemplateViewModels.Any()) + { + floorTemplateViewModels.Clear(); + + floors.Clear(); + ClearControl(); + this.gridView1.RefreshData(); + } + } + + private void ClearControl() + { + textEditlowerlayers.Text = textEditHightlayers.Text = textEditLevel.Text = textEditFloor.Text = textEdit7.Text = textEditChoice.Text = ""; + } + + private void ClearPropControl() + { + textEdit2.Text = textEditTemplate.Text = textEdit10.Text = ""; + } + + /// <summary> + /// 鎻掑叆绠$綉 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void simpleBtnFinish_Click(object sender, EventArgs e) + { + var temp = GetNet(); + GlobalObject.map.InsertNet(temp); + this.Hide(); + } + + private Template GetNet() + { + int step = 1; + int startIndex = 0; + int endIndex = floors.Count; + var isDirectionUp = textEdit7.SelectedItem as string == "鍚戜笂" ? true : false; + if (!isDirectionUp) + { + step = -1; + startIndex = floors.Count - 1; + endIndex = -1; + } + MapViewNetWork net = new MapViewNetWork(); + NodeViewModel lastPoint = null; + NodeViewModel node1 = null; + for (int i = startIndex; isDirectionUp ? i < endIndex : i > endIndex; i += step) + { + var floor = floors[i]; + if (floor.template.network == null) + { + floor.template.loadInpFile(); + } + var n = floor.template.network; + var point = n.Nodes.Find(node => node.ID == floor.template.Node1); + if (point == null) point = n.Nodes[0]; + PointF3D p = new PointF3D(0 - point.X, 0 - point.Y, floor.Elev - point.Elev); + n.Nodes.Select(node => (NodeViewModel)node).ToList().ForEach(node => { node.regionName = PBS.eWaterSupply.Low.ToString(); node.Floor = i.ToString(); }); + n.Links.Select(link => (LinkViewModel)link).ToList().ForEach(link => { link.regionName = PBS.eWaterSupply.Low.ToString(); link.Floor = i.ToString(); }); + var list = net.Add(n, p, true); + NodeViewModel CurrentPoint = (NodeViewModel)list[0]; + if (lastPoint != null) + { + var j = net.AddPipe(lastPoint, CurrentPoint); + j.regionName = PBS.eWaterSupply.Low.ToString(); + } + lastPoint = (NodeViewModel)list[0]; + if (node1 == null) node1 = lastPoint; + } + Template temp = new Template(); + temp.network = net; + temp.Node1 = node1.ID; + return temp; + } + + private void simpleButton2_Click(object sender, EventArgs e) + { + ClearPropControl(); + simpleButton1.Enabled = false; + } + + private void gridView1_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) + { + var curr = this.gridView1.GetFocusedRow() as FloorTemplateViewModel; + textEdit2.Text = curr.FloorIndex; + textEdit10.Text = curr.FloorHeight.ToString(); + textEditTemplate.Text = curr.TemplateName; + simpleButton1.Enabled = true; + floorTemplate = curr.floorTemplate; + SetMapData(floorTemplate); + } + + private void simpleButton1_Click(object sender, EventArgs e) + { + + floorTemplateViewModels.ForEach(c => + { + if (c.FloorIndex == textEdit2.Text) + { + c.FloorHeight = float.Parse(textEdit10.Text); + c.TemplateID = long.Parse(floorTemplate.ID); + c.TemplateName = floorTemplate.Name; + c.floorTemplate = floorTemplate; + } + }); + + floors.ForEach(c => + { + if (c.FloorIndex == int.Parse(textEdit2.Text.Replace("妤�", ""))) + { + c.TemplateID = floorTemplate.ID; + } + }); + this.gridView1.RefreshData(); + } + + + + //鐢熸垚 + private void simpleButton4_Click_1(object sender, EventArgs e) + { + int minFloorIndex; + int maxFloorIndex; + float floorHeight; + float minFloorElev; + if (!Verify()) + return; + minFloorIndex = int.Parse(textEditlowerlayers.Text); + maxFloorIndex = int.Parse(textEditHightlayers.Text); + floorHeight = float.Parse(textEditFloor.Text); + minFloorElev = float.Parse(textEditLevel.Text); + for (int i = minFloorIndex; i <= maxFloorIndex; i++) + { + var floorName = i + "妤�"; + if (!floorTemplateViewModels.Any(c => c.FloorIndex == floorName)) + { + float floorElev = minFloorElev + (i - minFloorIndex) * floorHeight; + Floor newFloor = new Floor(i, template.ID, floorElev, null); + floors.Add(newFloor); + + floorTemplateViewModels.Add(new FloorTemplateViewModel() + { + FloorIndex = floorName, + FloorHeight = floorHeight, + TemplateID = long.Parse(template.ID), + TemplateName = template.Name, + floorTemplate = template + }); + } + } + + this.floorTemplateViewModelBindingSource.DataSource = floorTemplateViewModels; + this.gridView1.RefreshData(); + } + + //鏁版嵁楠岃瘉 + private bool Verify() + { + dxErrorProvider1.ClearErrors(); + //鏈�浣庡眰 + if (string.IsNullOrEmpty(textEditlowerlayers.Text)) + { + dxErrorProvider1.SetError(textEditlowerlayers, "蹇呭~椤�"); + return false; + } + if (!int.TryParse(textEditlowerlayers.Text, out int low) || low <= 0) + { + dxErrorProvider1.SetError(textEditlowerlayers, "蹇呴』澶т簬0"); + return false; + } + //鏈�楂樺眰 + if (string.IsNullOrEmpty(textEditHightlayers.Text)) + { + dxErrorProvider1.SetError(textEditHightlayers, "蹇呭~椤�"); + return false; + } + if (!int.TryParse(textEditHightlayers.Text, out int hight) || hight <= 0) + { + dxErrorProvider1.SetError(textEditHightlayers, "蹇呴』澶т簬0"); + return false; + } + //搴曞眰鏍囬珮 + if (string.IsNullOrEmpty(textEditLevel.Text)) + { + dxErrorProvider1.SetError(textEditLevel, "蹇呭~椤�"); + return false; + } + if (!int.TryParse(textEditLevel.Text, out int level) || level <= 0) + { + dxErrorProvider1.SetError(textEditLevel, "蹇呴』澶т簬0"); + return false; + } + + //妤煎眰楂� + if (string.IsNullOrEmpty(textEditFloor.Text)) + { + dxErrorProvider1.SetError(textEditFloor, "蹇呭~椤�"); + return false; + } + if (!float.TryParse(textEditFloor.Text, out float floor) || floor <= 1) + { + dxErrorProvider1.SetError(textEditFloor, "蹇呴』澶т簬1"); + return false; + } + if (hight <= low) + { + dxErrorProvider1.SetError(textEditHightlayers, "鏈�楂樺眰闇�澶т簬鏈�浣庡眰"); + return false; + } + if (template == null) + { + dxErrorProvider1.SetError(textEditChoice, "蹇呴�夐」"); + return false; + } + // 濡傛灉浠ヤ笂鏉′欢閮戒笉婊¤冻锛屽垯杩斿洖true + return true; + } + } + + public class FloorTemplateViewModel + { + public string FloorIndex { get; set; } + + public long TemplateID { get; set; } + + public string TemplateName { get; set; } + + public float FloorHeight { get; set; } + + public Template floorTemplate { get; set; } + } +} \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/EditFloors.resx b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/EditFloors.resx new file mode 100644 index 0000000..f1b065a --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/EditFloors.resx @@ -0,0 +1,126 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="floorTemplateViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>304, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/InputDlg.Designer.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/InputDlg.Designer.cs new file mode 100644 index 0000000..9aa8cb1 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/InputDlg.Designer.cs @@ -0,0 +1,168 @@ +锘縩amespace PBS.WinFrmUI.Hydro +{ + partial class InputDlg + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + components = new Container(); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + generalOkAndCancelCtrl1 = new GeneralOkAndCancelCtrl(); + txtValue = new TextEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + ((ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((ISupportInitialize)txtValue.Properties).BeginInit(); + ((ISupportInitialize)Root).BeginInit(); + ((ISupportInitialize)layoutControlItem1).BeginInit(); + ((ISupportInitialize)layoutControlItem4).BeginInit(); + ((ISupportInitialize)emptySpaceItem2).BeginInit(); + ((ISupportInitialize)dxErrorProvider1).BeginInit(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(generalOkAndCancelCtrl1); + layoutControl1.Controls.Add(txtValue); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Margin = new Padding(3, 4, 3, 4); + layoutControl1.Name = "layoutControl1"; + layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(982, 129, 650, 400); + layoutControl1.Root = Root; + layoutControl1.Size = new Size(401, 96); + layoutControl1.TabIndex = 0; + layoutControl1.Text = "layoutControl1"; + // + // generalOkAndCancelCtrl1 + // + generalOkAndCancelCtrl1.ButtonCancelMaxSize = new Size(131, 42); + generalOkAndCancelCtrl1.ButtonCancelMinSize = new Size(114, 33); + generalOkAndCancelCtrl1.ButtonOkMaxSize = new Size(131, 42); + generalOkAndCancelCtrl1.ButtonOkMinSize = new Size(114, 33); + generalOkAndCancelCtrl1.Location = new Point(12, 51); + generalOkAndCancelCtrl1.Margin = new Padding(3, 5, 3, 5); + generalOkAndCancelCtrl1.Name = "generalOkAndCancelCtrl1"; + generalOkAndCancelCtrl1.Size = new Size(377, 33); + generalOkAndCancelCtrl1.TabIndex = 8; + // + // txtValue + // + txtValue.Location = new Point(12, 12); + txtValue.Margin = new Padding(3, 4, 3, 4); + txtValue.Name = "txtValue"; + txtValue.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtValue.Size = new Size(377, 24); + txtValue.StyleController = layoutControl1; + txtValue.TabIndex = 0; + // + // Root + // + Root.AppearanceItemCaption.Options.UseTextOptions = true; + Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; + Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + Root.GroupBordersVisible = false; + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem4, emptySpaceItem2 }); + Root.Name = "Root"; + Root.Size = new Size(401, 96); + Root.TextVisible = false; + // + // layoutControlItem1 + // + layoutControlItem1.AllowHtmlStringInCaption = true; + layoutControlItem1.Control = txtValue; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(381, 28); + layoutControlItem1.Text = "<color=red>*</color>鍚嶇О:"; + layoutControlItem1.TextSize = new Size(0, 0); + layoutControlItem1.TextVisible = false; + // + // layoutControlItem4 + // + layoutControlItem4.Control = generalOkAndCancelCtrl1; + layoutControlItem4.Location = new Point(0, 39); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(381, 37); + layoutControlItem4.TextSize = new Size(0, 0); + layoutControlItem4.TextVisible = false; + // + // emptySpaceItem2 + // + emptySpaceItem2.AllowHotTrack = false; + emptySpaceItem2.Location = new Point(0, 28); + emptySpaceItem2.Name = "emptySpaceItem2"; + emptySpaceItem2.Size = new Size(381, 11); + emptySpaceItem2.TextSize = new Size(0, 0); + // + // dxErrorProvider1 + // + dxErrorProvider1.ContainerControl = this; + // + // InputDlg + // + AutoScaleDimensions = new SizeF(8F, 18F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(401, 96); + Controls.Add(layoutControl1); + Margin = new Padding(3, 4, 3, 4); + Name = "InputDlg"; + StartPosition = FormStartPosition.CenterParent; + Text = "鏂板"; + ((ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((ISupportInitialize)txtValue.Properties).EndInit(); + ((ISupportInitialize)Root).EndInit(); + ((ISupportInitialize)layoutControlItem1).EndInit(); + ((ISupportInitialize)layoutControlItem4).EndInit(); + ((ISupportInitialize)emptySpaceItem2).EndInit(); + ((ISupportInitialize)dxErrorProvider1).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraEditors.TextEdit txtValue; + private DevExpress.XtraEditors.TextEdit TextCustomerName; + private DevExpress.XtraEditors.TextEdit TextTagName; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraEditors.SimpleButton BtnCancel; + private DevExpress.XtraEditors.SimpleButton BtnOk; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + private GeneralOkAndCancelCtrl generalOkAndCancelCtrl1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2; + } +} \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/InputDlg.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/InputDlg.cs new file mode 100644 index 0000000..effa26e --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/InputDlg.cs @@ -0,0 +1,56 @@ +锘縩amespace PBS.WinFrmUI.Hydro +{ + public partial class InputDlg : DevExpress.XtraEditors.XtraForm + { + public InputDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + this.layoutControl1.SetupLayoutControl(); + this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent; + } + + /// <summary> + /// 閲嶈浇鏁版嵁 + /// </summary> + public event Action<double> ReloadDataEvent; + + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData(string title,double? value=null) + { + this.Text = title; + this.txtValue.EditValue = value; + } + + //鏁版嵁楠岃瘉 + private bool Verify() + { + this.dxErrorProvider1.ClearErrors(); + if (double.TryParse(this.txtValue.Text,out double value)) + { + this.dxErrorProvider1.SetError(this.txtValue, "蹇呭~椤�"); + return false; + } + + return true; + } + + //纭畾 + private void GeneralOkAndCancelCtrl1_OkEvent() + { + if (!Verify()) + { + return; + } + var value = Convert.ToDouble(this.txtValue.Text); + this.ReloadDataEvent?.Invoke(value); + this.DialogResult = DialogResult.OK; + this.Close(); + } + + + } +} \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/InputDlg.resx b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/InputDlg.resx new file mode 100644 index 0000000..43b467c --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/InputDlg.resx @@ -0,0 +1,123 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/ModelEditPage.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/ModelEditPage.cs deleted file mode 100644 index 206e28e..0000000 --- a/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/ModelEditPage.cs +++ /dev/null @@ -1,521 +0,0 @@ -锘縰sing Hydro; - -namespace PBS.WinFrmUI.Hydro -{ - public partial class ModelEditPage : DocumentPage - { - public ModelEditPage() - { - InitializeComponent(); - this.modelTemplateTreeListCtrl1.SelectModelTemplateEvent += ModelTemplateTreeListCtrl1_SelectModelTemplateEvent; - this.modelTemplateTreeListCtrl1.RefreshDataEvent += () => { RefreshData(); }; - } - - - private ModelTemplateVmo _modelTemplate = null; - private Template _template = null; - private MapViewer _mapView; - private PropertyForm _propertyForm; - - /// <summary> - /// 鍒濆鍖栨暟鎹簮 - /// </summary> - public override void InitialDataSource() - { - base.InitialDataSource(); - InitialMapViewer(); - InitialData(); - } - - //鍒濆鍖栨暟鎹� - private async void InitialData() - { - var overlay = this.ShowOverlay(); - var allModelTemplateList = await BLLFactory<BLL.ModelTemplate>.Instance.GetAll(); - this.modelTemplateTreeListCtrl1.SetBindingData(allModelTemplateList); - - overlay.Close(); - } - - //鍒濆鍖栬鍥� - private void InitialMapViewer() - { - _mapView = new MapViewer(); - _mapView.Lock2DView = true; - _mapView.ShowPropertyForm = false; - _mapView.Location = new System.Drawing.Point(0, 0); - _mapView.Dock = DockStyle.Fill; - - this.panelControl1.Controls.Add(_mapView); - - _propertyForm = new PropertyForm(); - _propertyForm.Dock = DockStyle.Fill; - this.dockPanelModelProperty.Controls.Add(_propertyForm); - - GlobalObject.PropertyForm = _propertyForm; - GlobalObject.map = _mapView; - } - - - private void ModelTemplateTreeListCtrl1_SelectModelTemplateEvent(ModelTemplateVmo obj) - { - - if (obj == null) - { - _modelTemplate = null; - _template = null; - _mapView.Clear(); - return; - } - - if (string.IsNullOrEmpty(obj.ModelPath)) - { - var filePath = "template\\" + obj.TemplateType + "\\" + obj.ID + ".inp"; - var fullPath = Path.Combine(Directory.GetCurrentDirectory(), filePath); - - var directoryPath = Path.GetDirectoryName(fullPath); - if (!Directory.Exists(directoryPath)) - Directory.CreateDirectory(directoryPath); - if (!File.Exists(fullPath)) - File.Create(fullPath).Close(); - - obj.ModelPath = fullPath; - } - - if (string.IsNullOrEmpty(obj.ModelInfo)) - { - obj.ModelInfo = Yw.JsonHelper.Object2Json(new Template() - { - ID = obj.ID.ToString(), - Name = obj.Name, - Type = obj.TemplateType, - filePath = obj.ModelPath, - }); - } - - _modelTemplate = obj; - _template = Yw.JsonHelper.Json2Object<Template>(obj.ModelInfo); - - - var template = _template; - template.network = new MapViewNetWork(); - template.network.BuildFromInp(Path.Combine(Directory.GetCurrentDirectory(), _template.filePath)); - _mapView.SetData(template); - - } - - - public override void RefreshData() - { - base.RefreshData(); - InitialData(); - } - - private void SetMapBackground(string backgroundUrl, float width, float height) - { - _mapView.mapOption.isShowPic = true; - _mapView.mapOption.isAutoBackgroundImage = true; - var img = Image.FromFile(backgroundUrl); - var imgWidth = img.Width; - var imgHeight = img.Height; - - var w = imgWidth / width; - var h = imgHeight / height; - var zoom = w > h ? w : h; - - _mapView.MapCenter = _mapView.mapOption.Center = new PointF(width / 2, height / 2); - _mapView.zoom = _mapView.mapOption.zoom = zoom; - - var temp = _mapView._Template; - var dict = Path.GetDirectoryName(temp.BackGroundImg_FullPath); - if (!Directory.Exists(dict)) - { - Directory.CreateDirectory(dict); - } - File.Copy(backgroundUrl, temp.BackGroundImg_FullPath, true); - temp.BackGroundImg_FullPath = temp.BackGroundImg_FullPath; - temp.BackGroundImgWidth = width; - temp.BackGroundImgHeight = height; - temp.BackGroundImgRotaAngle = 0; - temp.BackGroundPoint1 = new PointF(0, 0); - _mapView._Template = temp; - _mapView.SetMapInvalidate(); - - } - - #region Event - - #region Draw - - private void toolboxControlDraw_ItemClick(object sender, DevExpress.XtraToolbox.ToolboxItemClickEventArgs e) - { - if (e.Item.Tag is not string tag) - return; - switch (tag) - { - case "Select": - { - _mapView.toolStripButton_鏅�歘Click(1, new EventArgs()); - } - break; - case "AddNode": - { - _mapView.toolStripButton_鏂板缓鑺傜偣_Click(1, new EventArgs()); - } - break; - case "AddVerticalPipe": - { - _mapView.toolStripButton_鏂板缓绔嬬_Click(1, new EventArgs()); - } - break; - case "AddHorizontalPipe": - { - _mapView.toolStripButton_鏂板缓绠$嚎_Click(1, new EventArgs()); - } - break; - case "AddValve": - { - _mapView.toolStripButton_娣诲姞闃�闂╛Click(1, new EventArgs()); - } - break; - case "AddPump": - { - _mapView.toolStripButton_娣诲姞姘存车_Click(1, new EventArgs()); - } - break; - case "AddWaterMeter": - { - _mapView.toolStripButton_娣诲姞姘磋〃_Click(1, new EventArgs()); - } - break; - case "AddTank": - { - _mapView.toolStripButton_娣诲姞姘存睜_Click(1, new EventArgs()); - } - break; - case "AddReservoir": - { - _mapView.toolStripButton_娣诲姞姘村簱_Click(1, new EventArgs()); - } - break; - case "Copy": - { - _mapView.澶嶅埗ToolStripMenuItem_Click(1, new EventArgs()); - } - break; - case "Paste": - { - _mapView.绮樿创ToolStripMenuItem1_Click(1, new EventArgs()); - } - break; - case "Delete": - { - _mapView.鍒犻櫎ToolStripMenuItem_Click(1, new EventArgs()); - } - break; - - case "Undo": - { - _mapView.buttonUndo_Click(1, new EventArgs()); - } - break; - case "Redo": - { - _mapView.buttonRedo_Click(1, new EventArgs()); - } - break; - case "HorizontalAlign": - { - _mapView.涓滆タ瀵归綈ToolStripMenuItem_Click(1, new EventArgs()); - } - break; - case "VerticalAlign": - { - _mapView.鍗楀寳瀵归綈ToolStripMenuItem_Click(1, new EventArgs()); - } - break; - case "TopBottomAlign": - { - _mapView.绔栫洿瀵归綈ToolStripMenuItem_Click(1, new EventArgs()); - } - break; - case "AutoAlign": - { - _mapView.鑷姩瀵归綈ToolStripMenuItem_Click(1, new EventArgs()); - } - break; - default: - break; - } - - - } - - - - private void toolTipController1_GetActiveObjectInfo(object sender, DevExpress.Utils.ToolTipControllerGetActiveObjectInfoEventArgs e) - { - var hi = this.toolboxControlDraw.CalcHitInfo(e.ControlMousePosition); - if (hi.IsInItem) - { - var toolItem = hi.ItemInfo.Item; - this.toolTipController1.ShowHint(toolItem.Caption, MousePosition); - } - else - { - this.toolTipController1.HideHint(); - } - } - - #endregion - - #region ModelTemplate - private void barBtnAddModelTemplate_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - this.modelTemplateTreeListCtrl1.AddModelTemplate(); - } - - private void barBtnEditModelTemplate_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - this.modelTemplateTreeListCtrl1.UpdateModelTemplate(); - } - - private void barBtnDeleteModelTemplate_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - this.modelTemplateTreeListCtrl1.DeleteModelTemplate(); - } - - - /// <summary> - /// 淇濆瓨 - /// </summary> - private void SaveModelTemplate() - { - if (_modelTemplate == null) - { - TipFormHelper.ShowWarn("璇烽�夋嫨妯℃澘"); - return; - } - if (_template == null) - { - TipFormHelper.ShowWarn("璇烽�夋嫨妯℃澘"); - return; - } - SaveView(); - SetZoom(); - - _modelTemplate.ModelInfo = Yw.JsonHelper.Object2Json(_template); - this._mapView.toolStripButton_save_ButtonClick(1, new EventArgs()); - this.modelTemplateTreeListCtrl1.SaveModelTemplate(_modelTemplate); - } - - private void SetZoom() - { - if (_template != null) - { - if (_template.view == null) _template.view = new MapDimensions(); - _template.view.Center = _mapView.MapCenter; - _template.view.zoom = _mapView.zoom; - _template.view.rotation = _mapView.Rotation; - _template.view.rotationF = _mapView.RotationF; - - } - - } - - - private void barBtnSaveModelTemplate_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - SaveModelTemplate(); - } - - #endregion - - #region Import - - private void ImportInp() - { - if (_modelTemplate == null) - { - return; - } - if (_template == null) - { - return; - } - var openFileDlg = new OpenFileDialog(); - openFileDlg.Filter = "INP鏂囦欢|*.inp"; - if (openFileDlg.ShowDialog() != DialogResult.OK) - return; - - _mapView.Clear(); - - var inpFilePath = openFileDlg.FileName; - var templateFilePath = _template.FullPath; - - Global.ClearFileReadOnly(templateFilePath); - File.Copy(inpFilePath, templateFilePath, true); - _template.network.BuildFromInp(templateFilePath); - - _mapView.SetData(_template); - - } - - - private void barBtnImportInp_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - ImportInp(); - } - - #endregion - - #region BaseMap - - private void SetBaseMap() - { - var dlg = new SetMapBaseMapDlg(); - dlg.ReloadDataEvent += (filePath, widht, height) => - { - SetMapBackground(filePath, (float)widht, (float)height); - }; - dlg.ShowDialog(); - } - - private void barBtnAddBaseMap_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - SetBaseMap(); - } - - private void barBtnSetBaseMap_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - _mapView.璁剧疆搴曞浘ToolStripMenuItem_Click(1, null); - } - - private void barBtnClearBaseMap_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - _mapView.娓呴櫎搴曞浘ToolStripMenuItem_Click(1, null); - } - - private void barCekBaseMapVisible_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - _mapView.鏄剧ず闅愯棌搴曞浘ToolStripMenuItem_Click(1, null); - } - - - #endregion - - #region View - - private void SetDefaultView() - { - var mapOption0 = _mapView.mapOption.Copy(); - var p = PointF.Empty; - float x0 = 99999999999f, y0 = 99999999999f, x1 = -99999999999f, y1 = -99999999999f; - - foreach (NodeViewModel junction in _mapView._Nodes) - { - p.X += (float)junction.X; - p.Y += (float)junction.Y; - if (x0 > junction.X) x0 = junction.X; - if (y0 > junction.Y) y0 = junction.Y; - if (x1 < junction.X) x1 = junction.X; - if (y1 < junction.Y) y1 = junction.Y; - } - - float x_span = x1 - x0, y_span = y1 - y0; - - _mapView.zoom = Math.Min(this._mapView.Width / x_span, this._mapView.Height / y_span); - _mapView.zoom = Math.Max(_mapView.zoom, 0.1f); - _mapView.zoom = Math.Min(_mapView.zoom, 1000.0f); - - _mapView.Rotation = 0; - _mapView.RotationF = 90; - - - if (_mapView._Nodes.Count > 0) - { - p.X /= _mapView._Nodes.Count; - p.Y /= _mapView._Nodes.Count; - } - _mapView.MapCenter = p; - _mapView.RotationF = 45; - _mapView.Rotation = -45; - MapObjectExtensions.AddCommand(_mapView.mapOption, "Map", mapOption0, _mapView.mapOption); - - _mapView.SetMapInvalidate(); - } - - private void barBtnDefaultView_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - SetDefaultView(); - } - - private void barBtnFullView_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - _mapView.閲嶇疆瑙嗚ToolStripMenuItem_Click(1, new EventArgs()); - } - - private void SetTopView() - { - var mapOption0 = _mapView.mapOption.Copy(); - _mapView.RotationF = 90; - MapObjectExtensions.AddCommand(_mapView.mapOption, "Map", mapOption0, _mapView.mapOption); - - _mapView.SetMapInvalidate(); - } - - private void barBtnTopView_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - SetTopView(); - } - - private void SetFrontView() - { - var mapOption0 = _mapView.mapOption.Copy(); - _mapView.RotationF = 0; - MapObjectExtensions.AddCommand(_mapView.mapOption, "Map", mapOption0, _mapView.mapOption); - - _mapView.SetMapInvalidate(); - } - - private void barBtnFrontView_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - SetFrontView(); - } - - private void barBtnResetView_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - _mapView.閲嶇疆瑙嗚ToolStripMenuItem_Click(1, new EventArgs()); - } - - private void SaveView() - { - //if (_mapDimensions == null) - // _mapDimensions = new MapDimensions(); - //_mapDimensions.Center = map.MapCenter; - //_mapDimensions.zoom = map.zoom; - //_mapDimensions.rotation = map.Rotation; - //_mapDimensions.rotationF = map.RotationF; - - if (_template == null) return; - if (_template.view == null) _template.view = new MapDimensions(); - _template.view.Center = _mapView.MapCenter; - _template.view.zoom = _mapView.zoom; - _template.view.rotation = _mapView.Rotation; - _template.view.rotationF = _mapView.RotationF; - - } - - private void barBtnSaveView_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - SaveView(); - } - #endregion - - #endregion - - - - } - -} \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/TemplateChoice.Designer.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/TemplateChoice.Designer.cs new file mode 100644 index 0000000..e264a20 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/TemplateChoice.Designer.cs @@ -0,0 +1,233 @@ +锘縩amespace PBS.WinFrmUI.Hydro +{ + partial class TemplateChoice + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + this.propertyGrid1 = new DevExpress.XtraVerticalGrid.PropertyGridControl(); + this.panelControl1 = new DevExpress.XtraEditors.PanelControl(); + this.treeList1 = new DevExpress.XtraTreeList.TreeList(); + this.simpleBtnok = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); + this.layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.propertyGrid1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.treeList1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + this.SuspendLayout(); + // + // layoutControl1 + // + this.layoutControl1.Controls.Add(this.propertyGrid1); + this.layoutControl1.Controls.Add(this.panelControl1); + this.layoutControl1.Controls.Add(this.treeList1); + this.layoutControl1.Controls.Add(this.simpleBtnok); + this.layoutControl1.Controls.Add(this.simpleButton2); + this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.layoutControl1.Location = new System.Drawing.Point(0, 0); + this.layoutControl1.Name = "layoutControl1"; + this.layoutControl1.Root = this.Root; + this.layoutControl1.Size = new System.Drawing.Size(973, 583); + this.layoutControl1.TabIndex = 0; + this.layoutControl1.Text = "layoutControl1"; + // + // propertyGrid1 + // + this.propertyGrid1.Cursor = System.Windows.Forms.Cursors.Default; + this.propertyGrid1.Location = new System.Drawing.Point(700, 12); + this.propertyGrid1.Name = "propertyGrid1"; + this.propertyGrid1.OptionsView.AllowReadOnlyRowAppearance = DevExpress.Utils.DefaultBoolean.True; + this.propertyGrid1.Size = new System.Drawing.Size(261, 533); + this.propertyGrid1.TabIndex = 6; + // + // panelControl1 + // + this.panelControl1.Location = new System.Drawing.Point(228, 12); + this.panelControl1.Name = "panelControl1"; + this.panelControl1.Size = new System.Drawing.Size(468, 533); + this.panelControl1.TabIndex = 5; + // + // treeList1 + // + this.treeList1.Location = new System.Drawing.Point(12, 12); + this.treeList1.Name = "treeList1"; + this.treeList1.OptionsBehavior.Editable = false; + this.treeList1.Size = new System.Drawing.Size(212, 533); + this.treeList1.TabIndex = 4; + this.treeList1.AfterFocusNode += new DevExpress.XtraTreeList.NodeEventHandler(this.treeList1_AfterFocusNode); + // + // simpleBtnok + // + this.simpleBtnok.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Question; + this.simpleBtnok.Appearance.Options.UseBackColor = true; + this.simpleBtnok.Location = new System.Drawing.Point(725, 549); + this.simpleBtnok.Name = "simpleBtnok"; + this.simpleBtnok.Size = new System.Drawing.Size(116, 22); + this.simpleBtnok.StyleController = this.layoutControl1; + this.simpleBtnok.TabIndex = 7; + this.simpleBtnok.Text = "纭畾"; + this.simpleBtnok.Click += new System.EventHandler(this.simpleBtnok_Click); + // + // simpleButton2 + // + this.simpleButton2.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning; + this.simpleButton2.Appearance.Options.UseBackColor = true; + this.simpleButton2.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.simpleButton2.Location = new System.Drawing.Point(845, 549); + this.simpleButton2.Name = "simpleButton2"; + this.simpleButton2.Size = new System.Drawing.Size(116, 22); + this.simpleButton2.StyleController = this.layoutControl1; + this.simpleButton2.TabIndex = 8; + this.simpleButton2.Text = "鍙栨秷"; + this.simpleButton2.Click += new System.EventHandler(this.simpleButton2_Click); + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1, + this.layoutControlItem2, + this.layoutControlItem3, + this.layoutControlItem4, + this.emptySpaceItem1, + this.layoutControlItem5}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(973, 583); + this.Root.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.treeList1; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(216, 537); + this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem1.TextVisible = false; + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.panelControl1; + this.layoutControlItem2.Location = new System.Drawing.Point(216, 0); + this.layoutControlItem2.Name = "layoutControlItem2"; + this.layoutControlItem2.Size = new System.Drawing.Size(472, 537); + this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem2.TextVisible = false; + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.propertyGrid1; + this.layoutControlItem3.Location = new System.Drawing.Point(688, 0); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(265, 537); + this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem3.TextVisible = false; + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.simpleBtnok; + this.layoutControlItem4.Location = new System.Drawing.Point(713, 537); + this.layoutControlItem4.Name = "layoutControlItem4"; + this.layoutControlItem4.Size = new System.Drawing.Size(120, 26); + this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem4.TextVisible = false; + // + // emptySpaceItem1 + // + this.emptySpaceItem1.AllowHotTrack = false; + this.emptySpaceItem1.Location = new System.Drawing.Point(0, 537); + this.emptySpaceItem1.Name = "emptySpaceItem1"; + this.emptySpaceItem1.Size = new System.Drawing.Size(713, 26); + this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0); + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.simpleButton2; + this.layoutControlItem5.Location = new System.Drawing.Point(833, 537); + this.layoutControlItem5.Name = "layoutControlItem5"; + this.layoutControlItem5.Size = new System.Drawing.Size(120, 26); + this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem5.TextVisible = false; + // + // TemplateChoice + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(973, 583); + this.Controls.Add(this.layoutControl1); + this.Name = "TemplateChoice"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "妯℃澘閫夋嫨"; + this.Load += new System.EventHandler(this.TemplateChoice_Load); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit(); + this.layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.propertyGrid1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.treeList1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraVerticalGrid.PropertyGridControl propertyGrid1; + private DevExpress.XtraEditors.PanelControl panelControl1; + private DevExpress.XtraTreeList.TreeList treeList1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraEditors.SimpleButton simpleBtnok; + private DevExpress.XtraEditors.SimpleButton simpleButton2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + } +} \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/TemplateChoice.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/TemplateChoice.cs new file mode 100644 index 0000000..31770df --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/TemplateChoice.cs @@ -0,0 +1,109 @@ +锘縰sing DevExpress.Utils.Extensions; +using Hydro; +using System.Data; + +namespace PBS.WinFrmUI.Hydro +{ + public partial class TemplateChoice : DevExpress.XtraEditors.XtraForm + { + public TemplateChoice() + { + InitializeComponent(); + } + + + private List<Vmo.ModelTemplateVmo> modelTemplates = new List<Vmo.ModelTemplateVmo>(); + + public Vmo.ModelTemplateVmo modelTemplate; + private MapViewer map; + + private async void InitTreeList() + { + var data =await BLLFactory<BLL.ModelTemplate>.Instance.GetAll(); + + modelTemplates = data; + var ds = new List<Vmo.ModelTemplateVmo>(); + + //TemplateType selectedType = (TemplateType)combobox_type.SelectedItem; + ds = modelTemplates?.ToList(); + + this.treeList1.DataSource = ds; + //this.modelTemplates = data; + //this.treeList1.DataSource = modelTemplates; + + this.treeList1.RefreshDataSource(); + } + + private async void InitProGrid() + { + var id = long.Parse(this.treeList1.FocusedNode.GetValue("ID").ToString()); + if (id > 0) + { + var model = await BLLFactory<BLL.ModelTemplate>.Instance.GetByID(id); + modelTemplate = model; + var selectedTemplate = JsonHelper.Json2Object<Template>(model.ModelInfo); + propertyGrid1.SelectedObject = string.IsNullOrEmpty(model.ModelInfo) ? ModelConvertToTemplate(model) : selectedTemplate; + + } + } + + private Template ModelConvertToTemplate(Vmo.ModelTemplateVmo model) + { + return Yw.JsonHelper.Json2Object<Template>(model.ModelInfo); + } + + private Template _selectTemp { get; set; } + private void TemplateChoice_Load(object sender, EventArgs e) + { + map = new MapViewer(); + map.Lock2DView = true; + map.Location = new System.Drawing.Point(0, 0); + map.Dock = DockStyle.Fill; + + panelControl1.AddControl(map); + + this.treeList1.Columns.Add(new DevExpress.XtraTreeList.Columns.TreeListColumn { FieldName = "Name", Caption = "鎵�鏈夋ā鏉�", Width = 170, VisibleIndex = 0 }); + InitTreeList(); + } + private void SetMapData() + { + // 鑾峰彇褰撳墠閫変腑鐨勬ā鏉� + _selectTemp = propertyGrid1.SelectedObject as Template; + + if (_selectTemp != null) + { + var temp = _selectTemp; + string filePath = getTempInpPath(temp); + temp.network = new MapViewNetWork(); + temp.network.BuildFromInp(Path.Combine(Directory.GetCurrentDirectory(), filePath)); + map.SetData(temp); + } + } + + private string getTempInpPath(Template temp) + { + return temp.FullPath; + } + private void treeList1_AfterFocusNode(object sender, DevExpress.XtraTreeList.NodeEventArgs e) + { + InitProGrid(); + SetMapData(); + } + + private void combobox_type_SelectedIndexChanged_1(object sender, EventArgs e) + { + InitTreeList(); + } + + private void simpleBtnok_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.OK; + this.Hide(); + } + + private void simpleButton2_Click(object sender, EventArgs e) + { + this.Hide(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/TemplateChoice.resx b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/TemplateChoice.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/04-model-edit/TemplateChoice.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/PBS.WinFrmUI.Hydro.csproj b/WinFrmUI/PBS.WinFrmUI.Hydro/PBS.WinFrmUI.Hydro.csproj index e1d4412..2c250d9 100644 --- a/WinFrmUI/PBS.WinFrmUI.Hydro/PBS.WinFrmUI.Hydro.csproj +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/PBS.WinFrmUI.Hydro.csproj @@ -21,6 +21,8 @@ <ItemGroup> <Compile Remove="01-model-template\00-core\ModelTemplatePage - 澶嶅埗.cs" /> <Compile Remove="01-model-template\00-core\ModelTemplatePage - 澶嶅埗.Designer.cs" /> + <Compile Remove="02-quick-modeling\02-place\QuickModelingPlaceWizardPage - 澶嶅埗.cs" /> + <Compile Remove="02-quick-modeling\02-place\QuickModelingPlaceWizardPage - 澶嶅埗.Designer.cs" /> <Compile Remove="02-quick-modeling\NetWorkModelHelper.cs" /> <Compile Remove="02-quick-modeling\QuickModelingPage - 澶嶅埗.cs" /> <Compile Remove="02-quick-modeling\QuickModelingPage - 澶嶅埗.Designer.cs" /> @@ -36,6 +38,7 @@ <ItemGroup> <EmbeddedResource Remove="01-model-template\00-core\ModelTemplatePage - 澶嶅埗.resx" /> + <EmbeddedResource Remove="02-quick-modeling\02-place\QuickModelingPlaceWizardPage - 澶嶅埗.resx" /> <EmbeddedResource Remove="02-quick-modeling\QuickModelingPage - 澶嶅埗.resx" /> <EmbeddedResource Remove="02-quick-modeling\QuickModelingPage1.resx" /> <EmbeddedResource Remove="03-system-curve\SystemCurvePage - 澶嶅埗.resx" /> @@ -70,9 +73,15 @@ <Compile Update="02-quick-modeling\03-facility\QuickModelingFacilityWizardPage.cs"> <SubType>UserControl</SubType> </Compile> - <Compile Update="04-model-edit\ModelEditPage.cs"> + <Compile Update="04-model-edit\00-core\ModelEditPage.cs"> <SubType>UserControl</SubType> </Compile> + <Compile Update="04-model-edit\01-tree\FacilityTreeListCtrl.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="04-model-edit\InputDlg.cs"> + <SubType>Form</SubType> + </Compile> <Compile Update="99-map-view\Class1.cs" /> <Compile Update="99-map-view\DMap.cs"> <SubType>Component</SubType> diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/PBS.WinFrmUI.Hydro.csproj.user b/WinFrmUI/PBS.WinFrmUI.Hydro/PBS.WinFrmUI.Hydro.csproj.user index b98cf26..56f9f3e 100644 --- a/WinFrmUI/PBS.WinFrmUI.Hydro/PBS.WinFrmUI.Hydro.csproj.user +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/PBS.WinFrmUI.Hydro.csproj.user @@ -32,6 +32,12 @@ <Compile Update="03-system-curve\SystemCurvePage.cs"> <SubType>UserControl</SubType> </Compile> + <Compile Update="04-model-edit\EditFloors.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Update="04-model-edit\TemplateChoice.cs"> + <SubType>Form</SubType> + </Compile> <Compile Update="99-map-view\FormFilter.cs"> <SubType>Form</SubType> </Compile> diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/Properties/Resources.Designer.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/Properties/Resources.Designer.cs index f377eff..415e681 100644 --- a/WinFrmUI/PBS.WinFrmUI.Hydro/Properties/Resources.Designer.cs +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/Properties/Resources.Designer.cs @@ -61,6 +61,46 @@ } /// <summary> + /// 鏌ユ壘 DevExpress.Utils.Svg.SvgImage 绫诲瀷鐨勬湰鍦板寲璧勬簮銆� + /// </summary> + internal static DevExpress.Utils.Svg.SvgImage actions_checkcircled { + get { + object obj = ResourceManager.GetObject("actions_checkcircled", resourceCulture); + return ((DevExpress.Utils.Svg.SvgImage)(obj)); + } + } + + /// <summary> + /// 鏌ユ壘 DevExpress.Utils.Svg.SvgImage 绫诲瀷鐨勬湰鍦板寲璧勬簮銆� + /// </summary> + internal static DevExpress.Utils.Svg.SvgImage connector { + get { + object obj = ResourceManager.GetObject("connector", resourceCulture); + return ((DevExpress.Utils.Svg.SvgImage)(obj)); + } + } + + /// <summary> + /// 鏌ユ壘 DevExpress.Utils.Svg.SvgImage 绫诲瀷鐨勬湰鍦板寲璧勬簮銆� + /// </summary> + internal static DevExpress.Utils.Svg.SvgImage flipimage_horizontal { + get { + object obj = ResourceManager.GetObject("flipimage_horizontal", resourceCulture); + return ((DevExpress.Utils.Svg.SvgImage)(obj)); + } + } + + /// <summary> + /// 鏌ユ壘 DevExpress.Utils.Svg.SvgImage 绫诲瀷鐨勬湰鍦板寲璧勬簮銆� + /// </summary> + internal static DevExpress.Utils.Svg.SvgImage flipimage_vertical { + get { + object obj = ResourceManager.GetObject("flipimage_vertical", resourceCulture); + return ((DevExpress.Utils.Svg.SvgImage)(obj)); + } + } + + /// <summary> /// 鏌ユ壘 System.Byte[] 绫诲瀷鐨勬湰鍦板寲璧勬簮銆� /// </summary> internal static byte[] HorizontalPipe { @@ -111,6 +151,16 @@ } /// <summary> + /// 鏌ユ壘 DevExpress.Utils.Svg.SvgImage 绫诲瀷鐨勬湰鍦板寲璧勬簮銆� + /// </summary> + internal static DevExpress.Utils.Svg.SvgImage tableproperties { + get { + object obj = ResourceManager.GetObject("tableproperties", resourceCulture); + return ((DevExpress.Utils.Svg.SvgImage)(obj)); + } + } + + /// <summary> /// 鏌ユ壘 System.Byte[] 绫诲瀷鐨勬湰鍦板寲璧勬簮銆� /// </summary> internal static byte[] Tank { diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/Properties/Resources.resx b/WinFrmUI/PBS.WinFrmUI.Hydro/Properties/Resources.resx index 0d11969..906e744 100644 --- a/WinFrmUI/PBS.WinFrmUI.Hydro/Properties/Resources.resx +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/Properties/Resources.resx @@ -145,4 +145,19 @@ <data name="lowimportance" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\lowimportance.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> </data> + <data name="connector" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\connector.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> + </data> + <data name="actions_checkcircled" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\actions_checkcircled.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> + </data> + <data name="flipimage_horizontal" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\flipimage_horizontal.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> + </data> + <data name="flipimage_vertical" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\flipimage_vertical.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> + </data> + <data name="tableproperties" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\tableproperties.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> + </data> </root> \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/Resources/actions_checkcircled.svg b/WinFrmUI/PBS.WinFrmUI.Hydro/Resources/actions_checkcircled.svg new file mode 100644 index 0000000..b1b6aa9 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/Resources/actions_checkcircled.svg @@ -0,0 +1,15 @@ +锘�<?xml version='1.0' encoding='UTF-8'?> +<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Layer_1" style="enable-background:new 0 0 32 32"> + <style type="text/css"> + .Blue{fill:#1177D7;} + .Yellow{fill:#FFB115;} + .Black{fill:#727272;} + .Green{fill:#039C23;} + .Red{fill:#D11C1C;} + .st0{opacity:0.75;} + .st1{opacity:0.5;} +</style> + <g id="CheckCircled"> + <path d="M16,4C9.4,4,4,9.4,4,16c0,6.6,5.4,12,12,12s12-5.4,12-12C28,9.4,22.6,4,16,4z M14,22l-6-6l2-2l4,4l8-8l2,2 L14,22z" class="Green" /> + </g> +</svg> \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/Resources/connector.svg b/WinFrmUI/PBS.WinFrmUI.Hydro/Resources/connector.svg new file mode 100644 index 0000000..d99da72 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/Resources/connector.svg @@ -0,0 +1,19 @@ +锘�<?xml version='1.0' encoding='UTF-8'?> +<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Layer_1" style="enable-background:new 0 0 32 32"> + <style type="text/css"> + .Black{fill:#737374;} + .Yellow{fill:#FCB01B;} + .Green{fill:#129C49;} + .Blue{fill:#387CB7;} + .Red{fill:#D02127;} + .White{fill:#FFFFFF;} + .st0{opacity:0.5;} + .st1{opacity:0.75;} + .st2{opacity:0.25;} + .st3{display:none;fill:#737374;} +</style> + <g> + <path d="M14,16H6v8H4V14h10V16z M24,6v8h-8v2h10V6H24z" class="Black" /> + </g> + <path d="M7,22H3c-0.5,0-1,0.5-1,1v4c0,0.5,0.5,1,1,1h4c0.5,0,1-0.5,1-1v-4C8,22.5,7.5,22,7,22z M6,26H4v-2h2V26z M17,12h-4c-0.5,0-1,0.5-1,1v4c0,0.5,0.5,1,1,1h4c0.5,0,1-0.5,1-1v-4C18,12.5,17.5,12,17,12z M16,16h-2v-2h2V16z M27,2h-4 c-0.5,0-1,0.5-1,1v4c0,0.5,0.5,1,1,1h4c0.5,0,1-0.5,1-1V3C28,2.5,27.5,2,27,2z M26,6h-2V4h2V6z" class="Blue" /> +</svg> \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/Resources/flipimage_horizontal.svg b/WinFrmUI/PBS.WinFrmUI.Hydro/Resources/flipimage_horizontal.svg new file mode 100644 index 0000000..f4f2a41 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/Resources/flipimage_horizontal.svg @@ -0,0 +1,20 @@ +锘�<?xml version='1.0' encoding='UTF-8'?> +<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Layer_1" style="enable-background:new 0 0 32 32"> + <style type="text/css"> + .Black{fill:#737374;} + .Yellow{fill:#FCB01B;} + .Green{fill:#129C49;} + .Blue{fill:#387CB7;} + .Red{fill:#D02127;} + .White{fill:#FFFFFF;} + .st0{opacity:0.5;} + .st1{opacity:0.75;} + .st2{opacity:0.25;} + .st3{display:none;fill:#737374;} +</style> + <path d="M16,6h-2V2h2V6z M16,8h-2v4h2V8z M16,14h-2v4h2V14z M16,20h-2v4h2V20z M16,26h-2v4h2V26z" class="Black" /> + <g class="st0"> + <polygon points="10,6 10,26 0,16 " class="Black" /> + </g> + <polygon points="20,6 20,26 30,16 " class="Blue" /> +</svg> \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/Resources/flipimage_vertical.svg b/WinFrmUI/PBS.WinFrmUI.Hydro/Resources/flipimage_vertical.svg new file mode 100644 index 0000000..536c131 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/Resources/flipimage_vertical.svg @@ -0,0 +1,20 @@ +锘�<?xml version='1.0' encoding='UTF-8'?> +<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Layer_1" style="enable-background:new 0 0 32 32"> + <style type="text/css"> + .Black{fill:#737374;} + .Yellow{fill:#FCB01B;} + .Green{fill:#129C49;} + .Blue{fill:#387CB7;} + .Red{fill:#D02127;} + .White{fill:#FFFFFF;} + .st0{opacity:0.5;} + .st1{opacity:0.75;} + .st2{opacity:0.25;} + .st3{display:none;fill:#737374;} +</style> + <path d="M14,14h4v2h-4V14z M8,16h4v-2H8V16z M2,16h4v-2H2V16z M20,16h4v-2h-4V16z M26,14v2h4v-2H26z" class="Black" /> + <g class="st0"> + <polygon points="16,0 6,10 26,10 " class="Black" /> + </g> + <polygon points="6,20 16,30 26,20 " class="Blue" /> +</svg> \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/Resources/tableproperties.svg b/WinFrmUI/PBS.WinFrmUI.Hydro/Resources/tableproperties.svg new file mode 100644 index 0000000..2c2174d --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/Resources/tableproperties.svg @@ -0,0 +1,14 @@ +锘�<?xml version='1.0' encoding='UTF-8'?> +<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="TableProperties" style="enable-background:new 0 0 32 32"> + <style type="text/css"> + .Black{fill:#727272;} + .Blue{fill:#1177D7;} + .Yellow{fill:#FFB115;} + .st0{opacity:0.5;} +</style> + <g class="st0"> + <path d="M10,18.1V22H2v-6h4.2c0.2,0.5,0.4,0.9,0.7,1.2c0.6,0.6,1.4,0.9,2.3,0.9C9.5,18.2,9.8,18.1,10,18.1z M12,30h8 v-6h-8V30z M2,30h8v-6H2V30z M27.3,16l-3,3c-0.6,0.6-1.4,1-2.3,1v2h8v-6h-1H27.3z M22,30h8v-6h-8V30z M19.6,19 c-0.4-0.4-0.7-1-0.9-1.5c-0.6-0.1-1.1-0.4-1.5-0.9c-0.2-0.2-0.3-0.4-0.5-0.6h-3.9L12,16.8V22h8v-2.7C19.9,19.2,19.7,19.1,19.6,19z" class="Black" /> + </g> + <path d="M29,2h-7v0c-1,0-2,0.4-2.8,1.1L16,6.4L8.4,14c-0.5,0.5-0.5,1.3,0,1.8c0.5,0.5,1.3,0.5,1.8,0l7.7-7.7 c0.6-0.6,1.2,0,0.6,0.6L16.2,11c-0.5,0.5-0.5,1.3,0,1.8c0.5,0.5,1.3,0.5,1.8,0l2.3-2.3c0.6-0.6,1.2,0,0.6,0.6l-2.3,2.3 c-0.5,0.5-0.5,1.3,0,1.8s1.3,0.5,1.8,0l2.3-2.3c0.6-0.6,1.2,0,0.6,0.6L21,15.8c-0.5,0.5-0.5,1.3,0,1.8c0.5,0.5,1.3,0.5,1.8,0 l3.6-3.6H29c1.7,0,3-1.4,3-3V5C32,3.3,30.7,2,29,2z" class="Yellow" /> + <path d="M6.9,12.6L10,9.5V8H2v6h4.1C6.3,13.5,6.6,13,6.9,12.6z" class="Blue" /> +</svg> \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/template/Form_EditFloors.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/template/Form_EditFloors.cs index e733164..aa2b191 100644 --- a/WinFrmUI/PBS.WinFrmUI.Hydro/template/Form_EditFloors.cs +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/template/Form_EditFloors.cs @@ -3,7 +3,7 @@ //using DevExpress.XtraGrid.Views.Base; using Hydro; using System.Data; -//using TRegion = Hydro.MapView.TRegion; +//using TRegion = TRegion; namespace PBS.WinFrmUI.Hydro { -- Gitblit v1.9.3