Files
DotNetSolutionTools/DotNetSolutionTools.App/Views/MainWindow.axaml
Matthew Parker fc55b195d6 App layout
2023-08-31 23:38:32 +10:00

89 lines
6.0 KiB
XML

<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:viewModels="clr-namespace:DotNetSolutionTools.App.ViewModels"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
Width="800" Height="450"
x:Class="DotNetSolutionTools.App.Views.MainWindow"
x:DataType="viewModels:MainWindowViewModel"
Icon="/Assets/avalonia-logo.ico"
Title="DotNetSolutionTools">
<Design.DataContext>
<!-- This only sets the DataContext for the previewer in an IDE,
to set the actual DataContext for runtime, set the DataContext property in code (look at App.axaml.cs) -->
<viewModels:MainWindowViewModel />
</Design.DataContext>
<Panel>
<StackPanel VerticalAlignment="Stretch" Margin="10">
<StackPanel Orientation="Horizontal">
<Button Width="200" HorizontalContentAlignment="Center" Command="{Binding LoadSolutionFolderCommand}">Select Solution Folder</Button>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Background="Gray" Name="SolutionFolderPath" Text="{Binding SolutionFolderPath}" />
<Button Width="60" HorizontalContentAlignment="Center" Command="{Binding ClearSolutionFolderCommand}">Clear</Button>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Button Width="200" HorizontalContentAlignment="Center" Command="{Binding LoadSolutionFileCommand}">Select Solution File</Button>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Name="SolutionFilePath" Text="{Binding SolutionFilePath}" />
<Button Width="60" HorizontalContentAlignment="Center" Command="{Binding ClearSolutionFileCommand}">Clear</Button>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Button Width="200" HorizontalContentAlignment="Center" Command="{Binding LoadCsprojFileCommand}">Select CSharp Project File</Button>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Background="Gray" Name="CsprojFilePath" Text="{Binding CsprojFilePath}" />
<Button Width="60" HorizontalContentAlignment="Center" Command="{Binding ClearCsprojFileCommand}">Clear</Button>
</StackPanel>
<Separator Margin="0 10 0 0" />
<Grid VerticalAlignment="Stretch" ShowGridLines="False" RowDefinitions="*,*" ColumnDefinitions="*,*,*">
<Button Grid.Row="0" Grid.Column="0" MinHeight="130" Padding="10" Margin="10"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
VerticalContentAlignment="Center" HorizontalContentAlignment="Center"
IsEnabled="{Binding SolutionFolderPath, Mode=OneWay, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
Command="{Binding ExecuteParityCheckerCommand}">
<TextBlock TextWrapping="Wrap">
Check Solution Parity
</TextBlock>
</Button>
<Button Grid.Row="0" Grid.Column="1" MinHeight="130" Padding="10" Margin="10"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
VerticalContentAlignment="Center" HorizontalContentAlignment="Center"
IsEnabled="{Binding CsprojFilePath, Mode=OneWay, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
Command="{Binding FormatCsProjFileCommand}">
<TextBlock TextWrapping="Wrap">
Format CSharp Project File
</TextBlock>
</Button>
<Button Grid.Row="0" Grid.Column="2" MinHeight="130" Padding="10" Margin="10"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
VerticalContentAlignment="Center" HorizontalContentAlignment="Center"
IsEnabled="{Binding SolutionFilePath, Mode=OneWay, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
Command="{Binding FormatAllCsprojFilesInSolutionFileCommand}">
<TextBlock TextWrapping="Wrap">
Format All CSharp Project Files in Solution
</TextBlock>
</Button>
<Button Grid.Row="1" Grid.Column="0" MinHeight="130" Padding="10" Margin="10"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
VerticalContentAlignment="Center" HorizontalContentAlignment="Center"
IsEnabled="{Binding SolutionFolderPath, Mode=OneWay, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
Command="{Binding FormatAllCsprojFilesInSolutionFolderCommand}">
<TextBlock TextWrapping="Wrap">
Format All CSharp Project Files in Folder
</TextBlock>
</Button>
<Button Grid.Row="1" Grid.Column="1" MinHeight="130" Padding="10" Margin="10"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
VerticalContentAlignment="Center" HorizontalContentAlignment="Center"
IsEnabled="{Binding SolutionFilePath, Mode=OneWay, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
Command="{Binding CheckForMissingImplicitUsingsInSolutionFileCommand}">
<TextBlock TextWrapping="Wrap">
Check For Missing Implicit Usings
</TextBlock>
</Button>
</Grid>
<ListBox Name="Results" ItemsSource="{Binding ParityResults}" />
<ListBox ItemsSource="{Binding ErrorMessages}" />
</StackPanel>
</Panel>
</Window>