feat: create BulkImportWindow dialog, wire File > Bulk Import
This commit is contained in:
11
EbayListingTool/Views/BulkImportWindow.xaml
Normal file
11
EbayListingTool/Views/BulkImportWindow.xaml
Normal file
@@ -0,0 +1,11 @@
|
||||
<mah:MetroWindow x:Class="EbayListingTool.Views.BulkImportWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
xmlns:local="clr-namespace:EbayListingTool.Views"
|
||||
Title="Bulk Import - eBay Listing Tool"
|
||||
Height="700" Width="1000"
|
||||
MinHeight="500" MinWidth="700"
|
||||
WindowStartupLocation="CenterOwner">
|
||||
<local:BulkImportView x:Name="BulkView" />
|
||||
</mah:MetroWindow>
|
||||
18
EbayListingTool/Views/BulkImportWindow.xaml.cs
Normal file
18
EbayListingTool/Views/BulkImportWindow.xaml.cs
Normal file
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user