mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
If personal path is modified in application settings window then show message box to tell users that ShareX must be reopened for changes to take effect
This commit is contained in:
parent
5e79bd7b2a
commit
6087ea40fb
1 changed files with 11 additions and 2 deletions
|
@ -38,6 +38,7 @@ public partial class ApplicationSettingsForm : Form
|
|||
private const int MaxBufferSizePower = 14;
|
||||
|
||||
private bool ready;
|
||||
private string lastPersonalPath;
|
||||
|
||||
public ApplicationSettingsForm()
|
||||
{
|
||||
|
@ -57,7 +58,14 @@ private void SettingsForm_Resize(object sender, EventArgs e)
|
|||
|
||||
private void SettingsForm_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
Program.WritePersonalPathConfig(txtPersonalFolderPath.Text);
|
||||
string currentPersonalPath = txtPersonalFolderPath.Text;
|
||||
|
||||
if (!currentPersonalPath.Equals(lastPersonalPath, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
Program.WritePersonalPathConfig(currentPersonalPath);
|
||||
|
||||
MessageBox.Show("You must reopen ShareX for personal folder changes to take effect.", "ShareX", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializeControls()
|
||||
|
@ -123,7 +131,8 @@ private void UpdateControls()
|
|||
#endif
|
||||
|
||||
// Paths
|
||||
txtPersonalFolderPath.Text = Program.ReadPersonalPathConfig();
|
||||
lastPersonalPath = Program.ReadPersonalPathConfig();
|
||||
txtPersonalFolderPath.Text = lastPersonalPath;
|
||||
UpdatePersonalFolderPathPreview();
|
||||
cbUseCustomScreenshotsPath.Checked = Program.Settings.UseCustomScreenshotsPath;
|
||||
txtCustomScreenshotsPath.Text = Program.Settings.CustomScreenshotsPath;
|
||||
|
|
Loading…
Reference in a new issue