Example #1
0
        /// <summary>
        /// Stops the hosted component.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            if (disposing && _host != null)
            {
                _host.StopComponent();
                _host = null;

                if (_dialogBoxes != null)
                {
                    (_dialogBoxes as IDisposable).Dispose();
                }

                _commandHistory = null;
                _dialogBoxes    = null;
                _desktopWindow  = null;
            }
        }
Example #2
0
		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="args">Arguments for creation of the <see cref="Workspace"/>.</param>
		/// <param name="desktopWindow">The <see cref="DesktopWindow"/> that owns the <see cref="Workspace"/>.</param>
		protected internal Workspace(WorkspaceCreationArgs args, DesktopWindow desktopWindow)
			: base(args)
		{
			_commandHistory = new CommandHistory(100);
			_desktopWindow = desktopWindow;
			_userClosable = args.UserClosable;
			_dialogBoxes = new WorkspaceDialogBoxCollection(this);
			_host = new Host(this, args.Component);
		}
Example #3
0
		/// <summary>
		/// Stops the hosted component.
		/// </summary>
		protected override void Dispose(bool disposing)
		{
			base.Dispose(disposing);

			if (disposing && _host != null)
			{
				_host.StopComponent();
				_host = null;

				if (_dialogBoxes != null)
					(_dialogBoxes as IDisposable).Dispose();

				_commandHistory = null;
				_dialogBoxes = null;
				_desktopWindow = null;
			}
		}