Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1 from jibedoubleve/dev
Browse files Browse the repository at this point in the history
Bug fixing (V 1.0.1)
  • Loading branch information
jibedoubleve authored Mar 4, 2018
2 parents 4c1a3c7 + 3c9e4cc commit daa13f2
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 2 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Probel.JsonReader.Presentation/Properties/Messages.resx
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,7 @@
<data name="Menu_Order_Desc" xml:space="preserve">
<value>Descending</value>
</data>
<data name="Status_Version" xml:space="preserve">
<value>V {0}</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ public bool ShowWarning
get; set;
}

[JsonProperty]
public bool IsSortAscending { get; set; }

#endregion Properties

public void Fill(SettingsViewModel vm)
Expand All @@ -131,6 +134,7 @@ public void Fill(SettingsViewModel vm)
vm.ShowWarning = ShowWarning;
vm.ShowError = ShowError;
vm.ShowFatal = ShowFatal;
vm.IsSortAscending = IsSortAscending;
}
}
}
12 changes: 12 additions & 0 deletions Probel.JsonReader.Presentation/ViewModels/ShellViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using System.Windows.Input;

Expand All @@ -28,7 +29,9 @@ public class ShellViewModel : BindableBase
private string _status = Messages.Status_Ready;
private string _statusItemsCount = string.Format(Messages.Status_xxItems, 0);
private string _title = TITLE_PREFIX;
private string _version;
private string FilePath;

private FileSystemWatcher FileWatcher;

#endregion Fields
Expand All @@ -37,6 +40,9 @@ public class ShellViewModel : BindableBase

public ShellViewModel(ILogRepository logRepository, ICommandBuilder commandBuilder)
{
var v = Assembly.GetEntryAssembly().GetName().Version;
Version = string.Format(Messages.Status_Version, v.ToString(3));

LogRepository = logRepository;
DefaultDirectory = Environment.ExpandEnvironmentVariables(DEFAULT_DIRECTORY);

Expand Down Expand Up @@ -89,6 +95,12 @@ public string Title
set => SetProperty(ref _title, $"{TITLE_PREFIX} - [{value}]", nameof(Title));
}

public string Version
{
get => _version;
set => SetProperty(ref _version, value, nameof(Version));
}

private IEnumerable<LogModel> BufferLogs { get; set; }

#endregion Properties
Expand Down
6 changes: 6 additions & 0 deletions Probel.JsonReader.Presentation/Views/ShellView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@
CanUserReorderColumns="False"
CanUserResizeRows="False"
CanUserSortColumns="False"
GridLinesVisibility="Horizontal"
ItemsSource="{Binding Logs}"
SelectionMode="Single">
<DataGrid.Resources>
Expand Down Expand Up @@ -235,6 +236,11 @@
</DataGrid>
<StatusBar Grid.Row="3">
<StatusBarItem Content="{Binding Status}" />
<StatusBarItem
HorizontalAlignment="Right"
Content="{Binding Version}"
DockPanel.Dock="Right" />
<Separator Margin="5,3,5,3" DockPanel.Dock="Right" />
<StatusBarItem
HorizontalAlignment="Right"
Content="{Binding StatusItemsCount}"
Expand Down
4 changes: 2 additions & 2 deletions Version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
// [assembly: AssemblyVersion("1.0.*")]
using System.Reflection;

[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.1")]
[assembly: AssemblyFileVersion("1.0.1")]

0 comments on commit daa13f2

Please sign in to comment.