public DesignerControl(ExplorerWindow dockWnd)
 {
     InitializeComponent();
     cashPatternsCtrl = new Dictionary<string, List<ControllerDescription>>();
     cashPatternsRes = new Dictionary<string, Dictionary<string, Resource>>();
     propertiesTree.ImageList = imageList1;
     bindingTree.ImageList = imageList1;
     parentContainer = dockWnd;
 }
        /// <summary>
        /// Initialization of the package; this method is called right after the package is sited, so this is the place
        /// where you can put all the initilaization code that rely on services provided by VisualStudio.
        /// </summary>
        protected override void Initialize()
        {
            Trace.WriteLine (string.Format(CultureInfo.CurrentCulture, "Entering Initialize() of: {0}", this.ToString()));
            base.Initialize();

            // Add our command handlers for menu (commands must exist in the .vsct file)
            OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;
            if ( null != mcs )
            {
                // Create the command for the tool window
                CommandID toolwndCommandID = new CommandID(Guids.guidBistro_DesignerCmdSet, (int)PkgCmdIDList.cmdidBistroExplorer);
                MenuCommand menuToolWin = new MenuCommand(ShowToolWindow, toolwndCommandID);
                mcs.AddCommand( menuToolWin );
            }
            RegisterProjectFactory(new Projects.FSharp.Factory(this));
            RegisterProjectFactory(new Projects.CSharp.Factory(this));
            RegisterProjectFactory(new FSharp.ProjectExtender.Factory(this));
            dte = GetService(typeof(EnvDTE._DTE)) as EnvDTE.DTE;
            //explorer = (ExplorerWindow)this.FindToolWindow(typeof(ExplorerWindow), 0, true);
            //System.IServiceProvider service = (System.IServiceProvider)this.GetService(typeof(System.IServiceProvider));
            explorer = (ExplorerWindow)this.FindToolWindow(typeof(ExplorerWindow), 0, true);
            explorer.Initialize(dte);
            explorer.AddEvents();

        }