Exemplo n.º 1
0
        private void InitializeInternalComponents()
        {
            UIController = new ChangesetViewerUIController
            {
                DisableLoadNotificationUsers    = DiableUiNotificationUsers,
                EnableLoadNotificationChangeset = EnableUiNotificationChangeset,
                DisableLoadNotificatioChangeset = DisableUiNotificationChangeset,
                SearchButtonTextLoading         = SearchButtonTextLoading,
                SearchButtonTextReset           = SearchButtonTextReset,
                ErrorHandler = HandleErrorInUI,
            };

            UIController.TfsServerContextChanged += _cController_TfsServerContextChanged;

            DiableUiNotificationUsers();
            DisableUiNotificationChangeset();
        }
Exemplo n.º 2
0
        private static FlowDocument GenerateWorkItemsDocument(string text)
        {
            var document = new FlowDocument();

            if (string.IsNullOrEmpty(text))
            {
                return(document);
            }
            var para = new Paragraph {
                Margin = new Thickness(0)
            };

            foreach (var workitem in text.Split(",".ToCharArray()))
            {
                var link = new Hyperlink
                {
                    Foreground = System.Windows.Media.Brushes.SkyBlue,
                    FontWeight = FontWeights.Bold,
                    IsEnabled  = true
                };
                link.Inlines.Add(workitem);
                link.NavigateUri      = new Uri("http://www.google.com");
                link.TargetName       = workitem;
                link.RequestNavigate += (sender, args) =>
                {
                    ChangesetViewerUIController.OpenWorkItem(args.Target);
                };

                para.Inlines.Add(link);

                para.Inlines.Add(" ");
            }
            document.Blocks.Add(para);

            return(document);
        }