Esempio n. 1
0
 /// <summary>
 /// Event handler method for the 'Process Images' button click action, performs validation and opens ConfirmForm
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BtnProcessImages_Click(object sender, EventArgs e)
 {
     // Validate the existence of items in the ListView
     if (Validation.ListViewContainsAtLeastOneItem(lvItemList))
     {
         // If ListView contains at least one item, show the ConfirmDialog
         new ConfirmForm(ImageObjectList, lvItemList).ShowDialog();
     }
     else
     {
         // Display an 'Empty List' MessageBox when there aren't any items in the list
         PresetMessageBox.EmptyListError();
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Event handler method for the 'Clear List' button click action, performs validation and clears the ListView and ImageObjectList of ImageObjects.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BtnClearList_Click(object sender, EventArgs e)
 {
     // Validate the existence of items in the ListView
     if (Validation.ListViewContainsAtLeastOneItem(lvItemList))
     {
         // If at least one item exists in the list, clear all ImageObject Objects from ImageObjectList and all items from the ListView
         Logic.ClearItemsFromObjectList(ImageObjectList);
         View.ClearItemsFromListView(lvItemList);
     }
     else
     {
         // Display an 'Empty List' MessageBox when there aren't any items in the list
         PresetMessageBox.EmptyListError();
     }
 }