From 48be042aa224af7906e61e8ce05b94ef011a9d64 Mon Sep 17 00:00:00 2001 From: Peter Date: Thu, 16 Apr 2026 02:04:05 +0100 Subject: [PATCH] feat: create BulkImportWindow dialog, wire File > Bulk Import --- EbayListingTool/Views/BulkImportWindow.xaml | 11 +++++++++++ EbayListingTool/Views/BulkImportWindow.xaml.cs | 18 ++++++++++++++++++ EbayListingTool/Views/MainWindow.xaml.cs | 12 +++++++++--- 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 EbayListingTool/Views/BulkImportWindow.xaml create mode 100644 EbayListingTool/Views/BulkImportWindow.xaml.cs diff --git a/EbayListingTool/Views/BulkImportWindow.xaml b/EbayListingTool/Views/BulkImportWindow.xaml new file mode 100644 index 0000000..ed3b217 --- /dev/null +++ b/EbayListingTool/Views/BulkImportWindow.xaml @@ -0,0 +1,11 @@ + + + \ No newline at end of file diff --git a/EbayListingTool/Views/BulkImportWindow.xaml.cs b/EbayListingTool/Views/BulkImportWindow.xaml.cs new file mode 100644 index 0000000..270fb0f --- /dev/null +++ b/EbayListingTool/Views/BulkImportWindow.xaml.cs @@ -0,0 +1,18 @@ +using EbayListingTool.Services; +using MahApps.Metro.Controls; + +namespace EbayListingTool.Views; + +public partial class BulkImportWindow : MetroWindow +{ + public BulkImportWindow( + EbayListingService listingService, + EbayCategoryService categoryService, + AiAssistantService aiService, + BulkImportService bulkService, + EbayAuthService auth) + { + InitializeComponent(); + BulkView.Initialise(listingService, categoryService, aiService, bulkService, auth); + } +} \ No newline at end of file diff --git a/EbayListingTool/Views/MainWindow.xaml.cs b/EbayListingTool/Views/MainWindow.xaml.cs index 9ddfe0b..767e45e 100644 --- a/EbayListingTool/Views/MainWindow.xaml.cs +++ b/EbayListingTool/Views/MainWindow.xaml.cs @@ -100,9 +100,15 @@ public partial class MainWindow : MetroWindow private void BulkImport_Click(object sender, RoutedEventArgs e) { - // BulkImportWindow is created in Task 7; placeholder for now - MessageBox.Show("Bulk Import coming in the next step.", "Bulk Import", - MessageBoxButton.OK, MessageBoxImage.Information); + if (!_auth.IsConnected) + { + MessageBox.Show("Please connect to eBay before using Bulk Import.", + "Not Connected", MessageBoxButton.OK, MessageBoxImage.Warning); + return; + } + var win = new BulkImportWindow(_listingService, _categoryService, _aiService, _bulkService, _auth); + win.Owner = this; + win.ShowDialog(); } private void Exit_Click(object sender, RoutedEventArgs e) => Close();