Exemple #1
0
 private void openFileDialog_FileOk(object sender, CancelEventArgs e)
 {
     try
     {
         CurrentList.AddItems(UninstallList.ReadFromFile(openFileDialog.FileName).Filters);
         PopulateList();
     }
     catch (Exception ex)
     {
         PremadeDialogs.GenericError(ex);
         e.Cancel = true;
     }
 }
        private void toolStripButtonAddSelectedAsFilters_Click(object sender, EventArgs e)
        {
            if (SelectedEntryGetter == null)
            {
                throw new ArgumentNullException(nameof(SelectedEntryGetter));
            }

            var entries = SelectedEntryGetter();
            var filters = entries.Select(x => new Filter(x.DisplayName, false,
                                                         new FilterCondition(x.DisplayName, ComparisonMethod.Equals,
                                                                             nameof(ApplicationUninstallerEntry.DisplayName))));

            CurrentList.AddItems(filters);

            RepopulateList();
        }