From 00ab1b5282ada6ffdc78b3dd46f0ce08726a51e6 Mon Sep 17 00:00:00 2001 From: qin <a@163.com> Date: 星期四, 20 三月 2025 13:47:24 +0800 Subject: [PATCH] 优化IBox界面 --- WinFrmUI/HStation.WinFrmUI.Auth.Core/01-Role/RoleMainMgrPanel.Designer.cs | 267 +++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 229 insertions(+), 38 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Auth.Core/01-Role/RoleMainMgrPanel.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Auth.Core/01-Role/RoleMainMgrPanel.Designer.cs index 9f5976e..3ffd8ee 100644 --- a/WinFrmUI/HStation.WinFrmUI.Auth.Core/01-Role/RoleMainMgrPanel.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Auth.Core/01-Role/RoleMainMgrPanel.Designer.cs @@ -1,4 +1,4 @@ -锘縩amespace HStation.WinFrmUI.Auth.Core._01_Role +锘縩amespace HStation.WinFrmUI.Auth { partial class RoleMainMgrPanel { @@ -28,20 +28,34 @@ /// </summary> private void InitializeComponent() { + components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RoleMainMgrPanel)); ribbonControl1 = new DevExpress.XtraBars.Ribbon.RibbonControl(); RoleEdit = new DevExpress.XtraBars.BarButtonItem(); RoleAdd = new DevExpress.XtraBars.BarButtonItem(); RoleDelete = new DevExpress.XtraBars.BarButtonItem(); + barButtonItemSelectUser = new DevExpress.XtraBars.BarButtonItem(); + barButtonItem1 = new DevExpress.XtraBars.BarButtonItem(); + barButtonItem2 = new DevExpress.XtraBars.BarButtonItem(); + barButtonItem3 = new DevExpress.XtraBars.BarButtonItem(); ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage(); ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); - gridControl1 = new DevExpress.XtraGrid.GridControl(); + ribbonPageGroup2 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); + bar1 = new DevExpress.XtraBars.Bar(); + bar2 = new DevExpress.XtraBars.Bar(); + bar3 = new DevExpress.XtraBars.Bar(); + gridControl = new DevExpress.XtraGrid.GridControl(); + roleViewModelBindingSource = new BindingSource(components); gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); - gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); - gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn(); - gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn(); + colName = new DevExpress.XtraGrid.Columns.GridColumn(); + colUseStatus = new DevExpress.XtraGrid.Columns.GridColumn(); + colCode = new DevExpress.XtraGrid.Columns.GridColumn(); + colDescription = new DevExpress.XtraGrid.Columns.GridColumn(); + colSortCode = new DevExpress.XtraGrid.Columns.GridColumn(); + colCorpID = new DevExpress.XtraGrid.Columns.GridColumn(); ((System.ComponentModel.ISupportInitialize)ribbonControl1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)gridControl1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)gridControl).BeginInit(); + ((System.ComponentModel.ISupportInitialize)roleViewModelBindingSource).BeginInit(); ((System.ComponentModel.ISupportInitialize)gridView1).BeginInit(); SuspendLayout(); // @@ -50,9 +64,9 @@ ribbonControl1.DrawGroupsBorderMode = DevExpress.Utils.DefaultBoolean.False; ribbonControl1.ExpandCollapseItem.Id = 0; ribbonControl1.ItemPanelStyle = DevExpress.XtraBars.Ribbon.RibbonItemPanelStyle.Classic; - ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, RoleEdit, RoleAdd, RoleDelete }); + ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, RoleEdit, RoleAdd, RoleDelete, barButtonItemSelectUser, barButtonItem1, barButtonItem2, barButtonItem3 }); ribbonControl1.Location = new Point(0, 0); - ribbonControl1.MaxItemId = 17; + ribbonControl1.MaxItemId = 21; ribbonControl1.Name = "ribbonControl1"; ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage1 }); ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False; @@ -86,9 +100,37 @@ RoleDelete.Name = "RoleDelete"; RoleDelete.ItemClick += RoleDelete_ItemClick; // + // barButtonItemSelectUser + // + barButtonItemSelectUser.Caption = "鏌ョ湅鐢ㄦ埛"; + barButtonItemSelectUser.Id = 17; + barButtonItemSelectUser.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barButtonItemSelectUser.ImageOptions.SvgImage"); + barButtonItemSelectUser.Name = "barButtonItemSelectUser"; + // + // barButtonItem1 + // + barButtonItem1.Caption = "鎺堟潈鐢ㄦ埛"; + barButtonItem1.Id = 18; + barButtonItem1.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barButtonItem1.ImageOptions.SvgImage"); + barButtonItem1.Name = "barButtonItem1"; + // + // barButtonItem2 + // + barButtonItem2.Caption = "娣诲姞鎺堟潈鐢ㄦ埛"; + barButtonItem2.Id = 19; + barButtonItem2.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barButtonItem2.ImageOptions.SvgImage"); + barButtonItem2.Name = "barButtonItem2"; + // + // barButtonItem3 + // + barButtonItem3.Caption = "瑙掕壊鏉冮檺"; + barButtonItem3.Id = 20; + barButtonItem3.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barButtonItem3.ImageOptions.SvgImage"); + barButtonItem3.Name = "barButtonItem3"; + // // ribbonPage1 // - ribbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { ribbonPageGroup1 }); + ribbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { ribbonPageGroup1, ribbonPageGroup2 }); ribbonPage1.Name = "ribbonPage1"; ribbonPage1.Text = "ribbonPage1"; // @@ -100,52 +142,187 @@ ribbonPageGroup1.Name = "ribbonPageGroup1"; ribbonPageGroup1.Text = "ribbonPageGroup1"; // - // gridControl1 + // ribbonPageGroup2 // - gridControl1.Dock = DockStyle.Fill; - gridControl1.Location = new Point(0, 104); - gridControl1.MainView = gridView1; - gridControl1.MenuManager = ribbonControl1; - gridControl1.Name = "gridControl1"; - gridControl1.Size = new Size(712, 342); - gridControl1.TabIndex = 2; - gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); + ribbonPageGroup2.Alignment = DevExpress.XtraBars.Ribbon.RibbonPageGroupAlignment.Far; + ribbonPageGroup2.ItemLinks.Add(barButtonItem1); + ribbonPageGroup2.ItemLinks.Add(barButtonItem3); + ribbonPageGroup2.Name = "ribbonPageGroup2"; + ribbonPageGroup2.Text = "ribbonPageGroup2"; + // + // bar1 + // + bar1.BarName = "Custom 2"; + bar1.CanDockStyle = DevExpress.XtraBars.BarCanDockStyle.Top; + bar1.DockCol = 0; + bar1.DockRow = 0; + bar1.DockStyle = DevExpress.XtraBars.BarDockStyle.Top; + bar1.OptionsBar.AllowQuickCustomization = false; + bar1.OptionsBar.DrawBorder = false; + bar1.OptionsBar.DrawDragBorder = false; + bar1.OptionsBar.MultiLine = true; + bar1.OptionsBar.UseWholeRow = true; + bar1.Text = "Custom 2"; + // + // bar2 + // + bar2.BarName = "Custom 2"; + bar2.CanDockStyle = DevExpress.XtraBars.BarCanDockStyle.Top; + bar2.DockCol = 0; + bar2.DockRow = 0; + bar2.DockStyle = DevExpress.XtraBars.BarDockStyle.Top; + bar2.OptionsBar.AllowQuickCustomization = false; + bar2.OptionsBar.DrawBorder = false; + bar2.OptionsBar.DrawDragBorder = false; + bar2.OptionsBar.MultiLine = true; + bar2.OptionsBar.UseWholeRow = true; + bar2.Text = "Custom 2"; + // + // bar3 + // + bar3.BarName = "Custom 2"; + bar3.CanDockStyle = DevExpress.XtraBars.BarCanDockStyle.Top; + bar3.DockCol = 0; + bar3.DockRow = 0; + bar3.DockStyle = DevExpress.XtraBars.BarDockStyle.Top; + bar3.OptionsBar.AllowQuickCustomization = false; + bar3.OptionsBar.DrawBorder = false; + bar3.OptionsBar.DrawDragBorder = false; + bar3.OptionsBar.MultiLine = true; + bar3.OptionsBar.UseWholeRow = true; + bar3.Text = "Custom 2"; + // + // gridControl + // + gridControl.DataSource = roleViewModelBindingSource; + gridControl.Dock = DockStyle.Fill; + gridControl.Location = new Point(0, 104); + gridControl.MainView = gridView1; + gridControl.MenuManager = ribbonControl1; + gridControl.Name = "gridControl"; + gridControl.Size = new Size(712, 342); + gridControl.TabIndex = 5; + gridControl.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); + // + // roleViewModelBindingSource + // + roleViewModelBindingSource.DataSource = typeof(RoleViewModel); // // gridView1 // - gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { gridColumn1, gridColumn2, gridColumn3 }); - gridView1.GridControl = gridControl1; + gridView1.Appearance.ViewCaption.Options.UseTextOptions = true; + gridView1.Appearance.ViewCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + gridView1.Appearance.ViewCaption.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center; + gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colName, colUseStatus, colCode, colDescription, colSortCode, colCorpID }); + gridView1.GridControl = gridControl; gridView1.Name = "gridView1"; gridView1.OptionsView.ShowGroupPanel = false; + gridView1.CustomUnboundColumnData += gridView1_CustomUnboundColumnData; // - // gridColumn1 + // colName // - gridColumn1.Name = "gridColumn1"; - gridColumn1.Visible = true; - gridColumn1.VisibleIndex = 0; + colName.AppearanceCell.Options.UseTextOptions = true; + colName.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colName.AppearanceCell.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center; + colName.AppearanceHeader.Options.UseTextOptions = true; + colName.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colName.AppearanceHeader.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center; + colName.Caption = "瑙掕壊鍚嶇О"; + colName.FieldName = "Name"; + colName.Name = "colName"; + colName.OptionsColumn.AllowEdit = false; + colName.Visible = true; + colName.VisibleIndex = 0; // - // gridColumn2 + // colUseStatus // - gridColumn2.Name = "gridColumn2"; - gridColumn2.Visible = true; - gridColumn2.VisibleIndex = 1; + colUseStatus.AppearanceCell.Options.UseTextOptions = true; + colUseStatus.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colUseStatus.AppearanceCell.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center; + colUseStatus.AppearanceHeader.Options.UseTextOptions = true; + colUseStatus.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colUseStatus.AppearanceHeader.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center; + colUseStatus.Caption = "鐘舵��"; + colUseStatus.FieldName = "colUseStatus"; + colUseStatus.Name = "colUseStatus"; + colUseStatus.OptionsColumn.AllowEdit = false; + colUseStatus.UnboundDataType = typeof(string); + colUseStatus.Visible = true; + colUseStatus.VisibleIndex = 1; // - // gridColumn3 + // colCode // - gridColumn3.Name = "gridColumn3"; - gridColumn3.Visible = true; - gridColumn3.VisibleIndex = 2; + colCode.AppearanceCell.Options.UseTextOptions = true; + colCode.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colCode.AppearanceCell.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center; + colCode.AppearanceHeader.Options.UseTextOptions = true; + colCode.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colCode.AppearanceHeader.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center; + colCode.Caption = "瑙掕壊缂栫爜"; + colCode.FieldName = "CorpID"; + colCode.Name = "colCode"; + colCode.OptionsColumn.AllowEdit = false; + colCode.Visible = true; + colCode.VisibleIndex = 2; + // + // colDescription + // + colDescription.AppearanceCell.Options.UseTextOptions = true; + colDescription.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colDescription.AppearanceCell.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center; + colDescription.AppearanceHeader.Options.UseTextOptions = true; + colDescription.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colDescription.AppearanceHeader.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center; + colDescription.Caption = "璇存槑"; + colDescription.FieldName = "Description"; + colDescription.Name = "colDescription"; + colDescription.OptionsColumn.AllowEdit = false; + colDescription.Visible = true; + colDescription.VisibleIndex = 3; + // + // colSortCode + // + colSortCode.AppearanceCell.Options.UseTextOptions = true; + colSortCode.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colSortCode.AppearanceCell.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center; + colSortCode.AppearanceHeader.Options.UseTextOptions = true; + colSortCode.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colSortCode.AppearanceHeader.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center; + colSortCode.Caption = "鎺掑簭鐮�"; + colSortCode.FieldName = "SortCode"; + colSortCode.Name = "colSortCode"; + colSortCode.OptionsColumn.AllowEdit = false; + colSortCode.Visible = true; + colSortCode.VisibleIndex = 4; + // + // colCorpID + // + colCorpID.AppearanceCell.Options.UseTextOptions = true; + colCorpID.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colCorpID.AppearanceCell.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center; + colCorpID.AppearanceHeader.Options.UseTextOptions = true; + colCorpID.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colCorpID.AppearanceHeader.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center; + colCorpID.Caption = "瀹㈡埛ID"; + colCorpID.FieldName = "CorpID"; + colCorpID.Name = "colCorpID"; + colCorpID.OptionsColumn.AllowEdit = false; + colCorpID.Visible = true; + colCorpID.VisibleIndex = 5; // // RoleMainMgrPanel // + Appearance.BackColor = SystemColors.Control; + Appearance.Options.UseBackColor = true; AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; - Controls.Add(gridControl1); + Controls.Add(gridControl); Controls.Add(ribbonControl1); Name = "RoleMainMgrPanel"; Size = new Size(712, 446); ((System.ComponentModel.ISupportInitialize)ribbonControl1).EndInit(); - ((System.ComponentModel.ISupportInitialize)gridControl1).EndInit(); + ((System.ComponentModel.ISupportInitialize)gridControl).EndInit(); + ((System.ComponentModel.ISupportInitialize)roleViewModelBindingSource).EndInit(); ((System.ComponentModel.ISupportInitialize)gridView1).EndInit(); ResumeLayout(false); PerformLayout(); @@ -159,10 +336,24 @@ private DevExpress.XtraBars.BarButtonItem RoleDelete; private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage1; private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup1; - private DevExpress.XtraGrid.GridControl gridControl1; + private DevExpress.XtraBars.Bar bar1; + private DevExpress.XtraBars.Bar bar2; + private DevExpress.XtraBars.Bar bar3; + private DevExpress.XtraGrid.Columns.GridColumn codUseStatus; + private DevExpress.XtraBars.BarButtonItem barButtonItemSelectUser; + private DevExpress.XtraBars.BarButtonItem barButtonItem1; + private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup2; + private DevExpress.XtraBars.BarButtonItem barButtonItem2; + private DevExpress.XtraBars.BarButtonItem barButtonItem3; + private DevExpress.XtraGrid.GridControl gridControl; private DevExpress.XtraGrid.Views.Grid.GridView gridView1; - private DevExpress.XtraGrid.Columns.GridColumn gridColumn1; - private DevExpress.XtraGrid.Columns.GridColumn gridColumn2; - private DevExpress.XtraGrid.Columns.GridColumn gridColumn3; + private DevExpress.XtraGrid.Columns.GridColumn colName; + private DevExpress.XtraGrid.Columns.GridColumn colUseStatus; + private DevExpress.XtraGrid.Columns.GridColumn colCode; + private DevExpress.XtraGrid.Columns.GridColumn colDescription; + private DevExpress.XtraGrid.Columns.GridColumn colSortCode; + private BindingSource roleViewModelBindingSource; + private ShowCorpRoleInfoCtrl showRoleList; + private DevExpress.XtraGrid.Columns.GridColumn colCorpID; } } -- Gitblit v1.9.3