public EntityMetadataHandler(MyPluginControl myPlugin, AlBackgroundWorkHandler backgroundWorkHandler, TreeViewAdv metadataTree, EntitySelectionHandler entitySelectionHandler) { this.myPlugin = myPlugin; this.backgroundWorkHandler = backgroundWorkHandler; this.metadataTree = metadataTree; this.entitySelectionHandler = entitySelectionHandler; }
public MyPluginControl() { InitializeComponent(); MyPluginFactory = Factories.MyPluginFactory.GetMyPluginFactory(this); pluginViewModel = MyPluginFactory.NewPluginViewModel(); BackgroundWorkHandler = MyPluginFactory.NewBackgroundWorkHandler(); AttributeMetadataHandler = MyPluginFactory.NewAttributeMetadataHandler(); CoreToolsDownloader = MyPluginFactory.NewCoreToolsDownloader(); EntityGeneratorHandler = MyPluginFactory.NewEntityGeneratorHandler(metadataTree, txtOutput); RelationshipMetadataHandler = MyPluginFactory.NewRelationshipMetadataHandler(); EntitySelectionHandler = MyPluginFactory.NewEntitySelectionHandler(metadataTree, AttributeMetadataHandler, RelationshipMetadataHandler); EntityMetadataHandler = MyPluginFactory.NewEntityMetadataHandler(metadataTree, EntitySelectionHandler); treeEventHandler = new TreeViewAdvBeforeCheckEventHandler(this.MetadataTree_BeforeCheck); this.metadataTree.BeforeCheck += treeEventHandler; btnGenerateEntities.Enabled = pluginViewModel.Generate_Enabled; mnuSelectGenerated.Visible = pluginViewModel.Generate_Enabled; mnuSelectNone.Visible = pluginViewModel.Generate_Enabled; btnGetMetadata.Enabled = pluginViewModel.ActiveConnection; mnuGetMetadata.Enabled = pluginViewModel.ActiveConnection; mnuSelectAll.Enabled = pluginViewModel.ActiveConnection; mnuCopyCommand.Enabled = pluginViewModel.LaunchCommandEnabled; DataBind(); }