2026-01-26 14:51:28 +09:00

146 lines
15 KiB
XML

<UserControl x:Class="AuroraLight.View.KsLight"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:view="clr-namespace:Aurora.View;assembly=Aurora"
xmlns:local="clr-namespace:AuroraLight.View"
xmlns:usercontrols="clr-namespace:AuroraUIComponent.UserControls;assembly=AuroraUIComponent"
mc:Ignorable="d"
d:DesignHeight="500" d:DesignWidth="800" Background="Black" Name="uc"
d:DataContext="{d:DesignInstance Type=local:KsLightModel}"
>
<Grid ShowGridLines="True" Height="500">
<StackPanel Orientation="Vertical" Margin="0,20,0,20" HorizontalAlignment="Center" VerticalAlignment="Center">
<StackPanel>
<Button Margin="0,20,0,20" Width="100" Height="40" Command="{Binding CMD_Reload}" Content="ReLoad"/>
<!-- <Button Width="100" Height="40" Margin="10" Command="{Binding CMD_GetStat}" Content="GetStat"/> -->
</StackPanel>
<StackPanel IsEnabled="{Binding IsActive1}" Orientation="Horizontal" Margin="0,20,0,20" HorizontalAlignment="Center" VerticalAlignment="Center" >
<StackPanel.Style>
<Style TargetType="{x:Type StackPanel}">
<Setter Property="Background" Value="Black"/>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
<Setter Property="Background" Value="Gray"/>
</Trigger>
</Style.Triggers>
</Style>
</StackPanel.Style>
<!--
<ContentControl IsEnabled="True">
<Viewbox xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Width="40" Height="40" Stretch="Uniform" Visibility="{Binding IsActiveiconsD1}" >
<Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="IsActive1_F" Fill="White">
<Path.Data>
<PathGeometry Figures="M3 11.9995C3 10.8176 3.23279 9.64736 3.68508 8.55548C4.13738 7.46361 4.80031 6.4715 5.63604 5.63581C6.47177 4.80013 7.46392 4.13722 8.55585 3.68495C9.64778 3.23268 10.8181 2.9999 12 2.9999C13.1819 2.9999 14.3522 3.23268 15.4442 3.68495C16.5361 4.13722 17.5282 4.80013 18.364 5.63581C19.1997 6.4715 19.8626 7.46361 20.3149 8.55548C20.7672 9.64736 21 10.8176 21 11.9995C21 14.3863 20.0518 16.6754 18.364 18.3631C16.6761 20.0509 14.3869 20.999 12 20.999C9.61305 20.999 7.32387 20.0509 5.63604 18.3631C3.94821 16.6754 3 14.3863 3 11.9995V11.9995ZM12 1C5.925 1 1 5.92476 1 11.9995C1 18.0742 5.925 22.9989 12 22.9989C18.075 22.9989 23 18.0742 23 11.9995C23 5.92476 18.075 1 12 1ZM9.172 7.75667C8.98436 7.56904 8.72986 7.46363 8.4645 7.46363C8.19914 7.46363 7.94464 7.56904 7.757 7.75667C7.56936 7.9443 7.46394 8.19879 7.46394 8.46414C7.46394 8.59553 7.48982 8.72563 7.54011 8.84702C7.59039 8.9684 7.66409 9.0787 7.757 9.1716L10.586 11.9995L7.757 14.8273C7.56936 15.015 7.46394 15.2694 7.46394 15.5348C7.46394 15.8001 7.56936 16.0546 7.757 16.2423C7.94464 16.4299 8.19914 16.5353 8.4645 16.5353C8.72986 16.5353 8.98436 16.4299 9.172 16.2423L12 13.4134L14.829 16.2423C14.9219 16.3351 15.0322 16.4087 15.1536 16.459C15.2749 16.5092 15.405 16.535 15.5364 16.5349C15.6677 16.5349 15.7978 16.509 15.9191 16.4587C16.0404 16.4084 16.1507 16.3347 16.2435 16.2418C16.3363 16.1489 16.41 16.0386 16.4602 15.9172C16.5104 15.7959 16.5362 15.6658 16.5362 15.5344C16.5362 15.4031 16.5102 15.2731 16.4599 15.1517C16.4096 15.0304 16.3359 14.9202 16.243 14.8273L13.414 11.9995L16.243 9.1716C16.4306 8.98411 16.5361 8.72975 16.5362 8.46449C16.5363 8.19923 16.431 7.9448 16.2435 7.75717C16.056 7.56954 15.8016 7.46408 15.5364 7.46398C15.2711 7.46389 15.0166 7.56917 14.829 7.75667L12 10.5855L9.172 7.75667Z" FillRule="EvenOdd"/>
</Path.Data>
</Path>
</Viewbox>
</ContentControl>
<ContentControl IsEnabled="True">
<Viewbox xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Width="40" Height="40" Stretch="Uniform" Visibility="{Binding IsActiveiconsC1}" >
<Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="IsActive1_T" Fill="White">
<Path.Data>
<PathGeometry Figures="M3 11.9995C3 10.8176 3.23279 9.64736 3.68508 8.55548C4.13738 7.46361 4.80031 6.4715 5.63604 5.63581C6.47177 4.80013 7.46392 4.13722 8.55585 3.68495C9.64778 3.23268 10.8181 2.9999 12 2.9999C13.1819 2.9999 14.3522 3.23268 15.4442 3.68495C16.5361 4.13722 17.5282 4.80013 18.364 5.63581C19.1997 6.4715 19.8626 7.46361 20.3149 8.55548C20.7672 9.64736 21 10.8176 21 11.9995C21 14.3863 20.0518 16.6754 18.364 18.3631C16.6761 20.0509 14.3869 20.999 12 20.999C9.61305 20.999 7.32387 20.0509 5.63604 18.3631C3.94821 16.6754 3 14.3863 3 11.9995V11.9995ZM12 1C5.925 1 1 5.92476 1 11.9995C1 18.0742 5.925 22.9989 12 22.9989C18.075 22.9989 23 18.0742 23 11.9995C23 5.92476 18.075 1 12 1ZM16.8 8.59963C16.8788 8.49458 16.9361 8.37504 16.9687 8.24783C17.0013 8.12062 17.0085 7.98824 16.99 7.85825C16.9714 7.72825 16.9274 7.60319 16.8605 7.49019C16.7936 7.3772 16.7051 7.27849 16.6 7.1997C16.4949 7.12091 16.3754 7.06358 16.2482 7.03099C16.121 6.9984 15.9886 6.99119 15.8586 7.00976C15.7286 7.02833 15.6035 7.07232 15.4905 7.13923C15.3775 7.20613 15.2788 7.29464 15.2 7.39969L9.892 14.4773L7.707 12.2925C7.5184 12.1103 7.2658 12.0095 7.0036 12.0118C6.7414 12.0141 6.49059 12.1192 6.30518 12.3046C6.11977 12.49 6.0146 12.7408 6.01233 13.003C6.01005 13.2652 6.11084 13.5178 6.293 13.7064L9.293 16.7062C9.3943 16.8075 9.51618 16.8859 9.6504 16.936C9.78461 16.9861 9.92802 17.0067 10.0709 16.9966C10.2138 16.9864 10.3529 16.9457 10.4787 16.8772C10.6044 16.8086 10.714 16.7138 10.8 16.5992L16.8 8.59963V8.59963Z" FillRule="EvenOdd"/>
</Path.Data>
</Path>
</Viewbox>
</ContentControl>
-->
<TextBlock Margin="10,12,0,0" Foreground="White" FontSize="17" VerticalAlignment="Stretch" TextAlignment="Center" HorizontalAlignment="Stretch" Text="{Binding SliderName1, TargetNullValue=COM}" />
<!-- <TextBlock Margin="10" Foreground="White" FontSize="17" VerticalAlignment="Stretch" TextAlignment="Center" HorizontalAlignment="Stretch"><Run Text="Channel"/></TextBlock> -->
<usercontrols:UCKeyComboBox KeyText="Light Channel" ItemList="{Binding lsChannel1}"
ValueItem="{Binding cbChannel1}" KeyTextFgColor="White" KeyTextBgColor="Black"/>
<Slider Width="300" Height="40" Margin="10,10,5,5" Value="{Binding nSliderValue1}" Maximum="{Binding nSliderMax}"/>
<TextBox Width="70" Height="30" Margin="10,5,5,5" FontSize="15" Text="{Binding nSliderValue1}"/>
<Button Width="100" Height="40" Margin="10" Command="{Binding CMD_LightOnOff1}" Content="{Binding strButtonOnOff1}"/>
</StackPanel>
<StackPanel IsEnabled="{Binding IsActive2}" Orientation="Horizontal" Margin="0,20,0,20"
HorizontalAlignment="Center" VerticalAlignment="Center">
<StackPanel.Style>
<Style TargetType="{x:Type StackPanel}">
<Setter Property="Background" Value="Black"/>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
<Setter Property="Background" Value="Gray"/>
</Trigger>
</Style.Triggers>
</Style>
</StackPanel.Style>
<!--
<ContentControl IsEnabled="True">
<Viewbox xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Width="40" Height="40" Stretch="Uniform" Visibility="{Binding IsActiveiconsD2}" >
<Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="IsActive2_F" Fill="White">
<Path.Data>
<PathGeometry Figures="M3 11.9995C3 10.8176 3.23279 9.64736 3.68508 8.55548C4.13738 7.46361 4.80031 6.4715 5.63604 5.63581C6.47177 4.80013 7.46392 4.13722 8.55585 3.68495C9.64778 3.23268 10.8181 2.9999 12 2.9999C13.1819 2.9999 14.3522 3.23268 15.4442 3.68495C16.5361 4.13722 17.5282 4.80013 18.364 5.63581C19.1997 6.4715 19.8626 7.46361 20.3149 8.55548C20.7672 9.64736 21 10.8176 21 11.9995C21 14.3863 20.0518 16.6754 18.364 18.3631C16.6761 20.0509 14.3869 20.999 12 20.999C9.61305 20.999 7.32387 20.0509 5.63604 18.3631C3.94821 16.6754 3 14.3863 3 11.9995V11.9995ZM12 1C5.925 1 1 5.92476 1 11.9995C1 18.0742 5.925 22.9989 12 22.9989C18.075 22.9989 23 18.0742 23 11.9995C23 5.92476 18.075 1 12 1ZM9.172 7.75667C8.98436 7.56904 8.72986 7.46363 8.4645 7.46363C8.19914 7.46363 7.94464 7.56904 7.757 7.75667C7.56936 7.9443 7.46394 8.19879 7.46394 8.46414C7.46394 8.59553 7.48982 8.72563 7.54011 8.84702C7.59039 8.9684 7.66409 9.0787 7.757 9.1716L10.586 11.9995L7.757 14.8273C7.56936 15.015 7.46394 15.2694 7.46394 15.5348C7.46394 15.8001 7.56936 16.0546 7.757 16.2423C7.94464 16.4299 8.19914 16.5353 8.4645 16.5353C8.72986 16.5353 8.98436 16.4299 9.172 16.2423L12 13.4134L14.829 16.2423C14.9219 16.3351 15.0322 16.4087 15.1536 16.459C15.2749 16.5092 15.405 16.535 15.5364 16.5349C15.6677 16.5349 15.7978 16.509 15.9191 16.4587C16.0404 16.4084 16.1507 16.3347 16.2435 16.2418C16.3363 16.1489 16.41 16.0386 16.4602 15.9172C16.5104 15.7959 16.5362 15.6658 16.5362 15.5344C16.5362 15.4031 16.5102 15.2731 16.4599 15.1517C16.4096 15.0304 16.3359 14.9202 16.243 14.8273L13.414 11.9995L16.243 9.1716C16.4306 8.98411 16.5361 8.72975 16.5362 8.46449C16.5363 8.19923 16.431 7.9448 16.2435 7.75717C16.056 7.56954 15.8016 7.46408 15.5364 7.46398C15.2711 7.46389 15.0166 7.56917 14.829 7.75667L12 10.5855L9.172 7.75667Z" FillRule="EvenOdd"/>
</Path.Data>
</Path>
</Viewbox>
</ContentControl>
<ContentControl IsEnabled="True">
<Viewbox xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Width="40" Height="40" Stretch="Uniform" Visibility="{Binding IsActiveiconsC2}" >
<Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="IsActive2_T" Fill="White">
<Path.Data>
<PathGeometry Figures="M3 11.9995C3 10.8176 3.23279 9.64736 3.68508 8.55548C4.13738 7.46361 4.80031 6.4715 5.63604 5.63581C6.47177 4.80013 7.46392 4.13722 8.55585 3.68495C9.64778 3.23268 10.8181 2.9999 12 2.9999C13.1819 2.9999 14.3522 3.23268 15.4442 3.68495C16.5361 4.13722 17.5282 4.80013 18.364 5.63581C19.1997 6.4715 19.8626 7.46361 20.3149 8.55548C20.7672 9.64736 21 10.8176 21 11.9995C21 14.3863 20.0518 16.6754 18.364 18.3631C16.6761 20.0509 14.3869 20.999 12 20.999C9.61305 20.999 7.32387 20.0509 5.63604 18.3631C3.94821 16.6754 3 14.3863 3 11.9995V11.9995ZM12 1C5.925 1 1 5.92476 1 11.9995C1 18.0742 5.925 22.9989 12 22.9989C18.075 22.9989 23 18.0742 23 11.9995C23 5.92476 18.075 1 12 1ZM16.8 8.59963C16.8788 8.49458 16.9361 8.37504 16.9687 8.24783C17.0013 8.12062 17.0085 7.98824 16.99 7.85825C16.9714 7.72825 16.9274 7.60319 16.8605 7.49019C16.7936 7.3772 16.7051 7.27849 16.6 7.1997C16.4949 7.12091 16.3754 7.06358 16.2482 7.03099C16.121 6.9984 15.9886 6.99119 15.8586 7.00976C15.7286 7.02833 15.6035 7.07232 15.4905 7.13923C15.3775 7.20613 15.2788 7.29464 15.2 7.39969L9.892 14.4773L7.707 12.2925C7.5184 12.1103 7.2658 12.0095 7.0036 12.0118C6.7414 12.0141 6.49059 12.1192 6.30518 12.3046C6.11977 12.49 6.0146 12.7408 6.01233 13.003C6.01005 13.2652 6.11084 13.5178 6.293 13.7064L9.293 16.7062C9.3943 16.8075 9.51618 16.8859 9.6504 16.936C9.78461 16.9861 9.92802 17.0067 10.0709 16.9966C10.2138 16.9864 10.3529 16.9457 10.4787 16.8772C10.6044 16.8086 10.714 16.7138 10.8 16.5992L16.8 8.59963V8.59963Z" FillRule="EvenOdd"/>
</Path.Data>
</Path>
</Viewbox>
</ContentControl>
-->
<TextBlock Margin="10,12,0,0" Foreground="White" FontSize="17" VerticalAlignment="Stretch" TextAlignment="Center" HorizontalAlignment="Stretch" Text="{Binding SliderName2, TargetNullValue=COM}" />
<!-- <TextBlock Margin="10" Foreground="White" FontSize="17" VerticalAlignment="Stretch" TextAlignment="Center" HorizontalAlignment="Stretch"><Run Text="Channel"/></TextBlock> -->
<usercontrols:UCKeyComboBox KeyText="Light Channel" ItemList="{Binding lsChannel2}"
ValueItem="{Binding cbChannel2}" KeyTextFgColor="White" KeyTextBgColor="Black"/>
<Slider Width="300" Height="40" Margin="10,10,5,5" Value="{Binding nSliderValue2}" Maximum="{Binding nSliderMax}"/>
<TextBox Width="70" Height="30" Margin="10,5,5,5" FontSize="15" Text="{Binding nSliderValue2}"/>
<Button Width="100" Height="40" Margin="10" Command="{Binding CMD_LightOnOff2}" Content="{Binding strButtonOnOff2}"/>
</StackPanel>
<StackPanel IsEnabled="{Binding IsActiveALL}" Orientation="Horizontal" Margin="0,90,0,20" HorizontalAlignment="Center" VerticalAlignment="Center">
<StackPanel.Style>
<Style TargetType="{x:Type StackPanel}">
<Setter Property="Background" Value="Black"/>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
<Setter Property="Background" Value="Gray"/>
</Trigger>
</Style.Triggers>
</Style>
</StackPanel.Style>
<TextBlock Margin="10,12,30,0" Foreground="White" FontSize="17" VerticalAlignment="Stretch" TextAlignment="Center" HorizontalAlignment="Stretch">ALL</TextBlock>
<usercontrols:UCKeyComboBox KeyText="Light Channel" ItemList="{Binding lsChannelALL}" ValueItem="{Binding cbChannelALL}" KeyTextFgColor="White" KeyTextBgColor="Black"/>
<Slider Width="300" Height="40" Margin="10,10,5,5" Value="{Binding nSliderValueALL}" Maximum="{Binding nSliderMax}"/>
<TextBox Width="70" Height="30" Margin="10,5,5,5" FontSize="15" Text="{Binding nSliderValueALL}"/>
<Button Width="100" Height="40" Margin="10" Command="{Binding CMD_LightOnOffALL}" Content="{Binding strButtonOnOffALL}"/>
</StackPanel>
</StackPanel>
</Grid>
</UserControl>