1
0
mirror of https://github.com/Ylianst/MeshCentralRouter synced 2025-12-06 00:13:33 +00:00

Save local file transfer path, #2861

This commit is contained in:
Ylian Saint-Hilaire
2021-07-05 13:26:12 -07:00
parent e2a99924a4
commit c175ebea20
2 changed files with 9 additions and 1 deletions

View File

@@ -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();
}

View File

@@ -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")]