Skip to content

Commit

Permalink
Merge pull request #55 from celeron533/typo
Browse files Browse the repository at this point in the history
Minor update
  • Loading branch information
celeron533 authored Jan 22, 2024
2 parents 6764972 + 1e192c1 commit 881da01
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DicomGrep/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
xmlns:enums="clr-namespace:DicomGrep.Enums"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
mc:Ignorable="d"
Title="Dicom Grep" Height="640" Width="960" MinWidth="300" MinHeight="200">
Title="{Binding Version, StringFormat='Dicom Grep v{0}'}" Height="640" Width="960" MinWidth="300" MinHeight="200">
<Window.DataContext>
<vm:MainViewModel/>
</Window.DataContext>
Expand Down
3 changes: 3 additions & 0 deletions DicomGrep/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
Expand All @@ -21,6 +22,8 @@ namespace DicomGrep.ViewModels
{
public class MainViewModel : ViewModelBase
{
public string Version => Assembly.GetExecutingAssembly().GetName().Version.ToString();

// todo: using DI
private readonly SearchService searchService = new SearchService();
private readonly DictionaryService dictionaryService = new DictionaryService();
Expand Down
4 changes: 2 additions & 2 deletions DicomGrep/Views/DicomDictionaryLookupView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<TextBox Name="filter" TextChanged="Filter_TextChanged" Grid.Row="1" Grid.Column="1"/>
<Button Name="pick" Content="Pick" Grid.Column="2" Grid.RowSpan="2" IsDefault="True" Click="pick_Click" Margin="8"/>
</Grid>
<DataGrid Name="dataGridUid" ItemsSource="{Binding DicomDictionaryEntries, Mode=OneWay}" AutoGenerateColumns="False"
<DataGrid Name="dataGridTags" ItemsSource="{Binding DicomDictionaryEntries, Mode=OneWay}" AutoGenerateColumns="False"
SelectedItem="{Binding SelectedEntry, Mode=OneWayToSource}" SelectionMode="Single"
Grid.Row="1" MouseDoubleClick="dataGridUid_MouseDoubleClick">
<DataGrid.Columns>
Expand All @@ -50,7 +50,7 @@
</DataGrid>
<StatusBar Grid.Row="2">
<StatusBarItem>
<Label Content="{Binding ElementName=dataGridUid, Path=Items.Count}" ContentStringFormat="Tags: {0}"/>
<Label Content="{Binding ElementName=dataGridTags, Path=Items.Count}" ContentStringFormat="Tags: {0}"/>
</StatusBarItem>
</StatusBar>
</Grid>
Expand Down
2 changes: 1 addition & 1 deletion DicomGrep/Views/DicomDictionaryLookupView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private void Timer_Tick(object sender, EventArgs e)

TextBox filterTextBox = filter;
string filterText = filterTextBox.Text;
ICollectionView cv = CollectionViewSource.GetDefaultView(dataGridUid.ItemsSource);
ICollectionView cv = CollectionViewSource.GetDefaultView(dataGridTags.ItemsSource);

if (!string.IsNullOrEmpty(filterText))
{
Expand Down
4 changes: 2 additions & 2 deletions DicomGrep/Views/SopClassLookupView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
<TextBox Name="filter" TextChanged="Filter_TextChanged" Grid.Row="1" Grid.Column="1"/>
<Button Name="pick" Content="Pick" Grid.Column="2" Grid.RowSpan="2" IsDefault="True" Click="pick_Click" Margin="8"/>
</Grid>
<DataGrid Name="dataGridUid" ItemsSource="{Binding SOPClassUIDs, Mode=OneWay}" AutoGenerateColumns="True"
<DataGrid Name="dataGridUids" ItemsSource="{Binding SOPClassUIDs, Mode=OneWay}" AutoGenerateColumns="True"
SelectedItem="{Binding SelectedUID, Mode=OneWayToSource}" SelectionMode="Single"
Grid.Row="1" MouseDoubleClick="dataGridUid_MouseDoubleClick"/>
<StatusBar Grid.Row="2">
<StatusBarItem>
<Label Content="{Binding ElementName=dataGridUid, Path=Items.Count}" ContentStringFormat="UIDs: {0}"/>
<Label Content="{Binding ElementName=dataGridUids, Path=Items.Count}" ContentStringFormat="UIDs: {0}"/>
</StatusBarItem>
</StatusBar>
</Grid>
Expand Down
2 changes: 1 addition & 1 deletion DicomGrep/Views/SopClassLookupView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private void Timer_Tick(object sender, EventArgs e)

TextBox filterTextBox = filter;
string filterText = filterTextBox.Text;
ICollectionView cv = CollectionViewSource.GetDefaultView(dataGridUid.ItemsSource);
ICollectionView cv = CollectionViewSource.GetDefaultView(dataGridUids.ItemsSource);

if (!string.IsNullOrEmpty(filterText))
{
Expand Down

0 comments on commit 881da01

Please sign in to comment.