Browse Source

Show description in issue options.

newNRvisualizers
Daniel Grunwald 14 years ago
parent
commit
3c64a767dd
  1. 6
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/IssueOptions.xaml
  2. 9
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/IssueOptions.xaml.cs
  3. 4
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/IssueOptionsViewModel.cs

6
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/IssueOptions.xaml

@ -9,6 +9,9 @@
<CheckBox Name="featureEnabledCheckBox" DockPanel.Dock="Top" <CheckBox Name="featureEnabledCheckBox" DockPanel.Dock="Top"
IsEnabled="False" IsEnabled="False"
IsChecked="True" Content="Enable code inspection" /> IsChecked="True" Content="Enable code inspection" />
<TextBlock DockPanel.Dock="Bottom" TextWrapping="WrapWithOverflow" MaxHeight="75"
Text="{Binding SelectedValue.Description, ElementName=listBox}" />
<TextBlock FontWeight="Bold" DockPanel.Dock="Bottom" Text="{Binding SelectedValue.Title, ElementName=listBox}" />
<sd:RestrictDesiredSize Margin="0, 4, 0, 0"> <sd:RestrictDesiredSize Margin="0, 4, 0, 0">
<ListBox Name="listBox" <ListBox Name="listBox"
HorizontalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"
@ -17,12 +20,13 @@
<DataTemplate> <DataTemplate>
<DockPanel> <DockPanel>
<ComboBox DockPanel.Dock="Right" <ComboBox DockPanel.Dock="Right"
GotFocus="ComboBox_GotFocus"
MinWidth="85" MinWidth="85"
VerticalAlignment="Center" VerticalAlignment="Center"
gui:EnumBinding.EnumType="{x:Type nr:Severity}" gui:EnumBinding.EnumType="{x:Type nr:Severity}"
SelectedValue="{Binding Severity}"/> SelectedValue="{Binding Severity}"/>
<sd:RestrictDesiredSize RestrictHeight="False" MinWidth="150"> <sd:RestrictDesiredSize RestrictHeight="False" MinWidth="150">
<TextBlock Text="{Binding DisplayName}" ToolTip="{Binding ToolTip}" TextWrapping="WrapWithOverflow" /> <TextBlock Text="{Binding Title}" TextWrapping="WrapWithOverflow" VerticalAlignment="Center" />
</sd:RestrictDesiredSize> </sd:RestrictDesiredSize>
</DockPanel> </DockPanel>
</DataTemplate> </DataTemplate>

9
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/IssueOptions.xaml.cs

@ -13,6 +13,7 @@ using System.Windows.Data;
using System.Windows.Documents; using System.Windows.Documents;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Media; using System.Windows.Media;
using ICSharpCode.Core.Presentation;
using ICSharpCode.NRefactory.CSharp; using ICSharpCode.NRefactory.CSharp;
using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Refactoring; using ICSharpCode.SharpDevelop.Refactoring;
@ -60,5 +61,13 @@ namespace CSharpBinding.Refactoring
IssueManager.SetIssueSeveritySettings(dict); IssueManager.SetIssueSeveritySettings(dict);
return base.SaveOptions(); return base.SaveOptions();
} }
void ComboBox_GotFocus(object sender, RoutedEventArgs e)
{
var item = WpfTreeNavigation.TryFindParent<ListBoxItem>((ComboBox)sender);
if (item != null) {
item.IsSelected = true;
}
}
} }
} }

4
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/IssueOptionsViewModel.cs

@ -25,11 +25,11 @@ namespace CSharpBinding.Refactoring
} }
// TODO: Translate // TODO: Translate
public string DisplayName { public string Title {
get { return attribute.Title; } get { return attribute.Title; }
} }
public string ToolTip { public string Description {
get { return attribute.Description; } get { return attribute.Description; }
} }

Loading…
Cancel
Save