Added option to open database directory
This commit is contained in:
@@ -7,10 +7,9 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System;
|
||||
using System.Configuration;
|
||||
using System.Threading;
|
||||
using SQLite.Net;
|
||||
using SQLite.Net.Platform.Generic;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace DebtMgr.ViewModel
|
||||
{
|
||||
@@ -418,6 +417,28 @@ namespace DebtMgr.ViewModel
|
||||
|
||||
#endregion
|
||||
|
||||
#region OpenDatabaseLocationMenuCommand Command
|
||||
|
||||
/// <summary>
|
||||
/// Private member backing variable for <see cref="OpenDatabaseLocationMenuCommand" />
|
||||
/// </summary>
|
||||
private RelayCommand _openDatabaseLocationMenuCommand = null;
|
||||
|
||||
/// <summary>
|
||||
/// Comment
|
||||
/// </summary>
|
||||
public RelayCommand OpenDatabaseLocationMenuCommand => _openDatabaseLocationMenuCommand ?? (_openDatabaseLocationMenuCommand = new RelayCommand(OpenDatabaseLocationMenuCommand_Execute));
|
||||
|
||||
private void OpenDatabaseLocationMenuCommand_Execute()
|
||||
{
|
||||
if (File.Exists(Properties.Settings.Default.Database))
|
||||
{
|
||||
Process.Start("explorer.exe", "/select, " + Properties.Settings.Default.Database);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// <summary> Initializes a new instance of the MainViewModel class. </summary>
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user