This commit is contained in:
2509_92447106 committed 2026-11-07 16:05:56 +08:00
commit 60113ab76e
81 files changed
+8520

No files matched your search

@@ -0,0 +1,141 @@
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:loc="using:EarthModelStudio.Services"
x:Class="EarthModelStudio.Views.SettingsView">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel Margin="26,24,26,32" Spacing="16" MaxWidth="880" HorizontalAlignment="Left">
<StackPanel Spacing="4">
<TextBlock Classes="h1" Text="{loc:Loc set.title}" />
<TextBlock Classes="muted" Text="{loc:Loc set.subtitle}" />
</StackPanel>
<!-- 通用 -->
<Border Classes="card" Padding="20,18">
<StackPanel Spacing="16">
<TextBlock Classes="h2" Text="{loc:Loc set.general}" />
<Grid ColumnDefinitions="200,*">
<StackPanel VerticalAlignment="Center" Spacing="2">
<TextBlock Classes="h3" Text="{loc:Loc set.language}" />
</StackPanel>
<ComboBox Grid.Column="1" ItemsSource="{Binding Languages}"
SelectedItem="{Binding SelectedLanguage}" Width="220" HorizontalAlignment="Left">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Label}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
<Grid ColumnDefinitions="200,*">
<StackPanel VerticalAlignment="Center" Spacing="2">
<TextBlock Classes="h3" Text="{loc:Loc set.fps}" />
<TextBlock Classes="faint" Text="{loc:Loc set.fps.desc}" TextWrapping="Wrap" />
</StackPanel>
<ComboBox Grid.Column="1" ItemsSource="{Binding FrameRates}"
SelectedItem="{Binding SelectedFps}" Width="120" HorizontalAlignment="Left" />
</Grid>
</StackPanel>
</Border>
<!-- 内存 -->
<Border Classes="card" Padding="20,18">
<StackPanel Spacing="12">
<Grid ColumnDefinitions="*,Auto">
<TextBlock Classes="h2" Text="{loc:Loc set.memory}" />
<TextBlock Grid.Column="1" Text="{Binding MemoryValueText}" Classes="h3"
Foreground="{DynamicResource Accent}" VerticalAlignment="Center" />
</Grid>
<TextBlock Classes="muted" Text="{loc:Loc set.memory.desc}" TextWrapping="Wrap" />
<Slider Minimum="512" Maximum="8192" TickFrequency="256" IsSnapToTickEnabled="False"
Value="{Binding MemoryValue}" Margin="0,4,0,0" />
<Grid ColumnDefinitions="*,Auto">
<TextBlock Classes="faint" Text="{loc:Loc set.memory.hint}" TextWrapping="Wrap" />
<TextBlock Grid.Column="1" Classes="faint" Text="{Binding UsageText}" Margin="16,0,0,0" />
</Grid>
</StackPanel>
</Border>
<!-- 模型源 -->
<Border Classes="card" Padding="20,18">
<StackPanel Spacing="10">
<TextBlock Classes="h2" Text="{loc:Loc set.sources}" />
<TextBlock Classes="muted" Text="{loc:Loc set.sources.desc}" TextWrapping="Wrap" />
<ItemsControl ItemsSource="{Binding Sources}" Margin="0,4,0,0">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Classes="panel" Padding="12,9" Margin="0,0,0,8">
<Grid ColumnDefinitions="Auto,*,Auto">
<CheckBox IsChecked="{Binding Enabled}" VerticalAlignment="Center" Margin="0,0,10,0" />
<StackPanel Grid.Column="1" Spacing="2" VerticalAlignment="Center">
<TextBlock Text="{Binding Name}" FontSize="12.5" FontWeight="SemiBold" />
<TextBlock Text="{Binding UrlText}" Classes="faint" TextTrimming="CharacterEllipsis" MaxWidth="520" />
</StackPanel>
<Button Grid.Column="2" Classes="ghost small" Content="✕"
Command="{Binding RemoveCommand}" VerticalAlignment="Center" />
</Grid>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</Border>
<!-- 存储 -->
<Border Classes="card" Padding="20,18">
<StackPanel Spacing="14">
<TextBlock Classes="h2" Text="{loc:Loc set.storage}" />
<Grid ColumnDefinitions="200,*,Auto">
<TextBlock Classes="h3" Text="{loc:Loc set.modelDir}" VerticalAlignment="Center" />
<TextBlock Grid.Column="1" Classes="muted" Text="{Binding ModelRoot}"
TextTrimming="CharacterEllipsis" VerticalAlignment="Center" Margin="0,0,10,0" />
<Button Grid.Column="2" Classes="small" Content="{loc:Loc set.openFolder}"
Command="{Binding OpenModelFolderCommand}" />
</Grid>
<Grid ColumnDefinitions="200,*,Auto">
<TextBlock Classes="h3" Text="{loc:Loc set.dataDir}" VerticalAlignment="Center" />
<TextBlock Grid.Column="1" Classes="muted" Text="{Binding DataRoot}"
TextTrimming="CharacterEllipsis" VerticalAlignment="Center" Margin="0,0,10,0" />
<Button Grid.Column="2" Classes="small" Content="{loc:Loc set.openFolder}"
Command="{Binding OpenDataFolderCommand}" />
</Grid>
<Grid ColumnDefinitions="*,Auto">
<TextBlock Classes="faint" Text="{Binding StatusMessage}" VerticalAlignment="Center" />
<Button Grid.Column="1" Classes="small" Content="{loc:Loc set.clearCache}"
Command="{Binding ClearCacheCommand}" />
</Grid>
</StackPanel>
</Border>
<!-- 关于 -->
<Border Classes="card" Padding="20,18">
<StackPanel Spacing="12">
<TextBlock Classes="h2" Text="{loc:Loc set.about}" />
<Grid ColumnDefinitions="200,*">
<TextBlock Classes="h3" Text="{loc:Loc set.version}" />
<TextBlock Grid.Column="1" Classes="muted" Text="{Binding VersionText}" />
</Grid>
<Grid ColumnDefinitions="200,*">
<TextBlock Classes="h3" Text="{loc:Loc set.platform}" />
<TextBlock Grid.Column="1" Classes="muted" Text="{Binding PlatformText}" TextWrapping="Wrap" />
</Grid>
<Grid ColumnDefinitions="200,*">
<TextBlock Classes="h3" Text="{loc:Loc set.modelFormat}" />
<TextBlock Grid.Column="1" Classes="muted" Text="{loc:Loc set.modelFormat.desc}" TextWrapping="Wrap" />
</Grid>
<Grid ColumnDefinitions="200,*">
<TextBlock Classes="h3" Text="{loc:Loc set.license}" />
<TextBlock Grid.Column="1" Classes="muted" Text="{loc:Loc set.licenseValue}" />
</Grid>
</StackPanel>
</Border>
</StackPanel>
</ScrollViewer>
</UserControl>