Example #1
0
 public bool IsEditingWorkstring()
 {
     foreach (UserControl property in layoutPanel.Controls)
     {
         IFormProperties propertyBase = property as IFormProperties;
         if (propertyBase != null && propertyBase.IsEditingWorkstring())
         {
             return(true);
         }
     }
     return(false);
 }
Example #2
0
        public void ForceFocus()
        {
            Focus();

            foreach (UserControl property in layoutPanel.Controls)
            {
                IFormProperties propertyBase = property as IFormProperties;
                if (propertyBase != null)
                {
                    propertyBase.ForceFocus();
                }
            }
        }
Example #3
0
        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();
            }
        }