diff --git a/Dialog/MainDialog.xaml.cs b/Dialog/MainDialog.xaml.cs
index 2bd1e3a..6d1a596 100644
--- a/Dialog/MainDialog.xaml.cs
+++ b/Dialog/MainDialog.xaml.cs
@@ -94,11 +94,8 @@ private bool CheckNewDomains()
{
return true;
}
- var message = string.Format(
- Properties.Resources.ConfirmNewDomains,
- string.Join("\n", newDomainAddresses));
- MessageBoxResult result = MessageBox.Show(message, Properties.Resources.Warning, MessageBoxButton.YesNo);
- return result == MessageBoxResult.Yes;
+ NewDomainDialog mainDialog = new NewDomainDialog(newDomainAddresses);
+ return mainDialog.ShowDialog() ?? false;
}
private bool IsEmbeddedImage(Outlook.Attachment item)
diff --git a/Dialog/NewDomainDialog.xaml b/Dialog/NewDomainDialog.xaml
new file mode 100644
index 0000000..d0fe5a4
--- /dev/null
+++ b/Dialog/NewDomainDialog.xaml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
diff --git a/Dialog/NewDomainDialog.xaml.cs b/Dialog/NewDomainDialog.xaml.cs
new file mode 100644
index 0000000..928c145
--- /dev/null
+++ b/Dialog/NewDomainDialog.xaml.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Windows;
+using System.Windows.Documents;
+using System.Windows.Threading;
+
+namespace FlexConfirmMail.Dialog
+{
+ public partial class NewDomainDialog : Window
+ {
+ public NewDomainDialog()
+ {
+ QueueLogger.Log($"===== Open {nameof(NewDomainDialog)} =====");
+ InitializeComponent();
+ }
+
+ public NewDomainDialog(HashSet addresses) : this()
+ {
+ CultureInfo.CurrentCulture = new CultureInfo("en-US", false);
+
+ if (addresses.Count > 2)
+ {
+ double margin = 10;
+ this.Height += (addresses.Count - 2) * (textBlockBody.FontSize + margin);
+ }
+ textBlockBody.Inlines.Add(Properties.Resources.ConfirmNewDomainsBody1);
+ textBlockBody.Inlines.Add("\n\n");
+ textBlockBody.Inlines.Add(new Run()
+ {
+ Text = string.Join("\n", addresses),
+ FontWeight = FontWeights.Bold
+ });
+ textBlockBody.Inlines.Add("\n\n");
+ textBlockBody.Inlines.Add(Properties.Resources.ConfirmNewDomainsBody2);
+ }
+
+ private void buttonSend_Click(object sender, RoutedEventArgs e)
+ {
+ QueueLogger.Log($"* Send button clicked. closing...");
+ DialogResult = true;
+ }
+ }
+}
\ No newline at end of file
diff --git a/FlexConfirmMail.csproj b/FlexConfirmMail.csproj
index 6461e61..6d4e88c 100644
--- a/FlexConfirmMail.csproj
+++ b/FlexConfirmMail.csproj
@@ -166,6 +166,9 @@
ConfigDialog.xaml
+
+ NewDomainDialog.xaml
+
@@ -222,6 +225,10 @@
MSBuild:Compile
Designer
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs
index 87caef1..e57caf5 100644
--- a/Properties/Resources.Designer.cs
+++ b/Properties/Resources.Designer.cs
@@ -233,15 +233,20 @@ public static string ConfigWindowTitle {
}
///
- /// 返信元のメールの宛先に含まれていなかったドメインの以下の宛先が追加されています。
- ///
- ///{0}
- ///
- ///送信してよろしいですか? に類似しているローカライズされた文字列を検索します。
+ /// 返信元のメールの宛先に含まれていなかったドメインの以下の宛先が追加されています。 に類似しているローカライズされた文字列を検索します。
///
- public static string ConfirmNewDomains {
+ public static string ConfirmNewDomainsBody1 {
get {
- return ResourceManager.GetString("ConfirmNewDomains", resourceCulture);
+ return ResourceManager.GetString("ConfirmNewDomainsBody1", resourceCulture);
+ }
+ }
+
+ ///
+ /// 送信してよろしいですか? に類似しているローカライズされた文字列を検索します。
+ ///
+ public static string ConfirmNewDomainsBody2 {
+ get {
+ return ResourceManager.GetString("ConfirmNewDomainsBody2", resourceCulture);
}
}
@@ -375,6 +380,15 @@ public static string MainUnsafeFilesWarningHint {
}
}
+ ///
+ /// 警告 - FlexConfirmMail に類似しているローカライズされた文字列を検索します。
+ ///
+ public static string NewDomainDialogTitle {
+ get {
+ return ResourceManager.GetString("NewDomainDialogTitle", resourceCulture);
+ }
+ }
+
///
/// FlexConfirmMail設定 に類似しているローカライズされた文字列を検索します。
///
@@ -609,7 +623,7 @@ public static string UnsafeFilesTemplate {
}
///
- /// 警告 に類似しているローカライズされた文字列を検索します。
+ /// 警告! に類似しているローカライズされた文字列を検索します。
///
public static string Warning {
get {
diff --git a/Properties/Resources.en.resx b/Properties/Resources.en.resx
index de04721..341c44f 100644
--- a/Properties/Resources.en.resx
+++ b/Properties/Resources.en.resx
@@ -339,14 +339,16 @@ so please use Bcc when sending an message to unrelated parties.
Confirm when any recipients with domains different from any existing recipients are added
-
- There are recipients with domains not included in the recipients of the original message.
-
-{0}
-
-Do you really want to send this message?
+
+ There are recipients with domains not included in the recipients of the original message.
+
+
+ Warning - FlexConfirmMail
+
+
+ Do you really want to send this message?
-
- Warning
+
+ Warning!
\ No newline at end of file
diff --git a/Properties/Resources.resx b/Properties/Resources.resx
index 65d19f1..3ddb964 100644
--- a/Properties/Resources.resx
+++ b/Properties/Resources.resx
@@ -339,14 +339,16 @@ ToおよびCcに含まれるメールアドレスはすべての受取人が確
返信の宛先に今まで含まれていなかったドメインのアドレスが追加された場合に警告する
-
- 返信元のメールの宛先に含まれていなかったドメインの以下の宛先が追加されています。
-
-{0}
-
-送信してよろしいですか?
+
+ 返信元のメールの宛先に含まれていなかったドメインの以下の宛先が追加されています。
+
+
+ 警告 - FlexConfirmMail
+
+
+ 送信してよろしいですか?
- 警告
+ 警告!
\ No newline at end of file
diff --git a/Properties/Resources.zh.resx b/Properties/Resources.zh.resx
index 3e68c58..33c726c 100644
--- a/Properties/Resources.zh.resx
+++ b/Properties/Resources.zh.resx
@@ -336,14 +336,16 @@ example.org
Confirm when any recipients with domains different from any existing recipients are added
-
- There are recipients with domains not included in the recipients of the original message.
-
-{0}
-
-Do you really want to send this message?
+
+ There are recipients with domains not included in the recipients of the original message.
+
+
+ 警告 - FlexConfirmMail
+
+
+ Do you really want to send this message?
- 警告
+ 警告!
\ No newline at end of file
diff --git a/ThisAddIn.cs b/ThisAddIn.cs
index 85fb008..2412ad5 100644
--- a/ThisAddIn.cs
+++ b/ThisAddIn.cs
@@ -16,7 +16,7 @@ public partial class ThisAddIn
private Dictionary> EntryIdToOriginalRecipientsDictionary { get; set; } = new Dictionary>();
private void ThisAddIn_Startup(object sender, System.EventArgs e)
- {
+ {
Application.ItemSend += new Outlook.ApplicationEvents_11_ItemSendEventHandler(ThisAddIn_ItemSend);
Explorers = Application.Explorers;
foreach (Outlook.Explorer explorer in Explorers)