예제 #1
0
		public void EngineExecuteGuiCode(IZeusCodeSegment segment, IZeusContext context)
		{
			bool assemblyLoaded = false;
			try 
			{
				this.Cleanup();
				this._codeSegment = segment;
				
				assemblyLoaded = this.LoadAssembly(context);
				if (assemblyLoaded && !HasErrors) 
				{
					this._currentObject = InstantiateClass( CurrentAssembly, typeof(_DotNetScriptGui), context );

					if (this._currentObject is _DotNetScriptGui)
					{
						this._interfaceObject = this._currentObject as _DotNetScriptGui;
						this._interfaceObject.Setup();
					}
				
					if (context.Gui.ShowGui || context.Gui.ForceDisplay)
					{
						OnShowGUI(context.Gui);
					}
					this._assemblyStack.Pop();
					assemblyLoaded = false;
				}
			}
			catch (Exception ex)
			{
				this.Cleanup( assemblyLoaded );

				throw ex;
			}
		}
        public void EngineExecuteGuiCode(IZeusCodeSegment segment, IZeusContext context)
        {
            bool assemblyLoaded = false;

            try
            {
                this.Cleanup();
                this._codeSegment = segment;

                assemblyLoaded = this.LoadAssembly(context);
                if (assemblyLoaded && !HasErrors)
                {
                    this._currentObject = InstantiateClass(CurrentAssembly, typeof(_DotNetScriptGui), context);

                    if (this._currentObject is _DotNetScriptGui)
                    {
                        this._interfaceObject = this._currentObject as _DotNetScriptGui;
                        this._interfaceObject.Setup();
                    }

                    if (context.Gui.ShowGui || context.Gui.ForceDisplay)
                    {
                        OnShowGUI(context.Gui);
                    }
                    this._assemblyStack.Pop();
                    assemblyLoaded = false;
                }
            }
            catch (Exception ex)
            {
                this.Cleanup(assemblyLoaded);

                throw ex;
            }
        }
		override protected void EngineExecuteGuiCode(ZeusCodeSegment segment, ZeusGuiContext context)
		{
			try 
			{
				this.Cleanup();
				this._codeSegment = segment;

				this._currentObject = InstantiateClass( this.CurrentAssembly, typeof(_DotNetScriptGui), context );

				if (this._currentObject is _DotNetScriptGui)
				{
					this._interfaceObject = this._currentObject as _DotNetScriptGui;
					this._interfaceObject.Setup();
				}
				
				if (context.Gui.ShowGui)
				{
					OnShowGUI(context.Gui);
					if (!context.Gui.IsCanceled) 
					{
						context.Input.AddItems(context.Gui);
					}
				}

			}
			catch (ZeusCompilerException ex)
			{
				ex.IsTemplateScript = false;
				throw ex;
			}
		}
예제 #4
0
 override public void Cleanup()
 {
     this._currentAssembly = null;
     this._interfaceObject = null;
     this._primaryObject   = null;
     this._currentObject   = null;
 }
예제 #5
0
        override protected void EngineExecuteGuiCode(ZeusCodeSegment segment, ZeusGuiContext context)
        {
            try
            {
                this.Cleanup();
                this._codeSegment = segment;

                this._currentObject = InstantiateClass(this.CurrentAssembly, typeof(_DotNetScriptGui), context);

                if (this._currentObject is _DotNetScriptGui)
                {
                    this._interfaceObject = this._currentObject as _DotNetScriptGui;
                    this._interfaceObject.Setup();
                }

                if (context.Gui.ShowGui)
                {
                    OnShowGUI(context.Gui);
                    if (!context.Gui.IsCanceled)
                    {
                        context.Input.AddItems(context.Gui);
                    }
                }
            }
            catch (ZeusCompilerException ex)
            {
                ex.IsTemplateScript = false;
                throw ex;
            }
        }
        protected void Cleanup(bool newAssemblyCreated)
        {
            _primaryObject   = null;
            _interfaceObject = null;
            _currentObject   = null;

            if (newAssemblyCreated)
            {
                this._assemblyStack.Pop();
            }
        }
예제 #7
0
		protected void Cleanup(bool newAssemblyCreated) 
		{
			_primaryObject = null;
			_interfaceObject = null;
			_currentObject = null;
			
			if (newAssemblyCreated)
			{
				this._assemblyStack.Pop();
			}
		}
		override public void Cleanup() 
		{
			this._currentAssembly = null;
			this._interfaceObject = null;
			this._primaryObject = null;
			this._currentObject = null;
		}