Skip to content

Commit

Permalink
Update window toolbar (#32)
Browse files Browse the repository at this point in the history
* add icon for each dialog window

* update Application Name and About menu
  • Loading branch information
yjlim214 authored Sep 29, 2020
1 parent 4ae6877 commit 83f7d48
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 11 deletions.
28 changes: 20 additions & 8 deletions PurpleExplorer/App.xaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:PurpleExplorer"
x:Class="PurpleExplorer.App">
xmlns:vm="clr-namespace:PurpleExplorer.ViewModels;assembly=PurpleExplorer"
x:Class="PurpleExplorer.App"
Name="Purple Explorer">
<Application.DataTemplates>
<local:ViewLocator/>
<local:ViewLocator />
</Application.DataTemplates>

<Application.Styles>
<StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml"/>
<StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml"/>
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Default.xaml"/>
<StyleInclude Source="/Styles/Icons.xaml"/>
<StyleInclude Source="/Styles/CustomStyles.xaml"/>
<StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml" />
<StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml" />
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Default.xaml" />
<StyleInclude Source="/Styles/Icons.xaml" />
<StyleInclude Source="/Styles/CustomStyles.xaml" />
</Application.Styles>
</Application>

<Design.DataContext>
<vm:AppWindowViewModel />
</Design.DataContext>

<NativeMenu.Menu>
<NativeMenu>
<NativeMenuItem Header="About Purple Explorer" Command="{Binding Path=AboutPageCommand}" />
</NativeMenu>
</NativeMenu.Menu>
</Application>
25 changes: 25 additions & 0 deletions PurpleExplorer/ViewModels/AppWindowViewModel.cs
Original file line number Diff line number Diff line change
@@ -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<Unit, Unit> 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 ");
}
}
}
3 changes: 2 additions & 1 deletion PurpleExplorer/Views/AddMessageWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -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">

<Design.DataContext>
<viewModels:AddMessageWindowViewModal />
Expand Down
3 changes: 2 additions & 1 deletion PurpleExplorer/Views/ConnectionStringWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -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">

<Design.DataContext>
<vm:ConnectionStringWindowViewModel />
Expand Down
3 changes: 2 additions & 1 deletion PurpleExplorer/Views/MessageDetailsWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -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">

<Design.DataContext>
<vm:MessageDetailsWindowViewModel />
Expand Down

0 comments on commit 83f7d48

Please sign in to comment.