Add Settings button to the bulk sender window
The ribbon button only opened SettingsForm while the archive folder was unconfigured - once saved once, there was no way back into settings (domain, templates, sender account, signature path) short of breaking the saved folder path. Added a "Настройки..." button to PreviewForm that reopens SettingsForm and rescans with the reloaded settings afterward. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e40d971de0
commit
f04de700d9
2 files changed
+50
-9
No files matched your search
@@ -172,6 +172,34 @@ namespace BulkArchiveMailer.AddIn.UI
|
||||
RunScan();
|
||||
}
|
||||
|
||||
private void btnSettings_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (var settingsForm = new SettingsForm(outlookApplication))
|
||||
{
|
||||
settingsForm.ShowDialog(this);
|
||||
}
|
||||
|
||||
// Regardless of DialogResult (OK or Cancel), reload settings and
|
||||
// rescan so a changed archive folder, domain, or templates are
|
||||
// reflected immediately without a separate "Пересканировать"
|
||||
// click. A closed-without-saving dialog just reloads the same
|
||||
// settings again, which is harmless.
|
||||
try
|
||||
{
|
||||
settings = AppSettings.Load();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(this, "Не удалось прочитать настройки: " + ex.ToString(), "BulkArchiveMailer", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
signatureHtml = ResolveSignatureHtml();
|
||||
lblSignatureWarning.Visible = string.IsNullOrEmpty(signatureHtml);
|
||||
|
||||
RunScan();
|
||||
}
|
||||
|
||||
private void btnCheckAllReady_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (var row in rows)
|
||||
|
||||
Reference in new issue
Block a user