feat(ui): ログ出力のバッチフラッシュ化・全体プログレス表示およびUI連携の改善
- ログ出力を ConcurrentQueue によるキューイングとタイマーによるバッチフラッシュ方式へ移行し、大量ログ出力時のUIフリーズを防止 - ログテキストボックスの文字数制限(10万文字超過時のトリム)を導入しメモリ肥大化を抑制 - ステータスバーに全体処理用プログレスバー(pbGlobalProgress)を追加 - EVB要解凍バッジおよびその他エンジンバッジのXAMLバインディング連携を整理 - セーブエディタ・ウディタ・SRPG Studio等の各種操作後に SaveBookmarks を呼び出すよう保存処理を補完
This commit is contained in:
1 parent
cfdba6806a
commit
751e382adc
2 files changed
+383
-387
No files matched your search
+209
-377
@@ -1,4 +1,4 @@
|
||||
<Window x:Class="GameLauncher.MainWindow"
|
||||
<Window x:Class="GameLauncher.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
@@ -360,16 +360,16 @@
|
||||
</Border>
|
||||
|
||||
<!-- ================= ナビゲーションタブ & フィルターバー ================= -->
|
||||
<Border Grid.Row="1" Background="#181824" BorderBrush="{StaticResource BorderBrushColor}" BorderThickness="0,0,0,1" Padding="14,8">
|
||||
<Border Grid.Row="1" Background="#181824" BorderBrush="{StaticResource BorderBrushColor}" BorderThickness="0,0,0,1" Padding="14,6">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/> <!-- 1行目: ゲームの種類セレクター -->
|
||||
<RowDefinition Height="Auto"/> <!-- 2行目: チェックボックス条件部分 -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- エンジンの種類セレクター(全エンジン常時表示ピル型タブ) -->
|
||||
<Border Grid.Column="0" Background="#12121A" CornerRadius="8" Padding="3" Margin="0,0,14,0" BorderBrush="#303040" BorderThickness="1">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<!-- 1行目: エンジンの種類セレクター(全エンジン常時表示ピル型タブ) -->
|
||||
<Border Grid.Row="0" Background="#12121A" CornerRadius="8" Padding="3" Margin="0,0,0,6" BorderBrush="#303040" BorderThickness="1" HorizontalAlignment="Left">
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<RadioButton x:Name="tabAll" Style="{StaticResource NavTabRadioButton}" Content="すべて" ToolTip="すべて" IsChecked="True" GroupName="MainEngineTabs" Checked="EngineTab_Checked" Padding="9,5"/>
|
||||
<RadioButton x:Name="tabMV" Style="{StaticResource NavTabRadioButton}" Content="MV" ToolTip="ツクールMV" GroupName="MainEngineTabs" Checked="EngineTab_Checked" Padding="9,5"/>
|
||||
<RadioButton x:Name="tabMZ" Style="{StaticResource NavTabRadioButton}" Content="MZ" ToolTip="ツクールMZ" GroupName="MainEngineTabs" Checked="EngineTab_Checked" Padding="9,5"/>
|
||||
@@ -380,13 +380,14 @@
|
||||
<RadioButton x:Name="tabSrpg" Style="{StaticResource NavTabRadioButton}" Content="SRPG" ToolTip="SRPG Studio" GroupName="MainEngineTabs" Checked="EngineTab_Checked" Padding="9,5"/>
|
||||
<RadioButton x:Name="tabUnity" Style="{StaticResource NavTabRadioButton}" Content="Unity" ToolTip="Unity" GroupName="MainEngineTabs" Checked="EngineTab_Checked" Padding="9,5"/>
|
||||
<RadioButton x:Name="tabNwjs" Style="{StaticResource NavTabRadioButton}" Content="NW.js" ToolTip="NW.js" GroupName="MainEngineTabs" Checked="EngineTab_Checked" Padding="9,5"/>
|
||||
</StackPanel>
|
||||
<RadioButton x:Name="tabOther" Style="{StaticResource NavTabRadioButton}" Content="その他" ToolTip="その他(エンジン不問)" GroupName="MainEngineTabs" Checked="EngineTab_Checked" Padding="9,5"/>
|
||||
</WrapPanel>
|
||||
</Border>
|
||||
|
||||
<!-- サブフィルター群(状態・形式の追加絞り込み) -->
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<!-- 2行目: サブフィルター群(状態・形式の追加絞り込みチェックボックス) -->
|
||||
<WrapPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<!-- ブックマークのみ絞り込み -->
|
||||
<CheckBox x:Name="chkFilterBookmarkedOnly" Content="★ ブックマークのみ" Margin="0,0,12,0" Foreground="#FFEAA7" FontWeight="Bold" Checked="FilterChanged" Unchecked="FilterChanged"/>
|
||||
<CheckBox x:Name="chkFilterBookmarkedOnly" Content="★ ブックマークのみ" Margin="0,0,14,0" Foreground="#FFEAA7" FontWeight="Bold" Checked="FilterChanged" Unchecked="FilterChanged"/>
|
||||
|
||||
<!-- Unityバックエンド切り替え(Unityタブ選択時のみ表示) -->
|
||||
<StackPanel x:Name="pnlUnityBackendFilter" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,12,0" Visibility="Collapsed">
|
||||
@@ -397,12 +398,12 @@
|
||||
</StackPanel>
|
||||
|
||||
<!-- 全体共通詳細チェックボックス -->
|
||||
<CheckBox x:Name="chkFilterModdedOnly" Content="改造中のみ" Margin="0,0,10,0" Foreground="{StaticResource TextSecondary}" Checked="FilterChanged" Unchecked="FilterChanged"/>
|
||||
<CheckBox x:Name="chkFilterAsarOnly" Content="ASAR形式のみ" Margin="0,0,10,0" Foreground="{StaticResource TextSecondary}" Checked="FilterChanged" Unchecked="FilterChanged"/>
|
||||
<CheckBox x:Name="chkFilterRgssOnly" Content="RGSSアーカイブのみ" Margin="0,0,10,0" Foreground="{StaticResource TextSecondary}" Checked="FilterChanged" Unchecked="FilterChanged"/>
|
||||
<CheckBox x:Name="chkFilterSrpgOnly" Content="data.dtsのみ" Margin="0,0,10,0" Foreground="{StaticResource TextSecondary}" Checked="FilterChanged" Unchecked="FilterChanged"/>
|
||||
<CheckBox x:Name="chkFilterSaveOnly" Content="セーブありのみ" Margin="0,0,10,0" Foreground="{StaticResource TextSecondary}" Checked="FilterChanged" Unchecked="FilterChanged"/>
|
||||
</StackPanel>
|
||||
<CheckBox x:Name="chkFilterModdedOnly" Content="改造中のみ" Margin="0,0,12,0" Foreground="{StaticResource TextSecondary}" Checked="FilterChanged" Unchecked="FilterChanged"/>
|
||||
<CheckBox x:Name="chkFilterAsarOnly" Content="ASAR形式のみ" Margin="0,0,12,0" Foreground="{StaticResource TextSecondary}" Checked="FilterChanged" Unchecked="FilterChanged"/>
|
||||
<CheckBox x:Name="chkFilterRgssOnly" Content="RGSSアーカイブのみ" Margin="0,0,12,0" Foreground="{StaticResource TextSecondary}" Checked="FilterChanged" Unchecked="FilterChanged"/>
|
||||
<CheckBox x:Name="chkFilterSrpgOnly" Content="data.dtsのみ" Margin="0,0,12,0" Foreground="{StaticResource TextSecondary}" Checked="FilterChanged" Unchecked="FilterChanged"/>
|
||||
<CheckBox x:Name="chkFilterSaveOnly" Content="セーブありのみ" Margin="0,0,12,0" Foreground="{StaticResource TextSecondary}" Checked="FilterChanged" Unchecked="FilterChanged"/>
|
||||
</WrapPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
@@ -431,6 +432,7 @@
|
||||
|
||||
<!-- ツクール専用メニュー項目 -->
|
||||
<MenuItem x:Name="menuTkoolOpenFolder" Header="📁 ゲームフォルダを開く" Click="MenuOpenFolder_Click"/>
|
||||
<MenuItem x:Name="menuTkoolRepairResources" Header="🔧 リソース文字化け・エンコード修復" Click="MenuRepairResources_Click"/>
|
||||
<MenuItem x:Name="menuTkoolOpenProfile" Header="📂 プロファイルフォルダを開く" Click="MenuOpenProfileFolder_Click"/>
|
||||
<MenuItem x:Name="menuTkoolOpenPluginsJs" Header="📄 plugins.js を開く" Click="MenuOpenPluginsJs_Click"/>
|
||||
<MenuItem x:Name="menuTkoolRestoreOriginal" Header="↩ 改造を解除してオリジナルに復元" Click="MenuRestoreOriginal_Click"/>
|
||||
@@ -481,16 +483,15 @@
|
||||
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type models:GameItemBase}">
|
||||
<Grid>
|
||||
<Grid Margin="4,2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="52"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/> <!-- アイコン -->
|
||||
<ColumnDefinition Width="*"/> <!-- タイトル・フォルダ・バッジ・日付・ブックマーク -->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- ゲームアイコン -->
|
||||
<Border Grid.Column="0" Width="44" Height="44" CornerRadius="6" Background="#16161E"
|
||||
BorderBrush="#303040" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Center">
|
||||
BorderBrush="#303040" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0,0,10,0">
|
||||
<Grid>
|
||||
<TextBlock Text="🎮" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="0.4"
|
||||
Visibility="{Binding IconImage, Converter={x:Static helpers:NullToVisibleConverter.Instance}}"/>
|
||||
@@ -498,263 +499,173 @@
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- タイトル・ブックマーク・フォルダ名・日付 -->
|
||||
<StackPanel Grid.Column="1" VerticalAlignment="Center" Margin="10,0,10,0">
|
||||
<DockPanel LastChildFill="True">
|
||||
<Button DockPanel.Dock="Right" Style="{StaticResource ModernButton}"
|
||||
Padding="6,1" Margin="6,0,0,0" VerticalAlignment="Center"
|
||||
Content="{Binding BookmarkIcon}" Foreground="{Binding BookmarkBrush}"
|
||||
ToolTip="{Binding BookmarkTooltip}" FontSize="13" FontWeight="Bold"
|
||||
Click="btnCardBookmark_Click" Focusable="False"/>
|
||||
<TextBlock Text="{Binding Title}" FontSize="14" FontWeight="SemiBold"
|
||||
Foreground="{StaticResource TextPrimary}" TextTrimming="CharacterEllipsis"/>
|
||||
</DockPanel>
|
||||
<Grid Margin="0,3,0,0">
|
||||
<!-- メイン情報(右側2行構成) -->
|
||||
<Grid Grid.Column="1" VerticalAlignment="Center">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/> <!-- 1行目: タイトル + [ラベル群] + [ブックマーク] -->
|
||||
<RowDefinition Height="Auto"/> <!-- 2行目: フォルダ名 + [更新日時] + [最終起動日時] -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- 1行目: タイトル(左詰め) & ラベル群+ブックマーク(右寄せ) -->
|
||||
<Grid Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- タイトル -->
|
||||
<TextBlock Grid.Column="0" Text="{Binding Title}" FontSize="14" FontWeight="SemiBold"
|
||||
Foreground="{StaticResource TextPrimary}" TextTrimming="CharacterEllipsis"
|
||||
VerticalAlignment="Center" Margin="0,0,8,0"/>
|
||||
|
||||
<!-- ラベル群(ブックマークの左側に配置) & ブックマークボタン(右端) -->
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right">
|
||||
<!-- エンジン種別バッジ (エンジン文字列が空なら非表示) -->
|
||||
<Border Background="{Binding EngineLabelBackground}" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding EngineLabelText, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}}">
|
||||
<TextBlock Text="{Binding EngineLabelText}" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- SRPG アーカイブバッジ (文字が空なら非表示) -->
|
||||
<Border Background="{Binding SrpgBadgeBackground}" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding SrpgBadgeText, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}}">
|
||||
<TextBlock Text="{Binding SrpgBadgeText}" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- NW.jsバッジ (文字が空なら非表示) -->
|
||||
<Border Background="{StaticResource BadgeNwjsBg}" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding NwjsBadgeVisibility}">
|
||||
<TextBlock Text="NW.js" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- その他バッジ (文字が空なら非表示) -->
|
||||
<Border Background="#57606F" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding OtherBadgeVisibility}">
|
||||
<TextBlock Text="その他" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- IL2CPPバッジ -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Background" Value="{StaticResource BadgeIl2cppBg}"/>
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsIL2CPP}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="IL2CPP" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- Monoバッジ -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Background" Value="{StaticResource BadgeMonoBg}"/>
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsMono}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="Mono" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- ASARバッジ (文字が空なら非表示) -->
|
||||
<Border Background="{Binding AsarBadgeBackground}" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding AsarBadgeText, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}}">
|
||||
<TextBlock Text="{Binding AsarBadgeText}" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- RGSSアーカイブバッジ (文字が空なら非表示) -->
|
||||
<Border Background="{Binding RgssBadgeBackground}" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding RgssBadgeText, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}}">
|
||||
<TextBlock Text="{Binding RgssBadgeText}" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- EVB バッジ (文字が空なら非表示) -->
|
||||
<Border Background="#6C5CE7" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
ToolTip="Enigma Virtual Box でパックされています。選択して「📦 EVBを解凍」を押してください。"
|
||||
Visibility="{Binding EvbBadgeText, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}}">
|
||||
<TextBlock Text="{Binding EvbBadgeText}" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- EVB 要解凍バッジ (文字が空なら非表示) -->
|
||||
<Border Background="#FDCB6E" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
ToolTip="選択して「📦 EVBを解凍」を押すと、同梱の evbunpack で解凍できます。"
|
||||
Visibility="{Binding EvbNeedsUnpackBadgeText, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}}">
|
||||
<TextBlock Text="{Binding EvbNeedsUnpackBadgeText}" FontSize="10" FontWeight="Bold" Foreground="#3A2A00"/>
|
||||
</Border>
|
||||
|
||||
<!-- EVB 解凍済みバッジ (文字が空なら非表示) -->
|
||||
<Border Background="#00B894" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
ToolTip="EVB は解凍済みです。解凍後の exe で起動し、改造も解凍先フォルダへ適用されます。"
|
||||
Visibility="{Binding EvbExtractedBadgeText, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}}">
|
||||
<TextBlock Text="{Binding EvbExtractedBadgeText}" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- 改造適用中インジケータ -->
|
||||
<Border Background="{StaticResource BadgeModdedBg}" CornerRadius="4" Padding="6,2" Margin="0,0,6,0">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsModded}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="改造適用中" FontSize="10" FontWeight="SemiBold" Foreground="#FFDEAA"/>
|
||||
</Border>
|
||||
|
||||
<!-- セーブデータありインジケータ -->
|
||||
<Border Background="{StaticResource BadgeSaveBg}" CornerRadius="4" Padding="6,2" Margin="0,0,6,0">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding HasSaveData}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="💾 セーブあり" FontSize="10" FontWeight="SemiBold" Foreground="#81ECEC"/>
|
||||
</Border>
|
||||
|
||||
<!-- ブックマークボタン(右端) -->
|
||||
<Button Style="{StaticResource ModernButton}"
|
||||
Padding="6,1" Margin="2,0,0,0" VerticalAlignment="Center"
|
||||
Content="{Binding BookmarkIcon}" Foreground="{Binding BookmarkBrush}"
|
||||
ToolTip="{Binding BookmarkTooltip}" FontSize="13" FontWeight="Bold"
|
||||
Click="btnCardBookmark_Click" Focusable="False"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- 2行目: フォルダ名(左詰め) & 日付表示部分(右寄せ: 1行目のブックマークと右端がピッタリ揃う) -->
|
||||
<Grid Grid.Row="1" Margin="0,4,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- フォルダ名 -->
|
||||
<TextBlock Grid.Column="0" Text="{Binding FolderName}" FontSize="11" Foreground="{StaticResource TextSecondary}"
|
||||
TextTrimming="CharacterEllipsis"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding FolderLastModifiedCardDisplay}" FontSize="11" Foreground="#FAB1A0"
|
||||
Margin="8,0,0,0"/>
|
||||
<TextBlock Grid.Column="2" Text="{Binding LastLaunchedCardDisplay}" FontSize="11" Foreground="#81ECEC"
|
||||
Margin="8,0,0,0"/>
|
||||
TextTrimming="CharacterEllipsis" VerticalAlignment="Center" Margin="0,0,8,0"/>
|
||||
|
||||
<!-- 日付表示部分(右寄せ) -->
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right">
|
||||
<TextBlock Text="{Binding FolderLastModifiedCardDisplay}" FontSize="11" Foreground="#FAB1A0" Margin="0,0,8,0"/>
|
||||
<TextBlock Text="{Binding LastLaunchedCardDisplay}" FontSize="11" Foreground="#81ECEC"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
<!-- バッジ群(ツクール / Unity 双方の種別バッジ) -->
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<!-- MVバッジ -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Background" Value="{StaticResource BadgeMvBg}"/>
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsMV}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="MV" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- MZバッジ -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Background" Value="{StaticResource BadgeMzBg}"/>
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsMZ}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="MZ" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- VX Aceバッジ -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Background" Value="{StaticResource BadgeVxAceBg}"/>
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsVXAce}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="VX Ace" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- VXバッジ -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Background" Value="{StaticResource BadgeVxBg}"/>
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsVX}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="VX" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- ティラノバッジ -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Background" Value="{StaticResource BadgeTyranoBg}"/>
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsTyrano}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="ティラノ" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- ウディタバッジ -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Background" Value="{StaticResource BadgeWolfBg}"/>
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsWolf}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="ウディタ" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- SRPG Studioバッジ -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Background" Value="{StaticResource BadgeSrpgBg}"/>
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsSrpgStudio}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="SRPG" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- SRPG アーカイブバッジ -->
|
||||
<Border Background="{Binding SrpgBadgeBackground}" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding SrpgBadgeVisibility}">
|
||||
<TextBlock Text="{Binding SrpgBadgeText}" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- NW.jsバッジ -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Background" Value="{StaticResource BadgeNwjsBg}"/>
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsNwjs}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="NW.js" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- IL2CPPバッジ -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Background" Value="{StaticResource BadgeIl2cppBg}"/>
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsIL2CPP}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="IL2CPP" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- Monoバッジ -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Background" Value="{StaticResource BadgeMonoBg}"/>
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsMono}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="Mono" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- ASARバッジ(ツクール専用) -->
|
||||
<Border Background="{Binding AsarBadgeBackground}" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding AsarBadgeVisibility}">
|
||||
<TextBlock Text="{Binding AsarBadgeText}" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- RGSSアーカイブバッジ(ツクールVX専用) -->
|
||||
<Border Background="{Binding RgssBadgeBackground}" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding RgssBadgeVisibility}">
|
||||
<TextBlock Text="{Binding RgssBadgeText}" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- Enigma Virtual Box (EVB) バッジ -->
|
||||
<Border Background="#6C5CE7" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
ToolTip="Enigma Virtual Box でパックされています。選択して「📦 EVBを解凍」を押してください。"
|
||||
Visibility="{Binding EvbBadgeVisibility}">
|
||||
<TextBlock Text="{Binding EvbBadgeText}" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- EVB 未解凍のときだけ「要解凍」を強調表示(一目で分かる導線) -->
|
||||
<Border Background="#FDCB6E" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
ToolTip="選択して「📦 EVBを解凍」を押すと、同梱の evbunpack で解凍できます。"
|
||||
Visibility="{Binding EvbNeedsUnpackVisibility}">
|
||||
<TextBlock Text="要解凍" FontSize="10" FontWeight="Bold" Foreground="#3A2A00"/>
|
||||
</Border>
|
||||
|
||||
<!-- EVB 解凍済みのときだけ「解凍済み」を表示(一目で分かる導線) -->
|
||||
<Border Background="#00B894" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
ToolTip="EVB は解凍済みです。解凍後の exe で起動し、改造も解凍先フォルダへ適用されます。"
|
||||
Visibility="{Binding EvbExtractedVisibility}">
|
||||
<TextBlock Text="{Binding EvbExtractedBadgeText}" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- 改造適用中インジケータ(ツクール専用) -->
|
||||
<Border Background="{StaticResource BadgeModdedBg}" CornerRadius="4" Padding="6,2" Margin="0,0,6,0">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsModded}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="改造適用中" FontSize="10" FontWeight="SemiBold" Foreground="#FFDEAA"/>
|
||||
</Border>
|
||||
|
||||
<!-- セーブデータありインジケータ(Unity専用) -->
|
||||
<Border Background="{StaticResource BadgeSaveBg}" CornerRadius="4" Padding="6,2">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding HasSaveData}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="💾 セーブあり" FontSize="10" FontWeight="SemiBold" Foreground="#81ECEC"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
@@ -830,114 +741,27 @@
|
||||
|
||||
<!-- 種別バッジライン -->
|
||||
<WrapPanel Orientation="Horizontal" Margin="0,4,0,0">
|
||||
<!-- ツクールMVバッジ -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0" Background="{StaticResource BadgeMvBg}">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedItem.IsMV, ElementName=lstGames}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="RPGツクールMV" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
<!-- エンジン種別バッジ (エンジン文字列が空なら非表示) -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0" Background="{Binding SelectedItem.EngineLabelBackground, ElementName=lstGames}"
|
||||
Visibility="{Binding SelectedItem.EngineLabelText, ElementName=lstGames, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}}">
|
||||
<TextBlock Text="{Binding SelectedItem.EngineLabelText, ElementName=lstGames}" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- ツクールMZバッジ -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0" Background="{StaticResource BadgeMzBg}">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedItem.IsMZ, ElementName=lstGames}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="RPGツクールMZ" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- ツクールVXバッジ -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0" Background="{StaticResource BadgeVxBg}">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedItem.IsVX, ElementName=lstGames}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="RPGツクールVX" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- ツクールVX Aceバッジ -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0" Background="{StaticResource BadgeVxAceBg}">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedItem.IsVXAce, ElementName=lstGames}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="RPGツクールVX Ace" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- ティラノバッジ -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0" Background="{StaticResource BadgeTyranoBg}">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedItem.IsTyrano, ElementName=lstGames}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="ティラノスクリプト" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- ウディタバッジ -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0" Background="{StaticResource BadgeWolfBg}">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedItem.IsWolf, ElementName=lstGames}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="WOLF RPGエディター" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- NW.jsバッジ -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0" Background="{StaticResource BadgeNwjsBg}">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedItem.IsNwjs, ElementName=lstGames}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<!-- NW.jsバッジ (文字が空なら非表示) -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0" Background="{StaticResource BadgeNwjsBg}"
|
||||
Visibility="{Binding SelectedItem.NwjsBadgeVisibility, ElementName=lstGames}">
|
||||
<TextBlock Text="NW.js" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- Unityバックエンドバッジ -->
|
||||
<!-- その他バッジ (文字が空なら非表示) -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0" Background="#57606F"
|
||||
Visibility="{Binding SelectedItem.OtherBadgeVisibility, ElementName=lstGames}">
|
||||
<TextBlock Text="その他" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- Unityバックエンドバッジ (文字が空なら非表示) -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0" Background="{StaticResource BadgeIl2cppBg}"
|
||||
Visibility="{Binding SelectedItem, ElementName=lstGames, Converter={x:Static helpers:IsUnityToVisibilityConverter.Instance}}">
|
||||
Visibility="{Binding SelectedItem.BackendBadgeText, ElementName=lstGames, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}}">
|
||||
<TextBlock Text="{Binding SelectedItem.BackendBadgeText, ElementName=lstGames}" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
@@ -1552,6 +1376,7 @@
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center">
|
||||
@@ -1559,7 +1384,14 @@
|
||||
<TextBlock x:Name="lblStatusBreakdown" Text=" (ツクール: 0, ティラノ: 0, Unity: 0)" FontSize="11" Foreground="#7D6DF8" Margin="8,0,0,0"/>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock x:Name="lblStatusEngine" Grid.Column="1" Text="待機中" FontSize="12" Foreground="{StaticResource TextSecondary}" VerticalAlignment="Center"/>
|
||||
<!-- 処理中プログレス表示エリア -->
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center" Margin="10,0,16,0">
|
||||
<ProgressBar x:Name="pbGlobalProgress" Width="150" Height="8" Minimum="0" Maximum="100" Visibility="Collapsed"
|
||||
Background="#222233" Foreground="{StaticResource AccentPrimary}" BorderThickness="0" Margin="0,0,8,0"/>
|
||||
<TextBlock x:Name="lblGlobalProgressText" Text="" FontSize="11" Foreground="{StaticResource AccentGreen}" VerticalAlignment="Center" Visibility="Collapsed"/>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock x:Name="lblStatusEngine" Grid.Column="2" Text="待機中" FontSize="12" Foreground="{StaticResource TextSecondary}" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
+174
-10
@@ -5,6 +5,7 @@ using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Encodings.Web;
|
||||
using System.Text.Json;
|
||||
using System.Threading;
|
||||
@@ -45,6 +46,7 @@ namespace GameLauncher
|
||||
private readonly SrpgArchiveService _srpgArchiveService = new();
|
||||
private readonly SrpgModService _srpgModService = new();
|
||||
private readonly WindowResizeService _windowResizeService = new();
|
||||
private readonly TkoolResourceRepairService _tkoolResourceRepairService = new();
|
||||
|
||||
/// <summary>直近に起動したゲームプロセス(起動後の外部連携処理で使用)</summary>
|
||||
private Process? _lastStartedProcess;
|
||||
@@ -59,6 +61,8 @@ namespace GameLauncher
|
||||
private readonly string _configFilePath;
|
||||
private LauncherConfig _config = new();
|
||||
private bool _isInitialized;
|
||||
private readonly System.Collections.Concurrent.ConcurrentQueue<string> _logQueue = new();
|
||||
private System.Windows.Threading.DispatcherTimer? _logFlushTimer;
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
@@ -79,6 +83,14 @@ namespace GameLauncher
|
||||
|
||||
_isInitialized = true;
|
||||
|
||||
// ログの非同期バッファリング更新タイマー(100ms周期で一括フラッシュしUI負荷をゼロ化)
|
||||
this._logFlushTimer = new System.Windows.Threading.DispatcherTimer
|
||||
{
|
||||
Interval = TimeSpan.FromMilliseconds(100)
|
||||
};
|
||||
this._logFlushTimer.Tick += (s, e) => this.FlushLogQueue();
|
||||
this._logFlushTimer.Start();
|
||||
|
||||
// ウィンドウ描画後に初期処理(即時一覧作成&裏での更新監視)を開始
|
||||
ContentRendered += MainWindow_ContentRendered;
|
||||
Closing += MainWindow_Closing;
|
||||
@@ -137,6 +149,7 @@ namespace GameLauncher
|
||||
case 7: tabWolf.IsChecked = true; break;
|
||||
case 8: tabSrpg.IsChecked = true; break;
|
||||
case 9: tabNwjs.IsChecked = true; break;
|
||||
case 10: tabOther.IsChecked = true; break;
|
||||
default: tabAll.IsChecked = true; break;
|
||||
}
|
||||
|
||||
@@ -175,6 +188,7 @@ namespace GameLauncher
|
||||
else if (tabWolf.IsChecked == true) tabIndex = 7;
|
||||
else if (tabSrpg.IsChecked == true) tabIndex = 8;
|
||||
else if (tabNwjs.IsChecked == true) tabIndex = 9;
|
||||
else if (tabOther.IsChecked == true) tabIndex = 10;
|
||||
|
||||
_config.SelectedTab = tabIndex;
|
||||
_config.UnityBackendFilter = rbUnityIL2CPP.IsChecked == true ? "IL2CPP" : (rbUnityMono.IsChecked == true ? "Mono" : "All");
|
||||
@@ -377,14 +391,16 @@ namespace GameLauncher
|
||||
{
|
||||
_scannedCountSinceLastSave = 0;
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
await _scannerService.ScanDirectoriesAsync(targetDirs, progress, _scannedPaths, ct);
|
||||
|
||||
// キャッシュの最終同期
|
||||
// キャッシュの最終同期(削除されたゲームのブックマークもここで除去する)
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
lblStatusEngine.Text = "準備完了";
|
||||
lblLogActivity.Text = "";
|
||||
AppendLog($"スキャンが完了しました。総ゲーム数: {_games.Count} 件。");
|
||||
@@ -421,6 +437,7 @@ namespace GameLauncher
|
||||
_scanCts?.Cancel();
|
||||
SaveConfig();
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -491,6 +508,10 @@ namespace GameLauncher
|
||||
{
|
||||
if (game is not TkoolGameItem tg || tg.EngineType != TkoolEngineType.Nwjs) return false;
|
||||
}
|
||||
else if (tabOther.IsChecked == true)
|
||||
{
|
||||
if (!game.IsOther) return false;
|
||||
}
|
||||
|
||||
// 3. 追加属性フィルター(全タブ共通)
|
||||
if (chkFilterBookmarkedOnly.IsChecked == true && !game.IsBookmarked) return false;
|
||||
@@ -556,17 +577,18 @@ namespace GameLauncher
|
||||
|
||||
int total = _games.Count;
|
||||
int visible = _gamesView?.Count ?? 0;
|
||||
int tkoolCount = _games.Count(g => g is TkoolGameItem tg && tg.EngineType != TkoolEngineType.Tyrano && !tg.IsRgss && !tg.IsWolf && !tg.IsSrpgStudio && !tg.IsNwjs);
|
||||
int tkoolCount = _games.Count(g => g is TkoolGameItem tg && tg.EngineType != TkoolEngineType.Tyrano && !tg.IsRgss && !tg.IsWolf && !tg.IsSrpgStudio && !tg.IsNwjs && !tg.IsOther);
|
||||
int rgssCount = _games.Count(g => g is TkoolGameItem tg && tg.IsRgss);
|
||||
int tyranoCount = _games.Count(g => g is TkoolGameItem tg && tg.EngineType == TkoolEngineType.Tyrano);
|
||||
int wolfCount = _games.Count(g => g is TkoolGameItem tg && tg.IsWolf);
|
||||
int srpgCount = _games.Count(g => g is TkoolGameItem tg && tg.IsSrpgStudio);
|
||||
int nwjsCount = _games.Count(g => g is TkoolGameItem tg && tg.IsNwjs);
|
||||
int unityCount = _games.Count(g => g is UnityGameItem);
|
||||
int otherCount = _games.Count(g => g.IsOther);
|
||||
int bookmarkCount = _games.Count(g => g.IsBookmarked);
|
||||
|
||||
lblStatusSummary.Text = $"総ゲーム数: {total} 件 | 表示: {visible} 件 | ★ ブックマーク: {bookmarkCount} 件";
|
||||
lblStatusBreakdown.Text = $"(ツクールMV/MZ: {tkoolCount}, ツクールVX系: {rgssCount}, ティラノ: {tyranoCount}, ウディタ: {wolfCount}, SRPG Studio: {srpgCount}, NW.js: {nwjsCount}, Unity: {unityCount})";
|
||||
lblStatusBreakdown.Text = $"(ツクールMV/MZ: {tkoolCount}, ツクールVX系: {rgssCount}, ティラノ: {tyranoCount}, ウディタ: {wolfCount}, SRPG Studio: {srpgCount}, NW.js: {nwjsCount}, Unity: {unityCount}, その他: {otherCount})";
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -645,6 +667,17 @@ namespace GameLauncher
|
||||
? tkoolItem.ResolveLaunchExecutable()
|
||||
: game.ExecutablePath;
|
||||
|
||||
// 直下にexeが無い場合やパスが変わっていた場合はサブフォルダ内を再探索して救済
|
||||
if (string.IsNullOrEmpty(effectiveExe) || !File.Exists(effectiveExe))
|
||||
{
|
||||
var foundExe = GameScannerService.FindGameExecutable(game.RootDirectory);
|
||||
if (!string.IsNullOrEmpty(foundExe) && File.Exists(foundExe))
|
||||
{
|
||||
effectiveExe = foundExe;
|
||||
game.ExecutablePath = foundExe;
|
||||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(effectiveExe) || !File.Exists(effectiveExe))
|
||||
{
|
||||
MessageBox.Show($"実行ファイルが見つかりません:\n{effectiveExe}", "起動エラー", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
@@ -662,6 +695,10 @@ namespace GameLauncher
|
||||
{
|
||||
LaunchUnityGame(ug);
|
||||
}
|
||||
else
|
||||
{
|
||||
StartGameProcess(game);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -772,6 +809,11 @@ namespace GameLauncher
|
||||
AppendLog($"[ティラノ復元] {tg.Title}: {msg}");
|
||||
}
|
||||
}
|
||||
// その他のゲーム(ツクール以外のゲーム)
|
||||
else if (tg.IsOther)
|
||||
{
|
||||
AppendLog($"[その他起動] {tg.Title} を起動します...");
|
||||
}
|
||||
// スクリプト改造の適用または復元(ツクールMV/MZ)
|
||||
else
|
||||
{
|
||||
@@ -806,6 +848,18 @@ namespace GameLauncher
|
||||
var launchExe = game is TkoolGameItem evbItem
|
||||
? evbItem.ResolveLaunchExecutable()
|
||||
: game.ExecutablePath;
|
||||
|
||||
// 直下にexeが無い場合やパスが変わっていた場合はサブフォルダ内を探索して救済
|
||||
if (string.IsNullOrEmpty(launchExe) || !File.Exists(launchExe))
|
||||
{
|
||||
var foundExe = GameScannerService.FindGameExecutable(game.RootDirectory);
|
||||
if (!string.IsNullOrEmpty(foundExe) && File.Exists(foundExe))
|
||||
{
|
||||
launchExe = foundExe;
|
||||
game.ExecutablePath = foundExe;
|
||||
}
|
||||
}
|
||||
|
||||
if (game is TkoolGameItem && launchExe != game.ExecutablePath)
|
||||
{
|
||||
AppendLog($"[EVB起動] 解凍後の実行ファイルを使用: {Path.GetFileName(launchExe)}");
|
||||
@@ -832,7 +886,7 @@ namespace GameLauncher
|
||||
{
|
||||
Directory.CreateDirectory(profileDir);
|
||||
}
|
||||
startInfo.Arguments = $"--user-data-dir=\"{profileDir}\"";
|
||||
startInfo.Arguments = $"--user-data-dir=\"{profileDir}\" --allow-file-access-from-files";
|
||||
AppendLog($"[プロファイル] 専用プロファイルを指定: {Path.GetFileName(profileDir)}");
|
||||
}
|
||||
catch (Exception pEx)
|
||||
@@ -845,6 +899,7 @@ namespace GameLauncher
|
||||
|
||||
game.LastLaunched = DateTime.Now;
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
|
||||
AppendLog($"🚀 {game.Title} を起動しました。");
|
||||
}
|
||||
@@ -867,6 +922,7 @@ namespace GameLauncher
|
||||
|
||||
// ツクール専用メニュー
|
||||
menuTkoolOpenFolder.Visibility = isTkool ? Visibility.Visible : Visibility.Collapsed;
|
||||
menuTkoolRepairResources.Visibility = isTkool ? Visibility.Visible : Visibility.Collapsed;
|
||||
menuTkoolRestoreOriginal.Visibility = isTkool ? Visibility.Visible : Visibility.Collapsed;
|
||||
|
||||
if (selected is TkoolGameItem tg)
|
||||
@@ -907,6 +963,7 @@ namespace GameLauncher
|
||||
menuTkoolRestoreAsar.Visibility = Visibility.Collapsed;
|
||||
menuTkoolExtractRgss.Visibility = Visibility.Collapsed;
|
||||
menuTkoolRestoreRgss.Visibility = Visibility.Collapsed;
|
||||
menuTkoolRepairResources.Visibility = Visibility.Collapsed;
|
||||
menuTkoolOpenPluginsJs.Visibility = Visibility.Collapsed;
|
||||
menuTkoolOpenProfile.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
@@ -982,6 +1039,7 @@ namespace GameLauncher
|
||||
tg.PluginsDirPath = Path.Combine(Path.GetDirectoryName(tg.PluginsJsPath)!, "plugins");
|
||||
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
AppendLog($"[ASAR解凍成功] {message}");
|
||||
MessageBox.Show(message, "ASAR 解凍完了", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
|
||||
@@ -1038,6 +1096,7 @@ namespace GameLauncher
|
||||
? string.Empty
|
||||
: result.UnderlyingEngine;
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
AppendLog("[EVB解凍完了] ==============================");
|
||||
AppendLog($" ・対象 : {tg.Title}");
|
||||
AppendLog($" ・出力先 : {result.OutputDirectory}");
|
||||
@@ -1080,6 +1139,7 @@ namespace GameLauncher
|
||||
tg.EvbExtractedDirPath = null;
|
||||
tg.EvbUnderlyingEngine = string.Empty;
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
AppendLog("[EVB復元完了] ==============================");
|
||||
AppendLog($" ・対象 : {tg.Title}");
|
||||
AppendLog(" ・内容 : 解凍フォルダを削除し、元 exe(.glbak)を復元しました。");
|
||||
@@ -1115,6 +1175,7 @@ namespace GameLauncher
|
||||
|
||||
game.IsBookmarked = !game.IsBookmarked;
|
||||
this._scannerService.SaveCache(this._games);
|
||||
this._scannerService.SaveBookmarks(this._games);
|
||||
|
||||
if (this.chkFilterBookmarkedOnly.IsChecked == true || this._gameComparer.SortOrder == GameSortOrder.BookmarkedFirst)
|
||||
{
|
||||
@@ -1175,6 +1236,7 @@ namespace GameLauncher
|
||||
tg.IsAsarExtracted = false;
|
||||
tg.IsModded = false;
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
AppendLog($"[ASAR復元成功] {message}");
|
||||
MessageBox.Show(message, "ASAR 復元完了", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
@@ -1224,6 +1286,7 @@ namespace GameLauncher
|
||||
if (success)
|
||||
{
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
AppendLog($"[RGSS抽出成功] {message}");
|
||||
MessageBox.Show(message, "RGSS スクリプト抽出完了", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
@@ -1269,6 +1332,7 @@ namespace GameLauncher
|
||||
{
|
||||
tg.IsModded = false;
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
AppendLog($"[RGSS復元成功] {message}");
|
||||
MessageBox.Show(message, "RGSS 復元完了", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
@@ -1336,6 +1400,70 @@ namespace GameLauncher
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ツクールゲームのリソース文字化け・URLエンコード修復メニュー クリック時
|
||||
/// </summary>
|
||||
private async void MenuRepairResources_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (lstGames.SelectedItem is TkoolGameItem tg)
|
||||
{
|
||||
AppendLog($"[リソース修復] {tg.Title}: 手動での完全再検査を開始します...");
|
||||
|
||||
this.pbGlobalProgress.Visibility = Visibility.Visible;
|
||||
this.pbGlobalProgress.IsIndeterminate = true;
|
||||
this.lblGlobalProgressText.Visibility = Visibility.Visible;
|
||||
this.lblGlobalProgressText.Text = "ファイル一覧を収集中...";
|
||||
this.lblStatusEngine.Text = "リソース修復中...";
|
||||
|
||||
var progress = new Progress<TkoolResourceRepairService.RepairProgress>(p =>
|
||||
{
|
||||
if (p.Total > 0)
|
||||
{
|
||||
this.pbGlobalProgress.IsIndeterminate = false;
|
||||
this.pbGlobalProgress.Maximum = p.Total;
|
||||
this.pbGlobalProgress.Value = p.Current;
|
||||
this.lblGlobalProgressText.Text = $"リソース修復中: {p.Current}/{p.Total} (修復: {p.RepairedCount})";
|
||||
}
|
||||
else
|
||||
{
|
||||
this.lblGlobalProgressText.Text = p.CurrentStatus;
|
||||
}
|
||||
});
|
||||
|
||||
try
|
||||
{
|
||||
var result = await _tkoolResourceRepairService.RepairGameResourcesAsync(
|
||||
tg,
|
||||
forceRescan: true,
|
||||
progress: progress,
|
||||
uiLogCallback: msg => AppendLog(msg));
|
||||
|
||||
AppendLog($"[リソース修復完了] {tg.Title}: {result.Message}");
|
||||
var askOpenLog = MessageBox.Show(
|
||||
$"{result.Message}\n\n詳細ログファイルを出力しました:\n{result.LogFilePath}\n\nログファイルを開きますか?",
|
||||
"リソース修復結果",
|
||||
MessageBoxButton.YesNo,
|
||||
result.Success ? MessageBoxImage.Information : MessageBoxImage.Warning);
|
||||
|
||||
if (askOpenLog == MessageBoxResult.Yes && !string.IsNullOrEmpty(result.LogFilePath) && File.Exists(result.LogFilePath))
|
||||
{
|
||||
Process.Start(new ProcessStartInfo { FileName = result.LogFilePath, UseShellExecute = true });
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AppendLog($"[リソース修復エラー] {tg.Title}: {ex.Message}");
|
||||
MessageBox.Show($"リソース修復中にエラーが発生しました:\n{ex.Message}", "修復エラー", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
this.pbGlobalProgress.Visibility = Visibility.Collapsed;
|
||||
this.lblGlobalProgressText.Visibility = Visibility.Collapsed;
|
||||
this.lblStatusEngine.Text = "待機中";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity専用機能 (セーブエディタ・LocalLow・regedit・即時バックアップ)
|
||||
@@ -1370,6 +1498,7 @@ namespace GameLauncher
|
||||
// セーブ状態の再チェック
|
||||
ug.HasSaveData = _scannerService.CheckHasSaveData(ug);
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
AppendLog($"[セーブエディタ終了] {ug.Title} のセーブエディタを閉じました。");
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -1535,6 +1664,7 @@ namespace GameLauncher
|
||||
var (success, msg) = _wolfModService.ApplyProxyDll(tg, 1.0, tg.WolfSpeedMultiplier > 0 ? tg.WolfSpeedMultiplier : 3.0, 5.0);
|
||||
AppendLog($"[ウディタ プロキシDLL] {msg.Replace("\n", " ")}");
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1545,6 +1675,7 @@ namespace GameLauncher
|
||||
var (success, msg) = _wolfModService.RemoveProxyDll(tg);
|
||||
AppendLog($"[ウディタ プロキシDLL] {msg}");
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1557,6 +1688,7 @@ namespace GameLauncher
|
||||
AppendLog($"[ウディタ プロキシDLL] {msg.Replace("\n", " ")}");
|
||||
MessageBox.Show(msg, "プロキシDLL適用", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1569,6 +1701,7 @@ namespace GameLauncher
|
||||
AppendLog($"[ウディタ プロキシDLL] {msg}");
|
||||
MessageBox.Show(msg, "プロキシDLL解除", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1610,6 +1743,7 @@ namespace GameLauncher
|
||||
MessageBox.Show(msg, "解凍エラー", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
}
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -1636,6 +1770,7 @@ namespace GameLauncher
|
||||
AppendLog($"[ウディタ復元] {tg.Title}: {msg.Replace("\n", " ")}");
|
||||
MessageBox.Show(msg, "復元完了", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1673,6 +1808,7 @@ namespace GameLauncher
|
||||
AppendLog($"[SRPG Studio 倍速] {tg.Title}: プロキシDLLを有効化しました (F6で倍速切替)");
|
||||
}
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
}
|
||||
|
||||
private void chkSrpgProxyDll_Unchecked(object sender, RoutedEventArgs e)
|
||||
@@ -1682,6 +1818,7 @@ namespace GameLauncher
|
||||
_srpgModService.DisableProxyDll(tg.RootDirectory);
|
||||
AppendLog($"[SRPG Studio 倍速] {tg.Title}: プロキシDLLを解除しました");
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
}
|
||||
|
||||
private void btnApplySrpgProxyDll_Click(object sender, RoutedEventArgs e)
|
||||
@@ -1699,6 +1836,7 @@ namespace GameLauncher
|
||||
MessageBox.Show("プロキシDLLの配置に失敗しました。\nEngines/Rgss/Tools/speedhack-i686/version.dll が存在するか確認してください。", "エラー", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
}
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
}
|
||||
|
||||
private void btnRemoveSrpgProxyDll_Click(object sender, RoutedEventArgs e)
|
||||
@@ -1709,6 +1847,7 @@ namespace GameLauncher
|
||||
AppendLog($"[SRPG Studio 倍速] {tg.Title}: プロキシDLL (version.dll) を解除しました");
|
||||
MessageBox.Show("プロキシDLL (version.dll) を解除しました。", "プロキシDLL解除完了", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
}
|
||||
|
||||
private async void btnApplySrpgMod_Click(object sender, RoutedEventArgs e)
|
||||
@@ -1757,6 +1896,7 @@ namespace GameLauncher
|
||||
MessageBox.Show(msg, "改造適用エラー", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
}
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -1807,6 +1947,7 @@ namespace GameLauncher
|
||||
MessageBox.Show(msg, "改造解除エラー", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
}
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -1856,6 +1997,7 @@ namespace GameLauncher
|
||||
MessageBox.Show(msg, "解凍エラー", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
}
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -1904,6 +2046,7 @@ namespace GameLauncher
|
||||
MessageBox.Show(msg, "再構築エラー", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
}
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -1944,6 +2087,7 @@ namespace GameLauncher
|
||||
AppendLog($"[SRPG Studio 完全復元] {tg.Title}:\n{msg}");
|
||||
MessageBox.Show($"すべての改造を解除しました:\n\n{msg}", "復元完了", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
_scannerService.SaveCache(_games);
|
||||
_scannerService.SaveBookmarks(_games);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -1974,17 +2118,37 @@ namespace GameLauncher
|
||||
|
||||
private void AppendLog(string message)
|
||||
{
|
||||
Dispatcher.Invoke(() =>
|
||||
string timestamp = DateTime.Now.ToString("HH:mm:ss");
|
||||
this._logQueue.Enqueue($"[{timestamp}] {message}\n");
|
||||
}
|
||||
|
||||
private void FlushLogQueue()
|
||||
{
|
||||
if (this._logQueue.IsEmpty) return;
|
||||
|
||||
var sb = new StringBuilder();
|
||||
while (this._logQueue.TryDequeue(out var msg))
|
||||
{
|
||||
string timestamp = DateTime.Now.ToString("HH:mm:ss");
|
||||
txtLog.AppendText($"[{timestamp}] {message}\n");
|
||||
scrollLog.ScrollToEnd();
|
||||
});
|
||||
sb.Append(msg);
|
||||
if (sb.Length > 20000) break; // 1回あたりの最大文字数を制限してUIを軽快に保つ
|
||||
}
|
||||
|
||||
if (sb.Length > 0)
|
||||
{
|
||||
// テキストボックスの行数が多すぎる場合は古いログを切り詰める(メモリ肥大化・クラッシュ防止)
|
||||
if (this.txtLog.Text.Length > 100000)
|
||||
{
|
||||
this.txtLog.Text = this.txtLog.Text.Substring(this.txtLog.Text.Length - 50000);
|
||||
}
|
||||
this.txtLog.AppendText(sb.ToString());
|
||||
this.scrollLog.ScrollToEnd();
|
||||
}
|
||||
}
|
||||
|
||||
private void btnClearLog_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
txtLog.Clear();
|
||||
while (this._logQueue.TryDequeue(out _)) { }
|
||||
this.txtLog.Clear();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in new issue
Block a user