diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-07-03 12:03:55 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-07-03 12:03:55 +0300 |
| commit | c9d3c1a7408f6f7a4814c1a8f5cf58a2d13e1694 (patch) | |
| tree | 3b92b537099625fd2d29a4e08378194c3c62f3c4 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console | |
| parent | 5ab2e8a2edf1ce487976da347a5e03d18ff307b1 (diff) | |
| download | Tango-c9d3c1a7408f6f7a4814c1a8f5cf58a2d13e1694.tar.gz Tango-c9d3c1a7408f6f7a4814c1a8f5cf58a2d13e1694.zip | |
Machine Studio.
Implemented upload hardware configuration from connected machine view.
Implemented process parameters dragging through developer module settings :/
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindowVM.cs | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindowVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindowVM.cs index 10b05bc64..777c488d7 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindowVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindowVM.cs @@ -24,6 +24,7 @@ namespace Tango.MachineStudio.UI.Console private INotificationProvider _notificatrion; private TextBox _txtLog; private String _currentFile; + private ScriptEngine _engine; /// <summary> @@ -160,22 +161,24 @@ namespace Tango.MachineStudio.UI.Console private void Stop() { - + if (_engine != null) + { + _engine.Stop(); + } } private async void Run() { - ScriptEngine engine = new ScriptEngine(new ConsoleOnExecuteParameters(new ConsoleManager(WriteLine))); - engine.Stop(); - engine.ReferencedAssemblies.Add(this.GetType()); - engine.ReferencedAssemblies.Add(typeof(INotificationProvider)); + _engine = new ScriptEngine(new ConsoleOnExecuteParameters(new ConsoleManager(WriteLine))); + _engine.ReferencedAssemblies.Add(this.GetType()); + _engine.ReferencedAssemblies.Add(typeof(INotificationProvider)); foreach (var module in _moduleLoader.AllModules) { - engine.ReferencedAssemblies.Add(module.GetType()); + _engine.ReferencedAssemblies.Add(module.GetType()); } - await engine.Run(Code, null); + await _engine.Run(Code, null); } private void WriteLine(String text) |
