| | |
| | | return true; |
| | | } |
| | | |
| | | feedBackMsg?.Invoke("正在进行产品匹配...", Color.Black); |
| | | hydroInfo = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.GetByID(hydroId); |
| | | var matchingParas = AssetsMatchingParasHelper.Create(hydroInfo); |
| | | if (await AssetsMatchingHelper.Matching(matchingParas)) |
| | | { |
| | | if (AssetsMatchingParasHelper.Apply(hydroInfo, matchingParas)) |
| | | { |
| | | feedBackMsg?.Invoke("产品匹配成功。。。", Color.Green); |
| | | } |
| | | else |
| | | { |
| | | feedBackMsg?.Invoke("产品匹配失败!!!", Color.Red); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | feedBackMsg?.Invoke("产品匹配失败!!!", Color.Red); |
| | | } |
| | | |
| | | feedBackMsg?.Invoke("水力结构文件解析成功。。。", Color.Green); |
| | | feedBackProgress?.Invoke(100, 30); |
| | | vm.HydroID = hydroId; |
| | |
| | | this.hydroParterPropertyCtrl1.PropertyValueChangingEvent += HydroParterPropertyCtrl1_PropertyValueChangingEvent; |
| | | } |
| | | |
| | | //水力信息方法 |
| | | private Func<Yw.Model.HydroModelInfo> _hydroInfoFunc = null; |
| | | |
| | | /// <summary> |
| | | /// 获取水力信息事件 |
| | | /// 绑定数据 |
| | | /// </summary> |
| | | public event Func<Yw.Model.HydroModelInfo> GetHydroInfoEvent; |
| | | public void SetBindingData(Func<Yw.Model.HydroModelInfo> hydroInfoFunc) |
| | | { |
| | | _hydroInfoFunc = hydroInfoFunc; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 选择组件 |
| | | /// </summary> |
| | | public void SelectParter(long id) |
| | | { |
| | | var hydroInfo = GetHydroInfoEvent?.Invoke(); |
| | | var hydroInfo = _hydroInfoFunc?.Invoke(); |
| | | if (hydroInfo == null) |
| | | { |
| | | this.hydroParterPropertyCtrl1.SelectedObject = null; |
| | |
| | | /// </summary> |
| | | public void SelectParter(string code) |
| | | { |
| | | var hydroInfo = GetHydroInfoEvent?.Invoke(); |
| | | var hydroInfo = _hydroInfoFunc?.Invoke(); |
| | | if (hydroInfo == null) |
| | | { |
| | | this.hydroParterPropertyCtrl1.SelectedObject = null; |
| | |
| | | /// <summary> |
| | | /// 选择组件 |
| | | /// </summary> |
| | | /// <param name="parter"></param> |
| | | /// <param name="allParterList"></param> |
| | | public void SelectParter(Yw.Model.HydroParterInfo parter, List<Yw.Model.HydroParterInfo> allParterList) |
| | | { |
| | | var vm = Yw.WinFrmUI.HydroParterPropertyViewModelBuilder.CreateViewModel(parter, allParterList); |
| | |
| | | //获取水力信息事件 |
| | | private Yw.Model.HydroModelInfo HydroParterPropertyCtrl1_GetHydroInfoEvent() |
| | | { |
| | | var hydroInfo = GetHydroInfoEvent?.Invoke(); |
| | | var hydroInfo = _hydroInfoFunc?.Invoke(); |
| | | return hydroInfo; |
| | | } |
| | | |
| | |
| | | { |
| | | case Yw.WinFrmUI.HydroCurve.Pump: |
| | | { |
| | | var hydroInfo = GetHydroInfoEvent?.Invoke(); |
| | | var hydroInfo = _hydroInfoFunc?.Invoke(); |
| | | if (hydroInfo == null) |
| | | { |
| | | return false; |
| | |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 绑定数据 |
| | | /// </summary> |
| | | public void SetBindingData() |
| | | { |
| | | this.ShowXhsProjectInfoEvent?.Invoke(this.svgImg32[0]); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示循环水项目信息事件 |
| | | /// </summary> |
| | | public event Action<SvgImage> ShowXhsProjectInfoEvent; |
| | |
| | | private void InitializeComponent() |
| | | { |
| | | tabPane1 = new DevExpress.XtraBars.Navigation.TabPane(); |
| | | btnModelView = new SimpleButton(); |
| | | btnViewModel = new SimpleButton(); |
| | | tabPageElbows = new DevExpress.XtraBars.Navigation.TabNavigationPage(); |
| | | xhsProjectSimulationElbowUnMatchingListCtrl1 = new XhsProjectSimulationElbowUnMatchingListCtrl(); |
| | | tabPageThreelinks = new DevExpress.XtraBars.Navigation.TabNavigationPage(); |
| | |
| | | // tabPane1 |
| | | // |
| | | tabPane1.AllowHtmlDraw = false; |
| | | tabPane1.Controls.Add(btnModelView); |
| | | tabPane1.Controls.Add(btnViewModel); |
| | | tabPane1.Controls.Add(tabPageElbows); |
| | | tabPane1.Controls.Add(tabPageThreelinks); |
| | | tabPane1.Controls.Add(tabPageFourlinks); |
| | |
| | | tabPane1.TabIndex = 0; |
| | | tabPane1.Text = "tabPane1"; |
| | | // |
| | | // btnModelView |
| | | // btnViewModel |
| | | // |
| | | btnModelView.Anchor = AnchorStyles.Top | AnchorStyles.Right; |
| | | btnModelView.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; |
| | | btnModelView.Appearance.Options.UseBackColor = true; |
| | | btnModelView.Location = new Point(923, 1); |
| | | btnModelView.Name = "btnModelView"; |
| | | btnModelView.Size = new Size(102, 20); |
| | | btnModelView.TabIndex = 18; |
| | | btnModelView.Text = "模型查看"; |
| | | btnModelView.Click += btnModelView_Click; |
| | | btnViewModel.Anchor = AnchorStyles.Top | AnchorStyles.Right; |
| | | btnViewModel.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; |
| | | btnViewModel.Appearance.Options.UseBackColor = true; |
| | | btnViewModel.Location = new Point(923, 1); |
| | | btnViewModel.Name = "btnViewModel"; |
| | | btnViewModel.Size = new Size(102, 20); |
| | | btnViewModel.TabIndex = 18; |
| | | btnViewModel.Text = "显示所有"; |
| | | btnViewModel.Click += btnViewModel_Click; |
| | | // |
| | | // tabPageElbows |
| | | // |
| | |
| | | xhsProjectSimulationElbowUnMatchingListCtrl1.Dock = DockStyle.Fill; |
| | | xhsProjectSimulationElbowUnMatchingListCtrl1.Location = new Point(0, 1); |
| | | xhsProjectSimulationElbowUnMatchingListCtrl1.Name = "xhsProjectSimulationElbowUnMatchingListCtrl1"; |
| | | xhsProjectSimulationElbowUnMatchingListCtrl1.ShowFindPanel = false; |
| | | xhsProjectSimulationElbowUnMatchingListCtrl1.Size = new Size(1028, 595); |
| | | xhsProjectSimulationElbowUnMatchingListCtrl1.TabIndex = 0; |
| | | // |
| | |
| | | xhsProjectSimulationThreelinkUnMatchingListCtrl1.Dock = DockStyle.Fill; |
| | | xhsProjectSimulationThreelinkUnMatchingListCtrl1.Location = new Point(0, 1); |
| | | xhsProjectSimulationThreelinkUnMatchingListCtrl1.Name = "xhsProjectSimulationThreelinkUnMatchingListCtrl1"; |
| | | xhsProjectSimulationThreelinkUnMatchingListCtrl1.ShowFindPanel = false; |
| | | xhsProjectSimulationThreelinkUnMatchingListCtrl1.Size = new Size(1028, 595); |
| | | xhsProjectSimulationThreelinkUnMatchingListCtrl1.TabIndex = 0; |
| | | // |
| | |
| | | xhsProjectSimulationFourlinkUnMatchingListCtrl1.Dock = DockStyle.Fill; |
| | | xhsProjectSimulationFourlinkUnMatchingListCtrl1.Location = new Point(0, 1); |
| | | xhsProjectSimulationFourlinkUnMatchingListCtrl1.Name = "xhsProjectSimulationFourlinkUnMatchingListCtrl1"; |
| | | xhsProjectSimulationFourlinkUnMatchingListCtrl1.ShowFindPanel = false; |
| | | xhsProjectSimulationFourlinkUnMatchingListCtrl1.Size = new Size(1028, 595); |
| | | xhsProjectSimulationFourlinkUnMatchingListCtrl1.TabIndex = 0; |
| | | // |
| | |
| | | xhsProjectSimulationPipeUnMatchingListCtrl1.Dock = DockStyle.Fill; |
| | | xhsProjectSimulationPipeUnMatchingListCtrl1.Location = new Point(0, 1); |
| | | xhsProjectSimulationPipeUnMatchingListCtrl1.Name = "xhsProjectSimulationPipeUnMatchingListCtrl1"; |
| | | xhsProjectSimulationPipeUnMatchingListCtrl1.ShowFindPanel = false; |
| | | xhsProjectSimulationPipeUnMatchingListCtrl1.Size = new Size(1028, 595); |
| | | xhsProjectSimulationPipeUnMatchingListCtrl1.TabIndex = 0; |
| | | // |
| | |
| | | xhsProjectSimulationPumpUnMatchingListCtrl1.Dock = DockStyle.Fill; |
| | | xhsProjectSimulationPumpUnMatchingListCtrl1.Location = new Point(0, 1); |
| | | xhsProjectSimulationPumpUnMatchingListCtrl1.Name = "xhsProjectSimulationPumpUnMatchingListCtrl1"; |
| | | xhsProjectSimulationPumpUnMatchingListCtrl1.ShowFindPanel = false; |
| | | xhsProjectSimulationPumpUnMatchingListCtrl1.Size = new Size(1028, 595); |
| | | xhsProjectSimulationPumpUnMatchingListCtrl1.TabIndex = 0; |
| | | // |
| | |
| | | xhsProjectSimulationValveUnMatchingListCtrl1.Dock = DockStyle.Fill; |
| | | xhsProjectSimulationValveUnMatchingListCtrl1.Location = new Point(0, 1); |
| | | xhsProjectSimulationValveUnMatchingListCtrl1.Name = "xhsProjectSimulationValveUnMatchingListCtrl1"; |
| | | xhsProjectSimulationValveUnMatchingListCtrl1.ShowFindPanel = false; |
| | | xhsProjectSimulationValveUnMatchingListCtrl1.Size = new Size(1028, 595); |
| | | xhsProjectSimulationValveUnMatchingListCtrl1.TabIndex = 0; |
| | | // |
| | |
| | | private XhsProjectSimulationPipeUnMatchingListCtrl xhsProjectSimulationPipeUnMatchingListCtrl1; |
| | | private XhsProjectSimulationPumpUnMatchingListCtrl xhsProjectSimulationPumpUnMatchingListCtrl1; |
| | | private XhsProjectSimulationValveUnMatchingListCtrl xhsProjectSimulationValveUnMatchingListCtrl1; |
| | | private SimpleButton btnModelView; |
| | | private SimpleButton btnViewModel; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | //模型查看 |
| | | private void btnModelView_Click(object sender, EventArgs e) |
| | | private void btnViewModel_Click(object sender, EventArgs e) |
| | | { |
| | | if (_hydroInfo == null) |
| | | { |
| | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroPumpInfo> HydroClickEvent; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroValveInfo> HydroClickEvent; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroPipeInfo> HydroClickEvent; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroElbowInfo> HydroClickEvent; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroThreelinkInfo> HydroClickEvent; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroFourlinkInfo> HydroClickEvent; |
| | |
| | | await this.xhsProjectSimulationBimfaceCtrl1.SetBindingData(_project, _projectSite, () => _hydroInfo); |
| | | this.xhsProjectSimulationQ3dCtrl1.SetBindingData(_hydroInfo); |
| | | this.xhsProjectSimulationL3dCtrl1.SetBindingData(_hydroInfo); |
| | | } |
| | | |
| | | //属性面板获取水力信息事件 |
| | | private Yw.Model.HydroModelInfo xhsProjectSimulationPropertyCtrl1_GetHydroInfoEvent() |
| | | { |
| | | return _hydroInfo; |
| | | this.xhsProjectSimulationPropertyCtrl1.SetBindingData(() => _hydroInfo); |
| | | } |
| | | |
| | | //水力计算 |
| | |
| | | |
| | | #endregion Bimface |
| | | |
| | | #region 属性面板 |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #region 自动匹配 |
| | | |
| | | //自动匹配 |
| | |
| | | private Yw.Model.HydroModelInfo _hydroInfo = null;//水力信息 |
| | | |
| | | /// <summary> |
| | | /// 绑定数据 |
| | | /// </summary> |
| | | public async Task SetBindingData(long projectId) |
| | | { |
| | | _project = await BLLFactory<HStation.BLL.XhsProject>.Instance.GetByID(projectId); |
| | | await SetBindingData(_project); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 设置数据 |
| | | /// </summary> |
| | | public async Task SetBindingData(XhsProjectVmo project) |
| | |
| | | _projectId = project.ID; |
| | | this.PageTitle.Caption = $"{_project.Name}\r\n水力模拟"; |
| | | await this.xhsProjectSimulationSchemeMgrCtrl1.SetBindingData(_project); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 绑定数据 |
| | | /// </summary> |
| | | public async Task SetBindingData(long projectId) |
| | | { |
| | | _project = await BLLFactory<HStation.BLL.XhsProject>.Instance.GetByID(projectId); |
| | | await SetBindingData(_project); |
| | | //this.xhsSchemeMgrListCtrl1.SetMatching(projectId); |
| | | //_project = await new BLL.XhsProjectStd().GetByID(projectId); |
| | | //this.PageTitle.Caption = |
| | | //var projectSite = await new BLL.XhsProjectSiteStd().GetDefaultByProjectID(_project.ID); |
| | | //if (projectSite == null) |
| | | //{ |
| | | // return; |
| | | //} |
| | | |
| | | //var relation = await new Yw.BLL.HydroModelRelation() |
| | | // .GetDefaultByObjectTypeAndObjectIDOfPurpose(HStation.Xhs.DataType.XhsProjectSite, projectSite.ID, Yw.Bimface.Purpose.Simulation); |
| | | //if (relation == null) |
| | | //{ |
| | | // return; |
| | | //} |
| | | |
| | | //_hydroInfo = await new Yw.BLL.HydroModelInfo().GetByID(relation.ModelID); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | var hydroRelation = await BLLFactory<Yw.BLL.HydroModelRelation>.Instance |
| | | .GetDefaultByObjectTypeAndObjectIDOfPurpose(HStation.Xhs.DataType.XhsProjectSite, _projectSite.ID, HStation.Xhs.Purpose.Simulation); |
| | | _hydroInfo = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.GetByID(hydroRelation.ModelID); |
| | | this.xhsProjectSimulationFunctionMgrCtrl1.SetBindingData(); |
| | | } |
| | | } |
| | | |
| | |
| | | private void XhsProjectSimulationFunctionMgrCtrl1_CompareXhsProjectSchemeEvent(DevExpress.Utils.Svg.SvgImage obj) |
| | | { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //功能点击 |
| | | private async void accordionControl1_ElementClick(object sender, DevExpress.XtraBars.Navigation.ElementClickEventArgs e) |
| | | { |
| | | var tag = e.Element.Tag; |
| | | if (tag is not string code) |
| | | return; |
| | | |
| | | var svg_image_size = new Size(24, 24); |
| | | switch (code) |
| | | { |
| | | case "basic_info": |
| | | { |
| | | var guid = new PageGuid() |
| | | { |
| | | Modular = this.PageGuid.Modular, |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "basic_info", |
| | | }; |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new XhsSchemeBasicInfoPage(); |
| | | page.SetBindingData(_project.ID); |
| | | page.PageTitle.Caption = e.Element.Text; |
| | | page.PageTitle.HeaderSvgImage = e.Element.ImageOptions.SvgImage; |
| | | page.PageTitle.SvgImageSize = svg_image_size; |
| | | CreatePage(page, guid); |
| | | } |
| | | } |
| | | break; |
| | | case "asset_mgr": |
| | | { |
| | | var guid = new PageGuid() |
| | | { |
| | | Modular = this.PageGuid.Modular, |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "asset_mgr", |
| | | }; |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new XhsSchemeAssetMgrPage(); |
| | | await page.SetBindingData(_project.ID); |
| | | page.PageTitle.Caption = e.Element.Text; |
| | | page.PageTitle.HeaderSvgImage = e.Element.ImageOptions.SvgImage; |
| | | page.PageTitle.SvgImageSize = svg_image_size; |
| | | CreatePage(page, guid); |
| | | } |
| | | } |
| | | break; |
| | | case "hydraulic_simulation": |
| | | { |
| | | var guid = new PageGuid() |
| | | { |
| | | Modular = this.PageGuid.Modular, |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "hydraulic_simulation", |
| | | }; |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new XhsSchemeHydraulicSimulationPage(); |
| | | await page.SetBindingData(_project.ID); |
| | | page.PageTitle.Caption = e.Element.Text; |
| | | page.PageTitle.HeaderSvgImage = e.Element.ImageOptions.SvgImage; |
| | | page.PageTitle.SvgImageSize = svg_image_size; |
| | | CreatePage(page, guid); |
| | | } |
| | | } |
| | | break; |
| | | case "create_scheme": |
| | | { |
| | | var dlg = new CreateSchemeDlg(); |
| | | dlg.ShowDialog(); |
| | | } |
| | | break; |
| | | case "scheme_comparison": |
| | | { |
| | | var guid = new PageGuid() |
| | | { |
| | | Modular = this.PageGuid.Modular, |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "scheme_comparison", |
| | | }; |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new XhsSchemeComparisonPage(); |
| | | page.PageTitle.Caption = e.Element.Text; |
| | | page.PageTitle.HeaderSvgImage = e.Element.ImageOptions.SvgImage; |
| | | page.PageTitle.SvgImageSize = svg_image_size; |
| | | CreatePage(page, guid); |
| | | } |
| | | } |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | |
| | | #region TabbedView 相关事件处理程序 |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroJunctionInfo> HydroClickEvent; |
| | |
| | | /// <summary> |
| | | /// 绑定数据 |
| | | /// </summary> |
| | | /// <param name="allJunctionList"></param> |
| | | public void SetBindingData(List<Yw.Model.HydroJunctionInfo> allJunctionList) |
| | | { |
| | | _allBindingList = new List<HydroJunctionViewModel>(); |
| | |
| | | this.HydroClickEvent?.Invoke(row.Vmo); |
| | | } |
| | | |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroNozzleInfo> HydroClickEvent; |
| | | |
| | | private List<HydroNozzleViewModel> _allBindingList = null;//所有绑定列表 |
| | | //所有绑定列表 |
| | | private List<HydroNozzleViewModel> _allBindingList = null; |
| | | |
| | | /// <summary> |
| | | /// 绑定数据 |
| | | /// </summary> |
| | | /// <param name="allNozzleList"></param> |
| | | public void SetBindingData(List<Yw.Model.HydroNozzleInfo> allNozzleList) |
| | | { |
| | | _allBindingList = new List<HydroNozzleViewModel>(); |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroHydrantInfo> HydroClickEvent; |
| | | |
| | | private List<HydroHydrantViewModel> _allBindingList = null;//所有绑定列表 |
| | | //所有绑定列表 |
| | | private List<HydroHydrantViewModel> _allBindingList = null; |
| | | |
| | | /// <summary> |
| | | /// 绑定数据 |
| | | /// </summary> |
| | | /// <param name="allHydrantList"></param> |
| | | public void SetBindingData(List<Yw.Model.HydroHydrantInfo> allHydrantList) |
| | | { |
| | | _allBindingList = new List<HydroHydrantViewModel>(); |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroElbowInfo> HydroClickEvent; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroThreelinkInfo> HydroClickEvent; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroFourlinkInfo> HydroClickEvent; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroMeterInfo> HydroClickEvent; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroFlowmeterInfo> HydroClickEvent; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroPressmeterInfo> HydroClickEvent; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroBluntheadInfo> HydroClickEvent; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroReservoirInfo> HydroClickEvent; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroTankInfo> HydroClickEvent; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroWaterboxInfo> HydroClickEvent; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroPipeInfo> HydroClickEvent; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroExchangerInfo> HydroClickEvent; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroTranslationInfo> HydroClickEvent; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroPumpInfo> HydroClickEvent; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示查询面板 |
| | | /// </summary> |
| | | [Browsable(true)] |
| | | [Description("显示查询面板")] |
| | | [DefaultValue(true)] |
| | | public bool ShowFindPanel |
| | | { |
| | | get { return this.gridView1.OptionsFind.AlwaysVisible; } |
| | | set { this.gridView1.OptionsFind.AlwaysVisible = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 水力点击事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroValveInfo> HydroClickEvent; |
| | |
| | | { |
| | | X = -center.X, |
| | | Y = -center.Y, |
| | | Z = -boundingBox.Max.Z * 3f |
| | | Z = -center.Z |
| | | }; |
| | | } |
| | | |
| | |
| | | } |
| | | return new LookAt3d() |
| | | { |
| | | Eye = new Point3d(0, 0, 0), |
| | | Eye = new Point3d(0, 0, 3 * boundingBox.Max.Z), |
| | | Center = new Point3d(0, 0, 0), |
| | | Up = new Point3d(0, 1, 0) |
| | | }; |
| | |
| | | namespace Yw.WinFrmUI.HydroL3d |
| | | using Yw.Untity; |
| | | |
| | | namespace Yw.WinFrmUI.HydroL3d |
| | | { |
| | | public partial class NetworkPanel : DevExpress.XtraEditors.XtraUserControl |
| | | { |
| | |
| | | |
| | | _network.Draw(gl); |
| | | |
| | | float[] minCorner = { _paras.BoundingBox.Min.X, _paras.BoundingBox.Min.Y, _paras.BoundingBox.Min.Z }; |
| | | float[] maxCorner = { _paras.BoundingBox.Max.X, _paras.BoundingBox.Max.Y, _paras.BoundingBox.Max.Z }; |
| | | //float[] minCorner = { _paras.BoundingBox.Min.X, _paras.BoundingBox.Min.Y, _paras.BoundingBox.Min.Z }; |
| | | //float[] maxCorner = { _paras.BoundingBox.Max.X, _paras.BoundingBox.Max.Y, _paras.BoundingBox.Max.Z }; |
| | | |
| | | gl.Begin(OpenGL.GL_POINT); |
| | | gl.Vertex(minCorner[0], minCorner[1], minCorner[2]); |
| | | gl.End(); |
| | | //gl.Begin(OpenGL.GL_POINT); |
| | | //gl.Vertex(minCorner[0], minCorner[1], minCorner[2]); |
| | | //gl.End(); |
| | | |
| | | gl.Begin(OpenGL.GL_POINT); |
| | | gl.Vertex(maxCorner[0], maxCorner[1], maxCorner[2]); |
| | | gl.End(); |
| | | //gl.Begin(OpenGL.GL_POINT); |
| | | //gl.Vertex(maxCorner[0], maxCorner[1], maxCorner[2]); |
| | | //gl.End(); |
| | | |
| | | gl.Begin(OpenGL.GL_LINE_LOOP); |
| | | // 绘制底面 |
| | | gl.Vertex(minCorner[0], minCorner[1], minCorner[2]); |
| | | gl.Vertex(maxCorner[0], minCorner[1], minCorner[2]); |
| | | gl.Vertex(maxCorner[0], maxCorner[1], minCorner[2]); |
| | | gl.Vertex(minCorner[0], maxCorner[1], minCorner[2]); |
| | | //gl.Begin(OpenGL.GL_LINE_LOOP); |
| | | //// 绘制底面 |
| | | //gl.Vertex(minCorner[0], minCorner[1], minCorner[2]); |
| | | //gl.Vertex(maxCorner[0], minCorner[1], minCorner[2]); |
| | | //gl.Vertex(maxCorner[0], maxCorner[1], minCorner[2]); |
| | | //gl.Vertex(minCorner[0], maxCorner[1], minCorner[2]); |
| | | |
| | | // 绘制顶面 |
| | | gl.Vertex(minCorner[0], minCorner[1], maxCorner[2]); |
| | | gl.Vertex(maxCorner[0], minCorner[1], maxCorner[2]); |
| | | gl.Vertex(maxCorner[0], maxCorner[1], maxCorner[2]); |
| | | gl.Vertex(minCorner[0], maxCorner[1], maxCorner[2]); |
| | | //// 绘制顶面 |
| | | //gl.Vertex(minCorner[0], minCorner[1], maxCorner[2]); |
| | | //gl.Vertex(maxCorner[0], minCorner[1], maxCorner[2]); |
| | | //gl.Vertex(maxCorner[0], maxCorner[1], maxCorner[2]); |
| | | //gl.Vertex(minCorner[0], maxCorner[1], maxCorner[2]); |
| | | |
| | | // 连接底面和顶面的边 |
| | | gl.Vertex(minCorner[0], minCorner[1], minCorner[2]); |
| | | gl.Vertex(minCorner[0], minCorner[1], maxCorner[2]); |
| | | gl.Vertex(maxCorner[0], minCorner[1], minCorner[2]); |
| | | gl.Vertex(maxCorner[0], minCorner[1], maxCorner[2]); |
| | | gl.Vertex(maxCorner[0], maxCorner[1], minCorner[2]); |
| | | gl.Vertex(maxCorner[0], maxCorner[1], maxCorner[2]); |
| | | gl.Vertex(minCorner[0], maxCorner[1], minCorner[2]); |
| | | gl.Vertex(minCorner[0], maxCorner[1], maxCorner[2]); |
| | | gl.End(); |
| | | //// 连接底面和顶面的边 |
| | | //gl.Vertex(minCorner[0], minCorner[1], minCorner[2]); |
| | | //gl.Vertex(minCorner[0], minCorner[1], maxCorner[2]); |
| | | //gl.Vertex(maxCorner[0], minCorner[1], minCorner[2]); |
| | | //gl.Vertex(maxCorner[0], minCorner[1], maxCorner[2]); |
| | | //gl.Vertex(maxCorner[0], maxCorner[1], minCorner[2]); |
| | | //gl.Vertex(maxCorner[0], maxCorner[1], maxCorner[2]); |
| | | //gl.Vertex(minCorner[0], maxCorner[1], minCorner[2]); |
| | | //gl.Vertex(minCorner[0], maxCorner[1], maxCorner[2]); |
| | | //gl.End(); |
| | | |
| | | gl.Flush(); //强制刷新 |
| | | |
| | |
| | | |
| | | private void openGLControl1_MouseMove(object sender, MouseEventArgs e) |
| | | { |
| | | //var list = this.openGLControl1.OpenGL.UnProject(e.X, e.Y, 0); |
| | | //this.labelControl1.Text = DoubleListHelper.ToString(list); |
| | | var list = this.openGLControl1.OpenGL.UnProject(e.X, e.Y, 0); |
| | | this.labelControl1.Text = DoubleListHelper.ToString(list); |
| | | var hasMouseLeftDownRotate = MouseLeftDownRotate(e); |
| | | var hasMouseRightDownMove = MouseRightDownMove(e); |
| | | if (hasMouseLeftDownRotate || hasMouseRightDownMove) |