-
Notifications
You must be signed in to change notification settings - Fork 0
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 #8 from atc-net/feature/wpf-app-continue
Atc.Azure.IoT.Wpf.App - Introduce AboutBoxDialog
- Loading branch information
Showing
10 changed files
with
179 additions
and
7 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<atcDialogs:NiceDialogBox | ||
x:Class="Atc.Azure.IoT.Wpf.App.Dialogs.AboutBoxDialog" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:atc="https://github.com/atc-net/atc-wpf/tree/main/schemas" | ||
xmlns:atcDialogs="clr-namespace:Atc.Wpf.Theming.Themes.Dialogs;assembly=Atc.Wpf.Theming" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
Title="About Atc.Azure.IoT" | ||
Width="350" | ||
Height="220" | ||
Background="{DynamicResource AtcApps.Brushes.Dialog.Background}" | ||
ResizeMode="NoResize" | ||
ShowCloseButton="False" | ||
ShowMaxRestoreButton="False" | ||
ShowMinButton="False" | ||
WindowStartupLocation="CenterScreen" | ||
WindowStyle="SingleBorderWindow" | ||
mc:Ignorable="d"> | ||
<DockPanel> | ||
<Border | ||
Height="50" | ||
Background="{DynamicResource AtcApps.Brushes.ThemeBackground1}" | ||
BorderBrush="{DynamicResource AtcApps.Brushes.Accent}" | ||
BorderThickness="0,1,0,0" | ||
DockPanel.Dock="Bottom"> | ||
<atc:UniformSpacingPanel | ||
HorizontalAlignment="Center" | ||
Orientation="Horizontal" | ||
Spacing="20"> | ||
<Button | ||
Width="100" | ||
Height="30" | ||
Background="{DynamicResource AtcApps.Brushes.ThemeBackground}" | ||
Click="OnOk" | ||
Content="OK" | ||
Foreground="{DynamicResource AtcApps.Brushes.Text}" | ||
IsDefault="True" /> | ||
</atc:UniformSpacingPanel> | ||
</Border> | ||
|
||
|
||
<atc:UniformSpacingPanel | ||
Margin="20" | ||
Orientation="Horizontal" | ||
Spacing="20"> | ||
<Image | ||
x:Name="IconImage" | ||
MaxWidth="64" | ||
MaxHeight="64" /> | ||
<atc:UniformSpacingPanel | ||
Margin="20" | ||
Orientation="Vertical" | ||
Spacing="20"> | ||
<TextBlock FontWeight="Bold" Text="Atc.Azure.IoT" /> | ||
<StackPanel Orientation="Horizontal"> | ||
<TextBlock Text="Version: " /> | ||
<TextBlock x:Name="VersionTextBlock" Text="1.0.0.0" /> | ||
</StackPanel> | ||
<TextBlock Text="© 2024 ATC" /> | ||
</atc:UniformSpacingPanel> | ||
</atc:UniformSpacingPanel> | ||
</DockPanel> | ||
</atcDialogs:NiceDialogBox> |
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,27 @@ | ||
namespace Atc.Azure.IoT.Wpf.App.Dialogs; | ||
|
||
/// <summary> | ||
/// Interaction logic for AboutBoxDialog. | ||
/// </summary> | ||
public partial class AboutBoxDialog | ||
{ | ||
public AboutBoxDialog() | ||
{ | ||
InitializeComponent(); | ||
|
||
IconImage.Source = App.DefaultIcon; | ||
|
||
VersionTextBlock.Text = Assembly | ||
.GetExecutingAssembly() | ||
.GetName() | ||
.Version! | ||
.ToString(); | ||
} | ||
|
||
private void OnOk( | ||
object sender, | ||
RoutedEventArgs e) | ||
{ | ||
Close(); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace Atc.Azure.IoT.Wpf.App; | ||
|
||
public partial class MainWindowViewModel | ||
{ | ||
public IRelayCommand OpenApplicationAboutCommand => new RelayCommand(OpenApplicationAboutCommandHandler); | ||
|
||
private void OpenApplicationAboutCommandHandler() | ||
{ | ||
// ReSharper disable once UseObjectOrCollectionInitializer | ||
var aboutBoxDialog = new AboutBoxDialog(); | ||
aboutBoxDialog.IconImage.Source = App.DefaultIcon; | ||
aboutBoxDialog.ShowDialog(); | ||
} | ||
} |
Binary file not shown.