diff --git a/Pf2eDataScrapper/Helpers/ProcessProgress.cs b/Pf2eDataScrapper/Helpers/ProcessProgress.cs
index d4f6d26..80514cb 100644
--- a/Pf2eDataScrapper/Helpers/ProcessProgress.cs
+++ b/Pf2eDataScrapper/Helpers/ProcessProgress.cs
@@ -36,9 +36,16 @@ internal class ProcessProgress : AbstractLogger
ProgressMessage?.Invoke(this, level, message);
}
+ public void Complete()
+ {
+ ProgressComplete?.Invoke(this);
+ }
+
public delegate void ProgressUpdateDelegate(ProcessProgress sender);
public event ProgressUpdateDelegate? ProgressUpdate;
+ public event ProgressUpdateDelegate? ProgressComplete;
+
public delegate void ProgressMessageDelegate(
ProcessProgress sender,
LogLevel level,
diff --git a/Pf2eDataScrapper/Processors/ProcessorExecutor.cs b/Pf2eDataScrapper/Processors/ProcessorExecutor.cs
index b4d97f8..b0e22d2 100644
--- a/Pf2eDataScrapper/Processors/ProcessorExecutor.cs
+++ b/Pf2eDataScrapper/Processors/ProcessorExecutor.cs
@@ -94,6 +94,7 @@ internal sealed class ProcessorExecutor(
else
{
Progress.Processors.Complete();
+ Progress.Complete();
}
}
diff --git a/Pf2eDataScrapper/WPF/EntityViewer/Component/EntityListControl.xaml b/Pf2eDataScrapper/WPF/EntityViewer/Component/EntityListControl.xaml
index 69b7ad6..7ba545e 100644
--- a/Pf2eDataScrapper/WPF/EntityViewer/Component/EntityListControl.xaml
+++ b/Pf2eDataScrapper/WPF/EntityViewer/Component/EntityListControl.xaml
@@ -3,7 +3,6 @@
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"
- xmlns:local="clr-namespace:Pf2eDataScrapper.WPF.Components"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewmodel="clr-namespace:Pf2eDataScrapper.WPF.EntityViewer.ViewModel"
Padding="3,3,3,3"
diff --git a/Pf2eDataScrapper/WPF/EntityViewer/EntityForm.xaml.cs b/Pf2eDataScrapper/WPF/EntityViewer/EntityForm.xaml.cs
index ed9fc02..de08bbe 100644
--- a/Pf2eDataScrapper/WPF/EntityViewer/EntityForm.xaml.cs
+++ b/Pf2eDataScrapper/WPF/EntityViewer/EntityForm.xaml.cs
@@ -1,6 +1,5 @@
using System.Collections.ObjectModel;
using System.Windows;
-using Pf2eDataScrapper.WPF.Components;
using Pf2eDataScrapper.WPF.EntityViewer.ViewModel;
using Pf2eModel;
using Pf2eModel.Model.Enum;
diff --git a/Pf2eDataScrapper/WPF/Views/ProgressForm.xaml b/Pf2eDataScrapper/WPF/ProgressForm/ProgressForm.xaml
similarity index 58%
rename from Pf2eDataScrapper/WPF/Views/ProgressForm.xaml
rename to Pf2eDataScrapper/WPF/ProgressForm/ProgressForm.xaml
index 9d342e8..daae789 100644
--- a/Pf2eDataScrapper/WPF/Views/ProgressForm.xaml
+++ b/Pf2eDataScrapper/WPF/ProgressForm/ProgressForm.xaml
@@ -1,16 +1,17 @@
+
@@ -42,40 +43,52 @@
+
+
+
+
-
-
-
+
+
+
-
+
-
-
-
-
-
+ Background="{Binding Path=Color}" />
+ Background="{Binding Path=Color}" />
+ Background="{Binding Path=Color}" />
diff --git a/Pf2eDataScrapper/WPF/Views/ProgressForm.xaml.cs b/Pf2eDataScrapper/WPF/ProgressForm/ProgressForm.xaml.cs
similarity index 87%
rename from Pf2eDataScrapper/WPF/Views/ProgressForm.xaml.cs
rename to Pf2eDataScrapper/WPF/ProgressForm/ProgressForm.xaml.cs
index c368f1b..5dc1936 100644
--- a/Pf2eDataScrapper/WPF/Views/ProgressForm.xaml.cs
+++ b/Pf2eDataScrapper/WPF/ProgressForm/ProgressForm.xaml.cs
@@ -4,7 +4,7 @@ using System.Drawing;
using System.Windows;
using Pf2eDataScrapper.Helpers;
-namespace Pf2eDataScrapper.WPF;
+namespace Pf2eDataScrapper.WPF.ProgressForm;
///
/// Логика взаимодействия для ProgressFormWpf.xaml
@@ -23,8 +23,10 @@ internal partial class ProgressForm : Window
Progress.ProgressUpdate += Progress_ProgressUpdate;
Progress.ProgressMessage += Progress_ProgressMessage;
+ Progress.ProgressComplete += Progress_ProgressComplete;
}
+
private void Progress_ProgressUpdate(ProcessProgress sender)
{
if (!Dispatcher.CheckAccess())
@@ -53,6 +55,12 @@ internal partial class ProgressForm : Window
ListViewRow item = new(level, message) { IsVisible = true };
ViewRows.Add(item);
+
+ MessageListView.ScrollIntoView(item);
+ }
+ private void Progress_ProgressComplete(ProcessProgress sender)
+ {
+ //(Application.Current as ImportApplication)!.CurrentStage = ApplicationStage.Viewer;
}
public event ImportApplication.ApplicationStateChangeDelegate? ApplicationStateChange;
diff --git a/Pf2eDataScrapper/WPF/Components/ProcessorCollectionControl.xaml b/Pf2eDataScrapper/WPF/StartForm/Components/ProcessorCollectionControl.xaml
similarity index 99%
rename from Pf2eDataScrapper/WPF/Components/ProcessorCollectionControl.xaml
rename to Pf2eDataScrapper/WPF/StartForm/Components/ProcessorCollectionControl.xaml
index fe55a68..2cda45a 100644
--- a/Pf2eDataScrapper/WPF/Components/ProcessorCollectionControl.xaml
+++ b/Pf2eDataScrapper/WPF/StartForm/Components/ProcessorCollectionControl.xaml
@@ -1,5 +1,5 @@
/// Логика взаимодействия для ProcessorCollectionControl.xaml
diff --git a/Pf2eDataScrapper/WPF/Views/StartForm.xaml b/Pf2eDataScrapper/WPF/StartForm/StartForm.xaml
similarity index 91%
rename from Pf2eDataScrapper/WPF/Views/StartForm.xaml
rename to Pf2eDataScrapper/WPF/StartForm/StartForm.xaml
index a2d388f..e67758e 100644
--- a/Pf2eDataScrapper/WPF/Views/StartForm.xaml
+++ b/Pf2eDataScrapper/WPF/StartForm/StartForm.xaml
@@ -1,8 +1,8 @@
-
+
diff --git a/Pf2eDataScrapper/WPF/Views/StartForm.xaml.cs b/Pf2eDataScrapper/WPF/StartForm/StartForm.xaml.cs
similarity index 85%
rename from Pf2eDataScrapper/WPF/Views/StartForm.xaml.cs
rename to Pf2eDataScrapper/WPF/StartForm/StartForm.xaml.cs
index 865fc19..15e0580 100644
--- a/Pf2eDataScrapper/WPF/Views/StartForm.xaml.cs
+++ b/Pf2eDataScrapper/WPF/StartForm/StartForm.xaml.cs
@@ -1,11 +1,8 @@
using System.Windows;
using Pf2eDataScrapper.App;
-namespace Pf2eDataScrapper.WPF.Views;
+namespace Pf2eDataScrapper.WPF.StartForm;
-///
-/// Логика взаимодействия для StartForm.xaml
-///
internal partial class StartForm : Window
{
public ProcessorCollection Collection { get; }
diff --git a/Pf2eDataScrapper/WPF/WpfServiceProviderExtension.cs b/Pf2eDataScrapper/WPF/WpfServiceProviderExtension.cs
index fabd556..7c68770 100644
--- a/Pf2eDataScrapper/WPF/WpfServiceProviderExtension.cs
+++ b/Pf2eDataScrapper/WPF/WpfServiceProviderExtension.cs
@@ -1,5 +1,4 @@
using Microsoft.Extensions.DependencyInjection;
-using Pf2eDataScrapper.WPF.Components;
using Pf2eDataScrapper.WPF.EntityViewer.Stores;
using Pf2eDataScrapper.WPF.EntityViewer.ViewModel;