/// <summary> /// Enables / disables list of controls based on DEV / Runtime environment /// </summary> /// <param name="controls"></param> public static void SetRuntimeBehaviour(List <System.Windows.Forms.Control> controls) { var DevEnabled = Convert.ToBoolean(ConfigUtilities.GetDevMode()); if (!DevEnabled) { foreach (var control in controls) { control.Visible = false; } } else { foreach (var control in controls) { control.Visible = true; } } }