コード例 #1
0
ファイル: OpenWithDialog.cs プロジェクト: Paccc/SharpDevelop
		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(SD.DisplayBindingService.AddExternalProcessDisplayBinding(binding), false));
				}
			}
		}
コード例 #2
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(SD.DisplayBindingService.AddExternalProcessDisplayBinding(binding), false));
         }
     }
 }