Grooper.GrooperControl

Controls are user interfaces from which Grooper applications are built.


Inherits from: System.Windows.Forms.UserControl

Constructors

Signature Description
New ()

Properties

Property Name Property Type Description
Ancestors System.Collections.Generic.IEnumerable(Of T) Enumerates the parent controls of this control.

Methods

Method Name Description
CreateMenuItem(Database As GrooperDb, Items As IEnumerable, CommandType As Type, Handler As EventHandler, ContextInstance As Object) As ToolStripMenuItem Creates a ToolStripMenuItem for a specific command type, if the command is enabled for a list of selected objects.
Parameters
Database
          Type: GrooperDb
          The Grooper database.
 
Items
          Type: IEnumerable
          The list of selected objects.
 
CommandType
          Type: Type
          A type deriving from ObjectCommand.
 
Handler
          Type: EventHandler
          The "Click" event handler to be wired up to the menu item.
 
ContextInstance
          Type: Object
          An optional context instance.
CreateMenuItems(Database As GrooperDb, CommandTypes As IEnumerable(Of Type), Items As IEnumerable, Handler As EventHandler) As List(Of ToolStripMenuItem) Creates a list ToolStripMenuItems from a list of command types, returning one ToolStripMenuItem for each enabled command.
Parameters
Database
          Type: GrooperDb
          The Grooper database.
 
CommandTypes
          Type: IEnumerable`1
          A list types deriving from ObjectCommand.
 
Items
          Type: IEnumerable
          The list of selected objects.
 
Handler
          Type: EventHandler
          The "Click" event handler to be wired up to the menu item.
CreateToolStripButtons(Database As GrooperDb, CommandTypes As IEnumerable(Of Type), Items As IEnumerable, Handler As EventHandler) As IEnumerable(Of ToolStripButton) Creates a list ToolStripButtons from a list of command types, returning one ToolStripButton for each enabled command.
Parameters
Database
          Type: GrooperDb
          The Grooper database.
 
CommandTypes
          Type: IEnumerable`1
          A list types deriving from ObjectCommand.
 
Items
          Type: IEnumerable
          The list of selected objects.
 
Handler
          Type: EventHandler
          The "Click" event handler to be wired up to the button.
GetControlCommandTypes(ObjectType As Type, RepositoryId As Guid) As IEnumerable(Of Type) Returns a list of object commands which apply to a specific object type within the context of this control.
Parameters
ObjectType
          Type: Type
          The object type.
 
RepositoryId
          Type: Guid
          The GUID ID of the Grooper repository.
MenuItemIsGenerated(tsmi As ToolStripItem) As Boolean Returns true if the passed menu item was generated by this class.
Parameters
tsmi
          Type: ToolStripItem
          
ShowValidationErrors(Items As ValidationErrorList, AllowInvalid As Boolean) As Boolean
Parameters
Items
          Type: ValidationErrorList
          
 
AllowInvalid
          Type: Boolean
          
ValidateObject(Item As GrooperObject, AllowInvalid As Boolean) As Boolean
Parameters
Item
          Type: GrooperObject
          
 
AllowInvalid
          Type: Boolean
          
ValidateProperties() As ValidationErrorList