public SpaceListView(ConfluenceToolWindowNavigatorViewModel parent) { InitializeComponent(); this._viewModel = new SpaceListViewModel(parent); this.DataContext = this._viewModel; }
public AfterSignInView(ConfluenceToolWindowNavigatorViewModel parent) { InitializeComponent(); this._viewModel = new AfterSignInViewModel(parent); this.DataContext = this._viewModel; }
/// <summary> /// Standard constructor for the tool window. /// </summary> public ConfluenceToolWindow() : base(null) { this.Caption = Resources.ConflueceToolWindowTitle; this._navigator = new ConfluenceToolWindowNavigatorViewModel(this); /* * this._authenticationService = new AuthenticationService(SignedInUser.Username, SignedInUser.Password); * * _authenticatedUser = _authenticationService.Authenticate(); * * if (_authenticationService.IsAuthenticated(_authenticatedUser)) * { * this._navigator.ShowSpaces(null, null); * } * else * { * this._navigator.ShowBeforeSignIn(); * } */ this._view = new ConfluenceToolWindowNavigator(this._navigator); base.Content = _view; this.ToolBar = new CommandID(Guids.guidConfluencePackage, Guids.CONFLUENCE_TOOLBAR_ID); this._navigator.ShowConnection(null, null); }
public ContentListView(Space space, ConfluenceToolWindowNavigatorViewModel parent) { InitializeComponent(); this._viewModel = new ContentListViewModel(space, parent); this.DataContext = this._viewModel; }
public OAuthVerifierConfirmationView(ConfluenceToolWindowNavigatorViewModel parent, IToken requestToken) { InitializeComponent(); this._viewModel = new OAuthVerifierConfirmationViewModel(parent, requestToken); this.DataContext = this._viewModel; }
protected override void OnStartSearch() { ConfluenceToolWindowNavigator control = (ConfluenceToolWindowNavigator)m_toolWindow.Content; control.Dispatcher.Invoke(() => { ConfluenceToolWindowNavigatorViewModel navigator = (ConfluenceToolWindowNavigatorViewModel)control.DataContext; InitializeListsToSearch(navigator); }); List <Space> resultList = new List <Space>(); bool matchCase = false; uint resultCount = 0; this.ErrorCode = VSConstants.S_OK; try { string searchString = this.SearchQuery.SearchString; // Determine the results. uint progress = 0; resultCount = SearchForSpaceName(resultList, matchCase, resultCount, searchString); } catch (Exception e) { this.ErrorCode = VSConstants.E_FAIL; } finally { m_toolWindow._repeatedSearch = true; ThreadHelper.Generic.Invoke(() => { m_toolWindow._spaceList.Clear(); foreach (Space space in resultList) { m_toolWindow._spaceList.Add(space); } }); this.SearchResults = resultCount; } // Call the implementation of this method in the base class. // This sets the task status to complete and reports task completion. base.OnStartSearch(); }
private void InitializeListsToSearch(ConfluenceToolWindowNavigatorViewModel navigator) { m_toolWindow._spaceList = ((SpaceListViewModel)((SpaceListView)navigator.SelectedView).DataContext).SpaceList; if (!m_toolWindow._repeatedSearch) { m_toolWindow._spaceListCopy = new ObservableCollection <Space>(); foreach (Space space in m_toolWindow._spaceList) { m_toolWindow._spaceListCopy.Add(space); } } }
public ConfluenceToolWindowNavigator(ConfluenceToolWindowNavigatorViewModel navigator) { InitializeComponent(); this.DataContext = navigator; }