调整顺序
This commit is contained in:
@@ -75,24 +75,6 @@ namespace SpineViewer.Models
|
|||||||
|
|
||||||
#region 程序选项
|
#region 程序选项
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
private bool _autoRun;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
private string _autoRunWorkspaceConfigPath;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
private bool _wallpaperView;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
private bool _renderSelectedOnly;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
private bool _associateFileSuffix;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
private AppLanguage _appLanguage;
|
|
||||||
|
|
||||||
public RelayCommand Cmd_SelectAutoRunWorkspaceConfigPath => _cmd_SelectAutoRunWorkspaceConfigPath ??= new(() =>
|
public RelayCommand Cmd_SelectAutoRunWorkspaceConfigPath => _cmd_SelectAutoRunWorkspaceConfigPath ??= new(() =>
|
||||||
{
|
{
|
||||||
if (!DialogService.ShowOpenJsonDialog(out var fileName))
|
if (!DialogService.ShowOpenJsonDialog(out var fileName))
|
||||||
@@ -101,6 +83,24 @@ namespace SpineViewer.Models
|
|||||||
});
|
});
|
||||||
private RelayCommand? _cmd_SelectAutoRunWorkspaceConfigPath;
|
private RelayCommand? _cmd_SelectAutoRunWorkspaceConfigPath;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private AppLanguage _appLanguage;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool _renderSelectedOnly;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool _wallpaperView;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool _autoRun;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private string _autoRunWorkspaceConfigPath;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool _associateFileSuffix;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,12 +107,12 @@ namespace SpineViewer.ViewModels.MainWindow
|
|||||||
DebugPoints = DebugPoints,
|
DebugPoints = DebugPoints,
|
||||||
DebugClippings = DebugClippings,
|
DebugClippings = DebugClippings,
|
||||||
|
|
||||||
|
AppLanguage = AppLanguage,
|
||||||
|
RenderSelectedOnly = RenderSelectedOnly,
|
||||||
|
WallpaperView = WallpaperView,
|
||||||
AutoRun = AutoRun,
|
AutoRun = AutoRun,
|
||||||
AutoRunWorkspaceConfigPath = AutoRunWorkspaceConfigPath,
|
AutoRunWorkspaceConfigPath = AutoRunWorkspaceConfigPath,
|
||||||
WallpaperView = WallpaperView,
|
|
||||||
RenderSelectedOnly = RenderSelectedOnly,
|
|
||||||
AssociateFileSuffix = AssociateFileSuffix,
|
AssociateFileSuffix = AssociateFileSuffix,
|
||||||
AppLanguage = AppLanguage,
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
@@ -135,12 +135,12 @@ namespace SpineViewer.ViewModels.MainWindow
|
|||||||
DebugPoints = value.DebugPoints;
|
DebugPoints = value.DebugPoints;
|
||||||
DebugClippings = value.DebugClippings;
|
DebugClippings = value.DebugClippings;
|
||||||
|
|
||||||
|
AppLanguage = value.AppLanguage;
|
||||||
|
RenderSelectedOnly = value.RenderSelectedOnly;
|
||||||
|
WallpaperView = value.WallpaperView;
|
||||||
AutoRun = value.AutoRun;
|
AutoRun = value.AutoRun;
|
||||||
AutoRunWorkspaceConfigPath = value.AutoRunWorkspaceConfigPath;
|
AutoRunWorkspaceConfigPath = value.AutoRunWorkspaceConfigPath;
|
||||||
WallpaperView = value.WallpaperView;
|
|
||||||
RenderSelectedOnly = value.RenderSelectedOnly;
|
|
||||||
AssociateFileSuffix = value.AssociateFileSuffix;
|
AssociateFileSuffix = value.AssociateFileSuffix;
|
||||||
AppLanguage = value.AppLanguage;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -246,6 +246,24 @@ namespace SpineViewer.ViewModels.MainWindow
|
|||||||
|
|
||||||
public static ImmutableArray<AppLanguage> AppLanguageOptions { get; } = Enum.GetValues<AppLanguage>().ToImmutableArray();
|
public static ImmutableArray<AppLanguage> AppLanguageOptions { get; } = Enum.GetValues<AppLanguage>().ToImmutableArray();
|
||||||
|
|
||||||
|
public AppLanguage AppLanguage
|
||||||
|
{
|
||||||
|
get => ((App)App.Current).Language;
|
||||||
|
set => SetProperty(((App)App.Current).Language, value, v => ((App)App.Current).Language = v);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool RenderSelectedOnly
|
||||||
|
{
|
||||||
|
get => _vmMain.SFMLRendererViewModel.RenderSelectedOnly;
|
||||||
|
set => SetProperty(_vmMain.SFMLRendererViewModel.RenderSelectedOnly, value, v => _vmMain.SFMLRendererViewModel.RenderSelectedOnly = v);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool WallpaperView
|
||||||
|
{
|
||||||
|
get => _vmMain.SFMLRendererViewModel.WallpaperView;
|
||||||
|
set => SetProperty(_vmMain.SFMLRendererViewModel.WallpaperView, value, v => _vmMain.SFMLRendererViewModel.WallpaperView = v);
|
||||||
|
}
|
||||||
|
|
||||||
public bool AutoRun
|
public bool AutoRun
|
||||||
{
|
{
|
||||||
get => ((App)App.Current).AutoRun;
|
get => ((App)App.Current).AutoRun;
|
||||||
@@ -258,30 +276,12 @@ namespace SpineViewer.ViewModels.MainWindow
|
|||||||
set => SetProperty(_vmMain.AutoRunWorkspaceConfigPath, value, v => _vmMain.AutoRunWorkspaceConfigPath = v);
|
set => SetProperty(_vmMain.AutoRunWorkspaceConfigPath, value, v => _vmMain.AutoRunWorkspaceConfigPath = v);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool WallpaperView
|
|
||||||
{
|
|
||||||
get => _vmMain.SFMLRendererViewModel.WallpaperView;
|
|
||||||
set => SetProperty(_vmMain.SFMLRendererViewModel.WallpaperView, value, v => _vmMain.SFMLRendererViewModel.WallpaperView = v);
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool RenderSelectedOnly
|
|
||||||
{
|
|
||||||
get => _vmMain.SFMLRendererViewModel.RenderSelectedOnly;
|
|
||||||
set => SetProperty(_vmMain.SFMLRendererViewModel.RenderSelectedOnly, value, v => _vmMain.SFMLRendererViewModel.RenderSelectedOnly = v);
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool AssociateFileSuffix
|
public bool AssociateFileSuffix
|
||||||
{
|
{
|
||||||
get => ((App)App.Current).AssociateFileSuffix;
|
get => ((App)App.Current).AssociateFileSuffix;
|
||||||
set => SetProperty(((App)App.Current).AssociateFileSuffix, value, v => ((App)App.Current).AssociateFileSuffix = v);
|
set => SetProperty(((App)App.Current).AssociateFileSuffix, value, v => ((App)App.Current).AssociateFileSuffix = v);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AppLanguage AppLanguage
|
|
||||||
{
|
|
||||||
get => ((App)App.Current).Language;
|
|
||||||
set => SetProperty(((App)App.Current).Language, value, v => ((App)App.Current).Language = v);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,9 +203,10 @@
|
|||||||
<ColumnDefinition Width="Auto" SharedSizeGroup="LabelCol"/>
|
<ColumnDefinition Width="Auto" SharedSizeGroup="LabelCol"/>
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Label Content="{DynamicResource Str_AutoRun}"/>
|
<Label Content="{DynamicResource Str_Language}"/>
|
||||||
<ToggleButton Grid.Column="1"
|
<ComboBox Grid.Column="1"
|
||||||
IsChecked="{Binding AutoRun}"/>
|
SelectedItem="{Binding AppLanguage}"
|
||||||
|
ItemsSource="{x:Static vm:PreferenceViewModel.AppLanguageOptions}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
@@ -213,16 +214,9 @@
|
|||||||
<ColumnDefinition Width="Auto" SharedSizeGroup="LabelCol"/>
|
<ColumnDefinition Width="Auto" SharedSizeGroup="LabelCol"/>
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Label Content="{DynamicResource Str_AutoRunWorkspaceConfigPath}"
|
<Label Content="{DynamicResource Str_RenderSelectedOnly}"/>
|
||||||
ToolTip="{DynamicResource Str_AutoRunWorkspaceConfigPathTooltip}"/>
|
<ToggleButton Grid.Column="1"
|
||||||
<DockPanel Grid.Column="1">
|
IsChecked="{Binding RenderSelectedOnly}"/>
|
||||||
<Button DockPanel.Dock="Right"
|
|
||||||
Content="..."
|
|
||||||
Command="{Binding Cmd_SelectAutoRunWorkspaceConfigPath}"/>
|
|
||||||
<TextBox Grid.Column="1"
|
|
||||||
Text="{Binding AutoRunWorkspaceConfigPath}"
|
|
||||||
ToolTip="{DynamicResource Str_AutoRunWorkspaceConfigPathTooltip}"/>
|
|
||||||
</DockPanel>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
@@ -240,9 +234,26 @@
|
|||||||
<ColumnDefinition Width="Auto" SharedSizeGroup="LabelCol"/>
|
<ColumnDefinition Width="Auto" SharedSizeGroup="LabelCol"/>
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Label Content="{DynamicResource Str_RenderSelectedOnly}"/>
|
<Label Content="{DynamicResource Str_AutoRun}"/>
|
||||||
<ToggleButton Grid.Column="1"
|
<ToggleButton Grid.Column="1"
|
||||||
IsChecked="{Binding RenderSelectedOnly}"/>
|
IsChecked="{Binding AutoRun}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto" SharedSizeGroup="LabelCol"/>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Content="{DynamicResource Str_AutoRunWorkspaceConfigPath}"
|
||||||
|
ToolTip="{DynamicResource Str_AutoRunWorkspaceConfigPathTooltip}"/>
|
||||||
|
<DockPanel Grid.Column="1" IsEnabled="{Binding AutoRun}">
|
||||||
|
<Button DockPanel.Dock="Right"
|
||||||
|
Content="..."
|
||||||
|
Command="{Binding Cmd_SelectAutoRunWorkspaceConfigPath}"/>
|
||||||
|
<TextBox Grid.Column="1"
|
||||||
|
Text="{Binding AutoRunWorkspaceConfigPath}"
|
||||||
|
ToolTip="{DynamicResource Str_AutoRunWorkspaceConfigPathTooltip}"/>
|
||||||
|
</DockPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
@@ -254,17 +265,6 @@
|
|||||||
<ToggleButton Grid.Column="1"
|
<ToggleButton Grid.Column="1"
|
||||||
IsChecked="{Binding AssociateFileSuffix}"/>
|
IsChecked="{Binding AssociateFileSuffix}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto" SharedSizeGroup="LabelCol"/>
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Label Content="{DynamicResource Str_Language}"/>
|
|
||||||
<ComboBox Grid.Column="1"
|
|
||||||
SelectedItem="{Binding AppLanguage}"
|
|
||||||
ItemsSource="{x:Static vm:PreferenceViewModel.AppLanguageOptions}"/>
|
|
||||||
</Grid>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
Reference in New Issue
Block a user