Test Creation DesktopApp

This commit is contained in:
2019-03-09 14:03:25 +01:00
parent e8fd116eab
commit ac9614a70a
34 changed files with 1131 additions and 189 deletions

View File

@@ -14,17 +14,47 @@
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<Button Grid.Row="0" x:Name="LoadGames">Load Games</Button>
<ListView Grid.Row="1" ItemsSource="{Binding Games}">
<ListView Grid.Row="1" ItemsSource="{Binding Games}" x:Name="GamesListView" SelectedItem="{Binding CurrentGame}">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel>
<StackPanel Orientation="Horizontal">
<Label Content="{Binding Id}"></Label>
<Label> - </Label>
<Label Content="{Binding Name}"></Label>
<Label Content="{Binding ImgUrl}"></Label>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<Button Grid.Row="0" Grid.ColumnSpan="2" x:Name="AddGame">Add Games</Button>
<Label Grid.Row="1" Grid.Column="0">Id</Label>
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=CurrentGame.Id,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True"></TextBox>
<Label Grid.Row="2" Grid.Column="0">Name</Label>
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding Path=CurrentGame.Name,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" ></TextBox>
<Label Grid.Row="3" Grid.Column="0">WpTag</Label>
<TextBox Grid.Row="4" Grid.ColumnSpan="2" Text="{Binding Path=CurrentGame.WordPressTag,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" ></TextBox>
<Label Grid.Row="5" Grid.Column="0">WpTagOs</Label>
<TextBox Grid.Row="6" Grid.ColumnSpan="2" Text="{Binding Path=CurrentGame.WordPressTagOs,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" ></TextBox>
<Button Grid.Row="7" Grid.ColumnSpan="2" x:Name="Update">Update</Button>
</Grid>
</Grid>
</UserControl>

View File

@@ -35,8 +35,18 @@
<MenuItem Header="_Close" />
</MenuItem>
</Menu>
<ContentControl Grid.Row="1" x:Name="ActiveItem" />
<TabControl Grid.Row="1" x:Name="Items">
<TabControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding DisplayName}" />
<Button Content="X"
cal:Message.Attach="DeactivateItem($dataContext,'true')" />
</StackPanel>
</DataTemplate>
</TabControl.ItemTemplate>
</TabControl>
<StatusBar Grid.Row="2">

View File

@@ -1,30 +1,131 @@
<UserControl x:Class="LaDOSE.DesktopApp.Views.WordPressView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:LaDOSE.DesktopApp.Views"
mc:Ignorable="d"
xmlns:userControls="clr-namespace:LaDOSE.DesktopApp.UserControls"
xmlns:cal="http://www.caliburnproject.org"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid Row="4" Column="1">
<Grid Row="4" Column="2">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Button Grid.Row="0" x:Name="LoadEvents">Load Events</Button>
<ListView Grid.Row="1" ItemsSource="{Binding Events}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<DockPanel Grid.Row="0">
<Button x:Name="UpdateDb">Update DB</Button>
<Button x:Name="LoadEvents">Load Events</Button>
</DockPanel>
<ListView Grid.Row="1" ItemsSource="{Binding Events}" x:Name="EventsList"
SelectedItem="{Binding SelectedWpEvent, Mode=TwoWay}">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel>
<Label Content="{Binding Id}"></Label>
<Label Content="{Binding Name}"></Label>
<Label Content="{Binding Date}"></Label>
<StackPanel Orientation="Horizontal">
<Label Content="{Binding Id}" />
<Label Content="{Binding Name}" />
<Label Content="{Binding Date}" />
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</UserControl>
<Grid Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="2*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<ListView Grid.Column="0" ItemsSource="{Binding ElementName=EventsList,Path=SelectedItem.WpBookings}"
x:Name="BookingList">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Label Content="{Binding WpUser.Name}" />
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="30" />
<RowDefinition Height="60" />
</Grid.RowDefinitions>
<userControls:BookingUserControl Grid.Row="0"
Current="{Binding ElementName=BookingList,Path=SelectedItem.Meta,UpdateSourceTrigger=PropertyChanged}" />
<Label Grid.Row="1">Message</Label>
<TextBox Grid.Row="2" IsReadOnly="True" Text="{Binding ElementName=BookingList,Path=SelectedItem.Message}" TextWrapping="Wrap" AcceptsReturn="False" VerticalScrollBarVisibility="Auto" />
</Grid>
<Grid Grid.Column="2">
<Grid.RowDefinitions>
<RowDefinition Height="30"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Button Grid.Row="0" cal:Message.Attach="Generate">Generate</Button>
<ListView Grid.Row="1" x:Name="GameFoundListView" ItemsSource="{Binding GamesFound}"
SelectedItem="{Binding SelectedGame,UpdateSourceTrigger=PropertyChanged}">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Label Content="{Binding Path=Name}" />
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal">
<Label>Registred Players (</Label>
<Label Content="{Binding Players.Count,UpdateSourceTrigger=PropertyChanged}"></Label>
<Label>)</Label>
</StackPanel>
<ListView Grid.Row="1" Grid.Column="0" x:Name="PlayersList" ItemsSource="{Binding Players,UpdateSourceTrigger=PropertyChanged}">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Label Content="{Binding Path=Name}" />
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
<Label>Optional Players (</Label>
<Label Content="{Binding PlayersOptions.Count,UpdateSourceTrigger=PropertyChanged}"></Label>
<Label>)</Label>
</StackPanel>
<ListView Grid.Row="1" Grid.Column="1" x:Name="PlayersOptionsList" ItemsSource="{Binding PlayersOptions,UpdateSourceTrigger=PropertyChanged}">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Label Content="{Binding Path=Name}" />
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</Grid>
</Grid>
</Grid>
</UserControl>

View File

@@ -24,5 +24,7 @@ namespace LaDOSE.DesktopApp.Views
{
InitializeComponent();
}
}
}