duheng
2024-08-13 151618c7e9ab27e8349851d302daff0e20cb130a
添加项目管理增删改
已修改8个文件
已添加3个文件
830 ■■■■ 文件已修改
WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/01-pump-main/XhsPumpMainPhartPanel.Designer.cs 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/01-pump-main/XhsPumpMainPhartPanel.resx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/03-mgr/XhsProjectMgrPage.Designer.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/03-mgr/XhsProjectMgrPage.cs 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/03-mgr/XhsProjectMgrViewModel.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/04-dlg/AddProjectDlg.Designer.cs 169 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/04-dlg/AddProjectDlg.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/04-dlg/EditProjectDlg.Designer.cs 277 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/04-dlg/EditProjectDlg.cs 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/04-dlg/EditProjectDlg.resx 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/01-pump-main/XhsPumpMainPhartPanel.Designer.cs
@@ -77,9 +77,10 @@
            xtrPerform2dChart1.DefinePointVisible = false;
            xtrPerform2dChart1.Dock = DockStyle.Fill;
            xtrPerform2dChart1.LineVisible = false;
            xtrPerform2dChart1.Location = new Point(235, 148);
            xtrPerform2dChart1.Location = new Point(164, 101);
            xtrPerform2dChart1.Margin = new Padding(1, 1, 1, 1);
            xtrPerform2dChart1.Name = "xtrPerform2dChart1";
            xtrPerform2dChart1.Size = new Size(553, 656);
            xtrPerform2dChart1.Size = new Size(388, 411);
            xtrPerform2dChart1.TabIndex = 1;
            // 
            // sidePanel2
@@ -87,8 +88,9 @@
            sidePanel2.Controls.Add(xhsPumpMainPhartListCtrl1);
            sidePanel2.Dock = DockStyle.Fill;
            sidePanel2.Location = new Point(0, 0);
            sidePanel2.Margin = new Padding(2, 2, 2, 2);
            sidePanel2.Name = "sidePanel2";
            sidePanel2.Size = new Size(234, 622);
            sidePanel2.Size = new Size(163, 388);
            sidePanel2.TabIndex = 4;
            sidePanel2.Text = "sidePanel2";
            // 
@@ -98,18 +100,18 @@
            xhsPumpMainPhartListCtrl1.Appearance.Options.UseBackColor = true;
            xhsPumpMainPhartListCtrl1.Dock = DockStyle.Fill;
            xhsPumpMainPhartListCtrl1.Location = new Point(0, 0);
            xhsPumpMainPhartListCtrl1.Margin = new Padding(4, 5, 4, 5);
            xhsPumpMainPhartListCtrl1.Name = "xhsPumpMainPhartListCtrl1";
            xhsPumpMainPhartListCtrl1.Size = new Size(234, 622);
            xhsPumpMainPhartListCtrl1.Size = new Size(163, 388);
            xhsPumpMainPhartListCtrl1.TabIndex = 0;
            // 
            // sidePanel1
            // 
            sidePanel1.Controls.Add(tabPane1);
            sidePanel1.Dock = DockStyle.Right;
            sidePanel1.Location = new Point(788, 148);
            sidePanel1.Location = new Point(552, 101);
            sidePanel1.Margin = new Padding(2, 2, 2, 2);
            sidePanel1.Name = "sidePanel1";
            sidePanel1.Size = new Size(272, 656);
            sidePanel1.Size = new Size(190, 411);
            sidePanel1.TabIndex = 3;
            sidePanel1.Text = "sidePanel1";
            // 
@@ -118,12 +120,13 @@
            tabPane1.Controls.Add(tabNavigationPage1);
            tabPane1.Controls.Add(tabNavigationPage2);
            tabPane1.Dock = DockStyle.Top;
            tabPane1.Location = new Point(0, 0);
            tabPane1.Location = new Point(1, 0);
            tabPane1.Margin = new Padding(2, 2, 2, 2);
            tabPane1.Name = "tabPane1";
            tabPane1.Pages.AddRange(new DevExpress.XtraBars.Navigation.NavigationPageBase[] { tabNavigationPage1, tabNavigationPage2 });
            tabPane1.RegularSize = new Size(272, 656);
            tabPane1.RegularSize = new Size(189, 417);
            tabPane1.SelectedPage = tabNavigationPage1;
            tabPane1.Size = new Size(272, 656);
            tabPane1.Size = new Size(189, 417);
            tabPane1.TabIndex = 0;
            tabPane1.Text = "tabPane1";
            // 
@@ -131,15 +134,17 @@
            // 
            tabNavigationPage1.Caption = "运行参数";
            tabNavigationPage1.Controls.Add(simpleButton2);
            tabNavigationPage1.Margin = new Padding(2, 2, 2, 2);
            tabNavigationPage1.Name = "tabNavigationPage1";
            tabNavigationPage1.Size = new Size(272, 607);
            tabNavigationPage1.Size = new Size(189, 384);
            // 
            // simpleButton2
            // 
            simpleButton2.Dock = DockStyle.Fill;
            simpleButton2.Location = new Point(0, 0);
            simpleButton2.Margin = new Padding(2, 2, 2, 2);
            simpleButton2.Name = "simpleButton2";
            simpleButton2.Size = new Size(272, 607);
            simpleButton2.Size = new Size(189, 384);
            simpleButton2.TabIndex = 0;
            simpleButton2.Text = "待补充";
            // 
@@ -147,35 +152,34 @@
            // 
            tabNavigationPage2.Caption = "属性";
            tabNavigationPage2.Controls.Add(simpleButton3);
            tabNavigationPage2.Margin = new Padding(2, 2, 2, 2);
            tabNavigationPage2.Name = "tabNavigationPage2";
            tabNavigationPage2.Size = new Size(271, 607);
            tabNavigationPage2.Size = new Size(190, 386);
            // 
            // simpleButton3
            // 
            simpleButton3.Dock = DockStyle.Fill;
            simpleButton3.Location = new Point(0, 0);
            simpleButton3.Margin = new Padding(2, 2, 2, 2);
            simpleButton3.Name = "simpleButton3";
            simpleButton3.Size = new Size(271, 607);
            simpleButton3.Size = new Size(190, 386);
            simpleButton3.TabIndex = 0;
            simpleButton3.Text = "待补充";
            // 
            // ribbonControl1
            // 
            ribbonControl1.EmptyAreaImageOptions.ImagePadding = new Padding(43, 47, 43, 47);
            ribbonControl1.ExpandCollapseItem.Id = 0;
            ribbonControl1.ItemPanelStyle = DevExpress.XtraBars.Ribbon.RibbonItemPanelStyle.Classic;
            ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, BtnAdd, BtnEdit, BtnDelete, barBtnEditPumpCurve, BarBtnEidtPumpPart, barCheckItem1, barBtnImportByExcel, barBtnImportByPicture, barButtonItem3, barButtonItem4, barBtnDelete, barBtnAddText, barBtnUpdateimportance, barBtnOtherName });
            ribbonControl1.Location = new Point(0, 0);
            ribbonControl1.Margin = new Padding(4, 5, 4, 5);
            ribbonControl1.MaxItemId = 31;
            ribbonControl1.Name = "ribbonControl1";
            ribbonControl1.OptionsMenuMinWidth = 471;
            ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage1 });
            ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False;
            ribbonControl1.ShowExpandCollapseButton = DevExpress.Utils.DefaultBoolean.False;
            ribbonControl1.ShowPageHeadersInFormCaption = DevExpress.Utils.DefaultBoolean.False;
            ribbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide;
            ribbonControl1.Size = new Size(1060, 148);
            ribbonControl1.Size = new Size(742, 101);
            ribbonControl1.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Hidden;
            // 
            // BtnAdd
@@ -310,33 +314,35 @@
            dockPanel1.Controls.Add(dockPanel1_Container);
            dockPanel1.Dock = DevExpress.XtraBars.Docking.DockingStyle.Left;
            dockPanel1.ID = new Guid("202c2203-fb3a-4b47-a9cb-083c698bd2ac");
            dockPanel1.Location = new Point(0, 148);
            dockPanel1.Location = new Point(0, 101);
            dockPanel1.Margin = new Padding(2, 2, 2, 2);
            dockPanel1.Name = "dockPanel1";
            dockPanel1.OriginalSize = new Size(235, 200);
            dockPanel1.Size = new Size(235, 656);
            dockPanel1.Size = new Size(164, 411);
            dockPanel1.Text = "曲线列表";
            // 
            // dockPanel1_Container
            // 
            dockPanel1_Container.Controls.Add(sidePanel2);
            dockPanel1_Container.Location = new Point(0, 34);
            dockPanel1_Container.Location = new Point(0, 23);
            dockPanel1_Container.Margin = new Padding(2, 2, 2, 2);
            dockPanel1_Container.Name = "dockPanel1_Container";
            dockPanel1_Container.Size = new Size(234, 622);
            dockPanel1_Container.Size = new Size(163, 388);
            dockPanel1_Container.TabIndex = 0;
            // 
            // XhsPumpMainPhartPanel
            // 
            Appearance.BackColor = SystemColors.Control;
            Appearance.Options.UseBackColor = true;
            AutoScaleDimensions = new SizeF(10F, 22F);
            AutoScaleDimensions = new SizeF(7F, 14F);
            AutoScaleMode = AutoScaleMode.Font;
            Controls.Add(xtrPerform2dChart1);
            Controls.Add(sidePanel1);
            Controls.Add(dockPanel1);
            Controls.Add(ribbonControl1);
            Margin = new Padding(6, 8, 6, 8);
            Margin = new Padding(4, 5, 4, 5);
            Name = "XhsPumpMainPhartPanel";
            Size = new Size(1060, 804);
            Size = new Size(742, 512);
            sidePanel2.ResumeLayout(false);
            sidePanel1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)tabPane1).EndInit();
WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/01-pump-main/XhsPumpMainPhartPanel.resx
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
  <!--
    Microsoft ResX Schema
    Microsoft ResX Schema
    Version 2.0
@@ -48,7 +48,7 @@
    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
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/03-mgr/XhsProjectMgrPage.Designer.cs
@@ -75,16 +75,18 @@
            // ribbonControl1
            // 
            ribbonControl1.ExpandCollapseItem.Id = 0;
            ribbonControl1.ItemPanelStyle = DevExpress.XtraBars.Ribbon.RibbonItemPanelStyle.Classic;
            ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, barBtnAdd, barBtnEdit, barBtnDelete, barBtnInfo, barBtnViewHydro, barBtnViewBimface, barBtnPublish, barBtnDeprecated, barCkTreeLine, barBtnExpandAll, barBtnCollpseAll, barBtnSearch, barBtnRefresh });
            ribbonControl1.Location = new Point(1, 1);
            ribbonControl1.Location = new Point(0, 0);
            ribbonControl1.MaxItemId = 14;
            ribbonControl1.Name = "ribbonControl1";
            ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage1 });
            ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False;
            ribbonControl1.ShowExpandCollapseButton = DevExpress.Utils.DefaultBoolean.False;
            ribbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.ShowOnMultiplePages;
            ribbonControl1.ShowPageHeadersInFormCaption = DevExpress.Utils.DefaultBoolean.False;
            ribbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide;
            ribbonControl1.ShowToolbarCustomizeItem = false;
            ribbonControl1.Size = new Size(996, 101);
            ribbonControl1.Size = new Size(998, 101);
            ribbonControl1.Toolbar.ShowCustomizeItem = false;
            ribbonControl1.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Hidden;
            // 
@@ -241,7 +243,7 @@
            treeList1.Location = new Point(0, 1);
            treeList1.MenuManager = ribbonControl1;
            treeList1.Name = "treeList1";
            treeList1.Size = new Size(996, 566);
            treeList1.Size = new Size(998, 568);
            treeList1.TabIndex = 1;
            // 
            // colNO
@@ -323,10 +325,10 @@
            panelControl1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
            panelControl1.Controls.Add(treeList1);
            panelControl1.Dock = DockStyle.Fill;
            panelControl1.Location = new Point(1, 102);
            panelControl1.Location = new Point(0, 101);
            panelControl1.Name = "panelControl1";
            panelControl1.Padding = new Padding(0, 1, 0, 0);
            panelControl1.Size = new Size(996, 567);
            panelControl1.Size = new Size(998, 569);
            panelControl1.TabIndex = 3;
            // 
            // svgImg32
@@ -343,7 +345,6 @@
            Controls.Add(panelControl1);
            Controls.Add(ribbonControl1);
            Name = "XhsProjectMgrPage";
            Padding = new Padding(1);
            Size = new Size(998, 670);
            ((ISupportInitialize)ribbonControl1).EndInit();
            ((ISupportInitialize)treeList1).EndInit();
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/03-mgr/XhsProjectMgrPage.cs
@@ -16,7 +16,7 @@
        private List<XhsProjectMgrViewModel> _allProjectList = null;
        private BLL.XhsProject _Bll = null;
        private BLL.XhsProjectExtensions _bll = null;
        /// <summary>
        /// åˆå§‹åŒ–数据源
@@ -24,8 +24,8 @@
        public override async void InitialDataSource()
        {
            base.InitialDataSource();
            _Bll = new BLL.XhsProject();
            var allProjectList = await _Bll.GetAll();
            _bll = new BLL.XhsProjectExtensions();
            var allProjectList = await _bll.GetAll();
            _allProjectList = new List<XhsProjectMgrViewModel>();
            if (allProjectList != null && allProjectList.Count > 0)
            {
@@ -131,17 +131,65 @@
        private void barBtnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var dlg = new AddProjectDlg();
            dlg.ReloadDataEvent += async (rhs) =>
            {
                var bll = new BLL.XhsProjectExtensions();
                var id = await bll.Insert(rhs);
                if (id > 0)
                {
                    rhs.ID = id;
                    var vmo = await _bll.GetByID(id);
                    _allProjectList.Add(new XhsProjectMgrViewModel(vmo));
                    this.xhsProjectMgrViewModelBindingSource.ResetBindings(false);
                    return true;
                }
                return false;
            };
            dlg.ShowDialog();
        }
        //编辑
        private void barBtnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var currentVm = this.GetCurrentViewModel();
            var dlg = new EditProjectDlg();
            dlg.SetBindingData(currentVm.ID);
            dlg.ReloadDataEvent += async (rhs) =>
            {
                if (await _bll.Update(rhs))
                {
                    currentVm.Reset(rhs);
                    this.xhsProjectMgrViewModelBindingSource.ResetBindings(false);
                    return true;
                }
                return false;
            };
            dlg.ShowDialog();
        }
        //删除
        private void barBtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        private async void barBtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var currentVm = GetCurrentViewModel();
            if (currentVm == null)
            {
                MessageBoxHelper.ShowWarning("请选择数据行!");
                return;
            }
            if (MessageBoxHelper.IsClickOk($"确认删除数据行?", "提示"))
                return;
            var groupresult = await _bll.DeleteByID(currentVm.ID);
            if (groupresult)
            {
                _allProjectList.Remove(currentVm);
                this.xhsProjectMgrViewModelBindingSource.ResetBindings(false);
                MessageBoxHelper.ShowSuccess($"删除成功!");
            }
            else
            {
                MessageBoxHelper.ShowError($"删除失败!");
                return;
            }
        }
        #endregion åŸºç¡€æ“ä½œ
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/03-mgr/XhsProjectMgrViewModel.cs
@@ -1,23 +1,23 @@
using DevExpress.Pdf.Native;
using HStation.Service.Xhs;
namespace HStation.WinFrmUI
{
    /// <summary>
    ///
    ///
    /// </summary>
    public class XhsProjectMgrViewModel
    {
        /// <summary>
        ///
        ///
        /// </summary>
        public XhsProjectMgrViewModel() { }
        public XhsProjectMgrViewModel()
        { }
        /// <summary>
        ///
        ///
        /// </summary>
        public XhsProjectMgrViewModel(XhsProjectDto project)
        public XhsProjectMgrViewModel(Vmo.Xhs.XhsProjectExtensions project)
        {
            this.ID = project.ID;
            this.ParentID = project.ParentID;
@@ -32,11 +32,25 @@
        }
        /// <summary>
        ///
        ///
        /// </summary>
        public XhsProjectMgrViewModel(XhsProjectDto project, bool hasLocation) : this(project)
        public XhsProjectMgrViewModel(Vmo.Xhs.XhsProjectExtensions project, bool hasLocation) : this(project)
        {
            this.HasLocation = hasLocation;
        }
        public void Reset(Vmo.Xhs.XhsProjectExtensions project)
        {
            this.ID = project.ID;
            this.ParentID = project.ParentID;
            this.NO = project.NO;
            this.Name = project.Name;
            this.Address = project.Address;
            this.Customer = project.Customer;
            this.Flags = Yw.Untity.FlagsHelper.ToString(project.Flags);
            this.TagName = project.TagName;
            this.SortCode = project.SortCode;
            this.Description = project.Description;
        }
        /// <summary>
@@ -122,9 +136,5 @@
        /// </summary>
        [Display(Name = "定位")]
        public bool HasLocation { get; set; }
    }
}
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/04-dlg/AddProjectDlg.Designer.cs
@@ -29,38 +29,38 @@
        private void InitializeComponent()
        {
            layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
            Root = new DevExpress.XtraLayout.LayoutControlGroup();
            TextProjectName = new DevExpress.XtraEditors.TextEdit();
            layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
            TextAdress = new DevExpress.XtraEditors.TextEdit();
            layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
            TextCustomerName = new DevExpress.XtraEditors.TextEdit();
            layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
            TextTagName = new DevExpress.XtraEditors.TextEdit();
            layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
            BtnCancel = new DevExpress.XtraEditors.SimpleButton();
            layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
            BtnOk = new DevExpress.XtraEditors.SimpleButton();
            layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
            TextDescription = new DevExpress.XtraEditors.MemoEdit();
            Root = new DevExpress.XtraLayout.LayoutControlGroup();
            layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
            emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
            layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
            ((ISupportInitialize)layoutControl1).BeginInit();
            layoutControl1.SuspendLayout();
            ((ISupportInitialize)Root).BeginInit();
            ((ISupportInitialize)TextProjectName.Properties).BeginInit();
            ((ISupportInitialize)layoutControlItem1).BeginInit();
            ((ISupportInitialize)TextAdress.Properties).BeginInit();
            ((ISupportInitialize)layoutControlItem2).BeginInit();
            ((ISupportInitialize)TextCustomerName.Properties).BeginInit();
            ((ISupportInitialize)layoutControlItem3).BeginInit();
            ((ISupportInitialize)TextTagName.Properties).BeginInit();
            ((ISupportInitialize)TextDescription.Properties).BeginInit();
            ((ISupportInitialize)Root).BeginInit();
            ((ISupportInitialize)layoutControlItem1).BeginInit();
            ((ISupportInitialize)layoutControlItem2).BeginInit();
            ((ISupportInitialize)layoutControlItem3).BeginInit();
            ((ISupportInitialize)layoutControlItem4).BeginInit();
            ((ISupportInitialize)layoutControlItem6).BeginInit();
            ((ISupportInitialize)layoutControlItem7).BeginInit();
            ((ISupportInitialize)TextDescription.Properties).BeginInit();
            ((ISupportInitialize)layoutControlItem5).BeginInit();
            ((ISupportInitialize)emptySpaceItem1).BeginInit();
            ((ISupportInitialize)layoutControlItem7).BeginInit();
            SuspendLayout();
            // 
            // layoutControl1
@@ -81,17 +81,6 @@
            layoutControl1.TabIndex = 0;
            layoutControl1.Text = "layoutControl1";
            // 
            // Root
            //
            Root.AppearanceItemCaption.Options.UseTextOptions = true;
            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, layoutControlItem6, layoutControlItem5, emptySpaceItem1, layoutControlItem7 });
            Root.Name = "Root";
            Root.Size = new Size(641, 417);
            Root.TextVisible = false;
            //
            // TextProjectName
            // 
            TextProjectName.Location = new Point(76, 12);
@@ -99,15 +88,6 @@
            TextProjectName.Size = new Size(553, 20);
            TextProjectName.StyleController = layoutControl1;
            TextProjectName.TabIndex = 0;
            //
            // layoutControlItem1
            //
            layoutControlItem1.Control = TextProjectName;
            layoutControlItem1.Location = new Point(0, 0);
            layoutControlItem1.Name = "layoutControlItem1";
            layoutControlItem1.Size = new Size(621, 24);
            layoutControlItem1.Text = "项目名称:";
            layoutControlItem1.TextSize = new Size(52, 14);
            // 
            // TextAdress
            // 
@@ -117,15 +97,6 @@
            TextAdress.StyleController = layoutControl1;
            TextAdress.TabIndex = 2;
            // 
            // layoutControlItem2
            //
            layoutControlItem2.Control = TextAdress;
            layoutControlItem2.Location = new Point(0, 24);
            layoutControlItem2.Name = "layoutControlItem2";
            layoutControlItem2.Size = new Size(621, 24);
            layoutControlItem2.Text = "详细地址:";
            layoutControlItem2.TextSize = new Size(52, 14);
            //
            // TextCustomerName
            // 
            TextCustomerName.Location = new Point(76, 60);
@@ -134,15 +105,6 @@
            TextCustomerName.StyleController = layoutControl1;
            TextCustomerName.TabIndex = 3;
            // 
            // layoutControlItem3
            //
            layoutControlItem3.Control = TextCustomerName;
            layoutControlItem3.Location = new Point(0, 48);
            layoutControlItem3.Name = "layoutControlItem3";
            layoutControlItem3.Size = new Size(621, 24);
            layoutControlItem3.Text = "客户名称:";
            layoutControlItem3.TextSize = new Size(52, 14);
            //
            // TextTagName
            // 
            TextTagName.Location = new Point(76, 84);
@@ -150,15 +112,6 @@
            TextTagName.Size = new Size(553, 20);
            TextTagName.StyleController = layoutControl1;
            TextTagName.TabIndex = 4;
            //
            // layoutControlItem4
            //
            layoutControlItem4.Control = TextTagName;
            layoutControlItem4.Location = new Point(0, 72);
            layoutControlItem4.Name = "layoutControlItem4";
            layoutControlItem4.Size = new Size(621, 24);
            layoutControlItem4.Text = "标签:";
            layoutControlItem4.TextSize = new Size(52, 14);
            // 
            // BtnCancel
            // 
@@ -170,15 +123,6 @@
            BtnCancel.StyleController = layoutControl1;
            BtnCancel.TabIndex = 7;
            BtnCancel.Text = "取消";
            //
            // layoutControlItem6
            //
            layoutControlItem6.Control = BtnCancel;
            layoutControlItem6.Location = new Point(532, 371);
            layoutControlItem6.Name = "layoutControlItem6";
            layoutControlItem6.Size = new Size(89, 26);
            layoutControlItem6.TextSize = new Size(0, 0);
            layoutControlItem6.TextVisible = false;
            // 
            // BtnOk
            // 
@@ -192,15 +136,6 @@
            BtnOk.Text = "确定";
            BtnOk.Click += BtnOk_Click;
            // 
            // layoutControlItem7
            //
            layoutControlItem7.Control = BtnOk;
            layoutControlItem7.Location = new Point(443, 371);
            layoutControlItem7.Name = "layoutControlItem7";
            layoutControlItem7.Size = new Size(89, 26);
            layoutControlItem7.TextSize = new Size(0, 0);
            layoutControlItem7.TextVisible = false;
            //
            // TextDescription
            // 
            TextDescription.Location = new Point(76, 108);
@@ -208,6 +143,62 @@
            TextDescription.Size = new Size(553, 271);
            TextDescription.StyleController = layoutControl1;
            TextDescription.TabIndex = 5;
            //
            // Root
            //
            Root.AppearanceItemCaption.Options.UseTextOptions = true;
            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, layoutControlItem6, layoutControlItem5, emptySpaceItem1, layoutControlItem7 });
            Root.Name = "Root";
            Root.Size = new Size(641, 417);
            Root.TextVisible = false;
            //
            // layoutControlItem1
            //
            layoutControlItem1.Control = TextProjectName;
            layoutControlItem1.Location = new Point(0, 0);
            layoutControlItem1.Name = "layoutControlItem1";
            layoutControlItem1.Size = new Size(621, 24);
            layoutControlItem1.Text = "项目名称:";
            layoutControlItem1.TextSize = new Size(52, 14);
            //
            // layoutControlItem2
            //
            layoutControlItem2.Control = TextAdress;
            layoutControlItem2.Location = new Point(0, 24);
            layoutControlItem2.Name = "layoutControlItem2";
            layoutControlItem2.Size = new Size(621, 24);
            layoutControlItem2.Text = "详细地址:";
            layoutControlItem2.TextSize = new Size(52, 14);
            //
            // layoutControlItem3
            //
            layoutControlItem3.Control = TextCustomerName;
            layoutControlItem3.Location = new Point(0, 48);
            layoutControlItem3.Name = "layoutControlItem3";
            layoutControlItem3.Size = new Size(621, 24);
            layoutControlItem3.Text = "客户名称:";
            layoutControlItem3.TextSize = new Size(52, 14);
            //
            // layoutControlItem4
            //
            layoutControlItem4.Control = TextTagName;
            layoutControlItem4.Location = new Point(0, 72);
            layoutControlItem4.Name = "layoutControlItem4";
            layoutControlItem4.Size = new Size(621, 24);
            layoutControlItem4.Text = "标签:";
            layoutControlItem4.TextSize = new Size(52, 14);
            //
            // layoutControlItem6
            //
            layoutControlItem6.Control = BtnCancel;
            layoutControlItem6.Location = new Point(532, 371);
            layoutControlItem6.Name = "layoutControlItem6";
            layoutControlItem6.Size = new Size(89, 26);
            layoutControlItem6.TextSize = new Size(0, 0);
            layoutControlItem6.TextVisible = false;
            // 
            // layoutControlItem5
            // 
@@ -226,6 +217,15 @@
            emptySpaceItem1.Size = new Size(443, 26);
            emptySpaceItem1.TextSize = new Size(0, 0);
            // 
            // layoutControlItem7
            //
            layoutControlItem7.Control = BtnOk;
            layoutControlItem7.Location = new Point(443, 371);
            layoutControlItem7.Name = "layoutControlItem7";
            layoutControlItem7.Size = new Size(89, 26);
            layoutControlItem7.TextSize = new Size(0, 0);
            layoutControlItem7.TextVisible = false;
            //
            // AddProjectDlg
            // 
            AutoScaleDimensions = new SizeF(7F, 14F);
@@ -233,23 +233,24 @@
            ClientSize = new Size(641, 417);
            Controls.Add(layoutControl1);
            Name = "AddProjectDlg";
            StartPosition = FormStartPosition.CenterScreen;
            Text = "添加项目";
            ((ISupportInitialize)layoutControl1).EndInit();
            layoutControl1.ResumeLayout(false);
            ((ISupportInitialize)Root).EndInit();
            ((ISupportInitialize)TextProjectName.Properties).EndInit();
            ((ISupportInitialize)layoutControlItem1).EndInit();
            ((ISupportInitialize)TextAdress.Properties).EndInit();
            ((ISupportInitialize)layoutControlItem2).EndInit();
            ((ISupportInitialize)TextCustomerName.Properties).EndInit();
            ((ISupportInitialize)layoutControlItem3).EndInit();
            ((ISupportInitialize)TextTagName.Properties).EndInit();
            ((ISupportInitialize)TextDescription.Properties).EndInit();
            ((ISupportInitialize)Root).EndInit();
            ((ISupportInitialize)layoutControlItem1).EndInit();
            ((ISupportInitialize)layoutControlItem2).EndInit();
            ((ISupportInitialize)layoutControlItem3).EndInit();
            ((ISupportInitialize)layoutControlItem4).EndInit();
            ((ISupportInitialize)layoutControlItem6).EndInit();
            ((ISupportInitialize)layoutControlItem7).EndInit();
            ((ISupportInitialize)TextDescription.Properties).EndInit();
            ((ISupportInitialize)layoutControlItem5).EndInit();
            ((ISupportInitialize)emptySpaceItem1).EndInit();
            ((ISupportInitialize)layoutControlItem7).EndInit();
            ResumeLayout(false);
        }
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/04-dlg/AddProjectDlg.cs
@@ -7,12 +7,12 @@
            InitializeComponent();
        }
        public event Func<Vmo.Xhs.XhsProjectExtensions, bool> ReloadEvent;
        public event Func<Vmo.Xhs.XhsProjectExtensions, Task<bool>> ReloadDataEvent;
        //数据验证
        private bool Valid()
        {
            return false;
            return true;
        }
        //确定
@@ -20,8 +20,30 @@
        {
            if (!Valid())
                return;
            var bll = new BLL.XhsProjectExtensions();
            var model = new Vmo.Xhs.XhsProjectExtensions();
            model.Address = this.TextAdress.Text.Trim();
            model.Customer = this.TextCustomerName.Text.Trim();
            model.Description = this.TextDescription.Text.Trim();
            model.Name = this.TextProjectName.Text.Trim();
            model.TagName = this.TextTagName.Text.Trim();
            model.SiteList = new List<Vmo.Xhs.XhsProjectSite>
            {
                new Vmo.Xhs.XhsProjectSite
                {
                    Name=this.TextProjectName.Text,
                    Description=this.TextDescription.Text,
                }
            };
            if (await this.ReloadDataEvent.Invoke(model))
            {
                MessageBoxHelper.ShowSuccess("添加成功!");
            }
            else
            {
                MessageBoxHelper.ShowError("添加失败!");
            }
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/04-dlg/EditProjectDlg.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,277 @@
namespace HStation.WinFrmUI.Xhs
{
    partial class EditProjectDlg
    {
        /// <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 Windows Form 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 DevExpress.XtraLayout.LayoutControl();
            TextProjectName = new DevExpress.XtraEditors.TextEdit();
            TextAdress = new DevExpress.XtraEditors.TextEdit();
            TextCustomerName = new DevExpress.XtraEditors.TextEdit();
            TextTagName = new DevExpress.XtraEditors.TextEdit();
            BtnCancel = new DevExpress.XtraEditors.SimpleButton();
            BtnOk = new DevExpress.XtraEditors.SimpleButton();
            TextDescription = new DevExpress.XtraEditors.MemoEdit();
            Root = new DevExpress.XtraLayout.LayoutControlGroup();
            layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
            emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
            layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
            ((ISupportInitialize)layoutControl1).BeginInit();
            layoutControl1.SuspendLayout();
            ((ISupportInitialize)TextProjectName.Properties).BeginInit();
            ((ISupportInitialize)TextAdress.Properties).BeginInit();
            ((ISupportInitialize)TextCustomerName.Properties).BeginInit();
            ((ISupportInitialize)TextTagName.Properties).BeginInit();
            ((ISupportInitialize)TextDescription.Properties).BeginInit();
            ((ISupportInitialize)Root).BeginInit();
            ((ISupportInitialize)layoutControlItem1).BeginInit();
            ((ISupportInitialize)layoutControlItem2).BeginInit();
            ((ISupportInitialize)layoutControlItem3).BeginInit();
            ((ISupportInitialize)layoutControlItem4).BeginInit();
            ((ISupportInitialize)layoutControlItem6).BeginInit();
            ((ISupportInitialize)layoutControlItem5).BeginInit();
            ((ISupportInitialize)emptySpaceItem1).BeginInit();
            ((ISupportInitialize)layoutControlItem7).BeginInit();
            SuspendLayout();
            //
            // layoutControl1
            //
            layoutControl1.Controls.Add(TextProjectName);
            layoutControl1.Controls.Add(TextAdress);
            layoutControl1.Controls.Add(TextCustomerName);
            layoutControl1.Controls.Add(TextTagName);
            layoutControl1.Controls.Add(BtnCancel);
            layoutControl1.Controls.Add(BtnOk);
            layoutControl1.Controls.Add(TextDescription);
            layoutControl1.Dock = DockStyle.Fill;
            layoutControl1.Location = new Point(0, 0);
            layoutControl1.Name = "layoutControl1";
            layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(982, 129, 650, 400);
            layoutControl1.Root = Root;
            layoutControl1.Size = new Size(641, 417);
            layoutControl1.TabIndex = 0;
            layoutControl1.Text = "layoutControl1";
            //
            // TextProjectName
            //
            TextProjectName.Location = new Point(76, 12);
            TextProjectName.Name = "TextProjectName";
            TextProjectName.Size = new Size(553, 20);
            TextProjectName.StyleController = layoutControl1;
            TextProjectName.TabIndex = 0;
            //
            // TextAdress
            //
            TextAdress.Location = new Point(76, 36);
            TextAdress.Name = "TextAdress";
            TextAdress.Size = new Size(553, 20);
            TextAdress.StyleController = layoutControl1;
            TextAdress.TabIndex = 2;
            //
            // TextCustomerName
            //
            TextCustomerName.Location = new Point(76, 60);
            TextCustomerName.Name = "TextCustomerName";
            TextCustomerName.Size = new Size(553, 20);
            TextCustomerName.StyleController = layoutControl1;
            TextCustomerName.TabIndex = 3;
            //
            // TextTagName
            //
            TextTagName.Location = new Point(76, 84);
            TextTagName.Name = "TextTagName";
            TextTagName.Size = new Size(553, 20);
            TextTagName.StyleController = layoutControl1;
            TextTagName.TabIndex = 4;
            //
            // BtnCancel
            //
            BtnCancel.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning;
            BtnCancel.Appearance.Options.UseBackColor = true;
            BtnCancel.Location = new Point(544, 383);
            BtnCancel.Name = "BtnCancel";
            BtnCancel.Size = new Size(85, 22);
            BtnCancel.StyleController = layoutControl1;
            BtnCancel.TabIndex = 7;
            BtnCancel.Text = "取消";
            //
            // BtnOk
            //
            BtnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary;
            BtnOk.Appearance.Options.UseBackColor = true;
            BtnOk.Location = new Point(455, 383);
            BtnOk.Name = "BtnOk";
            BtnOk.Size = new Size(85, 22);
            BtnOk.StyleController = layoutControl1;
            BtnOk.TabIndex = 6;
            BtnOk.Text = "确定";
            BtnOk.Click += BtnOk_Click;
            //
            // TextDescription
            //
            TextDescription.Location = new Point(76, 108);
            TextDescription.Name = "TextDescription";
            TextDescription.Size = new Size(553, 271);
            TextDescription.StyleController = layoutControl1;
            TextDescription.TabIndex = 5;
            //
            // Root
            //
            Root.AppearanceItemCaption.Options.UseTextOptions = true;
            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, layoutControlItem6, layoutControlItem5, emptySpaceItem1, layoutControlItem7 });
            Root.Name = "Root";
            Root.Size = new Size(641, 417);
            Root.TextVisible = false;
            //
            // layoutControlItem1
            //
            layoutControlItem1.Control = TextProjectName;
            layoutControlItem1.Location = new Point(0, 0);
            layoutControlItem1.Name = "layoutControlItem1";
            layoutControlItem1.Size = new Size(621, 24);
            layoutControlItem1.Text = "项目名称:";
            layoutControlItem1.TextSize = new Size(52, 14);
            //
            // layoutControlItem2
            //
            layoutControlItem2.Control = TextAdress;
            layoutControlItem2.Location = new Point(0, 24);
            layoutControlItem2.Name = "layoutControlItem2";
            layoutControlItem2.Size = new Size(621, 24);
            layoutControlItem2.Text = "详细地址:";
            layoutControlItem2.TextSize = new Size(52, 14);
            //
            // layoutControlItem3
            //
            layoutControlItem3.Control = TextCustomerName;
            layoutControlItem3.Location = new Point(0, 48);
            layoutControlItem3.Name = "layoutControlItem3";
            layoutControlItem3.Size = new Size(621, 24);
            layoutControlItem3.Text = "客户名称:";
            layoutControlItem3.TextSize = new Size(52, 14);
            //
            // layoutControlItem4
            //
            layoutControlItem4.Control = TextTagName;
            layoutControlItem4.Location = new Point(0, 72);
            layoutControlItem4.Name = "layoutControlItem4";
            layoutControlItem4.Size = new Size(621, 24);
            layoutControlItem4.Text = "标签:";
            layoutControlItem4.TextSize = new Size(52, 14);
            //
            // layoutControlItem6
            //
            layoutControlItem6.Control = BtnCancel;
            layoutControlItem6.Location = new Point(532, 371);
            layoutControlItem6.Name = "layoutControlItem6";
            layoutControlItem6.Size = new Size(89, 26);
            layoutControlItem6.TextSize = new Size(0, 0);
            layoutControlItem6.TextVisible = false;
            //
            // layoutControlItem5
            //
            layoutControlItem5.Control = TextDescription;
            layoutControlItem5.Location = new Point(0, 96);
            layoutControlItem5.Name = "layoutControlItem5";
            layoutControlItem5.Size = new Size(621, 275);
            layoutControlItem5.Text = "说明:";
            layoutControlItem5.TextSize = new Size(52, 14);
            //
            // emptySpaceItem1
            //
            emptySpaceItem1.AllowHotTrack = false;
            emptySpaceItem1.Location = new Point(0, 371);
            emptySpaceItem1.Name = "emptySpaceItem1";
            emptySpaceItem1.Size = new Size(443, 26);
            emptySpaceItem1.TextSize = new Size(0, 0);
            //
            // layoutControlItem7
            //
            layoutControlItem7.Control = BtnOk;
            layoutControlItem7.Location = new Point(443, 371);
            layoutControlItem7.Name = "layoutControlItem7";
            layoutControlItem7.Size = new Size(89, 26);
            layoutControlItem7.TextSize = new Size(0, 0);
            layoutControlItem7.TextVisible = false;
            //
            // EditProjectDlg
            //
            AutoScaleDimensions = new SizeF(7F, 14F);
            AutoScaleMode = AutoScaleMode.Font;
            ClientSize = new Size(641, 417);
            Controls.Add(layoutControl1);
            Name = "EditProjectDlg";
            StartPosition = FormStartPosition.CenterScreen;
            Text = "修改项目";
            ((ISupportInitialize)layoutControl1).EndInit();
            layoutControl1.ResumeLayout(false);
            ((ISupportInitialize)TextProjectName.Properties).EndInit();
            ((ISupportInitialize)TextAdress.Properties).EndInit();
            ((ISupportInitialize)TextCustomerName.Properties).EndInit();
            ((ISupportInitialize)TextTagName.Properties).EndInit();
            ((ISupportInitialize)TextDescription.Properties).EndInit();
            ((ISupportInitialize)Root).EndInit();
            ((ISupportInitialize)layoutControlItem1).EndInit();
            ((ISupportInitialize)layoutControlItem2).EndInit();
            ((ISupportInitialize)layoutControlItem3).EndInit();
            ((ISupportInitialize)layoutControlItem4).EndInit();
            ((ISupportInitialize)layoutControlItem6).EndInit();
            ((ISupportInitialize)layoutControlItem5).EndInit();
            ((ISupportInitialize)emptySpaceItem1).EndInit();
            ((ISupportInitialize)layoutControlItem7).EndInit();
            ResumeLayout(false);
        }
        #endregion
        private DevExpress.XtraLayout.LayoutControl layoutControl1;
        private DevExpress.XtraEditors.TextEdit TextProjectName;
        private DevExpress.XtraEditors.TextEdit TextAdress;
        private DevExpress.XtraEditors.TextEdit TextCustomerName;
        private DevExpress.XtraEditors.TextEdit TextTagName;
        private DevExpress.XtraLayout.LayoutControlGroup Root;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
        private DevExpress.XtraEditors.SimpleButton BtnCancel;
        private DevExpress.XtraEditors.SimpleButton BtnOk;
        private DevExpress.XtraEditors.MemoEdit TextDescription;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/04-dlg/EditProjectDlg.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,66 @@
using HStation.BLL;
namespace HStation.WinFrmUI.Xhs
{
    public partial class EditProjectDlg : DevExpress.XtraEditors.XtraForm
    {
        public EditProjectDlg()
        {
            InitializeComponent();
        }
        public event Func<Vmo.Xhs.XhsProjectExtensions, Task<bool>> ReloadDataEvent;
        private Vmo.Xhs.XhsProjectExtensions _projectExtensions;
        public async void SetBindingData(long ID)
        {
            var bll = new XhsProjectExtensions();
            var select = await bll.GetByID(ID);
            if (select == null)
                return;
            _projectExtensions = select;
            this.TextAdress.Text = _projectExtensions.Address;
            this.TextCustomerName.Text = _projectExtensions.TagName;
            this.TextDescription.Text = _projectExtensions.Description;
            this.TextProjectName.Text = _projectExtensions.Name;
            this.TextTagName.Text = _projectExtensions.TagName;
        }
        //数据验证
        private bool Valid()
        {
            return true;
        }
        //确定
        private async void BtnOk_Click(object sender, EventArgs e)
        {
            if (!Valid())
                return;
            _projectExtensions.Address = this.TextAdress.Text.Trim();
            _projectExtensions.Customer = this.TextCustomerName.Text.Trim();
            _projectExtensions.Description = this.TextDescription.Text.Trim();
            _projectExtensions.Name = this.TextProjectName.Text.Trim();
            _projectExtensions.TagName = this.TextTagName.Text.Trim();
            _projectExtensions.SiteList = new List<Vmo.Xhs.XhsProjectSite>
            {
                new Vmo.Xhs.XhsProjectSite
                {
                    Name=this.TextProjectName.Text,
                    Description=this.TextDescription.Text,
                }
            };
            if (await this.ReloadDataEvent.Invoke(_projectExtensions))
            {
                MessageBoxHelper.ShowSuccess("修改成功!");
            }
            else
            {
                MessageBoxHelper.ShowError("修改失败!");
            }
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/04-dlg/EditProjectDlg.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/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj
@@ -69,6 +69,9 @@
    <Compile Update="02-project\01-import\00-core\ImportXhsProjectDlg - å¤åˆ¶.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Update="02-project\04-dlg\EditProjectDlg.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Update="03-scheme\XhsSchemeMultiMgrPage.cs">
      <SubType>UserControl</SubType>
    </Compile>