Esempio n. 1
0
        public bool InitializeDocument(params object[] args)
        {
            if (args == null || args.Length == 0)
            {
                return(false);
            }
            IScriptText doc = args[0] as IScriptText;

            if (doc == null)
            {
                return(false);
            }

            _doc         = doc;
            _tempDoc     = _doc.CloneForModification();
            _compiledDoc = null;

            _pureScriptController   = (IPureScriptController)Current.Gui.GetControllerAndControl(new object[] { _tempDoc }, typeof(IPureScriptText), typeof(IPureScriptController), UseDocument.Copy);
            _scriptExecutionHandler = args.Length <= 1 ?  null : args[1] as ScriptExecutionHandler;

            return(true);
        }
    public bool InitializeDocument(params object[] args)
    {
      if (args == null || args.Length == 0)
        return false;
      IScriptText doc = args[0] as IScriptText;
      if (doc == null)
        return false;

      _doc = doc;
      _tempDoc = _doc.CloneForModification();
      _compiledDoc = null;

      _pureScriptController = (IPureScriptController)Current.Gui.GetControllerAndControl(new object[] { _tempDoc }, typeof(IPureScriptText), typeof(IPureScriptController), UseDocument.Copy);
      _scriptExecutionHandler = args.Length<=1 ?  null : args[1] as ScriptExecutionHandler;

      return true;
    }