public static void Show(IWin32Window owner, string message, int height, InforType type, int showTime) { if (owner != null) { Form _owner = (owner as Form == null) ? ((UserControl)owner).ParentForm : (Form)owner; _control = new MsgInforBoxControl(); _control.Properties.Message = message; _control.Padding = new Padding(0, 0, 0, 0); _control.ControlBox = false; _control.ShowInTaskbar = false; _control.TopMost = true; _control.Size = new Size(_owner.Size.Width, height); _control.Location = new Point(_owner.Location.X, _owner.Location.Y + (_owner.Height - _control.Height) / 2); _control.ArrangeApperance(type); _control.ArrangeVisible(showTime); _control.ShowDialog(); _control.BringToFront(); } }
/// <summary> /// Creates a new instance of MessageBoxOverlayProperties. /// </summary> /// <param name="owner"></param> public MsgInforBoxProperties(MsgInforBoxControl owner) { _owner = owner; }