From d7224f4f93aab16f0bc4ffed548de0f0d4e65fd0 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期一, 23 九月 2024 23:55:46 +0800 Subject: [PATCH] 设置属性选择(未完成) --- WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.cs | 41 +++ WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SelectCorprationListCtrl.cs | 133 ++++++++++++++ WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SelectCorprationListCtrl.Designer.cs | 99 +++++++++++ WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SysPropGroupTreeListCtrl.designer.cs | 60 ++++- WinFrmUI/HStation.WinFrmUI.Basic/HStation.WinFrmUI.Basic.csproj.user | 3 WinFrmUI/HStation.WinFrmUI.Dict.Core/DictManageMainPanel.Designer.cs | 26 +- WinFrmUI/HStation.WinFrmUI.Basic/HStation.WinFrmUI.Basic.csproj | 1 WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.Designer.cs | 25 ++ WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SelectCorprationListCtrl.resx | 123 +++++++++++++ WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SysPropManageMainPanel.Designer.cs | 4 WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/00-ViewModel/SysPropMappingViewModel.cs | 2 WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SysCatalogManageMainPanel.Designer.cs | 9 12 files changed, 484 insertions(+), 42 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/00-ViewModel/SysPropMappingViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/00-ViewModel/SysPropMappingViewModel.cs index f5a01c3..a787c51 100644 --- a/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/00-ViewModel/SysPropMappingViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/00-ViewModel/SysPropMappingViewModel.cs @@ -36,5 +36,7 @@ public string DefaultValue { get; set; } public bool Inherit { get; set; } public List<long> ChoiceIds { get; set; } + public string DisplayChoice { get; set; } + public List<SysPropMappingChoiceHaveVmo> ChoiceList { get; set; } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.Designer.cs index 7556fc8..e29baed 100644 --- a/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.Designer.cs @@ -40,6 +40,8 @@ colIsNull = new DevExpress.XtraGrid.Columns.GridColumn(); colUnitName = new DevExpress.XtraGrid.Columns.GridColumn(); colDefaultValue = new DevExpress.XtraGrid.Columns.GridColumn(); + gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); + repositoryItemCheckedComboBoxEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemCheckedComboBoxEdit(); btnCancel = new DevExpress.XtraEditors.SimpleButton(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); @@ -52,6 +54,7 @@ ((System.ComponentModel.ISupportInitialize)gridControl1).BeginInit(); ((System.ComponentModel.ISupportInitialize)sysCatalogPropViewModelBindingSource).BeginInit(); ((System.ComponentModel.ISupportInitialize)gridView1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)repositoryItemCheckedComboBoxEdit1).BeginInit(); ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); @@ -91,6 +94,7 @@ gridControl1.Location = new Point(2, 2); gridControl1.MainView = gridView1; gridControl1.Name = "gridControl1"; + gridControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { repositoryItemCheckedComboBoxEdit1 }); gridControl1.Size = new Size(704, 378); gridControl1.TabIndex = 4; gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); @@ -103,7 +107,7 @@ // 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.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colGroupName, colName, colIsHave, colIsNull, colUnitName, colDefaultValue, gridColumn1 }); gridView1.GridControl = gridControl1; gridView1.Name = "gridView1"; gridView1.OptionsView.ShowGroupPanel = false; @@ -166,6 +170,22 @@ colDefaultValue.Name = "colDefaultValue"; colDefaultValue.Visible = true; colDefaultValue.VisibleIndex = 2; + // + // gridColumn1 + // + gridColumn1.Caption = "灞炴�ч�夐」"; + gridColumn1.ColumnEdit = repositoryItemCheckedComboBoxEdit1; + gridColumn1.FieldName = "DisplayChoice"; + gridColumn1.Name = "gridColumn1"; + gridColumn1.Visible = true; + gridColumn1.VisibleIndex = 5; + // + // repositoryItemCheckedComboBoxEdit1 + // + repositoryItemCheckedComboBoxEdit1.AutoHeight = false; + repositoryItemCheckedComboBoxEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); + repositoryItemCheckedComboBoxEdit1.Name = "repositoryItemCheckedComboBoxEdit1"; + repositoryItemCheckedComboBoxEdit1.EditValueChanged += repositoryItemCheckedComboBoxEdit1_EditValueChanged; // // btnCancel // @@ -246,6 +266,7 @@ ((System.ComponentModel.ISupportInitialize)gridControl1).EndInit(); ((System.ComponentModel.ISupportInitialize)sysCatalogPropViewModelBindingSource).EndInit(); ((System.ComponentModel.ISupportInitialize)gridView1).EndInit(); + ((System.ComponentModel.ISupportInitialize)repositoryItemCheckedComboBoxEdit1).EndInit(); ((System.ComponentModel.ISupportInitialize)Root).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); @@ -274,5 +295,7 @@ private DevExpress.XtraGrid.Columns.GridColumn colIsNull; private DevExpress.XtraGrid.Columns.GridColumn colUnitName; private DevExpress.XtraGrid.Columns.GridColumn colDefaultValue; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn1; + private DevExpress.XtraEditors.Repository.RepositoryItemCheckedComboBoxEdit repositoryItemCheckedComboBoxEdit1; } } diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.cs b/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.cs index 10236aa..4151139 100644 --- a/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.cs @@ -1,4 +1,8 @@ -锘縩amespace HStation.WinFrmUI.Basic +锘縰sing DevExpress.DataAccess.Wizard.Model; +using DevExpress.XtraEditors; +using Yw.Dto; + +namespace HStation.WinFrmUI.Basic { public partial class SetSysPropForCatalogDlg : Form { @@ -6,6 +10,8 @@ { InitializeComponent(); this.gridView1.Columns["GroupName"].Group(); + repositoryItemCheckedComboBoxEdit1.DisplayMember = "Name"; + repositoryItemCheckedComboBoxEdit1.ValueMember = "ID"; } private List<SysPropMappingViewModel> _allBindingList = new List<SysPropMappingViewModel>(); @@ -21,6 +27,8 @@ var PropTreeList = await _bll.GetHaveListByCatalogID(ID); foreach (var item in PropTreeList) { + repositoryItemCheckedComboBoxEdit1.Items.Clear(); + if (item.PropList.Count > 0) { foreach (var child in item.PropList) @@ -34,6 +42,8 @@ model.DefaultValue = child.DefaultValue; model.UnitName = child.UnitName; model.Inherit = child.Inherit; + model.ChoiceList = child.ChoiceList; + // model.DisplayChoice = ; // model.ChoiceIds = child.ChoiceList; _allBindingList.Add(model); } @@ -76,12 +86,19 @@ private void gridView1_ShowingEditor(object sender, System.ComponentModel.CancelEventArgs e) { var vm = this.gridView1.GetCurrentViewModel(_allBindingList); - if (vm != null) + if (vm == null) { - if (vm.Inherit) - { - e.Cancel = true; - } + return; + } + if (vm.Inherit) + { + e.Cancel = true; + } + if (gridView1.FocusedColumn.Name == "gridColumn1") + { + repositoryItemCheckedComboBoxEdit1.Items.Clear(); + repositoryItemCheckedComboBoxEdit1.DataSource = vm.ChoiceList; + // repositoryItemCheckedComboBoxEdit1.edit } } @@ -104,5 +121,17 @@ } } } + + private void repositoryItemCheckedComboBoxEdit1_EditValueChanged(object sender, EventArgs e) + { + var allselectList = repositoryItemCheckedComboBoxEdit1.GetCheckedItems(); + string[] parts = Convert.ToString(allselectList).Split(','); + List<long> longs = parts.Select(part => long.Parse(part.Trim())).ToList(); + var vm = this.gridView1.GetCurrentViewModel(_allBindingList); + if (vm != null) + { + vm.ChoiceIds = longs; + } + } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SysCatalogManageMainPanel.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SysCatalogManageMainPanel.Designer.cs index 1cad4df..b0494bd 100644 --- a/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SysCatalogManageMainPanel.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SysCatalogManageMainPanel.Designer.cs @@ -187,6 +187,7 @@ treeList1.MenuManager = ribbonControl1; treeList1.Name = "treeList1"; treeList1.OptionsBehavior.Editable = false; + treeList1.OptionsBehavior.PopulateServiceColumns = true; treeList1.OptionsView.ShowTreeLines = DevExpress.Utils.DefaultBoolean.True; treeList1.Size = new Size(933, 446); treeList1.TabIndex = 4; @@ -200,6 +201,7 @@ colName.Name = "colName"; colName.Visible = true; colName.VisibleIndex = 0; + colName.Width = 212; // // colCode // @@ -210,6 +212,7 @@ colCode.Name = "colCode"; colCode.Visible = true; colCode.VisibleIndex = 1; + colCode.Width = 211; // // colSortCode // @@ -219,7 +222,8 @@ colSortCode.FieldName = "SortCode"; colSortCode.Name = "colSortCode"; colSortCode.Visible = true; - colSortCode.VisibleIndex = 2; + colSortCode.VisibleIndex = 3; + colSortCode.Width = 100; // // colDescription // @@ -229,7 +233,8 @@ colDescription.FieldName = "Description"; colDescription.Name = "colDescription"; colDescription.Visible = true; - colDescription.VisibleIndex = 3; + colDescription.VisibleIndex = 2; + colDescription.Width = 322; // // catalogViewModelBindingSource // diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SelectCorprationListCtrl.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SelectCorprationListCtrl.Designer.cs new file mode 100644 index 0000000..deb9b6b --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SelectCorprationListCtrl.Designer.cs @@ -0,0 +1,99 @@ +锘� +namespace MFire.WinFrmUI +{ + partial class SelectCorprationListCtrl + { + /// <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 System.ComponentModel.Container(); + treeListLookUpEdit1 = new DevExpress.XtraEditors.TreeListLookUpEdit(); + treeListLookUpEdit1TreeList = new DevExpress.XtraTreeList.TreeList(); + colName = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + svgImageTree = new DevExpress.Utils.SvgImageCollection(components); + ((System.ComponentModel.ISupportInitialize)treeListLookUpEdit1.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)treeListLookUpEdit1TreeList).BeginInit(); + ((System.ComponentModel.ISupportInitialize)svgImageTree).BeginInit(); + SuspendLayout(); + // + // treeListLookUpEdit1 + // + treeListLookUpEdit1.Dock = DockStyle.Fill; + treeListLookUpEdit1.EditValue = "閫夋嫨"; + treeListLookUpEdit1.Location = new Point(0, 0); + treeListLookUpEdit1.Name = "treeListLookUpEdit1"; + treeListLookUpEdit1.Properties.AllowFocused = false; + treeListLookUpEdit1.Properties.Appearance.Options.UseTextOptions = true; + treeListLookUpEdit1.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + treeListLookUpEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); + treeListLookUpEdit1.Properties.DisplayMember = "Name"; + treeListLookUpEdit1.Properties.TreeList = treeListLookUpEdit1TreeList; + treeListLookUpEdit1.Properties.ValueMember = "ID"; + treeListLookUpEdit1.Size = new Size(215, 20); + treeListLookUpEdit1.TabIndex = 0; + // + // treeListLookUpEdit1TreeList + // + treeListLookUpEdit1TreeList.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { colName }); + treeListLookUpEdit1TreeList.Location = new Point(0, 0); + treeListLookUpEdit1TreeList.Name = "treeListLookUpEdit1TreeList"; + treeListLookUpEdit1TreeList.RootValue = "0"; + treeListLookUpEdit1TreeList.Size = new Size(400, 200); + treeListLookUpEdit1TreeList.TabIndex = 0; + // + // colName + // + colName.Caption = "鍚嶇О"; + colName.FieldName = "Name"; + colName.Name = "colName"; + // + // svgImageTree + // + svgImageTree.Add("bo_customer", "image://svgimages/business objects/bo_customer.svg"); + // + // SelectCorprationListCtrl + // + AutoScaleDimensions = new SizeF(96F, 96F); + AutoScaleMode = AutoScaleMode.Dpi; + Controls.Add(treeListLookUpEdit1); + Name = "SelectCorprationListCtrl"; + Size = new Size(215, 46); + ((System.ComponentModel.ISupportInitialize)treeListLookUpEdit1.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)treeListLookUpEdit1TreeList).EndInit(); + ((System.ComponentModel.ISupportInitialize)svgImageTree).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraEditors.TreeListLookUpEdit treeListLookUpEdit1; + private DevExpress.XtraTreeList.TreeList treeListLookUpEdit1TreeList; + private System.Windows.Forms.BindingSource corprationBindingSource; + private DevExpress.XtraTreeList.Columns.TreeListColumn colShortName; + private DevExpress.XtraTreeList.Columns.TreeListColumn colName; + private DevExpress.Utils.SvgImageCollection svgImageTree; + } +} diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SelectCorprationListCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SelectCorprationListCtrl.cs new file mode 100644 index 0000000..37ffc0d --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SelectCorprationListCtrl.cs @@ -0,0 +1,133 @@ +锘縰sing System.ComponentModel; +using Yw.Dto; + +namespace MFire.WinFrmUI +{ + public partial class SelectCorprationListCtrl : DevExpress.XtraEditors.XtraUserControl + { + public SelectCorprationListCtrl() + { + InitializeComponent(); + this.treeListLookUpEdit1TreeList.InitialDefaultSettings(25); + this.treeListLookUpEdit1TreeList.SelectImageList = svgImageTree; + this.treeListLookUpEdit1.EditValueChanged += treeListLookUpEdit1_EditValueChanged; + } + + public class CurrentViewModel + { + public CurrentViewModel(Yw.Vmo.SysTypeLogicalTreeVmo rhs) + { + var module = rhs.LogicalModel as Yw.Dto.SysModuleStdDto; + this.ID = module.ID; + this.Name = module.Name; + this.SortCode = module.SortCode; + this.Description = module.Description; + } + + public CurrentViewModel(SysTypeStdDto rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + this.ParentID = rhs.ModuleID; + } + + /// <summary> + /// ID + /// </summary> + public long ID { get; set; } + + /// <summary> + /// 鐖剁骇ID + /// </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; } + } + + private Yw.BLL.SysTypeStd _bll = null; + + /// <summary> + /// 閫夋嫨椤瑰彉鎹� + /// </summary> + public event Action<long> SelectedChangedEvent; + + private BindingList<CurrentViewModel> _allBindingList { get; set; } + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public async void SetBindingData() + { + _bll = new Yw.BLL.SysTypeStd(); + _allBindingList = new BindingList<CurrentViewModel>(); + var alllist = await _bll.GetExtendLogicalTreeList(); + if (alllist == null) + return; + foreach (var item in alllist) + { + _allBindingList.Add(new CurrentViewModel(item)); + foreach (var child in item.Children) + { + var type = child.LogicalModel as Yw.Dto.SysTypeStdDto; + if (type != null) + { + _allBindingList.Add(new CurrentViewModel(type)); + } + } + } + this.treeListLookUpEdit1TreeList.DataSource = _allBindingList; + this.treeListLookUpEdit1TreeList.ExpandAll(); + if (_allBindingList.Count > 0) + { + var vm = _allBindingList.First(); + this.treeListLookUpEdit1.EditValue = vm.ID; + SelectedChanged(vm); + } + } + + //閫夋嫨瀵硅薄鍙樻崲 + private void SelectedChanged(CurrentViewModel vm) + { + if (SelectedChangedEvent != null) + { + SelectedChangedEvent.Invoke(vm.ID); + } + } + + //鍊煎彉鎹� + private void treeListLookUpEdit1_EditValueChanged(object sender, EventArgs e) + { + var vm = this.treeListLookUpEdit1TreeList.GetCurrentViewModel(_allBindingList); + if (vm != null) + { + SelectedChanged(vm); + } + } + + public long GetCurrentTypeID() + { + var vm = this.treeListLookUpEdit1TreeList.GetCurrentViewModel(_allBindingList); + if (vm == null) + { + MessageBoxHelper.ShowWarning("璇烽�夋嫨鏁版嵁琛�!"); + return default; + } + return vm.ID; + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SelectCorprationListCtrl.resx b/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SelectCorprationListCtrl.resx new file mode 100644 index 0000000..a1f8566 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SelectCorprationListCtrl.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="svgImageTree.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>227, 21</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SysPropGroupTreeListCtrl.designer.cs b/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SysPropGroupTreeListCtrl.designer.cs index f8cc91c..1d74156 100644 --- a/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SysPropGroupTreeListCtrl.designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SysPropGroupTreeListCtrl.designer.cs @@ -84,6 +84,8 @@ barRootBasicInfoMgr = new DevExpress.XtraBars.BarSubItem(); popupMenu1 = new DevExpress.XtraBars.PopupMenu(components); popupMenu2 = new DevExpress.XtraBars.PopupMenu(components); + standaloneBarDockControl1 = new DevExpress.XtraBars.StandaloneBarDockControl(); + layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); ((System.ComponentModel.ISupportInitialize)barManager1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); @@ -94,6 +96,7 @@ ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); ((System.ComponentModel.ISupportInitialize)popupMenu1).BeginInit(); ((System.ComponentModel.ISupportInitialize)popupMenu2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); SuspendLayout(); // // barManager1 @@ -104,6 +107,7 @@ barManager1.DockControls.Add(barDockControlBottom); barManager1.DockControls.Add(barDockControlLeft); barManager1.DockControls.Add(barDockControlRight); + barManager1.DockControls.Add(standaloneBarDockControl1); barManager1.Form = this; barManager1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { barCkSearch, barBtnAdd, barBtnEdit, barBtnDelete, barButtonItem1, barButtonItem2, barButtonItem3 }); barManager1.MaxItemId = 55; @@ -111,16 +115,16 @@ // bar1 // bar1.BarName = "Custom 2"; - bar1.CanDockStyle = DevExpress.XtraBars.BarCanDockStyle.Top; bar1.DockCol = 0; bar1.DockRow = 0; - bar1.DockStyle = DevExpress.XtraBars.BarDockStyle.Top; + bar1.DockStyle = DevExpress.XtraBars.BarDockStyle.Standalone; bar1.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] { new DevExpress.XtraBars.LinkPersistInfo(barBtnAdd), new DevExpress.XtraBars.LinkPersistInfo(barBtnEdit), new DevExpress.XtraBars.LinkPersistInfo(barBtnDelete), new DevExpress.XtraBars.LinkPersistInfo(barCkSearch) }); bar1.OptionsBar.AllowQuickCustomization = false; bar1.OptionsBar.DrawBorder = false; bar1.OptionsBar.DrawDragBorder = false; bar1.OptionsBar.MultiLine = true; bar1.OptionsBar.UseWholeRow = true; + bar1.StandaloneBarDockControl = standaloneBarDockControl1; bar1.Text = "Custom 2"; // // barBtnAdd @@ -165,7 +169,7 @@ barDockControlTop.Dock = DockStyle.Top; barDockControlTop.Location = new Point(0, 0); barDockControlTop.Manager = barManager1; - barDockControlTop.Size = new Size(276, 30); + barDockControlTop.Size = new Size(276, 0); // // barDockControlBottom // @@ -179,17 +183,17 @@ // barDockControlLeft.CausesValidation = false; barDockControlLeft.Dock = DockStyle.Left; - barDockControlLeft.Location = new Point(0, 30); + barDockControlLeft.Location = new Point(0, 0); barDockControlLeft.Manager = barManager1; - barDockControlLeft.Size = new Size(0, 539); + barDockControlLeft.Size = new Size(0, 569); // // barDockControlRight // barDockControlRight.CausesValidation = false; barDockControlRight.Dock = DockStyle.Right; - barDockControlRight.Location = new Point(276, 30); + barDockControlRight.Location = new Point(276, 0); barDockControlRight.Manager = barManager1; - barDockControlRight.Size = new Size(0, 539); + barDockControlRight.Size = new Size(0, 569); // // barButtonItem1 // @@ -217,13 +221,14 @@ // // layoutControl1 // + layoutControl1.Controls.Add(standaloneBarDockControl1); layoutControl1.Controls.Add(typeTreeListLookUpEdit1); layoutControl1.Controls.Add(treeList1); layoutControl1.Dock = DockStyle.Fill; - layoutControl1.Location = new Point(0, 30); + layoutControl1.Location = new Point(0, 0); layoutControl1.Name = "layoutControl1"; layoutControl1.Root = Root; - layoutControl1.Size = new Size(276, 539); + layoutControl1.Size = new Size(276, 569); layoutControl1.TabIndex = 6; layoutControl1.Text = "layoutControl1"; // @@ -232,20 +237,20 @@ typeTreeListLookUpEdit1.Location = new Point(0, 0); typeTreeListLookUpEdit1.Name = "typeTreeListLookUpEdit1"; typeTreeListLookUpEdit1.Size = new Size(276, 20); - typeTreeListLookUpEdit1.TabIndex = 5; + typeTreeListLookUpEdit1.TabIndex = 0; // // treeList1 // treeList1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; treeList1.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { colName }); treeList1.DataSource = propGroupTreeListViewModelBindingSource; - treeList1.Location = new Point(0, 20); + treeList1.Location = new Point(0, 54); treeList1.MenuManager = barManager1; treeList1.Name = "treeList1"; treeList1.OptionsBehavior.Editable = false; treeList1.OptionsBehavior.ReadOnly = true; - treeList1.Size = new Size(276, 519); - treeList1.TabIndex = 4; + treeList1.Size = new Size(276, 515); + treeList1.TabIndex = 2; treeList1.ViewStyle = DevExpress.XtraTreeList.TreeListViewStyle.TreeView; treeList1.FocusedNodeChanged += treeList1_FocusedNodeChanged; // @@ -264,19 +269,19 @@ // Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; - Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2 }); + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem3, layoutControlItem2 }); Root.Name = "Root"; Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); - Root.Size = new Size(276, 539); + Root.Size = new Size(276, 569); Root.TextVisible = false; // // layoutControlItem1 // layoutControlItem1.Control = treeList1; - layoutControlItem1.Location = new Point(0, 20); + layoutControlItem1.Location = new Point(0, 54); layoutControlItem1.Name = "layoutControlItem1"; layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); - layoutControlItem1.Size = new Size(276, 519); + layoutControlItem1.Size = new Size(276, 515); layoutControlItem1.TextSize = new Size(0, 0); layoutControlItem1.TextVisible = false; // @@ -512,6 +517,24 @@ popupMenu2.Manager = barManager1; popupMenu2.Name = "popupMenu2"; // + // standaloneBarDockControl1 + // + standaloneBarDockControl1.CausesValidation = false; + standaloneBarDockControl1.Location = new Point(2, 22); + standaloneBarDockControl1.Manager = barManager1; + standaloneBarDockControl1.Name = "standaloneBarDockControl1"; + standaloneBarDockControl1.Size = new Size(272, 30); + standaloneBarDockControl1.Text = "standaloneBarDockControl1"; + // + // layoutControlItem3 + // + layoutControlItem3.Control = standaloneBarDockControl1; + layoutControlItem3.Location = new Point(0, 20); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(276, 34); + layoutControlItem3.TextSize = new Size(0, 0); + layoutControlItem3.TextVisible = false; + // // SysPropGroupTreeListCtrl // Appearance.BackColor = SystemColors.Control; @@ -535,6 +558,7 @@ ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); ((System.ComponentModel.ISupportInitialize)popupMenu1).EndInit(); ((System.ComponentModel.ISupportInitialize)popupMenu2).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); ResumeLayout(false); PerformLayout(); } @@ -594,5 +618,7 @@ private SysTypeTreeListLookUpEdit typeTreeListLookUpEdit1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; private BindingSource propGroupTreeListViewModelBindingSource; + private DevExpress.XtraBars.StandaloneBarDockControl standaloneBarDockControl1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; } } diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SysPropManageMainPanel.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SysPropManageMainPanel.Designer.cs index fcaa788..41572c8 100644 --- a/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SysPropManageMainPanel.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SysPropManageMainPanel.Designer.cs @@ -220,7 +220,7 @@ colSortCode.FieldName = "SortCode"; colSortCode.Name = "colSortCode"; colSortCode.Visible = true; - colSortCode.VisibleIndex = 6; + colSortCode.VisibleIndex = 7; // // colDescription // @@ -230,7 +230,7 @@ colDescription.FieldName = "Description"; colDescription.Name = "colDescription"; colDescription.Visible = true; - colDescription.VisibleIndex = 7; + colDescription.VisibleIndex = 6; // // colDefaultValue // diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/HStation.WinFrmUI.Basic.csproj b/WinFrmUI/HStation.WinFrmUI.Basic/HStation.WinFrmUI.Basic.csproj index 3a05c59..5e87849 100644 --- a/WinFrmUI/HStation.WinFrmUI.Basic/HStation.WinFrmUI.Basic.csproj +++ b/WinFrmUI/HStation.WinFrmUI.Basic/HStation.WinFrmUI.Basic.csproj @@ -34,7 +34,6 @@ <Compile Update="02-SysPropManage\EditSysPropGrouoDlg.cs" /> <Compile Update="02-SysPropManage\SysPropGroupTreeListCtrl.cs" /> <Compile Update="02-SysPropManage\SysPropManageMainPanel.cs" /> - <Compile Update="02-SysPropManage\SysTypeTreeListLookUpEdit.cs" /> <Compile Update="Properties\Resources.Designer.cs"> <DesignTime>True</DesignTime> <AutoGen>True</AutoGen> diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/HStation.WinFrmUI.Basic.csproj.user b/WinFrmUI/HStation.WinFrmUI.Basic/HStation.WinFrmUI.Basic.csproj.user index 951b5e2..a89e927 100644 --- a/WinFrmUI/HStation.WinFrmUI.Basic/HStation.WinFrmUI.Basic.csproj.user +++ b/WinFrmUI/HStation.WinFrmUI.Basic/HStation.WinFrmUI.Basic.csproj.user @@ -47,6 +47,9 @@ <Compile Update="02-SysPropManage\EditSysPropGrouoDlg.cs"> <SubType>Form</SubType> </Compile> + <Compile Update="02-SysPropManage\SelectCorprationListCtrl.cs"> + <SubType>UserControl</SubType> + </Compile> <Compile Update="02-SysPropManage\SetSysPropChoiceDlg.cs"> <SubType>Form</SubType> </Compile> diff --git a/WinFrmUI/HStation.WinFrmUI.Dict.Core/DictManageMainPanel.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Dict.Core/DictManageMainPanel.Designer.cs index a424d75..7ec4e66 100644 --- a/WinFrmUI/HStation.WinFrmUI.Dict.Core/DictManageMainPanel.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Dict.Core/DictManageMainPanel.Designer.cs @@ -51,9 +51,9 @@ colName = new DevExpress.XtraGrid.Columns.GridColumn(); colCode = new DevExpress.XtraGrid.Columns.GridColumn(); colDescription = new DevExpress.XtraGrid.Columns.GridColumn(); - colSortCode = new DevExpress.XtraGrid.Columns.GridColumn(); colDictValue = new DevExpress.XtraGrid.Columns.GridColumn(); repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); + colSortCode = new DevExpress.XtraGrid.Columns.GridColumn(); dockManager1 = new DevExpress.XtraBars.Docking.DockManager(components); dockPanel1 = new DevExpress.XtraBars.Docking.DockPanel(); dockPanel1_Container = new DevExpress.XtraBars.Docking.ControlContainer(); @@ -179,7 +179,7 @@ colName.Name = "colName"; colName.Visible = true; colName.VisibleIndex = 0; - colName.Width = 340; + colName.Width = 332; // // colCode // @@ -187,7 +187,7 @@ colCode.Name = "colCode"; colCode.Visible = true; colCode.VisibleIndex = 1; - colCode.Width = 226; + colCode.Width = 100; // // colDescription // @@ -195,15 +195,7 @@ colDescription.Name = "colDescription"; colDescription.Visible = true; colDescription.VisibleIndex = 2; - colDescription.Width = 380; - // - // colSortCode - // - colSortCode.FieldName = "SortCode"; - colSortCode.Name = "colSortCode"; - colSortCode.Visible = true; - colSortCode.VisibleIndex = 3; - colSortCode.Width = 123; + colDescription.Width = 253; // // colDictValue // @@ -212,7 +204,7 @@ colDictValue.Name = "colDictValue"; colDictValue.Visible = true; colDictValue.VisibleIndex = 4; - colDictValue.Width = 101; + colDictValue.Width = 70; // // repositoryItemButtonEdit1 // @@ -222,6 +214,14 @@ repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1"; repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; // + // colSortCode + // + colSortCode.FieldName = "SortCode"; + colSortCode.Name = "colSortCode"; + colSortCode.Visible = true; + colSortCode.VisibleIndex = 3; + colSortCode.Width = 83; + // // dockManager1 // dockManager1.DockingOptions.ShowAutoHideButton = false; -- Gitblit v1.9.3