Esempio n. 1
0
 public void CreateChannelDriver()
 {
     try
     {
         var dialog = new CreateChannelDriverDialog(channelDriverPlugins.Values);
         dialog.ShowDialog();
         if (dialog.DialogResult == DialogResult.OK)
         {
             var plugin = dialog.SelectedPlugin;
             var name   = dialog.DriverName;
             var pack   = plugin.CreateChannelDriver();
             pack.Driver.Name = name;
             model.AddChannelDriver(++itemID, plugin.ID, name, pack.Driver.Settings);
             channelDrivers.Add(itemID, pack.Driver);
             view.AddChannelDriver(itemID, pack);
         }
     }
     catch (SetupAbortedByUserException) { }
 }