From b266e82b9a377fa35a766f7a3a2f5aa95f3c9125 Mon Sep 17 00:00:00 2001 From: duheng <2286773002@qq.com> Date: 星期五, 28 三月 2025 17:57:03 +0800 Subject: [PATCH] 修改首页场所列表 --- WinFrmUI/PBS.WinFrmUI/00-home/03-property/HomePbsProjectPropertyCtrl.Designer.cs | 238 +++++++++++++++++++++++++-------------- WinFrmUI/PBS.WinFrmUI/00-home/01-project/HomePbsProjectTreeListCtrl.cs | 4 WinFrmUI/PBS.WinFrmUI/00-home/00-core/HomePbsProjectPage.Designer.cs | 2 WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.cs | 7 WinFrmUI/PBS.WinFrmUI/00-home/03-property/HomePbsProjectPropertyCtrl.cs | 33 +++++ WinFrmUI/PBS.WinFrmUI/00-home/01-project/HomePbsProjectTreeViewModel.cs | 4 WinFrmUI/PBS.WinFrmUI/00-home/03-property/HomePbsProjectPropertyCtrl.resx | 22 +++ WinFrmUI/PBS.WinFrmUI/00-home/00-core/HomePbsProjectPage.cs | 14 + 8 files changed, 227 insertions(+), 97 deletions(-) diff --git a/WinFrmUI/PBS.WinFrmUI/00-home/00-core/HomePbsProjectPage.Designer.cs b/WinFrmUI/PBS.WinFrmUI/00-home/00-core/HomePbsProjectPage.Designer.cs index 3e9ac86..07e1674 100644 --- a/WinFrmUI/PBS.WinFrmUI/00-home/00-core/HomePbsProjectPage.Designer.cs +++ b/WinFrmUI/PBS.WinFrmUI/00-home/00-core/HomePbsProjectPage.Designer.cs @@ -120,7 +120,7 @@ dockPanel2.Options.ShowCloseButton = false; dockPanel2.OriginalSize = new Size(200, 200); dockPanel2.Size = new Size(200, 870); - dockPanel2.Text = "璁炬柦鍒楄〃"; + dockPanel2.Text = "鍦烘墍鍒楄〃"; // // dockPanel2_Container // diff --git a/WinFrmUI/PBS.WinFrmUI/00-home/00-core/HomePbsProjectPage.cs b/WinFrmUI/PBS.WinFrmUI/00-home/00-core/HomePbsProjectPage.cs index 6c38937..1d13a1a 100644 --- a/WinFrmUI/PBS.WinFrmUI/00-home/00-core/HomePbsProjectPage.cs +++ b/WinFrmUI/PBS.WinFrmUI/00-home/00-core/HomePbsProjectPage.cs @@ -15,6 +15,7 @@ // this.xhsProjectHomeTitleCtrl1.JumpEvent += XhsProjectHomeTitleCtrl1_JumpEvent; this.mapViewProjectListContainer2.LoadCompletedEvent += MapViewProjectListContainer1_LoadCompletedEvent; this.homePbsProjectTreeListCtrl1.SelectProjectEvent += homeXhsProjectTreeListCtrl1_SelectProjectEvent; + this.homeXhsProjectPropertyCtrl2.SelectFacEvent += HomeXhsProjectPropertyCtrl2_SelectFacEvent; } private List<FacilityVmo> _allProjectList = null;//鎵�鏈夐」鐩垪琛� @@ -50,17 +51,22 @@ } //閫夋嫨椤圭洰浜嬩欢 - private async void homeXhsProjectTreeListCtrl1_SelectProjectEvent(FacilityVmo obj) + private void homeXhsProjectTreeListCtrl1_SelectProjectEvent(PlaceVmo obj) { - await this.mapViewProjectListContainer2.SelectProject(obj.ID); - var vm = new HomePbsProjectPropertyViewModel(obj); - this.homeXhsProjectPropertyCtrl2.SelectedObject = vm; + this.homeXhsProjectPropertyCtrl2.SetBindingData(obj); + // var vm = new HomePbsProjectPropertyViewModel(obj); + //this.homeXhsProjectPropertyCtrl2.SelectedObject = vm; /* await this.mapViewProjectListContainer1.SelectProject(obj.ID); var vm = new HomeXhsProjectPropertyViewModel(obj); this.homeXhsProjectPropertyCtrl1.SelectedObject = vm;*/ } + private async void HomeXhsProjectPropertyCtrl2_SelectFacEvent(FacilityVmo obj) + { + await this.mapViewProjectListContainer2.SelectProject(obj.ID); + } + /* //瀵煎叆瀹屾垚浜嬩欢 private void homeXhsProjectTreeListCtrl1_ImportProjectCompletedEvent(ImportXhsProjectViewModel obj) { diff --git a/WinFrmUI/PBS.WinFrmUI/00-home/01-project/HomePbsProjectTreeListCtrl.cs b/WinFrmUI/PBS.WinFrmUI/00-home/01-project/HomePbsProjectTreeListCtrl.cs index 640e258..9fb7e81 100644 --- a/WinFrmUI/PBS.WinFrmUI/00-home/01-project/HomePbsProjectTreeListCtrl.cs +++ b/WinFrmUI/PBS.WinFrmUI/00-home/01-project/HomePbsProjectTreeListCtrl.cs @@ -18,7 +18,7 @@ /// <summary> /// 閫夋嫨椤圭洰浜嬩欢 /// </summary> - public event Action<Vmo.FacilityVmo> SelectProjectEvent; + public event Action<Vmo.PlaceVmo> SelectProjectEvent; /// <summary> /// 鍒锋柊鏁版嵁浜嬩欢 @@ -32,7 +32,7 @@ /// </summary> public async void SetBindingData() { - var allList = await new BLL.Facility().GetAll(); + var allList = await new BLL.Place().GetAll(); _allBindingList = new List<HomePbsProjectTreeViewModel>(); if (allList != null) { diff --git a/WinFrmUI/PBS.WinFrmUI/00-home/01-project/HomePbsProjectTreeViewModel.cs b/WinFrmUI/PBS.WinFrmUI/00-home/01-project/HomePbsProjectTreeViewModel.cs index eed1254..1ef0c5a 100644 --- a/WinFrmUI/PBS.WinFrmUI/00-home/01-project/HomePbsProjectTreeViewModel.cs +++ b/WinFrmUI/PBS.WinFrmUI/00-home/01-project/HomePbsProjectTreeViewModel.cs @@ -14,7 +14,7 @@ /// <summary> /// /// </summary> - public HomePbsProjectTreeViewModel(Vmo.FacilityVmo rhs) + public HomePbsProjectTreeViewModel(Vmo.PlaceVmo rhs) { this.ID = rhs.ID; this.Name = rhs.Name; @@ -51,6 +51,6 @@ /// <summary> /// 椤圭洰 /// </summary> - public Vmo.FacilityVmo Project { get; set; } + public Vmo.PlaceVmo Project { get; set; } } } \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI/00-home/03-property/HomePbsProjectPropertyCtrl.Designer.cs b/WinFrmUI/PBS.WinFrmUI/00-home/03-property/HomePbsProjectPropertyCtrl.Designer.cs index 67e2fb6..204919f 100644 --- a/WinFrmUI/PBS.WinFrmUI/00-home/03-property/HomePbsProjectPropertyCtrl.Designer.cs +++ b/WinFrmUI/PBS.WinFrmUI/00-home/03-property/HomePbsProjectPropertyCtrl.Designer.cs @@ -35,13 +35,14 @@ DevExpress.Utils.SuperToolTip superToolTip1 = new DevExpress.Utils.SuperToolTip(); DevExpress.Utils.ToolTipTitleItem toolTipTitleItem1 = new DevExpress.Utils.ToolTipTitleItem(); DevExpress.Utils.ToolTipItem toolTipItem1 = new DevExpress.Utils.ToolTipItem(); + DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject(); layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); - propertyDescriptionControl1 = new DevExpress.XtraVerticalGrid.PropertyDescriptionControl(); - propertyGridControl1 = new DevExpress.XtraVerticalGrid.PropertyGridControl(); - layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); - layoutProperty = new DevExpress.XtraLayout.LayoutControlItem(); - layoutDescription = new DevExpress.XtraLayout.LayoutControlItem(); - splitterItem1 = new DevExpress.XtraLayout.SplitterItem(); + 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(); @@ -51,20 +52,32 @@ barDockControlBottom = new DevExpress.XtraBars.BarDockControl(); barDockControlLeft = new DevExpress.XtraBars.BarDockControl(); barDockControlRight = new DevExpress.XtraBars.BarDockControl(); + repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); + propertyDescriptionControl1 = new DevExpress.XtraVerticalGrid.PropertyDescriptionControl(); + propertyGridControl1 = new DevExpress.XtraVerticalGrid.PropertyGridControl(); + layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutProperty = new DevExpress.XtraLayout.LayoutControlItem(); + layoutDescription = new DevExpress.XtraLayout.LayoutControlItem(); + splitterItem1 = new DevExpress.XtraLayout.SplitterItem(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); bindingSource1 = new BindingSource(components); ((ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); + ((ISupportInitialize)treeList1).BeginInit(); + ((ISupportInitialize)barManager1).BeginInit(); + ((ISupportInitialize)repositoryItemButtonEdit1).BeginInit(); ((ISupportInitialize)propertyGridControl1).BeginInit(); ((ISupportInitialize)layoutControlGroup1).BeginInit(); ((ISupportInitialize)layoutProperty).BeginInit(); ((ISupportInitialize)layoutDescription).BeginInit(); ((ISupportInitialize)splitterItem1).BeginInit(); - ((ISupportInitialize)barManager1).BeginInit(); + ((ISupportInitialize)layoutControlItem1).BeginInit(); ((ISupportInitialize)bindingSource1).BeginInit(); SuspendLayout(); // // layoutControl1 // + layoutControl1.Controls.Add(treeList1); layoutControl1.Controls.Add(propertyDescriptionControl1); layoutControl1.Controls.Add(propertyGridControl1); layoutControl1.Dock = DockStyle.Fill; @@ -77,85 +90,38 @@ layoutControl1.TabIndex = 0; layoutControl1.Text = "layoutControl1"; // - // propertyDescriptionControl1 + // treeList1 // - propertyDescriptionControl1.Location = new Point(2, 697); - propertyDescriptionControl1.Margin = new Padding(3, 4, 3, 4); - propertyDescriptionControl1.Name = "propertyDescriptionControl1"; - propertyDescriptionControl1.PropertyGrid = propertyGridControl1; - propertyDescriptionControl1.Size = new Size(293, 76); - propertyDescriptionControl1.StyleController = layoutControl1; - propertyDescriptionControl1.TabIndex = 1; - propertyDescriptionControl1.TabStop = false; + treeList1.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { colName }); + treeList1.Location = new Point(2, 377); + treeList1.Margin = new Padding(3, 4, 3, 4); + treeList1.MenuManager = barManager1; + treeList1.MinWidth = 23; + treeList1.Name = "treeList1"; + 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.Size = new Size(293, 298); + treeList1.TabIndex = 6; + treeList1.TreeLevelWidth = 21; + treeList1.TreeViewFieldName = "Name"; + treeList1.ViewStyle = DevExpress.XtraTreeList.TreeListViewStyle.TreeView; + treeList1.FocusedNodeChanged += treeList1_FocusedNodeChanged; // - // propertyGridControl1 + // colName // - propertyGridControl1.Appearance.FocusedCell.BackColor = Color.FromArgb(0, 122, 204); - propertyGridControl1.Appearance.FocusedCell.ForeColor = Color.White; - propertyGridControl1.Appearance.FocusedCell.Options.UseBackColor = true; - propertyGridControl1.Appearance.FocusedCell.Options.UseForeColor = true; - propertyGridControl1.Appearance.FocusedRow.BackColor = Color.FromArgb(0, 122, 204); - propertyGridControl1.Appearance.FocusedRow.ForeColor = Color.White; - propertyGridControl1.Appearance.FocusedRow.Options.UseBackColor = true; - propertyGridControl1.Appearance.FocusedRow.Options.UseForeColor = true; - propertyGridControl1.Appearance.ReadOnlyRecordValue.ForeColor = Color.Black; - propertyGridControl1.Appearance.ReadOnlyRecordValue.Options.UseForeColor = true; - propertyGridControl1.Appearance.ReadOnlyRow.ForeColor = Color.Black; - propertyGridControl1.Appearance.ReadOnlyRow.Options.UseForeColor = true; - propertyGridControl1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; - propertyGridControl1.Location = new Point(2, 2); - propertyGridControl1.Margin = new Padding(3, 4, 3, 4); - propertyGridControl1.Name = "propertyGridControl1"; - propertyGridControl1.OptionsBehavior.Editable = false; - propertyGridControl1.OptionsBehavior.PropertySort = DevExpress.XtraVerticalGrid.PropertySort.NoSort; - propertyGridControl1.OptionsHint.ShowRowHeaderHints = false; - propertyGridControl1.OptionsView.AllowReadOnlyRowAppearance = DevExpress.Utils.DefaultBoolean.True; - propertyGridControl1.OptionsView.MinRowAutoHeight = 13; - propertyGridControl1.OptionsView.ShowRootCategories = false; - propertyGridControl1.RecordWidth = 120; - propertyGridControl1.RowHeaderWidth = 80; - propertyGridControl1.Size = new Size(293, 679); - propertyGridControl1.TabIndex = 0; - propertyGridControl1.CustomRecordCellEdit += propertyGridControl1_CustomRecordCellEdit; - propertyGridControl1.CustomDrawRowValueCell += propertyGridControl1_CustomDrawRowValueCell; - propertyGridControl1.ShowingEditor += propertyGridControl1_ShowingEditor; - propertyGridControl1.CellValueChanging += propertyGridControl1_CellValueChanging; - propertyGridControl1.CellValueChanged += propertyGridControl1_CellValueChanged; - // - // layoutControlGroup1 - // - layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; - layoutControlGroup1.GroupBordersVisible = false; - layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutProperty, layoutDescription, splitterItem1 }); - layoutControlGroup1.Name = "Root"; - layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); - layoutControlGroup1.Size = new Size(297, 775); - layoutControlGroup1.TextVisible = false; - // - // layoutProperty - // - layoutProperty.Control = propertyGridControl1; - layoutProperty.Location = new Point(0, 0); - layoutProperty.Name = "layoutProperty"; - layoutProperty.Size = new Size(297, 683); - layoutProperty.TextSize = new Size(0, 0); - layoutProperty.TextVisible = false; - // - // layoutDescription - // - layoutDescription.Control = propertyDescriptionControl1; - layoutDescription.Location = new Point(0, 695); - layoutDescription.Name = "layoutDescription"; - layoutDescription.Size = new Size(297, 80); - layoutDescription.TextSize = new Size(0, 0); - layoutDescription.TextVisible = false; - // - // splitterItem1 - // - splitterItem1.AllowHotTrack = true; - splitterItem1.Location = new Point(0, 683); - splitterItem1.Name = "splitterItem1"; - splitterItem1.Size = new Size(297, 12); + 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 // @@ -260,6 +226,103 @@ barDockControlRight.Margin = new Padding(3, 4, 3, 4); barDockControlRight.Size = new Size(0, 775); // + // repositoryItemButtonEdit1 + // + repositoryItemButtonEdit1.AutoHeight = false; + editorButtonImageOptions1.SvgImageSize = new Size(20, 20); + repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.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 = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; + // + // propertyDescriptionControl1 + // + propertyDescriptionControl1.Location = new Point(2, 691); + propertyDescriptionControl1.Margin = new Padding(3, 4, 3, 4); + propertyDescriptionControl1.Name = "propertyDescriptionControl1"; + propertyDescriptionControl1.PropertyGrid = propertyGridControl1; + propertyDescriptionControl1.Size = new Size(293, 82); + propertyDescriptionControl1.StyleController = layoutControl1; + propertyDescriptionControl1.TabIndex = 1; + propertyDescriptionControl1.TabStop = false; + // + // propertyGridControl1 + // + propertyGridControl1.Appearance.FocusedCell.BackColor = Color.FromArgb(0, 122, 204); + propertyGridControl1.Appearance.FocusedCell.ForeColor = Color.White; + propertyGridControl1.Appearance.FocusedCell.Options.UseBackColor = true; + propertyGridControl1.Appearance.FocusedCell.Options.UseForeColor = true; + propertyGridControl1.Appearance.FocusedRow.BackColor = Color.FromArgb(0, 122, 204); + propertyGridControl1.Appearance.FocusedRow.ForeColor = Color.White; + propertyGridControl1.Appearance.FocusedRow.Options.UseBackColor = true; + propertyGridControl1.Appearance.FocusedRow.Options.UseForeColor = true; + propertyGridControl1.Appearance.ReadOnlyRecordValue.ForeColor = Color.Black; + propertyGridControl1.Appearance.ReadOnlyRecordValue.Options.UseForeColor = true; + propertyGridControl1.Appearance.ReadOnlyRow.ForeColor = Color.Black; + propertyGridControl1.Appearance.ReadOnlyRow.Options.UseForeColor = true; + propertyGridControl1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; + propertyGridControl1.Location = new Point(2, 2); + propertyGridControl1.Margin = new Padding(3, 4, 3, 4); + propertyGridControl1.Name = "propertyGridControl1"; + propertyGridControl1.OptionsBehavior.Editable = false; + propertyGridControl1.OptionsBehavior.PropertySort = DevExpress.XtraVerticalGrid.PropertySort.NoSort; + propertyGridControl1.OptionsHint.ShowRowHeaderHints = false; + propertyGridControl1.OptionsView.AllowReadOnlyRowAppearance = DevExpress.Utils.DefaultBoolean.True; + propertyGridControl1.OptionsView.MinRowAutoHeight = 13; + propertyGridControl1.OptionsView.ShowRootCategories = false; + propertyGridControl1.RecordWidth = 120; + propertyGridControl1.RowHeaderWidth = 80; + propertyGridControl1.Size = new Size(293, 371); + propertyGridControl1.TabIndex = 0; + propertyGridControl1.CustomRecordCellEdit += propertyGridControl1_CustomRecordCellEdit; + propertyGridControl1.CustomDrawRowValueCell += propertyGridControl1_CustomDrawRowValueCell; + propertyGridControl1.ShowingEditor += propertyGridControl1_ShowingEditor; + propertyGridControl1.CellValueChanging += propertyGridControl1_CellValueChanging; + propertyGridControl1.CellValueChanged += propertyGridControl1_CellValueChanged; + // + // layoutControlGroup1 + // + layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + layoutControlGroup1.GroupBordersVisible = false; + layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutProperty, layoutDescription, splitterItem1, layoutControlItem1 }); + layoutControlGroup1.Name = "Root"; + layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup1.Size = new Size(297, 775); + layoutControlGroup1.TextVisible = false; + // + // layoutProperty + // + layoutProperty.Control = propertyGridControl1; + layoutProperty.Location = new Point(0, 0); + layoutProperty.Name = "layoutProperty"; + layoutProperty.Size = new Size(297, 375); + layoutProperty.TextSize = new Size(0, 0); + layoutProperty.TextVisible = false; + // + // layoutDescription + // + layoutDescription.Control = propertyDescriptionControl1; + layoutDescription.Location = new Point(0, 689); + layoutDescription.Name = "layoutDescription"; + layoutDescription.Size = new Size(297, 86); + layoutDescription.TextSize = new Size(0, 0); + layoutDescription.TextVisible = false; + // + // splitterItem1 + // + splitterItem1.AllowHotTrack = true; + splitterItem1.Location = new Point(0, 677); + splitterItem1.Name = "splitterItem1"; + splitterItem1.Size = new Size(297, 12); + // + // layoutControlItem1 + // + layoutControlItem1.Control = treeList1; + layoutControlItem1.Location = new Point(0, 375); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(297, 302); + layoutControlItem1.TextSize = new Size(0, 0); + layoutControlItem1.TextVisible = false; + // // HomePbsProjectPropertyCtrl // AutoScaleDimensions = new SizeF(8F, 18F); @@ -274,12 +337,15 @@ Size = new Size(297, 810); ((ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); + ((ISupportInitialize)treeList1).EndInit(); + ((ISupportInitialize)barManager1).EndInit(); + ((ISupportInitialize)repositoryItemButtonEdit1).EndInit(); ((ISupportInitialize)propertyGridControl1).EndInit(); ((ISupportInitialize)layoutControlGroup1).EndInit(); ((ISupportInitialize)layoutProperty).EndInit(); ((ISupportInitialize)layoutDescription).EndInit(); ((ISupportInitialize)splitterItem1).EndInit(); - ((ISupportInitialize)barManager1).EndInit(); + ((ISupportInitialize)layoutControlItem1).EndInit(); ((ISupportInitialize)bindingSource1).EndInit(); ResumeLayout(false); PerformLayout(); @@ -304,5 +370,9 @@ private BindingSource bindingSource1; private DevExpress.XtraVerticalGrid.PropertyGridControl propertyGridControl1; private DevExpress.XtraLayout.LayoutControlItem layoutProperty; + private DevExpress.XtraTreeList.TreeList treeList1; + private DevExpress.XtraTreeList.Columns.TreeListColumn colName; + private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; } } diff --git a/WinFrmUI/PBS.WinFrmUI/00-home/03-property/HomePbsProjectPropertyCtrl.cs b/WinFrmUI/PBS.WinFrmUI/00-home/03-property/HomePbsProjectPropertyCtrl.cs index 26b9db9..6a504ef 100644 --- a/WinFrmUI/PBS.WinFrmUI/00-home/03-property/HomePbsProjectPropertyCtrl.cs +++ b/WinFrmUI/PBS.WinFrmUI/00-home/03-property/HomePbsProjectPropertyCtrl.cs @@ -18,6 +18,7 @@ InitializeComponent(); //this.layoutControl1.SetupLayoutControl(); SetDescriptionVisible(false);//榛樿璁剧疆灞炴�ф弿杩伴潰鏉夸笉鏄剧ず + this.treeList1.InitialDefaultSettings(); } /// <summary> @@ -26,6 +27,11 @@ public event Action<long> JumpDirectEvent; private List<FacilityVmo> _allBindingList; + + /// <summary> + /// 閫夋嫨璁炬柦浜嬩欢 + /// </summary> + public event Action<Vmo.FacilityVmo> SelectFacEvent; /// <summary> /// 缁戝畾瀵硅薄 @@ -54,6 +60,25 @@ { // this.barBtnDirect.Visibility = BarItemVisibility.Always; } + } + + public async void SetBindingData(Vmo.PlaceVmo place) + { + var allList = await new BLL.Facility().GetAll(); + _allBindingList = new List<FacilityVmo>(); + if (allList != null) + { + foreach (var item in allList) + { + if (item.PlaceID == place.ID) + { + _allBindingList.Add(item); + } + } + } + this.treeList1.DataSource = _allBindingList; + this.treeList1.ForceInitialize(); + this.treeList1.ExpandAll(); } /// <summary> @@ -253,5 +278,13 @@ } JumpDirectEvent?.Invoke(this.SelectedObject.Project.ID);*/ } + + private void treeList1_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e) + { + var vm = this.treeList1.GetCurrentViewModel(_allBindingList); + var model = new HomePbsProjectPropertyViewModel(vm); + this.SelectedObject = model; + SelectFacEvent.Invoke(vm); + } } } \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI/00-home/03-property/HomePbsProjectPropertyCtrl.resx b/WinFrmUI/PBS.WinFrmUI/00-home/03-property/HomePbsProjectPropertyCtrl.resx index ac4e8ff..98dcd2e 100644 --- a/WinFrmUI/PBS.WinFrmUI/00-home/03-property/HomePbsProjectPropertyCtrl.resx +++ b/WinFrmUI/PBS.WinFrmUI/00-home/03-property/HomePbsProjectPropertyCtrl.resx @@ -117,10 +117,30 @@ <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> - <assembly alias="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <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 diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.cs b/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.cs index ef9c567..0ae6bab 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.cs +++ b/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.cs @@ -56,11 +56,12 @@ if (id > 0) { vmo.ID = id; + mapInfo.ObjectID = id; + var mapId= await new Yw.BLL.MapInfo().Insert(mapInfo); + mapInfo.ID = mapId; _allBindingList.Add(new PlaceViewModel(vmo, mapInfo)); this.placeViewModelBindingSource.ResetBindings(false); - mapInfo.ObjectID = id; - await new Yw.BLL.MapInfo().Insert(mapInfo); - return true; + return true; } return false; }; -- Gitblit v1.9.3