*
This commit is contained in:
+116
@@ -0,0 +1,116 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:r="clr-namespace:RconGUI"
|
||||
x:Class="RconGUI.MainPage"
|
||||
x:DataType="r:ServerContext"
|
||||
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit">
|
||||
|
||||
<ContentPage.Resources>
|
||||
<ResourceDictionary>
|
||||
<toolkit:InvertedBoolConverter x:Key="InvertedBoolConverter" />
|
||||
</ResourceDictionary>
|
||||
|
||||
|
||||
|
||||
|
||||
<DataTemplate x:Key="stringCmdTemplate" x:DataType="r:ConsoleObject">
|
||||
<HorizontalStackLayout>
|
||||
<Entry Text="{Binding Value}"></Entry>
|
||||
<Button Text="{Binding Name}" Clicked="OnCmdClicked"></Button>
|
||||
</HorizontalStackLayout>
|
||||
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="boolCmdTemplate" x:DataType="r:ConsoleObject">
|
||||
<HorizontalStackLayout>
|
||||
<CheckBox IsChecked="{Binding Value}"></CheckBox>
|
||||
<Label Text="{Binding Name}"></Label>
|
||||
</HorizontalStackLayout>
|
||||
|
||||
</DataTemplate>
|
||||
|
||||
|
||||
|
||||
<DataTemplate x:Key="unknownCmdTemplate" x:DataType="r:ConsoleObject">
|
||||
|
||||
</DataTemplate>
|
||||
|
||||
<r:CommandDataTemplateSelector x:Key="cmdDataTemplateSelector"
|
||||
StringTemplate = "{StaticResource stringCmdTemplate}"
|
||||
UnknownTemplate ="{StaticResource unknownCmdTemplate}"
|
||||
BoolTemplate ="{StaticResource boolCmdTemplate}"/>
|
||||
|
||||
|
||||
</ContentPage.Resources>
|
||||
|
||||
<ScrollView>
|
||||
<VerticalStackLayout
|
||||
Padding="30,0"
|
||||
Spacing="25">
|
||||
<Image
|
||||
Source="dotnet_bot.png"
|
||||
HeightRequest="185"
|
||||
Aspect="AspectFit"
|
||||
SemanticProperties.Description="dot net bot in a hovercraft number nine" />
|
||||
|
||||
<Label
|
||||
Text="Hello, World!"
|
||||
Style="{StaticResource Headline}"
|
||||
SemanticProperties.HeadingLevel="Level1" />
|
||||
|
||||
<Button
|
||||
x:Name="ConnectButton"
|
||||
Text="Connect"
|
||||
SemanticProperties.Hint="Connect to server"
|
||||
Clicked="OnConnectClicked"
|
||||
HorizontalOptions="Fill" IsEnabled="{Binding IsConnected, Converter={StaticResource InvertedBoolConverter}}"/>
|
||||
|
||||
|
||||
<CollectionView ItemsSource="{Binding CustomActions}">
|
||||
<CollectionView.ItemTemplate>
|
||||
<DataTemplate x:DataType="r:RconScript">
|
||||
<Button Text="{Binding Name}" Clicked="OnActionClicked"></Button>
|
||||
</DataTemplate>
|
||||
</CollectionView.ItemTemplate>
|
||||
|
||||
<CollectionView.ItemsLayout>
|
||||
<LinearItemsLayout Orientation="Horizontal" />
|
||||
</CollectionView.ItemsLayout>
|
||||
</CollectionView>
|
||||
|
||||
|
||||
<CollectionView ItemsSource="{Binding MapActions}">
|
||||
<CollectionView.ItemTemplate>
|
||||
<DataTemplate x:DataType="r:RconScript">
|
||||
<Button Text="{Binding Name}" Clicked="OnMapClicked"></Button>
|
||||
</DataTemplate>
|
||||
</CollectionView.ItemTemplate>
|
||||
|
||||
<CollectionView.ItemsLayout>
|
||||
<LinearItemsLayout Orientation="Horizontal" />
|
||||
</CollectionView.ItemsLayout>
|
||||
</CollectionView>
|
||||
|
||||
|
||||
<!--<CollectionView VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" ItemsSource="{Binding ConsoleObjects}" ItemTemplate="{StaticResource cmdDataTemplateSelector}" >
|
||||
<CollectionView.ItemsLayout>
|
||||
<LinearItemsLayout Orientation="Horizontal" />
|
||||
</CollectionView.ItemsLayout>
|
||||
</CollectionView>-->
|
||||
|
||||
<FlexLayout x:Name="xEspecialidades"
|
||||
BindableLayout.ItemsSource="{Binding ConsoleObjects}"
|
||||
HorizontalOptions="FillAndExpand" Wrap="Wrap"
|
||||
VerticalOptions="StartAndExpand" BindableLayout.ItemTemplateSelector="{StaticResource cmdDataTemplateSelector}">
|
||||
|
||||
|
||||
</FlexLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
</VerticalStackLayout>
|
||||
</ScrollView>
|
||||
|
||||
</ContentPage>
|
||||
Reference in New Issue
Block a user