/// <inheritdoc /> public override IToolWindowViewModel CreateToolWindow(ToolWindowEditSite editSite) { var viewModel = Host.CreateInstance <CustomButtonsToolWindowViewModel>(); viewModel.EditSite = editSite; return(viewModel); }
/// <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); }
public PendingChangesViewModel(ToolWindowEditSite site) { _editSite = site; _svnManager = _editSite.Host.GetSharedExportedValue <SvnManagerPlugin>(); InitialLoad(); _svnManager.SvnStatusUpdatedEvent += SvnManagerOnSvnStatusUpdatedEvent; BindingOperations.EnableCollectionSynchronization(FileStatus, _lock); CommitCommand = new RelayCommand(DoCommitCommand); }
/// <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); }
public HistoryViewModel(ToolWindowEditSite site) { _editSite = site; CompareWithWorkingCopyCommand = new RelayCommand(DoCompareWithWorkingCopyCommand, CanCompareWithWorkingCopy); RevertToThisRevisionCommand = new RelayCommand(DoRevertToThisRevisionCommand); }
public SelectionTrackingViewModel(ToolWindowEditSite site) { _editSite = site; }
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)); }