} //CpatternCollection /// <summary> /// THis method looks for a pattern matching the given collection /// of switchpoints. /// </summary> /// <param name="SwitchPoints">The collection of switchpoints to search for.</param> /// <returns>It returns the matching pattern's ID or -1 for no match.</returns> // Revision History // MM/DD/YY Who Version Issue# Description // -------- --- ------- ------ --------------------------------------------- // 10/01/08 jrf 9.50.16 Created // public int FindPatternID(CSwitchPointCollection SwitchPoints) { int iPatternID = -1; foreach (CPattern Pattern in Items) { if (Pattern.Equals(new CPattern(0, "", SwitchPoints))) { iPatternID = Pattern.ID; } } return(iPatternID); }
/// <summary> /// Creates an instace of a Pattern object /// </summary> /// <example> /// <code> /// CPattern patt = new CPattern(2, "Pattern 1", new CSwitchPointCollection()); /// </code> /// </example> /// Revision History /// MM/DD/YY who Version Issue# Description /// -------- --- ------- ------ --------------------------------------- /// 02/15/06 rrr N/A N/A Creation of class public CPattern(int intID, string strName, CSwitchPointCollection colSwitchPoints) { m_intPatternID = intID; m_strPatternName = strName; m_colSwitchPoints = colSwitchPoints; } //CPattern