コード例 #1
0
ファイル: CQuantityList.cs プロジェクト: knousere/Cosmolog
 public void SetAllDescriptions(CSymbolList thatSymbolList)
 {
     for (int i = 0; i < Count; ++i)
     {
         CQuantity thisQuantity = this[i];
         thisQuantity.SetDescription(thatSymbolList);
     }
 }
コード例 #2
0
ファイル: CSymbolList.cs プロジェクト: knousere/Cosmolog
 // Construct a deep copy
 public CSymbolList(CSymbolList thatSymbolList) : base()
 {
     for (int i = 0; i < thatSymbolList.Count; ++i)
     {
         CSymbol newSymbol = new CSymbol(thatSymbolList[i]);
         Add(newSymbol);
     }
 }
コード例 #3
0
ファイル: CQuantity.cs プロジェクト: knousere/Cosmolog
        // Look up my symbol in the symbol list. If found then copy the description and unit.
        public void SetDescription(CSymbolList thatSymbolList)
        {
            int s;

            s = thatSymbolList.FindMatch(_symbol.Label);
            if (s > -1)
            {
                CSymbol thatSymbol = thatSymbolList[s];
                _symbol.Description = thatSymbol.Description;
                _symbol.Unit        = thatSymbol.Unit;
            }
        }