From c1754eb2c14b701ff263f23947448305fcb7a46e Mon Sep 17 00:00:00 2001 From: Nikita Romanenko Date: Sat, 18 May 2019 17:08:32 +0300 Subject: [PATCH] done = new way of module architicture; first implementation of pore inspection module --- Pores/App.xaml | 15 +- Pores/Bootstrap.cs | 27 ++- Pores/Converters/CubicPowerOfInt.cs | 2 +- Pores/Interfaces/IPoreSpread.cs | 4 +- Pores/MODELING-DEF-DES-MI-VI.csproj | 25 ++- Pores/MainWindow.xaml | 133 ++------------ Pores/MainWindowViewModel.cs | 133 +------------- Pores/Models/Camera.cs | 26 +++ Pores/Models/Material.cs | 3 + Pores/Models/Point.cs | 6 + Pores/Models/Point2D.cs | 11 +- Pores/Models/Point3D.cs | 16 +- Pores/Models/Spreads/BaseSpread.cs | 4 +- Pores/Models/Spreads/NormalSpread.cs | 6 +- .../ModelCreationUnit/ModelCreationView.xaml | 146 +++++++++++++++ .../ModelCreationView.xaml.cs | 13 ++ .../ModelCreationViewModel.cs | 142 +++++++++++++++ .../PoreInspectionView.xaml | 57 ++++++ .../PoreInspectionView.xaml.cs | 13 ++ .../PoreInspectionViewModel.cs | 170 ++++++++++++++++++ 20 files changed, 681 insertions(+), 271 deletions(-) create mode 100644 Pores/Models/Camera.cs create mode 100644 Pores/Modules/ModelCreationUnit/ModelCreationView.xaml create mode 100644 Pores/Modules/ModelCreationUnit/ModelCreationView.xaml.cs create mode 100644 Pores/Modules/ModelCreationUnit/ModelCreationViewModel.cs create mode 100644 Pores/Modules/PoreInspectionUnit/PoreInspectionView.xaml create mode 100644 Pores/Modules/PoreInspectionUnit/PoreInspectionView.xaml.cs create mode 100644 Pores/Modules/PoreInspectionUnit/PoreInspectionViewModel.cs diff --git a/Pores/App.xaml b/Pores/App.xaml index 539c9c3..b880d7b 100644 --- a/Pores/App.xaml +++ b/Pores/App.xaml @@ -1,9 +1,8 @@ - - - - + + diff --git a/Pores/Bootstrap.cs b/Pores/Bootstrap.cs index 7f95684..91f2b8d 100644 --- a/Pores/Bootstrap.cs +++ b/Pores/Bootstrap.cs @@ -3,12 +3,10 @@ using MODELING_DEF_DES_MI_VI.Controllers; using MODELING_DEF_DES_MI_VI.Interfaces; using MODELING_DEF_DES_MI_VI.Models; using MODELING_DEF_DES_MI_VI.Models.Spreads; -using System; +using MODELING_DEF_DES_MI_VI.Modules.ModelCreationUnit; +using MODELING_DEF_DES_MI_VI.Modules.PoreInspectionUnit; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace MODELING_DEF_DES_MI_VI { @@ -47,10 +45,29 @@ namespace MODELING_DEF_DES_MI_VI .SingleInstance(); build - .RegisterType() + .RegisterType() + .AsSelf() + .SingleInstance(); + + build + .RegisterType() + .AsSelf() + .SingleInstance(); + + build + .RegisterType() .AsSelf() .SingleInstance(); + build + .RegisterType() + .AsSelf() + .SingleInstance(); + + build + .RegisterType() + .AsSelf() + .SingleInstance(); return build.Build(); } diff --git a/Pores/Converters/CubicPowerOfInt.cs b/Pores/Converters/CubicPowerOfInt.cs index f2c46df..0de30cc 100644 --- a/Pores/Converters/CubicPowerOfInt.cs +++ b/Pores/Converters/CubicPowerOfInt.cs @@ -2,7 +2,7 @@ using System.Globalization; using System.Windows.Data; -namespace Pores.Converters +namespace MODELING_DEF_DES_MI_VI.Converters { public class CubicPowerOfInt : IValueConverter { diff --git a/Pores/Interfaces/IPoreSpread.cs b/Pores/Interfaces/IPoreSpread.cs index cbb4c03..1cdd0e5 100644 --- a/Pores/Interfaces/IPoreSpread.cs +++ b/Pores/Interfaces/IPoreSpread.cs @@ -1,11 +1,11 @@ using MODELING_DEF_DES_MI_VI.Models; -using System.Collections.ObjectModel; +using System.Collections.Generic; namespace MODELING_DEF_DES_MI_VI.Interfaces { public interface IPoreSpread { - ObservableCollection GetSpread(); + IList GetSpread(); void LoadRecommendParams(); } } diff --git a/Pores/MODELING-DEF-DES-MI-VI.csproj b/Pores/MODELING-DEF-DES-MI-VI.csproj index 12a0177..8491d69 100644 --- a/Pores/MODELING-DEF-DES-MI-VI.csproj +++ b/Pores/MODELING-DEF-DES-MI-VI.csproj @@ -53,6 +53,9 @@ + + + @@ -92,6 +95,7 @@ + @@ -103,8 +107,24 @@ MainWindow.xaml Code + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + ModelCreationView.xaml + + + + PoreInspectionView.xaml + + Code @@ -131,10 +151,7 @@ - - - - + diff --git a/Pores/MainWindow.xaml b/Pores/MainWindow.xaml index 3ebf4ef..e38c483 100644 --- a/Pores/MainWindow.xaml +++ b/Pores/MainWindow.xaml @@ -1,120 +1,23 @@ - - - - + - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +