コード例 #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;
            }
        }
コード例 #2
0
ファイル: Workspace.cs プロジェクト: nhannd/Xian
		/// <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);
		}
コード例 #3
0
ファイル: Workspace.cs プロジェクト: m-berkani/ClearCanvas
		/// <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;
			}
		}