Example #1
0
 private void btnDisplay_Click(object sender, EventArgs e)
 {
     // TODO : Need to check list box is selected or not, if selected enable Display button
     if (LWlvResourceList.SelectedItems.Count == 1)
     {
         foreach (ListViewItem item in LWlvResourceList.SelectedItems)
         {
             string key = item.SubItems[2].Text;
             if (ResourceListTable != null && ResourceListTable.ContainsKey(key))
             {
                 RegResourceItem.FullResourceDescriptor frd = (RegResourceItem.FullResourceDescriptor)ResourceListTable[key];
                 if (frd != null)
                 {
                     DialogResult             dlg;
                     ResourceDescriptorDialog ResListDialog = new ResourceDescriptorDialog(frd);
                     dlg = ResListDialog.ShowDialog(this);
                 }
             }
         }
     }
     else
     {
         // None of the item is selected, do nothing.
         return;
     }
 }
 private void btnDisplay_Click(object sender, EventArgs e)
 {
     // TODO : Need to check list box is selected or not, if selected enable Display button
     if (LWlvResourceList.SelectedItems.Count == 1)
     {
         foreach (ListViewItem item in LWlvResourceList.SelectedItems)
         {
             string key = item.SubItems[2].Text;
             if (ResourceListTable != null && ResourceListTable.ContainsKey(key))
             {
                 RegResourceItem.FullResourceDescriptor frd = (RegResourceItem.FullResourceDescriptor)ResourceListTable[key];
                 if (frd != null)
                 {
                     DialogResult dlg;
                     ResourceDescriptorDialog ResListDialog = new ResourceDescriptorDialog(frd);
                     dlg = ResListDialog.ShowDialog(this);
                 }
             }
         }
     }
     else
     {
         // None of the item is selected, do nothing.
         return;
     }
 }