| | |
| | | xhsProjectSimulationBimfaceCtrl1 = new XhsProjectSimulationBimfaceCtrl(); |
| | | pageQ3d = new DevExpress.XtraBars.Navigation.TabNavigationPage(); |
| | | xhsProjectSimulationQ3dCtrl1 = new XhsProjectSimulationQ3dCtrl(); |
| | | tabPageL3d = new DevExpress.XtraBars.Navigation.TabNavigationPage(); |
| | | dockManager1 = new DevExpress.XtraBars.Docking.DockManager(components); |
| | | docPnlProperty = new DevExpress.XtraBars.Docking.DockPanel(); |
| | | dockPanel1_Container = new DevExpress.XtraBars.Docking.ControlContainer(); |
| | |
| | | controlContainer4 = new DevExpress.XtraBars.Docking.ControlContainer(); |
| | | xhsProjectSimulationUnMatchingListCtrl1 = new XhsProjectSimulationUnMatchingListCtrl(); |
| | | svgImg32 = new DevExpress.Utils.SvgImageCollection(components); |
| | | tabPageL3d = new DevExpress.XtraBars.Navigation.TabNavigationPage(); |
| | | xhsProjectSimulationL3dCtrl1 = new XhsProjectSimulationL3dCtrl(); |
| | | ((ISupportInitialize)ribbonControl1).BeginInit(); |
| | | ((ISupportInitialize)tabPane1).BeginInit(); |
| | | tabPane1.SuspendLayout(); |
| | | pageBimface.SuspendLayout(); |
| | | pageQ3d.SuspendLayout(); |
| | | tabPageL3d.SuspendLayout(); |
| | | ((ISupportInitialize)dockManager1).BeginInit(); |
| | | docPnlProperty.SuspendLayout(); |
| | | dockPanel1_Container.SuspendLayout(); |
| | |
| | | docPnlUnMatchingList.SuspendLayout(); |
| | | controlContainer4.SuspendLayout(); |
| | | ((ISupportInitialize)svgImg32).BeginInit(); |
| | | tabPageL3d.SuspendLayout(); |
| | | SuspendLayout(); |
| | | // |
| | | // ribbonControl1 |
| | |
| | | xhsProjectSimulationQ3dCtrl1.Size = new Size(776, 301); |
| | | xhsProjectSimulationQ3dCtrl1.TabIndex = 0; |
| | | // |
| | | // tabPageL3d |
| | | // |
| | | tabPageL3d.Caption = "L3d"; |
| | | tabPageL3d.Controls.Add(xhsProjectSimulationL3dCtrl1); |
| | | tabPageL3d.Name = "tabPageL3d"; |
| | | tabPageL3d.Size = new Size(886, 195); |
| | | // |
| | | // dockManager1 |
| | | // |
| | | dockManager1.Form = this; |
| | |
| | | svgImg32.ImageSize = new Size(32, 32); |
| | | svgImg32.Add("calculatesheet", "image://svgimages/spreadsheet/calculatesheet.svg"); |
| | | // |
| | | // tabPageL3d |
| | | // |
| | | tabPageL3d.Caption = "L3d"; |
| | | tabPageL3d.Controls.Add(xhsProjectSimulationL3dCtrl1); |
| | | tabPageL3d.Name = "tabPageL3d"; |
| | | tabPageL3d.Size = new Size(886, 195); |
| | | // |
| | | // xhsProjectSimulationL3dCtrl1 |
| | | // |
| | | xhsProjectSimulationL3dCtrl1.Dock = DockStyle.Fill; |
| | |
| | | tabPane1.ResumeLayout(false); |
| | | pageBimface.ResumeLayout(false); |
| | | pageQ3d.ResumeLayout(false); |
| | | tabPageL3d.ResumeLayout(false); |
| | | ((ISupportInitialize)dockManager1).EndInit(); |
| | | docPnlProperty.ResumeLayout(false); |
| | | dockPanel1_Container.ResumeLayout(false); |
| | |
| | | docPnlUnMatchingList.ResumeLayout(false); |
| | | controlContainer4.ResumeLayout(false); |
| | | ((ISupportInitialize)svgImg32).EndInit(); |
| | | tabPageL3d.ResumeLayout(false); |
| | | ResumeLayout(false); |
| | | PerformLayout(); |
| | | } |
| | |
| | | /// </summary> |
| | | private void InitializeComponent() |
| | | { |
| | | networkPanel1 = new Yw.WinFrmUI.HydroL3d.NetworkPanel(); |
| | | networkPanelDebug1 = new Yw.WinFrmUI.HydroL3d.NetworkPanelDebug(); |
| | | SuspendLayout(); |
| | | // |
| | | // networkPanel1 |
| | | // networkPanelDebug1 |
| | | // |
| | | networkPanel1.Dock = DockStyle.Fill; |
| | | networkPanel1.Location = new Point(0, 0); |
| | | networkPanel1.Name = "networkPanel1"; |
| | | networkPanel1.Size = new Size(889, 597); |
| | | networkPanel1.TabIndex = 0; |
| | | networkPanelDebug1.Dock = DockStyle.Fill; |
| | | networkPanelDebug1.Location = new Point(0, 0); |
| | | networkPanelDebug1.Name = "networkPanelDebug1"; |
| | | networkPanelDebug1.Size = new Size(889, 597); |
| | | networkPanelDebug1.TabIndex = 0; |
| | | // |
| | | // XhsProjectSimulationL3dCtrl |
| | | // |
| | | AutoScaleDimensions = new SizeF(7F, 14F); |
| | | AutoScaleMode = AutoScaleMode.Font; |
| | | Controls.Add(networkPanel1); |
| | | Controls.Add(networkPanelDebug1); |
| | | Name = "XhsProjectSimulationL3dCtrl"; |
| | | Size = new Size(889, 597); |
| | | ResumeLayout(false); |
| | |
| | | |
| | | #endregion |
| | | |
| | | private Yw.WinFrmUI.HydroL3d.NetworkPanel networkPanel1; |
| | | private Yw.WinFrmUI.HydroL3d.NetworkPanelDebug networkPanelDebug1; |
| | | } |
| | | } |
| | |
| | | return; |
| | | } |
| | | var netWork = Yw.WinFrmUI.HydroL3dTransferHelper.ToL3dNetworkViewModel(rhs); |
| | | this.networkPanel1.Initial(netWork); |
| | | this.networkPanelDebug1.Initial(netWork); |
| | | } |
| | | |
| | | |
| | |
| | |  |
| | | |
| | | using DevExpress.Pdf.ContentGeneration.Fonts; |
| | | using DevExpress.XtraExport.Implementation; |
| | | using Yw.WinFrmUI.HydroL3d; |
| | | |
| | | namespace Yw.WinFrmUI |
| | |
| | | { |
| | | foreach (var junction in rhs.Junctions) |
| | | { |
| | | |
| | | var junctionViewModel = new Junction(); |
| | | junctionViewModel.Id = junction.Code; |
| | | junctionViewModel.Name = junction.Name; |
| | | junctionViewModel.Position = new Point3d(junction.Position3d.X, junction.Position3d.Y, junction.Position3d.Z); |
| | | vm.Append(junctionViewModel, out _); |
| | | } |
| | | } |
| | | if (rhs.Nozzles != null && rhs.Nozzles.Count > 0) |
| | | { |
| | | foreach (var nozzle in rhs.Nozzles) |
| | | { |
| | | |
| | | var nozzleViewModel = new Junction(); |
| | | nozzleViewModel.Id = nozzle.Code; |
| | | nozzleViewModel.Name = nozzle.Name; |
| | | nozzleViewModel.Position = new Point3d(nozzle.Position3d.X, nozzle.Position3d.Y, nozzle.Position3d.Z); |
| | | vm.Append(nozzleViewModel, out _); |
| | | } |
| | | } |
| | | if (rhs.Hydrants != null && rhs.Hydrants.Count > 0) |
| | | { |
| | | foreach (var hydrant in rhs.Hydrants) |
| | | { |
| | | |
| | | var hydrantViewModel = new Junction(); |
| | | hydrantViewModel.Id = hydrant.Code; |
| | | hydrantViewModel.Name = hydrant.Name; |
| | | hydrantViewModel.Position = new Point3d(hydrant.Position3d.X, hydrant.Position3d.Y, hydrant.Position3d.Z); |
| | | vm.Append(hydrantViewModel, out _); |
| | | } |
| | | } |
| | | if (rhs.Elbows != null && rhs.Elbows.Count > 0) |
| | | { |
| | | foreach (var elbow in rhs.Elbows) |
| | | { |
| | | |
| | | var elbowViewModel = new Junction(); |
| | | elbowViewModel.Id = elbow.Code; |
| | | elbowViewModel.Name = elbow.Name; |
| | | elbowViewModel.Position = new Point3d(elbow.Position3d.X, elbow.Position3d.Y, elbow.Position3d.Z); |
| | | vm.Append(elbowViewModel, out _); |
| | | } |
| | | } |
| | | if (rhs.Threelinks != null && rhs.Threelinks.Count > 0) |
| | | { |
| | | foreach (var threelink in rhs.Threelinks) |
| | | { |
| | | |
| | | var threelinkViewModel = new Junction(); |
| | | threelinkViewModel.Id = threelink.Code; |
| | | threelinkViewModel.Name = threelink.Name; |
| | | threelinkViewModel.Position = new Point3d(threelink.Position3d.X, threelink.Position3d.Y, threelink.Position3d.Z); |
| | | vm.Append(threelinkViewModel, out _); |
| | | } |
| | | } |
| | | if (rhs.Fourlinks != null && rhs.Fourlinks.Count > 0) |
| | | { |
| | | foreach (var fourlink in rhs.Fourlinks) |
| | | { |
| | | |
| | | var fourlinkViewModel = new Junction(); |
| | | fourlinkViewModel.Id = fourlink.Code; |
| | | fourlinkViewModel.Name = fourlink.Name; |
| | | fourlinkViewModel.Position = new Point3d(fourlink.Position3d.X, fourlink.Position3d.Y, fourlink.Position3d.Z); |
| | | vm.Append(fourlinkViewModel, out _); |
| | | } |
| | | } |
| | | if (rhs.Meters != null && rhs.Meters.Count > 0) |
| | | { |
| | | foreach (var meter in rhs.Meters) |
| | | { |
| | | |
| | | var meterViewModel = new Junction(); |
| | | meterViewModel.Id = meter.Code; |
| | | meterViewModel.Name = meter.Name; |
| | | meterViewModel.Position = new Point3d(meter.Position3d.X, meter.Position3d.Y, meter.Position3d.Z); |
| | | vm.Append(meterViewModel, out _); |
| | | } |
| | | } |
| | | if (rhs.Flowmeters != null && rhs.Flowmeters.Count > 0) |
| | | { |
| | | foreach (var flowmeter in rhs.Flowmeters) |
| | | { |
| | | |
| | | var flowmeterViewModel = new Junction(); |
| | | flowmeterViewModel.Id = flowmeter.Code; |
| | | flowmeterViewModel.Name = flowmeter.Name; |
| | | flowmeterViewModel.Position = new Point3d(flowmeter.Position3d.X, flowmeter.Position3d.Y, flowmeter.Position3d.Z); |
| | | vm.Append(flowmeterViewModel, out _); |
| | | } |
| | | } |
| | | if (rhs.Pressmeters != null && rhs.Pressmeters.Count > 0) |
| | | { |
| | | foreach (var pressmeter in rhs.Pressmeters) |
| | | { |
| | | |
| | | var pressmeterViewModel = new Junction(); |
| | | pressmeterViewModel.Id = pressmeter.Code; |
| | | pressmeterViewModel.Name = pressmeter.Name; |
| | | pressmeterViewModel.Position = new Point3d(pressmeter.Position3d.X, pressmeter.Position3d.Y, pressmeter.Position3d.Z); |
| | | vm.Append(pressmeterViewModel, out _); |
| | | } |
| | | } |
| | | if (rhs.Bluntheads != null && rhs.Bluntheads.Count > 0) |
| | | { |
| | | foreach (var blunthead in rhs.Bluntheads) |
| | | { |
| | | |
| | | var bluntheadViewModel = new Junction(); |
| | | bluntheadViewModel.Id = blunthead.Code; |
| | | bluntheadViewModel.Name = blunthead.Name; |
| | | bluntheadViewModel.Position = new Point3d(blunthead.Position3d.X, blunthead.Position3d.Y, blunthead.Position3d.Z); |
| | | vm.Append(bluntheadViewModel, out _); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | foreach (var reservoir in rhs.Reservoirs) |
| | | { |
| | | |
| | | var reservoirViewModel = new Reservoir(); |
| | | reservoirViewModel.Id = reservoir.Code; |
| | | reservoirViewModel.Name = reservoir.Name; |
| | | reservoirViewModel.Position = new Point3d(reservoir.Position3d.X, reservoir.Position3d.Y, reservoir.Position3d.Z); |
| | | vm.Append(reservoirViewModel, out _); |
| | | } |
| | | } |
| | | if (rhs.Tanks != null && rhs.Tanks.Count > 0) |
| | | { |
| | | foreach (var tank in rhs.Tanks) |
| | | { |
| | | |
| | | var tankViewModel = new Tank(); |
| | | tankViewModel.Id = tank.Code; |
| | | tankViewModel.Name = tank.Name; |
| | | tankViewModel.Position = new Point3d(tank.Position3d.X, tank.Position3d.Y, tank.Position3d.Z); |
| | | vm.Append(tankViewModel, out _); |
| | | } |
| | | } |
| | | if (rhs.Waterboxs != null && rhs.Waterboxs.Count > 0) |
| | | { |
| | | foreach (var waterbox in rhs.Waterboxs) |
| | | { |
| | | |
| | | var waterboxViewModel = new Tank(); |
| | | waterboxViewModel.Id = waterbox.Code; |
| | | waterboxViewModel.Name = waterbox.Name; |
| | | waterboxViewModel.Position = new Point3d(waterbox.Position3d.X, waterbox.Position3d.Y, waterbox.Position3d.Z); |
| | | vm.Append(waterboxViewModel, out _); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | foreach (var translation in rhs.Translations) |
| | | { |
| | | |
| | | var startNode = rhs.GetAllNodes().Find(x => x.Code == translation.StartCode); |
| | | var endNode = rhs.GetAllNodes().Find(x => x.Code == translation.EndCode); |
| | | var pipeViewModel = new Pipe(); |
| | | pipeViewModel.Id = translation.Code; |
| | | pipeViewModel.Name = translation.Name; |
| | | pipeViewModel.StartPosition = new Point3d(startNode.Position3d.X, startNode.Position3d.Y, startNode.Position3d.Z); |
| | | pipeViewModel.EndPosition = new Point3d(endNode.Position3d.X, endNode.Position3d.Y, endNode.Position3d.Z); |
| | | vm.Append(pipeViewModel, out _); |
| | | } |
| | | } |
| | | if (rhs.Exchangers != null && rhs.Exchangers.Count > 0) |
| | | { |
| | | foreach (var exchanger in rhs.Exchangers) |
| | | { |
| | | |
| | | var startNode = rhs.GetAllNodes().Find(x => x.Code == exchanger.StartCode); |
| | | var endNode = rhs.GetAllNodes().Find(x => x.Code == exchanger.EndCode); |
| | | var pipeViewModel = new Pipe(); |
| | | pipeViewModel.Id = exchanger.Code; |
| | | pipeViewModel.Name = exchanger.Name; |
| | | pipeViewModel.StartPosition = new Point3d(startNode.Position3d.X, startNode.Position3d.Y, startNode.Position3d.Z); |
| | | pipeViewModel.EndPosition = new Point3d(endNode.Position3d.X, endNode.Position3d.Y, endNode.Position3d.Z); |
| | | vm.Append(pipeViewModel, out _); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | foreach (var pump in rhs.Pumps) |
| | | { |
| | | |
| | | var startNode = rhs.GetAllNodes().Find(x => x.Code == pump.StartCode); |
| | | var endNode = rhs.GetAllNodes().Find(x => x.Code == pump.EndCode); |
| | | var pipeViewModel = new Pipe(); |
| | | pipeViewModel.Id = pump.Code; |
| | | pipeViewModel.Name = pump.Name; |
| | | pipeViewModel.StartPosition = new Point3d(startNode.Position3d.X, startNode.Position3d.Y, startNode.Position3d.Z); |
| | | pipeViewModel.EndPosition = new Point3d(endNode.Position3d.X, endNode.Position3d.Y, endNode.Position3d.Z); |
| | | vm.Append(pipeViewModel, out _); |
| | | } |
| | | } |
| | | if (rhs.Valves != null && rhs.Valves.Count > 0) |
| | | { |
| | | foreach (var valve in rhs.Valves) |
| | | { |
| | | |
| | | var startNode = rhs.GetAllNodes().Find(x => x.Code == valve.StartCode); |
| | | var endNode = rhs.GetAllNodes().Find(x => x.Code == valve.EndCode); |
| | | var pipeViewModel = new Pipe(); |
| | | pipeViewModel.Id = valve.Code; |
| | | pipeViewModel.Name = valve.Name; |
| | | pipeViewModel.StartPosition = new Point3d(startNode.Position3d.X, startNode.Position3d.Y, startNode.Position3d.Z); |
| | | pipeViewModel.EndPosition = new Point3d(endNode.Position3d.X, endNode.Position3d.Y, endNode.Position3d.Z); |
| | | vm.Append(pipeViewModel, out _); |
| | | } |
| | | } |
| | | |
| | | return vm; |
| | | |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using DevExpress.CodeParser; |
| | | using DevExpress.Mvvm.POCO; |
| | | |
| | | namespace Yw.WinFrmUI.HydroL3d |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [TypeConverter(typeof(PropertySorter))] |
| | | public class BoundingBox3d |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public BoundingBox3d() { } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public BoundingBox3d(Point3d min, Point3d max) |
| | | { |
| | | this.Min = new Point3d(min); |
| | | this.Max = new Point3d(max); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [DisplayName("Min")] |
| | | [PropertyOrder(1)] |
| | | public Point3d Min { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [DisplayName("Max")] |
| | | [PropertyOrder(2)] |
| | | public Point3d Max { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åä¸å¿ |
| | | /// </summary> |
| | | public Point3d GetCenter() |
| | | { |
| | | return new Point3d() |
| | | { |
| | | X = (this.Min.X + this.Max.X) / 2f, |
| | | Y = (this.Min.Y + this.Max.Y) / 2f, |
| | | Z = (this.Min.Z + this.Max.Z) / 2f |
| | | }; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace Yw.WinFrmUI.HydroL3d |
| | | { |
| | | [TypeConverter(typeof(PropertySorter))] |
| | | public class LookAt3d |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public Point3d Eye { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public Point3d Center { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public Point3d Up { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace Yw.WinFrmUI.HydroL3d |
| | | { |
| | | public class NetworkParas |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public BoundingBox3d BoundingBox { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public Point3d Ceneter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public Point3d Rotation { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public Point3d Translation { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public Perspective3d Perspective { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public LookAt3d LookAt { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace Yw.WinFrmUI.HydroL3d |
| | | { |
| | | /// <summary> |
| | | /// éè§ |
| | | /// </summary> |
| | | [TypeConverter(typeof(PropertySorter))] |
| | | public class Perspective3d |
| | | { |
| | | /// <summary> |
| | | /// è§åº¦ |
| | | /// </summary> |
| | | public float Fovy { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public float Aspect { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public float Near { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public float Far { get; set; } |
| | | |
| | | } |
| | | } |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [TypeConverter(typeof(PropertySorter))] |
| | | public class Point3d |
| | | { |
| | | /// <summary> |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public Point3d(Point3d rhs) |
| | | { |
| | | this.X = rhs.X; |
| | | this.Y = rhs.Y; |
| | | this.Z = rhs.Z; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// x |
| | | /// </summary> |
| | | [DisplayName("X")] |
| | | [PropertyOrder(1)] |
| | | public float X { get; set; } |
| | | |
| | | /// <summary> |
| | | /// y |
| | | /// </summary> |
| | | [DisplayName("Y")] |
| | | [PropertyOrder(2)] |
| | | public float Y { get; set; } |
| | | |
| | | /// <summary> |
| | | /// z |
| | | /// </summary> |
| | | [DisplayName("Z")] |
| | | [PropertyOrder(3)] |
| | | public float Z { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | namespace Yw.WinFrmUI.HydroL3d |
| | | using DevExpress.CodeParser; |
| | | using DevExpress.DataAccess.MongoDB; |
| | | |
| | | namespace Yw.WinFrmUI.HydroL3d |
| | | { |
| | | /// <summary> |
| | | /// |
| | |
| | | return _parters.Exists(x => x.Id == id); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// ç»å¶ |
| | | /// è·åå
å´ç |
| | | /// </summary> |
| | | public void Draw() |
| | | public BoundingBox3d GetBoundingBox() |
| | | { |
| | | foreach (var link in this.Links) |
| | | { |
| | | link.Draw(); |
| | | } |
| | | var bd = new BoundingBox3d(); |
| | | bd.Min = new Point3d(); |
| | | bd.Max = new Point3d(); |
| | | |
| | | foreach (var node in this.Nodes) |
| | | { |
| | | node.Draw(); |
| | | bd.Min.X = Math.Min(bd.Min.X, node.Position.X); |
| | | bd.Max.X = Math.Max(bd.Max.X, node.Position.X); |
| | | bd.Min.Y = Math.Min(bd.Min.Y, node.Position.Y); |
| | | bd.Max.Y = Math.Max(bd.Max.Y, node.Position.Y); |
| | | bd.Min.Z = Math.Min(bd.Min.Z, node.Position.Z); |
| | | bd.Max.Z = Math.Max(bd.Max.Z, node.Position.Z); |
| | | } |
| | | |
| | | return bd; |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | public bool Hovered { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç»å¶ |
| | | /// </summary> |
| | | public abstract void Draw(); |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | /// <summary> |
| | | /// è¿æ¥èç¹ |
| | | /// </summary> |
| | | public abstract class Junction : Node |
| | | public class Junction : Node |
| | | { |
| | | |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// æ°´åº |
| | | /// </summary> |
| | | public abstract class Reservoir : Source |
| | | public class Reservoir : Source |
| | | { |
| | | |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// æ°´æ± |
| | | /// </summary> |
| | | public abstract class Tank : Source |
| | | public class Tank : Source |
| | | { |
| | | |
| | | |
| | |
| | | public float? SelectedLineWidth { get; set; } |
| | | |
| | | |
| | | public override void Draw() |
| | | { |
| | | throw new NotImplementedException(); |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | /// <summary> |
| | | /// æ°´æ³µ |
| | | /// </summary> |
| | | public abstract class Pump : Link |
| | | public class Pump : Link |
| | | { |
| | | /// <summary> |
| | | /// çº¿è² |
| | |
| | | /// <summary> |
| | | /// éé¨ |
| | | /// </summary> |
| | | public abstract class Valve : Link |
| | | public class Valve : Link |
| | | { |
| | | /// <summary> |
| | | /// çº¿è² |
| | |
| | | } |
| | | |
| | | protected Network _network = null;//ç®¡ç½ |
| | | protected BoundingBox3d _bounndingBox = null;//å
å´ç |
| | | protected Point3d _center = null;//ä¸å¿ |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦åå§å |
| | | /// </summary> |
| | | public bool Initialized => _network != null; |
| | | |
| | | private float rotation_X = 0.0f; |
| | | private float rotation_Y = 0.0f; |
| | | private float rotation_Z = 0.0f; |
| | | |
| | | /// <summary> |
| | | /// åå§å |
| | |
| | | public virtual void Initial(Network network) |
| | | { |
| | | _network = network; |
| | | _bounndingBox = _network.GetBoundingBox(); |
| | | _center = _bounndingBox.GetCenter(); |
| | | } |
| | | |
| | | private void openGLControl1_OpenGLDraw(object sender, RenderEventArgs args) |
| | | { |
| | | if (_network == null) |
| | | { |
| | | return; |
| | | } |
| | | SharpGL.OpenGL gl = this.openGLControl1.OpenGL; |
| | | //æ¸
餿·±åº¦ç¼å |
| | | gl.Clear(OpenGL.GL_COLOR_BUFFER_BIT | OpenGL.GL_DEPTH_BUFFER_BIT); |
| | |
| | | //éç½®å½åæå®çç©éµä¸ºåä½ç©éµ,å°å½åçç¨æ·åæ ç³»çåç¹ç§»å°äºå±å¹ä¸å¿ |
| | | gl.LoadIdentity(); |
| | | |
| | | gl.Translate(-_center.X, -_center.Y, -_bounndingBox.Max.Z); |
| | | |
| | | foreach (var pipe in _network.Pipes) |
| | | { |
| | | var startPosition = pipe.StartPosition; |
| | | var endPosition = pipe.EndPosition; |
| | | gl.Begin(OpenGL.GL_LINES); |
| | | gl.Color(1.0f, 1.0f, 1.0f); |
| | | gl.Vertex(startPosition.X, startPosition.Y, startPosition.Z);//å·¦é¡¶ç¹ |
| | | gl.Vertex(endPosition.X, endPosition.Y, endPosition.Z);//å³é¡¶ç¹ |
| | | gl.End(); |
| | | } |
| | | |
| | | //åæ è½´åæ¢ä½ç½®å°(0.0f, 0.0f, -5.0f)ï¼è¿æ ·æä»¬çåæ è½´å°±ç¸å½äºå¾å±å¹å
èµ°5个åä½ |
| | | gl.Translate(0.0f, 0.0f, -5.0f); |
| | | //gl.Translate(0.0f, 0.0f, -5.0f); |
| | | |
| | | rotation_X += 1f; |
| | | gl.Rotate(rotation_X, 1.0f, 0.0f, 0.0f);//rotationX:è§åº¦ |
| | | rotation_Y += 1f; |
| | | gl.Rotate(rotation_Y, 0.0f, 1.0f, 0.0f);//rotationY:è§åº¦ |
| | | rotation_Z += 1f; |
| | | gl.Rotate(rotation_Z, 0.0f, 0.0f, 1.0f);//rotationZ:è§åº¦ |
| | | //rotation_X += 1f; |
| | | //gl.Rotate(rotation_X, 1.0f, 0.0f, 0.0f);//rotationX:è§åº¦ |
| | | //rotation_Y += 1f; |
| | | //gl.Rotate(rotation_Y, 0.0f, 1.0f, 0.0f);//rotationY:è§åº¦ |
| | | //rotation_Z += 1f; |
| | | //gl.Rotate(rotation_Z, 0.0f, 0.0f, 1.0f);//rotationZ:è§åº¦ |
| | | |
| | | #region ç¹å°çº¿ |
| | | gl.Begin(OpenGL.GL_LINES); |
| | | gl.Color(1.0f, 1.0f, 1.0f); |
| | | gl.Vertex(-2.0f, 0.0f, 0.0f);//å·¦é¡¶ç¹ |
| | | gl.Vertex(2.0f, 2.0f, 0.0f);//å³é¡¶ç¹ |
| | | gl.End(); |
| | | #endregion |
| | | #region 线æé¢(ä¸è§å½¢) |
| | | gl.Begin(OpenGL.GL_TRIANGLES);//第ä¸ä¸ªé¢ |
| | | gl.Color(1.0f, 0.0f, 0.0f); |
| | | gl.Vertex(0.0f, 1f, 0.0f);//é¡¶ç¹ |
| | | gl.Color(0.0f, 1.0f, 0.0f); |
| | | gl.Vertex(-1.0f, -1.0f, 0.0f);//å·¦é¡¶ç¹ |
| | | gl.Color(0.0f, 0.0f, 1.0f); |
| | | gl.Vertex(1.0f, -1.0f, 0.0f);//å³é¡¶ç¹ |
| | | gl.End(); |
| | | #endregion |
| | | #region é¢ç»åæä½ |
| | | gl.Begin(OpenGL.GL_TRIANGLES);//第äºä¸ªé¢ |
| | | gl.Color(1.0f, 1.0f, 1.0f); |
| | | gl.Vertex(0.0f, 0.0f, -2.0f);//第åä¸ªç¹ |
| | | gl.Color(0.0f, 1.0f, 0.0f); |
| | | gl.Vertex(-1.0f, -1.0f, 0.0f);//å·¦é¡¶ç¹ |
| | | gl.Color(0.0f, 0.0f, 1.0f); |
| | | gl.Vertex(1.0f, -1.0f, 0.0f);//å³é¡¶ç¹ |
| | | gl.End(); |
| | | gl.Begin(OpenGL.GL_TRIANGLES);//第ä¸ä¸ªé¢ |
| | | gl.Color(1.0f, 1.0f, 1.0f); |
| | | gl.Vertex(0.0f, 0.0f, -2.0f);//第åä¸ªç¹ |
| | | gl.Color(0.0f, 1.0f, 0.0f); |
| | | gl.Vertex(-1.0f, -1.0f, 0.0f);//å·¦é¡¶ç¹ |
| | | gl.Color(1.0f, 0.0f, 0.0f); |
| | | gl.Vertex(0.0f, 1f, 0.0f);//é¡¶ç¹ |
| | | gl.End(); |
| | | gl.Begin(OpenGL.GL_TRIANGLES);//第åä¸ªé¢ |
| | | gl.Color(1.0f, 1.0f, 1.0f); |
| | | gl.Vertex(0.0f, 0.0f, -2.0f);//第åä¸ªç¹ |
| | | gl.Color(0.0f, 0.0f, 1.0f); |
| | | gl.Vertex(1.0f, -1.0f, 0.0f);//å³é¡¶ç¹ |
| | | gl.Color(1.0f, 0.0f, 0.0f); |
| | | gl.Vertex(0.0f, 1f, 0.0f);//é¡¶ç¹ |
| | | gl.End(); |
| | | #endregion |
| | | //#region ç¹å°çº¿ |
| | | //gl.Begin(OpenGL.GL_LINES); |
| | | //gl.Color(1.0f, 1.0f, 1.0f); |
| | | //gl.Vertex(-2.0f, 0.0f, 0.0f);//å·¦é¡¶ç¹ |
| | | //gl.Vertex(2.0f, 2.0f, 0.0f);//å³é¡¶ç¹ |
| | | //gl.End(); |
| | | //#endregion |
| | | //#region 线æé¢(ä¸è§å½¢) |
| | | //gl.Begin(OpenGL.GL_TRIANGLES);//第ä¸ä¸ªé¢ |
| | | //gl.Color(1.0f, 0.0f, 0.0f); |
| | | //gl.Vertex(0.0f, 1f, 0.0f);//é¡¶ç¹ |
| | | //gl.Color(0.0f, 1.0f, 0.0f); |
| | | //gl.Vertex(-1.0f, -1.0f, 0.0f);//å·¦é¡¶ç¹ |
| | | //gl.Color(0.0f, 0.0f, 1.0f); |
| | | //gl.Vertex(1.0f, -1.0f, 0.0f);//å³é¡¶ç¹ |
| | | //gl.End(); |
| | | //#endregion |
| | | //#region é¢ç»åæä½ |
| | | //gl.Begin(OpenGL.GL_TRIANGLES);//第äºä¸ªé¢ |
| | | //gl.Color(1.0f, 1.0f, 1.0f); |
| | | //gl.Vertex(0.0f, 0.0f, -2.0f);//第åä¸ªç¹ |
| | | //gl.Color(0.0f, 1.0f, 0.0f); |
| | | //gl.Vertex(-1.0f, -1.0f, 0.0f);//å·¦é¡¶ç¹ |
| | | //gl.Color(0.0f, 0.0f, 1.0f); |
| | | //gl.Vertex(1.0f, -1.0f, 0.0f);//å³é¡¶ç¹ |
| | | //gl.End(); |
| | | //gl.Begin(OpenGL.GL_TRIANGLES);//第ä¸ä¸ªé¢ |
| | | //gl.Color(1.0f, 1.0f, 1.0f); |
| | | //gl.Vertex(0.0f, 0.0f, -2.0f);//第åä¸ªç¹ |
| | | //gl.Color(0.0f, 1.0f, 0.0f); |
| | | //gl.Vertex(-1.0f, -1.0f, 0.0f);//å·¦é¡¶ç¹ |
| | | //gl.Color(1.0f, 0.0f, 0.0f); |
| | | //gl.Vertex(0.0f, 1f, 0.0f);//é¡¶ç¹ |
| | | //gl.End(); |
| | | //gl.Begin(OpenGL.GL_TRIANGLES);//第åä¸ªé¢ |
| | | //gl.Color(1.0f, 1.0f, 1.0f); |
| | | //gl.Vertex(0.0f, 0.0f, -2.0f);//第åä¸ªç¹ |
| | | //gl.Color(0.0f, 0.0f, 1.0f); |
| | | //gl.Vertex(1.0f, -1.0f, 0.0f);//å³é¡¶ç¹ |
| | | //gl.Color(1.0f, 0.0f, 0.0f); |
| | | //gl.Vertex(0.0f, 1f, 0.0f);//é¡¶ç¹ |
| | | //gl.End(); |
| | | //#endregion |
| | | |
| | | gl.Flush(); //强å¶å·æ° |
| | | |
| | |
| | | |
| | | private void openGLControl1_Resize(object sender, EventArgs e) |
| | | { |
| | | if (_network == null) |
| | | { |
| | | return; |
| | | } |
| | | OpenGL gl = openGLControl1.OpenGL; |
| | | |
| | | // 设置å½åç©éµæ¨¡å¼,对æå½±ç©éµåºç¨éåçç©éµæä½ |
| | |
| | | gl.LoadIdentity(); |
| | | |
| | | // å建éè§æå½±åæ¢ |
| | | gl.Perspective(30.0f, (double)Width / (double)Height, 5, 100.0); |
| | | //gl.Perspective(30.0f, (double)Width / (double)Height, 5, 100); |
| | | gl.Perspective(150, (double)Width / (double)Height, 5, _bounndingBox.Max.Z); |
| | | |
| | | // è§ç¹åæ¢ |
| | | gl.LookAt(0, 5, 0, 0, 0, 0, 0, 1, 0); |
| | | //gl.LookAt(0, 5, 0, 0, 0, 0, 0, 1, 0); |
| | | gl.LookAt(_center.X, _center.Y, 0, _center.X, _center.Y, _center.Z, 0, 1, 0); |
| | | |
| | | // 设置å½åç©éµä¸ºæ¨¡åè§å¾ç©éµ |
| | | gl.MatrixMode(OpenGL.GL_MODELVIEW); |
| | | |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace Yw.WinFrmUI.HydroL3d |
| | | { |
| | | partial class NetworkPanelDebug |
| | | { |
| | | /// <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() |
| | | { |
| | | splitContainerControl1 = new DevExpress.XtraEditors.SplitContainerControl(); |
| | | openGLControl1 = new SharpGL.OpenGLControl(); |
| | | propertyGridControl1 = new DevExpress.XtraVerticalGrid.PropertyGridControl(); |
| | | ((ISupportInitialize)splitContainerControl1).BeginInit(); |
| | | ((ISupportInitialize)splitContainerControl1.Panel1).BeginInit(); |
| | | splitContainerControl1.Panel1.SuspendLayout(); |
| | | ((ISupportInitialize)splitContainerControl1.Panel2).BeginInit(); |
| | | splitContainerControl1.Panel2.SuspendLayout(); |
| | | splitContainerControl1.SuspendLayout(); |
| | | ((ISupportInitialize)openGLControl1).BeginInit(); |
| | | ((ISupportInitialize)propertyGridControl1).BeginInit(); |
| | | SuspendLayout(); |
| | | // |
| | | // splitContainerControl1 |
| | | // |
| | | splitContainerControl1.Dock = DockStyle.Fill; |
| | | splitContainerControl1.FixedPanel = DevExpress.XtraEditors.SplitFixedPanel.Panel2; |
| | | splitContainerControl1.Location = new Point(0, 0); |
| | | splitContainerControl1.Name = "splitContainerControl1"; |
| | | // |
| | | // splitContainerControl1.Panel1 |
| | | // |
| | | splitContainerControl1.Panel1.Controls.Add(openGLControl1); |
| | | splitContainerControl1.Panel1.Text = "Panel1"; |
| | | // |
| | | // splitContainerControl1.Panel2 |
| | | // |
| | | splitContainerControl1.Panel2.Controls.Add(propertyGridControl1); |
| | | splitContainerControl1.Panel2.Text = "Panel2"; |
| | | splitContainerControl1.Size = new Size(1106, 613); |
| | | splitContainerControl1.SplitterPosition = 299; |
| | | splitContainerControl1.TabIndex = 0; |
| | | // |
| | | // openGLControl1 |
| | | // |
| | | openGLControl1.Dock = DockStyle.Fill; |
| | | openGLControl1.DrawFPS = false; |
| | | openGLControl1.Location = new Point(0, 0); |
| | | openGLControl1.Margin = new Padding(4, 3, 4, 3); |
| | | openGLControl1.Name = "openGLControl1"; |
| | | openGLControl1.OpenGLVersion = SharpGL.Version.OpenGLVersion.OpenGL2_1; |
| | | openGLControl1.RenderContextType = SharpGL.RenderContextType.DIBSection; |
| | | openGLControl1.RenderTrigger = SharpGL.RenderTrigger.TimerBased; |
| | | openGLControl1.Size = new Size(797, 613); |
| | | openGLControl1.TabIndex = 0; |
| | | openGLControl1.OpenGLInitialized += openGLControl1_OpenGLInitialized; |
| | | openGLControl1.OpenGLDraw += openGLControl1_OpenGLDraw; |
| | | openGLControl1.Resized += openGLControl1_Resized; |
| | | // |
| | | // propertyGridControl1 |
| | | // |
| | | propertyGridControl1.Dock = DockStyle.Fill; |
| | | propertyGridControl1.Location = new Point(0, 0); |
| | | propertyGridControl1.Name = "propertyGridControl1"; |
| | | propertyGridControl1.OptionsView.AllowReadOnlyRowAppearance = DevExpress.Utils.DefaultBoolean.True; |
| | | propertyGridControl1.Size = new Size(299, 613); |
| | | propertyGridControl1.TabIndex = 0; |
| | | propertyGridControl1.CellValueChanged += propertyGridControl1_CellValueChanged; |
| | | // |
| | | // NetworkPanelDebug |
| | | // |
| | | AutoScaleDimensions = new SizeF(7F, 14F); |
| | | AutoScaleMode = AutoScaleMode.Font; |
| | | Controls.Add(splitContainerControl1); |
| | | Name = "NetworkPanelDebug"; |
| | | Size = new Size(1106, 613); |
| | | ((ISupportInitialize)splitContainerControl1.Panel1).EndInit(); |
| | | splitContainerControl1.Panel1.ResumeLayout(false); |
| | | ((ISupportInitialize)splitContainerControl1.Panel2).EndInit(); |
| | | splitContainerControl1.Panel2.ResumeLayout(false); |
| | | ((ISupportInitialize)splitContainerControl1).EndInit(); |
| | | splitContainerControl1.ResumeLayout(false); |
| | | ((ISupportInitialize)openGLControl1).EndInit(); |
| | | ((ISupportInitialize)propertyGridControl1).EndInit(); |
| | | ResumeLayout(false); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | private DevExpress.XtraEditors.SplitContainerControl splitContainerControl1; |
| | | private SharpGL.OpenGLControl openGLControl1; |
| | | private DevExpress.XtraVerticalGrid.PropertyGridControl propertyGridControl1; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using DevExpress.Mvvm.Native; |
| | | using SharpGL; |
| | | |
| | | namespace Yw.WinFrmUI.HydroL3d |
| | | { |
| | | public partial class NetworkPanelDebug : DevExpress.XtraEditors.XtraUserControl |
| | | { |
| | | public NetworkPanelDebug() |
| | | { |
| | | InitializeComponent(); |
| | | } |
| | | |
| | | |
| | | private Network _network = null;//ç®¡ç½ |
| | | private NetworkParas _paras = null;//åæ° |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦åå§å |
| | | /// </summary> |
| | | public bool Initialized => _network != null; |
| | | |
| | | |
| | | /// <summary> |
| | | /// åå§å |
| | | /// </summary> |
| | | public virtual void Initial(Network network) |
| | | { |
| | | _network = network; |
| | | _paras = new NetworkParas(); |
| | | _paras.BoundingBox = _network.GetBoundingBox(); |
| | | _paras.Ceneter = _paras.BoundingBox.GetCenter(); |
| | | _paras.Rotation = new Point3d(); |
| | | _paras.Translation = new Point3d(); |
| | | _paras.Perspective = new Perspective3d() |
| | | { |
| | | Fovy = 60f, |
| | | Aspect = this.openGLControl1.Width / (float)this.openGLControl1.Height, |
| | | Near = 5, |
| | | Far = 100 |
| | | }; |
| | | _paras.LookAt = new LookAt3d() |
| | | { |
| | | Eye = new Point3d(), |
| | | Center = new Point3d(), |
| | | Up = new Point3d() |
| | | }; |
| | | this.propertyGridControl1.SelectedObject = _paras; |
| | | } |
| | | |
| | | private void openGLControl1_OpenGLDraw(object sender, RenderEventArgs args) |
| | | { |
| | | if (!Initialized) |
| | | { |
| | | return; |
| | | } |
| | | SharpGL.OpenGL gl = this.openGLControl1.OpenGL; |
| | | //æ¸
餿·±åº¦ç¼å |
| | | gl.Clear(OpenGL.GL_COLOR_BUFFER_BIT | OpenGL.GL_DEPTH_BUFFER_BIT); |
| | | |
| | | //éç½®å½åæå®çç©éµä¸ºåä½ç©éµ,å°å½åçç¨æ·åæ ç³»çåç¹ç§»å°äºå±å¹ä¸å¿ |
| | | gl.LoadIdentity(); |
| | | |
| | | gl.Translate(_paras.Translation.X, _paras.Translation.Y, _paras.Translation.Z); |
| | | |
| | | gl.Rotate(_paras.Rotation.X, 1, 0, 0); |
| | | gl.Rotate(_paras.Rotation.Y, 0, 1, 0); |
| | | gl.Rotate(_paras.Rotation.Z, 0, 0, 1); |
| | | |
| | | foreach (var pipe in _network.Pipes) |
| | | { |
| | | var startPosition = pipe.StartPosition; |
| | | var endPosition = pipe.EndPosition; |
| | | gl.Begin(OpenGL.GL_LINES); |
| | | gl.Color(1.0f, 1.0f, 1.0f); |
| | | gl.Vertex(startPosition.X, startPosition.Y, startPosition.Z);//å·¦é¡¶ç¹ |
| | | gl.Vertex(endPosition.X, endPosition.Y, endPosition.Z);//å³é¡¶ç¹ |
| | | gl.End(); |
| | | } |
| | | |
| | | |
| | | |
| | | gl.Flush(); //强å¶å·æ° |
| | | |
| | | } |
| | | |
| | | private void openGLControl1_OpenGLInitialized(object sender, EventArgs e) |
| | | { |
| | | OpenGL gl = openGLControl1.OpenGL; |
| | | gl.ClearColor(0, 0, 0, 0); |
| | | } |
| | | |
| | | |
| | | private void openGLControl1_Resized(object sender, EventArgs e) |
| | | { |
| | | if (!Initialized) |
| | | { |
| | | return; |
| | | } |
| | | _paras.Perspective.Aspect = this.openGLControl1.Width / (float)this.openGLControl1.Height; |
| | | Reset(); |
| | | } |
| | | |
| | | //éç½® |
| | | private void Reset() |
| | | { |
| | | if (!Initialized) |
| | | { |
| | | return; |
| | | } |
| | | OpenGL gl = openGLControl1.OpenGL; |
| | | |
| | | // 设置å½åç©éµæ¨¡å¼,对æå½±ç©éµåºç¨éåçç©éµæä½ |
| | | gl.MatrixMode(OpenGL.GL_PROJECTION); |
| | | |
| | | // éç½®å½åæå®çç©éµä¸ºåä½ç©éµ,å°å½åçç¨æ·åæ ç³»çåç¹ç§»å°äºå±å¹ä¸å¿ |
| | | gl.LoadIdentity(); |
| | | |
| | | // å建éè§æå½±åæ¢ |
| | | gl.Perspective(_paras.Perspective.Fovy, _paras.Perspective.Aspect, _paras.Perspective.Near, _paras.Perspective.Far); |
| | | |
| | | // è§ç¹åæ¢ |
| | | gl.LookAt(_paras.LookAt.Eye.X, _paras.LookAt.Eye.Y, _paras.LookAt.Eye.Z, _paras.LookAt.Center.X, _paras.LookAt.Center.Y, _paras.LookAt.Center.Z, _paras.LookAt.Up.X, _paras.LookAt.Up.Y, _paras.LookAt.Up.Z); |
| | | |
| | | // 设置å½åç©éµä¸ºæ¨¡åè§å¾ç©éµ |
| | | gl.MatrixMode(OpenGL.GL_MODELVIEW); |
| | | } |
| | | |
| | | private void propertyGridControl1_CellValueChanged(object sender, DevExpress.XtraVerticalGrid.Events.CellValueChangedEventArgs e) |
| | | { |
| | | if (!Initialized) |
| | | { |
| | | return; |
| | | } |
| | | Reset(); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
| | |
| | | <PackageReference Include="Yw.Newtonsoft.Core" Version="3.0.0" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\Yw.WinFrmUI.Core\Yw.WinFrmUI.Core.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| | |
| | | <Compile Update="02-panel\NetworkPanel.cs"> |
| | | <SubType>UserControl</SubType> |
| | | </Compile> |
| | | <Compile Update="02-panel\NetworkPanelDebug.cs"> |
| | | <SubType>UserControl</SubType> |
| | | </Compile> |
| | | </ItemGroup> |
| | | </Project> |