duheng
2024-12-13 b495fc0539ccf03310c05971dd6bcbd66524166e
冷却塔修改
已修改6个文件
已添加1个文件
已重命名2个文件
880 ■■■■■ 文件已修改
Service/HStation.Service.Assets.Core/05-service/06-PipeLine/02-PipeLineMain/AssetsPipeMain.cs 补丁 | 查看 | 原始文档 | blame | 历史
Service/HStation.Service.Assets.Core/05-service/06-PipeLine/02-PipeLineMain/AssetsPipeMain_Instance.cs 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/01-series/AddAssetsCoolingSeriesDlg.Designer.cs 259 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/01-series/AddAssetsCoolingSeriesDlg.cs 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/01-series/AddAssetsCoolingSeriesDlg.resx 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/01-series/EditAssetsCoolingSeriesDlg.Designer.cs 259 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/01-series/EditAssetsCoolingSeriesDlg.cs 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/01-series/EditAssetsCoolingSeriesDlg.resx 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/03-factor/EditAssetsCoolingFactorDlg.resx 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Service/HStation.Service.Assets.Core/05-service/06-PipeLine/02-PipeLineMain/AssetsPipeMain.cs
Service/HStation.Service.Assets.Core/05-service/06-PipeLine/02-PipeLineMain/AssetsPipeMain_Instance.cs
WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/01-series/AddAssetsCoolingSeriesDlg.Designer.cs
@@ -28,11 +28,264 @@
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Text = "AddAssetsCoolingFactorDlg";
            components = new Container();
            layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
            textEditParentList = new DevExpress.XtraEditors.TreeListLookUpEdit();
            treeListLookUpEdit1TreeList = new DevExpress.XtraTreeList.TreeList();
            treeListColumn1 = new DevExpress.XtraTreeList.Columns.TreeListColumn();
            BtnOk = new DevExpress.XtraEditors.SimpleButton();
            btnCancel = new DevExpress.XtraEditors.SimpleButton();
            TagNameTextEdit = new DevExpress.XtraEditors.TextEdit();
            NameTextEdit = new DevExpress.XtraEditors.TextEdit();
            DescriptionTextEdit = new DevExpress.XtraEditors.MemoEdit();
            Root = new DevExpress.XtraLayout.LayoutControlGroup();
            layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
            emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
            layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
            dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components);
            ((ISupportInitialize)layoutControl1).BeginInit();
            layoutControl1.SuspendLayout();
            ((ISupportInitialize)textEditParentList.Properties).BeginInit();
            ((ISupportInitialize)treeListLookUpEdit1TreeList).BeginInit();
            ((ISupportInitialize)TagNameTextEdit.Properties).BeginInit();
            ((ISupportInitialize)NameTextEdit.Properties).BeginInit();
            ((ISupportInitialize)DescriptionTextEdit.Properties).BeginInit();
            ((ISupportInitialize)Root).BeginInit();
            ((ISupportInitialize)layoutControlItem3).BeginInit();
            ((ISupportInitialize)layoutControlItem5).BeginInit();
            ((ISupportInitialize)layoutControlItem1).BeginInit();
            ((ISupportInitialize)layoutControlItem6).BeginInit();
            ((ISupportInitialize)emptySpaceItem1).BeginInit();
            ((ISupportInitialize)layoutControlItem4).BeginInit();
            ((ISupportInitialize)layoutControlItem2).BeginInit();
            ((ISupportInitialize)dxErrorProvider1).BeginInit();
            SuspendLayout();
            //
            // layoutControl1
            //
            layoutControl1.Controls.Add(textEditParentList);
            layoutControl1.Controls.Add(BtnOk);
            layoutControl1.Controls.Add(btnCancel);
            layoutControl1.Controls.Add(TagNameTextEdit);
            layoutControl1.Controls.Add(NameTextEdit);
            layoutControl1.Controls.Add(DescriptionTextEdit);
            layoutControl1.Dock = DockStyle.Fill;
            layoutControl1.Location = new Point(0, 0);
            layoutControl1.Name = "layoutControl1";
            layoutControl1.Root = Root;
            layoutControl1.Size = new Size(511, 275);
            layoutControl1.TabIndex = 0;
            layoutControl1.Text = "layoutControl1";
            //
            // textEditParentList
            //
            textEditParentList.Location = new Point(55, 56);
            textEditParentList.Name = "textEditParentList";
            textEditParentList.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
            textEditParentList.Properties.DisplayMember = "Name";
            textEditParentList.Properties.NullText = "";
            textEditParentList.Properties.TreeList = treeListLookUpEdit1TreeList;
            textEditParentList.Properties.ValueMember = "ID";
            textEditParentList.Size = new Size(448, 20);
            textEditParentList.StyleController = layoutControl1;
            textEditParentList.TabIndex = 11;
            //
            // treeListLookUpEdit1TreeList
            //
            treeListLookUpEdit1TreeList.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { treeListColumn1 });
            treeListLookUpEdit1TreeList.Location = new Point(7, 37);
            treeListLookUpEdit1TreeList.Name = "treeListLookUpEdit1TreeList";
            treeListLookUpEdit1TreeList.OptionsView.ShowIndentAsRowStyle = true;
            treeListLookUpEdit1TreeList.Size = new Size(400, 200);
            treeListLookUpEdit1TreeList.TabIndex = 0;
            treeListLookUpEdit1TreeList.ViewStyle = DevExpress.XtraTreeList.TreeListViewStyle.TreeView;
            //
            // treeListColumn1
            //
            treeListColumn1.Caption = "treeListColumn1";
            treeListColumn1.FieldName = "Name";
            treeListColumn1.Name = "treeListColumn1";
            treeListColumn1.Visible = true;
            treeListColumn1.VisibleIndex = 0;
            //
            // BtnOk
            //
            BtnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary;
            BtnOk.Appearance.Options.UseBackColor = true;
            BtnOk.Location = new Point(356, 245);
            BtnOk.Name = "BtnOk";
            BtnOk.Size = new Size(70, 22);
            BtnOk.StyleController = layoutControl1;
            BtnOk.TabIndex = 5;
            BtnOk.Text = "确定";
            BtnOk.Click += BtnOk_ClickAsync;
            //
            // btnCancel
            //
            btnCancel.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning;
            btnCancel.Appearance.Options.UseBackColor = true;
            btnCancel.DialogResult = DialogResult.Cancel;
            btnCancel.Location = new Point(430, 245);
            btnCancel.Name = "btnCancel";
            btnCancel.Size = new Size(73, 22);
            btnCancel.StyleController = layoutControl1;
            btnCancel.TabIndex = 6;
            btnCancel.Text = "取消";
            //
            // TagNameTextEdit
            //
            TagNameTextEdit.Location = new Point(55, 32);
            TagNameTextEdit.Name = "TagNameTextEdit";
            TagNameTextEdit.Size = new Size(448, 20);
            TagNameTextEdit.StyleController = layoutControl1;
            TagNameTextEdit.TabIndex = 3;
            //
            // NameTextEdit
            //
            NameTextEdit.Location = new Point(55, 8);
            NameTextEdit.Name = "NameTextEdit";
            NameTextEdit.Size = new Size(448, 20);
            NameTextEdit.StyleController = layoutControl1;
            NameTextEdit.TabIndex = 0;
            //
            // DescriptionTextEdit
            //
            DescriptionTextEdit.Location = new Point(55, 80);
            DescriptionTextEdit.Name = "DescriptionTextEdit";
            DescriptionTextEdit.Size = new Size(448, 161);
            DescriptionTextEdit.StyleController = layoutControl1;
            DescriptionTextEdit.TabIndex = 4;
            //
            // 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[] { layoutControlItem3, layoutControlItem5, layoutControlItem1, layoutControlItem6, emptySpaceItem1, layoutControlItem4, layoutControlItem2 });
            Root.Name = "Root";
            Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6);
            Root.Size = new Size(511, 275);
            Root.TextVisible = false;
            //
            // layoutControlItem3
            //
            layoutControlItem3.Control = TagNameTextEdit;
            layoutControlItem3.Location = new Point(0, 24);
            layoutControlItem3.Name = "layoutControlItem3";
            layoutControlItem3.Size = new Size(499, 24);
            layoutControlItem3.Text = "标签:";
            layoutControlItem3.TextSize = new Size(35, 14);
            //
            // layoutControlItem5
            //
            layoutControlItem5.Control = DescriptionTextEdit;
            layoutControlItem5.Location = new Point(0, 72);
            layoutControlItem5.Name = "layoutControlItem5";
            layoutControlItem5.Size = new Size(499, 165);
            layoutControlItem5.Text = "说明:";
            layoutControlItem5.TextSize = new Size(35, 14);
            //
            // layoutControlItem1
            //
            layoutControlItem1.AllowHtmlStringInCaption = true;
            layoutControlItem1.Control = NameTextEdit;
            layoutControlItem1.Location = new Point(0, 0);
            layoutControlItem1.Name = "layoutControlItem1";
            layoutControlItem1.Size = new Size(499, 24);
            layoutControlItem1.Text = "<color=red>*</color>名称:";
            layoutControlItem1.TextSize = new Size(35, 14);
            //
            // layoutControlItem6
            //
            layoutControlItem6.Control = btnCancel;
            layoutControlItem6.Location = new Point(422, 237);
            layoutControlItem6.Name = "layoutControlItem6";
            layoutControlItem6.Size = new Size(77, 26);
            layoutControlItem6.TextSize = new Size(0, 0);
            layoutControlItem6.TextVisible = false;
            //
            // emptySpaceItem1
            //
            emptySpaceItem1.AllowHotTrack = false;
            emptySpaceItem1.Location = new Point(0, 237);
            emptySpaceItem1.Name = "emptySpaceItem1";
            emptySpaceItem1.Size = new Size(348, 26);
            emptySpaceItem1.TextSize = new Size(0, 0);
            //
            // layoutControlItem4
            //
            layoutControlItem4.Control = BtnOk;
            layoutControlItem4.Location = new Point(348, 237);
            layoutControlItem4.Name = "layoutControlItem4";
            layoutControlItem4.Size = new Size(74, 26);
            layoutControlItem4.TextSize = new Size(0, 0);
            layoutControlItem4.TextVisible = false;
            //
            // layoutControlItem2
            //
            layoutControlItem2.Control = textEditParentList;
            layoutControlItem2.Location = new Point(0, 48);
            layoutControlItem2.Name = "layoutControlItem2";
            layoutControlItem2.Size = new Size(499, 24);
            layoutControlItem2.Text = "父级:";
            layoutControlItem2.TextSize = new Size(35, 14);
            //
            // dxErrorProvider1
            //
            dxErrorProvider1.ContainerControl = this;
            //
            // AddAssetsCoolingSeriesDlg
            //
            AutoScaleDimensions = new SizeF(7F, 14F);
            AutoScaleMode = AutoScaleMode.Font;
            ClientSize = new Size(511, 275);
            Controls.Add(layoutControl1);
            Name = "AddAssetsCoolingSeriesDlg";
            StartPosition = FormStartPosition.CenterScreen;
            Text = "添加系列";
            ((ISupportInitialize)layoutControl1).EndInit();
            layoutControl1.ResumeLayout(false);
            ((ISupportInitialize)textEditParentList.Properties).EndInit();
            ((ISupportInitialize)treeListLookUpEdit1TreeList).EndInit();
            ((ISupportInitialize)TagNameTextEdit.Properties).EndInit();
            ((ISupportInitialize)NameTextEdit.Properties).EndInit();
            ((ISupportInitialize)DescriptionTextEdit.Properties).EndInit();
            ((ISupportInitialize)Root).EndInit();
            ((ISupportInitialize)layoutControlItem3).EndInit();
            ((ISupportInitialize)layoutControlItem5).EndInit();
            ((ISupportInitialize)layoutControlItem1).EndInit();
            ((ISupportInitialize)layoutControlItem6).EndInit();
            ((ISupportInitialize)emptySpaceItem1).EndInit();
            ((ISupportInitialize)layoutControlItem4).EndInit();
            ((ISupportInitialize)layoutControlItem2).EndInit();
            ((ISupportInitialize)dxErrorProvider1).EndInit();
            ResumeLayout(false);
        }
        #endregion
        private DevExpress.XtraLayout.LayoutControl layoutControl1;
        private DevExpress.XtraEditors.TextEdit NameTextEdit;
        private DevExpress.XtraLayout.LayoutControlGroup Root;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
        private DevExpress.XtraEditors.TextEdit TagNameTextEdit;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
        private DevExpress.XtraEditors.MemoEdit DescriptionTextEdit;
        private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1;
        private DevExpress.XtraEditors.SimpleButton BtnOk;
        private DevExpress.XtraEditors.SimpleButton btnCancel;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
        private DevExpress.XtraEditors.TreeListLookUpEdit textEditParentList;
        private DevExpress.XtraTreeList.TreeList treeListLookUpEdit1TreeList;
        private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn1;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
    }
}
WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/01-series/AddAssetsCoolingSeriesDlg.cs
@@ -1,13 +1,4 @@
using DevExpress.XtraEditors;
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;
using Yw;
namespace HStation.WinFrmUI
{
@@ -16,6 +7,63 @@
        public AddAssetsCoolingSeriesDlg()
        {
            InitializeComponent();
            this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon;
        }
        public event Func<Vmo.AssetsCoolingSeriesVmo, Task<bool>> ReloadDataEvent = null;
        private List<AssetsCoolingSeriesMgrViewModel> _assetsTranslationSeriesViews;
        //初始化
        public async void SetBindingData()
        {
            _assetsTranslationSeriesViews = new List<AssetsCoolingSeriesMgrViewModel>();
            var allList = await BLLFactory<HStation.BLL.AssetsCoolingSeries>.Instance.GetAll();
            if (allList != null)
            {
                foreach (var item in allList)
                {
                    _assetsTranslationSeriesViews.Add(new AssetsCoolingSeriesMgrViewModel(item));
                }
            }
            treeListLookUpEdit1TreeList.DataSource = _assetsTranslationSeriesViews;
        }
        //数据验证
        private bool Valid()
        {
            this.dxErrorProvider1.ClearErrors();
            if (string.IsNullOrEmpty(NameTextEdit.Text.Trim()))
            {
                this.dxErrorProvider1.SetError(this.NameTextEdit, "必填项");
                return false;
            }
            return true;
        }
        //完成
        private async void BtnOk_ClickAsync(object sender, EventArgs e)
        {
            if (!Valid())
                return;
            var model = new Vmo.AssetsCoolingSeriesVmo();
            model.Name = NameTextEdit.Text;
            model.TagName = TagNameTextEdit.Text;
            model.Description = DescriptionTextEdit.Text;
            if (this.textEditParentList.EditValue != null)
            {
                model.ParentID = (long)(this.textEditParentList.EditValue);
            }
            if (await this.ReloadDataEvent.Invoke(model))
            {
                TipFormHelper.ShowSucceed("添加成功!");
            }
            else
            {
                TipFormHelper.ShowError("添加失败!");
            }
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
    }
}
WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/01-series/AddAssetsCoolingSeriesDlg.resx
@@ -1,17 +1,17 @@
<?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
    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>
@@ -26,36 +26,36 @@
        <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
    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
    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
    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
    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
    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
    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
    value   : The object must be serialized into a byte array
            : using a System.ComponentModel.TypeConverter
            : and then encoded with base64 encoding.
    -->
@@ -117,4 +117,7 @@
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>17, 17</value>
  </metadata>
</root>
WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/01-series/EditAssetsCoolingSeriesDlg.Designer.cs
@@ -28,11 +28,264 @@
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Text = "EditAssetsCoolingFactorDlg";
            components = new System.ComponentModel.Container();
            layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
            textEditParentList = new DevExpress.XtraEditors.TreeListLookUpEdit();
            treeListLookUpEdit1TreeList = new DevExpress.XtraTreeList.TreeList();
            treeListColumn1 = new DevExpress.XtraTreeList.Columns.TreeListColumn();
            BtnOk = new DevExpress.XtraEditors.SimpleButton();
            btnCancel = new DevExpress.XtraEditors.SimpleButton();
            TagNameTextEdit = new DevExpress.XtraEditors.TextEdit();
            NameTextEdit = new DevExpress.XtraEditors.TextEdit();
            DescriptionTextEdit = new DevExpress.XtraEditors.MemoEdit();
            Root = new DevExpress.XtraLayout.LayoutControlGroup();
            layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
            emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
            layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
            dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components);
            ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit();
            layoutControl1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)textEditParentList.Properties).BeginInit();
            ((System.ComponentModel.ISupportInitialize)treeListLookUpEdit1TreeList).BeginInit();
            ((System.ComponentModel.ISupportInitialize)TagNameTextEdit.Properties).BeginInit();
            ((System.ComponentModel.ISupportInitialize)NameTextEdit.Properties).BeginInit();
            ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).BeginInit();
            ((System.ComponentModel.ISupportInitialize)Root).BeginInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit();
            ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit();
            ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit();
            SuspendLayout();
            //
            // layoutControl1
            //
            layoutControl1.Controls.Add(textEditParentList);
            layoutControl1.Controls.Add(BtnOk);
            layoutControl1.Controls.Add(btnCancel);
            layoutControl1.Controls.Add(TagNameTextEdit);
            layoutControl1.Controls.Add(NameTextEdit);
            layoutControl1.Controls.Add(DescriptionTextEdit);
            layoutControl1.Dock = DockStyle.Fill;
            layoutControl1.Location = new Point(0, 0);
            layoutControl1.Name = "layoutControl1";
            layoutControl1.Root = Root;
            layoutControl1.Size = new Size(511, 275);
            layoutControl1.TabIndex = 0;
            layoutControl1.Text = "layoutControl1";
            //
            // textEditParentList
            //
            textEditParentList.Location = new Point(55, 56);
            textEditParentList.Name = "textEditParentList";
            textEditParentList.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
            textEditParentList.Properties.DisplayMember = "Name";
            textEditParentList.Properties.NullText = "";
            textEditParentList.Properties.TreeList = treeListLookUpEdit1TreeList;
            textEditParentList.Properties.ValueMember = "ID";
            textEditParentList.Size = new Size(448, 20);
            textEditParentList.StyleController = layoutControl1;
            textEditParentList.TabIndex = 11;
            //
            // treeListLookUpEdit1TreeList
            //
            treeListLookUpEdit1TreeList.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { treeListColumn1 });
            treeListLookUpEdit1TreeList.Location = new Point(7, 37);
            treeListLookUpEdit1TreeList.Name = "treeListLookUpEdit1TreeList";
            treeListLookUpEdit1TreeList.OptionsView.ShowIndentAsRowStyle = true;
            treeListLookUpEdit1TreeList.Size = new Size(400, 200);
            treeListLookUpEdit1TreeList.TabIndex = 0;
            treeListLookUpEdit1TreeList.ViewStyle = DevExpress.XtraTreeList.TreeListViewStyle.TreeView;
            //
            // treeListColumn1
            //
            treeListColumn1.Caption = "treeListColumn1";
            treeListColumn1.FieldName = "Name";
            treeListColumn1.Name = "treeListColumn1";
            treeListColumn1.Visible = true;
            treeListColumn1.VisibleIndex = 0;
            //
            // BtnOk
            //
            BtnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary;
            BtnOk.Appearance.Options.UseBackColor = true;
            BtnOk.Location = new Point(356, 245);
            BtnOk.Name = "BtnOk";
            BtnOk.Size = new Size(70, 22);
            BtnOk.StyleController = layoutControl1;
            BtnOk.TabIndex = 5;
            BtnOk.Text = "确定";
            BtnOk.Click += BtnOk_ClickAsync;
            //
            // btnCancel
            //
            btnCancel.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning;
            btnCancel.Appearance.Options.UseBackColor = true;
            btnCancel.DialogResult = DialogResult.Cancel;
            btnCancel.Location = new Point(430, 245);
            btnCancel.Name = "btnCancel";
            btnCancel.Size = new Size(73, 22);
            btnCancel.StyleController = layoutControl1;
            btnCancel.TabIndex = 6;
            btnCancel.Text = "取消";
            //
            // TagNameTextEdit
            //
            TagNameTextEdit.Location = new Point(55, 32);
            TagNameTextEdit.Name = "TagNameTextEdit";
            TagNameTextEdit.Size = new Size(448, 20);
            TagNameTextEdit.StyleController = layoutControl1;
            TagNameTextEdit.TabIndex = 2;
            //
            // NameTextEdit
            //
            NameTextEdit.Location = new Point(55, 8);
            NameTextEdit.Name = "NameTextEdit";
            NameTextEdit.Size = new Size(448, 20);
            NameTextEdit.StyleController = layoutControl1;
            NameTextEdit.TabIndex = 0;
            //
            // DescriptionTextEdit
            //
            DescriptionTextEdit.Location = new Point(55, 80);
            DescriptionTextEdit.Name = "DescriptionTextEdit";
            DescriptionTextEdit.Size = new Size(448, 161);
            DescriptionTextEdit.StyleController = layoutControl1;
            DescriptionTextEdit.TabIndex = 4;
            //
            // 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[] { layoutControlItem5, layoutControlItem1, layoutControlItem6, emptySpaceItem1, layoutControlItem4, layoutControlItem3, layoutControlItem2 });
            Root.Name = "Root";
            Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6);
            Root.Size = new Size(511, 275);
            Root.TextVisible = false;
            //
            // layoutControlItem5
            //
            layoutControlItem5.Control = DescriptionTextEdit;
            layoutControlItem5.Location = new Point(0, 72);
            layoutControlItem5.Name = "layoutControlItem5";
            layoutControlItem5.Size = new Size(499, 165);
            layoutControlItem5.Text = "说明:";
            layoutControlItem5.TextSize = new Size(35, 14);
            //
            // layoutControlItem1
            //
            layoutControlItem1.AllowHtmlStringInCaption = true;
            layoutControlItem1.Control = NameTextEdit;
            layoutControlItem1.Location = new Point(0, 0);
            layoutControlItem1.Name = "layoutControlItem1";
            layoutControlItem1.Size = new Size(499, 24);
            layoutControlItem1.Text = "<color=red>*</color>名称:";
            layoutControlItem1.TextSize = new Size(35, 14);
            //
            // layoutControlItem6
            //
            layoutControlItem6.Control = btnCancel;
            layoutControlItem6.Location = new Point(422, 237);
            layoutControlItem6.Name = "layoutControlItem6";
            layoutControlItem6.Size = new Size(77, 26);
            layoutControlItem6.TextSize = new Size(0, 0);
            layoutControlItem6.TextVisible = false;
            //
            // emptySpaceItem1
            //
            emptySpaceItem1.AllowHotTrack = false;
            emptySpaceItem1.Location = new Point(0, 237);
            emptySpaceItem1.Name = "emptySpaceItem1";
            emptySpaceItem1.Size = new Size(348, 26);
            emptySpaceItem1.TextSize = new Size(0, 0);
            //
            // layoutControlItem4
            //
            layoutControlItem4.Control = BtnOk;
            layoutControlItem4.Location = new Point(348, 237);
            layoutControlItem4.Name = "layoutControlItem4";
            layoutControlItem4.Size = new Size(74, 26);
            layoutControlItem4.TextSize = new Size(0, 0);
            layoutControlItem4.TextVisible = false;
            //
            // layoutControlItem3
            //
            layoutControlItem3.Control = TagNameTextEdit;
            layoutControlItem3.Location = new Point(0, 24);
            layoutControlItem3.Name = "layoutControlItem3";
            layoutControlItem3.Size = new Size(499, 24);
            layoutControlItem3.Text = "标签:";
            layoutControlItem3.TextSize = new Size(35, 14);
            //
            // layoutControlItem2
            //
            layoutControlItem2.Control = textEditParentList;
            layoutControlItem2.Location = new Point(0, 48);
            layoutControlItem2.Name = "layoutControlItem2";
            layoutControlItem2.Size = new Size(499, 24);
            layoutControlItem2.Text = "父级:";
            layoutControlItem2.TextSize = new Size(35, 14);
            //
            // dxErrorProvider1
            //
            dxErrorProvider1.ContainerControl = this;
            //
            // EditAssetsTranslationSeriesDlg
            //
            AutoScaleDimensions = new SizeF(7F, 14F);
            AutoScaleMode = AutoScaleMode.Font;
            ClientSize = new Size(511, 275);
            Controls.Add(layoutControl1);
            Name = "EditAssetsTranslationSeriesDlg";
            StartPosition = FormStartPosition.CenterScreen;
            Text = "编辑系列";
            ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit();
            layoutControl1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)textEditParentList.Properties).EndInit();
            ((System.ComponentModel.ISupportInitialize)treeListLookUpEdit1TreeList).EndInit();
            ((System.ComponentModel.ISupportInitialize)TagNameTextEdit.Properties).EndInit();
            ((System.ComponentModel.ISupportInitialize)NameTextEdit.Properties).EndInit();
            ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).EndInit();
            ((System.ComponentModel.ISupportInitialize)Root).EndInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit();
            ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit();
            ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit();
            ResumeLayout(false);
        }
        #endregion
        private DevExpress.XtraLayout.LayoutControl layoutControl1;
        private DevExpress.XtraEditors.TextEdit NameTextEdit;
        private DevExpress.XtraLayout.LayoutControlGroup Root;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
        private DevExpress.XtraEditors.TextEdit TagNameTextEdit;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
        private DevExpress.XtraEditors.MemoEdit DescriptionTextEdit;
        private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1;
        private DevExpress.XtraEditors.SimpleButton BtnOk;
        private DevExpress.XtraEditors.SimpleButton btnCancel;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
        private DevExpress.XtraEditors.TreeListLookUpEdit textEditParentList;
        private DevExpress.XtraTreeList.TreeList treeListLookUpEdit1TreeList;
        private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn1;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
    }
}
WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/01-series/EditAssetsCoolingSeriesDlg.cs
@@ -1,13 +1,4 @@
using DevExpress.XtraEditors;
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;
using Yw;
namespace HStation.WinFrmUI
{
@@ -16,6 +7,63 @@
        public EditAssetsCoolingSeriesDlg()
        {
            InitializeComponent();
            this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon;
        }
        public event Func<Vmo.AssetsCoolingSeriesVmo, object, Task<bool>> ReloadDataEvent = null;
        private Vmo.AssetsCoolingSeriesVmo _assetsCoolingSeries = null;
        private List<AssetsCoolingSeriesMgrViewModel> _assetsCoolingSeriesViews;
        public async void SetBindingData(Vmo.AssetsCoolingSeriesVmo seriesVmo)
        {
            _assetsCoolingSeriesViews = new List<AssetsCoolingSeriesMgrViewModel>();
            _assetsCoolingSeries = seriesVmo;
            this.NameTextEdit.Text = _assetsCoolingSeries.Name;
            this.DescriptionTextEdit.Text = _assetsCoolingSeries.Description;
            this.TagNameTextEdit.Text = _assetsCoolingSeries.TagName;
            var allList = await BLLFactory<HStation.BLL.AssetsCoolingSeries>.Instance.GetAll();
            foreach (var item in allList)
            {
                _assetsCoolingSeriesViews.Add(new AssetsCoolingSeriesMgrViewModel(item));
            }
            treeListLookUpEdit1TreeList.DataSource = _assetsCoolingSeriesViews;
            if (_assetsCoolingSeries.ParentID != default)
            {
                this.textEditParentList.EditValue = _assetsCoolingSeries.ParentID;
            }
        }
        //数据验证
        private bool Valid()
        {
            this.dxErrorProvider1.ClearErrors();
            if (string.IsNullOrEmpty(NameTextEdit.Text.Trim()))
            {
                this.dxErrorProvider1.SetError(this.NameTextEdit, "必填项");
                return false;
            }
            return true;
        }
        //完成
        private async void BtnOk_ClickAsync(object sender, EventArgs e)
        {
            if (!Valid())
                return;
            _assetsCoolingSeries.Name = NameTextEdit.Text;
            _assetsCoolingSeries.TagName = TagNameTextEdit.Text;
            _assetsCoolingSeries.Description = DescriptionTextEdit.Text;
            if (await this.ReloadDataEvent.Invoke(_assetsCoolingSeries, this.textEditParentList.EditValue))
            {
                TipFormHelper.ShowSucceed("修改成功!");
            }
            else
            {
                TipFormHelper.ShowError("修改失败!");
            }
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
    }
}
WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/01-series/EditAssetsCoolingSeriesDlg.resx
@@ -1,17 +1,17 @@
<?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
    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>
@@ -26,36 +26,36 @@
        <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
    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
    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
    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
    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
    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
    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
    value   : The object must be serialized into a byte array
            : using a System.ComponentModel.TypeConverter
            : and then encoded with base64 encoding.
    -->
@@ -117,4 +117,7 @@
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>17, 17</value>
  </metadata>
</root>
WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/03-factor/EditAssetsCoolingFactorDlg.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>