Files
HearingProtector/MainPage.xaml
T
2026-09-26 12:11:20 +07:00

109 lines
3.9 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<Page
x:Class="HearingProtector.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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">
<Grid Padding="24,10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="1" Spacing="5">
<TextBlock Style="{ThemeResource SubtitleTextBlockStyle}" Text="Настройки" />
<!-- Минимальная громкость -->
<Grid ColumnSpacing="12">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="80" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock
Grid.Row="0"
Grid.ColumnSpan="2"
Text="Минимальная громкость" />
<Slider
x:Name="MinVolumeSlider"
Grid.Row="1"
Grid.Column="0"
Maximum="25"
Minimum="0"
SnapsTo="StepValues"
StepFrequency="1"
ValueChanged="Config_ValueChanged" />
<TextBlock
x:Name="MinVolumeLabel"
Grid.Row="1"
Grid.Column="1"
VerticalAlignment="Center"
Text="1 %"
TextAlignment="Right" />
</Grid>
<!-- Время до минимума -->
<Grid ColumnSpacing="12">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="80" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock
Grid.Row="0"
Grid.ColumnSpan="2"
Text="100% → минимум за" />
<Slider
x:Name="FullDecaySlider"
Grid.Row="1"
Grid.Column="0"
Maximum="360"
Minimum="30"
SnapsTo="StepValues"
StepFrequency="15"
ValueChanged="Config_ValueChanged" />
<TextBlock
x:Name="FullDecayLabel"
Grid.Row="1"
Grid.Column="1"
VerticalAlignment="Center"
Text="30 мин"
TextAlignment="Right" />
</Grid>
</StackPanel>
<StackPanel
Grid.Row="2"
VerticalAlignment="Bottom"
Spacing="8">
<TextBlock
x:Name="StatusText"
Style="{ThemeResource BodyStrongTextBlockStyle}"
Text="Запуск…" />
<ProgressBar
x:Name="VolumeBar"
Maximum="100"
Value="0" />
<TextBlock
x:Name="EtaText"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Text="" />
<TextBlock
x:Name="RateText"
FontSize="12"
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
Text="" />
</StackPanel>
</Grid>
</Page>