public bool IsEditingWorkstring() { foreach (UserControl property in layoutPanel.Controls) { IFormProperties propertyBase = property as IFormProperties; if (propertyBase != null && propertyBase.IsEditingWorkstring()) { return(true); } } return(false); }
public void ForceFocus() { Focus(); foreach (UserControl property in layoutPanel.Controls) { IFormProperties propertyBase = property as IFormProperties; if (propertyBase != null) { propertyBase.ForceFocus(); } } }
public void Clear() { if (layoutPanel.Controls.Count > 0) { //Copy the controls into an array, since the Dispose calls will remove them from the source list UserControl[] properties = new UserControl[layoutPanel.Controls.Count]; layoutPanel.Controls.CopyTo(properties, 0); foreach (UserControl property in properties) { IFormProperties propertyBase = property as IFormProperties; if (propertyBase != null) { propertyBase.Clear(); } } layoutPanel.Controls.Clear(); } }