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

Commit

Permalink
Adjust Open Logs Directory button in Advanced Settings Window
Browse files Browse the repository at this point in the history
- fixed typo
- Add version to log when starting application
  • Loading branch information
Nadromar committed Mar 30, 2019
1 parent 2ca2224 commit c644686
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion MultiTablePro/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Configuration;
using System.Data;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using System.Windows;
using MultiTablePro.Data;
Expand All @@ -24,7 +25,7 @@ protected override void OnStartup(StartupEventArgs e)

// Notify application started
App.Current.Properties["IsRunning"] = true;
Logger.Log("--- Starting application ---");
Logger.Log($"--- MultiTable Pro v{Assembly.GetExecutingAssembly().GetName().Version.ToString()} Started ---");

// Load config & install on first run
// Config needs to be initialized before the license check
Expand Down
4 changes: 2 additions & 2 deletions MultiTablePro/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public enum Status
};

static Queue<string> writeQueue = new Queue<string>();
static string LogFilePath { get; set; }
static Status LogLevel { get; set; }
public static string LogFilePath { get; set; }
public static Status LogLevel { get; set; }

public static void Log(string message, Status status = Status.Info, bool showMessageBox = false)
{
Expand Down
2 changes: 1 addition & 1 deletion MultiTablePro/UI/AdvancedSettingsWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
This should only be enabled to collect data for a bug report.<LineBreak/>
Application must be restarted for changes to take effect.
</TextBlock>
<Button Content="Open Logs Directory" Margin="5" Click="OpenLocksDirectory_Click"/>
<Button Content="Open Logs Directory" Margin="5" Click="OpenLogsDirectory_Click"/>
</StackPanel>
</GroupBox>

Expand Down
6 changes: 3 additions & 3 deletions MultiTablePro/UI/AdvancedSettingsWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ public AdvancedSettingsWindow()
DataContext = Config.Active;
}

private void OpenLocksDirectory_Click(object sender, RoutedEventArgs e)
private void OpenLogsDirectory_Click(object sender, RoutedEventArgs e)
{
Process.Start(System.IO.Path.Combine(Environment.GetFolderPath(
Environment.SpecialFolder.LocalApplicationData), "MultiTablePro"));
Process.Start(
System.IO.Path.GetDirectoryName(Logger.LogFilePath));
}
}
}

0 comments on commit c644686

Please sign in to comment.