lixiaojun
2024-07-22 0b7bcb43cb3166c4b6f57fdd473e969845b65a28
优化导入,添加基础控件
已修改10个文件
已添加9个文件
1204 ■■■■ 文件已修改
Desktop/HStation.Desktop.Xhs.Core/DbFirstHelper.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectManager.cs 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectViewModel.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/01-ModelFile/SelectXhsProjectModelFileWizardPage.cs 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/02-ProjectInfo/InputXhsProjectInfoWizardPage.Designer.cs 90 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/02-ProjectInfo/InputXhsProjectInfoWizardPage.cs 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Core/08-wizard/WizardManager.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Core/09-common/01-flags/SetFlagsContainerCtrl.Designer.cs 174 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Core/09-common/01-flags/SetFlagsContainerCtrl.cs 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Core/09-common/01-flags/SetFlagsContainerCtrl.resx 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Core/09-common/01-flags/SetFlagsEditCtrl.Designer.cs 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Core/09-common/01-flags/SetFlagsEditCtrl.cs 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Core/09-common/01-flags/SetFlagsEditCtrl.resx 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Core/09-common/StringListCheckedListBoxCtrl.Designer.cs 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Core/09-common/StringListCheckedListBoxCtrl.cs 92 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Core/09-common/StringListCheckedListBoxCtrl.resx 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Core/Yw.WinFrmUI.Core.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Core/Yw.WinFrmUI.Core.csproj.user 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Desktop/HStation.Desktop.Xhs.Core/DbFirstHelper.cs
@@ -18,6 +18,7 @@
        {
            new BLL.XhsDbFirstHelper().Initial();
            new Yw.BLL.MapDbFirstHelper().Initial();
            new Yw.BLL.BasicDbFirstHelper().Initial();
        }
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectManager.cs
@@ -3,127 +3,8 @@
    /// <summary>
    /// å¯¼å…¥é¡¹ç›®ç®¡ç†
    /// </summary>
    public class ImportXhsProjectManager : IWizardManager<ImportXhsProjectViewModel>
    public class ImportXhsProjectManager : WizardManager<ImportXhsProjectViewModel>
    {
        /// <summary>
        /// åˆå§‹åŒ–管理器
        /// </summary>
        /// <param name="pages">步骤页面数组</param>
        public void InitialManager(IWizardPage<ImportXhsProjectViewModel>[] pages)
        {
            _pages = pages;
            if (_pages != null && _pages.Length > 0)
            {
                _selectedIndex = 0;
                this.SelectedPageChangedEvent?.Invoke(this.SelectedPage, this.SelectedIndex);
                this.SelectedPage.InitialPage(_vm);
            }
        }
        private IWizardPage<ImportXhsProjectViewModel>[] _pages;//步骤页面数组
        private readonly ImportXhsProjectViewModel _vm = new ImportXhsProjectViewModel();
        /// <summary>
        /// é€‰æ‹©é¡µé¢æ”¹å˜äº‹ä»¶
        /// </summary>
        public event Action<Yw.WinFrmUI.IWizardPage<ImportXhsProjectViewModel>, int> SelectedPageChangedEvent;
        public event Action<IWizardPage<ImportXhsProjectViewModel>, int> SelectedPageStateChangedEvent;
        /// <summary>
        /// é€‰æ‹©é¡µé¢
        /// </summary>
        public IWizardPage<ImportXhsProjectViewModel> SelectedPage
        {
            get
            {
                if (_pages == null || _pages.Length < 1)
                {
                    return default;
                }
                return _pages[SelectedIndex];
            }
        }
        /// <summary>
        /// é€‰æ‹©ç´¢å¼•
        /// </summary>
        public int SelectedIndex
        {
            get { return _selectedIndex; }
        }
        private int _selectedIndex;
        /// <summary>
        /// ä¸Šä¸€æ­¥
        /// </summary>
        public bool Prev()
        {
            if (_pages == null || _pages.Length < 1)
            {
                return false;
            }
            if (this.SelectedPage.CanPrev())
            {
                --_selectedIndex;
                this.SelectedPageChangedEvent?.Invoke(this.SelectedPage, this.SelectedIndex);
                this.SelectedPage.InitialPage(_vm);
                return true;
            }
            return false;
        }
        /// <summary>
        /// ä¸‹ä¸€æ­¥
        /// </summary>
        public bool Next()
        {
            if (_pages == null || _pages.Length < 1)
            {
                return false;
            }
            if (this.SelectedPage.CanNext())
            {
                ++_selectedIndex;
                this.SelectedPageChangedEvent?.Invoke(this.SelectedPage, this.SelectedIndex);
                this.SelectedPage.InitialPage(_vm);
                return true;
            }
            return false;
        }
        /// <summary>
        /// å–消
        /// </summary>
        public bool Cancel()
        {
            if (_pages == null || _pages.Length < 1)
            {
                return false;
            }
            if (this.SelectedPage.CanCancel())
            {
                return true;
            }
            return false;
        }
        /// <summary>
        /// å®Œæˆ
        /// </summary>
        public bool Complete()
        {
            if (_pages == null || _pages.Length < 1)
            {
                return false;
            }
            if (this.SelectedPage.CanComplete())
            {
                return true;
            }
            return false;
        }
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectViewModel.cs
@@ -63,7 +63,17 @@
        #endregion
        #region ç¬¬å››æ­¥ç”Ÿæˆé¡¹ç›®
        #endregion
        #region ç¬¬äº”步项目完成
        #endregion
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/01-ModelFile/SelectXhsProjectModelFileWizardPage.cs
@@ -1,5 +1,4 @@

namespace HStation.WinFrmUI
namespace HStation.WinFrmUI
{
    /// <summary>
    /// é€‰æ‹©é¡¹ç›®æ¨¡åž‹æ–‡ä»¶
@@ -12,7 +11,13 @@
            this.layoutControl1.SetupLayoutControl();
        }
        private ImportXhsProjectViewModel _vm = null;
        /// <summary>
        /// é¡µé¢çŠ¶æ€æ”¹å˜äº‹ä»¶
        /// </summary>
        public event Action PageStateChangedEvent;
        private ImportXhsProjectViewModel _vm = null;//操作对象
        private bool _isInitialize = false;//是否初始化
        /// <summary>
        /// åˆå§‹åŒ–
@@ -27,19 +32,9 @@
            _isInitialize = true;
        }
        /// <summary>
        /// æ˜¯å¦åˆå§‹åŒ–
        /// </summary>
        public bool IsInitialize
        {
            get { return _isInitialize; }
        }
        private bool _isInitialize = false;
        public event Action PageStateChangedEvent;
        /// <summary>
        /// æ˜¯å¦å…è®¸è¿”回上一步
        /// å…è®¸ä¸Šä¸€æ­¥
        /// </summary>
        public bool AllowPrev
        {
@@ -47,15 +42,18 @@
        }
        /// <summary>
        /// æ˜¯å¦å…è®¸è¿›å…¥ä¸‹ä¸€æ­¥
        /// å…è®¸ä¸‹ä¸€æ­¥
        /// </summary>
        public bool AllowNext
        {
            get { return true; }
            get
            {
                return _isInitialize;
            }
        }
        /// <summary>
        /// æ˜¯å¦å…è®¸å–消
        /// å…è®¸å–消
        /// </summary>
        public bool AllowCancel
        {
@@ -63,7 +61,7 @@
        }
        /// <summary>
        /// æ˜¯å¦å…è®¸å®Œæˆ
        /// å…è®¸å®Œæˆ
        /// </summary>
        public bool AllowComplete
        {
@@ -71,7 +69,7 @@
        }
        /// <summary>
        /// èƒ½å¦è¿”回上一步
        /// èƒ½å¦ä¸Šä¸€æ­¥
        /// </summary>
        public bool CanPrev()
        {
@@ -79,16 +77,21 @@
        }
        /// <summary>
        /// èƒ½å¦è¿›å…¥ä¸‹ä¸€æ­¥
        /// èƒ½å¦ä¸‹ä¸€æ­¥
        /// </summary>
        public bool CanNext()
        {
            if (!_isInitialize)
            {
                return false;
            }
            this.dxErrorProvider1.ClearErrors();
            if (string.IsNullOrEmpty(this.btnEditSelectModelFile.Text.Trim()))
            {
                this.dxErrorProvider1.SetError(this.btnEditSelectModelFile, "必选项");
                return false;
            }
            _vm.ZipFile = this.btnEditSelectModelFile.Text.Trim();
            return true;
        }
@@ -119,7 +122,6 @@
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                var fileName = dlg.FileName;
                _vm.ZipFile = fileName;
                this.btnEditSelectModelFile.EditValue = fileName;
            }
        }
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/02-ProjectInfo/InputXhsProjectInfoWizardPage.Designer.cs
@@ -32,7 +32,6 @@
            layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
            txtDescription = new DevExpress.XtraEditors.MemoEdit();
            txtTagNme = new DevExpress.XtraEditors.TextEdit();
            txtFlags = new DevExpress.XtraEditors.TextEdit();
            txtAddress = new DevExpress.XtraEditors.TextEdit();
            txtCustomer = new DevExpress.XtraEditors.TextEdit();
            txtName = new DevExpress.XtraEditors.TextEdit();
@@ -42,15 +41,15 @@
            layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
            dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components);
            setFlagsEditCtrl1 = new SetFlagsEditCtrl();
            layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
            ((ISupportInitialize)layoutControl1).BeginInit();
            layoutControl1.SuspendLayout();
            ((ISupportInitialize)txtDescription.Properties).BeginInit();
            ((ISupportInitialize)txtTagNme.Properties).BeginInit();
            ((ISupportInitialize)txtFlags.Properties).BeginInit();
            ((ISupportInitialize)txtAddress.Properties).BeginInit();
            ((ISupportInitialize)txtCustomer.Properties).BeginInit();
            ((ISupportInitialize)txtName.Properties).BeginInit();
@@ -60,17 +59,17 @@
            ((ISupportInitialize)layoutControlItem2).BeginInit();
            ((ISupportInitialize)layoutControlItem3).BeginInit();
            ((ISupportInitialize)layoutControlItem4).BeginInit();
            ((ISupportInitialize)layoutControlItem5).BeginInit();
            ((ISupportInitialize)layoutControlItem6).BeginInit();
            ((ISupportInitialize)layoutControlItem7).BeginInit();
            ((ISupportInitialize)dxErrorProvider1).BeginInit();
            ((ISupportInitialize)layoutControlItem5).BeginInit();
            SuspendLayout();
            // 
            // layoutControl1
            // 
            layoutControl1.Controls.Add(setFlagsEditCtrl1);
            layoutControl1.Controls.Add(txtDescription);
            layoutControl1.Controls.Add(txtTagNme);
            layoutControl1.Controls.Add(txtFlags);
            layoutControl1.Controls.Add(txtAddress);
            layoutControl1.Controls.Add(txtCustomer);
            layoutControl1.Controls.Add(txtName);
@@ -78,6 +77,7 @@
            layoutControl1.Dock = DockStyle.Fill;
            layoutControl1.Location = new Point(0, 0);
            layoutControl1.Name = "layoutControl1";
            layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(1200, 175, 650, 400);
            layoutControl1.Root = Root;
            layoutControl1.Size = new Size(859, 464);
            layoutControl1.TabIndex = 0;
@@ -85,57 +85,49 @@
            // 
            // txtDescription
            // 
            txtDescription.Location = new Point(84, 84);
            txtDescription.Location = new Point(67, 84);
            txtDescription.Name = "txtDescription";
            txtDescription.Size = new Size(763, 368);
            txtDescription.Size = new Size(780, 368);
            txtDescription.StyleController = layoutControl1;
            txtDescription.TabIndex = 10;
            // 
            // txtTagNme
            // 
            txtTagNme.Location = new Point(503, 60);
            txtTagNme.Location = new Point(486, 60);
            txtTagNme.Name = "txtTagNme";
            txtTagNme.Size = new Size(344, 20);
            txtTagNme.Size = new Size(361, 20);
            txtTagNme.StyleController = layoutControl1;
            txtTagNme.TabIndex = 9;
            // 
            // txtFlags
            //
            txtFlags.Location = new Point(84, 60);
            txtFlags.Name = "txtFlags";
            txtFlags.Size = new Size(343, 20);
            txtFlags.StyleController = layoutControl1;
            txtFlags.TabIndex = 8;
            //
            // txtAddress
            // 
            txtAddress.Location = new Point(503, 36);
            txtAddress.Location = new Point(486, 36);
            txtAddress.Name = "txtAddress";
            txtAddress.Size = new Size(344, 20);
            txtAddress.Size = new Size(361, 20);
            txtAddress.StyleController = layoutControl1;
            txtAddress.TabIndex = 7;
            // 
            // txtCustomer
            // 
            txtCustomer.Location = new Point(84, 36);
            txtCustomer.Location = new Point(67, 36);
            txtCustomer.Name = "txtCustomer";
            txtCustomer.Size = new Size(343, 20);
            txtCustomer.Size = new Size(360, 20);
            txtCustomer.StyleController = layoutControl1;
            txtCustomer.TabIndex = 6;
            // 
            // txtName
            // 
            txtName.Location = new Point(503, 12);
            txtName.Location = new Point(486, 12);
            txtName.Name = "txtName";
            txtName.Size = new Size(344, 20);
            txtName.Size = new Size(361, 20);
            txtName.StyleController = layoutControl1;
            txtName.TabIndex = 5;
            // 
            // txtNO
            // 
            txtNO.Location = new Point(84, 12);
            txtNO.Location = new Point(67, 12);
            txtNO.Name = "txtNO";
            txtNO.Size = new Size(343, 20);
            txtNO.Size = new Size(360, 20);
            txtNO.StyleController = layoutControl1;
            txtNO.TabIndex = 4;
            // 
@@ -145,7 +137,7 @@
            Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
            Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
            Root.GroupBordersVisible = false;
            Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2, layoutControlItem3, layoutControlItem4, layoutControlItem5, layoutControlItem6, layoutControlItem7 });
            Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2, layoutControlItem3, layoutControlItem4, layoutControlItem6, layoutControlItem7, layoutControlItem5 });
            Root.Name = "Root";
            Root.Size = new Size(859, 464);
            Root.TextVisible = false;
@@ -157,7 +149,7 @@
            layoutControlItem1.Name = "layoutControlItem1";
            layoutControlItem1.Size = new Size(419, 24);
            layoutControlItem1.Text = "编号:";
            layoutControlItem1.TextSize = new Size(60, 14);
            layoutControlItem1.TextSize = new Size(43, 14);
            // 
            // layoutControlItem2
            // 
@@ -167,7 +159,7 @@
            layoutControlItem2.Name = "layoutControlItem2";
            layoutControlItem2.Size = new Size(420, 24);
            layoutControlItem2.Text = "<color=red>*</color>名称:";
            layoutControlItem2.TextSize = new Size(60, 14);
            layoutControlItem2.TextSize = new Size(43, 14);
            // 
            // layoutControlItem3
            // 
@@ -176,7 +168,7 @@
            layoutControlItem3.Name = "layoutControlItem3";
            layoutControlItem3.Size = new Size(419, 24);
            layoutControlItem3.Text = "客户:";
            layoutControlItem3.TextSize = new Size(60, 14);
            layoutControlItem3.TextSize = new Size(43, 14);
            // 
            // layoutControlItem4
            // 
@@ -184,17 +176,8 @@
            layoutControlItem4.Location = new Point(419, 24);
            layoutControlItem4.Name = "layoutControlItem4";
            layoutControlItem4.Size = new Size(420, 24);
            layoutControlItem4.Text = "详细地址:";
            layoutControlItem4.TextSize = new Size(60, 14);
            //
            // layoutControlItem5
            //
            layoutControlItem5.Control = txtFlags;
            layoutControlItem5.Location = new Point(0, 48);
            layoutControlItem5.Name = "layoutControlItem5";
            layoutControlItem5.Size = new Size(419, 24);
            layoutControlItem5.Text = "标签:";
            layoutControlItem5.TextSize = new Size(60, 14);
            layoutControlItem4.Text = "地址:";
            layoutControlItem4.TextSize = new Size(43, 14);
            // 
            // layoutControlItem6
            // 
@@ -203,7 +186,7 @@
            layoutControlItem6.Name = "layoutControlItem6";
            layoutControlItem6.Size = new Size(420, 24);
            layoutControlItem6.Text = "标志:";
            layoutControlItem6.TextSize = new Size(60, 14);
            layoutControlItem6.TextSize = new Size(43, 14);
            // 
            // layoutControlItem7
            // 
@@ -212,11 +195,27 @@
            layoutControlItem7.Name = "layoutControlItem7";
            layoutControlItem7.Size = new Size(839, 372);
            layoutControlItem7.Text = "说明";
            layoutControlItem7.TextSize = new Size(60, 14);
            layoutControlItem7.TextSize = new Size(43, 14);
            // 
            // dxErrorProvider1
            // 
            dxErrorProvider1.ContainerControl = this;
            //
            // setFlagsEditCtrl1
            //
            setFlagsEditCtrl1.Location = new Point(67, 60);
            setFlagsEditCtrl1.Name = "setFlagsEditCtrl1";
            setFlagsEditCtrl1.Size = new Size(360, 20);
            setFlagsEditCtrl1.TabIndex = 11;
            //
            // layoutControlItem5
            //
            layoutControlItem5.Control = setFlagsEditCtrl1;
            layoutControlItem5.Location = new Point(0, 48);
            layoutControlItem5.Name = "layoutControlItem5";
            layoutControlItem5.Size = new Size(419, 24);
            layoutControlItem5.Text = "标签:";
            layoutControlItem5.TextSize = new Size(43, 14);
            // 
            // InputXhsProjectInfoWizardPage
            // 
@@ -229,7 +228,6 @@
            layoutControl1.ResumeLayout(false);
            ((ISupportInitialize)txtDescription.Properties).EndInit();
            ((ISupportInitialize)txtTagNme.Properties).EndInit();
            ((ISupportInitialize)txtFlags.Properties).EndInit();
            ((ISupportInitialize)txtAddress.Properties).EndInit();
            ((ISupportInitialize)txtCustomer.Properties).EndInit();
            ((ISupportInitialize)txtName.Properties).EndInit();
@@ -239,10 +237,10 @@
            ((ISupportInitialize)layoutControlItem2).EndInit();
            ((ISupportInitialize)layoutControlItem3).EndInit();
            ((ISupportInitialize)layoutControlItem4).EndInit();
            ((ISupportInitialize)layoutControlItem5).EndInit();
            ((ISupportInitialize)layoutControlItem6).EndInit();
            ((ISupportInitialize)layoutControlItem7).EndInit();
            ((ISupportInitialize)dxErrorProvider1).EndInit();
            ((ISupportInitialize)layoutControlItem5).EndInit();
            ResumeLayout(false);
        }
@@ -258,12 +256,12 @@
        private DevExpress.XtraEditors.TextEdit txtCustomer;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
        private DevExpress.XtraEditors.TextEdit txtTagNme;
        private DevExpress.XtraEditors.TextEdit txtFlags;
        private DevExpress.XtraEditors.TextEdit txtAddress;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
        private DevExpress.XtraEditors.MemoEdit txtDescription;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
        private SetFlagsEditCtrl setFlagsEditCtrl1;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/02-ProjectInfo/InputXhsProjectInfoWizardPage.cs
@@ -1,5 +1,4 @@

namespace HStation.WinFrmUI
namespace HStation.WinFrmUI
{
    public partial class InputXhsProjectInfoWizardPage : DevExpress.XtraEditors.XtraUserControl, Yw.WinFrmUI.IWizardPage<ImportXhsProjectViewModel>
    {
@@ -8,50 +7,55 @@
            InitializeComponent();
        }
        private ImportXhsProjectViewModel _vm = null;
        /// <summary>
        /// é¡µé¢çŠ¶æ€æ”¹å˜äº‹ä»¶
        /// </summary>
        public event Action PageStateChangedEvent;
        private ImportXhsProjectViewModel _vm = null;//操作对象
        private bool _isInitialize = false;//是否初始化
        private Lazy<HStation.BLL.XhsProject> _bllProject = new(() => new HStation.BLL.XhsProject());//项目bll
        private Lazy<Yw.BLL.SysFlagStd> _bllFlag = new(() => new Yw.BLL.SysFlagStd());//标签bll
        /// <summary>
        /// åˆå§‹åŒ–
        /// </summary>
        public void InitialPage(ImportXhsProjectViewModel t)
        public async void InitialPage(ImportXhsProjectViewModel t)
        {
            if (_isInitialize)
            {
                return;
            }
            _vm = t;
            var allFlagList = await _bllFlag.Value.GetFlagListBySysType(HStation.Xhs.DataType.XhsProject);
            this.setFlagsEditCtrl1.SetBindingData(allFlagList, null);
            _isInitialize = true;
        }
        /// <summary>
        /// æ˜¯å¦åˆå§‹åŒ–
        /// </summary>
        public bool IsInitialize
        {
            get { return _isInitialize; }
        }
        private bool _isInitialize = false;
        public event Action PageStateChangedEvent;
        /// <summary>
        /// æ˜¯å¦å…è®¸ä¸Šä¸€æ­¥
        /// å…è®¸ä¸Šä¸€æ­¥
        /// </summary>
        public bool AllowPrev
        {
            get { return true; }
            get
            {
                return true;
            }
        }
        /// <summary>
        /// æ˜¯å¦å…è®¸ä¸‹ä¸€æ­¥
        /// å…è®¸ä¸‹ä¸€æ­¥
        /// </summary>
        public bool AllowNext
        {
            get { return true; }
            get
            {
                return _isInitialize;
            }
        }
        /// <summary>
        /// æ˜¯å¦å…è®¸å–消
        /// å…è®¸å–消
        /// </summary>
        public bool AllowCancel
        {
@@ -59,7 +63,7 @@
        }
        /// <summary>
        /// æ˜¯å¦å…è®¸å®Œæˆ
        /// å…è®¸å®Œæˆ
        /// </summary>
        public bool AllowComplete
        {
@@ -67,7 +71,7 @@
        }
        /// <summary>
        /// èƒ½å¦è¿”回上一步
        /// èƒ½å¦ä¸Šä¸€æ­¥
        /// </summary>
        public bool CanPrev()
        {
@@ -75,22 +79,35 @@
        }
        /// <summary>
        /// èƒ½å¦è¿›å…¥ä¸‹ä¸€æ­¥
        /// èƒ½å¦ä¸‹ä¸€æ­¥
        /// </summary>
        public bool CanNext()
        {
            if (!_isInitialize)
            {
                return false;
            }
            this.dxErrorProvider1.ClearErrors();
            if (string.IsNullOrEmpty(this.txtName.Text.Trim()))
            {
                this.dxErrorProvider1.SetError(this.txtName, "必填项");
                return false;
            }
            var tagName = this.txtTagNme.Text.Trim();
            if (!string.IsNullOrEmpty(tagName))
            {
                if (_bllProject.Value.IsExistTagName(tagName).Result)
                {
                    this.dxErrorProvider1.SetError(this.txtTagNme, "标记已存在");
                    return false;
                }
            }
            _vm.NO = this.txtNO.Text.Trim();
            _vm.Name = this.txtName.Text.Trim();
            _vm.Customer = this.txtCustomer.Text.Trim();
            _vm.Address = this.txtAddress.Text.Trim();
            _vm.Flags = null;
            _vm.TagName = this.txtTagNme.Text.Trim();
            _vm.TagName = tagName;
            _vm.Description = this.txtDescription.Text.Trim();
            return true;
        }
WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj
@@ -42,6 +42,7 @@
  <ItemGroup>
    <PackageReference Include="DevExpress.Win.Design" Version="23.2.4" />
    <PackageReference Include="Yw.BLL.Basic.Core" Version="3.2.0" />
    <PackageReference Include="Yw.ZipFile.Core" Version="3.0.0" />
  </ItemGroup>
WinFrmUI/Yw.WinFrmUI.Core/08-wizard/WizardManager.cs
@@ -43,8 +43,8 @@
                    };
                }
                _selectedIndex = 0;
                TriggerSelectedPageChangedEvent();
                this.SelectedPage.InitialPage(_vm);
                TriggerSelectedPageChangedEvent();
            }
            else
            {
@@ -119,8 +119,8 @@
            if (this.SelectedPage.CanPrev())
            {
                --_selectedIndex;
                TriggerSelectedPageChangedEvent();
                this.SelectedPage.InitialPage(_vm);
                TriggerSelectedPageChangedEvent();
                return true;
            }
            return false;
@@ -142,8 +142,8 @@
            if (this.SelectedPage.CanNext())
            {
                ++_selectedIndex;
                TriggerSelectedPageChangedEvent();
                this.SelectedPage.InitialPage(_vm);
                TriggerSelectedPageChangedEvent();
                return true;
            }
            return false;
WinFrmUI/Yw.WinFrmUI.Core/09-common/01-flags/SetFlagsContainerCtrl.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,174 @@
namespace Yw.WinFrmUI
{
    partial class SetFlagsContainerCtrl
    {
        /// <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()
        {
            layoutControl1 = new LayoutControl();
            stringListCheckedListBoxCtrl1 = new StringListCheckedListBoxCtrl();
            Root = new LayoutControlGroup();
            layoutControlItem1 = new LayoutControlItem();
            btnOk = new SimpleButton();
            itemForOk = new LayoutControlItem();
            btnCancel = new SimpleButton();
            itemForCancel = new LayoutControlItem();
            emptySpaceItem1 = new EmptySpaceItem();
            ((ISupportInitialize)layoutControl1).BeginInit();
            layoutControl1.SuspendLayout();
            ((ISupportInitialize)Root).BeginInit();
            ((ISupportInitialize)layoutControlItem1).BeginInit();
            ((ISupportInitialize)itemForOk).BeginInit();
            ((ISupportInitialize)itemForCancel).BeginInit();
            ((ISupportInitialize)emptySpaceItem1).BeginInit();
            SuspendLayout();
            //
            // layoutControl1
            //
            layoutControl1.Controls.Add(btnCancel);
            layoutControl1.Controls.Add(btnOk);
            layoutControl1.Controls.Add(stringListCheckedListBoxCtrl1);
            layoutControl1.Dock = DockStyle.Fill;
            layoutControl1.Location = new Point(0, 0);
            layoutControl1.Name = "layoutControl1";
            layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(941, 111, 650, 400);
            layoutControl1.Root = Root;
            layoutControl1.Size = new Size(600, 400);
            layoutControl1.TabIndex = 0;
            layoutControl1.Text = "layoutControl1";
            //
            // stringListCheckedListBoxCtrl1
            //
            stringListCheckedListBoxCtrl1.Location = new Point(2, 2);
            stringListCheckedListBoxCtrl1.Name = "stringListCheckedListBoxCtrl1";
            stringListCheckedListBoxCtrl1.Size = new Size(596, 370);
            stringListCheckedListBoxCtrl1.TabIndex = 4;
            //
            // Root
            //
            Root.EnableIndentsWithoutBorders = DefaultBoolean.True;
            Root.GroupBordersVisible = false;
            Root.Items.AddRange(new BaseLayoutItem[] { layoutControlItem1, itemForOk, itemForCancel, emptySpaceItem1 });
            Root.Name = "Root";
            Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
            Root.Size = new Size(600, 400);
            Root.TextVisible = false;
            //
            // layoutControlItem1
            //
            layoutControlItem1.Control = stringListCheckedListBoxCtrl1;
            layoutControlItem1.Location = new Point(0, 0);
            layoutControlItem1.Name = "layoutControlItem1";
            layoutControlItem1.Size = new Size(600, 374);
            layoutControlItem1.TextSize = new Size(0, 0);
            layoutControlItem1.TextVisible = false;
            //
            // btnOk
            //
            btnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary;
            btnOk.Appearance.Options.UseBackColor = true;
            btnOk.Location = new Point(512, 376);
            btnOk.Name = "btnOk";
            btnOk.Size = new Size(86, 22);
            btnOk.StyleController = layoutControl1;
            btnOk.TabIndex = 5;
            btnOk.Text = "确定";
            btnOk.Click += btnOk_Click;
            //
            // itemForOk
            //
            itemForOk.Control = btnOk;
            itemForOk.Location = new Point(510, 374);
            itemForOk.MaxSize = new Size(90, 26);
            itemForOk.MinSize = new Size(90, 26);
            itemForOk.Name = "itemForOk";
            itemForOk.Size = new Size(90, 26);
            itemForOk.SizeConstraintsType = SizeConstraintsType.Custom;
            itemForOk.TextSize = new Size(0, 0);
            itemForOk.TextVisible = false;
            //
            // btnCancel
            //
            btnCancel.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning;
            btnCancel.Appearance.Options.UseBackColor = true;
            btnCancel.Location = new Point(422, 376);
            btnCancel.Name = "btnCancel";
            btnCancel.Size = new Size(86, 22);
            btnCancel.StyleController = layoutControl1;
            btnCancel.TabIndex = 6;
            btnCancel.Text = "取消";
            btnCancel.Click += btnCancel_Click;
            //
            // itemForCancel
            //
            itemForCancel.Control = btnCancel;
            itemForCancel.Location = new Point(420, 374);
            itemForCancel.MaxSize = new Size(90, 26);
            itemForCancel.MinSize = new Size(90, 26);
            itemForCancel.Name = "itemForCancel";
            itemForCancel.Size = new Size(90, 26);
            itemForCancel.SizeConstraintsType = SizeConstraintsType.Custom;
            itemForCancel.TextSize = new Size(0, 0);
            itemForCancel.TextVisible = false;
            //
            // emptySpaceItem1
            //
            emptySpaceItem1.AllowHotTrack = false;
            emptySpaceItem1.Location = new Point(0, 374);
            emptySpaceItem1.Name = "emptySpaceItem1";
            emptySpaceItem1.Size = new Size(420, 26);
            emptySpaceItem1.TextSize = new Size(0, 0);
            //
            // SetFlagsContainerCtrl
            //
            AutoScaleDimensions = new SizeF(7F, 14F);
            AutoScaleMode = AutoScaleMode.Font;
            Controls.Add(layoutControl1);
            Name = "SetFlagsContainerCtrl";
            Size = new Size(600, 400);
            ((ISupportInitialize)layoutControl1).EndInit();
            layoutControl1.ResumeLayout(false);
            ((ISupportInitialize)Root).EndInit();
            ((ISupportInitialize)layoutControlItem1).EndInit();
            ((ISupportInitialize)itemForOk).EndInit();
            ((ISupportInitialize)itemForCancel).EndInit();
            ((ISupportInitialize)emptySpaceItem1).EndInit();
            ResumeLayout(false);
        }
        #endregion
        private LayoutControl layoutControl1;
        private LayoutControlGroup Root;
        private StringListCheckedListBoxCtrl stringListCheckedListBoxCtrl1;
        private LayoutControlItem layoutControlItem1;
        private SimpleButton btnCancel;
        private SimpleButton btnOk;
        private LayoutControlItem itemForOk;
        private LayoutControlItem itemForCancel;
        private EmptySpaceItem emptySpaceItem1;
    }
}
WinFrmUI/Yw.WinFrmUI.Core/09-common/01-flags/SetFlagsContainerCtrl.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,50 @@
namespace Yw.WinFrmUI
{
    /// <summary>
    ///
    /// </summary>
    public partial class SetFlagsContainerCtrl : DevExpress.XtraEditors.XtraUserControl
    {
        /// <summary>
        ///
        /// </summary>
        public SetFlagsContainerCtrl()
        {
            InitializeComponent();
        }
        /// <summary>
        /// ç¡®å®šäº‹ä»¶
        /// </summary>
        public event Action<List<string>> OkEvent;
        /// <summary>
        /// å–消事件
        /// </summary>
        public event Action CancelEvent;
        /// <summary>
        /// ç»‘定数据
        /// </summary>
        /// <param name="allFlagList">所有标签列表</param>
        /// <param name="selectedFlagList">选择的标签列表</param>
        public void SetBindingData(List<string> allFlagList, List<string> selectedFlagList)
        {
            this.stringListCheckedListBoxCtrl1.Initial(allFlagList);
            this.stringListCheckedListBoxCtrl1.Select(selectedFlagList);
        }
        //确定
        private void btnOk_Click(object sender, EventArgs e)
        {
            var selectedFlagList = this.stringListCheckedListBoxCtrl1.Get();
            this.OkEvent?.Invoke(selectedFlagList);
        }
        //取消
        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.CancelEvent?.Invoke();
        }
    }
}
WinFrmUI/Yw.WinFrmUI.Core/09-common/01-flags/SetFlagsContainerCtrl.resx
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,120 @@
<?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>
</root>
WinFrmUI/Yw.WinFrmUI.Core/09-common/01-flags/SetFlagsEditCtrl.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,62 @@
namespace Yw.WinFrmUI
{
    partial class SetFlagsEditCtrl
    {
        /// <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()
        {
            popupContainerEdit1 = new PopupContainerEdit();
            ((ISupportInitialize)popupContainerEdit1.Properties).BeginInit();
            SuspendLayout();
            //
            // popupContainerEdit1
            //
            popupContainerEdit1.Dock = DockStyle.Fill;
            popupContainerEdit1.Location = new Point(0, 0);
            popupContainerEdit1.Name = "popupContainerEdit1";
            popupContainerEdit1.Properties.AutoHeight = false;
            popupContainerEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
            popupContainerEdit1.Properties.ShowPopupCloseButton = false;
            popupContainerEdit1.Properties.ShowPopupShadow = false;
            popupContainerEdit1.Size = new Size(299, 27);
            popupContainerEdit1.TabIndex = 0;
            //
            // SetFlagsEditCtrl
            //
            AutoScaleDimensions = new SizeF(7F, 14F);
            AutoScaleMode = AutoScaleMode.Font;
            Controls.Add(popupContainerEdit1);
            Name = "SetFlagsEditCtrl";
            Size = new Size(299, 27);
            ((ISupportInitialize)popupContainerEdit1.Properties).EndInit();
            ResumeLayout(false);
        }
        #endregion
        private PopupContainerEdit popupContainerEdit1;
    }
}
WinFrmUI/Yw.WinFrmUI.Core/09-common/01-flags/SetFlagsEditCtrl.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,57 @@
namespace Yw.WinFrmUI
{
    /// <summary>
    ///
    /// </summary>
    public partial class SetFlagsEditCtrl : DevExpress.XtraEditors.XtraUserControl
    {
        /// <summary>
        ///
        /// </summary>
        public SetFlagsEditCtrl()
        {
            InitializeComponent();
        }
        private SetFlagsContainerCtrl _container = null;//容器
        private List<string> _selectedFlagList = null;
        /// <summary>
        /// ç»‘定数据
        /// </summary>
        public void SetBindingData(List<string> allFlagList, List<string> selectedFlagList)
        {
            if (_container == null)
            {
                _container = new SetFlagsContainerCtrl();
                _container.Dock = DockStyle.Fill;
                var container = new PopupContainerControl();
                container.Controls.Add(_container);
                this.popupContainerEdit1.Properties.PopupControl = container;
                _container.OkEvent += (flagList) =>
                {
                    _selectedFlagList = flagList;
                    this.popupContainerEdit1.Text = Yw.Untity.FlagsHelper.ToString(flagList);
                    this.popupContainerEdit1.ClosePopup();
                };
                _container.CancelEvent += () =>
                {
                    this.popupContainerEdit1.ClosePopup();
                };
            }
            _container.SetBindingData(allFlagList, selectedFlagList);
            _selectedFlagList = selectedFlagList;
            this.popupContainerEdit1.Text = Yw.Untity.FlagsHelper.ToString(selectedFlagList);
        }
        /// <summary>
        /// é€‰æ‹©æ ‡ç­¾åˆ—表
        /// </summary>
        public List<string> SelectedFlagList
        {
            get { return _selectedFlagList; }
        }
    }
}
WinFrmUI/Yw.WinFrmUI.Core/09-common/01-flags/SetFlagsEditCtrl.resx
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,120 @@
<?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>
</root>
WinFrmUI/Yw.WinFrmUI.Core/09-common/StringListCheckedListBoxCtrl.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
namespace Yw.WinFrmUI
{
    partial class StringListCheckedListBoxCtrl
    {
        /// <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()
        {
            ckListBox = new CheckedListBoxControl();
            ((ISupportInitialize)ckListBox).BeginInit();
            SuspendLayout();
            //
            // ckListBox
            //
            ckListBox.Dock = DockStyle.Fill;
            ckListBox.Location = new Point(0, 0);
            ckListBox.MultiColumn = true;
            ckListBox.Name = "ckListBox";
            ckListBox.SelectionMode = SelectionMode.None;
            ckListBox.ShowFocusRect = false;
            ckListBox.Size = new Size(403, 253);
            ckListBox.TabIndex = 0;
            //
            // StringListCheckedListBoxCtrl
            //
            AutoScaleDimensions = new SizeF(7F, 14F);
            AutoScaleMode = AutoScaleMode.Font;
            Controls.Add(ckListBox);
            Name = "StringListCheckedListBoxCtrl";
            Size = new Size(403, 253);
            ((ISupportInitialize)ckListBox).EndInit();
            ResumeLayout(false);
        }
        #endregion
        private CheckedListBoxControl ckListBox;
    }
}
WinFrmUI/Yw.WinFrmUI.Core/09-common/StringListCheckedListBoxCtrl.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,92 @@
using DevExpress.Xpo.Helpers;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Controls;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Yw.WinFrmUI
{
    /// <summary>
    ///
    /// </summary>
    public partial class StringListCheckedListBoxCtrl : DevExpress.XtraEditors.XtraUserControl
    {
        /// <summary>
        ///
        /// </summary>
        public StringListCheckedListBoxCtrl()
        {
            InitializeComponent();
        }
        /// <summary>
        /// åˆå§‹åŒ–
        /// </summary>
        public void Initial(List<string> strList)
        {
            this.ckListBox.BeginUpdate();
            this.ckListBox.Items.Clear();
            strList?.ForEach(x => CreateItem(x));
            this.ckListBox.EndUpdate();
        }
        /// <summary>
        /// é€‰æ‹©
        /// </summary>
        public void Select(List<string> strList)
        {
            foreach (CheckedListBoxItem item in this.ckListBox.Items)
            {
                if (strList != null && strList.Count > 0)
                {
                    if (strList.Contains(item.Value.ToString()))
                    {
                        item.CheckState = CheckState.Checked;
                    }
                    else
                    {
                        item.CheckState = CheckState.Unchecked;
                    }
                }
            }
        }
        /// <summary>
        /// èŽ·å–
        /// </summary>
        public List<string> Get()
        {
            var list = new List<string>();
            foreach (CheckedListBoxItem item in this.ckListBox.Items)
            {
                if (item.CheckState == CheckState.Checked)
                {
                    var str = item.Value.ToString();
                    list.Add(str);
                }
            }
            return list;
        }
        //创建项
        private void CreateItem(string str)
        {
            var item = new CheckedListBoxItem();
            item.Description = str;
            item.Value = str;
            item.Tag = str;
            item.CheckState = CheckState.Unchecked;
            this.ckListBox.Items.Add(item);
        }
    }
}
WinFrmUI/Yw.WinFrmUI.Core/09-common/StringListCheckedListBoxCtrl.resx
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,120 @@
<?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>
</root>
WinFrmUI/Yw.WinFrmUI.Core/Yw.WinFrmUI.Core.csproj
@@ -29,6 +29,7 @@
  <ItemGroup>
    <PackageReference Include="DevExpress.Win.Design" Version="23.2.4" />
    <PackageReference Include="Yw.Untity.Core" Version="3.0.0" />
  </ItemGroup>
  <ItemGroup>
WinFrmUI/Yw.WinFrmUI.Core/Yw.WinFrmUI.Core.csproj.user
@@ -7,5 +7,14 @@
    <Compile Update="06-document\DocumentPage.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="09-common\01-flags\SetFlagsContainerCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="09-common\StringListCheckedListBoxCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="09-common\01-flags\SetFlagsEditCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
  </ItemGroup>
</Project>