public SubStation(Solution sol, bool needId)
     : base(needId)
 {
     this.OwnSolution = sol;
     this.HeatStyle = 3;
     this.HeatSwitcherCount = 2;
     this.HeatSwitcherVolumn = 0;
     this.WaterPumpPower = 0;
     this.OwnMasterDistrict = null;
     this.OwnSlaveDistrict = null;
     this.SupplyWaterTemp = 75;
     this.ReturnWaterTemp = 55;
 }
 public HeatProducer(Solution sol, bool needId)
     : base(needId)
 {
     this.OwnSolution = sol;
     this.WaterPumpCount = 1;
     this.HeatStyle = 3;
     this.BoilerCount = 1;
     this.WaterPumpCount = 1;
     this.BoilerEfficiency = 90;
     this.heatStyle = 1;
     this.SupplyWaterTemp = 75;
     this.ReturnWaterTemp = 50;
     OwnMasterDistrict = null;
     OwnSlaveDistrict = null;
 }
        public SolutionAttrTable(Solution solution)
        {
            _solution = solution;
            baseInfo = new BaseInfo("基本信息");

            heatInfos = new CustomAttrCollection();
            int heattag = 1;
            if (solution != null)
            {
                if (solution.HeatProducers.Count != 0)
                {
                    foreach (var heatproducer in HeatSourceLayoutApp.currentSolution.HeatProducers.Values)
                    {
                        heatInfos.Add(new HeatProducerInfo("热源" + (heattag++), heatproducer));
                    }
                }
                totalInfo = new TotoalInfo("工程总表", _solution);
            }
        }
 public void NewTabHaveCreated(ChromeTabItem item)
 {
     //判断是否存在该解决方案
     //暂时无法判断该item是新建还是移动
     foreach(var sol in HeatSource.HeatSourceLayoutApp.solutions)
     {
         if(sol.TabItem == item)
         {
             return;
         }
     }
     item.CanDelete = true;
     item.TabItemHaveClosedHandler = this.TabHaveClosed;
     Solution s = new Solution(true);
     s.SolutionName = (String)item.Header;
     ObjectId objectid = Utility.ContainLayer(s.SolutionName);
     if (objectid == ObjectId.Null)
         s.BaseObjectId = HeatSource.Utils.Utility.CreateLayer(s.SolutionName);
     else
         s.BaseObjectId = objectid;
     s.TabItem = item;
     s.SId = Solution.NextDefaultSId();
     HeatSource.HeatSourceLayoutApp.solutions.Add(s);
 }
 public TotoalInfo(string name, Solution solution)
     : base(name)
 {
     _solution = solution;
 }
 public SolutionDeviceInfo(string name, Solution solution)
     : base(name)
 {
     _solution = solution;
 }