using System.Windows.Forms; namespace Core.Common.Controls.Dialogs { /// /// Base class for dialogs which should be derived in order to get a consistent look and feel. /// The base class ensures: /// /// /// the dialog is shown in the center of the parent form ( is set to ); /// /// /// no task bar icon is shown ( is set to false); /// /// /// no minimize control box item is shown ( is set to false); /// /// /// no maximize control box item is shown ( is set to false); /// /// /// the parent form is automatically obtained using . /// /// /// public partial class DialogBase : Form { /// /// Constructs a new . /// protected DialogBase() { InitializeComponent(); } /// /// This method provides a new implementation of . /// In this new implementation the dialog is shown with an owner, /// which is automatically derived via . /// /// A . public new DialogResult ShowDialog() { return base.ShowDialog(ModalHelper.MainWindow); } } }