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();
|
UpdateStatus();
|
||||||
|
|
||||||
rightListView.Columns[0].Width = rightListView.Width - rightListView.Columns[1].Width - 22;
|
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()
|
public bool updateLocalFileView()
|
||||||
@@ -700,12 +704,14 @@ namespace MeshCentralRouter
|
|||||||
DirectoryInfo old = localFolder;
|
DirectoryInfo old = localFolder;
|
||||||
localFolder = ((DriveInfo)item.Tag).RootDirectory;
|
localFolder = ((DriveInfo)item.Tag).RootDirectory;
|
||||||
if (updateLocalFileView() == false) { localFolder = old; updateLocalFileView(); }
|
if (updateLocalFileView() == false) { localFolder = old; updateLocalFileView(); }
|
||||||
|
Settings.SetRegValue("LocalPath", (localFolder == null) ? "" : localFolder.FullName);
|
||||||
}
|
}
|
||||||
else if (item.Tag.GetType() == typeof(DirectoryInfo))
|
else if (item.Tag.GetType() == typeof(DirectoryInfo))
|
||||||
{
|
{
|
||||||
DirectoryInfo old = localFolder;
|
DirectoryInfo old = localFolder;
|
||||||
localFolder = (DirectoryInfo)item.Tag;
|
localFolder = (DirectoryInfo)item.Tag;
|
||||||
if (updateLocalFileView() == false) { localFolder = old; updateLocalFileView(); }
|
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)
|
private void localUpButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
localFolder = localFolder.Parent;
|
localFolder = localFolder.Parent;
|
||||||
|
Settings.SetRegValue("LocalPath", (localFolder == null)?"":localFolder.FullName);
|
||||||
updateLocalFileView();
|
updateLocalFileView();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -774,6 +781,7 @@ namespace MeshCentralRouter
|
|||||||
private void localRootButton_Click(object sender, EventArgs e)
|
private void localRootButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
localFolder = null;
|
localFolder = null;
|
||||||
|
Settings.SetRegValue("LocalPath", "");
|
||||||
updateLocalFileView();
|
updateLocalFileView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
|
|||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("1.7.*")]
|
[assembly: AssemblyVersion("1.8.*")]
|
||||||
//[assembly: AssemblyVersion("1.0.0.0")]
|
//[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
//[assembly: AssemblyFileVersion("1.0.0.0")]
|
//[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
|
|||||||
Reference in New Issue
Block a user