From 5aba1bf12cd27faa797e7f3d15e0f960bdc2a4b2 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期五, 05 七月 2024 16:57:09 +0800 Subject: [PATCH] 优化界面 --- WinFrmUI/HStation.WinFrmUI.Xhs.Project/01-project/XhsProjectListPage.Designer.cs | 230 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 225 insertions(+), 5 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/01-project/XhsProjectListPage.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/01-project/XhsProjectListPage.Designer.cs index fd31308..5f0b887 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/01-project/XhsProjectListPage.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/01-project/XhsProjectListPage.Designer.cs @@ -28,18 +28,43 @@ /// </summary> private void InitializeComponent() { + components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(XhsProjectListPage)); + 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(); ribbonControl1 = new DevExpress.XtraBars.Ribbon.RibbonControl(); BtnAdd = new DevExpress.XtraBars.BarButtonItem(); BtnEdit = new DevExpress.XtraBars.BarButtonItem(); BtnDelete = new DevExpress.XtraBars.BarButtonItem(); + BtnUpdateUseStatus = new DevExpress.XtraBars.BarButtonItem(); + BtnRefresh = new DevExpress.XtraBars.BarButtonItem(); + BtnModelEdit = new DevExpress.XtraBars.BarButtonItem(); + BtnEditModel = new DevExpress.XtraBars.BarButtonItem(); ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage(); ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); gridControl1 = new DevExpress.XtraGrid.GridControl(); + projectViewModelBindingSource = new BindingSource(components); gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); + colName = new DevExpress.XtraGrid.Columns.GridColumn(); + ColDisplayName = new DevExpress.XtraGrid.Columns.GridColumn(); + gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); + colTagName = new DevExpress.XtraGrid.Columns.GridColumn(); + colUseStatus = new DevExpress.XtraGrid.Columns.GridColumn(); + gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn(); + gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn(); + gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn(); + gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn(); + colDescription = new DevExpress.XtraGrid.Columns.GridColumn(); + colModelManage = new DevExpress.XtraGrid.Columns.GridColumn(); + repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); ((System.ComponentModel.ISupportInitialize)ribbonControl1).BeginInit(); ((System.ComponentModel.ISupportInitialize)gridControl1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)projectViewModelBindingSource).BeginInit(); ((System.ComponentModel.ISupportInitialize)gridView1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)repositoryItemButtonEdit1).BeginInit(); SuspendLayout(); // // ribbonControl1 @@ -47,16 +72,16 @@ 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, ribbonControl1.SearchEditItem, BtnAdd, BtnEdit, BtnDelete }); + ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, BtnAdd, BtnEdit, BtnDelete, BtnUpdateUseStatus, BtnRefresh, BtnModelEdit, BtnEditModel }); ribbonControl1.Location = new Point(0, 0); - ribbonControl1.MaxItemId = 4; + ribbonControl1.MaxItemId = 13; ribbonControl1.Name = "ribbonControl1"; ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage1 }); ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False; ribbonControl1.ShowExpandCollapseButton = DevExpress.Utils.DefaultBoolean.False; ribbonControl1.ShowPageHeadersInFormCaption = DevExpress.Utils.DefaultBoolean.True; ribbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide; - ribbonControl1.Size = new Size(1317, 104); + ribbonControl1.Size = new Size(1317, 77); ribbonControl1.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Hidden; // // BtnAdd @@ -73,6 +98,7 @@ BtnEdit.Id = 2; BtnEdit.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("BtnEdit.ImageOptions.SvgImage"); BtnEdit.Name = "BtnEdit"; + BtnEdit.ItemClick += BtnEdit_ItemClick; // // BtnDelete // @@ -80,6 +106,39 @@ BtnDelete.Id = 3; BtnDelete.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("BtnDelete.ImageOptions.SvgImage"); BtnDelete.Name = "BtnDelete"; + BtnDelete.ItemClick += BtnDelete_ItemClick; + // + // BtnUpdateUseStatus + // + BtnUpdateUseStatus.Caption = "浣跨敤鐘舵��"; + BtnUpdateUseStatus.Id = 4; + BtnUpdateUseStatus.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("BtnUpdateUseStatus.ImageOptions.SvgImage"); + BtnUpdateUseStatus.Name = "BtnUpdateUseStatus"; + BtnUpdateUseStatus.ItemClick += BtnUpdateUseStatus_ItemClick; + // + // BtnRefresh + // + BtnRefresh.Caption = "鍒锋柊"; + BtnRefresh.Id = 6; + BtnRefresh.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("BtnRefresh.ImageOptions.SvgImage"); + BtnRefresh.Name = "BtnRefresh"; + BtnRefresh.ItemClick += BtnRefresh_ItemClick; + // + // BtnModelEdit + // + BtnModelEdit.Caption = "鍘嗗彶妯″瀷"; + BtnModelEdit.Id = 8; + BtnModelEdit.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("BtnModelEdit.ImageOptions.SvgImage"); + BtnModelEdit.Name = "BtnModelEdit"; + BtnModelEdit.ItemClick += BtnModelEdit_ItemClick; + // + // BtnEditModel + // + BtnEditModel.Caption = "妯″瀷缂栬緫"; + BtnEditModel.Id = 9; + BtnEditModel.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("BtnEditModel.ImageOptions.SvgImage"); + BtnEditModel.Name = "BtnEditModel"; + BtnEditModel.ItemClick += BtnEditModel_ItemClick; // // ribbonPage1 // @@ -92,25 +151,167 @@ ribbonPageGroup1.ItemLinks.Add(BtnAdd); ribbonPageGroup1.ItemLinks.Add(BtnEdit); ribbonPageGroup1.ItemLinks.Add(BtnDelete); + ribbonPageGroup1.ItemLinks.Add(BtnUpdateUseStatus); + ribbonPageGroup1.ItemLinks.Add(BtnRefresh); + ribbonPageGroup1.ItemLinks.Add(BtnModelEdit); + ribbonPageGroup1.ItemLinks.Add(BtnEditModel); ribbonPageGroup1.Name = "ribbonPageGroup1"; ribbonPageGroup1.Text = "ribbonPageGroup1"; // // gridControl1 // + gridControl1.DataSource = projectViewModelBindingSource; gridControl1.Dock = DockStyle.Fill; - gridControl1.Location = new Point(0, 104); + gridControl1.Location = new Point(0, 77); gridControl1.MainView = gridView1; gridControl1.MenuManager = ribbonControl1; gridControl1.Name = "gridControl1"; - gridControl1.Size = new Size(1317, 540); + gridControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { repositoryItemButtonEdit1 }); + gridControl1.Size = new Size(1317, 567); gridControl1.TabIndex = 1; gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); // + // projectViewModelBindingSource + // + projectViewModelBindingSource.DataSource = typeof(Xhs.Project.ProjectViewModel); + // // gridView1 // + gridView1.Appearance.HeaderPanel.Options.UseTextOptions = true; + gridView1.Appearance.HeaderPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colName, ColDisplayName, gridColumn1, colTagName, colUseStatus, gridColumn2, gridColumn4, gridColumn3, gridColumn5, colDescription, colModelManage }); gridView1.GridControl = gridControl1; gridView1.Name = "gridView1"; gridView1.OptionsView.ShowGroupPanel = false; + gridView1.SortInfo.AddRange(new DevExpress.XtraGrid.Columns.GridColumnSortInfo[] { new DevExpress.XtraGrid.Columns.GridColumnSortInfo(gridColumn1, DevExpress.Data.ColumnSortOrder.Ascending) }); + gridView1.RowCellClick += gridView1_RowCellClick; + // + // colName + // + colName.AppearanceCell.Options.UseTextOptions = true; + colName.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colName.Caption = "椤圭洰鍚嶇О"; + colName.FieldName = "Name"; + colName.Name = "colName"; + colName.Visible = true; + colName.VisibleIndex = 1; + colName.Width = 97; + // + // ColDisplayName + // + ColDisplayName.AppearanceCell.Options.UseTextOptions = true; + ColDisplayName.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + ColDisplayName.Caption = "鍒涘缓浜�"; + ColDisplayName.FieldName = "CreateUserDisplayName"; + ColDisplayName.Name = "ColDisplayName"; + ColDisplayName.Visible = true; + ColDisplayName.VisibleIndex = 4; + ColDisplayName.Width = 99; + // + // gridColumn1 + // + gridColumn1.AppearanceCell.Options.UseTextOptions = true; + gridColumn1.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + gridColumn1.Caption = "鍒涘缓鏃堕棿"; + gridColumn1.FieldName = "CreateTime"; + gridColumn1.Name = "gridColumn1"; + gridColumn1.Visible = true; + gridColumn1.VisibleIndex = 2; + gridColumn1.Width = 86; + // + // colTagName + // + colTagName.AppearanceCell.Options.UseTextOptions = true; + colTagName.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colTagName.Caption = "鏍囩"; + colTagName.FieldName = "TagName"; + colTagName.Name = "colTagName"; + colTagName.Visible = true; + colTagName.VisibleIndex = 5; + colTagName.Width = 76; + // + // colUseStatus + // + colUseStatus.AppearanceCell.Options.UseTextOptions = true; + colUseStatus.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colUseStatus.Caption = "浣跨敤鐘舵��"; + colUseStatus.FieldName = "UseStatus"; + colUseStatus.Name = "colUseStatus"; + colUseStatus.Visible = true; + colUseStatus.VisibleIndex = 6; + colUseStatus.Width = 52; + // + // gridColumn2 + // + gridColumn2.AppearanceCell.Options.UseTextOptions = true; + gridColumn2.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + gridColumn2.Caption = "椤圭洰缂栧彿"; + gridColumn2.FieldName = "PrjNumber"; + gridColumn2.Name = "gridColumn2"; + gridColumn2.Visible = true; + gridColumn2.VisibleIndex = 0; + gridColumn2.Width = 83; + // + // gridColumn4 + // + gridColumn4.AppearanceCell.Options.UseTextOptions = true; + gridColumn4.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + gridColumn4.Caption = "瀹㈡埛鍚嶇О"; + gridColumn4.FieldName = "CustomerName"; + gridColumn4.Name = "gridColumn4"; + gridColumn4.Visible = true; + gridColumn4.VisibleIndex = 3; + gridColumn4.Width = 72; + // + // gridColumn3 + // + gridColumn3.AppearanceCell.Options.UseTextOptions = true; + gridColumn3.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + gridColumn3.Caption = "妯″瀷鐘舵��"; + gridColumn3.FieldName = "eUploadStatus"; + gridColumn3.Name = "gridColumn3"; + gridColumn3.Visible = true; + gridColumn3.VisibleIndex = 7; + gridColumn3.Width = 53; + // + // gridColumn5 + // + gridColumn5.AppearanceCell.Options.UseTextOptions = true; + gridColumn5.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + gridColumn5.Caption = "璇︾粏浣嶇疆"; + gridColumn5.FieldName = "Address"; + gridColumn5.Name = "gridColumn5"; + gridColumn5.Visible = true; + gridColumn5.VisibleIndex = 9; + gridColumn5.Width = 154; + // + // colDescription + // + colDescription.AppearanceCell.Options.UseTextOptions = true; + colDescription.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colDescription.Caption = "璇存槑"; + colDescription.FieldName = "Description"; + colDescription.Name = "colDescription"; + colDescription.Visible = true; + colDescription.VisibleIndex = 8; + colDescription.Width = 108; + // + // colModelManage + // + colModelManage.Caption = "妯″瀷绠$悊"; + colModelManage.ColumnEdit = repositoryItemButtonEdit1; + colModelManage.Name = "colModelManage"; + colModelManage.Visible = true; + colModelManage.VisibleIndex = 10; + colModelManage.Width = 81; + // + // repositoryItemButtonEdit1 + // + editorButtonImageOptions1.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("editorButtonImageOptions1.SvgImage"); + editorButtonImageOptions1.SvgImageSize = new Size(25, 25); + 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; // // XhsProjectListPage // @@ -122,7 +323,9 @@ Size = new Size(1317, 644); ((System.ComponentModel.ISupportInitialize)ribbonControl1).EndInit(); ((System.ComponentModel.ISupportInitialize)gridControl1).EndInit(); + ((System.ComponentModel.ISupportInitialize)projectViewModelBindingSource).EndInit(); ((System.ComponentModel.ISupportInitialize)gridView1).EndInit(); + ((System.ComponentModel.ISupportInitialize)repositoryItemButtonEdit1).EndInit(); ResumeLayout(false); PerformLayout(); } @@ -137,5 +340,22 @@ private DevExpress.XtraBars.BarButtonItem BtnDelete; private DevExpress.XtraGrid.GridControl gridControl1; private DevExpress.XtraGrid.Views.Grid.GridView gridView1; + private BindingSource projectViewModelBindingSource; + private DevExpress.XtraGrid.Columns.GridColumn colName; + private DevExpress.XtraGrid.Columns.GridColumn colTagName; + private DevExpress.XtraGrid.Columns.GridColumn colUseStatus; + private DevExpress.XtraGrid.Columns.GridColumn colDescription; + private DevExpress.XtraGrid.Columns.GridColumn ColDisplayName; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn1; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn2; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn4; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn3; + private DevExpress.XtraBars.BarButtonItem BtnUpdateUseStatus; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn5; + private DevExpress.XtraBars.BarButtonItem BtnRefresh; + private DevExpress.XtraBars.BarButtonItem BtnModelEdit; + private DevExpress.XtraGrid.Columns.GridColumn colModelManage; + private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit1; + private DevExpress.XtraBars.BarButtonItem BtnEditModel; } } \ No newline at end of file -- Gitblit v1.9.3