コード例 #1
0
        public void UpdateConnections(BurnerControl burnerCtrl)
        {
            string name = burnerCtrl.Burner.Name;

            PointOrientation airInOrientation = BurnerControl.AIR_INLET_ORIENTATION;
            int             airInIdx          = Burner.AIR_INLET_INDEX;
            Point           airInPoint        = burnerCtrl.GetAirInConnectionPoint();
            ConnectionPoint airInCp           = new ConnectionPoint(airInIdx, name, airInPoint, airInOrientation);

            PointOrientation gasOutOrientation = BurnerControl.FLUE_GAS_OUTLET_ORIENTATION;
            int             gasOutIdx          = Burner.FLUE_GAS_OUTLET_INDEX;
            Point           gasOutPoint        = burnerCtrl.GetFlueGasOutConnectionPoint();
            ConnectionPoint gasOutCp           = new ConnectionPoint(gasOutIdx, name, gasOutPoint, gasOutOrientation);

            PointOrientation fuelInOrientation = BurnerControl.FUEL_INLET_ORIENTATION;
            int             fuelInIdx          = Burner.FUEL_INLET_INDEX;
            Point           fuelInPoint        = burnerCtrl.GetFuelInConnectionPoint();
            ConnectionPoint fuelInCp           = new ConnectionPoint(fuelInIdx, name, fuelInPoint, fuelInOrientation);

            IEnumerator e = this.Connections.GetEnumerator();

            while (e.MoveNext())
            {
                SolvableConnection dc        = (SolvableConnection)e.Current;
                Boolean            isChanged = false;

                if (dc.UnitOpPoint.Equals(airInCp))
                {
                    isChanged            = true;
                    dc.UnitOpPoint.Point = airInPoint;
                }
                if (dc.UnitOpPoint.Equals(gasOutCp))
                {
                    isChanged            = true;
                    dc.UnitOpPoint.Point = gasOutPoint;
                }
                if (dc.UnitOpPoint.Equals(fuelInCp))
                {
                    isChanged            = true;
                    dc.UnitOpPoint.Point = fuelInPoint;
                }
                if (isChanged)
                {
                    this.flowsheet.Controls.Remove(dc);
                    dc.UpdateConnection();
                    this.flowsheet.Controls.Add(dc);
                    isChanged = false;
                }
            }
        }
コード例 #2
0
 public void UpdateConnections(BurnerControl burnerCtrl)
 {
 }