diff --git a/FileViewer.cs b/FileViewer.cs index 6bd03c6..446a4cf 100644 --- a/FileViewer.cs +++ b/FileViewer.cs @@ -82,6 +82,10 @@ namespace MeshCentralRouter UpdateStatus(); rightListView.Columns[0].Width = rightListView.Width - rightListView.Columns[1].Width - 22; + + // Load the local path from the registry + string lp = Settings.GetRegValue("LocalPath", ""); + if ((lp != "") && (Directory.Exists(lp))) { localFolder = new DirectoryInfo(lp); } } public bool updateLocalFileView() @@ -700,12 +704,14 @@ namespace MeshCentralRouter DirectoryInfo old = localFolder; localFolder = ((DriveInfo)item.Tag).RootDirectory; if (updateLocalFileView() == false) { localFolder = old; updateLocalFileView(); } + Settings.SetRegValue("LocalPath", (localFolder == null) ? "" : localFolder.FullName); } else if (item.Tag.GetType() == typeof(DirectoryInfo)) { DirectoryInfo old = localFolder; localFolder = (DirectoryInfo)item.Tag; if (updateLocalFileView() == false) { localFolder = old; updateLocalFileView(); } + Settings.SetRegValue("LocalPath", (localFolder == null) ? "" : localFolder.FullName); } } } @@ -713,6 +719,7 @@ namespace MeshCentralRouter private void localUpButton_Click(object sender, EventArgs e) { localFolder = localFolder.Parent; + Settings.SetRegValue("LocalPath", (localFolder == null)?"":localFolder.FullName); updateLocalFileView(); } @@ -774,6 +781,7 @@ namespace MeshCentralRouter private void localRootButton_Click(object sender, EventArgs e) { localFolder = null; + Settings.SetRegValue("LocalPath", ""); updateLocalFileView(); } diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index adc0841..09526a6 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -31,6 +31,6 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.7.*")] +[assembly: AssemblyVersion("1.8.*")] //[assembly: AssemblyVersion("1.0.0.0")] //[assembly: AssemblyFileVersion("1.0.0.0")]