/// <summary> /// Constructor /// </summary> /// <param name="dataContext">IGTDataContext object</param> /// <param name="isolationScenarioFeature">Isolation Scenario feature</param> /// <param name="isoCommon">IsoCommon object</param> public IsoDualScenario(IGTDataContext dataContext, IsoScenarioFeature isolationScenarioFeature, IsoCommon isoCommon) { m_dataContext = dataContext; m_IsolationScenarioFeature = isolationScenarioFeature; m_IsoCommon = isoCommon; }
/// <summary> /// Method to process the Isolation Scenario feature. /// </summary> /// <param name="gtComps">IGTKeyObject of the Isolation Scenario feature</param> /// <param name="isolationScenarioType">Type of Isolation Scenario</param> /// <returns>Boolean indicating method execution status</returns> private bool ProcessIsoScenarioFeature(IGTKeyObject gtKO, IsolationScenarios isolationScenarioType) { try { IsoScenarioFeature activeFeature = new IsoScenarioFeature(); activeFeature.GtKeyObject = gtKO; short numberofNodes = 0; GetNumberOfNodes(activeFeature.GtKeyObject, ref numberofNodes); activeFeature.RelatedFeaturesNode1 = GetRelatedFeatures(activeFeature.GtKeyObject, m_cRNO, "NODE1"); if (numberofNodes == 2) { activeFeature.RelatedFeaturesNode2 = GetRelatedFeatures(activeFeature.GtKeyObject, m_cRNO, "NODE2"); } Recordset connRS = activeFeature.GtKeyObject.Components.GetComponent(11).Recordset; if (connRS.RecordCount > 0) { connRS.MoveFirst(); activeFeature.Phase = connRS.Fields["PHASE_ALPHA"].Value.ToString(); } Recordset commRS = activeFeature.GtKeyObject.Components.GetComponent(1).Recordset; if (commRS.RecordCount > 0) { commRS.MoveFirst(); activeFeature.FeatureState = commRS.Fields["FEATURE_STATE_C"].Value.ToString(); } IsoCommon isoCommon = new IsoCommon(); isoCommon.ActiveFNO = m_ActiveFNO; isoCommon.ActiveFID = m_ActiveFID; isoCommon.InteractiveMode = m_InteractiveMode; isoCommon.DataContext = m_GTDataContext; // ISOSINGLE if (isolationScenarioType == IsolationScenarios.ISOSINGLE) { IProcessIsolationScenario isoSingle = new IsoSingleScenario(m_GTDataContext, activeFeature, isoCommon); isoSingle.ValidateIsolationScenario(); } // ISODUAL else if (isolationScenarioType == IsolationScenarios.ISODUAL) { IProcessIsolationScenario isoDual = new IsoDualScenario(m_GTDataContext, activeFeature, isoCommon); isoDual.ValidateIsolationScenario(); } // ISOELBOW else if (isolationScenarioType == IsolationScenarios.ELBOW) { IProcessIsolationScenario isoElbow = new ElbowScenario(m_GTDataContext, activeFeature, isoCommon); isoElbow.ValidateIsolationScenario(); } // ISOELBOW else if (isolationScenarioType == IsolationScenarios.BYPASS) { IProcessIsolationScenario isoBypass = new ByPassScenario(m_GTDataContext, activeFeature, isoCommon); isoBypass.ValidateIsolationScenario(); } return(true); } catch (Exception ex) { throw new Exception("Error from Isolation Scenario FI:ProcessIsoScenarioFeature: " + ex.Message); } }