Skip to content

Commit 127833d

Browse files
committed
Made the UI actually work
1 parent bb2d0a8 commit 127833d

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

RetailCoder.VBE/UI/RegexAssistant/RegexAssistant.xaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@
3030
</Label>
3131
<Label Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=RegexAssistant_RegexPatternLabel}"
3232
FontWeight="SemiBold" />
33-
<TextBox x:Name="RegexValue" HorizontalAlignment="Left" TextWrapping="Wrap"
33+
<TextBox HorizontalAlignment="Left" TextWrapping="Wrap"
3434
VerticalAlignment="Top" MinWidth="250" MinHeight="23" MaxHeight="23"
3535
VerticalContentAlignment="Center" Margin="15,5,5,5" Text="{Binding Pattern}"/>
3636
<StackPanel Orientation="Horizontal">
37-
<CheckBox x:Name="GlobalFlag" Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=RegexAssistant_GlobalFlag}"
37+
<CheckBox Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=RegexAssistant_GlobalFlag}"
3838
HorizontalAlignment="Left" Height="18" VerticalAlignment="Top" MinWidth="110"
3939
Margin="15,5,5,5" IsChecked="{Binding GlobalFlag}"/>
40-
<CheckBox x:Name="IgnoreCaseFlag" Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=RegexAssistant_IgnoreCaseFlag}"
40+
<CheckBox Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=RegexAssistant_IgnoreCaseFlag}"
4141
HorizontalAlignment="Left" Height="18" VerticalAlignment="Top" MinWidth="110"
4242
Margin="15,5,5,5" IsChecked="{Binding IgnoreCaseFlag}"/>
4343
</StackPanel>
@@ -48,9 +48,8 @@
4848
MinHeight="165" VerticalAlignment="Top" MinWidth="250"
4949
Margin="15,5,5,5">
5050
</RichTextBox>-->
51-
<TextBox x:Name="Results"
52-
MinHeight="165" VerticalAlignment="Top" MinWidth="250"
53-
Margin="15,5,5,5" Text="{Binding DescriptionResults}"/>
51+
<TextBlock MinHeight="165" VerticalAlignment="Top" MinWidth="250" TextWrapping="WrapWithOverflow"
52+
Margin="15,5,5,5" Text="{Binding DescriptionResults, Mode=OneWay}"/>
5453

5554
</StackPanel>
5655
</Grid>

RetailCoder.VBE/UI/RegexAssistant/RegexAssistantViewModel.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
namespace Rubberduck.UI.RegexAssistant
44
{
5-
class RegexAssistantViewModel : ViewModelBase
5+
public class RegexAssistantViewModel : ViewModelBase
66
{
77
public RegexAssistantViewModel()
88
{
9+
_pattern = string.Empty;
910
RecalculateDescription();
1011
}
1112

@@ -58,6 +59,7 @@ private void RecalculateDescription()
5859
return;
5960
}
6061
_description = new Pattern(_pattern, _ignoreCaseFlag, _ignoreCaseFlag).Description;
62+
base.OnPropertyChanged("DescriptionResults");
6163
}
6264

6365
public string DescriptionResults

Rubberduck.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,16 @@ EndProject
3838
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rubberduck.SmartIndenter", "Rubberduck.SmartIndenter\Rubberduck.SmartIndenter.csproj", "{B9C0BF22-4D8A-4BF4-89F9-E789C0063DEB}"
3939
EndProject
4040
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RubberduckTests", "RubberduckTests\RubberduckTests.csproj", "{ADADE971-75E3-40C4-8C19-AB7409372F2E}"
41+
ProjectSection(ProjectDependencies) = postProject
42+
{40CC03E3-756C-4674-AF07-384115DEAEE2} = {40CC03E3-756C-4674-AF07-384115DEAEE2}
43+
EndProjectSection
4144
EndProject
4245
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rubberduck.SettingsProvider", "Rubberduck.SettingsProvider\Rubberduck.SettingsProvider.csproj", "{E85E1253-86D6-45EE-968B-F37348D44132}"
4346
EndProject
4447
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rubberduck.RegexAssistant", "Rubberduck.RegexAssistant\Rubberduck.RegexAssistant.csproj", "{40CC03E3-756C-4674-AF07-384115DEAEE2}"
48+
ProjectSection(ProjectDependencies) = postProject
49+
{E85E1253-86D6-45EE-968B-F37348D44132} = {E85E1253-86D6-45EE-968B-F37348D44132}
50+
EndProjectSection
4551
EndProject
4652
Global
4753
GlobalSection(SolutionConfigurationPlatforms) = preSolution

0 commit comments

Comments
 (0)