Exemplo n.º 1
0
        private void btnAddExtraDesc_Click(object sender, EventArgs e)
        {
            EditExtendedDescription dialog = new EditExtendedDescription(new ExtendedDescription());

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                lstExtraDesc.Items.Add(dialog.GetExtendedDescription());
            }
        }
Exemplo n.º 2
0
        private void btnEditExtraDescr_Click(object sender, EventArgs e)
        {
            int index = lstExtraDesc.SelectedIndex;

            if (index != -1)
            {
                ExtendedDescription     desc   = lstExtraDesc.SelectedItem as ExtendedDescription;
                EditExtendedDescription dialog = new EditExtendedDescription(desc);
                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    lstExtraDesc.Items.RemoveAt(index);
                    lstExtraDesc.Items.Insert(index, dialog.GetExtendedDescription());
                }
            }
        }
Exemplo n.º 3
0
 private void btnEditExtraDescr_Click(object sender, EventArgs e)
 {
     int index = lstExtraDesc.SelectedIndex;
     if (index != -1)
     {
         ExtendedDescription desc = lstExtraDesc.SelectedItem as ExtendedDescription;
         EditExtendedDescription dialog = new EditExtendedDescription(desc);
         if (dialog.ShowDialog() == DialogResult.OK)
         {
             lstExtraDesc.Items.RemoveAt(index);
             lstExtraDesc.Items.Insert(index,dialog.GetExtendedDescription());
         }
     }
 }
Exemplo n.º 4
0
 private void btnAddExtraDesc_Click(object sender, EventArgs e)
 {
     EditExtendedDescription dialog = new EditExtendedDescription(new ExtendedDescription());
     if (dialog.ShowDialog() == DialogResult.OK)
     {
         lstExtraDesc.Items.Add(dialog.GetExtendedDescription());
     }
 }