Example #1
0
 private void btnRemove_Click(object sender, EventArgs e)
 {
     if (this.ltvReferences.SelectedItems.Count == 0)
     {
         int num1 = (int)MessageBox.Show((IWin32Window)this, "No references selected.", "Remove", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
     }
     else
     {
         if (MessageBox.Show((IWin32Window)this, "Are you sure to remove selected references?", "Remove", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
         {
             return;
         }
         BuildReferenceViewItem[] referenceViewItemArray = new BuildReferenceViewItem[this.ltvReferences.SelectedItems.Count];
         this.ltvReferences.SelectedItems.CopyTo((Array)referenceViewItemArray, 0);
         foreach (BuildReferenceViewItem referenceViewItem in referenceViewItemArray)
         {
             if (referenceViewItem.Reference.Type == BuildReferenceType.API)
             {
                 int num2 = (int)MessageBox.Show((IWin32Window)this, "You cannot remove reference to the OpenQuant.API.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
             }
             else
             {
                 this.ltvReferences.Items.Remove((ListViewItem)referenceViewItem);
             }
         }
         this.OptionsChanged = true;
     }
 }
Example #2
0
 private void btnRemove_Click(object sender, EventArgs e)
 {
   if (this.ltvReferences.SelectedItems.Count == 0)
   {
     int num1 = (int) MessageBox.Show((IWin32Window) this, "No references selected.", "Remove", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
   }
   else
   {
     if (MessageBox.Show((IWin32Window) this, "Are you sure to remove selected references?", "Remove", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
       return;
     BuildReferenceViewItem[] referenceViewItemArray = new BuildReferenceViewItem[this.ltvReferences.SelectedItems.Count];
     this.ltvReferences.SelectedItems.CopyTo((Array) referenceViewItemArray, 0);
     foreach (BuildReferenceViewItem referenceViewItem in referenceViewItemArray)
     {
       if (referenceViewItem.Reference.Type == BuildReferenceType.API)
       {
         int num2 = (int) MessageBox.Show((IWin32Window) this, "You cannot remove reference to the OpenQuant.API.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
       }
       else
         this.ltvReferences.Items.Remove((ListViewItem) referenceViewItem);
     }
     this.OptionsChanged = true;
   }
 }