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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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")]
|
||||
|
||||
Reference in New Issue
Block a user