Skip to content

Commit

Permalink
Merge pull request #76 from kmaki565/auto-save-logsource
Browse files Browse the repository at this point in the history
Auto save opened log source
  • Loading branch information
kmaki565 authored Sep 20, 2024
2 parents 8284634 + 11686f0 commit fcf8ec5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion EventLook/EventLook.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>
<PropertyGroup>
<AssemblyTitle>A fast &amp; handy Event Viewer</AssemblyTitle>
<AssemblyVersion>1.6.1.0</AssemblyVersion>
<AssemblyVersion>1.6.2.0</AssemblyVersion>
<Description>$(AssemblyTitle)</Description>
<Copyright>Copyright (C) K. Maki</Copyright>
<Product>EventLook</Product>
Expand Down
7 changes: 6 additions & 1 deletion EventLook/ViewModel/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,12 @@ private void OpenLogPicker()
bool? ret = LogPickerWindowService.ShowDialog(openLogVm);
if (ret == true && !string.IsNullOrEmpty(openLogVm.SelectedChannel?.Path))
{
SelectedLogSource = logSourceMgr.AddLogSource(openLogVm.SelectedChannel.Path, PathType.LogName);
// If the chosen source is already in the list, just select it.
SelectedLogSource = LogSources.FirstOrDefault(x => x.Path == openLogVm.SelectedChannel.Path) ??
logSourceMgr.AddLogSource(openLogVm.SelectedChannel.Path, PathType.LogName, addToBottom: true);

Properties.Settings.Default.StartupLogNames = LogSources.Where(x => x.PathType == PathType.LogName).Select(x => x.Path).ToList();
Properties.Settings.Default.Save();
}
}
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion EventLookPackage/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Identity
Name="64247kmaki565.323654BB1C7D"
Publisher="CN=B5234934-E68F-4911-8E10-60FECC338A02"
Version="1.6.1.0" />
Version="1.6.2.0" />

<Properties>
<DisplayName>EventLook</DisplayName>
Expand Down

0 comments on commit fcf8ec5

Please sign in to comment.