示例#1
0
		public BuildReferenceViewItem(BuildReference reference)
      : base(new string[3])
		{
			this.reference = reference;
			this.SubItems[0].Text = reference.Name;
			this.SubItems[1].Text = reference.Version.ToString(4);
			if (reference.Valid)
			{
				this.SubItems[2].Text = reference.Path;
				this.ImageIndex = 0;
			}
			else
			{
				this.SubItems[2].Text = reference.HintPath;
				this.ImageIndex = 1;
			}
		}
示例#2
0
 private void AddReference(BuildReference reference, bool checkDuplicate)
 {
   bool flag = true;
   if (checkDuplicate)
   {
     foreach (BuildReferenceViewItem referenceViewItem in this.ltvReferences.Items)
     {
       if (reference.Valid && referenceViewItem.Reference.Valid && string.Compare(referenceViewItem.Reference.Path, reference.Path, true) == 0)
       {
         flag = false;
         break;
       }
     }
   }
   if (!flag)
     return;
   this.ltvReferences.Items.Add((ListViewItem) new BuildReferenceViewItem(reference));
 }