public static void EndLoading() { if (formLoading != null) { formLoading.Close(); formLoading.Dispose(); formLoading = null; } }
/// <summary> /// 动画加载 /// </summary> /// <param name="ctl"></param> public static void StartLoading(Control ctl) { if (formLoading != null) { EndLoading(); } formLoading = new FormLoading(); uiHandler -= new UiHandler(ShowText); uiHandler += new UiHandler(ShowText); formLoading.Show(); //formLoading.BringToFront(); AdjustLoacation(ctl); }
/// <summary> /// 动画加载 /// </summary> /// <param name="ctl">阴影覆盖控件</param> /// <param name="size"></param> public static void StartLoading(Control ctl, Size size) { if (formLoading != null) { EndLoading(); } formLoading = new FormLoading(); uiHandler -= new UiHandler(ShowText); uiHandler += new UiHandler(ShowText); formLoading.Show(); if (size.Width > ctl.Width) { size = new Size(ctl.Width, size.Height); } if (size.Height > ctl.Height) { size = new Size(size.Width, ctl.Height); } formLoading.Size = size; AdjustLoacation(ctl); }
/// <summary> /// 动画加载 /// </summary> /// <param name="ctl">阴影覆盖控件</param> /// <param name="size"></param> public static void StartLoading(Control ctl,Size size) { if (formLoading != null) { EndLoading(); } formLoading = new FormLoading(); uiHandler -= new UiHandler(ShowText); uiHandler += new UiHandler(ShowText); formLoading.Show(); if (size.Width > ctl.Width) { size = new Size(ctl.Width, size.Height); } if (size.Height > ctl.Height) { size = new Size(size.Width, ctl.Height); } formLoading.Size = size; AdjustLoacation(ctl); }