mirror of
https://github.com/knah/VRCMelonAssistant.git
synced 2024-05-20 20:32:32 +12:00
move warning to center of mods panel
This commit is contained in:
parent
5a36a2f4db
commit
272251f79b
|
@ -12,126 +12,135 @@
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid x:Name="NoModsGrid" Visibility="Visible">
|
||||||
<RowDefinition Height="auto" />
|
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="32" FontWeight="SemiBold">
|
||||||
<RowDefinition Height="*" />
|
<TextBlock Text="{DynamicResource Mods:NoMods}" />.
|
||||||
</Grid.RowDefinitions>
|
</TextBlock>
|
||||||
<TextBlock
|
</Grid>
|
||||||
Name="SearchText"
|
|
||||||
Padding="5,0,0,0"
|
|
||||||
Height="0"
|
|
||||||
Grid.Row="0"
|
|
||||||
Text="{DynamicResource Mods:SearchLabel}"
|
|
||||||
Panel.ZIndex="1"
|
|
||||||
Foreground="{DynamicResource TextColor}"
|
|
||||||
Background="{DynamicResource BottomStatusBarBackground}" />
|
|
||||||
<TextBox
|
|
||||||
Name="SearchBar"
|
|
||||||
Margin="0,-1,0,0"
|
|
||||||
Padding="3,1,0,0"
|
|
||||||
Height="0"
|
|
||||||
Grid.Row="0"
|
|
||||||
Panel.ZIndex="2"
|
|
||||||
Background="#00000000"
|
|
||||||
Foreground="{DynamicResource TextColor}"
|
|
||||||
TextChanged="SearchBar_TextChanged"
|
|
||||||
BorderThickness="0" />
|
|
||||||
<ListView
|
|
||||||
Name="ModsListView"
|
|
||||||
Grid.Column="1"
|
|
||||||
Grid.Row="1"
|
|
||||||
SelectionChanged="ModsListView_SelectionChanged"
|
|
||||||
SelectionMode="Single">
|
|
||||||
<ListView.View>
|
|
||||||
<GridView>
|
|
||||||
<GridView.Columns>
|
|
||||||
<GridViewColumn Width="30">
|
|
||||||
<GridViewColumn.Header>
|
|
||||||
<Button
|
|
||||||
Name="SearchButton"
|
|
||||||
Background="#00000000"
|
|
||||||
BorderThickness="0"
|
|
||||||
Click="SearchButton_Click"
|
|
||||||
Padding="9,-1,9,0"
|
|
||||||
Margin="-5"
|
|
||||||
Content="🔍"
|
|
||||||
FontSize="11" />
|
|
||||||
</GridViewColumn.Header>
|
|
||||||
<GridViewColumn.CellTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<CheckBox
|
|
||||||
Name="ModCheckBox"
|
|
||||||
Checked="ModCheckBox_Checked"
|
|
||||||
IsChecked="{Binding Path=IsSelected, Mode=TwoWay}"
|
|
||||||
IsEnabled="{Binding IsEnabled}"
|
|
||||||
Tag="{Binding ModInfo}"
|
|
||||||
Unchecked="ModCheckBox_Unchecked" />
|
|
||||||
</DataTemplate>
|
|
||||||
</GridViewColumn.CellTemplate>
|
|
||||||
</GridViewColumn>
|
|
||||||
<GridViewColumn DisplayMemberBinding="{Binding ModName}" Header="{DynamicResource Mods:Header:Name}" />
|
|
||||||
|
|
||||||
<GridViewColumn x:Name="InstalledColumn" Header="{DynamicResource Mods:Header:Installed}">
|
<Grid Visibility="Hidden">
|
||||||
<GridViewColumn.CellTemplate>
|
<Grid.RowDefinitions>
|
||||||
<DataTemplate>
|
<RowDefinition Height="auto" />
|
||||||
<TextBlock
|
<RowDefinition Height="*" />
|
||||||
Foreground="{Binding GetVersionColor}"
|
</Grid.RowDefinitions>
|
||||||
Text="{Binding InstalledVersion}"
|
|
||||||
TextDecorations="{Binding GetVersionDecoration}" />
|
|
||||||
</DataTemplate>
|
|
||||||
</GridViewColumn.CellTemplate>
|
|
||||||
</GridViewColumn>
|
|
||||||
|
|
||||||
<GridViewColumn DisplayMemberBinding="{Binding ModVersion}" Header="{DynamicResource Mods:Header:Latest}" />
|
<TextBlock
|
||||||
<GridViewColumn x:Name="DescriptionColumn" Header="{DynamicResource Mods:Header:Description}">
|
Name="SearchText"
|
||||||
<GridViewColumn.CellTemplate>
|
Grid.Row="0"
|
||||||
<DataTemplate>
|
Height="0"
|
||||||
<StackPanel Orientation="Horizontal">
|
Padding="5,0,0,0"
|
||||||
<TextBlock Margin="{Binding PromotionMargin}">
|
Panel.ZIndex="1"
|
||||||
<Hyperlink NavigateUri="{Binding PromotionLink, TargetNullValue=about:blank}" RequestNavigate="Hyperlink_RequestNavigate">
|
Background="{DynamicResource BottomStatusBarBackground}"
|
||||||
<Run Text="{Binding PromotionText}" />
|
Foreground="{DynamicResource TextColor}"
|
||||||
</Hyperlink>
|
Text="{DynamicResource Mods:SearchLabel}" />
|
||||||
</TextBlock>
|
<TextBox
|
||||||
<TextBlock Text="{Binding ModDescription}" MouseLeftButtonDown="CopyText" />
|
Name="SearchBar"
|
||||||
</StackPanel>
|
Grid.Row="0"
|
||||||
</DataTemplate>
|
Height="0"
|
||||||
|
Margin="0,-1,0,0"
|
||||||
</GridViewColumn.CellTemplate>
|
Padding="3,1,0,0"
|
||||||
</GridViewColumn>
|
Panel.ZIndex="2"
|
||||||
|
Background="#00000000"
|
||||||
<GridViewColumn
|
BorderThickness="0"
|
||||||
x:Name="UninstallColumn"
|
Foreground="{DynamicResource TextColor}"
|
||||||
Width="70"
|
TextChanged="SearchBar_TextChanged" />
|
||||||
Header="{DynamicResource Mods:Header:Uninstall}">
|
<ListView
|
||||||
<GridViewColumn.CellTemplate>
|
Name="ModsListView"
|
||||||
<DataTemplate>
|
Grid.Row="1"
|
||||||
|
Grid.Column="1"
|
||||||
|
SelectionChanged="ModsListView_SelectionChanged"
|
||||||
|
SelectionMode="Single">
|
||||||
|
<ListView.View>
|
||||||
|
<GridView>
|
||||||
|
<GridView.Columns>
|
||||||
|
<GridViewColumn Width="30">
|
||||||
|
<GridViewColumn.Header>
|
||||||
<Button
|
<Button
|
||||||
Name="Uninstall"
|
Name="SearchButton"
|
||||||
Click="Uninstall_Click"
|
Margin="-5"
|
||||||
Content="{DynamicResource Mods:UninstallButton}"
|
Padding="9,-1,9,0"
|
||||||
Foreground="Red"
|
Background="#00000000"
|
||||||
IsEnabled="{Binding CanDelete}"
|
BorderThickness="0"
|
||||||
Tag="{Binding ModInfo}"
|
Click="SearchButton_Click"
|
||||||
Visibility="{Binding CanSeeDelete}" />
|
Content="🔍"
|
||||||
</DataTemplate>
|
FontSize="11" />
|
||||||
</GridViewColumn.CellTemplate>
|
</GridViewColumn.Header>
|
||||||
</GridViewColumn>
|
<GridViewColumn.CellTemplate>
|
||||||
</GridView.Columns>
|
<DataTemplate>
|
||||||
</GridView>
|
<CheckBox
|
||||||
</ListView.View>
|
Name="ModCheckBox"
|
||||||
<ListView.GroupStyle>
|
Checked="ModCheckBox_Checked"
|
||||||
<GroupStyle>
|
IsChecked="{Binding Path=IsSelected, Mode=TwoWay}"
|
||||||
<GroupStyle.HeaderTemplate>
|
IsEnabled="{Binding IsEnabled}"
|
||||||
<DataTemplate>
|
Tag="{Binding ModInfo}"
|
||||||
<TextBlock
|
Unchecked="ModCheckBox_Unchecked" />
|
||||||
Padding="6,0,0,0"
|
</DataTemplate>
|
||||||
FontSize="14"
|
</GridViewColumn.CellTemplate>
|
||||||
FontWeight="Bold"
|
</GridViewColumn>
|
||||||
Text="{Binding Name}" />
|
<GridViewColumn DisplayMemberBinding="{Binding ModName}" Header="{DynamicResource Mods:Header:Name}" />
|
||||||
</DataTemplate>
|
|
||||||
</GroupStyle.HeaderTemplate>
|
<GridViewColumn x:Name="InstalledColumn" Header="{DynamicResource Mods:Header:Installed}">
|
||||||
</GroupStyle>
|
<GridViewColumn.CellTemplate>
|
||||||
</ListView.GroupStyle>
|
<DataTemplate>
|
||||||
</ListView>
|
<TextBlock
|
||||||
|
Foreground="{Binding GetVersionColor}"
|
||||||
|
Text="{Binding InstalledVersion}"
|
||||||
|
TextDecorations="{Binding GetVersionDecoration}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</GridViewColumn.CellTemplate>
|
||||||
|
</GridViewColumn>
|
||||||
|
|
||||||
|
<GridViewColumn DisplayMemberBinding="{Binding ModVersion}" Header="{DynamicResource Mods:Header:Latest}" />
|
||||||
|
<GridViewColumn x:Name="DescriptionColumn" Header="{DynamicResource Mods:Header:Description}">
|
||||||
|
<GridViewColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Margin="{Binding PromotionMargin}">
|
||||||
|
<Hyperlink NavigateUri="{Binding PromotionLink, TargetNullValue=about:blank}" RequestNavigate="Hyperlink_RequestNavigate">
|
||||||
|
<Run Text="{Binding PromotionText}" />
|
||||||
|
</Hyperlink>
|
||||||
|
</TextBlock>
|
||||||
|
<TextBlock MouseLeftButtonDown="CopyText" Text="{Binding ModDescription}" />
|
||||||
|
</StackPanel>
|
||||||
|
</DataTemplate>
|
||||||
|
|
||||||
|
</GridViewColumn.CellTemplate>
|
||||||
|
</GridViewColumn>
|
||||||
|
|
||||||
|
<GridViewColumn
|
||||||
|
x:Name="UninstallColumn"
|
||||||
|
Width="70"
|
||||||
|
Header="{DynamicResource Mods:Header:Uninstall}">
|
||||||
|
<GridViewColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Button
|
||||||
|
Name="Uninstall"
|
||||||
|
Click="Uninstall_Click"
|
||||||
|
Content="{DynamicResource Mods:UninstallButton}"
|
||||||
|
Foreground="Red"
|
||||||
|
IsEnabled="{Binding CanDelete}"
|
||||||
|
Tag="{Binding ModInfo}"
|
||||||
|
Visibility="{Binding CanSeeDelete}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</GridViewColumn.CellTemplate>
|
||||||
|
</GridViewColumn>
|
||||||
|
</GridView.Columns>
|
||||||
|
</GridView>
|
||||||
|
</ListView.View>
|
||||||
|
<ListView.GroupStyle>
|
||||||
|
<GroupStyle>
|
||||||
|
<GroupStyle.HeaderTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock
|
||||||
|
Padding="6,0,0,0"
|
||||||
|
FontSize="14"
|
||||||
|
FontWeight="Bold"
|
||||||
|
Text="{Binding Name}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</GroupStyle.HeaderTemplate>
|
||||||
|
</GroupStyle>
|
||||||
|
</ListView.GroupStyle>
|
||||||
|
</ListView>
|
||||||
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Page>
|
</Page>
|
||||||
|
|
|
@ -135,10 +135,11 @@ namespace ModAssistant.Pages
|
||||||
this.DataContext = this;
|
this.DataContext = this;
|
||||||
|
|
||||||
RefreshModsList();
|
RefreshModsList();
|
||||||
ModsListView.Visibility = Visibility.Visible;
|
ModsListView.Visibility = ModList.Count == 0 ? Visibility.Hidden : Visibility.Visible;
|
||||||
MainWindow.Instance.MainText = ModList.Count == 0 ? $"{FindResource("Mods:NoMods")}." : $"{FindResource("Mods:FinishedLoadingMods")}.";
|
NoModsGrid.Visibility = ModList.Count == 0 ? Visibility.Visible : Visibility.Hidden;
|
||||||
|
|
||||||
MainWindow.Instance.InstallButton.IsEnabled = true;
|
MainWindow.Instance.MainText = $"{FindResource("Mods:FinishedLoadingMods")}.";
|
||||||
|
MainWindow.Instance.InstallButton.IsEnabled = ModList.Count != 0;
|
||||||
MainWindow.Instance.GameVersionsBox.IsEnabled = true;
|
MainWindow.Instance.GameVersionsBox.IsEnabled = true;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|
Loading…
Reference in a new issue