//Удалить контрол с формы private static void RemoveControlFromForm(LoadingControl control) { control.Hide(); Cursor.Current = control._current; _masterForm.Controls.Remove(control); _masterForm.Menu = control._menu; _visibleDialogsCounter--; }
public LoadingControlInterface(LoadingControl control) { if (control == null) { throw new NullReferenceException("No LoadingControl setted"); } _loadControl = control; }
//Добавить контрол на форму private static void AddControlToForm(LoadingControl control) { control.Location = new Point(0, 0); control.Size = _masterForm.ClientSize; control.Dock = DockStyle.Fill; control.Visible = false; control._initialized = true; _masterForm.Controls.Add(control); control.BringToFront(); _visibleDialogsCounter++; }
//Показать сообщение с кнопками public static LoadingControlInterface CreateLoading(string text) { DebugHelper.WriteTraceEntry("----------"); DebugHelper.WriteTraceEntry("CreateLoading called"); LoadingControl control = new LoadingControl(); control._message = text; LoadingControlInterface lc = new LoadingControlInterface(control); return(lc); }