Exemplo n.º 1
0
 static void Main(string[] args)
 {
     IronPlugins.Engine.AddSearchPath(@"C:\Program Files (x86)\IronPython 2.7\Lib");
     System.Diagnostics.Trace.TraceInformation("Pre-plugin load. You shouldn't see this.");
     FilePlugin pluginLog = new FilePlugin("error_logger.py");
     pluginLog.RunPlugin();
     System.Diagnostics.Trace.TraceInformation("Post-plugin load...you should see this.");
     System.Windows.Forms.Application.Run(new Form1());
 }
Exemplo n.º 2
0
 private void buttonAddPlug_Click(object sender, EventArgs e)
 {
     OpenFileDialog ofd = new OpenFileDialog();
     if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         try
         {
             FilePlugin fPlug = new FilePlugin(ofd.FileName);
             AddPlugin(fPlug);
         }
         catch (PythonPluginException ex)
         {
             MessageBox.Show(ex.Message);
         }
     }
 }