Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="svnStatusUpdatedEventArgs"></param>
        private void SvnManagerOnSvnStatusUpdatedEvent(object sender, SvnStatusUpdatedEventArgs svnStatusUpdatedEventArgs)
        {
            Host.BeginInvoke(() =>
            {
                //GetStudioWindows() is in NationalInstruments.Restricted.Shell and may not always be publicly exposed.
                //This call may need to change at a later date, but should work for now.
                var studioWindows = StudioWindow.GetStudioWindows(Host); //Get all of the StudioWindows
                foreach (StudioWindow studioWindow in studioWindows)     // use each StudioWindow's EditSite to refresh the appropriate icon
                {
                    var editSite = studioWindow.GetEditSite();
                    if (null != editSite) // check editSite != null just in case
                    {
                        var projectExplorerViewModel = editSite?.GetProjectExplorerViewModelFromEditSite();
                        var projectItem = projectExplorerViewModel?.FindProjectItemByFullPath(svnStatusUpdatedEventArgs.FullFilePath);
                        projectItem?.RefreshIcon();
                    }
                }
            });
            var handler = SvnStatusUpdatedEvent;

            handler?.Invoke(this, svnStatusUpdatedEventArgs);
        }