public MyPluginControl()
 {
     InitializeComponent();
     MyPluginFactory                = new Factories.MyPluginFactory();
     AttributeMetadataHandler       = MyPluginFactory.NewAttributeMetadataHandler(this);
     CoreToolsDownloader            = MyPluginFactory.NewCoreToolsDownloader(this);
     EntityGeneratorHandler         = MyPluginFactory.NewEntityGeneratorHandler(this, metadataTree, txtOutput);
     EntityMetadataHandler          = MyPluginFactory.NewEntityMetadataHandler(this, metadataTree);
     RelationshipMetadataHandler    = MyPluginFactory.NewRelationshipMetadataHandler(this);
     pluginViewModel                = MyPluginFactory.NewPluginViewModel();
     treeEventHandler               = new TreeViewAdvBeforeCheckEventHandler(this.MetadataTree_BeforeCheck);
     this.metadataTree.BeforeCheck += treeEventHandler;
     btnGenerateEntities.Enabled    = pluginViewModel.Generate_Enabled;
     btnGetMetadata.Enabled         = pluginViewModel.ActiveConnection;
     DataBind();
 }
 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();
 }