|
|
|
@ -8,6 +8,7 @@
@@ -8,6 +8,7 @@
|
|
|
|
|
using System; |
|
|
|
|
using AvalonDock; |
|
|
|
|
using ICSharpCode.Core; |
|
|
|
|
using System.Windows; |
|
|
|
|
|
|
|
|
|
namespace ICSharpCode.SharpDevelop.Gui |
|
|
|
|
{ |
|
|
|
@ -17,13 +18,27 @@ namespace ICSharpCode.SharpDevelop.Gui
@@ -17,13 +18,27 @@ namespace ICSharpCode.SharpDevelop.Gui
|
|
|
|
|
sealed class AvalonPadContent : DockableContent |
|
|
|
|
{ |
|
|
|
|
PadDescriptor descriptor; |
|
|
|
|
IPadContent content; |
|
|
|
|
|
|
|
|
|
public AvalonPadContent(PadDescriptor descriptor) |
|
|
|
|
{ |
|
|
|
|
this.descriptor = descriptor; |
|
|
|
|
|
|
|
|
|
this.Name = descriptor.Class.Replace('.', '_'); |
|
|
|
|
this.Title = StringParser.Parse(descriptor.Title); |
|
|
|
|
this.Content = descriptor.Class; |
|
|
|
|
this.Content = "Placeholder for " + descriptor.Class; |
|
|
|
|
|
|
|
|
|
this.Loaded += AvalonPadContent_Loaded; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void AvalonPadContent_Loaded(object sender, RoutedEventArgs e) |
|
|
|
|
{ |
|
|
|
|
this.Loaded -= AvalonPadContent_Loaded; |
|
|
|
|
// the first time the pad is "loaded"
|
|
|
|
|
content = descriptor.PadContent; |
|
|
|
|
if (content != null) { |
|
|
|
|
this.Content = AvalonWorkbenchWindow.WrapContent(content.Content); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|