Files

167 lines
7.3 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<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="zooManagerPro.Window1"
Title="ZooManager Pro"
Width="1200" Height="720" MinWidth="1000" MinHeight="620"
WindowStartupLocation="CenterScreen"
FontSize="13" Background="#F4F6F8">
<Window.Styles>
<!-- карточки аналитики -->
<Style Selector="Border.card">
<Setter Property="Background" Value="White"/>
<Setter Property="CornerRadius" Value="10"/>
<Setter Property="Padding" Value="16,12"/>
<Setter Property="Margin" Value="6,0"/>
<Setter Property="BoxShadow" Value="0 2 12 0 #22000000"/>
</Style>
<Style Selector="TextBlock.cardTitle">
<Setter Property="FontSize" Value="12"/>
<Setter Property="Foreground" Value="#7A8794"/>
<Setter Property="TextWrapping" Value="Wrap"/>
</Style>
<Style Selector="TextBlock.cardValue">
<Setter Property="FontSize" Value="28"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Margin" Value="0,2,0,0"/>
</Style>
<!-- кнопки -->
<Style Selector="Button.tool">
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Padding" Value="14,8"/>
<Setter Property="CornerRadius" Value="6"/>
<Setter Property="Cursor" Value="Hand"/>
</Style>
<!-- DataGrid -->
<!-- пилюля статуса здоровья: цвет через классы -->
<Style Selector="Border.pill">
<Setter Property="CornerRadius" Value="4"/>
<Setter Property="Padding" Value="8,3"/>
<Setter Property="Margin" Value="4,0"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Background" Value="#95A5A6"/>
</Style>
<Style Selector="Border.pill > TextBlock">
<Setter Property="FontSize" Value="11"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Foreground" Value="White"/>
</Style>
<Style Selector="Border.pill.healthy"><Setter Property="Background" Value="#27AE60"/></Style>
<Style Selector="Border.pill.sick">
<Setter Property="Background" Value="#F4D03F"/>
</Style>
<Style Selector="Border.pill.sick > TextBlock"><Setter Property="Foreground" Value="#5C4A00"/></Style>
<Style Selector="Border.pill.quarantine"><Setter Property="Background" Value="#E74C3C"/></Style>
<!-- иконка рациона: текст через классы -->
<Style Selector="TextBlock.diet">
<Setter Property="Text" Value="🥗 всеядное"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Margin" Value="6,0"/>
</Style>
<Style Selector="TextBlock.diet.meat"><Setter Property="Text" Value="🥩 хищник"/></Style>
<Style Selector="TextBlock.diet.grass"><Setter Property="Text" Value="🌿 травоядное"/></Style>
</Window.Styles>
<DockPanel>
<!-- ===== Шапка: название системы + кнопка обновления ===== -->
<Border DockPanel.Dock="Top" Background="#2C3E50" Padding="20,14">
<Grid ColumnDefinitions="*,Auto">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock Text="🦁" FontSize="26" Margin="0,0,12,0"/>
<StackPanel>
<TextBlock Text="ZooManager Pro" FontSize="20" FontWeight="Bold" Foreground="White"/>
<TextBlock Text="Система учёта животных зоопарка" FontSize="11" Foreground="#AEB6BF"/>
</StackPanel>
</StackPanel>
<Button x:Name="BtnRefresh" Grid.Column="1"
Classes="tool" Background="#34495E"
Content="🔄 Обновить данные"
ToolTip.Tip="Перезагрузить все списки из базы данных без перезапуска"
VerticalAlignment="Center"/>
</Grid>
</Border>
<!-- ===== Четыре карточки сводной аналитики ===== -->
<UniformGrid DockPanel.Dock="Top" Columns="4" Margin="16,14,16,4">
<Border Classes="card">
<StackPanel>
<TextBlock Classes="cardTitle" Text="🐾 Зарегистрировано животных"/>
<TextBlock Classes="cardValue" x:Name="TxtTotalAnimals" Text="0" Foreground="#2980B9"/>
</StackPanel>
</Border>
<Border Classes="card">
<StackPanel>
<TextBlock Classes="cardTitle" Text="🔬 Количество видов"/>
<TextBlock Classes="cardValue" x:Name="TxtSpeciesCount" Text="0" Foreground="#27AE60"/>
</StackPanel>
</Border>
<Border Classes="card">
<StackPanel>
<TextBlock Classes="cardTitle" Text="🏠 Свободные вольеры"/>
<TextBlock Classes="cardValue" x:Name="TxtFreeEnclosures" Text="0" Foreground="#E67E22"/>
</StackPanel>
</Border>
<Border Classes="card">
<StackPanel>
<TextBlock Classes="cardTitle" Text="💉 Осмотр у ветеринара (7 дней)"/>
<TextBlock Classes="cardValue" x:Name="TxtVetSoon" Text="0" Foreground="#E74C3C"/>
</StackPanel>
</Border>
</UniformGrid>
<!-- ===== Панель инструментов над таблицей ===== -->
<Border DockPanel.Dock="Top" Background="White" CornerRadius="8" Padding="12"
Margin="16,12,16,0" BorderBrush="#E3E7EB" BorderThickness="1">
<Grid ColumnDefinitions="*,Auto">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Spacing="10">
<TextBox x:Name="TxtSearch" Width="280"
Watermark="🔍 Поиск: кличка, вид, вольер, статус…"/>
<TextBlock Text="Вид:" VerticalAlignment="Center" Foreground="#566573"/>
<ComboBox x:Name="CmbSpecies" Width="170"
ToolTip.Tip="Фильтр по виду животного"/>
<TextBlock Text="Статус:" VerticalAlignment="Center" Foreground="#566573"/>
<ComboBox x:Name="CmbHealth" Width="150"
ToolTip.Tip="Фильтр по статусу здоровья"/>
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="8">
<Button x:Name="BtnAdd" Classes="tool" Background="#27AE60"
Content=" Добавить" />
<Button x:Name="BtnEdit" Classes="tool" Background="#2980B9"
Content="✏️ Редактировать" IsEnabled="False" />
<Button x:Name="BtnDelete" Classes="tool" Background="#C0392B"
Content="🗑 Удалить" IsEnabled="False" />
</StackPanel>
</Grid>
</Border>
<!-- ===== Таблица животных ===== -->
<Border Background="White" CornerRadius="8" Margin="16,12,16,16"
BorderBrush="#E3E7EB" BorderThickness="1">
</Border>
</DockPanel>
</Window>