document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. private void InterpretLineFeature(IFeature pFea, int traceWeighFI)
  2. {
  3.     // Create the listItem and add the class name and OID
  4.     IDataset pDS = (IDataset)pFea.Class;
  5.     ListViewItem pLI = lvwPipes.Items.Add(pDS.Name);
  6.     pLI.UseItemStyleForSubItems = false;
  7.     if (pFea.HasOID == true)
  8.         pLI.SubItems.Add(Convert.ToString(pFea.OID));
  9.     else
  10.         pLI.SubItems.Add("No OID");
  11.  
  12.     // get the trace weight value
  13.     object rawValue = pFea.get_Value(traceWeighFI);
  14.     if (DBNull.Value.Equals(rawValue) == true)
  15.     {
  16.         AddListSubItem(pLI, "<Null>", Color.Black);
  17.         return;
  18.     }
  19.  
  20.     int traceWeight = Convert.ToInt32(rawValue);
  21.     AddListSubItem(pLI, Convert.ToString(traceWeight), Color.Black);
  22.  
  23.     // Bit 25 - Traceable?
  24.     if (IsBitSet(traceWeight, 25))
  25.         AddListSubItem(pLI, "No", Color.Red);
  26.     else
  27.         AddListSubItem(pLI, "Yes", Color.Green);
  28.  
  29.     // Bit 24 - Pinchable?
  30.     if (IsBitSet(traceWeight, 24))
  31.         AddListSubItem(pLI, "No", Color.Red);
  32.     else
  33.         AddListSubItem(pLI, "Yes", Color.Green);
  34.  
  35.     // Bit 23 - CP Barrier
  36.     if (IsBitSet(traceWeight, 23))
  37.         AddListSubItem(pLI, "No", Color.Red);
  38.     else
  39.         AddListSubItem(pLI, "Yes", Color.Green);
  40. }
');