Пример #1
0
 public ScriptMonitorEventArgs(IScriptContext Context, ScriptMonitor Monitor)
 {
     this.Context = Context;
     this.Monitor = Monitor;
 }
Пример #2
0
 public ScriptMonitorEventArgs(IScriptContext Context, ScriptMonitor Monitor)
 {
     this.Context = Context;
     this.Monitor = Monitor;
 }
Пример #3
0
        void LoadScriptEngine()
        {
            try
            {

                if (_monitor == null)
                {
                    var scriptDirectory = Path.Combine(_workingDirectory, "Scripts");
                    var scriptFileName = Path.Combine(scriptDirectory, "SSMSAddin.py");
                    _monitor = new ScriptMonitor(scriptFileName);

                    _monitor.OnScriptLoading += new ScriptMonitorEvent(_monitor_OnScriptLoading);
                    _monitor.OnScriptLoaded += new ScriptMonitorEvent(_monitor_OnScriptLoaded);
                    _monitor.OnScriptUnLoading += new ScriptMonitorEvent(_monitor_OnScriptUnLoading);
                    _monitor.OnEngineMessage += new MessageEvent(_monitor_OnEngineMessage);
                    _monitor.Activate();

                }
            }
            catch (Exception x)
            {
                LogError("Error LoadScriptEngine: " + x.Message);
            }
        }