Browse Source

Add icons for pads; dispose view contents when closing them.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0wpf@3478 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 17 years ago
parent
commit
15336dd45f
  1. BIN
      src/Libraries/AvalonDock/AvalonDock.dll
  2. 3
      src/Main/Base/Project/Src/Gui/Workbench/Layouts/AvalonPadContent.cs
  3. 14
      src/Main/Base/Project/Src/Gui/Workbench/Layouts/AvalonWorkbenchWindow.cs
  4. 9
      src/Main/Base/Project/Src/TextEditor/Gui/Dialogs/GotoDialog.cs
  5. 11
      src/Main/Base/Project/Src/TextEditor/Gui/Dialogs/GotoDialog.xaml

BIN
src/Libraries/AvalonDock/AvalonDock.dll

Binary file not shown.

3
src/Main/Base/Project/Src/Gui/Workbench/Layouts/AvalonPadContent.cs

@ -5,11 +5,11 @@ @@ -5,11 +5,11 @@
// <version>$Revision$</version>
// </file>
using ICSharpCode.Core.Presentation;
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Threading;
using AvalonDock;
using ICSharpCode.Core;
@ -35,6 +35,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -35,6 +35,7 @@ namespace ICSharpCode.SharpDevelop.Gui
this.Title = StringParser.Parse(descriptor.Title);
placeholder = new TextBlock { Text = this.Title };
this.Content = placeholder;
this.Icon = PresentationResourceService.GetPixelSnappedImage(descriptor.Icon);
placeholder.IsVisibleChanged += AvalonPadContent_IsVisibleChanged;
}

14
src/Main/Base/Project/Src/Gui/Workbench/Layouts/AvalonWorkbenchWindow.cs

@ -221,7 +221,9 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -221,7 +221,9 @@ namespace ICSharpCode.SharpDevelop.Gui
void Dispose()
{
// DetachContent must be called before the controls are disposed
List<IViewContent> viewContents = this.ViewContents.ToList();
this.ViewContents.Clear();
viewContents.Foreach(vc => vc.Dispose());
}
private void CreateViewTabControl()
@ -389,6 +391,16 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -389,6 +391,16 @@ namespace ICSharpCode.SharpDevelop.Gui
public event EventHandler TitleChanged;
public BitmapSource Icon { get; set; }
BitmapSource icon;
BitmapSource IWorkbenchWindow.Icon {
get { return icon; }
set {
if (icon != value) {
icon = value;
base.Icon = new PixelSnapper(new Image { Source = value });
}
}
}
}
}

9
src/Main/Base/Project/Src/TextEditor/Gui/Dialogs/GotoDialog.cs

@ -44,6 +44,15 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -44,6 +44,15 @@ namespace ICSharpCode.SharpDevelop.Gui
InitializeComponent();
// FormLocationHelper.Apply(this, "ICSharpCode.SharpDevelop.Gui.GotoDialog.Bounds", true);
textBox.Focus();
ParserService.LoadSolutionProjectsThreadEnded += ParserService_LoadSolutionProjectsThreadEnded;
}
void ParserService_LoadSolutionProjectsThreadEnded(object sender, EventArgs e)
{
// refresh the list box contents when parsing has completed
Dispatcher.BeginInvoke(
System.Windows.Threading.DispatcherPriority.Background,
new Action(delegate { textBoxTextChanged(null, null); }));
}
class MyListBoxItem : ListBoxItem, IComparable<MyListBoxItem>

11
src/Main/Base/Project/Src/TextEditor/Gui/Dialogs/GotoDialog.xaml

@ -1,13 +1,10 @@ @@ -1,13 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Window
x:Class="ICSharpCode.SharpDevelop.Gui.GotoDialog"
xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:core = "http://icsharpcode.net/sharpdevelop/core"
x:Class="ICSharpCode.SharpDevelop.Gui.GotoDialog" xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:core="http://icsharpcode.net/sharpdevelop/core"
Title="{core:Localize Dialog.Goto.DialogName}"
Height="298"
Width="578"
Style = "{StaticResource DialogWindow}">
Style="{StaticResource DialogWindow}">
<Grid>
<Label
Grid.Column="0"
@ -31,7 +28,7 @@ @@ -31,7 +28,7 @@
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Margin="8,4,8,4"
Name="listBox"/>
Name="listBox" />
<Button
Content="{core:Localize Global.OKButtonText}"
Grid.Column="0"
@ -56,7 +53,7 @@ @@ -56,7 +53,7 @@
Click="cancelButtonClick" />
<Grid.RowDefinitions>
<RowDefinition
Height="60" />
Height="70" />
<RowDefinition
Height="30" />
<RowDefinition

Loading…
Cancel
Save