| | |
| | | |
| | | #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 ä¸å¡ |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region 设置Openæä»¶é¢è² |
| | | |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region æ æ³¨ |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | |
| | | 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(); |
| | |
| | | // |
| | | 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; |
| | |
| | | pageGroupModel.ItemLinks.Add(barBtnHydroParterList); |
| | | pageGroupModel.ItemLinks.Add(barBtnSetList); |
| | | pageGroupModel.ItemLinks.Add(barBtnHydroExportInp); |
| | | pageGroupModel.ItemLinks.Add(barBtnMark); |
| | | pageGroupModel.Name = "pageGroupModel"; |
| | | pageGroupModel.Text = "模å"; |
| | | // |
| | |
| | | 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; |
| | |
| | | private DevExpress.XtraBars.Ribbon.RibbonPageGroup pageGroupModel; |
| | | private DevExpress.XtraBars.Docking.DockPanel docPnlBottom; |
| | | private DevExpress.XtraBars.Docking.ControlContainer controlContainerBottom; |
| | | private DevExpress.XtraBars.BarButtonItem barBtnMark; |
| | | } |
| | | } |
| | |
| | | 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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | #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 |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region å¼çº¿æ ç¾ |
| | | |
| | | /// <summary> |
| | | /// 设置å¼çº¿æ ç¾ |
| | | /// </summary> |
| | | Task SetLeadLabels(List<LeadLabel> obj); |
| | | |
| | | /// <summary> |
| | | /// æ¸
é¤å¼çº¿æ ç¾ |
| | | /// </summary> |
| | | Task ClearLeadLabels(); |
| | | |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | <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" /> |
| | |
| | | <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> |
| | |
| | | <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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | //å¼çº¿æ ç¾ |
| | | |
| | | 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(); |
| | | } |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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, |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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, |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace Yw.WinFrmUI |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public class HydroMarkResultViewModel |
| | | { |
| | | /// <summary> |
| | | /// ç¼ç |
| | | /// </summary> |
| | | public string Code { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ææ¬ |
| | | /// </summary> |
| | | public string Text { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; } |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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(); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
| | |
| | | <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> |