<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:gif="clr-namespace:Avalonia.Labs.Gif;assembly=Avalonia.Labs.Gif"
        xmlns:local="clr-namespace:Млаумчерб"
        x:Class="Млаумчерб.Клиент.видимое.Окне"
        Name="window"
        Title="млаумчерб"
        Icon="avares://млаумчерб/капитал/кубе.ico"
        FontFamily="{StaticResource MonospaceFont}" FontSize="18"
        MinWidth="800" MinHeight="500"
        Width="800" Height="500"
        WindowStartupLocation="CenterScreen">
    <Grid>
        <Grid.RowDefinitions>* 30</Grid.RowDefinitions>
        <Image Grid.RowSpan="2" Stretch="UniformToFill"
               Source="avares://млаумчерб/капитал/фоне.png"/>
        
        <Grid Grid.Row="0" Margin="10">
            <Grid.ColumnDefinitions>* 300 *</Grid.ColumnDefinitions>
            <Border Grid.Column="0" 
                    Classes="dark_tr_bg white_border">
                <Grid>
                    <Grid.RowDefinitions>30 *</Grid.RowDefinitions>
                    <Border Classes="white_border" Margin="-1" Padding="4">
                        <TextBlock FontWeight="Bold" 
                                   HorizontalAlignment="Center" 
                                   VerticalAlignment="Center">
                            Лог
                        </TextBlock>
                    </Border>
                    <ScrollViewer Name="LogScrollViewer" Grid.Row="1" 
                            HorizontalScrollBarVisibility="Disabled"
                            VerticalScrollBarVisibility="Visible"
                            Background="Transparent">
                        <TextBox Name="LogTextBox" 
                                 FontSize="12"
                                 IsReadOnly="True" TextWrapping="Wrap"
                                 Background="Transparent" BorderThickness="0"/>
                    </ScrollViewer>
                </Grid>
            </Border>
            <Border Grid.Column="1" 
                    Classes="dark_tr_bg white_border"
                    Margin="10 0">
                <Grid>
                    <Grid.RowDefinitions>* 60</Grid.RowDefinitions>
                    <StackPanel Orientation="Vertical" Margin="10" Spacing="10">
                        <TextBlock>Версия:</TextBlock>
                        <ComboBox Name="VersionComboBox"/>
                        
                        <TextBlock>Ник:</TextBlock>
                        <TextBox Background="Transparent"
                                 Text="{Binding #window.Username}"/>
                        
                        <TextBlock>
                            <Run>Выделенная память:</Run>
                            <TextBox Background="Transparent" Padding="0"
                                     BorderThickness="1"
                                     BorderBrush="#777777"
                                     Text="{Binding #window.MemoryLimit}">
                            </TextBox>
                            <Run>Мб</Run>
                        </TextBlock>
                        <Slider Minimum="2048" Maximum="8192"
                                Value="{Binding #window.MemoryLimit}">
                        </Slider>
                        
                        <CheckBox IsChecked="{Binding #window.Fullscreen}">
                            Запустить полноэкранное
                        </CheckBox>
                        
                        <CheckBox IsChecked="{Binding #window.CheckGameFiles}">
                            Проверить файлы игры
                        </CheckBox>
                    </StackPanel>
                    <Button Grid.Row="1" Margin="10" Padding="0 0 0 4"
                            Classes="button_no_border"
                            Background="#BBfd7300"
                            Click="Запуск">
                        Запуск
                    </Button>
                </Grid>
            </Border>
            
            <Border Grid.Column="2" Classes="dark_tr_bg white_border">
                <Grid>
                    <Grid.RowDefinitions>30 *</Grid.RowDefinitions>
                    <Border Classes="white_border" Margin="-1" Padding="4">
                        <TextBlock FontWeight="Bold" 
                                   HorizontalAlignment="Center" 
                                   VerticalAlignment="Center">
                            Загрузки
                        </TextBlock>
                    </Border>
                    <ScrollViewer Name="DownloadsScrollViewer" Grid.Row="1" 
                                  HorizontalScrollBarVisibility="Disabled"
                                  VerticalScrollBarVisibility="Visible"
                                  Background="Transparent"/>
                </Grid>
            </Border>
        </Grid>
        <Border Grid.Row="1" Background="#954808B0">
            <Grid>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                    <Button Classes="menu_button button_no_border" Click="ОткрытьПапкуЛаунчера">директория лаунчера</Button>
                    <Border Classes="menu_separator"/>
                    <Button Classes="menu_button button_no_border" Click="ОткрытьФайлЛогов">лог-файл</Button>
                </StackPanel>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                    <Button Classes="menu_button button_no_border" Click="ОткрытьРепозиторий">исходный код</Button>
                    <gif:GifImage 
                        Width="30" Height="30" Stretch="Uniform"
                        Source="avares://млаумчерб/капитал/лисик.gif"/>
                </StackPanel>
            </Grid>
        </Border>
    </Grid>
</Window>
