Esempio n. 1
0
 void AddButtonClick(object sender, EventArgs e)
 {
     using (AddOpenWithEntryDialog dlg = new AddOpenWithEntryDialog()) {
         if (dlg.ShowDialog(this) == DialogResult.OK)
         {
             ExternalProcessDisplayBinding binding = new ExternalProcessDisplayBinding {
                 FileExtension = fileExtension,
                 CommandLine   = dlg.ProgramName,
                 Title         = dlg.DisplayName,
                 Id            = Guid.NewGuid().ToString()
             };
             programListBox.Items.Add(new ListEntry(DisplayBindingService.AddExternalProcessDisplayBinding(binding), false));
         }
     }
 }