Skip to content

Commit 3fdbd00

Browse files
build: update version to 2.5.1 and adjust command-line input folder handling
- Moved command-line argument processing for input folder from App.xaml.cs to MainWindow.xaml.cs for direct application. - Removed outdated startup event handling in App.xaml.cs.
1 parent 2dadfb4 commit 3fdbd00

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

BatchConvertToCHD/App.xaml.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,6 @@ protected override void OnStartup(StartupEventArgs e)
3939

4040
base.OnStartup(e);
4141

42-
// Apply command-line argument for system ROM path
43-
if (e.Args.Length > 0 && MainWindow is MainWindow mainWindow)
44-
{
45-
var romPath = e.Args[0];
46-
mainWindow.ContentRendered += (_, _) => mainWindow.SetInputFolder(romPath);
47-
}
48-
4942
// Record usage statistics on a background thread
5043
_ = _statsService?.RecordUsageAsync();
5144

BatchConvertToCHD/BatchConvertToCHD.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<UseWPF>true</UseWPF>
99
<ApplicationIcon>icon\chd.ico</ApplicationIcon>
1010
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
11-
<AssemblyVersion>2.5.0</AssemblyVersion>
12-
<FileVersion>2.5.0</FileVersion>
11+
<AssemblyVersion>2.5.1</AssemblyVersion>
12+
<FileVersion>2.5.1</FileVersion>
1313
<IsPackable>false</IsPackable>
1414
<NeutralLanguage>en</NeutralLanguage>
1515
<DebugType>embedded</DebugType>

BatchConvertToCHD/MainWindow.xaml.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ private async void MainWindow_Loaded(object sender, RoutedEventArgs e)
102102
{
103103
try
104104
{
105+
// Apply command-line argument for input folder path if provided
106+
var args = Environment.GetCommandLineArgs();
107+
if (args.Length > 1)
108+
{
109+
var inputPath = args[1];
110+
SetInputFolder(inputPath);
111+
}
112+
105113
// Initialize performance counters asynchronously
106114
await Task.Run(() =>
107115
{

0 commit comments

Comments
 (0)