From 2049f3b9eaaea83c58a0d498bc6d998e29f41ac6 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期一, 23 九月 2024 11:37:08 +0800 Subject: [PATCH] 优化basic界面 --- WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.Designer.cs | 171 ++++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 133 insertions(+), 38 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.Designer.cs index af77eaf..7556fc8 100644 --- a/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.Designer.cs @@ -28,24 +28,35 @@ /// </summary> private void InitializeComponent() { + components = new System.ComponentModel.Container(); BtnOk = new DevExpress.XtraEditors.SimpleButton(); layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); - checkedListBoxControl1 = new DevExpress.XtraEditors.CheckedListBoxControl(); + gridControl1 = new DevExpress.XtraGrid.GridControl(); + sysCatalogPropViewModelBindingSource = new BindingSource(components); + gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); + colGroupName = new DevExpress.XtraGrid.Columns.GridColumn(); + colName = new DevExpress.XtraGrid.Columns.GridColumn(); + colIsHave = new DevExpress.XtraGrid.Columns.GridColumn(); + colIsNull = new DevExpress.XtraGrid.Columns.GridColumn(); + colUnitName = new DevExpress.XtraGrid.Columns.GridColumn(); + colDefaultValue = new DevExpress.XtraGrid.Columns.GridColumn(); btnCancel = new DevExpress.XtraEditors.SimpleButton(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem(); - layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)checkedListBoxControl1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)gridControl1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)sysCatalogPropViewModelBindingSource).BeginInit(); + ((System.ComponentModel.ISupportInitialize)gridView1).BeginInit(); ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem2).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); SuspendLayout(); // @@ -53,9 +64,9 @@ // BtnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; BtnOk.Appearance.Options.UseBackColor = true; - BtnOk.Location = new Point(281, 268); + BtnOk.Location = new Point(530, 384); BtnOk.Name = "BtnOk"; - BtnOk.Size = new Size(92, 22); + BtnOk.Size = new Size(86, 22); BtnOk.StyleController = layoutControl1; BtnOk.TabIndex = 2; BtnOk.Text = "瀹屾垚"; @@ -63,33 +74,107 @@ // // layoutControl1 // - layoutControl1.Controls.Add(checkedListBoxControl1); + layoutControl1.Controls.Add(gridControl1); layoutControl1.Controls.Add(btnCancel); layoutControl1.Controls.Add(BtnOk); layoutControl1.Dock = DockStyle.Fill; layoutControl1.Location = new Point(0, 0); layoutControl1.Name = "layoutControl1"; layoutControl1.Root = Root; - layoutControl1.Size = new Size(474, 292); + layoutControl1.Size = new Size(708, 408); layoutControl1.TabIndex = 9; layoutControl1.Text = "layoutControl1"; // - // checkedListBoxControl1 + // gridControl1 // - checkedListBoxControl1.Location = new Point(2, 2); - checkedListBoxControl1.Name = "checkedListBoxControl1"; - checkedListBoxControl1.Size = new Size(470, 262); - checkedListBoxControl1.StyleController = layoutControl1; - checkedListBoxControl1.TabIndex = 5; + gridControl1.DataSource = sysCatalogPropViewModelBindingSource; + gridControl1.Location = new Point(2, 2); + gridControl1.MainView = gridView1; + gridControl1.Name = "gridControl1"; + gridControl1.Size = new Size(704, 378); + gridControl1.TabIndex = 4; + gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); + // + // sysCatalogPropViewModelBindingSource + // + sysCatalogPropViewModelBindingSource.DataSource = typeof(SysPropMappingViewModel); + // + // gridView1 + // + gridView1.Appearance.HeaderPanel.Options.UseTextOptions = true; + gridView1.Appearance.HeaderPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colGroupName, colName, colIsHave, colIsNull, colUnitName, colDefaultValue }); + gridView1.GridControl = gridControl1; + gridView1.Name = "gridView1"; + gridView1.OptionsView.ShowGroupPanel = false; + gridView1.CustomDrawCell += gridView1_CustomDrawCell; + gridView1.ShowingEditor += gridView1_ShowingEditor; + // + // colGroupName + // + colGroupName.Caption = "缁勫悕"; + colGroupName.FieldName = "GroupName"; + colGroupName.Name = "colGroupName"; + // + // colName + // + colName.AppearanceCell.Options.UseTextOptions = true; + colName.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colName.Caption = "灞炴�у悕"; + colName.FieldName = "Name"; + colName.Name = "colName"; + colName.OptionsColumn.AllowEdit = false; + colName.Visible = true; + colName.VisibleIndex = 0; + // + // colIsHave + // + colIsHave.AppearanceCell.Options.UseTextOptions = true; + colIsHave.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colIsHave.Caption = "鏄惁閫夋嫨"; + colIsHave.FieldName = "IsHave"; + colIsHave.Name = "colIsHave"; + colIsHave.Visible = true; + colIsHave.VisibleIndex = 4; + // + // colIsNull + // + colIsNull.AppearanceCell.Options.UseTextOptions = true; + colIsNull.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colIsNull.Caption = "鏄惁涓虹┖"; + colIsNull.FieldName = "IsNull"; + colIsNull.Name = "colIsNull"; + colIsNull.Visible = true; + colIsNull.VisibleIndex = 3; + // + // colUnitName + // + colUnitName.AppearanceCell.Options.UseTextOptions = true; + colUnitName.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colUnitName.Caption = "鍗曚綅"; + colUnitName.FieldName = "UnitName"; + colUnitName.Name = "colUnitName"; + colUnitName.Visible = true; + colUnitName.VisibleIndex = 1; + // + // colDefaultValue + // + colDefaultValue.AppearanceCell.Options.UseTextOptions = true; + colDefaultValue.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colDefaultValue.Caption = "榛樿鍊�"; + colDefaultValue.FieldName = "DefaultValue"; + colDefaultValue.Name = "colDefaultValue"; + colDefaultValue.Visible = true; + colDefaultValue.VisibleIndex = 2; // // btnCancel // btnCancel.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Danger; btnCancel.Appearance.Options.UseBackColor = true; btnCancel.DialogResult = DialogResult.Cancel; - btnCancel.Location = new Point(377, 268); + btnCancel.Location = new Point(620, 384); btnCancel.Name = "btnCancel"; - btnCancel.Size = new Size(95, 22); + btnCancel.Size = new Size(86, 22); btnCancel.StyleController = layoutControl1; btnCancel.TabIndex = 3; btnCancel.Text = "鍙栨秷"; @@ -98,46 +183,46 @@ // Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; - Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem2, layoutControlItem1, emptySpaceItem2, layoutControlItem4 }); + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem2, layoutControlItem1, emptySpaceItem2, layoutControlItem3 }); Root.Name = "Root"; Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); - Root.Size = new Size(474, 292); + Root.Size = new Size(708, 408); Root.TextVisible = false; // // layoutControlItem2 // layoutControlItem2.Control = btnCancel; - layoutControlItem2.Location = new Point(375, 266); + layoutControlItem2.Location = new Point(618, 382); layoutControlItem2.Name = "layoutControlItem2"; - layoutControlItem2.Size = new Size(99, 26); + layoutControlItem2.Size = new Size(90, 26); layoutControlItem2.TextSize = new Size(0, 0); layoutControlItem2.TextVisible = false; // // layoutControlItem1 // layoutControlItem1.Control = BtnOk; - layoutControlItem1.Location = new Point(279, 266); + layoutControlItem1.Location = new Point(528, 382); layoutControlItem1.Name = "layoutControlItem1"; - layoutControlItem1.Size = new Size(96, 26); + layoutControlItem1.Size = new Size(90, 26); layoutControlItem1.TextSize = new Size(0, 0); layoutControlItem1.TextVisible = false; // // emptySpaceItem2 // emptySpaceItem2.AllowHotTrack = false; - emptySpaceItem2.Location = new Point(0, 266); + emptySpaceItem2.Location = new Point(0, 382); emptySpaceItem2.Name = "emptySpaceItem2"; - emptySpaceItem2.Size = new Size(279, 26); + emptySpaceItem2.Size = new Size(528, 26); emptySpaceItem2.TextSize = new Size(0, 0); // - // layoutControlItem4 + // layoutControlItem3 // - layoutControlItem4.Control = checkedListBoxControl1; - layoutControlItem4.Location = new Point(0, 0); - layoutControlItem4.Name = "layoutControlItem4"; - layoutControlItem4.Size = new Size(474, 266); - layoutControlItem4.TextSize = new Size(0, 0); - layoutControlItem4.TextVisible = false; + layoutControlItem3.Control = gridControl1; + layoutControlItem3.Location = new Point(0, 0); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(708, 382); + layoutControlItem3.TextSize = new Size(0, 0); + layoutControlItem3.TextVisible = false; // // emptySpaceItem1 // @@ -147,23 +232,25 @@ emptySpaceItem1.Size = new Size(348, 26); emptySpaceItem1.TextSize = new Size(0, 0); // - // PropEdit + // SetSysPropForCatalogDlg // AutoScaleDimensions = new SizeF(7F, 17F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(474, 292); + ClientSize = new Size(708, 408); Controls.Add(layoutControl1); Margin = new Padding(3, 4, 3, 4); - Name = "PropEdit"; + Name = "SetSysPropForCatalogDlg"; StartPosition = FormStartPosition.CenterScreen; ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)checkedListBoxControl1).EndInit(); + ((System.ComponentModel.ISupportInitialize)gridControl1).EndInit(); + ((System.ComponentModel.ISupportInitialize)sysCatalogPropViewModelBindingSource).EndInit(); + ((System.ComponentModel.ISupportInitialize)gridView1).EndInit(); ((System.ComponentModel.ISupportInitialize)Root).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem2).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); ResumeLayout(false); } @@ -177,7 +264,15 @@ private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2; - private DevExpress.XtraEditors.CheckedListBoxControl checkedListBoxControl1; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraGrid.GridControl gridControl1; + private DevExpress.XtraGrid.Views.Grid.GridView gridView1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private BindingSource sysCatalogPropViewModelBindingSource; + private DevExpress.XtraGrid.Columns.GridColumn colGroupName; + private DevExpress.XtraGrid.Columns.GridColumn colName; + private DevExpress.XtraGrid.Columns.GridColumn colIsHave; + private DevExpress.XtraGrid.Columns.GridColumn colIsNull; + private DevExpress.XtraGrid.Columns.GridColumn colUnitName; + private DevExpress.XtraGrid.Columns.GridColumn colDefaultValue; } } -- Gitblit v1.9.3