Ejemplo n.º 1
0
 /// <summary>
 /// Logic
 /// </summary>
 public MainWindow()
 {
     _callbackManager = new CallbackManager();
     ContactManager = new ContactManager(_callbackManager);
     _scriptingManager = new ScriptingManager(_callbackManager, ContactManager);
     InitializeComponent();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="manager">The callback manager</param>
 /// <param name="contacts">The contact manager</param>
 public ScriptingManager(CallbackManager manager, ContactManager contacts)
 {
     _contactManager = contacts;
     _callbackManager = manager;
     _engine = Python.CreateEngine();
     var searchPaths = new List<string>(_engine.GetSearchPaths());
     searchPaths.Add(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "PythonLib"));
     _engine.SetSearchPaths(searchPaths);
     _engine.Runtime.Globals.SetVariable("callbackManager", _callbackManager);
     _engine.Runtime.Globals.SetVariable("contactManagerObject", _contactManager);
 }