From 83f7d48b10ae21e884225e8d323790fa9603bf2a Mon Sep 17 00:00:00 2001 From: yjlim214 Date: Tue, 29 Sep 2020 16:11:21 +1000 Subject: [PATCH] Update window toolbar (#32) * add icon for each dialog window * update Application Name and About menu --- PurpleExplorer/App.xaml | 28 +++++++++++++------ .../ViewModels/AppWindowViewModel.cs | 25 +++++++++++++++++ PurpleExplorer/Views/AddMessageWindow.xaml | 3 +- .../Views/ConnectionStringWindow.xaml | 3 +- .../Views/MessageDetailsWindow.xaml | 3 +- 5 files changed, 51 insertions(+), 11 deletions(-) create mode 100644 PurpleExplorer/ViewModels/AppWindowViewModel.cs diff --git a/PurpleExplorer/App.xaml b/PurpleExplorer/App.xaml index c4b234f..4c15568 100644 --- a/PurpleExplorer/App.xaml +++ b/PurpleExplorer/App.xaml @@ -1,16 +1,28 @@ + xmlns:vm="clr-namespace:PurpleExplorer.ViewModels;assembly=PurpleExplorer" + x:Class="PurpleExplorer.App" + Name="Purple Explorer"> - + - - - - - + + + + + - + + + + + + + + + + + \ No newline at end of file diff --git a/PurpleExplorer/ViewModels/AppWindowViewModel.cs b/PurpleExplorer/ViewModels/AppWindowViewModel.cs new file mode 100644 index 0000000..27ca4a2 --- /dev/null +++ b/PurpleExplorer/ViewModels/AppWindowViewModel.cs @@ -0,0 +1,25 @@ +using System.Reactive; +using PurpleExplorer.Helpers; +using ReactiveUI; + +namespace PurpleExplorer.ViewModels +{ + public class AppWindowViewModel : ViewModelBase + { + public AppWindowViewModel() + { + AboutPageCommand = ReactiveCommand.Create(AboutPage); + } + + public ReactiveCommand AboutPageCommand { get; } + + public async void AboutPage() + { + await MessageBoxHelper.ShowMessage("About Purple Explorer", + "Purple Explorer - cross-platform Azure Service Bus explorer (Windows, macOS, Linux) \n\n" + + "Thank you for using Purple Explorer! \n " + + "For updated information on the functionalities that Purple Explorer supports, please visit: \n " + + "https://github.com/telstrapurple/PurpleExplorer "); + } + } +} \ No newline at end of file diff --git a/PurpleExplorer/Views/AddMessageWindow.xaml b/PurpleExplorer/Views/AddMessageWindow.xaml index 74570f1..3888980 100644 --- a/PurpleExplorer/Views/AddMessageWindow.xaml +++ b/PurpleExplorer/Views/AddMessageWindow.xaml @@ -5,7 +5,8 @@ xmlns:viewModels="clr-namespace:PurpleExplorer.ViewModels" mc:Ignorable="d" d:DesignWidth="620" d:DesignHeight="480" x:Class="PurpleExplorer.Views.AddMessageWindow" - Title="Send message" Width="620" Height="480"> + Title="Send message" Icon="/Assets/avalonia-logo.ico" + Width="620" Height="480"> diff --git a/PurpleExplorer/Views/ConnectionStringWindow.xaml b/PurpleExplorer/Views/ConnectionStringWindow.xaml index 4418bb8..802db5d 100644 --- a/PurpleExplorer/Views/ConnectionStringWindow.xaml +++ b/PurpleExplorer/Views/ConnectionStringWindow.xaml @@ -5,7 +5,8 @@ mc:Ignorable="d" d:DesignWidth="610" d:DesignHeight="480" x:Class="PurpleExplorer.Views.ConnectionStringWindow" xmlns:vm="clr-namespace:PurpleExplorer.ViewModels;assembly=PurpleExplorer" - Title="Connect to Service Bus" Width="610" Height="480"> + Title="Connect to Service Bus" Icon="/Assets/avalonia-logo.ico" + Width="610" Height="480"> diff --git a/PurpleExplorer/Views/MessageDetailsWindow.xaml b/PurpleExplorer/Views/MessageDetailsWindow.xaml index fe79e4b..0535e9a 100644 --- a/PurpleExplorer/Views/MessageDetailsWindow.xaml +++ b/PurpleExplorer/Views/MessageDetailsWindow.xaml @@ -5,7 +5,8 @@ mc:Ignorable="d" d:DesignWidth="780" d:DesignHeight="630" x:Class="PurpleExplorer.Views.MessageDetailsWindow" xmlns:vm="clr-namespace:PurpleExplorer.ViewModels;assembly=PurpleExplorer" - Title="Message Details" Width="680" Height="630"> + Title="Message Details" Icon="/Assets/avalonia-logo.ico" + Width="680" Height="630">