diff --git a/src/AddIns/Debugger/Debugger.AddIn/Pads/Commands/WatchPadCommands.cs b/src/AddIns/Debugger/Debugger.AddIn/Pads/Commands/WatchPadCommands.cs index d5723c9858..76a52e5038 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Pads/Commands/WatchPadCommands.cs +++ b/src/AddIns/Debugger/Debugger.AddIn/Pads/Commands/WatchPadCommands.cs @@ -28,7 +28,7 @@ namespace Debugger.AddIn if (this.Owner is WatchPad) { WatchPad pad = (WatchPad)this.Owner; - var inputWindow = new WatchInputBox(StringParser.Parse("${res:MainWindow.Windows.Debug.Watch.AddWatch}"), + var inputWindow = new WatchInputBox(StringParser.Parse("${res:MainWindow.Windows.Debug.Watch.AddWatch}"), StringParser.Parse("${res:MainWindow.Windows.Debug.Watch.EnterExpression}")); inputWindow.Owner = ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainWindow; var result = inputWindow.ShowDialog(); @@ -39,13 +39,13 @@ namespace Debugger.AddIn if (!string.IsNullOrEmpty(input)) { // get language - if (ProjectService.CurrentProject == null) return; + if (ProjectService.CurrentProject == null) return; - string language = ProjectService.CurrentProject.Language; + string language = ProjectService.CurrentProject.Language; TextNode text = new TextNode(input, language == "VB" || language == "VBNet" ? SupportedLanguage.VBNet : SupportedLanguage.CSharp); - var list = (WatchList)pad.Control; + var list = pad.WatchList; if(!list.WatchItems.ContainsItem(text)) list.WatchItems.Add(text); @@ -62,15 +62,13 @@ namespace Debugger.AddIn { if (this.Owner is WatchPad) { WatchPad pad = (WatchPad)this.Owner; - var list = (WatchList)pad.Control; - + var list = pad.WatchList; var node = list.SelectedNode; if (node == null) return; list.WatchItems.Remove(node); - ((WatchPad)this.Owner).RefreshPad(); } } @@ -92,7 +90,7 @@ namespace Debugger.AddIn { if (this.Owner is WatchPad) { WatchPad pad = (WatchPad)this.Owner; - var list = (WatchList)pad.Control; + var list = pad.WatchList; list.WatchItems.Clear(); } } @@ -104,7 +102,7 @@ namespace Debugger.AddIn { if (this.Owner is WatchPad) { WatchPad pad = (WatchPad)this.Owner; - var list = (WatchList)pad.Control; + var list = pad.WatchList; if (list.SelectedNode is ExpressionNode) { string text = ((ExpressionNode)list.SelectedNode).FullText; ClipboardWrapper.SetText(text); diff --git a/src/AddIns/Debugger/Debugger.AddIn/Pads/WatchPad.cs b/src/AddIns/Debugger/Debugger.AddIn/Pads/WatchPad.cs index aa4cce417f..6774c1a61e 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Pads/WatchPad.cs +++ b/src/AddIns/Debugger/Debugger.AddIn/Pads/WatchPad.cs @@ -31,6 +31,12 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads get { return instance; } } + public WatchList WatchList { + get { + return watchList; + } + } + public WatchPad() { instance = this; diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/ChangeMarkerMargin.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/ChangeMarkerMargin.cs index 59bf66dd57..4e79244f6c 100644 --- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/ChangeMarkerMargin.cs +++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/ChangeMarkerMargin.cs @@ -8,6 +8,7 @@ using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media; +using ICSharpCode.AvalonEdit.AddIn.Options; using ICSharpCode.AvalonEdit.Editing; using ICSharpCode.AvalonEdit.Rendering; @@ -145,7 +146,8 @@ namespace ICSharpCode.AvalonEdit.AddIn Background = Brushes.White }; TextBlock oldTb = new TextBlock() { - FontFamily = new FontFamily("Courier New"), + FontFamily = new FontFamily(CodeEditorOptions.Instance.FontFamily), + FontSize = CodeEditorOptions.Instance.FontSize, Foreground = Brushes.Black, Background = Brushes.White, TextDecorations = TextDecorations.Strikethrough, @@ -155,7 +157,8 @@ namespace ICSharpCode.AvalonEdit.AddIn oldTb.Text = diffs[0].Text.Trim(); TextBlock newTb = new TextBlock() { - FontFamily = new FontFamily("Courier New"), + FontFamily = new FontFamily(CodeEditorOptions.Instance.FontFamily), + FontSize = CodeEditorOptions.Instance.FontSize, Foreground = Brushes.Black, Background = Brushes.White, Text = diffs[1].Text.Trim()