fix: 全选逻辑问题、UI问题
This commit is contained in:
@@ -25,16 +25,16 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</local:MyCard>
|
</local:MyCard>
|
||||||
<local:MyCard x:Name="PanListBack" VerticalAlignment="Top" Opacity="0" Margin="0,0,0,15" Title=" " MinHeight="40">
|
<local:MyCard x:Name="PanListBack" VerticalAlignment="Top" Opacity="0" Margin="0,0,0,15" Title=" " MinHeight="40">
|
||||||
<StackPanel Margin="13" Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Right" Height="20">
|
<StackPanel Margin="0,11,10,0" Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Right" Height="20">
|
||||||
<local:MyTextButton Height="20" Margin="3,0" Tag="All" Text="全部" x:Name="BtnTypeAll"/>
|
<local:MyTextButton VerticalContentAlignment="Center" Height="20" Margin="3,0" Tag="All" Text="全部" x:Name="BtnTypeAll"/>
|
||||||
<TextBlock Text="|" Foreground="Gray"/>
|
<TextBlock Text="|" Foreground="{StaticResource ColorBrushGray1}" VerticalAlignment="Center"/>
|
||||||
<local:MyTextButton Height="20" Margin="3,0" Tag="Enabled" Text="已启用" x:Name="BtnTypeEnabled"/>
|
<local:MyTextButton VerticalContentAlignment="Center" Height="20" Margin="3,0" Tag="Enabled" Text="已启用" x:Name="BtnTypeEnabled"/>
|
||||||
<TextBlock Text="|" Foreground="Gray"/>
|
<TextBlock Text="|" Foreground="{StaticResource ColorBrushGray1}" VerticalAlignment="Center"/>
|
||||||
<local:MyTextButton Height="20" Margin="3,0" Tag="Disabled" Text="已禁用" x:Name="BtnTypeDisabled"/>
|
<local:MyTextButton VerticalContentAlignment="Center" Height="20" Margin="3,0" Tag="Disabled" Text="已禁用" x:Name="BtnTypeDisabled"/>
|
||||||
<TextBlock Text="|" Foreground="Gray"/>
|
<TextBlock Text="|" Foreground="{StaticResource ColorBrushGray1}" VerticalAlignment="Center"/>
|
||||||
<local:MyTextButton Height="20" Margin="3,0" Tag="CanUpdate" Text="可更新" x:Name="BtnTypeCanUpdate"/>
|
<local:MyTextButton VerticalContentAlignment="Center" Height="20" Margin="3,0" Tag="CanUpdate" Text="可更新" x:Name="BtnTypeCanUpdate"/>
|
||||||
<TextBlock Text="|" Foreground="Gray"/>
|
<TextBlock Text="|" Foreground="{StaticResource ColorBrushGray1}" VerticalAlignment="Center"/>
|
||||||
<local:MyTextButton Height="20" Margin="3,0" Tag="Error" Text="错误" x:Name="BtnTypeError"/>
|
<local:MyTextButton VerticalContentAlignment="Center" Height="20" Margin="3,0" Tag="Error" Text="错误" x:Name="BtnTypeError"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Margin="20,38,18,18" Name="PanList" VerticalAlignment="Top" />
|
<StackPanel Margin="20,38,18,18" Name="PanList" VerticalAlignment="Top" />
|
||||||
</local:MyCard>
|
</local:MyCard>
|
||||||
|
|||||||
@@ -229,9 +229,9 @@
|
|||||||
''' </summary>
|
''' </summary>
|
||||||
Private Sub BtnManageSelectAll_Click(sender As Object, e As MouseButtonEventArgs) Handles BtnManageSelectAll.Click
|
Private Sub BtnManageSelectAll_Click(sender As Object, e As MouseButtonEventArgs) Handles BtnManageSelectAll.Click
|
||||||
If SelectedMods.Count < PanList.Children.Count Then
|
If SelectedMods.Count < PanList.Children.Count Then
|
||||||
ChangeAllSelected(True)
|
ChangeCurrentSelected(True)
|
||||||
Else
|
Else
|
||||||
ChangeAllSelected(False)
|
ChangeCurrentSelected(False)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -337,7 +337,7 @@
|
|||||||
Private Sub ChangeAllSelected(Value As Boolean)
|
Private Sub ChangeAllSelected(Value As Boolean)
|
||||||
AniControlEnabled += 1
|
AniControlEnabled += 1
|
||||||
SelectedMods.Clear()
|
SelectedMods.Clear()
|
||||||
For Each Item As MyLocalModItem In PanList.Children
|
For Each Item As MyLocalModItem In ModItems.Values.ToList
|
||||||
Item.Checked = Value
|
Item.Checked = Value
|
||||||
If Value Then SelectedMods.Add(Item.Entry.RawFileName)
|
If Value Then SelectedMods.Add(Item.Entry.RawFileName)
|
||||||
Next
|
Next
|
||||||
@@ -345,6 +345,22 @@
|
|||||||
'更新下边栏 UI
|
'更新下边栏 UI
|
||||||
RefreshBottomBar()
|
RefreshBottomBar()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ChangeCurrentSelected(Value As Boolean)
|
||||||
|
AniControlEnabled += 1
|
||||||
|
For Each Item As MyLocalModItem In PanList.Children
|
||||||
|
Item.Checked = Value
|
||||||
|
If Value Then
|
||||||
|
If Not SelectedMods.Contains(Item.Entry.RawFileName) Then SelectedMods.Add(Item.Entry.RawFileName)
|
||||||
|
Else
|
||||||
|
If SelectedMods.Contains(Item.Entry.RawFileName) Then SelectedMods.Remove(Item.Entry.RawFileName)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
AniControlEnabled -= 1
|
||||||
|
'更新下边栏 UI
|
||||||
|
RefreshBottomBar()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub UnselectedAllWithAnimation() Handles Load.StateChanged, Me.PageExit
|
Private Sub UnselectedAllWithAnimation() Handles Load.StateChanged, Me.PageExit
|
||||||
Dim CacheAniControlEnabled = AniControlEnabled
|
Dim CacheAniControlEnabled = AniControlEnabled
|
||||||
AniControlEnabled = 0
|
AniControlEnabled = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user