public static void Show(Form toCover, string title, string label) { AlertForm alertForm = new AlertForm(toCover); alertForm.Title = title; alertForm.Label = label; alertForm.Show(toCover); }
public static void Show(Form toCover, string title, string label, int duration = 0) { AlertForm alertForm; if (duration > 0) { alertForm = new AlertForm(toCover, duration); } else { alertForm = new AlertForm(toCover); } alertForm.Title = title; alertForm.Label = label; alertForm.AutoScroll = true; alertForm.Show(toCover); }
public static void Show(Form parent, string title, string label, int duration = 0) { // Thread safety if (parent != null && !parent.IsDisposed) { AlertForm alertForm; if (duration > 0) { alertForm = new AlertForm(parent, duration); } else { alertForm = new AlertForm(parent); } alertForm.Title = title; alertForm.Label = label; alertForm.AutoScroll = true; alertForm.Show(parent); } }