using Hydro.CommonBase; using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Hydro.MapView { [Serializable] public class MapOption { public float Link_multiply { get; set; } = 0.6667f; public float junction_multiply { get; set; } = 1f; public bool _ShowValve { get; set; } = true; public bool _ShowJunction { get; set; } = true; public bool _ShowStatus { get; set; } = false; public bool _ShowFlowDirection { get; set; } = false; } [Serializable] public class Colour { public string Name { get; set; } public ColourType Type { get; set; } public List Items { get; set; } public bool isNode { get { if (Type==ColourType.节点自由压力 || Type==ColourType.节点需水量) { return true; } else { return false; } } } public bool isChoosed { get; set; } = false; public float minNum=0; public float maxNum=50; public int ColourCount = 5; public Color color0 = Color.Red; public Color color1 = Color.Blue; public Colour(ColourType type=ColourType.节点自由压力, List value=null, string name =null) { Name =name; Type = type; Items = value; if (Items == null) Items = new List(); if (Name==null) Name= type.ToString(); } public override string ToString() { return Name; } public static int NodeTypeCount = 3; } [Serializable] public class ColourItem { public DRange DRange { get; set; }=new DRange(); public Color value; public ColourItem(DRange dRange, Color value) { DRange = dRange; this.value = value; } public ColourItem() { } public ColourItem(ColourItem item) { this.DRange = item.DRange; this.value = item.value; } public override string ToString() { return DRange.ToString(); } } public enum ColourType { 无=0, 节点自由压力=1, 节点绝对压力=2, 节点需水量=3, 管线流量=4, 管线流速=5 } }