From 525c75cad24628601b7bfea4a08bf374c35c0c3a Mon Sep 17 00:00:00 2001 From: Eusebiu Marcu Date: Thu, 13 Jan 2011 03:41:22 +0200 Subject: [PATCH] New features in WPF WatchPad: - add new watch using Ins key - ability to edit the name of the variable using also autocomplete. --- .../Debugger.AddIn/Debugger.AddIn.csproj | 4 + .../Pads/Controls/ConditionCell.xaml.cs | 4 +- .../Pads/Controls/Converters.cs | 17 ++ .../Pads/Controls/WatchList.xaml | 63 ++++++- .../Pads/Controls/WatchList.xaml.cs | 51 +++-- .../Controls/WatchListAutoCompleteCell.cs | 178 ++++++++++++++++++ .../Controls/WatchListAutoCompleteCell.xaml | 11 ++ .../Debugger.AddIn/Pads/LocalVarPad.cs | 1 + .../Debugger.AddIn/Pads/WatchInputBox.xaml.cs | 3 + .../Debugger/Debugger.AddIn/Pads/WatchPad.cs | 46 +++-- 10 files changed, 342 insertions(+), 36 deletions(-) create mode 100644 src/AddIns/Debugger/Debugger.AddIn/Pads/Controls/WatchListAutoCompleteCell.cs create mode 100644 src/AddIns/Debugger/Debugger.AddIn/Pads/Controls/WatchListAutoCompleteCell.xaml diff --git a/src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.csproj b/src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.csproj index 79a7c82dd4..6de0fd70b0 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.csproj +++ b/src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.csproj @@ -117,6 +117,9 @@ WatchList.xaml + + WatchListAutoCompleteCell.xaml + DrawSurface.xaml Code @@ -393,6 +396,7 @@ + diff --git a/src/AddIns/Debugger/Debugger.AddIn/Pads/Controls/ConditionCell.xaml.cs b/src/AddIns/Debugger/Debugger.AddIn/Pads/Controls/ConditionCell.xaml.cs index 8946e8e802..4f01c5951a 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Pads/Controls/ConditionCell.xaml.cs +++ b/src/AddIns/Debugger/Debugger.AddIn/Pads/Controls/ConditionCell.xaml.cs @@ -1,4 +1,6 @@ - +// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) +// This code is distributed under the GNU LGPL (for details please see \doc\license.txt) + using System; using System.IO; using System.Windows; diff --git a/src/AddIns/Debugger/Debugger.AddIn/Pads/Controls/Converters.cs b/src/AddIns/Debugger/Debugger.AddIn/Pads/Controls/Converters.cs index 360f52d6ce..245a8d018a 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Pads/Controls/Converters.cs +++ b/src/AddIns/Debugger/Debugger.AddIn/Pads/Controls/Converters.cs @@ -53,4 +53,21 @@ namespace Debugger.AddIn.Pads.Controls throw new NotImplementedException(); } } + + public class BoolAndTypeToVisibilityConverter : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, + object parameter, CultureInfo culture) + { + bool val = bool.Parse(parameter.ToString()); + return val == ((WatchListType)(values[0]) == WatchListType.Watch && + bool.Parse(values[1].ToString())) ? Visibility.Visible : Visibility.Collapsed; + } + + public object[] ConvertBack(object value, Type[] targetTypes, + object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } } diff --git a/src/AddIns/Debugger/Debugger.AddIn/Pads/Controls/WatchList.xaml b/src/AddIns/Debugger/Debugger.AddIn/Pads/Controls/WatchList.xaml index ebdb3b10f4..280b246bff 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Pads/Controls/WatchList.xaml +++ b/src/AddIns/Debugger/Debugger.AddIn/Pads/Controls/WatchList.xaml @@ -2,10 +2,15 @@ + + + + +