|
@@ -3,6 +3,7 @@
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
+ xmlns:data="clr-namespace:ShakerManger.Data"
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
|
xmlns:local="clr-namespace:ShakerManger"
|
|
xmlns:local="clr-namespace:ShakerManger"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
@@ -198,7 +199,7 @@
|
|
Padding="0"
|
|
Padding="0"
|
|
hc:IconElement.Geometry="{StaticResource StartGeometry}"
|
|
hc:IconElement.Geometry="{StaticResource StartGeometry}"
|
|
Command="{Binding StartAllCommand}"
|
|
Command="{Binding StartAllCommand}"
|
|
- IsEnabled="{Binding Source={StaticResource MainViewModel}, Path=Data.Login.IsAnonymous, Converter={StaticResource Boolean2BooleanReConverter}}"
|
|
|
|
|
|
+ IsEnabled="{Binding Source={StaticResource Login}, Path=Data.IsAnonymous, Converter={StaticResource Boolean2BooleanReConverter}}"
|
|
Style="{StaticResource ImageButton}"
|
|
Style="{StaticResource ImageButton}"
|
|
ToolTip="全部开始" />
|
|
ToolTip="全部开始" />
|
|
<Button
|
|
<Button
|
|
@@ -207,7 +208,7 @@
|
|
Padding="0"
|
|
Padding="0"
|
|
hc:IconElement.Geometry="{StaticResource StopGeometry}"
|
|
hc:IconElement.Geometry="{StaticResource StopGeometry}"
|
|
Command="{Binding StopAllCommand}"
|
|
Command="{Binding StopAllCommand}"
|
|
- IsEnabled="{Binding Source={StaticResource MainViewModel}, Path=Data.Login.IsAnonymous, Converter={StaticResource Boolean2BooleanReConverter}}"
|
|
|
|
|
|
+ IsEnabled="{Binding Source={StaticResource Login}, Path=Data.IsAnonymous, Converter={StaticResource Boolean2BooleanReConverter}}"
|
|
Style="{StaticResource ImageButton}"
|
|
Style="{StaticResource ImageButton}"
|
|
ToolTip="全部停止" />
|
|
ToolTip="全部停止" />
|
|
</UniformGrid>
|
|
</UniformGrid>
|
|
@@ -229,7 +230,7 @@
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger.Conditions>
|
|
<MultiDataTrigger.Conditions>
|
|
<Condition Binding="{Binding IsEnabled}" Value="True" />
|
|
<Condition Binding="{Binding IsEnabled}" Value="True" />
|
|
- <Condition Binding="{Binding Source={StaticResource MainViewModel}, Path=Data.Login.IsAnonymous}" Value="False" />
|
|
|
|
|
|
+ <Condition Binding="{Binding Source={StaticResource Login}, Path=Data.IsAnonymous}" Value="False" />
|
|
</MultiDataTrigger.Conditions>
|
|
</MultiDataTrigger.Conditions>
|
|
<Setter Property="IsEnabled" Value="True" />
|
|
<Setter Property="IsEnabled" Value="True" />
|
|
</MultiDataTrigger>
|
|
</MultiDataTrigger>
|
|
@@ -237,21 +238,21 @@
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger.Conditions>
|
|
<MultiDataTrigger.Conditions>
|
|
<Condition Binding="{Binding IsEnabled}" Value="False" />
|
|
<Condition Binding="{Binding IsEnabled}" Value="False" />
|
|
- <Condition Binding="{Binding Source={StaticResource MainViewModel}, Path=Data.Login.IsAnonymous}" Value="False" />
|
|
|
|
|
|
+ <Condition Binding="{Binding Source={StaticResource Login}, Path=Data.IsAnonymous}" Value="False" />
|
|
</MultiDataTrigger.Conditions>
|
|
</MultiDataTrigger.Conditions>
|
|
<Setter Property="IsEnabled" Value="False" />
|
|
<Setter Property="IsEnabled" Value="False" />
|
|
</MultiDataTrigger>
|
|
</MultiDataTrigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger.Conditions>
|
|
<MultiDataTrigger.Conditions>
|
|
<Condition Binding="{Binding IsEnabled}" Value="False" />
|
|
<Condition Binding="{Binding IsEnabled}" Value="False" />
|
|
- <Condition Binding="{Binding Source={StaticResource MainViewModel}, Path=Data.Login.IsAnonymous}" Value="True" />
|
|
|
|
|
|
+ <Condition Binding="{Binding Source={StaticResource Login}, Path=Data.IsAnonymous}" Value="True" />
|
|
</MultiDataTrigger.Conditions>
|
|
</MultiDataTrigger.Conditions>
|
|
<Setter Property="IsEnabled" Value="False" />
|
|
<Setter Property="IsEnabled" Value="False" />
|
|
</MultiDataTrigger>
|
|
</MultiDataTrigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger.Conditions>
|
|
<MultiDataTrigger.Conditions>
|
|
<Condition Binding="{Binding IsEnabled}" Value="True" />
|
|
<Condition Binding="{Binding IsEnabled}" Value="True" />
|
|
- <Condition Binding="{Binding Source={StaticResource MainViewModel}, Path=Data.Login.IsAnonymous}" Value="True" />
|
|
|
|
|
|
+ <Condition Binding="{Binding Source={StaticResource Login}, Path=Data.IsAnonymous}" Value="True" />
|
|
</MultiDataTrigger.Conditions>
|
|
</MultiDataTrigger.Conditions>
|
|
<Setter Property="IsEnabled" Value="False" />
|
|
<Setter Property="IsEnabled" Value="False" />
|
|
</MultiDataTrigger>
|
|
</MultiDataTrigger>
|
|
@@ -304,8 +305,28 @@
|
|
hc:IconElement.Geometry="{StaticResource LayoutGeometry}"
|
|
hc:IconElement.Geometry="{StaticResource LayoutGeometry}"
|
|
Background="{StaticResource TitleBackColor}"
|
|
Background="{StaticResource TitleBackColor}"
|
|
Cursor="Hand"
|
|
Cursor="Hand"
|
|
- IsEnabled="{Binding LayoutVisibily}"
|
|
|
|
- Style="{StaticResource ImageButton}">
|
|
|
|
|
|
+ IsEnabled="{Binding LayoutVisibily}">
|
|
|
|
+ <Button.Style>
|
|
|
|
+ <Style TargetType="Button" BasedOn="{StaticResource ImageButton}">
|
|
|
|
+ <Style.Triggers>
|
|
|
|
+ <DataTrigger Binding="{Binding CurrentMainPage.MainPageType}" Value="{x:Static data:MainPageType.ShakerManger}">
|
|
|
|
+ <Setter Property="Visibility" Value="Visible" />
|
|
|
|
+ </DataTrigger>
|
|
|
|
+ <DataTrigger Binding="{Binding CurrentMainPage.MainPageType}" Value="{x:Static data:MainPageType.ConfigManger}">
|
|
|
|
+ <Setter Property="Visibility" Value="Collapsed" />
|
|
|
|
+ </DataTrigger>
|
|
|
|
+ <DataTrigger Binding="{Binding CurrentMainPage.MainPageType}" Value="{x:Static data:MainPageType.DataManger}">
|
|
|
|
+ <Setter Property="Visibility" Value="Collapsed" />
|
|
|
|
+ </DataTrigger>
|
|
|
|
+ <DataTrigger Binding="{Binding CurrentMainPage.MainPageType}" Value="{x:Static data:MainPageType.LogManger}">
|
|
|
|
+ <Setter Property="Visibility" Value="Collapsed" />
|
|
|
|
+ </DataTrigger>
|
|
|
|
+ <DataTrigger Binding="{Binding CurrentMainPage.MainPageType}" Value="{x:Static data:MainPageType.WarnManger}">
|
|
|
|
+ <Setter Property="Visibility" Value="Collapsed" />
|
|
|
|
+ </DataTrigger>
|
|
|
|
+ </Style.Triggers>
|
|
|
|
+ </Style>
|
|
|
|
+ </Button.Style>
|
|
<hc:Interaction.Triggers>
|
|
<hc:Interaction.Triggers>
|
|
<hc:EventTrigger EventName="Click">
|
|
<hc:EventTrigger EventName="Click">
|
|
<hc:SetPropertyAction
|
|
<hc:SetPropertyAction
|
|
@@ -387,8 +408,9 @@
|
|
Grid.Row="0"
|
|
Grid.Row="0"
|
|
Grid.RowSpan="2"
|
|
Grid.RowSpan="2"
|
|
Grid.ColumnSpan="2"
|
|
Grid.ColumnSpan="2"
|
|
|
|
+ DataContext="{Binding Source={StaticResource Prompt}, Path=Data}"
|
|
Dock="Top"
|
|
Dock="Top"
|
|
- IsOpen="{Binding Prompt.IsOpen}">
|
|
|
|
|
|
+ IsOpen="{Binding IsOpen}">
|
|
<Border
|
|
<Border
|
|
Width="{x:Static SystemParameters.PrimaryScreenWidth}"
|
|
Width="{x:Static SystemParameters.PrimaryScreenWidth}"
|
|
Height="{x:Static SystemParameters.PrimaryScreenHeight}"
|
|
Height="{x:Static SystemParameters.PrimaryScreenHeight}"
|
|
@@ -414,7 +436,7 @@
|
|
FontSize="32"
|
|
FontSize="32"
|
|
FontWeight="Bold"
|
|
FontWeight="Bold"
|
|
Foreground="White"
|
|
Foreground="White"
|
|
- Text="{Binding Prompt.Title}" />
|
|
|
|
|
|
+ Text="{Binding Title}" />
|
|
</Border>
|
|
</Border>
|
|
<StackPanel
|
|
<StackPanel
|
|
Grid.Row="1"
|
|
Grid.Row="1"
|
|
@@ -429,8 +451,8 @@
|
|
Height="60"
|
|
Height="60"
|
|
HorizontalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
- Visibility="{Binding Prompt.IconVisibility}">
|
|
|
|
- <Path Data="{Binding Prompt.IconGeometry, Mode=OneWay}" Fill="{Binding Prompt.IconBrush}" />
|
|
|
|
|
|
+ Visibility="{Binding IconVisibility}">
|
|
|
|
+ <Path Data="{Binding IconGeometry, Mode=OneWay}" Fill="{Binding IconBrush}" />
|
|
</Viewbox>
|
|
</Viewbox>
|
|
<TextBlock
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
Grid.Row="1"
|
|
@@ -441,7 +463,7 @@
|
|
VerticalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
FontSize="20"
|
|
FontSize="20"
|
|
Foreground="White"
|
|
Foreground="White"
|
|
- Text="{Binding Prompt.Message}"
|
|
|
|
|
|
+ Text="{Binding Message}"
|
|
TextWrapping="Wrap" />
|
|
TextWrapping="Wrap" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
<StackPanel
|
|
<StackPanel
|
|
@@ -453,22 +475,22 @@
|
|
<Button
|
|
<Button
|
|
Width="88"
|
|
Width="88"
|
|
Height="38"
|
|
Height="38"
|
|
- Command="{Binding Prompt.YesCommand}"
|
|
|
|
- Content="{Binding Prompt.YesText}"
|
|
|
|
|
|
+ Command="{Binding YesCommand}"
|
|
|
|
+ Content="{Binding YesText}"
|
|
Cursor="Hand"
|
|
Cursor="Hand"
|
|
FontSize="16"
|
|
FontSize="16"
|
|
- ToolTip="{Binding Prompt.YesText}"
|
|
|
|
- Visibility="{Binding Prompt.YesVisibility}" />
|
|
|
|
|
|
+ ToolTip="{Binding YesText}"
|
|
|
|
+ Visibility="{Binding YesVisibility}" />
|
|
<Button
|
|
<Button
|
|
Width="88"
|
|
Width="88"
|
|
Height="38"
|
|
Height="38"
|
|
Margin="40,0,0,0"
|
|
Margin="40,0,0,0"
|
|
- Command="{Binding Prompt.NoCommand}"
|
|
|
|
- Content="{Binding Prompt.NoText}"
|
|
|
|
|
|
+ Command="{Binding NoCommand}"
|
|
|
|
+ Content="{Binding NoText}"
|
|
Cursor="Hand"
|
|
Cursor="Hand"
|
|
FontSize="16"
|
|
FontSize="16"
|
|
- ToolTip="{Binding Prompt.NoText}"
|
|
|
|
- Visibility="{Binding Prompt.NoVisibility}" />
|
|
|
|
|
|
+ ToolTip="{Binding NoText}"
|
|
|
|
+ Visibility="{Binding NoVisibility}" />
|
|
|
|
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
@@ -479,8 +501,9 @@
|
|
Grid.Row="0"
|
|
Grid.Row="0"
|
|
Grid.RowSpan="2"
|
|
Grid.RowSpan="2"
|
|
Grid.ColumnSpan="2"
|
|
Grid.ColumnSpan="2"
|
|
|
|
+ DataContext="{Binding Source={StaticResource Login}, Path=Data}"
|
|
Dock="Top"
|
|
Dock="Top"
|
|
- IsOpen="{Binding Login.IsLoggedIn, Converter={StaticResource Boolean2BooleanReConverter}}">
|
|
|
|
|
|
+ IsOpen="{Binding IsLoggedIn, Converter={StaticResource Boolean2BooleanReConverter}}">
|
|
<Grid
|
|
<Grid
|
|
Width="{x:Static SystemParameters.PrimaryScreenWidth}"
|
|
Width="{x:Static SystemParameters.PrimaryScreenWidth}"
|
|
Height="{x:Static SystemParameters.PrimaryScreenHeight}"
|
|
Height="{x:Static SystemParameters.PrimaryScreenHeight}"
|
|
@@ -540,7 +563,7 @@
|
|
Foreground="Black"
|
|
Foreground="Black"
|
|
InputScope="AlphanumericHalfWidth"
|
|
InputScope="AlphanumericHalfWidth"
|
|
MaxLength="20"
|
|
MaxLength="20"
|
|
- Text="{Binding Login.UserName}"
|
|
|
|
|
|
+ Text="{Binding UserName}"
|
|
Watermark="输入用户名" />
|
|
Watermark="输入用户名" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
<StackPanel
|
|
<StackPanel
|
|
@@ -568,16 +591,16 @@
|
|
IsSafeEnabled="False"
|
|
IsSafeEnabled="False"
|
|
MaxLength="20"
|
|
MaxLength="20"
|
|
ShowEyeButton="True"
|
|
ShowEyeButton="True"
|
|
- UnsafePassword="{Binding Login.PassWord}">
|
|
|
|
|
|
+ UnsafePassword="{Binding PassWord}">
|
|
<hc:PasswordBox.InputBindings>
|
|
<hc:PasswordBox.InputBindings>
|
|
- <KeyBinding Key="Enter" Command="{Binding Login.LoginCommand}" />
|
|
|
|
|
|
+ <KeyBinding Key="Enter" Command="{Binding LoginCommand}" />
|
|
</hc:PasswordBox.InputBindings>
|
|
</hc:PasswordBox.InputBindings>
|
|
</hc:PasswordBox>
|
|
</hc:PasswordBox>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
<TextBlock
|
|
<TextBlock
|
|
Grid.Row="3"
|
|
Grid.Row="3"
|
|
Foreground="Red"
|
|
Foreground="Red"
|
|
- Text="{Binding Login.Message}" />
|
|
|
|
|
|
+ Text="{Binding Message}" />
|
|
<StackPanel
|
|
<StackPanel
|
|
Grid.Row="4"
|
|
Grid.Row="4"
|
|
HorizontalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
@@ -586,7 +609,7 @@
|
|
<Button
|
|
<Button
|
|
Width="120"
|
|
Width="120"
|
|
Height="36"
|
|
Height="36"
|
|
- Command="{Binding Login.LoginCommand}"
|
|
|
|
|
|
+ Command="{Binding LoginCommand}"
|
|
Content="登录"
|
|
Content="登录"
|
|
Cursor="Hand"
|
|
Cursor="Hand"
|
|
FontSize="16"
|
|
FontSize="16"
|
|
@@ -595,7 +618,7 @@
|
|
Width="120"
|
|
Width="120"
|
|
Height="36"
|
|
Height="36"
|
|
Margin="40,0,0,0"
|
|
Margin="40,0,0,0"
|
|
- Command="{Binding ShutDownCommand}"
|
|
|
|
|
|
+ Command="{Binding Source={StaticResource MainViewModel}, Path=Data.ShutDownCommand}"
|
|
Content="退出"
|
|
Content="退出"
|
|
Cursor="Hand"
|
|
Cursor="Hand"
|
|
FontSize="16"
|
|
FontSize="16"
|
|
@@ -608,7 +631,7 @@
|
|
HorizontalAlignment="Right"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Bottom"
|
|
VerticalAlignment="Bottom"
|
|
BorderThickness="0"
|
|
BorderThickness="0"
|
|
- Command="{Binding Login.AnonymousLoginCommand}"
|
|
|
|
|
|
+ Command="{Binding Source={StaticResource Login}, Path=Data.AnonymousLoginCommand}"
|
|
Content="匿名登录"
|
|
Content="匿名登录"
|
|
FontSize="22"
|
|
FontSize="22"
|
|
Foreground="Blue"
|
|
Foreground="Blue"
|