diff --git a/CSharpBible/Graphics/CanvasWPF2_ItemTemplateSelector/Views/CanvasWPFView.xaml b/CSharpBible/Graphics/CanvasWPF2_ItemTemplateSelector/Views/CanvasWPFView.xaml index 08912881e..729c4f9b5 100644 --- a/CSharpBible/Graphics/CanvasWPF2_ItemTemplateSelector/Views/CanvasWPFView.xaml +++ b/CSharpBible/Graphics/CanvasWPF2_ItemTemplateSelector/Views/CanvasWPFView.xaml @@ -2,6 +2,7 @@ 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:s="clr-namespace:System;assembly=mscorlib" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:CanvasWPF2_ItemTemplateSelector" xmlns:mvvm="clr-namespace:CanvasWPF2_ItemTemplateSelector.ViewModel" @@ -131,7 +132,7 @@ - + dtRectangle @@ -161,7 +162,6 @@ diff --git a/CSharpBible/Graphics/CanvasWPF2_ItemTemplateSelector/Views/DataSelector/RessourceSelector.cs b/CSharpBible/Graphics/CanvasWPF2_ItemTemplateSelector/Views/DataSelector/RessourceSelector.cs index 876e942a9..5e54f54fe 100644 --- a/CSharpBible/Graphics/CanvasWPF2_ItemTemplateSelector/Views/DataSelector/RessourceSelector.cs +++ b/CSharpBible/Graphics/CanvasWPF2_ItemTemplateSelector/Views/DataSelector/RessourceSelector.cs @@ -43,6 +43,7 @@ public class KeyString /// /// The key. public string Key { get; set; } = ""; + override public string ToString() => Key; } /// @@ -56,7 +57,7 @@ public class RessourceSelector : DataTemplateSelector /// Gets or sets the item keys. /// /// The item keys. - public List ItemKeys { get; set; } = new List(); + public List ItemKeys { get; set; } = new List(); /// /// When overridden in a derived class, returns a based on custom logic. /// @@ -67,7 +68,7 @@ public class RessourceSelector : DataTemplateSelector { if (container is FrameworkElement element && item is IVisualObject op && op.sType < ItemKeys.Count) { - return element.FindResource(ItemKeys[op.sType].Key) as DataTemplate; + return element.FindResource(ItemKeys[op.sType].ToString()) as DataTemplate; } else return null; } diff --git a/CSharpBible/Graphics/DynamicShapeWPF/DynamicShapeWPF.csproj b/CSharpBible/Graphics/DynamicShapeWPF/DynamicShapeWPF.csproj index 0b77f7fba..997ede009 100644 --- a/CSharpBible/Graphics/DynamicShapeWPF/DynamicShapeWPF.csproj +++ b/CSharpBible/Graphics/DynamicShapeWPF/DynamicShapeWPF.csproj @@ -37,4 +37,8 @@ + + + + diff --git a/CSharpBible/Graphics/Graphics.sln b/CSharpBible/Graphics/Graphics.sln index 1f7fe2223..3d63a3173 100644 --- a/CSharpBible/Graphics/Graphics.sln +++ b/CSharpBible/Graphics/Graphics.sln @@ -69,7 +69,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_ImageHandling_net", "M EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_Converter_ImgGrid2", "MVVM_Converter_ImgGrid2\MVVM_Converter_ImgGrid2.csproj", "{F2CA5A63-D15B-4DE8-96B9-2089E64E5571}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "All_Graphics_net", "All_Graphics\All_Graphics_net.csproj", "{D9D4BDBD-9473-40DD-804E-92A63643D5DF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "All_Graphics_net", "All_Graphics\All_Graphics_net.csproj", "{D9D4BDBD-9473-40DD-804E-92A63643D5DF}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polyline", "Polyline\Polyline.csproj", "{26EC1A76-255A-42E5-9CF5-FC735660858D}" EndProject @@ -77,6 +77,24 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Polyline2", "Polyline\Polyl EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polyline_net", "Polyline\Polyline_net.csproj", "{F82089E3-517C-47E9-B56E-656EC4047C97}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PlotgraphWPF", "PlotgraphWPF\PlotgraphWPF.csproj", "{023EEB88-190E-4F3D-A887-D3C39517DBCD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_Lines_on_Grid", "MVVM_Lines_on_Grid\MVVM_Lines_on_Grid.csproj", "{5F8B8B7E-0422-4CC5-8778-8D3F9F1AF6D1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TitleGen", "TitleGen\TitleGen.csproj", "{3C1358B1-9405-4891-BF70-3E6C2116C356}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TitleGen2", "TitleGen2\TitleGen2.csproj", "{1DCD9ABD-195F-4EA9-9CC0-15A517F10271}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_Converter_DrawGrid3_NonLin", "MVVM_Converter_DrawGrid3_NonLin\MVVM_Converter_DrawGrid3_NonLin.csproj", "{DD829CC4-E6B9-42CB-A197-D8C20BBEFC30}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_Converter_Grid3_NonLin", "MVVM_Converter_Grid3_NonLin\MVVM_Converter_Grid3_NonLin.csproj", "{90581608-341A-4117-A12F-096D92977548}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_DynamicShape", "MVVM_DynamicShape\MVVM_DynamicShape.csproj", "{2A7BADAF-70BB-4A6B-89A2-60C44E7E9773}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PolySpline", "PolySpline\PolySpline.csproj", "{BA06B4EA-BCC9-490C-AE1F-8A41E9F9ED68}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PolySpline_net", "PolySpline\PolySpline_net.csproj", "{EF90C4A7-DB44-4672-A4A5-E7D9996587BC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -195,6 +213,42 @@ Global {F82089E3-517C-47E9-B56E-656EC4047C97}.Debug|Any CPU.Build.0 = Debug|Any CPU {F82089E3-517C-47E9-B56E-656EC4047C97}.Release|Any CPU.ActiveCfg = Release|Any CPU {F82089E3-517C-47E9-B56E-656EC4047C97}.Release|Any CPU.Build.0 = Release|Any CPU + {023EEB88-190E-4F3D-A887-D3C39517DBCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {023EEB88-190E-4F3D-A887-D3C39517DBCD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {023EEB88-190E-4F3D-A887-D3C39517DBCD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {023EEB88-190E-4F3D-A887-D3C39517DBCD}.Release|Any CPU.Build.0 = Release|Any CPU + {5F8B8B7E-0422-4CC5-8778-8D3F9F1AF6D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5F8B8B7E-0422-4CC5-8778-8D3F9F1AF6D1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5F8B8B7E-0422-4CC5-8778-8D3F9F1AF6D1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5F8B8B7E-0422-4CC5-8778-8D3F9F1AF6D1}.Release|Any CPU.Build.0 = Release|Any CPU + {3C1358B1-9405-4891-BF70-3E6C2116C356}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3C1358B1-9405-4891-BF70-3E6C2116C356}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3C1358B1-9405-4891-BF70-3E6C2116C356}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3C1358B1-9405-4891-BF70-3E6C2116C356}.Release|Any CPU.Build.0 = Release|Any CPU + {1DCD9ABD-195F-4EA9-9CC0-15A517F10271}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1DCD9ABD-195F-4EA9-9CC0-15A517F10271}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1DCD9ABD-195F-4EA9-9CC0-15A517F10271}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1DCD9ABD-195F-4EA9-9CC0-15A517F10271}.Release|Any CPU.Build.0 = Release|Any CPU + {DD829CC4-E6B9-42CB-A197-D8C20BBEFC30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DD829CC4-E6B9-42CB-A197-D8C20BBEFC30}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DD829CC4-E6B9-42CB-A197-D8C20BBEFC30}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DD829CC4-E6B9-42CB-A197-D8C20BBEFC30}.Release|Any CPU.Build.0 = Release|Any CPU + {90581608-341A-4117-A12F-096D92977548}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90581608-341A-4117-A12F-096D92977548}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90581608-341A-4117-A12F-096D92977548}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90581608-341A-4117-A12F-096D92977548}.Release|Any CPU.Build.0 = Release|Any CPU + {2A7BADAF-70BB-4A6B-89A2-60C44E7E9773}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2A7BADAF-70BB-4A6B-89A2-60C44E7E9773}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2A7BADAF-70BB-4A6B-89A2-60C44E7E9773}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2A7BADAF-70BB-4A6B-89A2-60C44E7E9773}.Release|Any CPU.Build.0 = Release|Any CPU + {BA06B4EA-BCC9-490C-AE1F-8A41E9F9ED68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BA06B4EA-BCC9-490C-AE1F-8A41E9F9ED68}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BA06B4EA-BCC9-490C-AE1F-8A41E9F9ED68}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BA06B4EA-BCC9-490C-AE1F-8A41E9F9ED68}.Release|Any CPU.Build.0 = Release|Any CPU + {EF90C4A7-DB44-4672-A4A5-E7D9996587BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EF90C4A7-DB44-4672-A4A5-E7D9996587BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EF90C4A7-DB44-4672-A4A5-E7D9996587BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EF90C4A7-DB44-4672-A4A5-E7D9996587BC}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/CSharpBible/Graphics/MVVM_Converter_DrawGrid3_NonLin/Properties/Images.Designer.cs b/CSharpBible/Graphics/MVVM_Converter_CTDrawGrid/Properties/Images.Designer.cs similarity index 84% rename from CSharpBible/Graphics/MVVM_Converter_DrawGrid3_NonLin/Properties/Images.Designer.cs rename to CSharpBible/Graphics/MVVM_Converter_CTDrawGrid/Properties/Images.Designer.cs index a3a3f5d0d..ac2ceb2d8 100644 --- a/CSharpBible/Graphics/MVVM_Converter_DrawGrid3_NonLin/Properties/Images.Designer.cs +++ b/CSharpBible/Graphics/MVVM_Converter_CTDrawGrid/Properties/Images.Designer.cs @@ -1,73 +1,63 @@ -//------------------------------------------------------------------------------ -// -// Dieser Code wurde von einem Tool generiert. -// Laufzeitversion:4.0.30319.42000 -// -// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -// der Code erneut generiert wird. -// -//------------------------------------------------------------------------------ - -namespace MVVM_Converter_DrawGrid3_NonLin.Properties { - using System; - - - /// - /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - /// - // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Images { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Images() { - } - - /// - /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MVVM_Converter_DrawGrid3_NonLin.Properties.Images", typeof(Images).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. - /// - internal static byte[] BIG_original { - get { - object obj = ResourceManager.GetObject("BIG_original", resourceCulture); - return ((byte[])(obj)); - } - } - } -} +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 +// +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. +// +//------------------------------------------------------------------------------ + +namespace MVVM_Converter_CTDrawGrid.Properties { + using System; + + + /// + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + /// + // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Images { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Images() { + } + + /// + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MVVM_Converter_CTDrawGrid.Properties.Images", typeof(Images).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/CSharpBible/Graphics/MVVM_Converter_CTDrawGrid/Properties/Images.resx b/CSharpBible/Graphics/MVVM_Converter_CTDrawGrid/Properties/Images.resx new file mode 100644 index 000000000..48489871d --- /dev/null +++ b/CSharpBible/Graphics/MVVM_Converter_CTDrawGrid/Properties/Images.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + diff --git a/CSharpBible/Graphics/MVVM_Converter_CTDrawGrid/ViewModel/MainWindowViewModel.cs b/CSharpBible/Graphics/MVVM_Converter_CTDrawGrid/ViewModel/MainWindowViewModel.cs new file mode 100644 index 000000000..ead35f71c --- /dev/null +++ b/CSharpBible/Graphics/MVVM_Converter_CTDrawGrid/ViewModel/MainWindowViewModel.cs @@ -0,0 +1,55 @@ +using CommunityToolkit.Mvvm.Input; +using MVVM.ViewModel; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MVVM_Converter_CTDrawGrid.ViewModel +{ + /// + /// Class MainWindowViewModel. + /// Implements the + /// + /// + public partial class MainWindowViewModel:BaseViewModelCT + { + /// + /// Gets or sets the show client. + /// + /// The show client. + public Func? ShowClient { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public MainWindowViewModel() + { + + } + + /// + /// Gets or sets the load level command. + /// + /// The load level command. + [RelayCommand] + private void LoadLevel() + => Model.Model.LoadLevel(); + /// + /// Gets or sets the next level command. + /// + /// The next level command. + [RelayCommand] + private void NextLevel() + => Model.Model.NextLevel(); + /// + /// Gets or sets the previous level command. + /// + /// The previous level command. + [RelayCommand] + private void PrevLevel() + => Model.Model.PrevLevel(); + + } +} diff --git a/CSharpBible/Graphics/MVVM_Converter_CTDrawGrid2/Properties/Images.Designer.cs b/CSharpBible/Graphics/MVVM_Converter_CTDrawGrid2/Properties/Images.Designer.cs new file mode 100644 index 000000000..a9f8094a6 --- /dev/null +++ b/CSharpBible/Graphics/MVVM_Converter_CTDrawGrid2/Properties/Images.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 +// +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. +// +//------------------------------------------------------------------------------ + +namespace MVVM_Converter_CTDrawGrid2.Properties { + using System; + + + /// + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + /// + // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Images { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Images() { + } + + /// + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MVVM_Converter_CTDrawGrid2.Properties.Images", typeof(Images).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/CSharpBible/Graphics/MVVM_Converter_DrawGrid3_NonLin/Properties/Images.resx b/CSharpBible/Graphics/MVVM_Converter_CTDrawGrid2/Properties/Images.resx similarity index 95% rename from CSharpBible/Graphics/MVVM_Converter_DrawGrid3_NonLin/Properties/Images.resx rename to CSharpBible/Graphics/MVVM_Converter_CTDrawGrid2/Properties/Images.resx index 43ef4ed7f..e0762f49a 100644 --- a/CSharpBible/Graphics/MVVM_Converter_DrawGrid3_NonLin/Properties/Images.resx +++ b/CSharpBible/Graphics/MVVM_Converter_CTDrawGrid2/Properties/Images.resx @@ -1,124 +1,124 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - ..\resources\big_original.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\BIG_original.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/CSharpBible/Graphics/MVVM_Converter_CTDrawGrid2/ViewModel/MainWindowViewModel.cs b/CSharpBible/Graphics/MVVM_Converter_CTDrawGrid2/ViewModel/MainWindowViewModel.cs new file mode 100644 index 000000000..d908497a2 --- /dev/null +++ b/CSharpBible/Graphics/MVVM_Converter_CTDrawGrid2/ViewModel/MainWindowViewModel.cs @@ -0,0 +1,65 @@ +// *********************************************************************** +// Assembly : MVVM_Converter_CTDrawGrid2 +// Author : Mir +// Created : 08-21-2022 +// +// Last Modified By : Mir +// Last Modified On : 09-09-2022 +// *********************************************************************** +// +// (c) by Joe Care 2022 +// +// +// *********************************************************************** +using CommunityToolkit.Mvvm.Input; +using MVVM.ViewModel; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MVVM_Converter_CTDrawGrid2.ViewModel +{ + /// + /// Class MainWindowViewModel. + /// Implements the + /// + /// + public partial class MainWindowViewModel : BaseViewModelCT + { + /// + /// Gets or sets the show client. + /// + /// The show client. + public Func? ShowClient { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public MainWindowViewModel() + { } + + /// + /// Gets or sets the load level command. + /// + /// The load level command. + [RelayCommand] + private void LoadLevel() + => Model.Model.LoadLevel(); + /// + /// Gets or sets the next level command. + /// + /// The next level command. + [RelayCommand] + private void NextLevel() + => Model.Model.NextLevel(); + /// + /// Gets or sets the previous level command. + /// + /// The previous level command. + [RelayCommand] + private void PrevLevel() + => Model.Model.PrevLevel(); + } +} diff --git a/CSharpBible/Graphics/MVVM_Converter_CTImgGrid/ViewModel/MainWindowViewModel.cs b/CSharpBible/Graphics/MVVM_Converter_CTImgGrid/ViewModel/MainWindowViewModel.cs new file mode 100644 index 000000000..ae416855d --- /dev/null +++ b/CSharpBible/Graphics/MVVM_Converter_CTImgGrid/ViewModel/MainWindowViewModel.cs @@ -0,0 +1,23 @@ +using CommunityToolkit.Mvvm.Input; +using MVVM.ViewModel; +using System; + +namespace MVVM_Converter_CTImgGrid.ViewModel +{ + public partial class MainWindowViewModel:BaseViewModelCT + { + public Func? ShowClient { get; set; } + + public MainWindowViewModel() + { } + + [RelayCommand] + private void LoadLevel() => Model.Model.LoadLevel(); + + [RelayCommand] + private void NextLevel() => Model.Model.NextLevel(); + + [RelayCommand] + private void PrevLevel() => Model.Model.PrevLevel(); + } +} diff --git a/CSharpBible/Graphics/MVVM_Converter_DrawGrid3_NonLin/MVVM_Converter_DrawGrid3_NonLin.csproj b/CSharpBible/Graphics/MVVM_Converter_DrawGrid3_NonLin/MVVM_Converter_DrawGrid3_NonLin.csproj index ea5ee6953..99621304e 100644 --- a/CSharpBible/Graphics/MVVM_Converter_DrawGrid3_NonLin/MVVM_Converter_DrawGrid3_NonLin.csproj +++ b/CSharpBible/Graphics/MVVM_Converter_DrawGrid3_NonLin/MVVM_Converter_DrawGrid3_NonLin.csproj @@ -10,8 +10,8 @@ - - + + @@ -24,16 +24,16 @@ - + + Resources.resx True True - Images.resx - - ResXFileCodeGenerator - Images.Designer.cs + + Resources.Designer.cs + PublicResXFileCodeGenerator diff --git a/CSharpBible/Graphics/MVVM_Converter_DrawGrid3_NonLin/MainWindow.xaml b/CSharpBible/Graphics/MVVM_Converter_DrawGrid3_NonLin/MainWindow.xaml index a43ac157c..4ad91a519 100644 --- a/CSharpBible/Graphics/MVVM_Converter_DrawGrid3_NonLin/MainWindow.xaml +++ b/CSharpBible/Graphics/MVVM_Converter_DrawGrid3_NonLin/MainWindow.xaml @@ -6,29 +6,8 @@ xmlns:local="clr-namespace:MVVM_Converter_DrawGrid3_NonLin" xmlns:mvvm="clr-namespace:MVVM_Converter_DrawGrid3_NonLin.ViewModel" mc:Ignorable="d" - Title="MainWindow" Height="450" Width="800" - Loaded="Window_Loaded"> - - - + Title="MainWindow" Height="450" Width="800"> - - - - - - - - - - - - - - - + + + diff --git a/CSharpBible/Graphics/MVVM_DynamicShape/Views/DynamicShapeView.xaml.cs b/CSharpBible/Graphics/MVVM_DynamicShape/Views/DynamicShapeView.xaml.cs new file mode 100644 index 000000000..aeeb5c72b --- /dev/null +++ b/CSharpBible/Graphics/MVVM_DynamicShape/Views/DynamicShapeView.xaml.cs @@ -0,0 +1,40 @@ +using MVVM_DynamicShape.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace MVVM_DynamicShape.Views +{ + /// + /// Interaktionslogik für DynamicShapeView.xaml + /// + public partial class DynamicShapeView : Page + { + #region Methode + public DynamicShapeView() + { + DataContextChanged += (s, e) => + { + if (DataContext is DynamicShapeViewModel viewModel) + { + // viewModel.onCreateShape = DoCreateShape; + } + }; + InitializeComponent(); + } + + + #endregion + } +} diff --git a/CSharpBible/Graphics/MVVM_DynamicShape/Views/MainWindow.xaml b/CSharpBible/Graphics/MVVM_DynamicShape/Views/MainWindow.xaml new file mode 100644 index 000000000..d55eeb786 --- /dev/null +++ b/CSharpBible/Graphics/MVVM_DynamicShape/Views/MainWindow.xaml @@ -0,0 +1,14 @@ + + + + + + diff --git a/CSharpBible/Graphics/MVVM_DynamicShape/Views/MainWindow.xaml.cs b/CSharpBible/Graphics/MVVM_DynamicShape/Views/MainWindow.xaml.cs new file mode 100644 index 000000000..cd5175379 --- /dev/null +++ b/CSharpBible/Graphics/MVVM_DynamicShape/Views/MainWindow.xaml.cs @@ -0,0 +1,41 @@ +// *********************************************************************** +// Assembly : DynamicShapes +// Author : Mir +// Created : 06-16-2022 +// +// Last Modified By : Mir +// Last Modified On : 09-09-2022 +// *********************************************************************** +// +// Copyright © JC-Soft 2022 +// +// +// *********************************************************************** + +using System.Windows; +using System.Windows.Controls; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Shapes; + +/// +/// The Dynamic Shape - Views namespace. +/// +namespace MVVM_DynamicShape.Views; + +/// +/// Interaction logic for MainWindow.xaml +/// +public partial class MainWindow : Window +{ + + #region Methode + /// + /// Initializes a new instance of the class. + /// + public MainWindow() + { + InitializeComponent(); + } + #endregion +} diff --git a/CSharpBible/Graphics/PolySpline/App.xaml b/CSharpBible/Graphics/PolySpline/App.xaml new file mode 100644 index 000000000..a8ddf5267 --- /dev/null +++ b/CSharpBible/Graphics/PolySpline/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/CSharpBible/Graphics/PolySpline/App.xaml.cs b/CSharpBible/Graphics/PolySpline/App.xaml.cs new file mode 100644 index 000000000..8acb11ecb --- /dev/null +++ b/CSharpBible/Graphics/PolySpline/App.xaml.cs @@ -0,0 +1,24 @@ +// *********************************************************************** +// Assembly : PolySpline_net +// Author : Mir +// Created : 06-20-2022 +// +// Last Modified By : Mir +// Last Modified On : 06-20-2022 +// *********************************************************************** +// +// Copyright (c) JC-Soft. All rights reserved. +// +// +// *********************************************************************** +using System.Windows; + +namespace PolySpline +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/CSharpBible/Graphics/PolySpline/Models/.info b/CSharpBible/Graphics/PolySpline/Models/.info new file mode 100644 index 000000000..e69de29bb diff --git a/CSharpBible/Graphics/PolySpline/Models/IPolySplineModel.cs b/CSharpBible/Graphics/PolySpline/Models/IPolySplineModel.cs new file mode 100644 index 000000000..dde657ed7 --- /dev/null +++ b/CSharpBible/Graphics/PolySpline/Models/IPolySplineModel.cs @@ -0,0 +1,6 @@ +namespace PolySpline.Models +{ + public interface IPolySplineModel + { + } +} diff --git a/CSharpBible/Graphics/PolySpline/Models/PolySplineModel.cs b/CSharpBible/Graphics/PolySpline/Models/PolySplineModel.cs new file mode 100644 index 000000000..74f2ff484 --- /dev/null +++ b/CSharpBible/Graphics/PolySpline/Models/PolySplineModel.cs @@ -0,0 +1,14 @@ +using MVVM.ViewModel; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PolySpline.Models +{ + public class PolySplineModel : BaseViewModel, IPolySplineModel + { + //public Points + } +} diff --git a/CSharpBible/Graphics/PolySpline/PolySpline.csproj b/CSharpBible/Graphics/PolySpline/PolySpline.csproj new file mode 100644 index 000000000..d463d33a0 --- /dev/null +++ b/CSharpBible/Graphics/PolySpline/PolySpline.csproj @@ -0,0 +1,58 @@ + + + + WinExe + net462-windows;net472-windows;net48-windows;net481-windows + true + + + + + enable + disable + + + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + diff --git a/CSharpBible/Graphics/PolySpline/PolySpline2.csproj b/CSharpBible/Graphics/PolySpline/PolySpline2.csproj new file mode 100644 index 000000000..78f2c8cef --- /dev/null +++ b/CSharpBible/Graphics/PolySpline/PolySpline2.csproj @@ -0,0 +1,118 @@ + + + + Debug + AnyCPU + WinExe + $(MSBuildProjectName) + $(MSBuildProjectName) + ..\..\..\bin\$(MSBuildProjectName)\ + ..\..\..\obj\$(MSBuildProjectName)\ + ..\..\..\obj\$(MSBuildProjectName)\ + v4.8 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + true + ...\..\..\publish\ + {070E91DD-75E9-4186-A773-A2FB576AD1AB} + + + + AnyCPU + true + full + false + ..\..\..\bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + ..\..\..\bin\Release\ + TRACE + prompt + 4 + + + + ..\..\packages\Microsoft.Xaml.Behaviors.Wpf.1.1.39\lib\net45\Microsoft.Xaml.Behaviors.dll + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + + + + MainWindow.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + {ABC8A3FB-12D1-40ED-AA6C-DBFF48B7A080} + MVVM_BaseLib + + + + + + + diff --git a/CSharpBible/Graphics/PolySpline/PolySpline_net.csproj b/CSharpBible/Graphics/PolySpline/PolySpline_net.csproj new file mode 100644 index 000000000..d51adc8d5 --- /dev/null +++ b/CSharpBible/Graphics/PolySpline/PolySpline_net.csproj @@ -0,0 +1,59 @@ + + + + WinExe + net6.0-windows;net7.0-windows;net8.0-windows + true + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + diff --git a/CSharpBible/Graphics/PolySpline/Properties/AssemblyInfo.cs b/CSharpBible/Graphics/PolySpline/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..eb7f26e3a --- /dev/null +++ b/CSharpBible/Graphics/PolySpline/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die einer Assembly zugeordnet sind. +[assembly: AssemblyTitle("WpfApp")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("JC-Soft")] +[assembly: AssemblyProduct("WpfApp")] +[assembly: AssemblyCopyright("Copyright © JC-Soft 2022")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly +// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von +// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. +[assembly: ComVisible(false)] + +//Um mit dem Erstellen lokalisierbarer Anwendungen zu beginnen, legen Sie +//ImCodeVerwendeteKultur in der .csproj-Datei +//in einer fest. Wenn Sie in den Quelldateien beispielsweise Deutsch +//(Deutschland) verwenden, legen Sie auf \"de-DE\" fest. Heben Sie dann die Auskommentierung +//des nachstehenden NeutralResourceLanguage-Attributs auf. Aktualisieren Sie "en-US" in der nachstehenden Zeile, +//sodass es mit der UICulture-Einstellung in der Projektdatei übereinstimmt. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //Speicherort der designspezifischen Ressourcenwörterbücher + //(wird verwendet, wenn eine Ressource auf der Seite nicht gefunden wird, + // oder in den Anwendungsressourcen-Wörterbüchern nicht gefunden werden kann.) + ResourceDictionaryLocation.SourceAssembly //Speicherort des generischen Ressourcenwörterbuchs + //(wird verwendet, wenn eine Ressource auf der Seite nicht gefunden wird, + // designspezifischen Ressourcenwörterbuch nicht gefunden werden kann.) +)] + + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, +// indem Sie "*" wie unten gezeigt eingeben: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CSharpBible/Graphics/PolySpline/Properties/Resources.Designer.cs b/CSharpBible/Graphics/PolySpline/Properties/Resources.Designer.cs new file mode 100644 index 000000000..3628639e5 --- /dev/null +++ b/CSharpBible/Graphics/PolySpline/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 +// +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. +// +//------------------------------------------------------------------------------ + +namespace PolySpline.Properties { + using System; + + + /// + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + /// + // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PolySpline.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/CSharpBible/Graphics/PolySpline/Properties/Resources.resx b/CSharpBible/Graphics/PolySpline/Properties/Resources.resx new file mode 100644 index 000000000..096826bd1 --- /dev/null +++ b/CSharpBible/Graphics/PolySpline/Properties/Resources.resx @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + diff --git a/CSharpBible/Graphics/PolySpline/Properties/Settings.Designer.cs b/CSharpBible/Graphics/PolySpline/Properties/Settings.Designer.cs new file mode 100644 index 000000000..451f93046 --- /dev/null +++ b/CSharpBible/Graphics/PolySpline/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 +// +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. +// +//------------------------------------------------------------------------------ + +namespace PolySpline.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/CSharpBible/Graphics/PolySpline/Properties/Settings.settings b/CSharpBible/Graphics/PolySpline/Properties/Settings.settings new file mode 100644 index 000000000..049245f40 --- /dev/null +++ b/CSharpBible/Graphics/PolySpline/Properties/Settings.settings @@ -0,0 +1,6 @@ + + + + + + diff --git a/CSharpBible/Graphics/PolySpline/ViewModels/ControlPointBehavior.cs b/CSharpBible/Graphics/PolySpline/ViewModels/ControlPointBehavior.cs new file mode 100644 index 000000000..135a6ee74 --- /dev/null +++ b/CSharpBible/Graphics/PolySpline/ViewModels/ControlPointBehavior.cs @@ -0,0 +1,70 @@ +// *********************************************************************** +// Assembly : PolySpline_net +// Author : Mir +// Created : 06-22-2022 +// +// Last Modified By : Mir +// Last Modified On : 06-22-2022 +// *********************************************************************** +// +// Copyright (c) JC-Soft. All rights reserved. +// +// +// *********************************************************************** +using System.Windows; +using Microsoft.Xaml.Behaviors; + + +namespace PolySpline.ViewModels +{ + /// + /// Class ControlPointBehavior. + /// Implements the + /// + /// + public class ControlPointBehavior : Behavior + { + /// + /// The mouse down + /// + private bool mouseDown; + /// + /// The delta + /// + private Vector delta; + + /// + /// Called after the behavior is attached to an AssociatedObject. + /// + /// Override this to hook up functionality to the AssociatedObject. + protected override void OnAttached() + { + var iObjParent = AssociatedObject.Parent as IInputElement; + + AssociatedObject.MouseLeftButtonDown += (s, e) => + { + mouseDown = true; + var mousePosition = e.GetPosition(iObjParent); + var elementPosition = (AssociatedObject.DataContext as Coordinate)?.Point ?? new Point(0,0); + delta = elementPosition - mousePosition; + AssociatedObject.CaptureMouse(); + }; + + AssociatedObject.MouseMove += (s, e) => + { + if (!mouseDown) return; + var mousePosition = e.GetPosition(iObjParent); + var elementPosition = mousePosition + delta; + var c = (AssociatedObject.DataContext as Coordinate); + if (c!=null) + c.Point = elementPosition; + }; + + AssociatedObject.MouseLeftButtonUp += (s, e) => + { + mouseDown = false; + AssociatedObject.ReleaseMouseCapture(); + }; + } + } +} diff --git a/CSharpBible/Graphics/PolySpline/ViewModels/Coordinate.cs b/CSharpBible/Graphics/PolySpline/ViewModels/Coordinate.cs new file mode 100644 index 000000000..1f3218f13 --- /dev/null +++ b/CSharpBible/Graphics/PolySpline/ViewModels/Coordinate.cs @@ -0,0 +1,53 @@ +// *********************************************************************** +// Assembly : PolySpline_net +// Author : Mir +// Created : 06-22-2022 +// +// Last Modified By : Mir +// Last Modified On : 08-20-2022 +// *********************************************************************** +// +// Copyright (c) JC-Soft. All rights reserved. +// +// +// *********************************************************************** +using MVVM.ViewModel; +using System.Windows; + + +namespace PolySpline.ViewModels +{ + /// + /// Class Coordinate. + /// Implements the + /// + /// + public class Coordinate : NotificationObject + { + /// + /// The x + /// + private double x; + /// + /// The y + /// + private double y; + + /// + /// Gets or sets the x. + /// + /// The x. + public double X { get => x; set => SetProperty(ref x, value, (o, n) => RaisePropertyChanged(nameof(Point))); } + /// + /// Gets or sets the y. + /// + /// The y. + public double Y { get => y; set => SetProperty(ref y, value, (o, n) => RaisePropertyChanged(nameof(Point))); } + /// + /// Gets or sets the point. + /// + /// The point. + public Point Point { get => new Point(x, y); set { (X, Y) = (value.X, value.Y); } + } + } +} diff --git a/CSharpBible/Graphics/PolySpline/ViewModels/PolySpline.cs b/CSharpBible/Graphics/PolySpline/ViewModels/PolySpline.cs new file mode 100644 index 000000000..77ec9cf78 --- /dev/null +++ b/CSharpBible/Graphics/PolySpline/ViewModels/PolySpline.cs @@ -0,0 +1,27 @@ +// *********************************************************************** +// Assembly : PolySpline_net +// Author : Mir +// Created : 06-22-2022 +// +// Last Modified By : Mir +// Last Modified On : 06-22-2022 +// *********************************************************************** +// +// Copyright (c) JC-Soft. All rights reserved. +// +// +// *********************************************************************** +using System.Collections.Generic; + + +namespace PolySpline.ViewModels +{ + /// + /// Class PolySpline. + /// Implements the + /// + /// + public class PolySpline : List + { + } +} diff --git a/CSharpBible/Graphics/PolySpline/ViewModels/PolySplineCollection.cs b/CSharpBible/Graphics/PolySpline/ViewModels/PolySplineCollection.cs new file mode 100644 index 000000000..0ae4545f9 --- /dev/null +++ b/CSharpBible/Graphics/PolySpline/ViewModels/PolySplineCollection.cs @@ -0,0 +1,71 @@ +// *********************************************************************** +// Assembly : PolySpline_net +// Author : Mir +// Created : 06-22-2022 +// +// Last Modified By : Mir +// Last Modified On : 06-22-2022 +// *********************************************************************** +// +// Copyright (c) JC-Soft. All rights reserved. +// +// +// *********************************************************************** +using System; +using System.Collections.Generic; +using System.Linq; + + +namespace PolySpline.ViewModels +{ + /// + /// Class PolySplineCollection. + /// Implements the + /// + /// + public class PolySplineCollection : List + { + /// + /// Gets the segments. + /// + /// The segments. + public IEnumerable Segments + { + get + { + foreach (var PolySpline in this) + { + var last = PolySpline.FirstOrDefault(); + bool flag = false; + Coordinate middle = PolySpline.FirstOrDefault(); + foreach (var coordinate in PolySpline.Skip(1)) + { + if (flag = !flag) + middle = coordinate; + else + { + yield return new Segment { Start = last ?? coordinate, Middle = middle, End = coordinate }; + last = coordinate; + } + } + } + } + } + + /// + /// Gets the control points. + /// + /// The control points. + public IEnumerable ControlPoints + { + get + { + foreach (var PolySpline in this) + { + foreach (var coordinate in PolySpline) + yield return coordinate; + } + } + } + } +} diff --git a/CSharpBible/Graphics/PolySpline/ViewModels/PolySplineViewModel.cs b/CSharpBible/Graphics/PolySpline/ViewModels/PolySplineViewModel.cs new file mode 100644 index 000000000..c32e69dfb --- /dev/null +++ b/CSharpBible/Graphics/PolySpline/ViewModels/PolySplineViewModel.cs @@ -0,0 +1,42 @@ +// *********************************************************************** +// Assembly : PolySpline_net +// Author : Mir +// Created : 06-20-2022 +// +// Last Modified By : Mir +// Last Modified On : 06-22-2022 +// *********************************************************************** +// +// Copyright (c) JC-Soft. All rights reserved. +// +// +// *********************************************************************** +using MVVM.ViewModel; +namespace PolySpline.ViewModels; + +/// +/// Class PolySplineViewModel. +/// +public partial class PolySplineViewModel : BaseViewModel +{ + /// + /// Gets or sets the pl collection. + /// + /// The pl collection. + public PolySplineCollection plCollection { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public PolySplineViewModel() + { + plCollection = new PolySplineCollection(); + var p = new PolySpline(); + p.Add(new Coordinate() { X = 100, Y = 100 }); + p.Add(new Coordinate() { X = 200, Y = 150 }); + p.Add(new Coordinate() { X = 250, Y = 200 }); + p.Add(new Coordinate() { X = 150, Y = 250 }); + p.Add(new Coordinate() { X = 250, Y = 300 }); + plCollection.Add(p); + } +} diff --git a/CSharpBible/Graphics/PolySpline/ViewModels/Segment.cs b/CSharpBible/Graphics/PolySpline/ViewModels/Segment.cs new file mode 100644 index 000000000..3197f0654 --- /dev/null +++ b/CSharpBible/Graphics/PolySpline/ViewModels/Segment.cs @@ -0,0 +1,82 @@ +// *********************************************************************** +// Assembly : PolySpline_net +// Author : Mir +// Created : 06-22-2022 +// +// Last Modified By : Mir +// Last Modified On : 08-23-2022 +// *********************************************************************** +// +// Copyright (c) JC-Soft. All rights reserved. +// +// +// *********************************************************************** +using CommunityToolkit.Mvvm.ComponentModel; +using MVVM.ViewModel; +using System.Windows; + +namespace PolySpline.ViewModels +{ + /// + /// Class Segment. + /// + public partial class Segment:NotificationObjectCT + { +#if NET50_OR_GREATER + public Coordinate? Start { get; set; } + public Coordinate? Middle { get; set; } + public Coordinate? End { get; set; } +#else + /// + /// Gets or sets the start. + /// + /// The start. + [ObservableProperty] + [NotifyPropertyChangedFor(nameof(Middle1))] + private Coordinate _start; + /// + /// Gets or sets the start. + /// + /// The start. + [ObservableProperty] + [NotifyPropertyChangedFor(nameof(Middle1))] + [NotifyPropertyChangedFor(nameof(Middle2))] + private Coordinate _middle; + public Point Middle1 => new Point((Start.X * 0.333 + Middle.X * 0.667) , (Start.Y *0.333+ Middle.Y * 0.667) ); + public Point Middle2 => new Point((End.X * 0.333 + Middle.X * 0.667), (End.Y * 0.333 + Middle.Y * 0.667) ); + /// + /// Gets or sets the end. + /// + /// The end. + [ObservableProperty] + [NotifyPropertyChangedFor(nameof(Middle2))] + private Coordinate _end; + + partial void OnEndChanged(Coordinate? oldValue, Coordinate newValue) + { + if (newValue != null) + { + newValue.PropertyChanged+=(e,a)=>OnPropertyChanged(nameof(Middle2)); + } + } + partial void OnStartChanged(Coordinate? oldValue, Coordinate newValue) + { + if (newValue != null) + { + newValue.PropertyChanged += (e, a) => OnPropertyChanged(nameof(Middle1)); + } + } + partial void OnMiddleChanged(Coordinate? oldValue, Coordinate newValue) + { + if (newValue != null) + { + newValue.PropertyChanged += (e, a) => + { + OnPropertyChanged(nameof(Middle1)); + OnPropertyChanged(nameof(Middle2)); + }; + } + } +#endif + } +} diff --git a/CSharpBible/Graphics/PolySpline/Views/MainWindow.xaml b/CSharpBible/Graphics/PolySpline/Views/MainWindow.xaml new file mode 100644 index 000000000..efd62b7fa --- /dev/null +++ b/CSharpBible/Graphics/PolySpline/Views/MainWindow.xaml @@ -0,0 +1,15 @@ + + + + + diff --git a/CSharpBible/Graphics/PolySpline/Views/MainWindow.xaml.cs b/CSharpBible/Graphics/PolySpline/Views/MainWindow.xaml.cs new file mode 100644 index 000000000..409bacf0d --- /dev/null +++ b/CSharpBible/Graphics/PolySpline/Views/MainWindow.xaml.cs @@ -0,0 +1,31 @@ +// *********************************************************************** +// Assembly : PolySpline_net +// Author : Mir +// Created : 06-20-2022 +// +// Last Modified By : Mir +// Last Modified On : 06-20-2022 +// *********************************************************************** +// +// Copyright (c) JC-Soft. All rights reserved. +// +// +// *********************************************************************** +using System.Windows; + +namespace PolySpline.Views +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + /// + /// Initializes a new instance of the class. + /// + public MainWindow() + { + InitializeComponent(); + } + } +} diff --git a/CSharpBible/Graphics/PolySpline/Views/PolySplineView.xaml b/CSharpBible/Graphics/PolySpline/Views/PolySplineView.xaml new file mode 100644 index 000000000..e02ce4cd4 --- /dev/null +++ b/CSharpBible/Graphics/PolySpline/Views/PolySplineView.xaml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CSharpBible/Graphics/PolySpline/Views/PolySplineView.xaml.cs b/CSharpBible/Graphics/PolySpline/Views/PolySplineView.xaml.cs new file mode 100644 index 000000000..279eef5bd --- /dev/null +++ b/CSharpBible/Graphics/PolySpline/Views/PolySplineView.xaml.cs @@ -0,0 +1,32 @@ +// *********************************************************************** +// Assembly : PolySpline_net +// Author : Mir +// Created : 06-20-2022 +// +// Last Modified By : Mir +// Last Modified On : 06-20-2022 +// *********************************************************************** +// +// Copyright (c) JC-Soft. All rights reserved. +// +// +// *********************************************************************** +using System.Windows; +using System.Windows.Controls; + +namespace PolySpline.Views +{ + /// + /// Interaction logic for PolySplineView.xaml + /// + public partial class PolySplineView : Page + { + /// + /// Initializes a new instance of the class. + /// + public PolySplineView() + { + InitializeComponent(); + } + } +} diff --git a/CSharpBible/Graphics/Polyline/Models/IPolyLineModel.cs b/CSharpBible/Graphics/Polyline/Models/IPolyLineModel.cs new file mode 100644 index 000000000..27acc57dd --- /dev/null +++ b/CSharpBible/Graphics/Polyline/Models/IPolyLineModel.cs @@ -0,0 +1,6 @@ +namespace Polyline.Models +{ + public interface IPolyLineModel + { + } +} \ No newline at end of file diff --git a/CSharpBible/Graphics/Polyline/Models/PolyLineModel.cs b/CSharpBible/Graphics/Polyline/Models/PolyLineModel.cs new file mode 100644 index 000000000..4ad0340bb --- /dev/null +++ b/CSharpBible/Graphics/Polyline/Models/PolyLineModel.cs @@ -0,0 +1,14 @@ +using MVVM.ViewModel; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Polyline.Models +{ + public class PolyLineModel : BaseViewModel, IPolyLineModel + { + //public Points + } +} diff --git a/CSharpBible/Graphics/Polyline/Polyline.csproj b/CSharpBible/Graphics/Polyline/Polyline.csproj index e2db1b83b..6e988114e 100644 --- a/CSharpBible/Graphics/Polyline/Polyline.csproj +++ b/CSharpBible/Graphics/Polyline/Polyline.csproj @@ -51,5 +51,8 @@ Settings.Designer.cs + + + \ No newline at end of file diff --git a/CSharpBible/Graphics/Polyline/ViewModels/MainWindowViewModel.cs b/CSharpBible/Graphics/Polyline/ViewModels/MainWindowViewModel.cs deleted file mode 100644 index 0ee2d03bc..000000000 --- a/CSharpBible/Graphics/Polyline/ViewModels/MainWindowViewModel.cs +++ /dev/null @@ -1,42 +0,0 @@ -// *********************************************************************** -// Assembly : Polyline_net -// Author : Mir -// Created : 06-20-2022 -// -// Last Modified By : Mir -// Last Modified On : 06-22-2022 -// *********************************************************************** -// -// Copyright (c) JC-Soft. All rights reserved. -// -// -// *********************************************************************** -namespace Polyline.ViewModels -{ - /// - /// Class MainWindowViewModel. - /// - public class MainWindowViewModel - { - /// - /// Gets or sets the pl collection. - /// - /// The pl collection. - public PolylineCollection plCollection { get; set; } - - /// - /// Initializes a new instance of the class. - /// - public MainWindowViewModel() - { - plCollection = new PolylineCollection(); - var p = new Polyline(); - p.Add(new Coordinate() { X = 100, Y = 100 }); - p.Add(new Coordinate() { X = 200, Y = 150 }); - p.Add(new Coordinate() { X = 250, Y = 200 }); - p.Add(new Coordinate() { X = 150, Y = 250 }); - p.Add(new Coordinate() { X = 250, Y = 300 }); - plCollection.Add(p); - } - } -} diff --git a/CSharpBible/Graphics/Polyline/ViewModels/PolyLineViewModel.cs b/CSharpBible/Graphics/Polyline/ViewModels/PolyLineViewModel.cs new file mode 100644 index 000000000..437449a7e --- /dev/null +++ b/CSharpBible/Graphics/Polyline/ViewModels/PolyLineViewModel.cs @@ -0,0 +1,42 @@ +// *********************************************************************** +// Assembly : Polyline_net +// Author : Mir +// Created : 06-20-2022 +// +// Last Modified By : Mir +// Last Modified On : 06-22-2022 +// *********************************************************************** +// +// Copyright (c) JC-Soft. All rights reserved. +// +// +// *********************************************************************** +using MVVM.ViewModel; +namespace Polyline.ViewModels; + +/// +/// Class PolyLineViewModel. +/// +public partial class PolyLineViewModel : BaseViewModel +{ + /// + /// Gets or sets the pl collection. + /// + /// The pl collection. + public PolylineCollection plCollection { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public PolyLineViewModel() + { + plCollection = new PolylineCollection(); + var p = new Polyline(); + p.Add(new Coordinate() { X = 100, Y = 100 }); + p.Add(new Coordinate() { X = 200, Y = 150 }); + p.Add(new Coordinate() { X = 250, Y = 200 }); + p.Add(new Coordinate() { X = 150, Y = 250 }); + p.Add(new Coordinate() { X = 250, Y = 300 }); + plCollection.Add(p); + } +} diff --git a/CSharpBible/Graphics/Polyline/Views/MainWindow.xaml b/CSharpBible/Graphics/Polyline/Views/MainWindow.xaml index cbb213164..761543ea2 100644 --- a/CSharpBible/Graphics/Polyline/Views/MainWindow.xaml +++ b/CSharpBible/Graphics/Polyline/Views/MainWindow.xaml @@ -9,67 +9,7 @@ mc:Ignorable="d" Title="MainWindow" Height="450" Width="800"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/CSharpBible/Graphics/Polyline/Views/PolyLineView.xaml b/CSharpBible/Graphics/Polyline/Views/PolyLineView.xaml index 6809820ca..c4e6b58af 100644 --- a/CSharpBible/Graphics/Polyline/Views/PolyLineView.xaml +++ b/CSharpBible/Graphics/Polyline/Views/PolyLineView.xaml @@ -10,19 +10,9 @@ Title="MainWindow" d:Height="450" d:Width="800"> - + - - - - - - - - - - - + diff --git a/CSharpBible/Graphics/TitleGen/TitleGen.csproj b/CSharpBible/Graphics/TitleGen/TitleGen.csproj index 91b5cf0cc..c19a05a3e 100644 --- a/CSharpBible/Graphics/TitleGen/TitleGen.csproj +++ b/CSharpBible/Graphics/TitleGen/TitleGen.csproj @@ -9,7 +9,7 @@ - +