/// <inheritdoc />
        public override IToolWindowViewModel CreateToolWindow(ToolWindowEditSite editSite)
        {
            var viewModel = Host.CreateInstance <CustomButtonsToolWindowViewModel>();

            viewModel.EditSite = editSite;
            return(viewModel);
        }
示例#2
0
        /// <inheritdoc />
        public override IToolWindowViewModel CreateToolWindow(ToolWindowEditSite editSite)
        {
            // Use CreateInstance to create the CustomButtonsToolWindowViewModel so that the Host is imported correctly.
            var viewModel = Host.CreateInstance <CustomButtonsToolWindowViewModel>();

            viewModel.EditSite = editSite;
            return(viewModel);
        }
示例#3
0
 public PendingChangesViewModel(ToolWindowEditSite site)
 {
     _editSite   = site;
     _svnManager = _editSite.Host.GetSharedExportedValue <SvnManagerPlugin>();
     InitialLoad();
     _svnManager.SvnStatusUpdatedEvent += SvnManagerOnSvnStatusUpdatedEvent;
     BindingOperations.EnableCollectionSynchronization(FileStatus, _lock);
     CommitCommand = new RelayCommand(DoCommitCommand);
 }
示例#4
0
        /// <summary>
        /// Our composition host.  The composition host provides access to the rest of the system.  There is one
        /// host per instance of our editor and should never be stored globally.  It manages all of the plug-ins
        /// in the system and well as provide access to the framework objects
        /// </summary>
        //private ICompositionHost _host;

        /// <summary>
        /// The constructor
        /// </summary>
        /// <param name="host">The composition host this window is associated with</param>
        public SelectionTrackingToolWindow(ToolWindowEditSite site)
        {
            // Set up a few things
            //_host = host;
            SelectedItems = new ObservableCollection <SelectionDisplayInfo>();
            DataContext   = this;

            // This creates our View.  Standard WPF thing.
            InitializeComponent();

            // Here we are getting the "User interface" framework object and registering
            // for selection and document change notifications
            site.RootEditSite.ActiveDocumentChanged += HandleActiveDocumentChanged;
            site.RootEditSite.SelectedChanged       += HandleSelectedChanged;

            // Make sure we are reflecting the currently active document and
            // selection
            UpdateDocumentName(site.RootEditSite.ActiveDocument);
            UpdateSelection(site.RootEditSite.ActiveSelection);
        }
示例#5
0
 public HistoryViewModel(ToolWindowEditSite site)
 {
     _editSite = site;
     CompareWithWorkingCopyCommand = new RelayCommand(DoCompareWithWorkingCopyCommand, CanCompareWithWorkingCopy);
     RevertToThisRevisionCommand   = new RelayCommand(DoRevertToThisRevisionCommand);
 }
示例#6
0
 public SelectionTrackingViewModel(ToolWindowEditSite site)
 {
     _editSite = site;
 }
示例#7
0
 public override IToolWindowViewModel CreateToolWindow(ToolWindowEditSite editSite)
 {
     return(new SelectionTrackingViewModel(editSite));
 }
 public override IToolWindowViewModel CreateToolWindow(ToolWindowEditSite editSite)
 {
     return(new PendingChangesViewModel(editSite));
 }
 public override IToolWindowViewModel CreateToolWindow(ToolWindowEditSite editSite)
 {
     return(new HistoryViewModel(editSite));
 }