341 lines
20 KiB
XML
341 lines
20 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"
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
x:Class="MafiaClient.MainWindow"
|
|
Title="MafiaClient"
|
|
Closing="Window_OnClosing"
|
|
PropertyChanged="AvaloniaObject_OnPropertyChanged">
|
|
<Grid>
|
|
<Grid x:Name="MainMenu" IsVisible="True">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="30*"></ColumnDefinition>
|
|
<ColumnDefinition Width="20*"></ColumnDefinition>
|
|
<ColumnDefinition Width="30*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="15*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="20*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Text="RMafia" FontSize="45" Grid.Row="1" Grid.Column="2" HorizontalAlignment="Center" x:Name="Logo"></TextBlock>
|
|
<Button Grid.Row="3" Grid.Column="2" Click="Play_OnClick" FontSize="25" HorizontalAlignment="Stretch">
|
|
<Viewbox>
|
|
<TextBlock Text="Играть"></TextBlock>
|
|
</Viewbox>
|
|
</Button>
|
|
<Button Grid.Row="5" Grid.Column="2" FontSize="25" Click="Settings_OnClick" HorizontalAlignment="Stretch">
|
|
<Viewbox>
|
|
<TextBlock Text="Параметры"></TextBlock>
|
|
</Viewbox>
|
|
</Button>
|
|
<Button Grid.Row="7" Grid.Column="2" Click="Exit_OnClick" FontSize="25" HorizontalAlignment="Stretch">
|
|
<Viewbox>
|
|
<TextBlock Text="Выход"></TextBlock>
|
|
</Viewbox>
|
|
</Button>
|
|
</Grid>
|
|
|
|
<Grid x:Name="IpInput" IsVisible="False">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="30*"></ColumnDefinition>
|
|
<ColumnDefinition Width="40*"></ColumnDefinition>
|
|
<ColumnDefinition Width="30*"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="30*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="15*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Text="Введите IP" FontSize="35" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Center"></TextBlock>
|
|
<TextBox Grid.Column="1" Grid.Row="3" x:Name="IpBox" FontSize="30"></TextBox>
|
|
<Button Grid.Column="1" Grid.Row="5" Click="ConnectToServer_OnClick" x:Name="IpInputGuiConnect" HorizontalAlignment="Stretch">
|
|
<Viewbox>
|
|
<TextBlock Text="Подключиться" FontSize="25"></TextBlock>
|
|
</Viewbox>
|
|
</Button>
|
|
<Button Grid.Column="1" Grid.Row="7" Click="Back_OnClick" x:Name="IpInputGuiBack" HorizontalAlignment="Stretch">
|
|
<Viewbox>
|
|
<TextBlock Text="Назад" FontSize="25"></TextBlock>
|
|
</Viewbox>
|
|
</Button>
|
|
</Grid>
|
|
|
|
<Grid x:Name="SettingsGui" IsVisible="False">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="5*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="5*"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Text="Ник:" FontSize="25" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Right"></TextBlock>
|
|
<TextBox Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="1" FontSize="25" x:Name="NickBox"></TextBox>
|
|
<Button Grid.Column="4" Grid.ColumnSpan="3" Grid.Row="11" Click="SettingsBack_OnClick" HorizontalAlignment="Stretch">
|
|
<Viewbox>
|
|
<TextBlock Text="Назад" FontSize="25"></TextBlock>
|
|
</Viewbox>
|
|
</Button>
|
|
</Grid>
|
|
|
|
<Grid x:Name="GameQueue" IsVisible="False" KeyUp="GameQueue_OnKeyUp">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="5*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="5*"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Text="Ожидаем старта" FontSize="30" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="1" HorizontalAlignment="Center"></TextBlock>
|
|
<TextBlock x:Name="QueueOnline" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="3" HorizontalAlignment="Center"></TextBlock>
|
|
<ScrollViewer Grid.Column="5" Grid.ColumnSpan="5" Grid.Row="1" Grid.RowSpan="8" x:Name="QueueChatViewer">
|
|
<ItemsRepeater x:Name="QueueChat"></ItemsRepeater>
|
|
</ScrollViewer>
|
|
<TextBox Grid.Column="5" Grid.ColumnSpan="4" Grid.Row="9" TextWrapping="Wrap" x:Name="QueueChatInput"></TextBox>
|
|
<Button Grid.Column="9" Grid.Row="9" Click="GameQueueChatSend_OnClick" HorizontalAlignment="Stretch">
|
|
<Viewbox>
|
|
<TextBlock Text="Отправить!"></TextBlock>
|
|
</Viewbox>
|
|
</Button>
|
|
<Button Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="9" Click="GameQueueLeave_OnClick" HorizontalAlignment="Stretch">
|
|
<Viewbox>
|
|
<TextBlock Text="Выйти"></TextBlock>
|
|
</Viewbox>
|
|
</Button>
|
|
</Grid>
|
|
|
|
<Grid x:Name="DisconnectScreen" IsVisible="False">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="5*"></ColumnDefinition>
|
|
<ColumnDefinition Width="25*"></ColumnDefinition>
|
|
<ColumnDefinition Width="40*"></ColumnDefinition>
|
|
<ColumnDefinition Width="25*"></ColumnDefinition>
|
|
<ColumnDefinition Width="5*"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="35*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Text="Отключён от сервера" FontSize="30" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center"></TextBlock>
|
|
<TextBlock Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="3" x:Name="ReasonText" FontSize="25" HorizontalAlignment="Center" TextWrapping="Wrap"></TextBlock>
|
|
<Button Grid.Column="2" Grid.Row="6" Click="Back_OnClick" HorizontalAlignment="Stretch">
|
|
<Viewbox>
|
|
<TextBlock Text="Назад" FontSize="25"></TextBlock>
|
|
</Viewbox>
|
|
</Button>
|
|
</Grid>
|
|
|
|
<Grid x:Name="GameVotingPassive" IsVisible="False">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="5*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="5*"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="7" HorizontalAlignment="Center" FontSize="30" x:Name="GameVotingPassiveRole"></TextBlock>
|
|
<TextBlock Grid.Row="5" Grid.Column="2" Grid.ColumnSpan="7" Text="Спи спокойно, пока можешь" HorizontalAlignment="Center" FontSize="30"></TextBlock>
|
|
</Grid>
|
|
|
|
<Grid x:Name="GameVotingActive" IsVisible="False" KeyUp="GameVotingActive_OnKeyUp">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="5*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="5*"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="7" HorizontalAlignment="Center" FontSize="30" x:Name="GameVotingActiveRole"></TextBlock>
|
|
<ScrollViewer Grid.Column="5" Grid.ColumnSpan="5" Grid.Row="2" Grid.RowSpan="8" x:Name="GameVotingActiveChatViewer">
|
|
<ItemsRepeater x:Name="GameVotingActiveChat"></ItemsRepeater>
|
|
</ScrollViewer>
|
|
<TextBox Grid.Column="5" Grid.ColumnSpan="4" Grid.Row="10" TextWrapping="Wrap" x:Name="GameVotingActiveChatInput"></TextBox>
|
|
<Button Grid.Column="9" Grid.Row="10" Click="GameVotingActiveChatSend_OnClick" HorizontalAlignment="Stretch">
|
|
<Viewbox>
|
|
<TextBlock Text="Отправить!"></TextBlock>
|
|
</Viewbox>
|
|
</Button>
|
|
<ListBox Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="2" Grid.RowSpan="8" x:Name="GameVotingActiveSelect" DoubleTapped="GameVotingActiveSelect_OnMouseDoubleClick" SelectionMode="Single"></ListBox>
|
|
</Grid>
|
|
|
|
<Grid x:Name="GameEndScreen" IsVisible="False">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="5*"></ColumnDefinition>
|
|
<ColumnDefinition Width="25*"></ColumnDefinition>
|
|
<ColumnDefinition Width="40*"></ColumnDefinition>
|
|
<ColumnDefinition Width="25*"></ColumnDefinition>
|
|
<ColumnDefinition Width="5*"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="35*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock x:Name="GameEndScreenWon" Grid.Column="2" Grid.Row="1" FontSize="30" HorizontalAlignment="Center"></TextBlock>
|
|
<TextBlock x:Name="GameEndScreenRoles" FontSize="25" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="3" HorizontalAlignment="Center" TextWrapping="Wrap"></TextBlock>
|
|
<Button Grid.Column="2" Grid.Row="6" Click="GameEndScreenBack_OnClick" HorizontalAlignment="Stretch">
|
|
<Viewbox>
|
|
<TextBlock Text="Назад" FontSize="25"></TextBlock>
|
|
</Viewbox>
|
|
</Button>
|
|
</Grid>
|
|
<Grid x:Name="GameDay" IsVisible="False" KeyUp="GameDayWait_OnKeyUp">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="5*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="10*"></ColumnDefinition>
|
|
<ColumnDefinition Width="5*"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="5*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
<RowDefinition Height="10*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
<TextBlock FontSize="30" x:Name="GameDayHotBar" Text="Обсуждай и думай" Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="7" HorizontalAlignment="Center" TextAlignment="Center"></TextBlock>
|
|
<ScrollViewer Grid.Column="5" Grid.ColumnSpan="5" Grid.Row="2" Grid.RowSpan="8" x:Name="GameDayViewer">
|
|
<ItemsRepeater x:Name="GameDayChat"></ItemsRepeater>
|
|
</ScrollViewer>
|
|
<TextBox Grid.Column="5" Grid.ColumnSpan="4" Grid.Row="10" TextWrapping="Wrap" x:Name="GameDayChatInput"></TextBox>
|
|
<Button Grid.Column="9" Grid.Row="10" Click="GameDayChatSend_OnClick" HorizontalAlignment="Stretch">
|
|
<Viewbox>
|
|
<TextBlock Text="Отправить!"></TextBlock>
|
|
</Viewbox>
|
|
</Button>
|
|
<ListBox Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="2" Grid.RowSpan="8" x:Name="GameDaySelect" DoubleTapped="GameDaySelect_OnMouseDoubleClick" SelectionMode="Single"></ListBox>
|
|
</Grid>
|
|
</Grid>
|
|
</Window>
|