-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from FlexConfirmMail/improve-confirm-new-domai…
…n-dialog Improve design of dialog to confirm new domain
- Loading branch information
Showing
9 changed files
with
120 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Window x:Class="FlexConfirmMail.Dialog.NewDomainDialog" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:FlexConfirmMail" | ||
xmlns:resx="clr-namespace:FlexConfirmMail.Properties" | ||
Title="{x:Static resx:Resources.NewDomainDialogTitle}" | ||
mc:Ignorable="d" Width="600" Height="400"> | ||
<Grid Background="Red"> | ||
<TextBlock x:Name="textBlockTitle" HorizontalAlignment="Center" TextWrapping="Wrap" Text="{x:Static resx:Resources.Warning}" VerticalAlignment="Top" TextAlignment="Center" Margin="-8,0,0,0" Width="450" Height="47" FontSize="36" Foreground="White"/> | ||
<TextBlock x:Name="textBlockBody" TextWrapping="Wrap" Text="" Margin="50,62,50,40" Background="White" FontSize="24"/> | ||
<Button x:Name="buttonSend" Content="{x:Static resx:Resources.Send}" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="75" Margin="200,0,0,7" Height="25" Click="buttonSend_Click"/> | ||
<Button Content="{x:Static resx:Resources.Cancel}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="75" Margin="0,0,200,7" Height="25" IsCancel="True"/> | ||
</Grid> | ||
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<string> 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; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters