Shuxia Ning
2024-10-14 02cde90c53b4a80252be2944f6d53a368b7252ba
冲突(变速曲线)
已修改8个文件
已添加19个文件
1394 ■■■■■ 文件已修改
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/02-bimface/XhsProjectSimulationBimfaceCtrl.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.Designer.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.resx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Bimface.Core/00-core/LeadLabel.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Bimface.Core/01-interop/01-interop3d/BimfaceInterop3dContainer.cs 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Bimface.Core/01-interop/01-interop3d/IBimfaceInterop3dContainer.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Bimface.Core/Yw.WinFrmUI.Bimface.Core.csproj 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Bimface.Core/bimface/html/Interop3d.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Bimface.Core/bimface/js/LeadLabel.js 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-mark/eNozzleMarkType.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-mark/ePipeMarkType.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-mark/ePumpMarkType.cs 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-mark/eValveMarkType.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-mark/eWaterboxMarkType.cs 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/HydroMarkResultViewModel.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/HydroMarkSetViewModel.cs 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkCtrl.Designer.cs 174 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkCtrl.cs 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkCtrl.resx 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkDlg.Designer.cs 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkDlg.cs 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkDlg.resx 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkPureCtrl.Designer.cs 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkPureCtrl.cs 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkPureCtrl.resx 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Properties/DataSources/Yw.WinFrmUI.HydroMarkSetViewModel.datasource 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj.user 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/02-bimface/XhsProjectSimulationBimfaceCtrl.cs
@@ -416,6 +416,26 @@
        #endregion
        #region å¼•线标签
        /// <summary>
        /// è®¾ç½®å¼•线标签
        /// </summary>
        public async Task SetLeadLabels(List<LeadLabel> obj)
        {
            await _bimfaceInteropContainer?.SetLeadLabels(obj);
        }
        /// <summary>
        /// æ¸…除引线标签
        /// </summary>
        public async Task ClearLeadLabels()
        {
            await _bimfaceInteropContainer?.ClearLeadLabels();
        }
        #endregion
        #region ä¸šåŠ¡
@@ -488,7 +508,6 @@
        }
        #endregion
        #region è®¾ç½®Open构件颜色
@@ -591,6 +610,12 @@
        #endregion
        #region æ ‡æ³¨
        #endregion
        #endregion
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.Designer.cs
@@ -71,6 +71,7 @@
            controlContainerBottom = new DevExpress.XtraBars.Docking.ControlContainer();
            svgImg32 = new DevExpress.Utils.SvgImageCollection(components);
            rmSet = new DevExpress.XtraBars.Ribbon.RadialMenu(components);
            barBtnMark = new DevExpress.XtraBars.BarButtonItem();
            ((ISupportInitialize)ribbonControl1).BeginInit();
            ((ISupportInitialize)tabPane1).BeginInit();
            tabPane1.SuspendLayout();
@@ -87,9 +88,9 @@
            // 
            ribbonControl1.ExpandCollapseItem.Id = 0;
            ribbonControl1.ItemPanelStyle = DevExpress.XtraBars.Ribbon.RibbonItemPanelStyle.Classic;
            ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, barBtnHydroCheck, barBtnHydroCalcu, barBtnHydroExportInp, barBtnSave, barBtnHydroParterList, barBtnShowHide, barBtnMatchingList, barBtnUnMatchingList, barBtnSetList, barBtnSetPumpList, barBtnSetValveList, barBtnSetPipeList, barBtnSetElbowsList, barBtnSetThreelinkList, barBtnFourlinkList, barBtnSetTranslationList, barBtnSetExchangerList, barBtnSetJunctionList, barBtnFeatCurve, barBtnSearch });
            ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, barBtnHydroCheck, barBtnHydroCalcu, barBtnHydroExportInp, barBtnSave, barBtnHydroParterList, barBtnShowHide, barBtnMatchingList, barBtnUnMatchingList, barBtnSetList, barBtnSetPumpList, barBtnSetValveList, barBtnSetPipeList, barBtnSetElbowsList, barBtnSetThreelinkList, barBtnFourlinkList, barBtnSetTranslationList, barBtnSetExchangerList, barBtnSetJunctionList, barBtnFeatCurve, barBtnSearch, barBtnMark });
            ribbonControl1.Location = new Point(0, 0);
            ribbonControl1.MaxItemId = 33;
            ribbonControl1.MaxItemId = 34;
            ribbonControl1.Name = "ribbonControl1";
            ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage1 });
            ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False;
@@ -271,6 +272,7 @@
            pageGroupModel.ItemLinks.Add(barBtnHydroParterList);
            pageGroupModel.ItemLinks.Add(barBtnSetList);
            pageGroupModel.ItemLinks.Add(barBtnHydroExportInp);
            pageGroupModel.ItemLinks.Add(barBtnMark);
            pageGroupModel.Name = "pageGroupModel";
            pageGroupModel.Text = "模型";
            // 
@@ -401,6 +403,14 @@
            rmSet.Name = "rmSet";
            rmSet.Ribbon = ribbonControl1;
            // 
            // barBtnMark
            //
            barBtnMark.Caption = "标注";
            barBtnMark.Id = 33;
            barBtnMark.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnMark.ImageOptions.SvgImage");
            barBtnMark.Name = "barBtnMark";
            barBtnMark.ItemClick += barBtnMark_ItemClick;
            //
            // XhsProjectSimulationCorePage
            // 
            Appearance.BackColor = SystemColors.Control;
@@ -469,5 +479,6 @@
        private DevExpress.XtraBars.Ribbon.RibbonPageGroup pageGroupModel;
        private DevExpress.XtraBars.Docking.DockPanel docPnlBottom;
        private DevExpress.XtraBars.Docking.ControlContainer controlContainerBottom;
        private DevExpress.XtraBars.BarButtonItem barBtnMark;
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.resx
@@ -383,6 +383,24 @@
        QmxhY2siIC8+DQogIDwvZz4NCjwvc3ZnPgs=
</value>
  </data>
  <data name="barBtnMark.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40
        LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
        dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAHwCAAAC77u/
        PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
        IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
        MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
        Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
        MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z
        ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz
        OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp
        dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkZsYWciPg0KICAgIDxwYXRoIGQ9Ik04LDRINUM0LjQs
        NCw0LDQuNCw0LDV2MjJjMCwwLjUsMC40LDEsMSwxaDJjMC42LDAsMS0wLjUsMS0xVjR6IiBjbGFzcz0i
        QmxhY2siIC8+DQogICAgPHBvbHlnb24gcG9pbnRzPSIyOCwyMCAxMCwyMCAxMCw0IDI4LDQgMjAsMTIg
        ICIgY2xhc3M9IlJlZCIgLz4NCiAgPC9nPg0KPC9zdmc+Cw==
</value>
  </data>
  <metadata name="dockManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>179, 21</value>
  </metadata>
WinFrmUI/Yw.WinFrmUI.Bimface.Core/00-core/LeadLabel.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
namespace Yw.WinFrmUI.Bimface
{
    /// <summary>
    /// å¼•线标签
    /// </summary>
    public class LeadLabel
    {
        /// <summary>
        /// id
        /// </summary>
        [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)]
        public string Id { get; set; }
        /// <summary>
        /// æ–‡æœ¬
        /// </summary>
        [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)]
        public string Text { get; set; }
    }
}
WinFrmUI/Yw.WinFrmUI.Bimface.Core/01-interop/01-interop3d/BimfaceInterop3dContainer.cs
@@ -446,5 +446,33 @@
        #endregion
        #region å¼•线标签
        /// <summary>
        /// è®¾ç½®å¼•线标签
        /// </summary>
        public async Task SetLeadLabels(List<LeadLabel> obj)
        {
            if (!_isViewInitialized)
            {
                return;
            }
            await this.webViewControl1.EvaluateScriptAsync("setLeadLabels", obj);
        }
        /// <summary>
        /// æ¸…除引线标签
        /// </summary>
        public async Task ClearLeadLabels()
        {
            if (!_isViewInitialized)
            {
                return;
            }
            await this.webViewControl1.EvaluateScriptAsync("clearLeadLabels()");
        }
        #endregion
    }
}
WinFrmUI/Yw.WinFrmUI.Bimface.Core/01-interop/01-interop3d/IBimfaceInterop3dContainer.cs
@@ -164,5 +164,19 @@
        #endregion
        #region å¼•线标签
        /// <summary>
        /// è®¾ç½®å¼•线标签
        /// </summary>
        Task SetLeadLabels(List<LeadLabel> obj);
        /// <summary>
        /// æ¸…除引线标签
        /// </summary>
        Task ClearLeadLabels();
        #endregion
    }
}
WinFrmUI/Yw.WinFrmUI.Bimface.Core/Yw.WinFrmUI.Bimface.Core.csproj
@@ -39,6 +39,7 @@
    <None Remove="bimface\js\CustomLabels.js" />
    <None Remove="bimface\js\GetComponents.js" />
    <None Remove="bimface\js\Layer.js" />
    <None Remove="bimface\js\LeadLabel.js" />
    <None Remove="bimface\js\Panel.js" />
    <None Remove="bimface\js\PipeFlow.js" />
    <None Remove="bimface\js\SelectedComponents.js" />
@@ -89,6 +90,9 @@
    <Content Include="bimface\js\Layer.js">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="bimface\js\LeadLabel.js">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="bimface\js\Panel.js">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
WinFrmUI/Yw.WinFrmUI.Bimface.Core/bimface/html/Interop3d.html
@@ -123,6 +123,7 @@
<script src="../js/ComponentsBlink.js"></script>
<script src="../js/ComponentsColor.js"></script>
<script src="../js/CustomLabels.js"></script>
<script src="../js/LeadLabel.js"></script>
<script src="js/Background.js"></script>
WinFrmUI/Yw.WinFrmUI.Bimface.Core/bimface/js/LeadLabel.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,65 @@
//引线标签
let _leadLabelDrawableContainer = null;
//设置引线标签
function setLeadLabels(obj) {
    // åˆå§‹åŒ–DrawableContainer
    if (_leadLabelDrawableContainer == null) {
        let leadLabeldrawableConfig = new Glodon.Bimface.Plugins.Drawable.DrawableContainerConfig();
        leadLabeldrawableConfig.viewer = _viewer;
        _leadLabelDrawableContainer = new Glodon.Bimface.Plugins.Drawable.DrawableContainer(leadLabeldrawableConfig);
    }
    else {
        _leadLabelDrawableContainer.clear();
    }
    if (obj == null || obj.length < 1) {
        return;
    }
    obj.forEach(item => {
        addLeadLabel(item);
    });
}
//添加引线标签
function addLeadLabel(item) {
    if (_leadLabelDrawableContainer == null) {
        return;
    }
    //引线标签的配置类
    let leadLabelConfig = new Glodon.Bimface.Plugins.Drawable.LeadLabelConfig();
    //引线折点的相对位置
    leadLabelConfig.offset = { x: 27, y: -47 };
    //引线标签的内容
    leadLabelConfig.text = item.text;
    //引线标签关联的构件
    leadLabelConfig.objectId = item.id;
    let boundingBox = _modeler.getBoundingBoxById(item.id);
    let boundingBoxMin = boundingBox.min;
    let boundingBoxMax = boundingBox.max;
    //引线标签的世界坐标
    leadLabelConfig.worldPosition = {
        x: (boundingBoxMin.x + boundingBoxMax.x) / 2,
        y: (boundingBoxMin.y + boundingBoxMax.y) / 2,
        z: (boundingBoxMin.z + boundingBoxMax.z) / 2
    };
    //引线标签是否可拖拽
    leadLabelConfig.draggable = false;
    //引线标签的视图
    leadLabelConfig.viewer = _viewer;
    let leadLabel = new Glodon.Bimface.Plugins.Drawable.LeadLabel(leadLabelConfig);
    _leadLabelDrawableContainer.addItem(leadLabel);
}
//清除引线标签
function clearLeadLabels() {
    if (_leadLabelDrawableContainer == null) {
        return;
    }
    _leadLabelDrawableContainer.clear();
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-mark/eNozzleMarkType.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,34 @@
namespace Yw.WinFrmUI.Hydro
{
    /// <summary>
    /// å–·å˜´æ ‡æ³¨ç±»åž‹
    /// </summary>
    public enum eNozzleMarkType
    {
        /// <summary>
        /// æ— 
        /// </summary>
        [Display(Name = "无")]
        None = 0,
        /// <summary>
        /// æ ‡é«˜
        /// </summary>
        [Display(Name = "标高")]
        Elev = 1,
        /// <summary>
        /// éœ€æ°´é‡
        /// </summary>
        [Display(Name = "需水量")]
        Demand = 2,
        /// <summary>
        /// å–·å°„系数
        /// </summary>
        [Display(Name = "喷射系数")]
        Coefficient = 4,
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-mark/ePipeMarkType.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,46 @@
namespace Yw.WinFrmUI.Hydro
{
    /// <summary>
    /// ç®¡é“标注类型
    /// </summary>
    public enum ePipeMarkType
    {
        /// <summary>
        /// æ— 
        /// </summary>
        [Display(Name = "无")]
        None = 0,
        /// <summary>
        /// ç®¡é“状态
        /// </summary>
        [Display(Name = "管道状态")]
        PipeStatus = 1,
        /// <summary>
        /// ç›´å¾„(mm)
        /// </summary>
        [Display(Name = "直径")]
        Diameter = 2,
        /// <summary>
        /// ç›´å¾„(m)
        /// </summary>
        [Display(Name = "直径")]
        Length = 3,
        /// <summary>
        /// ç²—糙系数
        /// </summary>
        [Display(Name = "粗糙系数")]
        Roughness = 4,
        /// <summary>
        /// å±€é˜»ç³»æ•°
        /// </summary>
        [Display(Name = "局阻系数")]
        MinorLoss = 5,
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-mark/ePumpMarkType.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,71 @@
namespace Yw.WinFrmUI.Hydro
{
    /// <summary>
    /// æ°´æ³µæ ‡æ³¨ç±»åž‹
    /// </summary>
    public enum ePumpMarkType
    {
        /// <summary>
        /// æ— 
        /// </summary>
        [Display(Name = "无")]
        None = 0,
        /// <summary>
        /// æ°´æ³µçŠ¶æ€
        /// </summary>
        [Display(Name = "运行状态")]
        PumpStatus = 1,
        /// <summary>
        /// é¢å®šåŠŸçŽ‡ï¼ˆkW)
        /// </summary>
        [Display(Name = "额定功率")]
        RatedP = 2,
        /// <summary>
        /// é¢å®šæµé‡ (m³/h)
        /// </summary>
        [Display(Name = "额定流量")]
        RatedQ = 3,
        /// <summary>
        /// é¢å®šæ‰¬ç¨‹ (m)
        /// </summary>
        [Display(Name = "额定扬程")]
        RatedH = 4,
        /// <summary>
        /// é¢å®šè½¬é€Ÿ (r/min)
        /// </summary>
        [Display(Name = "额定转速")]
        RatedN = 5,
        /// <summary>
        /// é¢å®šé¢‘率
        /// </summary>
        [Display(Name = "额定频率")]
        RatedHz = 6,
        /// <summary>
        /// è½¬é€Ÿ (r/min)
        /// </summary>
        [Display(Name = "转速")]
        CurrentN = 7,
        /// <summary>
        /// é¢‘率
        /// </summary>
        [Display(Name = "频率")]
        CurrentHz = 8,
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-mark/eValveMarkType.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,43 @@
namespace Yw.WinFrmUI.Hydro
{
    /// <summary>
    /// é˜€é—¨æ ‡æ³¨ç±»åž‹
    /// </summary>
    public enum eValveMarkType
    {
        /// <summary>
        /// æ— 
        /// </summary>
        [Display(Name = "无")]
        None = 0,
        /// <summary>
        /// é˜€é—¨çŠ¶æ€
        /// </summary>
        [Display(Name = "阀门状态")]
        ValveStatus = 1,
        /// <summary>
        /// é˜€é—¨ç±»åž‹
        /// </summary>
        [Display(Name = "阀门类型")]
        ValveType = 2,
        /// <summary>
        /// ç›´å¾„ (mm)
        /// </summary>
        [Display(Name = "直径")]
        Diameter = 3,
        /// <summary>
        /// å±€é˜»ç³»æ•°
        /// </summary>
        [Display(Name = "局阻系数")]
        MinorLoss = 4,
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-mark/eWaterboxMarkType.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,54 @@
namespace Yw.WinFrmUI.Hydro
{
    /// <summary>
    /// æ°´ç®±æ ‡æ³¨ç±»åž‹
    /// </summary>
    public enum eWaterboxMarkType
    {
        /// <summary>
        /// æ— 
        /// </summary>
        [Display(Name = "无")]
        None = 0,
        /// <summary>
        /// æ± åº•标高(m)
        /// </summary>
        [Display(Name = "池底标高")]
        PoolElev = 1,
        /// <summary>
        /// åˆå§‹æ°´ä½ï¼ˆm)
        /// </summary>
        [Display(Name = "初始水位")]
        InitLevel = 2,
        /// <summary>
        /// æœ€å°æ°´ä½ï¼ˆm)
        /// </summary>
        [Display(Name = "最小水位")]
        MinLevel = 3,
        /// <summary>
        /// æœ€å¤§æ°´ä½ï¼ˆm)
        /// </summary>
        [Display(Name = "最大水位")]
        MaxLevel = 4,
        /// <summary>
        /// ç›´å¾„(m)
        /// </summary>
        [Display(Name = "直径")]
        Diameter = 5,
        /// <summary>
        /// æœ€å°å®¹ç§¯ï¼ˆm³)
        /// </summary>
        [Display(Name = "最小容积")]
        MinVol = 6
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/HydroMarkResultViewModel.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
namespace Yw.WinFrmUI
{
    /// <summary>
    ///
    /// </summary>
    public class HydroMarkResultViewModel
    {
        /// <summary>
        /// ç¼–码
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// æ–‡æœ¬
        /// </summary>
        public string Text { get; set; }
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/HydroMarkSetViewModel.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,28 @@
namespace Yw.WinFrmUI
{
    /// <summary>
    ///
    /// </summary>
    public class HydroMarkSetViewModel
    {
        /// <summary>
        /// åˆ†ç±»
        /// </summary>
        [DisplayName("分类")]
        public string Code { get; set; }
        /// <summary>
        /// ç±»åž‹
        /// </summary>
        [DisplayName("类型")]
        public string Name { get; set; }
        /// <summary>
        /// æ ‡æ³¨
        /// </summary>
        [DisplayName("标注")]
        public int MarkType { get; set; }
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkCtrl.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,174 @@
namespace Yw.WinFrmUI
{
    partial class SetHydroMarkCtrl
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
        #region Component Designer generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
            btnOk = new DevExpress.XtraEditors.SimpleButton();
            btnCancel = new DevExpress.XtraEditors.SimpleButton();
            setHydroMarkPureCtrl1 = new SetHydroMarkPureCtrl();
            Root = new DevExpress.XtraLayout.LayoutControlGroup();
            layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
            emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
            ((ISupportInitialize)layoutControl1).BeginInit();
            layoutControl1.SuspendLayout();
            ((ISupportInitialize)Root).BeginInit();
            ((ISupportInitialize)layoutControlItem1).BeginInit();
            ((ISupportInitialize)layoutControlItem2).BeginInit();
            ((ISupportInitialize)layoutControlItem3).BeginInit();
            ((ISupportInitialize)emptySpaceItem1).BeginInit();
            SuspendLayout();
            //
            // layoutControl1
            //
            layoutControl1.Controls.Add(btnOk);
            layoutControl1.Controls.Add(btnCancel);
            layoutControl1.Controls.Add(setHydroMarkPureCtrl1);
            layoutControl1.Dock = DockStyle.Fill;
            layoutControl1.Location = new Point(0, 0);
            layoutControl1.Name = "layoutControl1";
            layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(670, 266, 650, 400);
            layoutControl1.Root = Root;
            layoutControl1.Size = new Size(398, 555);
            layoutControl1.TabIndex = 0;
            layoutControl1.Text = "layoutControl1";
            //
            // btnOk
            //
            btnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary;
            btnOk.Appearance.Options.UseBackColor = true;
            btnOk.Location = new Point(222, 531);
            btnOk.Name = "btnOk";
            btnOk.Size = new Size(85, 22);
            btnOk.StyleController = layoutControl1;
            btnOk.TabIndex = 6;
            btnOk.Text = "确定";
            btnOk.Click += btnOk_Click;
            //
            // btnCancel
            //
            btnCancel.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning;
            btnCancel.Appearance.Options.UseBackColor = true;
            btnCancel.Location = new Point(311, 531);
            btnCancel.Name = "btnCancel";
            btnCancel.Size = new Size(85, 22);
            btnCancel.StyleController = layoutControl1;
            btnCancel.TabIndex = 5;
            btnCancel.Text = "取消";
            btnCancel.Click += btnCancel_Click;
            //
            // setHydroMarkPureCtrl1
            //
            setHydroMarkPureCtrl1.Location = new Point(2, 2);
            setHydroMarkPureCtrl1.Name = "setHydroMarkPureCtrl1";
            setHydroMarkPureCtrl1.Size = new Size(394, 525);
            setHydroMarkPureCtrl1.TabIndex = 4;
            //
            // Root
            //
            Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
            Root.GroupBordersVisible = false;
            Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2, layoutControlItem3, emptySpaceItem1 });
            Root.Name = "Root";
            Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
            Root.Size = new Size(398, 555);
            Root.TextVisible = false;
            //
            // layoutControlItem1
            //
            layoutControlItem1.Control = setHydroMarkPureCtrl1;
            layoutControlItem1.Location = new Point(0, 0);
            layoutControlItem1.Name = "layoutControlItem1";
            layoutControlItem1.Size = new Size(398, 529);
            layoutControlItem1.TextSize = new Size(0, 0);
            layoutControlItem1.TextVisible = false;
            //
            // layoutControlItem2
            //
            layoutControlItem2.Control = btnCancel;
            layoutControlItem2.Location = new Point(309, 529);
            layoutControlItem2.MaxSize = new Size(89, 26);
            layoutControlItem2.MinSize = new Size(89, 26);
            layoutControlItem2.Name = "layoutControlItem2";
            layoutControlItem2.Size = new Size(89, 26);
            layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
            layoutControlItem2.TextSize = new Size(0, 0);
            layoutControlItem2.TextVisible = false;
            //
            // layoutControlItem3
            //
            layoutControlItem3.Control = btnOk;
            layoutControlItem3.Location = new Point(220, 529);
            layoutControlItem3.MaxSize = new Size(89, 26);
            layoutControlItem3.MinSize = new Size(89, 26);
            layoutControlItem3.Name = "layoutControlItem3";
            layoutControlItem3.Size = new Size(89, 26);
            layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
            layoutControlItem3.TextSize = new Size(0, 0);
            layoutControlItem3.TextVisible = false;
            //
            // emptySpaceItem1
            //
            emptySpaceItem1.AllowHotTrack = false;
            emptySpaceItem1.Location = new Point(0, 529);
            emptySpaceItem1.Name = "emptySpaceItem1";
            emptySpaceItem1.Size = new Size(220, 26);
            emptySpaceItem1.TextSize = new Size(0, 0);
            //
            // SetHydroMarkCtrl
            //
            AutoScaleDimensions = new SizeF(7F, 14F);
            AutoScaleMode = AutoScaleMode.Font;
            Controls.Add(layoutControl1);
            Name = "SetHydroMarkCtrl";
            Size = new Size(398, 555);
            ((ISupportInitialize)layoutControl1).EndInit();
            layoutControl1.ResumeLayout(false);
            ((ISupportInitialize)Root).EndInit();
            ((ISupportInitialize)layoutControlItem1).EndInit();
            ((ISupportInitialize)layoutControlItem2).EndInit();
            ((ISupportInitialize)layoutControlItem3).EndInit();
            ((ISupportInitialize)emptySpaceItem1).EndInit();
            ResumeLayout(false);
        }
        #endregion
        private DevExpress.XtraLayout.LayoutControl layoutControl1;
        private DevExpress.XtraEditors.SimpleButton btnOk;
        private DevExpress.XtraEditors.SimpleButton btnCancel;
        private SetHydroMarkPureCtrl setHydroMarkPureCtrl1;
        private DevExpress.XtraLayout.LayoutControlGroup Root;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkCtrl.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,49 @@
namespace Yw.WinFrmUI
{
    public partial class SetHydroMarkCtrl : DevExpress.XtraEditors.XtraUserControl
    {
        public SetHydroMarkCtrl()
        {
            InitializeComponent();
            this.layoutControl1.SetupLayoutControl();
        }
        /// <summary>
        ///
        /// </summary>
        public event Action<List<HydroMarkResultViewModel>> ReloadDataEvent;
        /// <summary>
        ///
        /// </summary>
        public event Action OkEvent;
        /// <summary>
        ///
        /// </summary>
        public event Action CancelEvent;
        /// <summary>
        ///
        /// </summary>
        public void SetBindingData(Func<Yw.Model.HydroModelInfo> hydroInfoFunc, List<HydroMarkSetViewModel> list)
        {
            this.setHydroMarkPureCtrl1.SetBindingData(hydroInfoFunc, list);
        }
        private void btnCancel_Click(object sender, EventArgs e)
        {
            var list = this.setHydroMarkPureCtrl1.GetResultList();
            this.ReloadDataEvent?.Invoke(list);
            this.OkEvent?.Invoke();
        }
        private void btnOk_Click(object sender, EventArgs e)
        {
            this.CancelEvent?.Invoke();
        }
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkCtrl.resx
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
  <!--
    Microsoft ResX Schema
    Version 2.0
    The primary goals of this format is to allow a simple XML format
    that is mostly human readable. The generation and parsing of the
    various data types are done through the TypeConverter classes
    associated with the data types.
    Example:
    ... ado.net/XML headers & schema ...
    <resheader name="resmimetype">text/microsoft-resx</resheader>
    <resheader name="version">2.0</resheader>
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
        <value>[base64 mime encoded serialized .NET Framework object]</value>
    </data>
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
        <comment>This is a comment</comment>
    </data>
    There are any number of "resheader" rows that contain simple
    name/value pairs.
    Each data row contains a name, and value. The row also contains a
    type or mimetype. Type corresponds to a .NET class that support
    text/value conversion through the TypeConverter architecture.
    Classes that don't support this are serialized and stored with the
    mimetype set.
    The mimetype is used for serialized objects, and tells the
    ResXResourceReader how to depersist the object. This is currently not
    extensible. For a given mimetype the value must be set accordingly:
    Note - application/x-microsoft.net.object.binary.base64 is the format
    that the ResXResourceWriter will generate, however the reader can
    read any of the formats listed below.
    mimetype: application/x-microsoft.net.object.binary.base64
    value   : The object must be serialized with
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
            : and then encoded with base64 encoding.
    mimetype: application/x-microsoft.net.object.soap.base64
    value   : The object must be serialized with
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
            : and then encoded with base64 encoding.
    mimetype: application/x-microsoft.net.object.bytearray.base64
    value   : The object must be serialized into a byte array
            : using a System.ComponentModel.TypeConverter
            : and then encoded with base64 encoding.
    -->
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
</root>
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkDlg.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,59 @@
namespace Yw.WinFrmUI
{
    partial class SetHydroMarkDlg
    {
        /// <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()
        {
            setHydroMarkCtrl1 = new SetHydroMarkCtrl();
            SuspendLayout();
            //
            // setHydroMarkCtrl1
            //
            setHydroMarkCtrl1.Dock = DockStyle.Fill;
            setHydroMarkCtrl1.Location = new Point(10, 5);
            setHydroMarkCtrl1.Name = "setHydroMarkCtrl1";
            setHydroMarkCtrl1.Size = new Size(397, 510);
            setHydroMarkCtrl1.TabIndex = 0;
            //
            // SetHydroMarkDlg
            //
            AutoScaleDimensions = new SizeF(7F, 14F);
            AutoScaleMode = AutoScaleMode.Font;
            ClientSize = new Size(417, 525);
            Controls.Add(setHydroMarkCtrl1);
            Name = "SetHydroMarkDlg";
            Padding = new Padding(10, 5, 10, 10);
            StartPosition = FormStartPosition.CenterParent;
            Text = "标注";
            ResumeLayout(false);
        }
        #endregion
        private SetHydroMarkCtrl setHydroMarkCtrl1;
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkDlg.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,41 @@
namespace Yw.WinFrmUI
{
    public partial class SetHydroMarkDlg : DevExpress.XtraEditors.XtraForm
    {
        public SetHydroMarkDlg()
        {
            InitializeComponent();
            this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon;
            this.setHydroMarkCtrl1.CancelEvent += () =>
            {
                this.DialogResult = DialogResult.Cancel;
                this.Close();
            };
            this.setHydroMarkCtrl1.OkEvent += () =>
            {
                this.DialogResult = DialogResult.OK;
                this.Close();
            };
            this.setHydroMarkCtrl1.ReloadDataEvent += (obj) =>
            {
                this.ReloadDataEvent?.Invoke(obj);
            };
        }
        /// <summary>
        ///
        /// </summary>
        public event Action<List<HydroMarkResultViewModel>> ReloadDataEvent;
        /// <summary>
        ///
        /// </summary>
        public void SetBindingData(Func<Yw.Model.HydroModelInfo> hydroInfoFunc, List<HydroMarkSetViewModel> list)
        {
            this.setHydroMarkCtrl1.SetBindingData(hydroInfoFunc, list);
        }
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkDlg.resx
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
  <!--
    Microsoft ResX Schema
    Version 2.0
    The primary goals of this format is to allow a simple XML format
    that is mostly human readable. The generation and parsing of the
    various data types are done through the TypeConverter classes
    associated with the data types.
    Example:
    ... ado.net/XML headers & schema ...
    <resheader name="resmimetype">text/microsoft-resx</resheader>
    <resheader name="version">2.0</resheader>
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
        <value>[base64 mime encoded serialized .NET Framework object]</value>
    </data>
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
        <comment>This is a comment</comment>
    </data>
    There are any number of "resheader" rows that contain simple
    name/value pairs.
    Each data row contains a name, and value. The row also contains a
    type or mimetype. Type corresponds to a .NET class that support
    text/value conversion through the TypeConverter architecture.
    Classes that don't support this are serialized and stored with the
    mimetype set.
    The mimetype is used for serialized objects, and tells the
    ResXResourceReader how to depersist the object. This is currently not
    extensible. For a given mimetype the value must be set accordingly:
    Note - application/x-microsoft.net.object.binary.base64 is the format
    that the ResXResourceWriter will generate, however the reader can
    read any of the formats listed below.
    mimetype: application/x-microsoft.net.object.binary.base64
    value   : The object must be serialized with
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
            : and then encoded with base64 encoding.
    mimetype: application/x-microsoft.net.object.soap.base64
    value   : The object must be serialized with
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
            : and then encoded with base64 encoding.
    mimetype: application/x-microsoft.net.object.bytearray.base64
    value   : The object must be serialized into a byte array
            : using a System.ComponentModel.TypeConverter
            : and then encoded with base64 encoding.
    -->
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
</root>
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkPureCtrl.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,99 @@
namespace Yw.WinFrmUI
{
    partial class SetHydroMarkPureCtrl
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
        #region Component Designer generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            components = new Container();
            gridControl1 = new DevExpress.XtraGrid.GridControl();
            hydroMarkSetViewModelBindingSource = new BindingSource(components);
            gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
            colName = new DevExpress.XtraGrid.Columns.GridColumn();
            colMarkType = new DevExpress.XtraGrid.Columns.GridColumn();
            ((ISupportInitialize)gridControl1).BeginInit();
            ((ISupportInitialize)hydroMarkSetViewModelBindingSource).BeginInit();
            ((ISupportInitialize)gridView1).BeginInit();
            SuspendLayout();
            //
            // gridControl1
            //
            gridControl1.DataSource = hydroMarkSetViewModelBindingSource;
            gridControl1.Dock = DockStyle.Fill;
            gridControl1.Location = new Point(0, 0);
            gridControl1.MainView = gridView1;
            gridControl1.Name = "gridControl1";
            gridControl1.Size = new Size(355, 443);
            gridControl1.TabIndex = 0;
            gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 });
            //
            // hydroMarkSetViewModelBindingSource
            //
            hydroMarkSetViewModelBindingSource.DataSource = typeof(HydroMarkSetViewModel);
            //
            // gridView1
            //
            gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colName, colMarkType });
            gridView1.GridControl = gridControl1;
            gridView1.Name = "gridView1";
            //
            // colName
            //
            colName.FieldName = "Name";
            colName.Name = "colName";
            colName.OptionsColumn.AllowEdit = false;
            colName.Visible = true;
            colName.VisibleIndex = 0;
            //
            // colMarkType
            //
            colMarkType.FieldName = "MarkType";
            colMarkType.Name = "colMarkType";
            colMarkType.Visible = true;
            colMarkType.VisibleIndex = 1;
            //
            // SetHydroMarkPureCtrl
            //
            AutoScaleDimensions = new SizeF(7F, 14F);
            AutoScaleMode = AutoScaleMode.Font;
            Controls.Add(gridControl1);
            Name = "SetHydroMarkPureCtrl";
            Size = new Size(355, 443);
            ((ISupportInitialize)gridControl1).EndInit();
            ((ISupportInitialize)hydroMarkSetViewModelBindingSource).EndInit();
            ((ISupportInitialize)gridView1).EndInit();
            ResumeLayout(false);
        }
        #endregion
        private DevExpress.XtraGrid.GridControl gridControl1;
        private DevExpress.XtraGrid.Views.Grid.GridView gridView1;
        private BindingSource hydroMarkSetViewModelBindingSource;
        private DevExpress.XtraGrid.Columns.GridColumn colName;
        private DevExpress.XtraGrid.Columns.GridColumn colMarkType;
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkPureCtrl.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,102 @@
using DevExpress.XtraEditors.Repository;
using DevExpress.XtraRichEdit.Design;
using Yw.WinFrmUI.Hydro;
namespace Yw.WinFrmUI
{
    public partial class SetHydroMarkPureCtrl : DevExpress.XtraEditors.XtraUserControl
    {
        public SetHydroMarkPureCtrl()
        {
            InitializeComponent();
            this.gridView1.SetNormalEditView();
            this.colName.OptionsColumn.AllowEdit = false;
            this.gridView1.CustomRowCellEdit += GridView1_CustomRowCellEdit;
        }
        private Func<Yw.Model.HydroModelInfo> _hydroInfoFunc;
        private BindingList<HydroMarkSetViewModel> _allBindingList = null;
        /// <summary>
        ///
        /// </summary>
        public void SetBindingData(Func<Yw.Model.HydroModelInfo> hydroInfoFunc, List<HydroMarkSetViewModel> list)
        {
            _hydroInfoFunc = hydroInfoFunc;
            _allBindingList = new BindingList<HydroMarkSetViewModel>();
            list?.ForEach(x =>
            {
                _allBindingList.Add(x);
            });
            this.hydroMarkSetViewModelBindingSource.DataSource = _allBindingList;
            this.hydroMarkSetViewModelBindingSource.ResetBindings(false);
        }
        /// <summary>
        /// èŽ·å–ç»“æžœåˆ—è¡¨
        /// </summary>
        /// <returns></returns>
        public List<HydroMarkResultViewModel> GetResultList()
        {
            var hydroInfo = _hydroInfoFunc?.Invoke();
            if (hydroInfo == null)
            {
                return default;
            }
            if (_allBindingList == null || _allBindingList.Count < 1)
            {
                return default;
            }
            var resultList = new List<HydroMarkResultViewModel>();
            return resultList;
        }
        //自定义
        private void GridView1_CustomRowCellEdit(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e)
        {
            var row = this.gridView1.GetRow(e.RowHandle) as HydroMarkSetViewModel;
            if (row == null)
            {
                return;
            }
            if (e.Column == this.colMarkType)
            {
                var repositoryItem = new RepositoryItemImageComboBox();
                switch (row.Code)
                {
                    case Yw.Hydro.ParterCatalog.Waterbox:
                        {
                            repositoryItem.AddEnum(typeof(eWaterboxMarkType), true);
                        }
                        break;
                    case Yw.Hydro.ParterCatalog.Pump:
                        {
                            repositoryItem.AddEnum(typeof(ePumpMarkType), true);
                        }
                        break;
                    case Yw.Hydro.ParterCatalog.Valve:
                        {
                            repositoryItem.AddEnum(typeof(eValveMarkType), true);
                        }
                        break;
                    case Yw.Hydro.ParterCatalog.Pipe:
                        {
                            repositoryItem.AddEnum(typeof(ePipeMarkType), true);
                        }
                        break;
                    case Yw.Hydro.ParterCatalog.Nozzle:
                        {
                            repositoryItem.AddEnum(typeof(eNozzleMarkType), true);
                        }
                        break;
                    default: break;
                }
                e.RepositoryItem = repositoryItem;
            }
        }
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkPureCtrl.resx
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
  <!--
    Microsoft ResX Schema
    Version 2.0
    The primary goals of this format is to allow a simple XML format
    that is mostly human readable. The generation and parsing of the
    various data types are done through the TypeConverter classes
    associated with the data types.
    Example:
    ... ado.net/XML headers & schema ...
    <resheader name="resmimetype">text/microsoft-resx</resheader>
    <resheader name="version">2.0</resheader>
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
        <value>[base64 mime encoded serialized .NET Framework object]</value>
    </data>
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
        <comment>This is a comment</comment>
    </data>
    There are any number of "resheader" rows that contain simple
    name/value pairs.
    Each data row contains a name, and value. The row also contains a
    type or mimetype. Type corresponds to a .NET class that support
    text/value conversion through the TypeConverter architecture.
    Classes that don't support this are serialized and stored with the
    mimetype set.
    The mimetype is used for serialized objects, and tells the
    ResXResourceReader how to depersist the object. This is currently not
    extensible. For a given mimetype the value must be set accordingly:
    Note - application/x-microsoft.net.object.binary.base64 is the format
    that the ResXResourceWriter will generate, however the reader can
    read any of the formats listed below.
    mimetype: application/x-microsoft.net.object.binary.base64
    value   : The object must be serialized with
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
            : and then encoded with base64 encoding.
    mimetype: application/x-microsoft.net.object.soap.base64
    value   : The object must be serialized with
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
            : and then encoded with base64 encoding.
    mimetype: application/x-microsoft.net.object.bytearray.base64
    value   : The object must be serialized into a byte array
            : using a System.ComponentModel.TypeConverter
            : and then encoded with base64 encoding.
    -->
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <metadata name="hydroMarkSetViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>17, 17</value>
  </metadata>
</root>
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Properties/DataSources/Yw.WinFrmUI.HydroMarkSetViewModel.datasource
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
    This file is automatically generated by Visual Studio. It is
    used to store generic object data source configuration information.
    Renaming the file extension or editing the content of this file may
    cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="HydroMarkSetViewModel" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
  <TypeInfo>Yw.WinFrmUI.HydroMarkSetViewModel, Yw.WinFrmUI.Hydro.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj.user
@@ -34,5 +34,14 @@
    <Compile Update="06-q3d\HydroQ3dViewPage.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="09-mark\SetHydroMarkCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="09-mark\SetHydroMarkDlg.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Update="09-mark\SetHydroMarkPureCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
  </ItemGroup>
</Project>