├── .idea └── .idea.app │ └── .idea │ ├── .name │ └── workspace.xml ├── GUI ├── Images │ ├── Auto.png │ ├── Banksy.jpg │ ├── Global.png │ ├── Home.png │ ├── Lucas.jpg │ ├── Manual.png │ ├── logo.png │ ├── hourglass.png │ ├── house-icon.png │ ├── Construction.png │ ├── Designs │ │ ├── Anton.jpg │ │ ├── Karel.jpg │ │ ├── Pablo.jpg │ │ ├── Piet.jpg │ │ ├── George.jpg │ │ ├── Herman.jpg │ │ ├── Johannes.jpg │ │ ├── Leonardo.jpg │ │ ├── Vincent.jpg │ │ └── Rembrandt.jpg │ ├── Handles │ │ ├── Horn.jpg │ │ ├── Koma.jpg │ │ ├── Ror_R.jpg │ │ ├── Hondla.jpg │ │ ├── Ror_DS.jpg │ │ ├── Sleeve_R.jpg │ │ └── Sleeve_DS.jpg │ ├── ManualDrawing.png │ ├── TopViewWalls.png │ ├── AutomaticDrawing.png │ ├── GlobalSettings.png │ └── ConstructionOpening.png ├── Helpers │ ├── CurrentGuiInfo.cs │ ├── GuiDisplayValidation.cs │ └── GeneralHelp.cs ├── App.config ├── ViewModels │ ├── HomeViewModel.cs │ ├── DesignViewModel.cs │ ├── MainViewModel.cs │ ├── ViewModelBase.cs │ ├── GeneralProductViewModel.cs │ ├── HandleViewModel.cs │ └── ProductViewModels │ │ └── PivotDoorViewModel.cs ├── Views │ ├── DoorSettingsView.xaml.cs │ ├── HingeDoorProductView.xaml.cs │ ├── ManualDrawingView.xaml.cs │ ├── FinishView.xaml.cs │ ├── DesignView.xaml.cs │ ├── DesignView.cs.xaml.cs │ ├── HandleView.xaml.cs │ ├── ProductViews │ │ ├── HingeView.xaml.cs │ │ └── PivotView.xaml.cs │ ├── ProductSelectionView.xaml.cs │ ├── ConstructionView.xaml.cs │ ├── HomeView.xaml.cs │ ├── HandleView.cs.xaml.cs │ ├── PivotDoorSettings.xaml.cs │ ├── ProductSelectionView.xaml │ ├── DesignView.xaml │ ├── ManualDrawingView.xaml │ ├── HomeView.xaml │ ├── DesignView.cs.xaml │ ├── GeneralProductView.xaml.cs │ ├── HandleView.xaml │ ├── FinishView.xaml │ ├── HandleView.cs.xaml │ └── HingeDoorProductView.xaml ├── App.xaml.cs ├── Commands │ ├── CommandBase.cs │ ├── InstantiateProductCommand.cs │ └── DrawCommands │ │ ├── DrawProductCommand.cs │ │ └── DrawConstructionOpeningCommand.cs ├── Stores │ └── NavigationStore.cs ├── MainWindow.xaml.cs ├── AutoCAD.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── MainWindow.xaml ├── App.xaml └── Styles │ └── ApplicationStyle.xaml ├── BusinessLogic ├── Classes │ ├── ExtraParts.cs │ ├── Handle.cs │ ├── HandleTopView.cs │ ├── ConstructionOpening.cs │ ├── Handles │ │ ├── DefaultHandle.cs │ │ ├── Ror_R.cs │ │ ├── Sleeve_R.cs │ │ ├── Ror_DS.cs │ │ ├── Hondla.cs │ │ ├── Horn.cs │ │ └── Sleeve_DS.cs │ ├── Design.cs │ ├── Designs │ │ ├── Lucas.cs │ │ ├── Pablo.cs │ │ ├── Vincent.cs │ │ ├── Leonardo.cs │ │ ├── Karel.cs │ │ ├── Rembrandt.cs │ │ ├── Piet.cs │ │ ├── Claude.cs │ │ ├── Albert.cs │ │ ├── George.cs │ │ ├── Herman.cs │ │ ├── Anton.cs │ │ ├── Govert.cs │ │ └── Johannes.cs │ ├── Datas │ │ ├── PivotData.cs │ │ └── HingeData.cs │ └── Data.cs ├── Point.cs ├── packages.config ├── Properties │ └── AssemblyInfo.cs ├── Settings │ ├── GlobalSettings.cs │ └── CurrentDrawInfo.cs └── BusinessLogic.csproj ├── app.sln └── .gitignore /.idea/.idea.app/.idea/.name: -------------------------------------------------------------------------------- 1 | app -------------------------------------------------------------------------------- /GUI/Images/Auto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Auto.png -------------------------------------------------------------------------------- /GUI/Images/Banksy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Banksy.jpg -------------------------------------------------------------------------------- /GUI/Images/Global.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Global.png -------------------------------------------------------------------------------- /GUI/Images/Home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Home.png -------------------------------------------------------------------------------- /GUI/Images/Lucas.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Lucas.jpg -------------------------------------------------------------------------------- /GUI/Images/Manual.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Manual.png -------------------------------------------------------------------------------- /GUI/Images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/logo.png -------------------------------------------------------------------------------- /GUI/Images/hourglass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/hourglass.png -------------------------------------------------------------------------------- /GUI/Images/house-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/house-icon.png -------------------------------------------------------------------------------- /GUI/Images/Construction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Construction.png -------------------------------------------------------------------------------- /GUI/Images/Designs/Anton.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Designs/Anton.jpg -------------------------------------------------------------------------------- /GUI/Images/Designs/Karel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Designs/Karel.jpg -------------------------------------------------------------------------------- /GUI/Images/Designs/Pablo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Designs/Pablo.jpg -------------------------------------------------------------------------------- /GUI/Images/Designs/Piet.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Designs/Piet.jpg -------------------------------------------------------------------------------- /GUI/Images/Handles/Horn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Handles/Horn.jpg -------------------------------------------------------------------------------- /GUI/Images/Handles/Koma.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Handles/Koma.jpg -------------------------------------------------------------------------------- /GUI/Images/Handles/Ror_R.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Handles/Ror_R.jpg -------------------------------------------------------------------------------- /GUI/Images/ManualDrawing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/ManualDrawing.png -------------------------------------------------------------------------------- /GUI/Images/TopViewWalls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/TopViewWalls.png -------------------------------------------------------------------------------- /GUI/Images/AutomaticDrawing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/AutomaticDrawing.png -------------------------------------------------------------------------------- /GUI/Images/Designs/George.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Designs/George.jpg -------------------------------------------------------------------------------- /GUI/Images/Designs/Herman.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Designs/Herman.jpg -------------------------------------------------------------------------------- /GUI/Images/Designs/Johannes.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Designs/Johannes.jpg -------------------------------------------------------------------------------- /GUI/Images/Designs/Leonardo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Designs/Leonardo.jpg -------------------------------------------------------------------------------- /GUI/Images/Designs/Vincent.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Designs/Vincent.jpg -------------------------------------------------------------------------------- /GUI/Images/GlobalSettings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/GlobalSettings.png -------------------------------------------------------------------------------- /GUI/Images/Handles/Hondla.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Handles/Hondla.jpg -------------------------------------------------------------------------------- /GUI/Images/Handles/Ror_DS.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Handles/Ror_DS.jpg -------------------------------------------------------------------------------- /GUI/Images/Handles/Sleeve_R.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Handles/Sleeve_R.jpg -------------------------------------------------------------------------------- /GUI/Images/Designs/Rembrandt.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Designs/Rembrandt.jpg -------------------------------------------------------------------------------- /GUI/Images/Handles/Sleeve_DS.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/Handles/Sleeve_DS.jpg -------------------------------------------------------------------------------- /BusinessLogic/Classes/ExtraParts.cs: -------------------------------------------------------------------------------- 1 | namespace BusinessLogic.Classes 2 | { 3 | public class ExtraParts 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/Handle.cs: -------------------------------------------------------------------------------- 1 | namespace BusinessLogic.Classes.Handles 2 | { 3 | public class Handle 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /GUI/Images/ConstructionOpening.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blue-BigTech/AutoDesk-WPF/HEAD/GUI/Images/ConstructionOpening.png -------------------------------------------------------------------------------- /GUI/Helpers/CurrentGuiInfo.cs: -------------------------------------------------------------------------------- 1 | namespace GUI.Helpers 2 | { 3 | public static class CurrentGuiInfo 4 | { 5 | public static string CurrentProduct { get; set; } = "Hinge"; 6 | } 7 | } -------------------------------------------------------------------------------- /GUI/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /BusinessLogic/Classes/HandleTopView.cs: -------------------------------------------------------------------------------- 1 | namespace BusinessLogic.Classes 2 | { 3 | public class HandleTopView 4 | { 5 | public HandleTopView() 6 | { 7 | 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /GUI/ViewModels/HomeViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Input; 2 | 3 | namespace GUI.ViewModels 4 | { 5 | public class HomeViewModel : ViewModelBase 6 | { 7 | 8 | public HomeViewModel() 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /BusinessLogic/Point.cs: -------------------------------------------------------------------------------- 1 | namespace BusinessLogic 2 | { 3 | public class Point 4 | { 5 | public double X { get; set; } 6 | public double Y { get; set; } 7 | 8 | public Point(double x, double y) 9 | { 10 | X = x; 11 | Y = y; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /GUI/Views/DoorSettingsView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Controls; 3 | using DoorPROGUI.Helpers; 4 | 5 | namespace DoorPROGUI.Views 6 | { 7 | public partial class DoorSettingsView 8 | { 9 | 10 | public DoorSettingsView() 11 | { 12 | 13 | } 14 | 15 | public MainWindow MainWindow { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /GUI/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace GUI 4 | { 5 | /// 6 | /// Interaction logic for App.xaml 7 | /// 8 | public partial class App : Application 9 | { 10 | protected override void OnStartup(StartupEventArgs e) 11 | { 12 | MainWindow = new MainWindow(); 13 | 14 | MainWindow.Show(); 15 | 16 | base.OnStartup(e); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /GUI/Helpers/GuiDisplayValidation.cs: -------------------------------------------------------------------------------- 1 | namespace GUI.Helpers 2 | { 3 | public static class GuiDisplayValidation 4 | { 5 | public static bool IsLeftSlant { get; set; } 6 | public static bool IsRightSlant { get; set; } 7 | public static bool IsSlantLeftTop { get; set; } 8 | public static bool IsSlantRightTop { get; set; } 9 | public static double LeftSlantAmount { get; set; } 10 | public static double RightSlantAmount { get; set; } 11 | 12 | } 13 | } -------------------------------------------------------------------------------- /BusinessLogic/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /GUI/Commands/CommandBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Input; 3 | 4 | namespace GUI.Commands 5 | { 6 | public abstract class CommandBase : ICommand 7 | { 8 | public event EventHandler CanExecuteChanged; 9 | 10 | public virtual bool CanExecute(object parameter) 11 | { 12 | return true; 13 | } 14 | 15 | public abstract void Execute(object parameter); 16 | 17 | protected void OnCanExecuteChanged() 18 | { 19 | CanExecuteChanged?.Invoke(this, EventArgs.Empty); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /GUI/Stores/NavigationStore.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | using GUI.Views; 3 | 4 | namespace GUI.Stores 5 | { 6 | public class NavigationStore 7 | { 8 | public MainWindow MainWindow { get; set; } 9 | public HomeView HomeView { get; set; } 10 | public ProductSelectionView ProductSelectionView { get; set; } 11 | public ConstructionView ConstructView { get; set; } 12 | public GeneralProductView GeneralProductView { get; set; } 13 | public UserControl SpecificProductView { get; set; } 14 | public DesignView DesignView { get; set; } 15 | public HandleView HandleView { get; set; } 16 | public FinishView FinishView { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /GUI/Helpers/GeneralHelp.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | 6 | namespace GUI.Helpers 7 | { 8 | public static class GeneralHelp 9 | { 10 | public static List ReturnListOfClassNames(Type classType) 11 | { 12 | List list = new List(); 13 | 14 | var ChildClasses = Assembly.GetAssembly(classType).GetTypes().Where(myType => myType.IsClass && !myType.IsAbstract && myType.IsSubclassOf(classType)); 15 | 16 | foreach (var instance in ChildClasses) 17 | { 18 | list.Add(instance.Name); 19 | } 20 | 21 | return list; 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /GUI/ViewModels/DesignViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using GUI.Helpers; 3 | 4 | namespace GUI.ViewModels 5 | { 6 | public class DesignViewModel : ViewModelBase 7 | { 8 | private string _selectedDesign; 9 | public List Designs { get; } 10 | public string SelectedDesign 11 | { 12 | get => _selectedDesign; 13 | set 14 | { 15 | _selectedDesign = value; 16 | OnPropertyChanged(nameof(SelectedDesign)); 17 | } 18 | } 19 | 20 | public DesignViewModel() 21 | { 22 | Designs = GeneralHelp.ReturnListOfClassNames(typeof(BusinessLogic.Classes.Design)); 23 | SelectedDesign = Designs[0]; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/ConstructionOpening.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using BusinessLogic.Settings; 4 | 5 | namespace BusinessLogic.Classes 6 | { 7 | public class ConstructionOpening 8 | { 9 | 10 | public ConstructionOpening() 11 | { 12 | } 13 | 14 | private void CalculateOpeningPoints() 15 | { 16 | } 17 | 18 | private void CalculateHelpPoints() 19 | { 20 | 21 | } 22 | 23 | private void CalculateHelpLines() 24 | { 25 | } 26 | 27 | private void CalculateWalls() 28 | { 29 | } 30 | 31 | private void CalculateDimensions() 32 | { 33 | } 34 | 35 | public void Draw() 36 | { 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /GUI/Views/HingeDoorProductView.xaml.cs: -------------------------------------------------------------------------------- 1 | // using System.Windows; 2 | // using System.Windows.Controls; 3 | // using DoorPROGUI.Helpers; 4 | // 5 | // namespace DoorPROGUI.Views 6 | // { 7 | // public partial class HingeDoorProductView : DoorSettingsView 8 | // { 9 | // public ProductSelectionView Psv { get; } 10 | // 11 | // public HingeDoorProductView(ProductSelectionView productSelectionView) : base(productSelectionView) 12 | // { 13 | // Psv = productSelectionView; 14 | // MainWindow = Psv.Cv.Mv; 15 | // InitializeComponent(); 16 | // } 17 | // 18 | // private void BackButton_OnClick(object sender, RoutedEventArgs e) 19 | // { 20 | // MainWindow.MainContent.Children.Clear(); 21 | // MainWindow.MainContent.Children.Add(Psv); 22 | // } 23 | // } 24 | // } -------------------------------------------------------------------------------- /GUI/Commands/InstantiateProductCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | using GUI.Helpers; 4 | using GUI.ViewModels; 5 | 6 | namespace GUI.Commands 7 | { 8 | public class InstantiateProductCommand : CommandBase 9 | { 10 | private MainViewModel Mvm { get; set; } 11 | 12 | public InstantiateProductCommand(MainViewModel mvm) 13 | { 14 | Mvm = mvm; 15 | } 16 | 17 | public override void Execute(object parameter) 18 | { 19 | try 20 | { 21 | Mvm.ProductViewModel = Activator.CreateInstance(Type.GetType($"GUI.ViewModels.ProductViewModels.{CurrentGuiInfo.CurrentProduct}DoorViewModel")) as ViewModelBase; 22 | } 23 | catch (Exception exception) 24 | { 25 | MessageBox.Show(exception.Message); 26 | } 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /GUI/Views/ManualDrawingView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Controls; 3 | using GUI.Views; 4 | using GUI.Stores; 5 | 6 | namespace GUI.Views 7 | { 8 | public partial class ManualDrawingView : UserControl 9 | { 10 | private NavigationStore Nav { get; set; } 11 | public ManualDrawingView(NavigationStore navigationStore) 12 | { 13 | Nav = navigationStore; 14 | 15 | InitializeComponent(); 16 | DataContext = Nav.MainWindow.DataContext; 17 | } 18 | 19 | private void Home_OnClicked(object sender, RoutedEventArgs e) 20 | { 21 | Nav.MainWindow.ContentDisplay.Children.Clear(); 22 | Nav.MainWindow.ContentDisplay.Children.Add(new HomeView(Nav.MainWindow)); 23 | } 24 | 25 | private void SL_Prod_BottomDims_OnClick(object sender, RoutedEventArgs e) 26 | { 27 | MessageBox.Show("Triggered"); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /GUI/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Input; 3 | using GUI.ViewModels; 4 | using GUI.Views; 5 | 6 | namespace GUI 7 | { 8 | /// 9 | /// Interaction logic for MainWindow.xaml 10 | /// 11 | public partial class MainWindow 12 | { 13 | public MainWindow() 14 | { 15 | InitializeComponent(); 16 | DataContext = new MainViewModel(); 17 | ContentDisplay.Children.Add(new HomeView(this)); 18 | } 19 | 20 | //WINDOW COMMANDS 21 | private void ExitApp_Clicked(object sender, RoutedEventArgs e) 22 | { 23 | Close(); 24 | } 25 | 26 | private void MinimizeWindow_Clicked(object sender, RoutedEventArgs e) 27 | { 28 | WindowState = WindowState.Minimized; 29 | } 30 | 31 | private void DragWindow_OnMouseDown(object sender, MouseButtonEventArgs e) 32 | { 33 | DragMove(); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /GUI/Views/FinishView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Controls; 3 | using GUI.Stores; 4 | 5 | namespace GUI.Views 6 | { 7 | public partial class FinishView : UserControl 8 | { 9 | public NavigationStore Nav { get; set; } 10 | public FinishView(NavigationStore navigationStore) 11 | { 12 | Nav = navigationStore; 13 | 14 | InitializeComponent(); 15 | DataContext = Nav.MainWindow.DataContext; 16 | } 17 | 18 | private void Back_HandleView(object sender, RoutedEventArgs e) 19 | { 20 | Nav.MainWindow.ContentDisplay.Children.Clear(); 21 | Nav.MainWindow.ContentDisplay.Children.Add(Nav.HandleView); 22 | } 23 | 24 | private void Back_HomeView(object sender, RoutedEventArgs e) 25 | { 26 | Nav.MainWindow.ContentDisplay.Children.Clear(); 27 | Nav.MainWindow.ContentDisplay.Children.Add(new HomeView(Nav.MainWindow)); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /GUI/AutoCAD.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using Autodesk.AutoCAD.ApplicationServices; 3 | using Autodesk.AutoCAD.DatabaseServices; 4 | using Autodesk.AutoCAD.EditorInput; 5 | using Autodesk.AutoCAD.Runtime; 6 | using GUI; 7 | using AcAp = Autodesk.AutoCAD.ApplicationServices.Application; 8 | using Application = Autodesk.AutoCAD.ApplicationServices.Core.Application; 9 | using Exception = Autodesk.AutoCAD.Runtime.Exception; 10 | 11 | [assembly: CommandClass(typeof(AutoCAD))] 12 | 13 | namespace GUI 14 | { 15 | public static class AutoCAD 16 | { 17 | private static MainWindow Window { get; set; } 18 | 19 | [CommandMethod("doorpro")] 20 | public static void CreateDoorPROGUI() 21 | { 22 | Window = new MainWindow(); 23 | 24 | Application.ShowModelessWindow(Window); 25 | } 26 | 27 | public static void HideDoorPROGUI() 28 | { 29 | Window.Hide(); 30 | } 31 | 32 | public static void ShowDoorPROGUI() 33 | { 34 | Window.Show(); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/Handles/DefaultHandle.cs: -------------------------------------------------------------------------------- 1 | namespace BusinessLogic.Classes.Handles 2 | { 3 | public class DefaultHandle : Handle 4 | { 5 | public string Name { get; set; } = "Default Handle"; 6 | public int NumberOfAdapters { get; set; } 7 | public bool HasRoundHandle { get; set; } 8 | public bool NeedsHandlePlate { get; set; } 9 | public bool IsAdapterFulGripHeight { get; set; } 10 | public double WallThickness { get; set; } 11 | public double GripWidth { get; set; } 12 | public double GripThickness { get; set; } 13 | public double GripExtension { get; set; } 14 | 15 | public double HandleOffsetFromAdapter { get; set; } 16 | public double AdapterWidth { get; set; } 17 | public double AdapterHeight { get; set; } 18 | public double AdapterThickness { get; set; } 19 | 20 | 21 | public DefaultHandle() 22 | { 23 | 24 | } 25 | 26 | public HandleTopView CalculateTopView(Element element) 27 | { 28 | return new HandleTopView(); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /GUI/Commands/DrawCommands/DrawProductCommand.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using BusinessLogic.Classes; 3 | using BusinessLogic.Classes.Datas; 4 | using BusinessLogic.Settings; 5 | using GUI.ViewModels; 6 | 7 | namespace GUI.Commands.DrawCommands 8 | { 9 | public class DrawProductCommand : CommandBase 10 | { 11 | private MainViewModel Mvm { get; set; } 12 | 13 | public DrawProductCommand(MainViewModel mvm) 14 | { 15 | Mvm = mvm; 16 | } 17 | public override void Execute(object parameter) 18 | { 19 | // AutoCAD.CreateLoading(); 20 | 21 | CurrentDrawInfo.ResetCurrentDrawInfo(); 22 | 23 | Data data = Mvm.ProductViewModel.ParseData(); 24 | HingeData hingeData = (HingeData) data; 25 | 26 | System.Windows.Forms.MessageBox.Show("Is Closing strip: " + hingeData.IsClosingStripOnlyTop.ToString()); 27 | 28 | // Get the factory method and draw the product 29 | MessageBox.Show("Product is drawn."); 30 | // AutoCAD.CloseLoading(); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /GUI/ViewModels/MainViewModel.cs: -------------------------------------------------------------------------------- 1 | using GUI.Commands; 2 | using GUI.Commands.DrawCommands; 3 | 4 | namespace GUI.ViewModels 5 | { 6 | public class MainViewModel : ViewModelBase 7 | { 8 | public ConstructionViewModel ConstructionViewModel { get; set; } 9 | public GeneralProductViewModel GeneralProductViewModel { get; set; } 10 | public DesignViewModel DesignViewModel { get; set; } 11 | public HandleViewModel HandleViewModel { get; set; } 12 | public ViewModelBase ProductViewModel { get; set; } 13 | public DrawProductCommand DrawCommand { get; set; } 14 | public InstantiateProductCommand InstantiateProduct { get; set; } 15 | 16 | public MainViewModel() 17 | { 18 | ConstructionViewModel = new ConstructionViewModel(); 19 | GeneralProductViewModel = new GeneralProductViewModel(); 20 | DesignViewModel = new DesignViewModel(); 21 | HandleViewModel = new HandleViewModel(); 22 | 23 | DrawCommand = new DrawProductCommand(this); 24 | InstantiateProduct = new InstantiateProductCommand(this); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /GUI/Views/DesignView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Input; 3 | 4 | namespace DoorPROGUI.Views 5 | { 6 | public partial class DesignView 7 | { 8 | // private DoorSettingsBase DoorSettings { get; set; } 9 | public MainWindow MainWindow { get; } 10 | public DesignView() 11 | { 12 | // MainWindow = doorSettings.MainWindow; 13 | // DoorSettings = doorSettings; 14 | 15 | InitializeComponent(); 16 | } 17 | 18 | private void GoHome(object sender, MouseButtonEventArgs e) 19 | { 20 | MainWindow.MainContent.Children.Clear(); 21 | MainWindow.MainContent.Children.Add(new HomeView()); 22 | } 23 | 24 | private void Back_OnClicked(object sender, RoutedEventArgs e) 25 | { 26 | MainWindow.MainContent.Children.Clear(); 27 | // MainWindow.MainContent.Children.Add(); 28 | } 29 | 30 | private void HandlesButton_OnClick(object sender, RoutedEventArgs e) 31 | { 32 | MainWindow.MainContent.Children.Clear(); 33 | MainWindow.MainContent.Children.Add(new HandleView(this)); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/Design.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace BusinessLogic.Classes 4 | { 5 | public abstract class Design 6 | { 7 | public abstract string Name { get; set; } 8 | public abstract double NumberOfHorizontalProfileGroups { get; set; } 9 | public abstract double NumberOfVerticalProfileGroups { get; set; } 10 | public abstract double NumberOfGlassPanels { get; set; } 11 | public abstract double NumberOfSteelPlates { get; set; } 12 | public abstract bool CanBeMirrored { get; set; } 13 | public abstract bool IsBottomGlassCustom { get; set; } 14 | 15 | 16 | // V PRODUCTU KJER SE REFLECTIONIRA SE UPORAB CONSTRUCTOR: (Data data, ConstructionOpening co, double doorHeight) 17 | // Prazen construktor se rabi za reflection v gui da se prebere št vert profilov in če je mirrored 18 | 19 | 20 | 21 | public abstract void CalculateSidelightDesign(Element element, Data data, Dictionary clientElementProfiles); 22 | public abstract void CalculateDoorDesign(Element element, Data data, Dictionary clientElementProfiles); 23 | } 24 | 25 | public class Element 26 | { 27 | } 28 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/Designs/Lucas.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace BusinessLogic.Classes.Designs 4 | 5 | { 6 | public class Lucas : Design 7 | { 8 | public override string Name { get; set; } = "Lucas"; 9 | public sealed override double NumberOfHorizontalProfileGroups { get; set; } = 2; 10 | public override double NumberOfVerticalProfileGroups { get; set; } = 0; 11 | public override double NumberOfGlassPanels { get; set; } = 3; 12 | public override double NumberOfSteelPlates { get; set; } = 0; 13 | public override bool CanBeMirrored { get; set; } 14 | public override bool IsBottomGlassCustom { get; set; } = true; 15 | 16 | public Lucas() 17 | { 18 | 19 | } 20 | 21 | public Lucas(Data data, ConstructionOpening co, double doorHeight) 22 | { 23 | } 24 | 25 | 26 | public override void CalculateSidelightDesign(Element element, Data data, Dictionary clientElementProfiles) 27 | { 28 | } 29 | 30 | public override void CalculateDoorDesign(Element element, Data data, Dictionary clientElementProfiles) 31 | { 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/Designs/Pablo.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace BusinessLogic.Classes.Designs 4 | 5 | { 6 | public class Pablo : Design 7 | { 8 | public override string Name { get; set; } = "Pablo"; 9 | public sealed override double NumberOfHorizontalProfileGroups { get; set; } = 3; 10 | public override double NumberOfVerticalProfileGroups { get; set; } = 0; 11 | public override double NumberOfGlassPanels { get; set; } = 4; 12 | public override double NumberOfSteelPlates { get; set; } = 0; 13 | public override bool CanBeMirrored { get; set; } 14 | public override bool IsBottomGlassCustom { get; set; } 15 | 16 | public Pablo() 17 | { 18 | 19 | } 20 | 21 | public Pablo(Data data, ConstructionOpening co, double doorHeight) 22 | { 23 | } 24 | 25 | 26 | public override void CalculateSidelightDesign(Element element, Data data, Dictionary clientElementProfiles) 27 | { 28 | } 29 | 30 | public override void CalculateDoorDesign(Element element, Data data, Dictionary clientElementProfiles) 31 | { 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/Designs/Vincent.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace BusinessLogic.Classes.Designs 4 | 5 | { 6 | public class Vincent : Design 7 | { 8 | public override string Name { get; set; } = "Vincent"; 9 | public sealed override double NumberOfHorizontalProfileGroups { get; set; } = 1; 10 | public override double NumberOfVerticalProfileGroups { get; set; } = 1; 11 | public override double NumberOfGlassPanels { get; set; } = 2; 12 | public override double NumberOfSteelPlates { get; set; } = 1; 13 | public override bool CanBeMirrored { get; set; } 14 | public override bool IsBottomGlassCustom { get; set; } = true; 15 | 16 | public Vincent() 17 | { 18 | 19 | } 20 | 21 | public Vincent(Data data, ConstructionOpening co, double doorHeight) 22 | { 23 | } 24 | 25 | 26 | public override void CalculateSidelightDesign(Element element, Data data, Dictionary clientElementProfiles) 27 | { 28 | } 29 | 30 | public override void CalculateDoorDesign(Element element, Data data, Dictionary clientElementProfiles) 31 | { 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/Designs/Leonardo.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace BusinessLogic.Classes.Designs 4 | 5 | { 6 | public class Leonardo : Design 7 | { 8 | public override string Name { get; set; } = "Leonardo"; 9 | public sealed override double NumberOfHorizontalProfileGroups { get; set; } = 2; 10 | public override double NumberOfVerticalProfileGroups { get; set; } = 0; 11 | public override double NumberOfGlassPanels { get; set; } = 3; 12 | public override double NumberOfSteelPlates { get; set; } = 0; 13 | public override bool CanBeMirrored { get; set; } 14 | public override bool IsBottomGlassCustom { get; set; } 15 | 16 | public Leonardo() 17 | { 18 | 19 | } 20 | 21 | public Leonardo(Data data, ConstructionOpening co, double doorHeight) 22 | { 23 | } 24 | 25 | 26 | public override void CalculateSidelightDesign(Element element, Data data, Dictionary clientElementProfiles) 27 | { 28 | } 29 | 30 | public override void CalculateDoorDesign(Element element, Data data, Dictionary clientElementProfiles) 31 | { 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/Designs/Karel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace BusinessLogic.Classes.Designs 4 | 5 | { 6 | public class Karel : Design 7 | { 8 | public override string Name { get; set; } = "Karel"; 9 | public sealed override double NumberOfHorizontalProfileGroups { get; set; } = 2; 10 | public override double NumberOfVerticalProfileGroups { get; set; } = 1; 11 | public override double NumberOfGlassPanels { get; set; } = 6; 12 | public override double NumberOfSteelPlates { get; set; } = 0; 13 | public override bool CanBeMirrored { get; set; } = true; 14 | public override bool IsBottomGlassCustom { get; set; } = true; 15 | 16 | public Karel() 17 | { 18 | 19 | } 20 | 21 | public Karel(Data data, ConstructionOpening co, double doorHeight) 22 | { 23 | } 24 | 25 | 26 | public override void CalculateSidelightDesign(Element element, Data data, Dictionary clientElementProfiles) 27 | { 28 | 29 | } 30 | 31 | public override void CalculateDoorDesign(Element element, Data data, Dictionary clientElementProfiles) 32 | { 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/Designs/Rembrandt.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace BusinessLogic.Classes.Designs 4 | 5 | { 6 | public class Rembrandt : Design 7 | { 8 | public override string Name { get; set; } = "Rembrandt"; 9 | public sealed override double NumberOfHorizontalProfileGroups { get; set; } = 1; 10 | public override double NumberOfVerticalProfileGroups { get; set; } = 1; 11 | public override double NumberOfGlassPanels { get; set; } = 4; 12 | public override double NumberOfSteelPlates { get; set; } = 0; 13 | public override bool CanBeMirrored { get; set; } = true; 14 | public override bool IsBottomGlassCustom { get; set; } = true; 15 | 16 | public Rembrandt() 17 | { 18 | 19 | } 20 | 21 | public Rembrandt(Data data, ConstructionOpening co, double doorHeight) 22 | { 23 | } 24 | 25 | 26 | public override void CalculateSidelightDesign(Element element, Data data, Dictionary clientElementProfiles) 27 | { 28 | } 29 | 30 | public override void CalculateDoorDesign(Element element, Data data, Dictionary clientElementProfiles) 31 | { 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/Designs/Piet.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using BusinessLogic.Settings; 3 | 4 | namespace BusinessLogic.Classes.Designs 5 | 6 | { 7 | public class Piet : Design 8 | { 9 | public override string Name { get; set; } = "Piet"; 10 | public sealed override double NumberOfHorizontalProfileGroups { get; set; } = 2; 11 | public override double NumberOfVerticalProfileGroups { get; set; } = 1; 12 | public override double NumberOfGlassPanels { get; set; } = 5; 13 | public override double NumberOfSteelPlates { get; set; } = 1; 14 | public override bool CanBeMirrored { get; set; } = true; 15 | public override bool IsBottomGlassCustom { get; set; } = true; 16 | 17 | public Piet() 18 | { 19 | 20 | } 21 | 22 | public Piet(Data data, ConstructionOpening co, double doorHeight) 23 | { 24 | } 25 | 26 | 27 | public override void CalculateSidelightDesign(Element element, Data data, Dictionary clientElementProfiles) 28 | { 29 | } 30 | 31 | public override void CalculateDoorDesign(Element element, Data data, Dictionary clientElementProfiles) 32 | { 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/Designs/Claude.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace BusinessLogic.Classes.Designs 4 | 5 | { 6 | public class Claude : Design 7 | { 8 | public override string Name { get; set; } = "Claude"; 9 | public sealed override double NumberOfHorizontalProfileGroups { get; set; } = 1; 10 | public override double NumberOfVerticalProfileGroups { get; set; } = 1; 11 | public override double NumberOfGlassPanels { get; set; } = 4; 12 | public override double NumberOfSteelPlates { get; set; } = 0; 13 | public override bool CanBeMirrored { get; set; } 14 | public override bool IsBottomGlassCustom { get; set; } 15 | 16 | public Claude() 17 | { 18 | 19 | } 20 | public Claude(Data data, ConstructionOpening co, double doorHeight) 21 | { 22 | 23 | } 24 | 25 | 26 | public override void CalculateSidelightDesign(Element element, Data data, Dictionary clientElementProfiles) 27 | { 28 | 29 | } 30 | public override void CalculateDoorDesign(Element element, Data data, Dictionary clientElementProfiles) 31 | { 32 | 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/Designs/Albert.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace BusinessLogic.Classes.Designs 4 | 5 | { 6 | public class Albert : Design 7 | { 8 | public override string Name { get; set; } = "Albert"; 9 | public sealed override double NumberOfHorizontalProfileGroups { get; set; } = 2; 10 | public override double NumberOfVerticalProfileGroups { get; set; } = 1; 11 | public override double NumberOfGlassPanels { get; set; } = 6; 12 | public override double NumberOfSteelPlates { get; set; } = 0; 13 | public override bool CanBeMirrored { get; set; } 14 | public override bool IsBottomGlassCustom { get; set; } 15 | 16 | public Albert() 17 | { 18 | 19 | } 20 | 21 | public Albert(Data data, ConstructionOpening co, double doorHeight) 22 | { 23 | 24 | } 25 | 26 | public override void CalculateSidelightDesign(Element element, Data data, Dictionary clientElementProfiles) 27 | { 28 | 29 | } 30 | 31 | public override void CalculateDoorDesign(Element element, Data data, Dictionary clientElementProfiles) 32 | { 33 | 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/Designs/George.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace BusinessLogic.Classes.Designs 4 | 5 | { 6 | public class George : Design 7 | { 8 | public override string Name { get; set; } = "George"; 9 | public sealed override double NumberOfHorizontalProfileGroups { get; set; } = 0; 10 | public override double NumberOfVerticalProfileGroups { get; set; } = 0; 11 | public override double NumberOfGlassPanels { get; set; } = 1; 12 | public override double NumberOfSteelPlates { get; set; } = 0; 13 | public override bool CanBeMirrored { get; set; } 14 | public override bool IsBottomGlassCustom { get; set; } 15 | 16 | public George() 17 | { 18 | 19 | } 20 | 21 | public George(Data data, ConstructionOpening co, double doorHeight) 22 | { 23 | 24 | } 25 | 26 | public override void CalculateSidelightDesign(Element element, Data data, Dictionary clientElementProfiles) 27 | { 28 | 29 | } 30 | 31 | public override void CalculateDoorDesign(Element element, Data data, Dictionary clientElementProfiles) 32 | { 33 | 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/Designs/Herman.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace BusinessLogic.Classes.Designs 4 | 5 | { 6 | public class Herman : Design 7 | { 8 | public override string Name { get; set; } = "Herman"; 9 | public sealed override double NumberOfHorizontalProfileGroups { get; set; } = 2; 10 | public override double NumberOfVerticalProfileGroups { get; set; } = 0; 11 | public override double NumberOfGlassPanels { get; set; } = 3; 12 | public override double NumberOfSteelPlates { get; set; } = 0; 13 | public override bool CanBeMirrored { get; set; } 14 | public override bool IsBottomGlassCustom { get; set; } 15 | 16 | public Herman() 17 | { 18 | 19 | } 20 | 21 | public Herman(Data data, ConstructionOpening co, double doorHeight) 22 | { 23 | 24 | } 25 | 26 | 27 | public override void CalculateSidelightDesign(Element element, Data data, Dictionary clientElementProfiles) 28 | { 29 | 30 | } 31 | 32 | public override void CalculateDoorDesign(Element element, Data data, Dictionary clientElementProfiles) 33 | { 34 | 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /BusinessLogic/Classes/Designs/Anton.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace BusinessLogic.Classes.Designs 4 | 5 | { 6 | public class Anton : Design 7 | { 8 | public override string Name { get; set; } = "Anton"; 9 | public sealed override double NumberOfHorizontalProfileGroups { get; set; } = 4; 10 | public override double NumberOfVerticalProfileGroups { get; set; } = 0; 11 | public override double NumberOfGlassPanels { get; set; } = 5; 12 | public override double NumberOfSteelPlates { get; set; } = 0; 13 | public override bool CanBeMirrored { get; set; } 14 | public override bool IsBottomGlassCustom { get; set; } 15 | 16 | public Anton() 17 | { 18 | 19 | } 20 | 21 | public Anton(Data data, ConstructionOpening co, double doorHeight) 22 | { 23 | 24 | } 25 | 26 | 27 | public override void CalculateSidelightDesign(Element element, Data data, Dictionary clientElementProfiles) 28 | { 29 | 30 | } 31 | 32 | public override void CalculateDoorDesign(Element element, Data data, Dictionary clientElementProfiles) 33 | { 34 | 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/Designs/Govert.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace BusinessLogic.Classes.Designs 4 | 5 | { 6 | public class Govert : Design 7 | { 8 | public override string Name { get; set; } = "Govert"; 9 | public sealed override double NumberOfHorizontalProfileGroups { get; set; } = 1; 10 | public override double NumberOfVerticalProfileGroups { get; set; } = 0; 11 | public override double NumberOfGlassPanels { get; set; } = 2; 12 | public override double NumberOfSteelPlates { get; set; } = 0; 13 | public override bool CanBeMirrored { get; set; } 14 | public override bool IsBottomGlassCustom { get; set; } = true; 15 | 16 | public Govert() 17 | { 18 | 19 | } 20 | 21 | public Govert(Data data, ConstructionOpening co, double doorHeight) 22 | { 23 | 24 | } 25 | 26 | 27 | public override void CalculateSidelightDesign(Element element, Data data, Dictionary clientElementProfiles) 28 | { 29 | 30 | } 31 | 32 | public override void CalculateDoorDesign(Element element, Data data, Dictionary clientElementProfiles) 33 | { 34 | 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/Designs/Johannes.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace BusinessLogic.Classes.Designs 4 | 5 | { 6 | public class Johannes : Design 7 | { 8 | public override string Name { get; set; } = "Johannes"; 9 | public sealed override double NumberOfHorizontalProfileGroups { get; set; } = 3; 10 | public override double NumberOfVerticalProfileGroups { get; set; } = 1; 11 | public override double NumberOfGlassPanels { get; set; } = 8; 12 | public override double NumberOfSteelPlates { get; set; } = 0; 13 | public override bool CanBeMirrored { get; set; } 14 | public override bool IsBottomGlassCustom { get; set; } 15 | 16 | public Johannes() 17 | { 18 | 19 | } 20 | 21 | public Johannes(Data data, ConstructionOpening co, double doorHeight) 22 | { 23 | 24 | } 25 | 26 | 27 | public override void CalculateSidelightDesign(Element element, Data data, Dictionary clientElementProfiles) 28 | { 29 | 30 | } 31 | 32 | public override void CalculateDoorDesign(Element element, Data data, Dictionary clientElementProfiles) 33 | { 34 | 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /GUI/Views/DesignView.cs.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using GUI.Views; 3 | using GUI.Stores; 4 | 5 | namespace GUI.Views 6 | { 7 | public partial class DesignView 8 | { 9 | private NavigationStore Nav { get; set; } 10 | public DesignView(NavigationStore navigationStore) 11 | { 12 | Nav = navigationStore; 13 | Nav.DesignView = this; 14 | 15 | InitializeComponent(); 16 | DataContext = Nav.MainWindow.DataContext; 17 | } 18 | 19 | private void Back_SpecificProductView(object sender, RoutedEventArgs e) 20 | { 21 | Nav.MainWindow.ContentDisplay.Children.Clear(); 22 | Nav.MainWindow.ContentDisplay.Children.Add(Nav.SpecificProductView); 23 | } 24 | private void Back_HomeView(object sender, RoutedEventArgs e) 25 | { 26 | Nav.MainWindow.ContentDisplay.Children.Clear(); 27 | Nav.MainWindow.ContentDisplay.Children.Add(new HomeView(Nav.MainWindow)); 28 | } 29 | private void Next_HandleView(object sender, RoutedEventArgs e) 30 | { 31 | Nav.MainWindow.ContentDisplay.Children.Clear(); 32 | Nav.MainWindow.ContentDisplay.Children.Add(Nav.HandleView ?? new HandleView(Nav)); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /GUI/Views/HandleView.xaml.cs: -------------------------------------------------------------------------------- 1 | // using System.Windows; 2 | // using System.Windows.Input; 3 | // 4 | // namespace DoorPROGUI.Views 5 | // { 6 | // public partial class HandleView 7 | // { 8 | // private DesignView DesignView { get; } 9 | // public MainWindow MainWindow { get; } 10 | // 11 | // public HandleView(DesignView designView) 12 | // { 13 | // MainWindow = designView.MainWindow; 14 | // DesignView = designView; 15 | // InitializeComponent(); 16 | // } 17 | // 18 | // private void GoHome(object sender, MouseButtonEventArgs e) 19 | // { 20 | // MainWindow.MainContent.Children.Clear(); 21 | // MainWindow.MainContent.Children.Add(new HomeView()); 22 | // } 23 | // 24 | // private void Back_OnClicked(object sender, RoutedEventArgs routedEventArgs) 25 | // { 26 | // MainWindow.MainContent.Children.Clear(); 27 | // MainWindow.MainContent.Children.Add(DesignView); 28 | // } 29 | // 30 | // private void Overview_OnClicked(object sender, RoutedEventArgs e) 31 | // { 32 | // MainWindow.MainContent.Children.Clear(); 33 | // MainWindow.MainContent.Children.Add(new FinishView(this)); 34 | // } 35 | // } 36 | // } -------------------------------------------------------------------------------- /GUI/Views/ProductViews/HingeView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using GUI.Stores; 3 | 4 | namespace GUI.Views.ProductViews 5 | { 6 | public partial class HingeDoorView 7 | { 8 | private NavigationStore Nav { get; set; } 9 | 10 | public HingeDoorView(NavigationStore navigationStore) 11 | { 12 | Nav = navigationStore; 13 | Nav.SpecificProductView = this; 14 | 15 | InitializeComponent(); 16 | DataContext = Nav.MainWindow.DataContext; 17 | } 18 | 19 | 20 | private void Back_GeneralProductView(object sender, RoutedEventArgs e) 21 | { 22 | Nav.MainWindow.ContentDisplay.Children.Clear(); 23 | Nav.MainWindow.ContentDisplay.Children.Add(Nav.GeneralProductView); 24 | } 25 | 26 | private void Back_HomeView(object sender, RoutedEventArgs e) 27 | { 28 | Nav.MainWindow.ContentDisplay.Children.Clear(); 29 | Nav.MainWindow.ContentDisplay.Children.Add(new HomeView(Nav.MainWindow)); 30 | } 31 | private void Next_DesignView(object sender, RoutedEventArgs e) 32 | { 33 | Nav.MainWindow.ContentDisplay.Children.Clear(); 34 | Nav.MainWindow.ContentDisplay.Children.Add(Nav.DesignView ?? new DesignView(Nav)); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /GUI/Views/ProductViews/PivotView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Globalization; 2 | using System.Windows; 3 | using GUI.Helpers; 4 | using GUI.Stores; 5 | 6 | namespace GUI.Views.ProductViews 7 | { 8 | public partial class PivotDoorView 9 | { 10 | private NavigationStore Nav { get; set; } 11 | public PivotDoorView(NavigationStore navigationStore) 12 | { 13 | Nav = navigationStore; 14 | Nav.SpecificProductView = this; 15 | InitializeComponent(); 16 | DataContext = Nav.MainWindow.DataContext; 17 | } 18 | 19 | private void Back_GeneralProductView(object sender, RoutedEventArgs e) 20 | { 21 | Nav.MainWindow.ContentDisplay.Children.Clear(); 22 | Nav.MainWindow.ContentDisplay.Children.Add(Nav.GeneralProductView); 23 | } 24 | 25 | private void Back_HomeView(object sender, RoutedEventArgs e) 26 | { 27 | Nav.MainWindow.ContentDisplay.Children.Clear(); 28 | Nav.MainWindow.ContentDisplay.Children.Add(new HomeView(Nav.MainWindow)); 29 | } 30 | private void Next_DesignView(object sender, RoutedEventArgs e) 31 | { 32 | Nav.MainWindow.ContentDisplay.Children.Clear(); 33 | Nav.MainWindow.ContentDisplay.Children.Add(Nav.DesignView ?? new DesignView(Nav)); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/Handles/Ror_R.cs: -------------------------------------------------------------------------------- 1 | using BusinessLogic.Settings; 2 | 3 | namespace BusinessLogic.Classes.Handles 4 | { 5 | public class Ror_R : Handle 6 | { 7 | public string Name { get; set; } = "Ror_R"; 8 | public int NumberOfAdapters { get; set; } = 2; 9 | public bool HasRoundHandle { get; set; } = true; 10 | public bool NeedsHandlePlate { get; set; } = true; 11 | public bool IsAdapterFulGripHeight { get; set; } 12 | public double WallThickness { get; set; } = GlobalSettings.DafaultHandleWallThickness; 13 | public double GripWidth { get; set; } = 21; 14 | public double GripThickness { get; set; } = 21; 15 | public double GripExtension { get; set; } 16 | public double HandleOffsetFromAdapter { get; set; } 17 | public double AdapterWidth { get; set; } = 21; 18 | public double AdapterHeight { get; set; } = 21; 19 | public double AdapterThickness { get; set; } = 40; 20 | 21 | public Ror_R() 22 | { 23 | 24 | } 25 | 26 | public Ror_R(Element element, Data data, ConstructionOpening co) { } 27 | 28 | public HandleTopView CalculateTopView(Element element) 29 | { 30 | HandleTopView handleTopView = new HandleTopView(); 31 | 32 | return handleTopView; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/Handles/Sleeve_R.cs: -------------------------------------------------------------------------------- 1 | using BusinessLogic.Settings; 2 | 3 | namespace BusinessLogic.Classes.Handles 4 | { 5 | public class Sleeve_R : Handle 6 | { 7 | public string Name { get; set; } = "Sleeve_R"; 8 | public int NumberOfAdapters { get; set; } = 2; 9 | public bool HasRoundHandle { get; set; } 10 | public bool NeedsHandlePlate { get; set; } = true; 11 | public bool IsAdapterFulGripHeight { get; set; } 12 | public double WallThickness { get; set; } = GlobalSettings.DafaultHandleWallThickness; 13 | public double GripWidth { get; set; } = 30; 14 | public double GripThickness { get; set; } = 20; 15 | public double GripExtension { get; set; } 16 | public double HandleOffsetFromAdapter { get; set; } 17 | public double AdapterWidth { get; set; } = 30; 18 | public double AdapterHeight { get; set; } = 30; 19 | public double AdapterThickness { get; set; } = 30; 20 | 21 | public Sleeve_R() 22 | { 23 | 24 | } 25 | 26 | public Sleeve_R(Element element, Data data, ConstructionOpening co) { } 27 | 28 | public HandleTopView CalculateTopView(Element element) 29 | { 30 | HandleTopView handleTopView = new HandleTopView { }; 31 | 32 | return handleTopView; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/Handles/Ror_DS.cs: -------------------------------------------------------------------------------- 1 | using BusinessLogic.Settings; 2 | 3 | namespace BusinessLogic.Classes.Handles 4 | { 5 | public class Ror_DS : Handle 6 | { 7 | public string Name { get; set; } = "Ror_DS"; 8 | public int NumberOfAdapters { get; set; } = 2; 9 | public bool HasRoundHandle { get; set; } = true; 10 | public bool NeedsHandlePlate { get; set; } = true; 11 | public bool IsAdapterFulGripHeight { get; set; } 12 | public double WallThickness { get; set; } = GlobalSettings.DafaultHandleWallThickness; 13 | public double GripWidth { get; set; } = 21; 14 | public double GripThickness { get; set; } = 21; 15 | public double GripExtension { get; set; } = 30; 16 | public double HandleOffsetFromAdapter { get; set; } 17 | public double AdapterWidth { get; set; } = 21; 18 | public double AdapterHeight { get; set; } = 21; 19 | public double AdapterThickness { get; set; } = 40; 20 | 21 | public Ror_DS() 22 | { 23 | 24 | } 25 | 26 | public Ror_DS(Element element, Data data, ConstructionOpening co) { } 27 | 28 | public HandleTopView CalculateTopView(Element element) 29 | { 30 | HandleTopView handleTopView = new HandleTopView { }; 31 | 32 | return handleTopView; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/Handles/Hondla.cs: -------------------------------------------------------------------------------- 1 | using BusinessLogic.Settings; 2 | 3 | namespace BusinessLogic.Classes.Handles 4 | { 5 | public class Hondla : Handle 6 | { 7 | public string Name { get; set; } = "Hondla"; 8 | public int NumberOfAdapters { get; set; } = 2; 9 | public bool HasRoundHandle { get; set; } 10 | public bool NeedsHandlePlate { get; set; } 11 | public bool IsAdapterFulGripHeight { get; set; } 12 | public double WallThickness { get; set; } = GlobalSettings.DafaultHandleWallThickness; 13 | public double GripWidth { get; set; } = 20; 14 | public double GripThickness { get; set; } = 20; 15 | public double GripExtension { get; set; } 16 | public double HandleOffsetFromAdapter { get; set; } = 40; 17 | public double AdapterWidth { get; set; } = 20; 18 | public double AdapterHeight { get; set; } = 20; 19 | public double AdapterThickness { get; set; } = 20; 20 | 21 | public Hondla() 22 | { 23 | 24 | } 25 | 26 | public Hondla(Element element, Data data, ConstructionOpening co) 27 | { 28 | 29 | } 30 | 31 | public HandleTopView CalculateTopView(Element element) 32 | { 33 | HandleTopView handleTopView = new HandleTopView(); 34 | 35 | return handleTopView; 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/Handles/Horn.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using BusinessLogic.Settings; 3 | 4 | namespace BusinessLogic.Classes.Handles 5 | { 6 | public class Horn : Handle 7 | { 8 | public string Name { get; set; } = "Horn"; 9 | public int NumberOfAdapters { get; set; } = 1; 10 | public bool HasRoundHandle { get; set; } 11 | public bool NeedsHandlePlate { get; set; } 12 | public bool IsAdapterFulGripHeight { get; set; } = true; 13 | public double WallThickness { get; set; } = 3; 14 | public double GripWidth { get; set; } = 30; 15 | public double GripThickness { get; set; } = 3; 16 | public double GripExtension { get; set; } 17 | public double HandleOffsetFromAdapter { get; set; } 18 | 19 | public double AdapterWidth { get; set; } = 3; 20 | public double AdapterHeight { get => 9999; set { } } 21 | 22 | public double AdapterThickness { get; set; } = 27; 23 | 24 | public Horn() 25 | { 26 | 27 | } 28 | 29 | public Horn(Element element, Data data, ConstructionOpening co) 30 | { 31 | 32 | } 33 | 34 | public HandleTopView CalculateTopView(Element element) 35 | { 36 | HandleTopView handleTopView = new HandleTopView { }; 37 | 38 | return handleTopView; 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /GUI/Views/ProductSelectionView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | using System.Windows.Controls; 4 | using System.Windows.Media; 5 | using BusinessLogic.Classes; 6 | using BusinessLogic.Settings; 7 | using GUI.Commands; 8 | using GUI.Views; 9 | using GUI.ViewModels; 10 | using GUI.Views.ProductViews; 11 | using GUI.Helpers; 12 | using GUI.Stores; 13 | 14 | namespace GUI.Views 15 | { 16 | public partial class ProductSelectionView 17 | { 18 | private NavigationStore Nav { get; set; } 19 | public ProductSelectionView(NavigationStore navigationStore) 20 | { 21 | Nav = navigationStore; 22 | Nav.ProductSelectionView = this; 23 | 24 | InitializeComponent(); 25 | DataContext = Nav.MainWindow.DataContext; 26 | } 27 | 28 | private void Next_OnClicked(object sender, RoutedEventArgs e) 29 | { 30 | CurrentGuiInfo.CurrentProduct = ((RadioButton) sender).Tag as string; 31 | 32 | Nav.MainWindow.ContentDisplay.Children.Clear(); 33 | Nav.MainWindow.ContentDisplay.Children.Add(new ConstructionView(Nav, false)); 34 | } 35 | 36 | private void Back_HomeView(object sender, RoutedEventArgs e) 37 | { 38 | Nav.MainWindow.ContentDisplay.Children.Clear(); 39 | Nav.MainWindow.ContentDisplay.Children.Add(new HomeView(Nav.MainWindow)); 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /BusinessLogic/Classes/Handles/Sleeve_DS.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using BusinessLogic.Settings; 3 | 4 | namespace BusinessLogic.Classes.Handles 5 | { 6 | public class Sleeve_DS : Handle 7 | { 8 | public string Name { get; set; } = "Sleeve_DS"; 9 | public int NumberOfAdapters { get; set; } = 2; 10 | public bool HasRoundHandle { get; set; } 11 | public bool NeedsHandlePlate { get; set; } = true; 12 | public bool IsAdapterFulGripHeight { get; set; } 13 | public double WallThickness { get; set; } = GlobalSettings.DafaultHandleWallThickness; 14 | public double GripWidth { get; set; } = 30; 15 | public double GripThickness { get; set; } = 20; 16 | public double GripExtension { get; set; } = 30; 17 | public double HandleOffsetFromAdapter { get; set; } 18 | public double AdapterWidth { get; set; } = 30; 19 | public double AdapterHeight { get; set; } = 30; 20 | public double AdapterThickness { get; set; } = 30; 21 | 22 | public Sleeve_DS() 23 | { 24 | 25 | } 26 | 27 | public Sleeve_DS(Element element, Data data, ConstructionOpening co) 28 | { 29 | } 30 | 31 | public HandleTopView CalculateTopView(Element element) 32 | { 33 | HandleTopView handleTopView = new HandleTopView { }; 34 | 35 | return handleTopView; 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /BusinessLogic/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("BusinessLogic")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("BusinessLogic")] 12 | [assembly: AssemblyCopyright("Copyright © 2022")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("5C27B3A4-B9B9-4C7F-8522-03A6502E0280")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /GUI/Views/ConstructionView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Reflection; 3 | using System.Windows; 4 | using GUI.Views; 5 | using GUI.Stores; 6 | 7 | namespace GUI.Views 8 | { 9 | public partial class ConstructionView 10 | { 11 | private NavigationStore Nav { get; set; } 12 | public ConstructionView(NavigationStore navigationStore, bool standAloneOpening) 13 | { 14 | Nav = navigationStore; 15 | Nav.ConstructView = this; 16 | 17 | InitializeComponent(); 18 | DataContext = Nav.MainWindow.DataContext; 19 | 20 | if (standAloneOpening) 21 | { 22 | DrawOpening.Visibility = Visibility.Visible; 23 | GeneralProductSelection.Visibility = Visibility.Collapsed; 24 | } 25 | else 26 | { 27 | DrawOpening.Visibility = Visibility.Collapsed; 28 | GeneralProductSelection.Visibility = Visibility.Visible; 29 | } 30 | } 31 | 32 | private void Back_HomeView(object sender, RoutedEventArgs e) 33 | { 34 | Nav.MainWindow.ContentDisplay.Children.Clear(); 35 | Nav.MainWindow.ContentDisplay.Children.Add(new HomeView(Nav.MainWindow)); 36 | } 37 | 38 | private void Next_GeneralProductView(object sender, RoutedEventArgs e) 39 | { 40 | Nav.MainWindow.ContentDisplay.Children.Clear(); 41 | Nav.MainWindow.ContentDisplay.Children.Add(Nav.GeneralProductView ?? new GeneralProductView(Nav)); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /GUI/Views/HomeView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using GUI.Stores; 3 | 4 | namespace GUI.Views 5 | { 6 | public partial class HomeView 7 | { 8 | private NavigationStore Nav { get; set; } 9 | public HomeView(MainWindow mainWindow) 10 | { 11 | Nav = new NavigationStore 12 | { 13 | MainWindow = mainWindow, 14 | HomeView = this 15 | }; 16 | 17 | InitializeComponent(); 18 | DataContext = Nav.MainWindow.DataContext; 19 | } 20 | public HomeView() 21 | { 22 | // Default constructor, sam zarad warning messiga v MainWindow.xaml 23 | } 24 | 25 | private void Construction_OnClicked(object sender, RoutedEventArgs e) 26 | { 27 | const bool StandAloneConstructionOpening = true; 28 | Nav.MainWindow.ContentDisplay.Children.Clear(); 29 | Nav.MainWindow.ContentDisplay.Children.Add(new ConstructionView(Nav, StandAloneConstructionOpening)); 30 | } 31 | 32 | private void Automatic_OnClicked(object sender, RoutedEventArgs e) 33 | { 34 | Nav.MainWindow.ContentDisplay.Children.Clear(); 35 | Nav.MainWindow.ContentDisplay.Children.Add(new ProductSelectionView(Nav)); 36 | } 37 | 38 | private void Manual_OnClicked(object sender, RoutedEventArgs e) 39 | { 40 | Nav.MainWindow.ContentDisplay.Children.Clear(); 41 | Nav.MainWindow.ContentDisplay.Children.Add(new ManualDrawingView(Nav)); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /app.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BusinessLogic", "BusinessLogic\BusinessLogic.csproj", "{5C27B3A4-B9B9-4C7F-8522-03A6502E0280}" 4 | EndProject 5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GUI", "GUI\GUI.csproj", "{056448F8-4DB6-4AED-BB73-BD3E7F65F5CB}" 6 | EndProject 7 | Global 8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 9 | Debug|Any CPU = Debug|Any CPU 10 | Debug|x64 = Debug|x64 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {5C27B3A4-B9B9-4C7F-8522-03A6502E0280}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {5C27B3A4-B9B9-4C7F-8522-03A6502E0280}.Release|Any CPU.Build.0 = Release|Any CPU 16 | {5C27B3A4-B9B9-4C7F-8522-03A6502E0280}.Debug|Any CPU.ActiveCfg = Debug|x64 17 | {5C27B3A4-B9B9-4C7F-8522-03A6502E0280}.Debug|Any CPU.Build.0 = Debug|x64 18 | {5C27B3A4-B9B9-4C7F-8522-03A6502E0280}.Debug|x64.ActiveCfg = Debug|x64 19 | {5C27B3A4-B9B9-4C7F-8522-03A6502E0280}.Debug|x64.Build.0 = Debug|x64 20 | {056448F8-4DB6-4AED-BB73-BD3E7F65F5CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {056448F8-4DB6-4AED-BB73-BD3E7F65F5CB}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {056448F8-4DB6-4AED-BB73-BD3E7F65F5CB}.Debug|x64.ActiveCfg = Debug|x64 23 | {056448F8-4DB6-4AED-BB73-BD3E7F65F5CB}.Debug|x64.Build.0 = Debug|x64 24 | {056448F8-4DB6-4AED-BB73-BD3E7F65F5CB}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {056448F8-4DB6-4AED-BB73-BD3E7F65F5CB}.Release|Any CPU.Build.0 = Release|Any CPU 26 | EndGlobalSection 27 | EndGlobal 28 | -------------------------------------------------------------------------------- /GUI/Views/HandleView.cs.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using GUI.Stores; 3 | 4 | namespace GUI.Views 5 | { 6 | public partial class HandleView 7 | { 8 | private NavigationStore Nav { get; set; } 9 | 10 | public HandleView(NavigationStore navigationStore) 11 | { 12 | Nav = navigationStore; 13 | Nav.HandleView = this; 14 | 15 | InitializeComponent(); 16 | DataContext = Nav.MainWindow.DataContext; 17 | } 18 | private void ChangeHandleSettings_OnChecked(object sender, RoutedEventArgs e) 19 | { 20 | HandleSettings.Visibility = Visibility.Visible; 21 | HandleImage.Visibility = Visibility.Collapsed; 22 | } 23 | private void ChangeHandleSettings_OnUnchecked(object sender, RoutedEventArgs e) 24 | { 25 | HandleSettings.Visibility = Visibility.Collapsed; 26 | HandleImage.Visibility = Visibility.Visible; 27 | } 28 | private void Back_designView(object sender, RoutedEventArgs e) 29 | { 30 | Nav.MainWindow.ContentDisplay.Children.Clear(); 31 | Nav.MainWindow.ContentDisplay.Children.Add(Nav.DesignView); 32 | } 33 | private void Back_HomeView(object sender, RoutedEventArgs e) 34 | { 35 | Nav.MainWindow.ContentDisplay.Children.Clear(); 36 | Nav.MainWindow.ContentDisplay.Children.Add(new HomeView(Nav.MainWindow)); 37 | } 38 | private void Next_FinishView(object sender, RoutedEventArgs e) 39 | { 40 | Nav.MainWindow.ContentDisplay.Children.Clear(); 41 | Nav.MainWindow.ContentDisplay.Children.Add(Nav.FinishView ?? new FinishView(Nav)); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /GUI/Commands/DrawCommands/DrawConstructionOpeningCommand.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using BusinessLogic.Settings; 3 | using GUI.ViewModels; 4 | 5 | namespace GUI.Commands.DrawCommands 6 | { 7 | public class DrawConstructionOpeningCommand : CommandBase 8 | { 9 | private ConstructionViewModel _cvm; 10 | public DrawConstructionOpeningCommand(ConstructionViewModel cvm) 11 | { 12 | _cvm = cvm; 13 | } 14 | public override void Execute(object parameter) 15 | { 16 | //CONSTRUCTION OPENING 17 | CurrentDrawInfo.ConstructionWidthBottom = _cvm.WidthOpeningBottom; 18 | CurrentDrawInfo.ConstructionWidthTop = _cvm.WidthOpeningTop; 19 | CurrentDrawInfo.ConstructionHeightLeft = _cvm.HeightOpeningLeft; 20 | CurrentDrawInfo.ConstructionHeightRight = _cvm.HeightOpeningRight; 21 | 22 | CurrentDrawInfo.MoveX = _cvm.MoveX; 23 | CurrentDrawInfo.MoveY = _cvm.MoveY; 24 | 25 | CurrentDrawInfo.DownLeftX = _cvm.DownLeftX; 26 | CurrentDrawInfo.DownLeftY = _cvm.DownLeftY; 27 | 28 | CurrentDrawInfo.DownRightX = _cvm.DownRightX; 29 | CurrentDrawInfo.DownRightY = _cvm.DownRightY; 30 | 31 | CurrentDrawInfo.UpRightX = _cvm.UpRightX; 32 | CurrentDrawInfo.UpRightY = _cvm.UpRightY; 33 | 34 | CurrentDrawInfo.UpLeftX = _cvm.UpLeftX; 35 | CurrentDrawInfo.UpLeftY = _cvm.UpLeftY; 36 | 37 | CurrentDrawInfo.MiddleDownY = _cvm.MiddleDown; 38 | CurrentDrawInfo.MiddleRightX = _cvm.MiddleRight; 39 | CurrentDrawInfo.MiddleUpY = _cvm.MiddleUp; 40 | CurrentDrawInfo.MiddleLeftX = _cvm.MiddleLeft; 41 | 42 | //Create and draw construction opening 43 | MessageBox.Show("Construction opening drawn."); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /GUI/ViewModels/ViewModelBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.ComponentModel; 5 | using System.Linq; 6 | using BusinessLogic.Classes; 7 | using BusinessLogic.Classes.Datas; 8 | 9 | namespace GUI.ViewModels 10 | { 11 | public class ViewModelBase : INotifyPropertyChanged, INotifyDataErrorInfo 12 | { 13 | //Notify On Property Changed Interface Implementation 14 | public event PropertyChangedEventHandler PropertyChanged; 15 | 16 | protected void OnPropertyChanged(string propertyName) 17 | { 18 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); 19 | } 20 | 21 | 22 | //Notify Error Info Interface Implementation 23 | 24 | public readonly Dictionary> _errorsByPropertyName = new Dictionary>(); 25 | 26 | public bool HasErrors => _errorsByPropertyName.Any(); 27 | 28 | public event EventHandler ErrorsChanged; 29 | 30 | public IEnumerable GetErrors(string propertyName) 31 | { 32 | return _errorsByPropertyName.ContainsKey(propertyName) ? 33 | _errorsByPropertyName[propertyName] : null; 34 | } 35 | 36 | private void OnErrorsChanged(string propertyName) 37 | { 38 | ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(propertyName)); 39 | } 40 | 41 | public void AddError(string propertyName, string error) 42 | { 43 | if (!_errorsByPropertyName.ContainsKey(propertyName)) 44 | _errorsByPropertyName[propertyName] = new List(); 45 | 46 | if (!_errorsByPropertyName[propertyName].Contains(error)) 47 | { 48 | _errorsByPropertyName[propertyName].Add(error); 49 | OnErrorsChanged(propertyName); 50 | } 51 | } 52 | 53 | public void ClearErrors(string propertyName) 54 | { 55 | if (_errorsByPropertyName.ContainsKey(propertyName)) 56 | { 57 | _errorsByPropertyName.Remove(propertyName); 58 | OnErrorsChanged(propertyName); 59 | } 60 | } 61 | 62 | public virtual Data ParseData() 63 | { 64 | return new PivotData(); 65 | } 66 | } 67 | } -------------------------------------------------------------------------------- /GUI/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | [assembly: AssemblyTitle("GUI")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("GUI")] 15 | [assembly: AssemblyCopyright("Copyright © 2022")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Setting ComVisible to false makes the types in this assembly not visible 20 | // to COM components. If you need to access a type in this assembly from 21 | // COM, set the ComVisible attribute to true on that type. 22 | [assembly: ComVisible(false)] 23 | 24 | //In order to begin building localizable applications, set 25 | //CultureYouAreCodingWith in your .csproj file 26 | //inside a . For example, if you are using US english 27 | //in your source files, set the to en-US. Then uncomment 28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 29 | //the line below to match the UICulture setting in the project file. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 36 | //(used if a resource is not found in the page, 37 | // or application resource dictionaries) 38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 39 | //(used if a resource is not found in the page, 40 | // app, or any theme specific resource dictionaries) 41 | )] 42 | 43 | 44 | // Version information for an assembly consists of the following four values: 45 | // 46 | // Major Version 47 | // Minor Version 48 | // Build Number 49 | // Revision 50 | // 51 | // You can specify all the values or you can default the Build and Revision Numbers 52 | // by using the '*' as shown below: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.0.0.0")] 55 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /BusinessLogic/Classes/Datas/PivotData.cs: -------------------------------------------------------------------------------- 1 | namespace BusinessLogic.Classes.Datas 2 | { 3 | public class PivotData : Data 4 | { 5 | //COMMON SETTINGS ---------------------------------------------------------------------------------------------- 6 | 7 | // DOOR DATA---------------------------------------------------------------------------------------------------- 8 | 9 | //Door Profiles 10 | public override double DoorStandingProfile { get; set; } = 30; 11 | public override double DoorTopProfile { get; set; } = 30; 12 | public override double DoorBottomProfile { get; set; } = 60; 13 | 14 | //Door Design Profiles 15 | public override double DoorHorizontalDesignProfile { get; set; } = 30; 16 | public override double DoorVerticalDesignProfile { get; set; } = 30; 17 | 18 | //Default Door Gaps 19 | public override double DefaultGapDoorToWall { get; set; } = 5; 20 | public override double DefaultGapDoorToFloor { get; set; } = 13; 21 | public override double DefaultGapDoorToCeiling { get; set; } = 8; 22 | public override double DefaultGapDoorToDoor { get; set; } = 5; 23 | public override double DefaultGapDoorToSidelight { get; set; } = 5; 24 | 25 | //Door Top View 26 | public override double ElementThickness { get; set; } = 40; 27 | public override double ProfileWallThickness { get; set; } = 2; 28 | 29 | 30 | // SIDELIGHT DATA----------------------------------------------------------------------------------------------- 31 | 32 | //Sidelight Profiles 33 | public override double SidelightStandingProfile { get; set; } = 30; 34 | public override double SidelightTopProfile { get; set; } = 40; 35 | public override double SidelightBottomProfile { get; set; } = 70; 36 | 37 | //Default Sidelight Gaps 38 | public override double DefaultGapSidelightToWall { get; set; } 39 | public override double DefaultGapSidelightToFloor { get; set; } 40 | public override double DefaultGapSidelightToCeiling { get; set; } = 2; 41 | 42 | 43 | 44 | //SPECIFIC SETTINGS -------------------------------------------------------------------------------------------- 45 | 46 | //Pivot Point 47 | public double PivotPointDistance { get; set; } = 60; 48 | public double PivotLineLength { get; set; } = 40; 49 | } 50 | } -------------------------------------------------------------------------------- /BusinessLogic/Settings/GlobalSettings.cs: -------------------------------------------------------------------------------- 1 | namespace BusinessLogic.Settings 2 | { 3 | public static class GlobalSettings 4 | { 5 | // GUI AND MAIN SETTINGS---------------------------------------------------------------------------------------- 6 | public static string Language { get; set; } = "Dutch"; 7 | 8 | 9 | //HANDLES SETTINGS---------------------------------------------------------------------------------------------- 10 | public static double ThicknessOfHandlePlate { get; set; } = 2; 11 | public static double DafaultHandleWallThickness { get; set; } = 2; 12 | 13 | 14 | //CONSTRUCTION OPENING SETTINGS--------------------------------------------------------------------------------- 15 | public static double TopViewWallThickness { get; set; } = 100; 16 | public static double TopViewWallLength { get; set; } = 250; 17 | 18 | public static double ConstructionDimOffset { get; set; } = 250; 19 | public static double HelpDimOffset { get; set; } = 450; 20 | 21 | 22 | //TOP VIEW GENERAL SETTINGS------------------------------------------------------------------------------------- 23 | 24 | public static double DefaultTopViewOffset { get; set; } = 1000; 25 | public static double TopViewDimensionChainOffset { get; set; } = 275; 26 | public static double TopViewDimensionWallToWallOffset { get; set; } = 375; 27 | 28 | 29 | //PRODUCTION DRAWING SETTINGS ---------------------------------------------------------------------------------- 30 | 31 | //Production Drawing Positions 32 | public static double ProductionFrontViewOffset { get; set; } = -10000; 33 | public static double ProductionTopViewOffset { get; set; } = 500; 34 | public static double ProductionMarginRight { get; set; } = 600; 35 | public static double ProductionProfileMargin { get; set; } = 0; 36 | 37 | 38 | //Dimension Levels 39 | public static double DimOffset { get; set; } = 60; 40 | public static double DimInitialOffset { get; set; } = 60; 41 | 42 | //Installation Hole Positions 43 | public static double MinWidthForWideInstallationHoles { get; set; } = 300; 44 | public static double InstallationHoleVertical { get; set; } = 400; 45 | public static double InstallationHoleWide { get; set; } = 100; 46 | public static double InstallationHoleNarrow { get; set; } = 70; 47 | public static double InstallationHoleExtension { get; set; } = 20; 48 | 49 | } 50 | } -------------------------------------------------------------------------------- /GUI/MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 123 | 124 | 125 | 126 | 127 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 |