/// <summary>
        /// Initializes a new instance of the <see cref="OpenShiftProjectWindow"/> class.
        /// </summary>
        public OpenShiftProjectWindow() : base(null)
        {
            this.Caption = "OpenShift Project Explorer";

            // This is the user control hosted by the tool window; Note that, even if this class implements IDisposable,
            // we are not calling Dispose on this object. This is because ToolWindowPane calls Dispose on
            // the object returned by the Content property.
            var vm = new OpenShiftExplorerViewModel();

            control = new OpenShiftProjectWindowControl()
            {
                DataContext = vm
            };
            this.Content = control;
            vm.LoadAsync().FireAndForget();

            this.ToolBar = new CommandID(OpenShiftProjectWindowCommand.CommandSet,
                                         OpenShiftProjectWindowCommand.ToolbarID);
            this.ToolBarLocation = (int)VSTWT_LOCATION.VSTWT_TOP;
        }
Beispiel #2
0
 private void ButtonHandler(object sender, EventArgs arguments) => vm.LoadAsync().FireAndForget();