-
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.
add help window and commandline options(#9)
- Loading branch information
Showing
6 changed files
with
135 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<Window xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:vm="using:WEventViewer.ViewModel" | ||
mc:Ignorable="d" d:DesignWidth="400" d:DesignHeight="450" | ||
x:Class="WEventViewer.HelpWindow" | ||
x:DataType="vm:HelpWindowViewModel" | ||
Title="HelpWindow"> | ||
<Design.DataContext> | ||
<vm:HelpWindowViewModel/> | ||
</Design.DataContext> | ||
<Grid HorizontalAlignment="Stretch"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="*"/> | ||
<RowDefinition Height="Auto"/> | ||
</Grid.RowDefinitions> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="*"/> | ||
</Grid.ColumnDefinitions> | ||
<ScrollViewer Grid.Row="0" Grid.Column="0" HorizontalAlignment="Stretch" MaxWidth="600" HorizontalScrollBarVisibility="Auto"> | ||
<TextBlock Text="{Binding HelpMessage}" HorizontalAlignment="Left" MaxWidth="{Binding $parent.Bounds.Width}"/> | ||
</ScrollViewer> | ||
<Button Name="CloseButton" Content="Close" HorizontalAlignment="Right" Grid.Row="1" Click="Button_Click"/> | ||
</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,18 @@ | ||
using Avalonia; | ||
using Avalonia.Controls; | ||
using Avalonia.Markup.Xaml; | ||
|
||
namespace WEventViewer; | ||
|
||
public partial class HelpWindow : Window | ||
{ | ||
public HelpWindow() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void Button_Click(object? sender, Avalonia.Interactivity.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"profiles": { | ||
"WEventViewer": { | ||
"commandName": "Project" | ||
}, | ||
"WEventViewer-Help": { | ||
"commandName": "Project", | ||
"commandLineArgs": "--help" | ||
} | ||
} | ||
} |
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,13 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace WEventViewer.ViewModel | ||
{ | ||
public class HelpWindowViewModel | ||
{ | ||
public string HelpMessage { get; set; } = ""; | ||
} | ||
} |