Exemplo n.º 1
0
 private void btnAddMenu_Click(object sender, EventArgs e)
 {
     if (this.lvRoles.SelectedItems.Count != 0)
     {
         frmAddFunction _frmAddFunction = new frmAddFunction(this.lvRoles.SelectedItems[0].Tag);
         if (_frmAddFunction.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             for (int i = 0; i < _frmAddFunction.Functions.Count; i++)
             {
                 MenuInfo     item         = _frmAddFunction.Functions[i];
                 ListViewItem listViewItem = new ListViewItem(item.ToString())
                 {
                     Tag = item
                 };
                 this.lvFunctions.Items.Add(listViewItem);
             }
         }
     }
 }