You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hass-workstation-service/UserInterface/Views/BackgroundServiceSettings.a...

27 lines
1.7 KiB

<UserControl 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="500" d:DesignHeight="450"
x:Class="UserInterface.Views.BackgroundServiceSettings">
<StackPanel Margin="30">
<StackPanel Margin="0 0 0 20" HorizontalAlignment="Left">
<ContentControl FontSize="18" FontWeight="Bold">Background service</ContentControl>
<TextBlock IsVisible="{Binding IsRunning}" Foreground="Green" Text="{Binding Message}"></TextBlock >
<TextBlock IsVisible="{Binding !IsRunning}" Foreground="Red" Text="{Binding Message}"></TextBlock >
<Button IsVisible="{Binding !IsRunning}" Width="75" HorizontalAlignment="Right" Margin="0 40 0 10" Click="Start">Start</Button>
</StackPanel>
<StackPanel HorizontalAlignment="Stretch">
<ContentControl FontSize="14" FontWeight="Bold">Autostart</ContentControl>
<TextBlock IsVisible="{Binding IsAutoStartEnabled}" Foreground="Green" Text="Autostart is enabled"></TextBlock >
<TextBlock IsVisible="{Binding !IsAutoStartEnabled}" Foreground="Red" Text="Autostart is NOT enabled"></TextBlock >
<Button IsVisible="{Binding !IsAutoStartEnabled}" Width="75" HorizontalAlignment="Right" Margin="0 40 0 10" Click="EnableAutostart">Enable</Button>
<Button IsVisible="{Binding IsAutoStartEnabled}" Width="75" HorizontalAlignment="Right" Margin="0 40 0 10" Click="DisableAutostart">Disable</Button>
</StackPanel>
</StackPanel>
</UserControl>