using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; using System.ComponentModel; #pragma warning disable 1591 namespace OSGeo.MapGuide.Viewer { /// /// Base class for views show by their associated instances /// [ToolboxItem(false)] public class MgControlView : UserControl { /// /// Gets or set the title to show if this view is shown in a new window /// public virtual string Title { get; set; } protected MgControlView() { this.ModalWindow = false; } protected override void Dispose(bool disposing) { if (disposing) { SubCleanup(); } base.Dispose(disposing); } protected virtual void SubCleanup() { } /// /// Gets whether to show as a modal window if parent component chooses to show this component /// in a new window. Only applies if parent component shows this component in a new window /// public virtual bool ModalWindow { get; set; } /// /// Gets or sets the content closer /// public IContentCloser Closer { get; set; } /// /// /// protected void Close() { if (this.Closer != null) this.Closer.Close(); } private void InitializeComponent() { this.SuspendLayout(); // // MgControlView // this.Name = "MgControlView"; this.ResumeLayout(false); } } /// /// An interface for closing component UI content /// public interface IContentCloser { /// /// Closes the UI content /// void Close(); } }