/// <summary> /// 等待状态 /// </summary> /// <param name="title">标题</param> /// <param name="size">窗体大小</param> internal static void innerShow(string title, Size size) { if (wait == null) { wait = new WaitForm(); } if (size != null && size.Width != 0 && size.Height != 0) { wait.Width = size.Width; wait.Height = size.Height; } if (wait != null) { wait.ProgressInfo = title; } if (!openprogress) { ThreadStart threadStart = innerShowForm; Thread thread = new Thread(threadStart) { IsBackground = true }; thread.Start(); openprogress = true; } }
/// <summary> /// 关闭 /// </summary> public static void Close() { try { openprogress = false; if (wait != null) { wait.Close(); } wait = null; } catch (Exception ex) { TXTHelper.Logs(ex.ToString()); try { if (wait != null) { wait.Close(); } wait = null; } catch (Exception) { } } }