Esempio n. 1
0
 private void BtnAddEntry_Click(object sender, EventArgs e)
 {
     using (EntryForm entryForm = new EntryForm())
     {
         if (entryForm.ShowDialog() == DialogResult.OK)
         {
             // Refresh and update UI accordingly
             RefreshListView();
             EntriesChanged();
         }
     }
 }
Esempio n. 2
0
        private void BtnEditEntry_Click(object sender, EventArgs e)
        {
            // Make sure only 1 entry is selected
            if (LstEntries.SelectedItems == null || LstEntries.SelectedItems.Count != 1)
            {
                return;
            }

            using (EntryForm entryForm = new EntryForm(Convert.ToInt32(LstEntries.SelectedItems[0].Tag)))
            {
                if (entryForm.ShowDialog() == DialogResult.OK)
                {
                    // Refresh and update UI accordingly
                    RefreshListView();
                    EntriesChanged();
                }
            }
        }