Exemple #1
0
        void WorkbenchActiveContentChanged(object sender, EventArgs e)
        {
            IViewContent view = WorkbenchSingleton.Workbench.ActiveViewContent;

            if (view != null)
            {
                IOutlineContentHost content = view.GetService(typeof(IOutlineContentHost)) as IOutlineContentHost;
                if (content != null)
                {
                    contentControl.SetContent(content.OutlineContent, content);
                    return;
                }
            }

            ITextEditorProvider provider = WorkbenchSingleton.Workbench.ActiveViewContent as ITextEditorProvider;

            if (provider != null)
            {
                IOutlineContentHost content = provider.TextEditor.GetService(typeof(IOutlineContentHost)) as IOutlineContentHost;
                if (content != null)
                {
                    contentControl.SetContent(content.OutlineContent, content);
                    return;
                }
            }
            contentControl.SetContent(StringParser.Parse("${res:MainWindow.Windows.OutlinePad.NoContentAvailable}"));
        }
Exemple #2
0
 void ShowError(Exception ex)
 {
     if (errorTextBox == null)
     {
         errorTextBox            = new TextBox();
         errorTextBox.IsReadOnly = true;
         errorTextBox.Background = SystemColors.WindowBrush;
     }
     errorTextBox.Text = String.Concat(this.LoadErrorHeaderText, ex.ToString());
     contentControl.SetContent(errorTextBox, this);
 }
Exemple #3
0
        void WorkbenchActiveContentChanged(object sender, EventArgs e)
        {
            IToolsHost th = WorkbenchSingleton.Workbench.ActiveViewContent as IToolsHost;

            if (th != null && th.ToolsContent != null)
            {
                contentControl.SetContent(th.ToolsContent, th);
            }
            else
            {
                contentControl.SetContent(StringParser.Parse("${res:SharpDevelop.SideBar.NoToolsAvailableForCurrentDocument}"));
            }
        }
        void WorkbenchActiveViewContentChanged(object sender, EventArgs e)
        {
            WpfViewContent wpfView = WorkbenchSingleton.Workbench.ActiveViewContent as WpfViewContent;

            if (wpfView != null)
            {
                thumbnailView.DesignSurface = wpfView.DesignSurface;
                contentControl.SetContent(thumbnailView);
            }
            else
            {
                contentControl.SetContent(notAvailableTextBlock);
            }
        }