/// <summary>
 /// Logic
 /// </summary>
 public MainWindow()
 {
     _callbackManager = new CallbackManager();
     ContactManager = new ContactManager(_callbackManager);
     _scriptingManager = new ScriptingManager(_callbackManager, ContactManager);
     InitializeComponent();
 }
 /// <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);
 }
Esempio n. 3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="callbacks">Callback manager to use</param>
 public ContactManager(CallbackManager callbacks)
 {
     Contacts = new ObservableCollection<Contact>();
     _callbacks = callbacks;
 }