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

Commit

Permalink
Dev 1.5.0 (#18)
Browse files Browse the repository at this point in the history
* Hot fixes
* Allow to copy logs into the clipboard
  • Loading branch information
jibedoubleve authored Feb 8, 2019
1 parent fa9a095 commit 52a2451
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 17 deletions.
1 change: 1 addition & 0 deletions Probel.JsonReader.Business/Data/LogFilterExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public static class LogFilterExtensions

public static IEnumerable<string> GetCategories(this IEnumerable<LogModel> models)
{
if (models == null) { return new List<string>(); }
var result = (from m in models select m.Logger)
.OrderBy(e => e)
.Distinct()
Expand Down
5 changes: 0 additions & 5 deletions Probel.JsonReader.Business/LogModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,10 @@ public class LogModel
#region Properties

public string Exception { get; set; }

public string Level { get; set; }

public string Logger { get; set; }

public string Message { get; set; }

public int ThreadId { get; set; }

public DateTime Time { get; set; }

#endregion Properties
Expand Down
18 changes: 16 additions & 2 deletions Probel.JsonReader.Presentation/Views/ShellView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,16 @@
<GroupBox Header="{x:Static m:Messages.Header_Message}">
<ScrollViewer HorizontalScrollBarVisibility="Auto">
<TextBlock
x:Name="tbMessage"
FontFamily="Consolas"
FontSize="11"
Text="{Binding ElementName=Grid, Path=SelectedItem.Message}" />
Text="{Binding ElementName=Grid, Path=SelectedItem.Message}">
<TextBlock.ContextMenu>
<ContextMenu>
<MenuItem Click="OnSaveExceptionInClipboard" Header="Copy message on clipboard" />
</ContextMenu>
</TextBlock.ContextMenu>
</TextBlock>
</ScrollViewer>
</GroupBox>
<GridSplitter
Expand All @@ -309,9 +316,16 @@
<GroupBox Grid.Row="2" Header="{x:Static m:Messages.Header_Exception}">
<ScrollViewer HorizontalScrollBarVisibility="Auto">
<TextBlock
x:Name="tbException"
FontFamily="Consolas"
FontSize="11"
Text="{Binding ElementName=Grid, Path=SelectedItem.Exception}" />
Text="{Binding ElementName=Grid, Path=SelectedItem.Exception}">
<TextBlock.ContextMenu>
<ContextMenu>
<MenuItem Click="OnSaveMessageInClipboard" Header="Copy exception in clipboard" />
</ContextMenu>
</TextBlock.ContextMenu>
</TextBlock>
</ScrollViewer>
</GroupBox>
</Grid>
Expand Down
19 changes: 12 additions & 7 deletions Probel.JsonReader.Presentation/Views/ShellView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,18 @@ private void OnOpenInExplorer(object sender, RoutedEventArgs e)
else { _logger.Warn($"Directory '{dir}' does not exist."); }
}

private void OnSaveExceptionInClipboard(object sender, RoutedEventArgs e)
{
var txt = tbException.Text;
Clipboard.SetText(txt);
}

private void OnSaveMessageInClipboard(object sender, RoutedEventArgs e)
{
var txt = tbMessage.Text;
Clipboard.SetText(txt);
}

private void OnShowColumn(object sender, RoutedEventArgs e)
{
if (sender is MenuItem mi)
Expand Down Expand Up @@ -167,13 +179,6 @@ private void RefreshFileHistory()

_menuHistory.Items.Insert(i, btn);
}

//var btn_all = new MenuItem() { Header = Messages.Menu_Category_All };

//var btn_none = new MenuItem() { Header = Messages.Menu_Category_None };

//_menuHistory.Items.Insert(++i, btn_all);
//_menuHistory.Items.Insert(++i, btn_none);
}

#endregion Methods
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.4.1")]
[assembly: AssemblyFileVersion("1.4.1")]
[assembly: AssemblyVersion("1.5.0")]
[assembly: AssemblyFileVersion("1.5.0")]
2 changes: 1 addition & 1 deletion build/setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Log Reader"
#define MyAppVersion "1.4.1"
#define MyAppVersion "1.5.0"
#define MyAppPublisher "Probel"
#define MyAppURL "http://www.probel.xyz"
#define MyAppExeName "Probel.JsonReader.Presentation.exe"
Expand Down

0 comments on commit 52a2451

Please sign in to comment.