public static void Show(string info, ClosedEventHandler onClose = null, System.Windows.Forms.Form owner = null) { Bar().barForm.barType = BarType.btWaitProgress; Bar().barForm.OnClose = onClose; Bar().barForm.Info = info; if (!Bar().barForm.Visible) { Bar().barForm.Show(owner); } }
public static void Show(string info, int complete, int minValue, int maxValue, ClosedEventHandler onClose = null, System.Windows.Forms.Form owner = null) { Bar().barForm.barType = BarType.btProgress; Bar().barForm.OnClose = onClose; Bar().barForm.Info = info; Bar().barForm.Min = minValue; Bar().barForm.Max = maxValue; Bar().barForm.Complete = complete; if (!Bar().barForm.Visible) { Bar().barForm.Show(owner); } /* * if (threadBar != null) * { * threadBar = null; * } * * threadBar = new Thread(() => * { * Bar().barForm.barType = BarType.btWait; * Bar().barForm.OnClose = onClose; * Bar().barForm.thread = threadBar; * // pBarUtil().fmOwer = ower; * Bar().barForm.Info = info; * Bar().barForm.Show(); * while (true) * { * Thread.Sleep(100); * System.Windows.Forms.Application.DoEvents(); * } * * }); * threadBar.IsBackground = true; * threadBar.Start(); */ }
public static void Show(string info, int complete, int maxValue, ClosedEventHandler onClose = null, System.Windows.Forms.Form owner = null) { Show(info, complete, 0, maxValue, onClose, owner); }