diff --git a/.github/workflows/CSharpBible.yml b/.github/workflows/CSharpBible.yml new file mode 100644 index 000000000..a601fb628 --- /dev/null +++ b/.github/workflows/CSharpBible.yml @@ -0,0 +1,115 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# This workflow will build, test, sign and package a WPF or Windows Forms desktop application +# built on .NET Core. +# To learn how to migrate your existing application to .NET Core, +# refer to https://docs.microsoft.com/en-us/dotnet/desktop-wpf/migration/convert-project-from-net-framework +# +# To configure this workflow: +# +# 1. Configure environment variables +# GitHub sets default environment variables for every workflow run. +# Replace the variables relative to your project in the "env" section below. +# +# 2. Signing +# Generate a signing certificate in the Windows Application +# Packaging Project or add an existing signing certificate to the project. +# Next, use PowerShell to encode the .pfx file using Base64 encoding +# by running the following Powershell script to generate the output string: +# +# $pfx_cert = Get-Content '.\SigningCertificate.pfx' -Encoding Byte +# [System.Convert]::ToBase64String($pfx_cert) | Out-File 'SigningCertificate_Encoded.txt' +# +# Open the output file, SigningCertificate_Encoded.txt, and copy the +# string inside. Then, add the string to the repo as a GitHub secret +# and name it "Base64_Encoded_Pfx." +# For more information on how to configure your signing certificate for +# this workflow, refer to https://github.com/microsoft/github-actions-for-desktop-apps#signing +# +# Finally, add the signing certificate password to the repo as a secret and name it "Pfx_Key". +# See "Build the Windows Application Packaging project" below to see how the secret is used. +# +# For more information on GitHub Actions, refer to https://github.com/features/actions +# For a complete CI/CD sample to get started with GitHub Action workflows for Desktop Applications, +# refer to https://github.com/microsoft/github-actions-for-desktop-apps + +name: .NET Core Desktop + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + + build: + + strategy: + matrix: + configuration: [Debug, Release] + + runs-on: windows-latest # For a list of available runner types, refer to + # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on + + env: + Solution_Name: CSharpBible.sln # Replace with your solution name, i.e. MyWpfApp.sln. + Test_Project_Path: Tests\Test.csproj # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj. + Wap_Project_Directory: CSharpBible # Replace with the Wap project directory relative to the solution, i.e. MyWpfApp.Package. + Wap_Project_Path: CSharpBible # Replace with the path to your Wap project, i.e. MyWpf.App.Package\MyWpfApp.Package.wapproj. + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + # Install the .NET Core workload + - name: Install .NET Core + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 6.0.x + + # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild + - name: Setup MSBuild.exe + uses: microsoft/setup-msbuild@v1.0.2 + + # Execute all unit tests in the solution + - name: Execute unit tests + run: dotnet test + + # Restore the application to populate the obj folder with RuntimeIdentifiers + - name: Restore the application + run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration + env: + Configuration: ${{ matrix.configuration }} + + # Decode the base 64 encoded pfx and save the Signing_Certificate + - name: Decode the pfx + run: | + $pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.Base64_Encoded_Pfx }}") + $certificatePath = Join-Path -Path $env:Wap_Project_Directory -ChildPath GitHubActionsWorkflow.pfx + [IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte) + + # Create the app package by building and packaging the Windows Application Packaging project + - name: Create the app package + run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:PackageCertificateKeyFile=GitHubActionsWorkflow.pfx /p:PackageCertificatePassword=${{ secrets.Pfx_Key }} + env: + Appx_Bundle: Always + Appx_Bundle_Platforms: x86|x64 + Appx_Package_Build_Mode: StoreUpload + Configuration: ${{ matrix.configuration }} + + # Remove the pfx + - name: Remove the pfx + run: Remove-Item -path $env:Wap_Project_Directory\GitHubActionsWorkflow.pfx + + # Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact + - name: Upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: MSIX Package + path: ${{ env.Wap_Project_Directory }}\AppPackages diff --git a/.gitignore b/.gitignore index bbe1ad8eb..458b5fd5e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,10 +5,23 @@ *.pfx *.exe *.dll +*.bak /.svn /.vs /bin -/CSharpBible/.vs +/*/.vs +/CSharpBible/*/.vs +/*/obj +/*/bin +/*/TestResults +/*/*/TestResults +/*/*/obj +/*/*/bin +/*/*/*/.vs +/*/*/*/obj +/*/*/*/bin +/CSharpBible/Help +/CSharpBible/Mobile /CSharpBible/AboutEx/obj /CSharpBible/AboutEx/publish /CSharpBible/AboutExTests/bin @@ -18,6 +31,7 @@ /CSharpBible/AddPage/obj /CSharpBible/AddPageWPF/obj /CSharpBible/BindingGroupExp/obj +/CSharpBible/Calc/Help /CSharpBible/Calc32/obj /CSharpBible/Calc32Tests/obj /CSharpBible/Calc32WPF/obj @@ -52,4 +66,45 @@ /CSharpProgrammierHandbuch/Fibonacci2 /TestStatements/AsyncExampleWPF /TestStatements/Tutorials/obj/Debug - +/CSharpBible/Basics/.vs +/CSharpBible/Basics/.vs +*.user +*.bak +/CSharpBible/Calc/.vs +/CSharpBible/DB/.vs +/CSharpBible/Mobile +/CSharpBible/MVVM_Tutorial/.vs +/CSharpBible/Calc/Help +/CSharpBible/DependencyInjection/.vs +/CSharpBible/CSharpBibleTest/.vs +/CSharpBible/Games/.vs +/CSharpBible/Graphics/.vs +/GenFreeWin/.vs +/JC-AMS/.vs +/obj +/obj.net +/TestStatements/Help +/JC-AMS/JC-AMS.sln.GhostDoc.xml +/CSharpBible/Help +/CSharpBible/MVVM_Tutorial/MVVM_16_Usercontrol1/.vs +/CSharpBible/MVVM_Tutorial/TestResults +/CSharpBible/Patterns_Tutorial/.vs +/CSharpBible/Patterns_Tutorial/Pattern_00_Template/obj +/CSharpBible/Patterns_Tutorial/Pattern_00_TemplateTests/obj +/CSharpBible/Patterns_Tutorial/Pattern_01_Singleton/obj +/CSharpBible/Patterns_Tutorial/Pattern_01_SingletonTests/obj +/CSharpBible/Patterns_Tutorial/Pattern_02_Observer/obj +/CSharpBible/Patterns_Tutorial/Pattern_02_ObserverTests/obj +*.editorconfig +/CSharpBible/Libraries/CSFreeVision_ +/CSharpBible/AboutExTests/.vs +/CSharpBible/CSV_ViewerTest/.vs +/CSharpBible/DB/DataLake_App/obj +/CSharpBible/DB/DataLake_App/bin +/CSharpBible/DB/DataLake_Example/.vs +/CSharpBible/Graphics/Polyline/.vs +/GenFreeWin/TestResults +/CSharpBible/Games/Sokoban_Base/*.svn +/CSharpBible/MVVM_Tutorial/UWP_00_Test/AppPackages +/TestStatements/TestStatements/Version.inc +obj.net \ No newline at end of file diff --git a/CSharpBible/AboutEx/AboutEx.csproj b/CSharpBible/AboutEx/AboutEx.csproj index 92127d5eb..ee724d392 100644 --- a/CSharpBible/AboutEx/AboutEx.csproj +++ b/CSharpBible/AboutEx/AboutEx.csproj @@ -1,175 +1,79 @@ - - - - Debug - AnyCPU - ..\..\bin\$(MSBuildProjectName)\ - ..\..\obj\$(MSBuildProjectName)\ - ..\..\obj\$(MSBuildProjectName)\ - {6D860275-CDFB-48FB-8D51-472EB96884DF} - WinExe - - - - - CSharpBible.AboutEx - AboutEx - v4.8 - 512 - true - true - false - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 1 - 1.0.0.%2a - false - true - true - - - AnyCPU - true - full - false - ..\..\bin\$(MSBuildProjectName)\$(Configuration)\ - DEBUG;TRACE - prompt - 4 - true - - - AnyCPU - pdbonly - true - ..\..\bin\$(MSBuildProjectName)\$(Configuration)\ - TRACE - prompt - 4 - - - - - - - false - - - 0C28B4FABC7FB9526ADD2A6E9928E123EA59543E - - - AboutEx_TemporaryKey.pfx - - - false - - - true - - - LocalIntranet - - - Properties\app.manifest - - - - - - - - - - - - - - - - - - - Form - - - AboutBox1.cs - - - Form - - - FrmAbout.cs - - - Form - - - FrmAboutExMain.cs - - - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - AboutBox1.cs - - - FrmAbout.cs - - - FrmAboutExMain.cs - - - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - - - - Resources\CheckMarkGreen.png - - - - - False - Microsoft .NET Framework 4.7.2 %28x86 und x64%29 - true - - - False - .NET Framework 3.5 SP1 - false - - - - - - + + + + net9.0-windows + WinExe + false + true + true + + + + + CSharpBible.AboutEx + false + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 1 + 1.0.0.%2a + false + true + true + + + true + + + 0C28B4FABC7FB9526ADD2A6E9928E123EA59543E + + + AboutEx_TemporaryKey.pfx + + + true + + + LocalIntranet + + + Properties\app.manifest + + + + .editorconfig + + + + + Resources\CheckMarkGreen.png + + + + + False + Microsoft .NET Framework 4.7.2 %28x86 und x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + + + + + + + + \ No newline at end of file diff --git a/CSharpBible/AboutEx/Program.cs b/CSharpBible/AboutEx/Program.cs index 52d53d851..8f751b050 100644 --- a/CSharpBible/AboutEx/Program.cs +++ b/CSharpBible/AboutEx/Program.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using System.Windows.Forms; using CSharpBible.AboutEx.Visual; diff --git a/CSharpBible/AboutEx/Properties/AssemblyInfo.cs b/CSharpBible/AboutEx/Properties/AssemblyInfo.cs deleted file mode 100644 index d5754b39c..000000000 --- a/CSharpBible/AboutEx/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Resources; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 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("CSharpBible : AboutExample")] -[assembly: AssemblyDescription("Beta Test Version.\n!!! CONFIDENTIAL !!!\n Do not copy. Do not trade. All rights re" + - "served.\n This means you.\n Violators shot at dawn.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("JCSoft")] -[assembly: AssemblyProduct("DuckCalc98 aka. Siberia")] -[assembly: AssemblyCopyright("Copyleft © 2001 by the Ugly Ducking")] -[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)] - -// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird -[assembly: Guid("6d860275-cdfb-48fb-8d51-472eb96884df")] - -// 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")] -[assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: NeutralResourcesLanguage("en")] diff --git a/CSharpBible/AboutEx/Visual/AboutBox1.cs b/CSharpBible/AboutEx/Visual/AboutBox1.cs index 1d88fa9a8..1843f847b 100644 --- a/CSharpBible/AboutEx/Visual/AboutBox1.cs +++ b/CSharpBible/AboutEx/Visual/AboutBox1.cs @@ -1,10 +1,5 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Linq; using System.Reflection; -using System.Threading.Tasks; using System.Windows.Forms; namespace CSharpBible.AboutEx.Visual diff --git a/CSharpBible/AboutEx/Visual/FrmAbout.cs b/CSharpBible/AboutEx/Visual/FrmAbout.cs index cbbc33cd3..fc5ddb0ca 100644 --- a/CSharpBible/AboutEx/Visual/FrmAbout.cs +++ b/CSharpBible/AboutEx/Visual/FrmAbout.cs @@ -1,11 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; namespace CSharpBible.AboutEx.Visual diff --git a/CSharpBible/AboutEx/Visual/FrmAboutExMain.cs b/CSharpBible/AboutEx/Visual/FrmAboutExMain.cs index d9803294b..813628bfb 100644 --- a/CSharpBible/AboutEx/Visual/FrmAboutExMain.cs +++ b/CSharpBible/AboutEx/Visual/FrmAboutExMain.cs @@ -1,11 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; namespace CSharpBible.AboutEx.Visual diff --git a/CSharpBible/AboutExTests/AboutExTests.csproj b/CSharpBible/AboutExTests/AboutExTests.csproj index a00dcf056..6b50546ad 100644 --- a/CSharpBible/AboutExTests/AboutExTests.csproj +++ b/CSharpBible/AboutExTests/AboutExTests.csproj @@ -1,6 +1,8 @@  - + + + Debug AnyCPU @@ -12,7 +14,7 @@ Properties CSharpBible.AboutExTests AboutExTests - v4.8 + v4.8.1 512 {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10.0 @@ -23,6 +25,8 @@ + + true @@ -42,14 +46,72 @@ 4 + + ..\packages\Microsoft.ApplicationInsights.2.22.0\lib\net46\Microsoft.ApplicationInsights.dll + + + + ..\packages\Microsoft.Testing.Extensions.Telemetry.1.0.0\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll + + + ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.0.0\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll + + + ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.0.0\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll + + + ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.0\lib\netstandard2.0\Microsoft.Testing.Platform.dll + + + ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.0\lib\netstandard2.0\Microsoft.Testing.Platform.MSBuild.dll + + + ..\packages\Microsoft.TestPlatform.ObjectModel.17.8.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll + + + ..\packages\Microsoft.TestPlatform.ObjectModel.17.8.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll + + + ..\packages\Microsoft.TestPlatform.ObjectModel.17.8.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + - ..\packages\MSTest.TestFramework.3.0.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + ..\packages\MSTest.TestFramework.3.2.0\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - ..\packages\MSTest.TestFramework.3.0.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + ..\packages\MSTest.TestFramework.3.2.0\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + + + ..\packages\NuGet.Frameworks.6.8.0\lib\net472\NuGet.Frameworks.dll + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + ..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll + + + + ..\packages\System.Diagnostics.DiagnosticSource.8.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll + + + ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Reflection.Metadata.8.0.0\lib\net462\System.Reflection.Metadata.dll + + + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + @@ -70,6 +132,7 @@ + @@ -96,10 +159,14 @@ Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}". - - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + Hello World ! + + diff --git a/CSharpBible/Basics/Basic_Del00_Template/Properties/Settings.Designer.cs b/CSharpBible/Basics/Basic_Del00_Template/Properties/Settings.Designer.cs new file mode 100644 index 000000000..bfc22b606 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del00_Template/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 Basic_Del00_Template.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.6.0.0")] + public 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/Basics/Basic_Del00_Template/Properties/Settings.settings b/CSharpBible/Basics/Basic_Del00_Template/Properties/Settings.settings new file mode 100644 index 000000000..15034e76c --- /dev/null +++ b/CSharpBible/Basics/Basic_Del00_Template/Properties/Settings.settings @@ -0,0 +1,6 @@ + + + + + + diff --git a/CSharpBible/Basics/Basic_Del00_Template/ValueConverters/.info b/CSharpBible/Basics/Basic_Del00_Template/ValueConverters/.info new file mode 100644 index 000000000..c8796c435 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del00_Template/ValueConverters/.info @@ -0,0 +1 @@ +Folder for ValueConverters diff --git a/CSharpBible/Basics/Basic_Del00_Template/ViewModels/.info b/CSharpBible/Basics/Basic_Del00_Template/ViewModels/.info new file mode 100644 index 000000000..daadbdd79 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del00_Template/ViewModels/.info @@ -0,0 +1 @@ +Folder for ViewModels diff --git a/CSharpBible/Basics/Basic_Del00_Template/ViewModels/MainViewModel.cs b/CSharpBible/Basics/Basic_Del00_Template/ViewModels/MainViewModel.cs new file mode 100644 index 000000000..6b3c2d66e --- /dev/null +++ b/CSharpBible/Basics/Basic_Del00_Template/ViewModels/MainViewModel.cs @@ -0,0 +1,12 @@ +using Basic_Del00_Template.Models; +using Basic_Del00_Template.Properties; + +namespace Basic_Del00_Template.ViewModels +{ + public class MainViewModel + { + Model model = new Model(); + + public string Greeting => Resources.ResourceManager.GetString(model.Greeting); + } +} diff --git a/CSharpBible/Basics/Basic_Del00_Template/Views/.info b/CSharpBible/Basics/Basic_Del00_Template/Views/.info new file mode 100644 index 000000000..55b86614b --- /dev/null +++ b/CSharpBible/Basics/Basic_Del00_Template/Views/.info @@ -0,0 +1 @@ +Folder for Views diff --git a/CSharpBible/Basics/Basic_Del00_Template/Views/MainView.cs b/CSharpBible/Basics/Basic_Del00_Template/Views/MainView.cs new file mode 100644 index 000000000..646f59aa5 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del00_Template/Views/MainView.cs @@ -0,0 +1,25 @@ +using System; +using System.Windows.Input; +using ConsoleDisplay.View; +using Basic_Del00_Template.ViewModels; + +namespace Basic_Del00_Template.Views +{ + public class MainView : ICommand + { + public MainViewModel DataContext { get; set; } = new(); + public IConsole console { get; set; } = new MyConsole(); + + public event EventHandler? CanExecuteChanged; + + public bool CanExecute(object? parameter) + { + return true; + } + + public void Execute(object? parameter) + { + console.WriteLine(DataContext.Greeting); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del00_TemplateTests/Basic_Del00_TemplateTests.csproj b/CSharpBible/Basics/Basic_Del00_TemplateTests/Basic_Del00_TemplateTests.csproj new file mode 100644 index 000000000..4175efe71 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del00_TemplateTests/Basic_Del00_TemplateTests.csproj @@ -0,0 +1,29 @@ + + + + net462;net472;net48;net481 + true + false + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + diff --git a/CSharpBible/Basics/Basic_Del00_TemplateTests/Basic_Del00_Template_netTests.csproj b/CSharpBible/Basics/Basic_Del00_TemplateTests/Basic_Del00_Template_netTests.csproj new file mode 100644 index 000000000..67127c042 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del00_TemplateTests/Basic_Del00_Template_netTests.csproj @@ -0,0 +1,29 @@ + + + + net6.0;net7.0 + true + false + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + diff --git a/CSharpBible/Basics/Basic_Del00_TemplateTests/Models/.info b/CSharpBible/Basics/Basic_Del00_TemplateTests/Models/.info new file mode 100644 index 000000000..df9bd99a4 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del00_TemplateTests/Models/.info @@ -0,0 +1 @@ +Folder for Model-Tests diff --git a/CSharpBible/Basics/Basic_Del00_TemplateTests/ProgramTests.cs b/CSharpBible/Basics/Basic_Del00_TemplateTests/ProgramTests.cs new file mode 100644 index 000000000..07b6b7099 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del00_TemplateTests/ProgramTests.cs @@ -0,0 +1,79 @@ +using BaseLib.Model.Tests; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Basic_Del00_Template; +using System; +using System.Windows.Input; + +namespace Basic_Del00_TemplateTests +{ + [TestClass] + public class ProgramTests :BaseTest,ICommand + { + private Action? _OldRun; + private Func? _oldInit; + private bool xInitResult = false; + + public event EventHandler? CanExecuteChanged; + [TestInitialize] + public void Init() { + _OldRun=Program.Run; + _oldInit=Program.Init; + try { _oldInit(Array.Empty()); } catch { } + Program.Init = MyInit; + Program.Run = MyRun; + } + public bool CanExecute(object? parameter) => MyInit(parameter as string[]); + public void Execute(object? parameter)=> MyRun(parameter as string[]); + + private void MyRun(string[] obj) + { + DoLog($"MyRun({string.Join(", ", obj)})"); + } + + private bool MyInit(string[] arg) + { + DoLog($"MyInit({string.Join(", ", arg)})={xInitResult}"); + return xInitResult; + } + + [TestCleanup] + public void CleanUp() + { + Program.Init = _oldInit; + Program.Run = _OldRun; + } + + [DataTestMethod] + [DataRow(new[] { "" }, false, new[] { @"MyInit()=False +" })] + [DataRow(new[] { "" }, true, new[] { @"MyInit()=True +MyRun() +" })] + [DataRow(new[] { "Hello","World" }, false, new[] { @"MyInit(Hello, World)=False +" })] + [DataRow(new[] { "Stormy", "weather", "!" }, true, new[] { @"MyInit(Stormy, weather, !)=True +MyRun(Stormy, weather, !) +" })] + public void MainTest(string[] args,bool xVal, string[] asExp) { + xInitResult = xVal; + Program.Main(args); + Assert.AreEqual(asExp[0],DebugLog); + } + + [DataTestMethod] + [DataRow(new[] { "" },true, new[] { @"MyRun() +" })] + [DataRow(new[] { "" }, false, new[] { @"" })] + [DataRow(new[] { "Hello","World" }, true, new[] { @"MyRun(Hello, World) +" })] + [DataRow(new[] { "Stormy","weather","!" }, false, new[] { @"" })] + public void RunTest(string[] args, bool xSet, string[] asExp) + { + Program.SetView(xSet?this:null!); + _OldRun(args); + Assert.AreEqual(asExp[0], DebugLog); + } + + + } +} diff --git a/CSharpBible/Basics/Basic_Del00_TemplateTests/Properties/SettingsTests.cs b/CSharpBible/Basics/Basic_Del00_TemplateTests/Properties/SettingsTests.cs new file mode 100644 index 000000000..3c33ca11a --- /dev/null +++ b/CSharpBible/Basics/Basic_Del00_TemplateTests/Properties/SettingsTests.cs @@ -0,0 +1,71 @@ +// *********************************************************************** +// Assembly : Basic_Del00_Template_netTests +// Author : Mir +// Created : 05-14-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-14-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Configuration; + +/// +/// The Tests namespace. +/// +/// +namespace Basic_Del00_Template.Properties.Tests +{ + /// + /// Defines test class SettingsTests. + /// + /// + [TestClass()] + public class SettingsTests + { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + /// + /// The test item + /// + /// + Settings testItem; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + + /// + /// Initializes this instance. + /// + /// + [TestInitialize] + public void Init() + { + testItem = new(); + } + + /// + /// Defines the test method SetupTest. + /// + /// + [TestMethod()] + public void SetupTest() + { + Assert.IsNotNull(testItem); + Assert.IsInstanceOfType(testItem, typeof(Settings)); + Assert.IsInstanceOfType(testItem, typeof(ApplicationSettingsBase)); + } + /// + /// Defines the test method DefaultInstanceTest. + /// + /// + [TestMethod()] + public void DefaultInstanceTest() + { + Assert.IsNotNull(Settings.Default); + Assert.IsInstanceOfType(Settings.Default, typeof(Settings)); + Assert.IsInstanceOfType(Settings.Default, typeof(ApplicationSettingsBase)); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del00_TemplateTests/ValueConverters/.info b/CSharpBible/Basics/Basic_Del00_TemplateTests/ValueConverters/.info new file mode 100644 index 000000000..41afb41fc --- /dev/null +++ b/CSharpBible/Basics/Basic_Del00_TemplateTests/ValueConverters/.info @@ -0,0 +1 @@ +Folder for ValueConverters-Tests diff --git a/CSharpBible/Basics/Basic_Del00_TemplateTests/ViewModels/MainViewModelTests.cs b/CSharpBible/Basics/Basic_Del00_TemplateTests/ViewModels/MainViewModelTests.cs new file mode 100644 index 000000000..a623c79ff --- /dev/null +++ b/CSharpBible/Basics/Basic_Del00_TemplateTests/ViewModels/MainViewModelTests.cs @@ -0,0 +1,60 @@ +// *********************************************************************** +// Assembly : Basic_Del00_Template_netTests +// Author : Mir +// Created : 05-14-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-19-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using Microsoft.VisualStudio.TestTools.UnitTesting; + +/// +/// The Tests namespace. +/// +/// +namespace Basic_Del00_Template.ViewModels.Tests +{ + /// + /// Defines test class MainWindowViewModelTests. + /// + /// + [TestClass()] + public class MainViewModelTests //: BaseTestViewModel + { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + /// + /// The test model + /// + /// + MainViewModel testModel; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + + /// + /// Initializes this instance. + /// + /// + [TestInitialize] + public void Init() + { + testModel = new(); + } + + /// + /// Defines the test method SetupTest. + /// + /// + [TestMethod()] + public void SetupTest() + { + Assert.IsNotNull(testModel); + Assert.IsInstanceOfType(testModel, typeof(MainViewModel)); +// Assert.IsInstanceOfType(testModel, typeof(BaseViewModel)); +// Assert.IsInstanceOfType(testModel, typeof(INotifyPropertyChanged)); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del00_TemplateTests/Views/MainViewTests.cs b/CSharpBible/Basics/Basic_Del00_TemplateTests/Views/MainViewTests.cs new file mode 100644 index 000000000..b84aa38e6 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del00_TemplateTests/Views/MainViewTests.cs @@ -0,0 +1,89 @@ +// *********************************************************************** +// Assembly : Basic_Del00_Template_netTests +// Author : Mir +// Created : 05-14-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-14-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Threading; +using BaseLib.Model.Tests; + +/// +/// The Tests namespace. +/// +/// +namespace Basic_Del00_Template.Views.Tests +{ + /// + /// Defines test class MainWindowTests. + /// + /// + [TestClass()] + public class MainViewTests : BaseTest + { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + /// + /// The test view + /// + /// + MainView testView; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + + /// + /// Initializes this instance. + /// + /// + [TestInitialize] + public void Init() + { + var t = new Thread(() => testView = new()); + t.SetApartmentState(ApartmentState.STA); //Set the thread to STA + t.Start(); + t.Join(); //Wait for the thread to end + testView.console = new TestConsole(DoLog); + ClearLog(); + } + + /// + /// Defines the test method MainWindowTest. + /// + /// + [TestMethod()] + public void MainWindowTest() + { + Assert.IsNotNull(testView); + Assert.IsInstanceOfType(testView, typeof(MainView)); + } + + /// + /// Defines the test method MainWindowTest. + /// + /// + [TestMethod()] + public void CanExecuteTest() + { + Assert.IsTrue(testView.CanExecute(null!)); + } + + /// + /// Defines the test method MainWindowTest. + /// + /// + [TestMethod()] + public void ExecuteTest() + { + testView.Execute(null!); + Assert.AreEqual(@"WriteLine(Hello World !) +", DebugLog); + } + + } +} diff --git a/CSharpBible/Basics/Basic_Del00_TemplateTests/Views/TestConsole.cs b/CSharpBible/Basics/Basic_Del00_TemplateTests/Views/TestConsole.cs new file mode 100644 index 000000000..4d0b477b1 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del00_TemplateTests/Views/TestConsole.cs @@ -0,0 +1,84 @@ +// *********************************************************************** +// Assembly : Basic_Del00_Template_netTests +// Author : Mir +// Created : 05-14-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-14-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using ConsoleDisplay.View; +using System; + +namespace Basic_Del00_Template.Views.Tests +{ + public class TestConsole : IConsole + { + private Action _dolog; + + public ConsoleColor ForegroundColor { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public ConsoleColor BackgroundColor { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + + public bool IsOutputRedirected => throw new NotImplementedException(); + + public bool KeyAvailable => throw new NotImplementedException(); + + public int LargestWindowHeight => throw new NotImplementedException(); + + public string Title { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public int WindowHeight { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public int WindowWidth { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + + public TestConsole(Action doLog) { + _dolog = doLog; + } + public void Beep(int freq, int len) + { + throw new NotImplementedException(); + } + + public void Clear() + { + throw new NotImplementedException(); + } + + public (int Left, int Top) GetCursorPosition() + { + throw new NotImplementedException(); + } + + public ConsoleKeyInfo? ReadKey() + { + throw new NotImplementedException(); + } + + public string ReadLine() + { + throw new NotImplementedException(); + } + + public void SetCursorPosition(int left, int top) + { + throw new NotImplementedException(); + } + + public void Write(char ch) + { + throw new NotImplementedException(); + } + + public void Write(string? st) + { + throw new NotImplementedException(); + } + + public void WriteLine(string? st = "") + { + _dolog($"WriteLine({st})"); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del01_Action/Basic_Del01_Action.csproj b/CSharpBible/Basics/Basic_Del01_Action/Basic_Del01_Action.csproj new file mode 100644 index 000000000..fea09c77d --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_Action/Basic_Del01_Action.csproj @@ -0,0 +1,45 @@ + + + + Exe + net462;net472;net48;net481 + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + PublicResXFileCodeGenerator + Resources.Designer.cs + + + + + PublicSettingsSingleFileGenerator + Settings.Designer.cs + + + diff --git a/CSharpBible/Basics/Basic_Del01_Action/Basic_Del01_Action_net.csproj b/CSharpBible/Basics/Basic_Del01_Action/Basic_Del01_Action_net.csproj new file mode 100644 index 000000000..9eefb845c --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_Action/Basic_Del01_Action_net.csproj @@ -0,0 +1,45 @@ + + + + Exe + net6.0;net7.0 + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + PublicResXFileCodeGenerator + Resources.Designer.cs + + + + + PublicSettingsSingleFileGenerator + Settings.Designer.cs + + + diff --git a/CSharpBible/Basics/Basic_Del01_Action/Models/.info b/CSharpBible/Basics/Basic_Del01_Action/Models/.info new file mode 100644 index 000000000..54401ad78 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_Action/Models/.info @@ -0,0 +1 @@ +Folder for Models diff --git a/CSharpBible/Basics/Basic_Del01_Action/Models/CQuickSort.cs b/CSharpBible/Basics/Basic_Del01_Action/Models/CQuickSort.cs new file mode 100644 index 000000000..04883f6f3 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_Action/Models/CQuickSort.cs @@ -0,0 +1,31 @@ +using System; + +namespace Basic_Del01_Action.Models +{ + public static class CQuickSort + { + public static void QuickSort(this Span data,Action? DWrt=null) where T : IComparable + { + int i=0, j=data.Length-1, c=0; + T pivot = data[(data.Length-1) /2]; + DWrt?.Invoke($"Privot[{(data.Length-1) / 2}]= {pivot}: {String.Join(", ", data.ToArray())}"); + while (i < j) + { + while ((c=data[i].CompareTo(pivot)) < 0) i++; + while (i= c) j--; + if (i < j /*&& data[i].CompareTo(data[j]) > 0*/) + { + // Swap + DWrt?.Invoke($"SW {i},{j}: {String.Join(", ", data.ToArray())}"); + (data[j], data[i]) = (data[i], data[j]); + } + else break; + // if (j==i+1 && data[j].CompareTo(pivot) == 0) j--; + } + DWrt?.Invoke($"Split at {j}: {String.Join(", ",data.ToArray() )}"); + // Recursive calls + if (1 < j) QuickSort(data[..j],DWrt); + if (j+1 < data.Length) QuickSort(data[(j+1)..],DWrt); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del01_Action/Models/Model.cs b/CSharpBible/Basics/Basic_Del01_Action/Models/Model.cs new file mode 100644 index 000000000..845bedf31 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_Action/Models/Model.cs @@ -0,0 +1,12 @@ +namespace Basic_Del01_Action.Models +{ + public class Model + { + public string Greeting { get; set; } = "Grtn_ShowOfSort"; + + //int[] data = { 14,7,9,20,16,8,11,19 }; + public int[] data = { 2, 5,-1,11,0,18,22,67,51,6 }; + //public int[] data = { 2, 3, 1, 9, 4, 5, 8, 3, 6, 7 }; + + } +} diff --git a/CSharpBible/Basics/Basic_Del01_Action/Program.cs b/CSharpBible/Basics/Basic_Del01_Action/Program.cs new file mode 100644 index 000000000..245672ee5 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_Action/Program.cs @@ -0,0 +1,33 @@ +using Basic_Del01_Action.Views; +using System; +using System.Windows.Input; + +namespace Basic_Del01_Action +{ + public static class Program + { + private static ICommand? _view; + + public static Action Run { get; set; } = DoRun; + public static Func Init { get; set; } = DoInit; + + public static void Main(params string[] args) { + if (Init(args)) + Run(args); + } + + public static void DoRun(string[] args) + { + _view?.Execute(args); + } + + public static bool DoInit(string[] args) + { + // Init View + SetView( new MainView()); + return _view.CanExecute(args); + } + + public static void SetView(ICommand view)=>_view = view; + } +} diff --git a/CSharpBible/Basics/Basic_Del01_Action/Properties/Resources.Designer.cs b/CSharpBible/Basics/Basic_Del01_Action/Properties/Resources.Designer.cs new file mode 100644 index 000000000..09b3f1c4b --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_Action/Properties/Resources.Designer.cs @@ -0,0 +1,81 @@ +//------------------------------------------------------------------------------ +// +// 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 Basic_Del01_Action.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()] + public 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)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Basic_Del01_Action.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)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Hello World ! ähnelt. + /// + public static string Grtn_HelloWorld { + get { + return ResourceManager.GetString("Grtn_HelloWorld", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die This is a sorting program ähnelt. + /// + public static string Grtn_ShowOfSort { + get { + return ResourceManager.GetString("Grtn_ShowOfSort", resourceCulture); + } + } + } +} diff --git a/CSharpBible/Basics/Basic_Del01_Action/Properties/Resources.resx b/CSharpBible/Basics/Basic_Del01_Action/Properties/Resources.resx new file mode 100644 index 000000000..a5aab8b14 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_Action/Properties/Resources.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + Hello World ! + + + This is a sorting program + + \ No newline at end of file diff --git a/CSharpBible/Basics/Basic_Del01_Action/Properties/Settings.Designer.cs b/CSharpBible/Basics/Basic_Del01_Action/Properties/Settings.Designer.cs new file mode 100644 index 000000000..45759cc83 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_Action/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 Basic_Del01_Action.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.6.0.0")] + public 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/Basics/Basic_Del01_Action/Properties/Settings.settings b/CSharpBible/Basics/Basic_Del01_Action/Properties/Settings.settings new file mode 100644 index 000000000..15034e76c --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_Action/Properties/Settings.settings @@ -0,0 +1,6 @@ + + + + + + diff --git a/CSharpBible/Basics/Basic_Del01_Action/ValueConverters/.info b/CSharpBible/Basics/Basic_Del01_Action/ValueConverters/.info new file mode 100644 index 000000000..c8796c435 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_Action/ValueConverters/.info @@ -0,0 +1 @@ +Folder for ValueConverters diff --git a/CSharpBible/Basics/Basic_Del01_Action/ViewModels/.info b/CSharpBible/Basics/Basic_Del01_Action/ViewModels/.info new file mode 100644 index 000000000..daadbdd79 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_Action/ViewModels/.info @@ -0,0 +1 @@ +Folder for ViewModels diff --git a/CSharpBible/Basics/Basic_Del01_Action/ViewModels/MainViewModel.cs b/CSharpBible/Basics/Basic_Del01_Action/ViewModels/MainViewModel.cs new file mode 100644 index 000000000..df24a73b9 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_Action/ViewModels/MainViewModel.cs @@ -0,0 +1,20 @@ +using Basic_Del01_Action.Models; +using Basic_Del01_Action.Properties; +using System; + +namespace Basic_Del01_Action.ViewModels +{ + public class MainViewModel + { + Model model = new Model(); + + public string Greeting => Resources.ResourceManager.GetString(model.Greeting); + + public Span GetSortedData(Action? Wrt=null) + { + Span data = model.data; + data.QuickSort(Wrt); + return data; + } + } +} diff --git a/CSharpBible/Basics/Basic_Del01_Action/Views/.info b/CSharpBible/Basics/Basic_Del01_Action/Views/.info new file mode 100644 index 000000000..55b86614b --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_Action/Views/.info @@ -0,0 +1 @@ +Folder for Views diff --git a/CSharpBible/Basics/Basic_Del01_Action/Views/MainView.cs b/CSharpBible/Basics/Basic_Del01_Action/Views/MainView.cs new file mode 100644 index 000000000..263d469bf --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_Action/Views/MainView.cs @@ -0,0 +1,26 @@ +using System; +using System.Windows.Input; +using ConsoleDisplay.View; +using Basic_Del01_Action.ViewModels; + +namespace Basic_Del01_Action.Views +{ + public class MainView : ICommand + { + public MainViewModel DataContext { get; set; } = new(); + public IConsole console { get; set; } = new MyConsole(); + + public event EventHandler? CanExecuteChanged; + + public bool CanExecute(object? parameter) + { + return true; + } + + public void Execute(object? parameter) + { + console.WriteLine(DataContext.Greeting); + console.WriteLine($"Sorted: {String.Join(", ", DataContext.GetSortedData(console.WriteLine).ToArray())}"); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del01_ActionTests/Basic_Del01_ActionTests.csproj b/CSharpBible/Basics/Basic_Del01_ActionTests/Basic_Del01_ActionTests.csproj new file mode 100644 index 000000000..baeb6e857 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_ActionTests/Basic_Del01_ActionTests.csproj @@ -0,0 +1,29 @@ + + + + net462;net472;net48;net481 + true + false + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + diff --git a/CSharpBible/Basics/Basic_Del01_ActionTests/Basic_Del01_Action_netTests.csproj b/CSharpBible/Basics/Basic_Del01_ActionTests/Basic_Del01_Action_netTests.csproj new file mode 100644 index 000000000..d13224db2 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_ActionTests/Basic_Del01_Action_netTests.csproj @@ -0,0 +1,29 @@ + + + + net6.0;net7.0 + true + false + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + diff --git a/CSharpBible/Basics/Basic_Del01_ActionTests/Models/.info b/CSharpBible/Basics/Basic_Del01_ActionTests/Models/.info new file mode 100644 index 000000000..df9bd99a4 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_ActionTests/Models/.info @@ -0,0 +1 @@ +Folder for Model-Tests diff --git a/CSharpBible/Basics/Basic_Del01_ActionTests/Models/CQuickSortTests.cs b/CSharpBible/Basics/Basic_Del01_ActionTests/Models/CQuickSortTests.cs new file mode 100644 index 000000000..f8fd28132 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_ActionTests/Models/CQuickSortTests.cs @@ -0,0 +1,196 @@ +using BaseLib.Model.Tests; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using static BaseLib.Helper.TestHelper; + +namespace Basic_Del01_Action.Models.Tests +{ + [TestClass()] + public class CQuickSortTests : BaseTest + { + static IEnumerable TestQSortData => new[] + { + new object[] {1, new[] { 1 }, new[] { @"Privot[0]= 1: 1 +Split at 0: 1 +" } }, + new object[] {2, new[] { 1, 1 }, new[] { @"Privot[0]= 1: 1, 1 +Split at 0: 1, 1 +Privot[0]= 1: 1 +Split at 0: 1 +" } }, + new object[] {20, new[] { 1, 2 }, new[] { @"Privot[0]= 1: 1, 2 +Split at 0: 1, 2 +Privot[0]= 2: 2 +Split at 0: 2 +" } }, + new object[] {21, new[] { 2, 1 }, new[] { @"Privot[0]= 2: 2, 1 +SW 0,1: 2, 1 +Split at 1: 1, 2 +" } }, + new object[] {3, new[] { 2, 2, 1 }, new[] { @"Privot[1]= 2: 2, 2, 1 +SW 0,2: 2, 2, 1 +Split at 1: 1, 2, 2 +Privot[0]= 2: 2 +Split at 0: 2 +" } }, + new object[] {30, new[] { 2, 1, 2 }, new[] { @"Privot[1]= 1: 2, 1, 2 +SW 0,1: 2, 1, 2 +Split at 0: 1, 2, 2 +Privot[0]= 2: 2, 2 +Split at 0: 2, 2 +Privot[0]= 2: 2 +Split at 0: 2 +" } }, + new object[] {31, new[] { 1, 2, 3 }, new[] { @"Privot[1]= 2: 1, 2, 3 +Split at 1: 1, 2, 3 +Privot[0]= 3: 3 +Split at 0: 3 +" } }, + new object[] {32, new[] { 3, 2, 1 }, new[] { @"Privot[1]= 2: 3, 2, 1 +SW 0,2: 3, 2, 1 +Split at 1: 1, 2, 3 +Privot[0]= 3: 3 +Split at 0: 3 +" } }, + new object[] {33, new[] { 2, 2, 1 }, new[] { @"Privot[1]= 2: 2, 2, 1 +SW 0,2: 2, 2, 1 +Split at 1: 1, 2, 2 +Privot[0]= 2: 2 +Split at 0: 2 +" } }, + new object[] {34, new[] { 2, 1, 2 }, new[] { @"Privot[1]= 1: 2, 1, 2 +SW 0,1: 2, 1, 2 +Split at 0: 1, 2, 2 +Privot[0]= 2: 2, 2 +Split at 0: 2, 2 +Privot[0]= 2: 2 +Split at 0: 2 +" } }, + new object[] {4, new[] { 1, 2, 3, 4 }, new[] { @"Privot[1]= 2: 1, 2, 3, 4 +Split at 1: 1, 2, 3, 4 +Privot[0]= 3: 3, 4 +Split at 0: 3, 4 +Privot[0]= 4: 4 +Split at 0: 4 +" } }, + new object[] {40, new[] { 4, 3, 2, 1 }, new[] { @"Privot[1]= 3: 4, 3, 2, 1 +SW 0,3: 4, 3, 2, 1 +SW 1,2: 1, 3, 2, 4 +Split at 2: 1, 2, 3, 4 +Privot[0]= 1: 1, 2 +Split at 0: 1, 2 +Privot[0]= 2: 2 +Split at 0: 2 +Privot[0]= 4: 4 +Split at 0: 4 +" } }, + new object[] {41, new[] { 3, 4, 1, 2 }, new[] { @"Privot[1]= 4: 3, 4, 1, 2 +SW 1,3: 3, 4, 1, 2 +Split at 3: 3, 2, 1, 4 +Privot[1]= 2: 3, 2, 1 +SW 0,2: 3, 2, 1 +Split at 1: 1, 2, 3 +Privot[0]= 3: 3 +Split at 0: 3 +" } }, + new object[] {42, new[] { 3, 4, 2, 1 }, new[] { @"Privot[1]= 4: 3, 4, 2, 1 +SW 1,3: 3, 4, 2, 1 +Split at 3: 3, 1, 2, 4 +Privot[1]= 1: 3, 1, 2 +SW 0,1: 3, 1, 2 +Split at 0: 1, 3, 2 +Privot[0]= 3: 3, 2 +SW 0,1: 3, 2 +Split at 1: 2, 3 +" } }, + new object[] {43, new[] { 3, 2, 2, 1 }, new[] { @"Privot[1]= 2: 3, 2, 2, 1 +SW 0,3: 3, 2, 2, 1 +Split at 1: 1, 2, 2, 3 +Privot[0]= 2: 2, 3 +Split at 0: 2, 3 +Privot[0]= 3: 3 +Split at 0: 3 +" } }, + new object[] {44, new[] { 1, 2, 1, 2 }, new[] { @"Privot[1]= 2: 1, 2, 1, 2 +SW 1,2: 1, 2, 1, 2 +Split at 2: 1, 1, 2, 2 +Privot[0]= 1: 1, 1 +Split at 0: 1, 1 +Privot[0]= 1: 1 +Split at 0: 1 +Privot[0]= 2: 2 +Split at 0: 2 +" } }, + new object[] {5, new[] { 1, 2, 3, 4, 5 }, new[] { @"Privot[2]= 3: 1, 2, 3, 4, 5 +Split at 2: 1, 2, 3, 4, 5 +Privot[0]= 1: 1, 2 +Split at 0: 1, 2 +Privot[0]= 2: 2 +Split at 0: 2 +Privot[0]= 4: 4, 5 +Split at 0: 4, 5 +Privot[0]= 5: 5 +Split at 0: 5 +" } }, + new object[] {50, new[] { 5, 4, 3, 2, 1 }, new[] { @"Privot[2]= 3: 5, 4, 3, 2, 1 +SW 0,4: 5, 4, 3, 2, 1 +SW 1,3: 1, 4, 3, 2, 5 +Split at 2: 1, 2, 3, 4, 5 +Privot[0]= 1: 1, 2 +Split at 0: 1, 2 +Privot[0]= 2: 2 +Split at 0: 2 +Privot[0]= 4: 4, 5 +Split at 0: 4, 5 +Privot[0]= 5: 5 +Split at 0: 5 +" } }, + new object[] {51, new[] { 1, 3, 2, 5, 4 }, new[] { @"Privot[2]= 2: 1, 3, 2, 5, 4 +SW 1,2: 1, 3, 2, 5, 4 +Split at 1: 1, 2, 3, 5, 4 +Privot[1]= 5: 3, 5, 4 +SW 1,2: 3, 5, 4 +Split at 2: 3, 4, 5 +Privot[0]= 3: 3, 4 +Split at 0: 3, 4 +Privot[0]= 4: 4 +Split at 0: 4 +" } }, + new object[] {52, new[] { 1, 2, 3, 5, 4 }, new[] { @"Privot[2]= 3: 1, 2, 3, 5, 4 +Split at 2: 1, 2, 3, 5, 4 +Privot[0]= 1: 1, 2 +Split at 0: 1, 2 +Privot[0]= 2: 2 +Split at 0: 2 +Privot[0]= 5: 5, 4 +SW 0,1: 5, 4 +Split at 1: 4, 5 +" } }, + }; + + [DataTestMethod] + [DynamicData(nameof(TestQSortData))] + // Convert DataRow to IEnumerable + public void QuickSortTest(int _, int[] data, string[] asExp) + { + int[] expected = data.OrderBy(x => x).ToArray(); + ((Span)data).QuickSort(DoLog); + CollectionAssert.AreEqual(expected, data); + AssertAreEqual(asExp[0], DebugLog); + } + + [DataTestMethod] + [DynamicData(nameof(TestQSortData))] + public void QuickSortTest2(int _, int[] data, string[] __) + { + int[] expected = data.OrderBy(x => x).ToArray(); + ((Span)data).QuickSort(); + CollectionAssert.AreEqual(expected, data); + Assert.AreEqual("", DebugLog); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del01_ActionTests/ProgramTests.cs b/CSharpBible/Basics/Basic_Del01_ActionTests/ProgramTests.cs new file mode 100644 index 000000000..6ab635886 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_ActionTests/ProgramTests.cs @@ -0,0 +1,79 @@ +using BaseLib.Model.Tests; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Basic_Del01_Action; +using System; +using System.Windows.Input; + +namespace Basic_Del01_ActionTests +{ + [TestClass] + public class ProgramTests :BaseTest,ICommand + { + private Action? _OldRun; + private Func? _oldInit; + private bool xInitResult = false; + + public event EventHandler? CanExecuteChanged; + [TestInitialize] + public void Init() { + _OldRun=Program.Run; + _oldInit=Program.Init; + try { _oldInit(Array.Empty()); } catch { } + Program.Init = MyInit; + Program.Run = MyRun; + } + public bool CanExecute(object? parameter) => MyInit(parameter as string[]); + public void Execute(object? parameter)=> MyRun(parameter as string[]); + + private void MyRun(string[] obj) + { + DoLog($"MyRun({string.Join(", ", obj)})"); + } + + private bool MyInit(string[] arg) + { + DoLog($"MyInit({string.Join(", ", arg)})={xInitResult}"); + return xInitResult; + } + + [TestCleanup] + public void CleanUp() + { + Program.Init = _oldInit; + Program.Run = _OldRun; + } + + [DataTestMethod] + [DataRow(new[] { "" }, false, new[] { @"MyInit()=False +" })] + [DataRow(new[] { "" }, true, new[] { @"MyInit()=True +MyRun() +" })] + [DataRow(new[] { "Hello","World" }, false, new[] { @"MyInit(Hello, World)=False +" })] + [DataRow(new[] { "Stormy", "weather", "!" }, true, new[] { @"MyInit(Stormy, weather, !)=True +MyRun(Stormy, weather, !) +" })] + public void MainTest(string[] args,bool xVal, string[] asExp) { + xInitResult = xVal; + Program.Main(args); + Assert.AreEqual(asExp[0],DebugLog); + } + + [DataTestMethod] + [DataRow(new[] { "" },true, new[] { @"MyRun() +" })] + [DataRow(new[] { "" }, false, new[] { @"" })] + [DataRow(new[] { "Hello","World" }, true, new[] { @"MyRun(Hello, World) +" })] + [DataRow(new[] { "Stormy","weather","!" }, false, new[] { @"" })] + public void RunTest(string[] args, bool xSet, string[] asExp) + { + Program.SetView(xSet?this:null!); + _OldRun(args); + Assert.AreEqual(asExp[0], DebugLog); + } + + + } +} diff --git a/CSharpBible/Basics/Basic_Del01_ActionTests/Properties/SettingsTests.cs b/CSharpBible/Basics/Basic_Del01_ActionTests/Properties/SettingsTests.cs new file mode 100644 index 000000000..149f8018d --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_ActionTests/Properties/SettingsTests.cs @@ -0,0 +1,71 @@ +// *********************************************************************** +// Assembly : Basic_Del01_Action_netTests +// Author : Mir +// Created : 05-14-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-14-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Configuration; + +/// +/// The Tests namespace. +/// +/// +namespace Basic_Del01_Action.Properties.Tests +{ + /// + /// Defines test class SettingsTests. + /// + /// + [TestClass()] + public class SettingsTests + { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + /// + /// The test item + /// + /// + Settings testItem; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + + /// + /// Initializes this instance. + /// + /// + [TestInitialize] + public void Init() + { + testItem = new(); + } + + /// + /// Defines the test method SetupTest. + /// + /// + [TestMethod()] + public void SetupTest() + { + Assert.IsNotNull(testItem); + Assert.IsInstanceOfType(testItem, typeof(Settings)); + Assert.IsInstanceOfType(testItem, typeof(ApplicationSettingsBase)); + } + /// + /// Defines the test method DefaultInstanceTest. + /// + /// + [TestMethod()] + public void DefaultInstanceTest() + { + Assert.IsNotNull(Settings.Default); + Assert.IsInstanceOfType(Settings.Default, typeof(Settings)); + Assert.IsInstanceOfType(Settings.Default, typeof(ApplicationSettingsBase)); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del01_ActionTests/ValueConverters/.info b/CSharpBible/Basics/Basic_Del01_ActionTests/ValueConverters/.info new file mode 100644 index 000000000..41afb41fc --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_ActionTests/ValueConverters/.info @@ -0,0 +1 @@ +Folder for ValueConverters-Tests diff --git a/CSharpBible/Basics/Basic_Del01_ActionTests/ViewModels/MainViewModelTests.cs b/CSharpBible/Basics/Basic_Del01_ActionTests/ViewModels/MainViewModelTests.cs new file mode 100644 index 000000000..2e5fe17a7 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_ActionTests/ViewModels/MainViewModelTests.cs @@ -0,0 +1,60 @@ +// *********************************************************************** +// Assembly : Basic_Del01_Action_netTests +// Author : Mir +// Created : 05-14-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-19-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using Microsoft.VisualStudio.TestTools.UnitTesting; + +/// +/// The Tests namespace. +/// +/// +namespace Basic_Del01_Action.ViewModels.Tests +{ + /// + /// Defines test class MainWindowViewModelTests. + /// + /// + [TestClass()] + public class MainViewModelTests //: BaseTestViewModel + { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + /// + /// The test model + /// + /// + MainViewModel testModel; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + + /// + /// Initializes this instance. + /// + /// + [TestInitialize] + public void Init() + { + testModel = new(); + } + + /// + /// Defines the test method SetupTest. + /// + /// + [TestMethod()] + public void SetupTest() + { + Assert.IsNotNull(testModel); + Assert.IsInstanceOfType(testModel, typeof(MainViewModel)); +// Assert.IsInstanceOfType(testModel, typeof(BaseViewModel)); +// Assert.IsInstanceOfType(testModel, typeof(INotifyPropertyChanged)); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del01_ActionTests/Views/MainViewTests.cs b/CSharpBible/Basics/Basic_Del01_ActionTests/Views/MainViewTests.cs new file mode 100644 index 000000000..928ab36da --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_ActionTests/Views/MainViewTests.cs @@ -0,0 +1,114 @@ +// *********************************************************************** +// Assembly : Basic_Del01_Action_netTests +// Author : Mir +// Created : 05-14-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-14-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Threading; +using BaseLib.Model.Tests; +using static BaseLib.Helper.TestHelper; + +/// +/// The Tests namespace. +/// +/// +namespace Basic_Del01_Action.Views.Tests +{ + /// + /// Defines test class MainWindowTests. + /// + /// + [TestClass()] + public class MainViewTests : BaseTest + { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + /// + /// The test view + /// + /// + MainView testView; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + + /// + /// Initializes this instance. + /// + /// + [TestInitialize] + public void Init() + { + var t = new Thread(() => testView = new()); + t.SetApartmentState(ApartmentState.STA); //Set the thread to STA + t.Start(); + t.Join(); //Wait for the thread to end + testView.console = new TestConsole(DoLog); + ClearLog(); + } + + /// + /// Defines the test method MainWindowTest. + /// + /// + [TestMethod()] + public void MainWindowTest() + { + Assert.IsNotNull(testView); + Assert.IsInstanceOfType(testView, typeof(MainView)); + } + + /// + /// Defines the test method MainWindowTest. + /// + /// + [TestMethod()] + public void CanExecuteTest() + { + Assert.IsTrue(testView.CanExecute(null!)); + } + + /// + /// Defines the test method MainWindowTest. + /// + /// + [TestMethod()] + public void ExecuteTest() + { + testView.Execute(null!); + AssertAreEqual(@"WriteLine(This is a sorting program) +WriteLine(Privot[4]= 0: 2, 5, -1, 11, 0, 18, 22, 67, 51, 6) +WriteLine(SW 0,4: 2, 5, -1, 11, 0, 18, 22, 67, 51, 6) +WriteLine(SW 0,2: 0, 5, -1, 11, 2, 18, 22, 67, 51, 6) +WriteLine(SW 1,2: -1, 5, 0, 11, 2, 18, 22, 67, 51, 6) +WriteLine(Split at 1: -1, 0, 5, 11, 2, 18, 22, 67, 51, 6) +WriteLine(Privot[3]= 18: 5, 11, 2, 18, 22, 67, 51, 6) +WriteLine(SW 3,7: 5, 11, 2, 18, 22, 67, 51, 6) +WriteLine(SW 4,7: 5, 11, 2, 6, 22, 67, 51, 18) +WriteLine(Split at 4: 5, 11, 2, 6, 18, 67, 51, 22) +WriteLine(Privot[1]= 11: 5, 11, 2, 6) +WriteLine(SW 1,3: 5, 11, 2, 6) +WriteLine(Split at 3: 5, 6, 2, 11) +WriteLine(Privot[1]= 6: 5, 6, 2) +WriteLine(SW 1,2: 5, 6, 2) +WriteLine(Split at 2: 5, 2, 6) +WriteLine(Privot[0]= 5: 5, 2) +WriteLine(SW 0,1: 5, 2) +WriteLine(Split at 1: 2, 5) +WriteLine(Privot[1]= 51: 67, 51, 22) +WriteLine(SW 0,2: 67, 51, 22) +WriteLine(Split at 1: 22, 51, 67) +WriteLine(Privot[0]= 67: 67) +WriteLine(Split at 0: 67) +WriteLine(Sorted: -1, 0, 2, 5, 6, 11, 18, 22, 51, 67) +", DebugLog); + } + + } +} diff --git a/CSharpBible/Basics/Basic_Del01_ActionTests/Views/TestConsole.cs b/CSharpBible/Basics/Basic_Del01_ActionTests/Views/TestConsole.cs new file mode 100644 index 000000000..fecba6a3c --- /dev/null +++ b/CSharpBible/Basics/Basic_Del01_ActionTests/Views/TestConsole.cs @@ -0,0 +1,84 @@ +// *********************************************************************** +// Assembly : Basic_Del01_Action_netTests +// Author : Mir +// Created : 05-14-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-14-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using ConsoleDisplay.View; +using System; + +namespace Basic_Del01_Action.Views.Tests +{ + public class TestConsole : IConsole + { + private Action _dolog; + + public ConsoleColor ForegroundColor { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public ConsoleColor BackgroundColor { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + + public bool IsOutputRedirected => throw new NotImplementedException(); + + public bool KeyAvailable => throw new NotImplementedException(); + + public int LargestWindowHeight => throw new NotImplementedException(); + + public string Title { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public int WindowHeight { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public int WindowWidth { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + + public TestConsole(Action doLog) { + _dolog = doLog; + } + public void Beep(int freq, int len) + { + throw new NotImplementedException(); + } + + public void Clear() + { + throw new NotImplementedException(); + } + + public (int Left, int Top) GetCursorPosition() + { + throw new NotImplementedException(); + } + + public ConsoleKeyInfo? ReadKey() + { + throw new NotImplementedException(); + } + + public string ReadLine() + { + throw new NotImplementedException(); + } + + public void SetCursorPosition(int left, int top) + { + throw new NotImplementedException(); + } + + public void Write(char ch) + { + throw new NotImplementedException(); + } + + public void Write(string? st) + { + throw new NotImplementedException(); + } + + public void WriteLine(string? st = "") + { + _dolog($"WriteLine({st})"); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del02_Filter/Basic_Del02_Filter.csproj b/CSharpBible/Basics/Basic_Del02_Filter/Basic_Del02_Filter.csproj new file mode 100644 index 000000000..fea09c77d --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_Filter/Basic_Del02_Filter.csproj @@ -0,0 +1,45 @@ + + + + Exe + net462;net472;net48;net481 + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + PublicResXFileCodeGenerator + Resources.Designer.cs + + + + + PublicSettingsSingleFileGenerator + Settings.Designer.cs + + + diff --git a/CSharpBible/Basics/Basic_Del02_Filter/Basic_Del02_Filter_net.csproj b/CSharpBible/Basics/Basic_Del02_Filter/Basic_Del02_Filter_net.csproj new file mode 100644 index 000000000..9eefb845c --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_Filter/Basic_Del02_Filter_net.csproj @@ -0,0 +1,45 @@ + + + + Exe + net6.0;net7.0 + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + PublicResXFileCodeGenerator + Resources.Designer.cs + + + + + PublicSettingsSingleFileGenerator + Settings.Designer.cs + + + diff --git a/CSharpBible/Basics/Basic_Del02_Filter/Models/.info b/CSharpBible/Basics/Basic_Del02_Filter/Models/.info new file mode 100644 index 000000000..54401ad78 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_Filter/Models/.info @@ -0,0 +1 @@ +Folder for Models diff --git a/CSharpBible/Basics/Basic_Del02_Filter/Models/CFilter.cs b/CSharpBible/Basics/Basic_Del02_Filter/Models/CFilter.cs new file mode 100644 index 000000000..2a35c6f45 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_Filter/Models/CFilter.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace Basic_Del02_Filter.Models +{ + public static class CFilter + { + public static T[] Filter(this T[] data,Predicate predicate) + { + List values = new(); + foreach (var item in data) + { + if (predicate.Invoke(item)) values.Add(item); + } + return values.ToArray(); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del02_Filter/Models/Model.cs b/CSharpBible/Basics/Basic_Del02_Filter/Models/Model.cs new file mode 100644 index 000000000..a7a9ee272 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_Filter/Models/Model.cs @@ -0,0 +1,12 @@ +namespace Basic_Del02_Filter.Models +{ + public class Model + { + public string Greeting { get; set; } = "Grtn_FilteredList"; + + public + //int[] data = { 14,7,9,20,16,8,11,19 }; + int[] data = { 2, 5, -1, 11, 0, 18, 22, 67, 51, 6 }; + //public int[] data = { 2, 3, 1, 9, 4, 5, 8, 3, 6, 7 }; + } +} diff --git a/CSharpBible/Basics/Basic_Del02_Filter/Program.cs b/CSharpBible/Basics/Basic_Del02_Filter/Program.cs new file mode 100644 index 000000000..c6ad9dd5b --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_Filter/Program.cs @@ -0,0 +1,33 @@ +using Basic_Del02_Filter.Views; +using System; +using System.Windows.Input; + +namespace Basic_Del02_Filter +{ + public static class Program + { + private static ICommand? _view; + + public static Action Run { get; set; } = DoRun; + public static Func Init { get; set; } = DoInit; + + public static void Main(params string[] args) { + if (Init(args)) + Run(args); + } + + public static void DoRun(string[] args) + { + _view?.Execute(args); + } + + public static bool DoInit(string[] args) + { + // Init View + SetView( new MainView()); + return _view.CanExecute(args); + } + + public static void SetView(ICommand view)=>_view = view; + } +} diff --git a/CSharpBible/Basics/Basic_Del02_Filter/Properties/Resources.Designer.cs b/CSharpBible/Basics/Basic_Del02_Filter/Properties/Resources.Designer.cs new file mode 100644 index 000000000..e58c4ff0b --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_Filter/Properties/Resources.Designer.cs @@ -0,0 +1,81 @@ +//------------------------------------------------------------------------------ +// +// 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 Basic_Del02_Filter.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()] + public 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)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Basic_Del02_Filter.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)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die This is a filtered list ähnelt. + /// + public static string Grtn_FilteredList { + get { + return ResourceManager.GetString("Grtn_FilteredList", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Hello World ! ähnelt. + /// + public static string Grtn_HelloWorld { + get { + return ResourceManager.GetString("Grtn_HelloWorld", resourceCulture); + } + } + } +} diff --git a/CSharpBible/Basics/Basic_Del02_Filter/Properties/Resources.resx b/CSharpBible/Basics/Basic_Del02_Filter/Properties/Resources.resx new file mode 100644 index 000000000..47aec12c7 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_Filter/Properties/Resources.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + This is a filtered list + + + Hello World ! + + \ No newline at end of file diff --git a/CSharpBible/Basics/Basic_Del02_Filter/Properties/Settings.Designer.cs b/CSharpBible/Basics/Basic_Del02_Filter/Properties/Settings.Designer.cs new file mode 100644 index 000000000..e21ead68d --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_Filter/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 Basic_Del02_Filter.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.6.0.0")] + public 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/Basics/Basic_Del02_Filter/Properties/Settings.settings b/CSharpBible/Basics/Basic_Del02_Filter/Properties/Settings.settings new file mode 100644 index 000000000..15034e76c --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_Filter/Properties/Settings.settings @@ -0,0 +1,6 @@ + + + + + + diff --git a/CSharpBible/Basics/Basic_Del02_Filter/ValueConverters/.info b/CSharpBible/Basics/Basic_Del02_Filter/ValueConverters/.info new file mode 100644 index 000000000..c8796c435 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_Filter/ValueConverters/.info @@ -0,0 +1 @@ +Folder for ValueConverters diff --git a/CSharpBible/Basics/Basic_Del02_Filter/ViewModels/.info b/CSharpBible/Basics/Basic_Del02_Filter/ViewModels/.info new file mode 100644 index 000000000..daadbdd79 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_Filter/ViewModels/.info @@ -0,0 +1 @@ +Folder for ViewModels diff --git a/CSharpBible/Basics/Basic_Del02_Filter/ViewModels/MainViewModel.cs b/CSharpBible/Basics/Basic_Del02_Filter/ViewModels/MainViewModel.cs new file mode 100644 index 000000000..ce4a86419 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_Filter/ViewModels/MainViewModel.cs @@ -0,0 +1,21 @@ +using Basic_Del02_Filter.Models; +using Basic_Del02_Filter.Properties; +using System; + +namespace Basic_Del02_Filter.ViewModels +{ + public class MainViewModel + { + Model model = new Model(); + + public string Greeting => Resources.ResourceManager.GetString(model.Greeting); + + public int[] GetList=>model.data; + + public int[] GetFilteredData(Predicate filter) + { + var data = model.data; + return data.Filter(filter); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del02_Filter/Views/.info b/CSharpBible/Basics/Basic_Del02_Filter/Views/.info new file mode 100644 index 000000000..55b86614b --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_Filter/Views/.info @@ -0,0 +1 @@ +Folder for Views diff --git a/CSharpBible/Basics/Basic_Del02_Filter/Views/MainView.cs b/CSharpBible/Basics/Basic_Del02_Filter/Views/MainView.cs new file mode 100644 index 000000000..4757139b9 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_Filter/Views/MainView.cs @@ -0,0 +1,39 @@ +using System; +using System.Windows.Input; +using ConsoleDisplay.View; +using Basic_Del02_Filter.ViewModels; + +namespace Basic_Del02_Filter.Views +{ + public class MainView : ICommand + { + public MainViewModel DataContext { get; set; } = new(); + public IConsole console { get; set; } = new MyConsole(); + + public event EventHandler? CanExecuteChanged; + + public bool CanExecute(object? parameter) + { + return true; + } + + bool IsGreaterThan5(int parameter) => parameter > 5; + bool IsEven(int parameter)=> parameter % 2 == 0; + + Predicate IsGreaterThan(int parameter2) => (i)=>i > parameter2; + + public void Execute(object? parameter) + { + console.WriteLine(DataContext.Greeting); + console.WriteLine($"Original: {String.Join(", ", DataContext.GetList)}"); + // using the function IsGreaterThan5 as delegate + console.WriteLine($"Filtered(IsGreaterThan5): {String.Join(", ", DataContext.GetFilteredData(IsGreaterThan5))}"); + // using the function IsEven as delegate + console.WriteLine($"Filtered(IsEven): {String.Join(", ", DataContext.GetFilteredData(IsEven))}"); + // using the function IsGreaterThan with 1 as delegate + console.WriteLine($"Filtered(IsGreaterThan(1)): {String.Join(", ", DataContext.GetFilteredData(IsGreaterThan(1)))}"); + // using an anonymous function as delegate + console.WriteLine($"Filtered(anon odd): {String.Join(", ", DataContext.GetFilteredData((i)=>i%2!=0))}"); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del02_FilterTests/Basic_Del02_FilterTests.csproj b/CSharpBible/Basics/Basic_Del02_FilterTests/Basic_Del02_FilterTests.csproj new file mode 100644 index 000000000..7226ac7c3 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_FilterTests/Basic_Del02_FilterTests.csproj @@ -0,0 +1,29 @@ + + + + net462;net472;net48;net481 + true + false + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + diff --git a/CSharpBible/Basics/Basic_Del02_FilterTests/Basic_Del02_Filter_netTests.csproj b/CSharpBible/Basics/Basic_Del02_FilterTests/Basic_Del02_Filter_netTests.csproj new file mode 100644 index 000000000..b9031e50c --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_FilterTests/Basic_Del02_Filter_netTests.csproj @@ -0,0 +1,29 @@ + + + + net6.0;net7.0 + true + false + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + diff --git a/CSharpBible/Basics/Basic_Del02_FilterTests/Models/.info b/CSharpBible/Basics/Basic_Del02_FilterTests/Models/.info new file mode 100644 index 000000000..df9bd99a4 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_FilterTests/Models/.info @@ -0,0 +1 @@ +Folder for Model-Tests diff --git a/CSharpBible/Basics/Basic_Del02_FilterTests/Models/CFilterTests.cs b/CSharpBible/Basics/Basic_Del02_FilterTests/Models/CFilterTests.cs new file mode 100644 index 000000000..469e3014c --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_FilterTests/Models/CFilterTests.cs @@ -0,0 +1,20 @@ +using BaseLib.Model.Tests; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using static BaseLib.Helper.TestHelper; + +namespace Basic_Del02_Filter.Models.Tests +{ + [TestClass] + public class CFilterTests : BaseTest + { + [TestMethod] + [DataRow(new[] { 1 }, new[] { 1 },DisplayName ="1")] + [DataRow(new[] { 2}, new int[]{ }, DisplayName = "2")] + [DataRow(new[] { 2, 5, -1, 11, 0, 18, 22, 67, 51, 6 }, new[] { 5, -1, 11, 67, 51 })] + public void FilterOddTest(int[] data, int[] expected) + { + int[] actual = data.Filter((i) => i % 2 != 0); + AssertAreEqual(expected,actual); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del02_FilterTests/ProgramTests.cs b/CSharpBible/Basics/Basic_Del02_FilterTests/ProgramTests.cs new file mode 100644 index 000000000..62f7d788c --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_FilterTests/ProgramTests.cs @@ -0,0 +1,79 @@ +using BaseLib.Model.Tests; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Basic_Del02_Filter; +using System; +using System.Windows.Input; + +namespace Basic_Del02_FilterTests +{ + [TestClass] + public class ProgramTests :BaseTest,ICommand + { + private Action? _OldRun; + private Func? _oldInit; + private bool xInitResult = false; + + public event EventHandler? CanExecuteChanged; + [TestInitialize] + public void Init() { + _OldRun=Program.Run; + _oldInit=Program.Init; + try { _oldInit(Array.Empty()); } catch { } + Program.Init = MyInit; + Program.Run = MyRun; + } + public bool CanExecute(object? parameter) => MyInit(parameter as string[]); + public void Execute(object? parameter)=> MyRun(parameter as string[]); + + private void MyRun(string[] obj) + { + DoLog($"MyRun({string.Join(", ", obj)})"); + } + + private bool MyInit(string[] arg) + { + DoLog($"MyInit({string.Join(", ", arg)})={xInitResult}"); + return xInitResult; + } + + [TestCleanup] + public void CleanUp() + { + Program.Init = _oldInit; + Program.Run = _OldRun; + } + + [DataTestMethod] + [DataRow(new[] { "" }, false, new[] { @"MyInit()=False +" })] + [DataRow(new[] { "" }, true, new[] { @"MyInit()=True +MyRun() +" })] + [DataRow(new[] { "Hello","World" }, false, new[] { @"MyInit(Hello, World)=False +" })] + [DataRow(new[] { "Stormy", "weather", "!" }, true, new[] { @"MyInit(Stormy, weather, !)=True +MyRun(Stormy, weather, !) +" })] + public void MainTest(string[] args,bool xVal, string[] asExp) { + xInitResult = xVal; + Program.Main(args); + Assert.AreEqual(asExp[0],DebugLog); + } + + [DataTestMethod] + [DataRow(new[] { "" },true, new[] { @"MyRun() +" })] + [DataRow(new[] { "" }, false, new[] { @"" })] + [DataRow(new[] { "Hello","World" }, true, new[] { @"MyRun(Hello, World) +" })] + [DataRow(new[] { "Stormy","weather","!" }, false, new[] { @"" })] + public void RunTest(string[] args, bool xSet, string[] asExp) + { + Program.SetView(xSet?this:null!); + _OldRun(args); + Assert.AreEqual(asExp[0], DebugLog); + } + + + } +} diff --git a/CSharpBible/Basics/Basic_Del02_FilterTests/Properties/SettingsTests.cs b/CSharpBible/Basics/Basic_Del02_FilterTests/Properties/SettingsTests.cs new file mode 100644 index 000000000..24b202718 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_FilterTests/Properties/SettingsTests.cs @@ -0,0 +1,71 @@ +// *********************************************************************** +// Assembly : Basic_Del02_Filter_netTests +// Author : Mir +// Created : 05-14-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-14-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Configuration; + +/// +/// The Tests namespace. +/// +/// +namespace Basic_Del02_Filter.Properties.Tests +{ + /// + /// Defines test class SettingsTests. + /// + /// + [TestClass()] + public class SettingsTests + { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + /// + /// The test item + /// + /// + Settings testItem; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + + /// + /// Initializes this instance. + /// + /// + [TestInitialize] + public void Init() + { + testItem = new(); + } + + /// + /// Defines the test method SetupTest. + /// + /// + [TestMethod()] + public void SetupTest() + { + Assert.IsNotNull(testItem); + Assert.IsInstanceOfType(testItem, typeof(Settings)); + Assert.IsInstanceOfType(testItem, typeof(ApplicationSettingsBase)); + } + /// + /// Defines the test method DefaultInstanceTest. + /// + /// + [TestMethod()] + public void DefaultInstanceTest() + { + Assert.IsNotNull(Settings.Default); + Assert.IsInstanceOfType(Settings.Default, typeof(Settings)); + Assert.IsInstanceOfType(Settings.Default, typeof(ApplicationSettingsBase)); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del02_FilterTests/ValueConverters/.info b/CSharpBible/Basics/Basic_Del02_FilterTests/ValueConverters/.info new file mode 100644 index 000000000..41afb41fc --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_FilterTests/ValueConverters/.info @@ -0,0 +1 @@ +Folder for ValueConverters-Tests diff --git a/CSharpBible/Basics/Basic_Del02_FilterTests/ViewModels/MainViewModelTests.cs b/CSharpBible/Basics/Basic_Del02_FilterTests/ViewModels/MainViewModelTests.cs new file mode 100644 index 000000000..fe2594b79 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_FilterTests/ViewModels/MainViewModelTests.cs @@ -0,0 +1,60 @@ +// *********************************************************************** +// Assembly : Basic_Del02_Filter_netTests +// Author : Mir +// Created : 05-14-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-19-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using Microsoft.VisualStudio.TestTools.UnitTesting; + +/// +/// The Tests namespace. +/// +/// +namespace Basic_Del02_Filter.ViewModels.Tests +{ + /// + /// Defines test class MainWindowViewModelTests. + /// + /// + [TestClass()] + public class MainViewModelTests //: BaseTestViewModel + { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + /// + /// The test model + /// + /// + MainViewModel testModel; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + + /// + /// Initializes this instance. + /// + /// + [TestInitialize] + public void Init() + { + testModel = new(); + } + + /// + /// Defines the test method SetupTest. + /// + /// + [TestMethod()] + public void SetupTest() + { + Assert.IsNotNull(testModel); + Assert.IsInstanceOfType(testModel, typeof(MainViewModel)); +// Assert.IsInstanceOfType(testModel, typeof(BaseViewModel)); +// Assert.IsInstanceOfType(testModel, typeof(INotifyPropertyChanged)); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del02_FilterTests/Views/MainViewTests.cs b/CSharpBible/Basics/Basic_Del02_FilterTests/Views/MainViewTests.cs new file mode 100644 index 000000000..e53c89053 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_FilterTests/Views/MainViewTests.cs @@ -0,0 +1,94 @@ +// *********************************************************************** +// Assembly : Basic_Del02_Filter_netTests +// Author : Mir +// Created : 05-14-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-14-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Threading; +using BaseLib.Model.Tests; + +/// +/// The Tests namespace. +/// +/// +namespace Basic_Del02_Filter.Views.Tests +{ + /// + /// Defines test class MainWindowTests. + /// + /// + [TestClass()] + public class MainViewTests : BaseTest + { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + /// + /// The test view + /// + /// + MainView testView; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + + /// + /// Initializes this instance. + /// + /// + [TestInitialize] + public void Init() + { + var t = new Thread(() => testView = new()); + t.SetApartmentState(ApartmentState.STA); //Set the thread to STA + t.Start(); + t.Join(); //Wait for the thread to end + testView.console = new TestConsole(DoLog); + ClearLog(); + } + + /// + /// Defines the test method MainWindowTest. + /// + /// + [TestMethod()] + public void MainWindowTest() + { + Assert.IsNotNull(testView); + Assert.IsInstanceOfType(testView, typeof(MainView)); + } + + /// + /// Defines the test method MainWindowTest. + /// + /// + [TestMethod()] + public void CanExecuteTest() + { + Assert.IsTrue(testView.CanExecute(null!)); + } + + /// + /// Defines the test method MainWindowTest. + /// + /// + [TestMethod()] + public void ExecuteTest() + { + testView.Execute(null!); + Assert.AreEqual(@"WriteLine(This is a filtered list) +WriteLine(Original: 2, 5, -1, 11, 0, 18, 22, 67, 51, 6) +WriteLine(Filtered(IsGreaterThan5): 11, 18, 22, 67, 51, 6) +WriteLine(Filtered(IsEven): 2, 0, 18, 22, 6) +WriteLine(Filtered(IsGreaterThan(1)): 2, 5, 11, 18, 22, 67, 51, 6) +WriteLine(Filtered(anon odd): 5, -1, 11, 67, 51) +", DebugLog); + } + + } +} diff --git a/CSharpBible/Basics/Basic_Del02_FilterTests/Views/TestConsole.cs b/CSharpBible/Basics/Basic_Del02_FilterTests/Views/TestConsole.cs new file mode 100644 index 000000000..44323bd52 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del02_FilterTests/Views/TestConsole.cs @@ -0,0 +1,84 @@ +// *********************************************************************** +// Assembly : Basic_Del02_Filter_netTests +// Author : Mir +// Created : 05-14-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-14-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using ConsoleDisplay.View; +using System; + +namespace Basic_Del02_Filter.Views.Tests +{ + public class TestConsole : IConsole + { + private Action _dolog; + + public ConsoleColor ForegroundColor { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public ConsoleColor BackgroundColor { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + + public bool IsOutputRedirected => throw new NotImplementedException(); + + public bool KeyAvailable => throw new NotImplementedException(); + + public int LargestWindowHeight => throw new NotImplementedException(); + + public string Title { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public int WindowHeight { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public int WindowWidth { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + + public TestConsole(Action doLog) { + _dolog = doLog; + } + public void Beep(int freq, int len) + { + throw new NotImplementedException(); + } + + public void Clear() + { + throw new NotImplementedException(); + } + + public (int Left, int Top) GetCursorPosition() + { + throw new NotImplementedException(); + } + + public ConsoleKeyInfo? ReadKey() + { + throw new NotImplementedException(); + } + + public string ReadLine() + { + throw new NotImplementedException(); + } + + public void SetCursorPosition(int left, int top) + { + throw new NotImplementedException(); + } + + public void Write(char ch) + { + throw new NotImplementedException(); + } + + public void Write(string? st) + { + throw new NotImplementedException(); + } + + public void WriteLine(string? st = "") + { + _dolog($"WriteLine({st})"); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del03_General/Basic_Del03_General.csproj b/CSharpBible/Basics/Basic_Del03_General/Basic_Del03_General.csproj new file mode 100644 index 000000000..3e67c79c1 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_General/Basic_Del03_General.csproj @@ -0,0 +1,42 @@ + + + + Exe + net462;net472;net48;net481 + + + + + + + + + + + + + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + PublicResXFileCodeGenerator + Resources.Designer.cs + + + + + PublicSettingsSingleFileGenerator + Settings.Designer.cs + + + diff --git a/CSharpBible/Basics/Basic_Del03_General/Basic_Del03_General_net.csproj b/CSharpBible/Basics/Basic_Del03_General/Basic_Del03_General_net.csproj new file mode 100644 index 000000000..9eefb845c --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_General/Basic_Del03_General_net.csproj @@ -0,0 +1,45 @@ + + + + Exe + net6.0;net7.0 + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + PublicResXFileCodeGenerator + Resources.Designer.cs + + + + + PublicSettingsSingleFileGenerator + Settings.Designer.cs + + + diff --git a/CSharpBible/Basics/Basic_Del03_General/Models/.info b/CSharpBible/Basics/Basic_Del03_General/Models/.info new file mode 100644 index 000000000..54401ad78 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_General/Models/.info @@ -0,0 +1 @@ +Folder for Models diff --git a/CSharpBible/Basics/Basic_Del03_General/Models/Model.cs b/CSharpBible/Basics/Basic_Del03_General/Models/Model.cs new file mode 100644 index 000000000..26979212f --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_General/Models/Model.cs @@ -0,0 +1,14 @@ +using System; + +namespace Basic_Del03_General.Models +{ + public class Model + { + public string Greeting { get; set; } = "Grtn_HelloWorld"; + + public Func myCalc = _Dummy; + + private static double _Divide(int arg1, int arg2) => (double)arg1 / arg2; + private static double _Dummy(int arg1, int arg2) => 0.0d; + } +} diff --git a/CSharpBible/Basics/Basic_Del03_General/Program.cs b/CSharpBible/Basics/Basic_Del03_General/Program.cs new file mode 100644 index 000000000..0148db74f --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_General/Program.cs @@ -0,0 +1,33 @@ +using Basic_Del03_General.Views; +using System; +using System.Windows.Input; + +namespace Basic_Del03_General +{ + public static class Program + { + private static ICommand? _view; + + public static Action Run { get; set; } = DoRun; + public static Func Init { get; set; } = DoInit; + + public static void Main(params string[] args) { + if (Init(args)) + Run(args); + } + + public static void DoRun(string[] args) + { + _view?.Execute(args); + } + + public static bool DoInit(string[] args) + { + // Init View + SetView( new MainView()); + return _view.CanExecute(args); + } + + public static void SetView(ICommand view)=>_view = view; + } +} diff --git a/CSharpBible/Basics/Basic_Del03_General/Properties/Resources.Designer.cs b/CSharpBible/Basics/Basic_Del03_General/Properties/Resources.Designer.cs new file mode 100644 index 000000000..a7173ca06 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_General/Properties/Resources.Designer.cs @@ -0,0 +1,72 @@ +//------------------------------------------------------------------------------ +// +// 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 Basic_Del03_General.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()] + public 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)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Basic_Del03_General.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)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Hello World ! ähnelt. + /// + public static string Grtn_HelloWorld { + get { + return ResourceManager.GetString("Grtn_HelloWorld", resourceCulture); + } + } + } +} diff --git a/CSharpBible/Basics/Basic_Del03_General/Properties/Resources.resx b/CSharpBible/Basics/Basic_Del03_General/Properties/Resources.resx new file mode 100644 index 000000000..86752ab07 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_General/Properties/Resources.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + Hello World ! + + diff --git a/CSharpBible/Basics/Basic_Del03_General/Properties/Settings.Designer.cs b/CSharpBible/Basics/Basic_Del03_General/Properties/Settings.Designer.cs new file mode 100644 index 000000000..c18eb8266 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_General/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 Basic_Del03_General.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.6.0.0")] + public 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/Basics/Basic_Del03_General/Properties/Settings.settings b/CSharpBible/Basics/Basic_Del03_General/Properties/Settings.settings new file mode 100644 index 000000000..15034e76c --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_General/Properties/Settings.settings @@ -0,0 +1,6 @@ + + + + + + diff --git a/CSharpBible/Basics/Basic_Del03_General/ValueConverters/.info b/CSharpBible/Basics/Basic_Del03_General/ValueConverters/.info new file mode 100644 index 000000000..c8796c435 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_General/ValueConverters/.info @@ -0,0 +1 @@ +Folder for ValueConverters diff --git a/CSharpBible/Basics/Basic_Del03_General/ViewModels/.info b/CSharpBible/Basics/Basic_Del03_General/ViewModels/.info new file mode 100644 index 000000000..daadbdd79 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_General/ViewModels/.info @@ -0,0 +1 @@ +Folder for ViewModels diff --git a/CSharpBible/Basics/Basic_Del03_General/ViewModels/MainViewModel.cs b/CSharpBible/Basics/Basic_Del03_General/ViewModels/MainViewModel.cs new file mode 100644 index 000000000..01fa02167 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_General/ViewModels/MainViewModel.cs @@ -0,0 +1,14 @@ +using Basic_Del03_General.Models; +using Basic_Del03_General.Properties; + +namespace Basic_Del03_General.ViewModels +{ + public class MainViewModel + { + Model model = new Model(); + + public string Greeting => Resources.ResourceManager.GetString(model.Greeting); + + public double CalcResult => model.myCalc(3,2); + } +} diff --git a/CSharpBible/Basics/Basic_Del03_General/Views/.info b/CSharpBible/Basics/Basic_Del03_General/Views/.info new file mode 100644 index 000000000..55b86614b --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_General/Views/.info @@ -0,0 +1 @@ +Folder for Views diff --git a/CSharpBible/Basics/Basic_Del03_General/Views/MainView.cs b/CSharpBible/Basics/Basic_Del03_General/Views/MainView.cs new file mode 100644 index 000000000..fd881746c --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_General/Views/MainView.cs @@ -0,0 +1,26 @@ +using System; +using System.Windows.Input; +using ConsoleDisplay.View; +using Basic_Del03_General.ViewModels; + +namespace Basic_Del03_General.Views +{ + public class MainView : ICommand + { + public MainViewModel DataContext { get; set; } = new(); + public IConsole console { get; set; } = new MyConsole(); + + public event EventHandler? CanExecuteChanged; + + public bool CanExecute(object? parameter) + { + return true; + } + + public void Execute(object? parameter) + { + console.WriteLine(DataContext.Greeting); + console.WriteLine($"Result: {DataContext.CalcResult}"); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del03_GeneralTests/Basic_Del03_GeneralTests.csproj b/CSharpBible/Basics/Basic_Del03_GeneralTests/Basic_Del03_GeneralTests.csproj new file mode 100644 index 000000000..2ea5d4870 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_GeneralTests/Basic_Del03_GeneralTests.csproj @@ -0,0 +1,29 @@ + + + + net462;net472;net48;net481 + true + false + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + diff --git a/CSharpBible/Basics/Basic_Del03_GeneralTests/Basic_Del03_General_netTests.csproj b/CSharpBible/Basics/Basic_Del03_GeneralTests/Basic_Del03_General_netTests.csproj new file mode 100644 index 000000000..442a32ed3 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_GeneralTests/Basic_Del03_General_netTests.csproj @@ -0,0 +1,29 @@ + + + + net6.0;net7.0 + true + false + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + diff --git a/CSharpBible/Basics/Basic_Del03_GeneralTests/Models/.info b/CSharpBible/Basics/Basic_Del03_GeneralTests/Models/.info new file mode 100644 index 000000000..df9bd99a4 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_GeneralTests/Models/.info @@ -0,0 +1 @@ +Folder for Model-Tests diff --git a/CSharpBible/Basics/Basic_Del03_GeneralTests/ProgramTests.cs b/CSharpBible/Basics/Basic_Del03_GeneralTests/ProgramTests.cs new file mode 100644 index 000000000..ace23cba8 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_GeneralTests/ProgramTests.cs @@ -0,0 +1,79 @@ +using BaseLib.Model.Tests; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Basic_Del03_General; +using System; +using System.Windows.Input; + +namespace Basic_Del03_GeneralTests +{ + [TestClass] + public class ProgramTests :BaseTest,ICommand + { + private Action? _OldRun; + private Func? _oldInit; + private bool xInitResult = false; + + public event EventHandler? CanExecuteChanged; + [TestInitialize] + public void Init() { + _OldRun=Program.Run; + _oldInit=Program.Init; + try { _oldInit(Array.Empty()); } catch { } + Program.Init = MyInit; + Program.Run = MyRun; + } + public bool CanExecute(object? parameter) => MyInit(parameter as string[]); + public void Execute(object? parameter)=> MyRun(parameter as string[]); + + private void MyRun(string[] obj) + { + DoLog($"MyRun({string.Join(", ", obj)})"); + } + + private bool MyInit(string[] arg) + { + DoLog($"MyInit({string.Join(", ", arg)})={xInitResult}"); + return xInitResult; + } + + [TestCleanup] + public void CleanUp() + { + Program.Init = _oldInit; + Program.Run = _OldRun; + } + + [DataTestMethod] + [DataRow(new[] { "" }, false, new[] { @"MyInit()=False +" })] + [DataRow(new[] { "" }, true, new[] { @"MyInit()=True +MyRun() +" })] + [DataRow(new[] { "Hello","World" }, false, new[] { @"MyInit(Hello, World)=False +" })] + [DataRow(new[] { "Stormy", "weather", "!" }, true, new[] { @"MyInit(Stormy, weather, !)=True +MyRun(Stormy, weather, !) +" })] + public void MainTest(string[] args,bool xVal, string[] asExp) { + xInitResult = xVal; + Program.Main(args); + Assert.AreEqual(asExp[0],DebugLog); + } + + [DataTestMethod] + [DataRow(new[] { "" },true, new[] { @"MyRun() +" })] + [DataRow(new[] { "" }, false, new[] { @"" })] + [DataRow(new[] { "Hello","World" }, true, new[] { @"MyRun(Hello, World) +" })] + [DataRow(new[] { "Stormy","weather","!" }, false, new[] { @"" })] + public void RunTest(string[] args, bool xSet, string[] asExp) + { + Program.SetView(xSet?this:null!); + _OldRun(args); + Assert.AreEqual(asExp[0], DebugLog); + } + + + } +} diff --git a/CSharpBible/Basics/Basic_Del03_GeneralTests/Properties/SettingsTests.cs b/CSharpBible/Basics/Basic_Del03_GeneralTests/Properties/SettingsTests.cs new file mode 100644 index 000000000..701c22721 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_GeneralTests/Properties/SettingsTests.cs @@ -0,0 +1,71 @@ +// *********************************************************************** +// Assembly : Basic_Del03_General_netTests +// Author : Mir +// Created : 05-14-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-14-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Configuration; + +/// +/// The Tests namespace. +/// +/// +namespace Basic_Del03_General.Properties.Tests +{ + /// + /// Defines test class SettingsTests. + /// + /// + [TestClass()] + public class SettingsTests + { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + /// + /// The test item + /// + /// + Settings testItem; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + + /// + /// Initializes this instance. + /// + /// + [TestInitialize] + public void Init() + { + testItem = new(); + } + + /// + /// Defines the test method SetupTest. + /// + /// + [TestMethod()] + public void SetupTest() + { + Assert.IsNotNull(testItem); + Assert.IsInstanceOfType(testItem, typeof(Settings)); + Assert.IsInstanceOfType(testItem, typeof(ApplicationSettingsBase)); + } + /// + /// Defines the test method DefaultInstanceTest. + /// + /// + [TestMethod()] + public void DefaultInstanceTest() + { + Assert.IsNotNull(Settings.Default); + Assert.IsInstanceOfType(Settings.Default, typeof(Settings)); + Assert.IsInstanceOfType(Settings.Default, typeof(ApplicationSettingsBase)); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del03_GeneralTests/ValueConverters/.info b/CSharpBible/Basics/Basic_Del03_GeneralTests/ValueConverters/.info new file mode 100644 index 000000000..41afb41fc --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_GeneralTests/ValueConverters/.info @@ -0,0 +1 @@ +Folder for ValueConverters-Tests diff --git a/CSharpBible/Basics/Basic_Del03_GeneralTests/ViewModels/MainViewModelTests.cs b/CSharpBible/Basics/Basic_Del03_GeneralTests/ViewModels/MainViewModelTests.cs new file mode 100644 index 000000000..5615d520f --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_GeneralTests/ViewModels/MainViewModelTests.cs @@ -0,0 +1,60 @@ +// *********************************************************************** +// Assembly : Basic_Del03_General_netTests +// Author : Mir +// Created : 05-14-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-19-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using Microsoft.VisualStudio.TestTools.UnitTesting; + +/// +/// The Tests namespace. +/// +/// +namespace Basic_Del03_General.ViewModels.Tests +{ + /// + /// Defines test class MainWindowViewModelTests. + /// + /// + [TestClass()] + public class MainViewModelTests //: BaseTestViewModel + { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + /// + /// The test model + /// + /// + MainViewModel testModel; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + + /// + /// Initializes this instance. + /// + /// + [TestInitialize] + public void Init() + { + testModel = new(); + } + + /// + /// Defines the test method SetupTest. + /// + /// + [TestMethod()] + public void SetupTest() + { + Assert.IsNotNull(testModel); + Assert.IsInstanceOfType(testModel, typeof(MainViewModel)); +// Assert.IsInstanceOfType(testModel, typeof(BaseViewModel)); +// Assert.IsInstanceOfType(testModel, typeof(INotifyPropertyChanged)); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del03_GeneralTests/Views/MainViewTests.cs b/CSharpBible/Basics/Basic_Del03_GeneralTests/Views/MainViewTests.cs new file mode 100644 index 000000000..ecfee1208 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_GeneralTests/Views/MainViewTests.cs @@ -0,0 +1,89 @@ +// *********************************************************************** +// Assembly : Basic_Del03_General_netTests +// Author : Mir +// Created : 05-14-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-14-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Threading; +using BaseLib.Model.Tests; + +/// +/// The Tests namespace. +/// +/// +namespace Basic_Del03_General.Views.Tests +{ + /// + /// Defines test class MainWindowTests. + /// + /// + [TestClass()] + public class MainViewTests : BaseTest + { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + /// + /// The test view + /// + /// + MainView testView; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + + /// + /// Initializes this instance. + /// + /// + [TestInitialize] + public void Init() + { + var t = new Thread(() => testView = new()); + t.SetApartmentState(ApartmentState.STA); //Set the thread to STA + t.Start(); + t.Join(); //Wait for the thread to end + testView.console = new TestConsole(DoLog); + ClearLog(); + } + + /// + /// Defines the test method MainWindowTest. + /// + /// + [TestMethod()] + public void MainWindowTest() + { + Assert.IsNotNull(testView); + Assert.IsInstanceOfType(testView, typeof(MainView)); + } + + /// + /// Defines the test method MainWindowTest. + /// + /// + [TestMethod()] + public void CanExecuteTest() + { + Assert.IsTrue(testView.CanExecute(null!)); + } + + /// + /// Defines the test method MainWindowTest. + /// + /// + [TestMethod()] + public void ExecuteTest() + { + testView.Execute(null!); + Assert.AreEqual(@"WriteLine(Hello World !) +", DebugLog); + } + + } +} diff --git a/CSharpBible/Basics/Basic_Del03_GeneralTests/Views/TestConsole.cs b/CSharpBible/Basics/Basic_Del03_GeneralTests/Views/TestConsole.cs new file mode 100644 index 000000000..4cd3d3316 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del03_GeneralTests/Views/TestConsole.cs @@ -0,0 +1,84 @@ +// *********************************************************************** +// Assembly : Basic_Del03_General_netTests +// Author : Mir +// Created : 05-14-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-14-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using ConsoleDisplay.View; +using System; + +namespace Basic_Del03_General.Views.Tests +{ + public class TestConsole : IConsole + { + private Action _dolog; + + public ConsoleColor ForegroundColor { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public ConsoleColor BackgroundColor { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + + public bool IsOutputRedirected => throw new NotImplementedException(); + + public bool KeyAvailable => throw new NotImplementedException(); + + public int LargestWindowHeight => throw new NotImplementedException(); + + public string Title { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public int WindowHeight { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public int WindowWidth { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + + public TestConsole(Action doLog) { + _dolog = doLog; + } + public void Beep(int freq, int len) + { + throw new NotImplementedException(); + } + + public void Clear() + { + throw new NotImplementedException(); + } + + public (int Left, int Top) GetCursorPosition() + { + throw new NotImplementedException(); + } + + public ConsoleKeyInfo? ReadKey() + { + throw new NotImplementedException(); + } + + public string ReadLine() + { + throw new NotImplementedException(); + } + + public void SetCursorPosition(int left, int top) + { + throw new NotImplementedException(); + } + + public void Write(char ch) + { + throw new NotImplementedException(); + } + + public void Write(string? st) + { + throw new NotImplementedException(); + } + + public void WriteLine(string? st = "") + { + _dolog($"WriteLine({st})"); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Basic_Del04_TestImposibleStuff.csproj b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Basic_Del04_TestImposibleStuff.csproj new file mode 100644 index 000000000..3e67c79c1 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Basic_Del04_TestImposibleStuff.csproj @@ -0,0 +1,42 @@ + + + + Exe + net462;net472;net48;net481 + + + + + + + + + + + + + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + PublicResXFileCodeGenerator + Resources.Designer.cs + + + + + PublicSettingsSingleFileGenerator + Settings.Designer.cs + + + diff --git a/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Basic_Del04_TestImposibleStuff_net.csproj b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Basic_Del04_TestImposibleStuff_net.csproj new file mode 100644 index 000000000..9eefb845c --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Basic_Del04_TestImposibleStuff_net.csproj @@ -0,0 +1,45 @@ + + + + Exe + net6.0;net7.0 + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + PublicResXFileCodeGenerator + Resources.Designer.cs + + + + + PublicSettingsSingleFileGenerator + Settings.Designer.cs + + + diff --git a/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Models/.info b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Models/.info new file mode 100644 index 000000000..54401ad78 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Models/.info @@ -0,0 +1 @@ +Folder for Models diff --git a/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Models/Model.cs b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Models/Model.cs new file mode 100644 index 000000000..4a1e5fa08 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Models/Model.cs @@ -0,0 +1,7 @@ +namespace Basic_Del04_TestImposibleStuff.Models +{ + public class Model + { + public string Greeting { get; set; } = "Grtn_HelloWorld"; + } +} diff --git a/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Program.cs b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Program.cs new file mode 100644 index 000000000..cef6570fc --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Program.cs @@ -0,0 +1,33 @@ +using Basic_Del04_TestImposibleStuff.Views; +using System; +using System.Windows.Input; + +namespace Basic_Del04_TestImposibleStuff +{ + public static class Program + { + private static ICommand? _view; + + public static Action Run { get; set; } = DoRun; + public static Func Init { get; set; } = DoInit; + + public static void Main(params string[] args) { + if (Init(args)) + Run(args); + } + + public static void DoRun(string[] args) + { + _view?.Execute(args); + } + + public static bool DoInit(string[] args) + { + // Init View + SetView( new MainView()); + return _view.CanExecute(args); + } + + public static void SetView(ICommand view)=>_view = view; + } +} diff --git a/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Properties/Resources.Designer.cs b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Properties/Resources.Designer.cs new file mode 100644 index 000000000..26fd7c50b --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Properties/Resources.Designer.cs @@ -0,0 +1,72 @@ +//------------------------------------------------------------------------------ +// +// 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 Basic_Del04_TestImposibleStuff.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()] + public 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)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Basic_Del04_TestImposibleStuff.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)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Hello World ! ähnelt. + /// + public static string Grtn_HelloWorld { + get { + return ResourceManager.GetString("Grtn_HelloWorld", resourceCulture); + } + } + } +} diff --git a/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Properties/Resources.resx b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Properties/Resources.resx new file mode 100644 index 000000000..86752ab07 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Properties/Resources.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + Hello World ! + + diff --git a/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Properties/Settings.Designer.cs b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Properties/Settings.Designer.cs new file mode 100644 index 000000000..8faccf4bd --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/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 Basic_Del04_TestImposibleStuff.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.6.0.0")] + public 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/Basics/Basic_Del04_TestImposibleStuff/Properties/Settings.settings b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Properties/Settings.settings new file mode 100644 index 000000000..15034e76c --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Properties/Settings.settings @@ -0,0 +1,6 @@ + + + + + + diff --git a/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/ValueConverters/.info b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/ValueConverters/.info new file mode 100644 index 000000000..c8796c435 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/ValueConverters/.info @@ -0,0 +1 @@ +Folder for ValueConverters diff --git a/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/ViewModels/.info b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/ViewModels/.info new file mode 100644 index 000000000..daadbdd79 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/ViewModels/.info @@ -0,0 +1 @@ +Folder for ViewModels diff --git a/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/ViewModels/MainViewModel.cs b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/ViewModels/MainViewModel.cs new file mode 100644 index 000000000..8726ecee5 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/ViewModels/MainViewModel.cs @@ -0,0 +1,12 @@ +using Basic_Del04_TestImposibleStuff.Models; +using Basic_Del04_TestImposibleStuff.Properties; + +namespace Basic_Del04_TestImposibleStuff.ViewModels +{ + public class MainViewModel + { + Model model = new Model(); + + public string Greeting => Resources.ResourceManager.GetString(model.Greeting); + } +} diff --git a/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Views/.info b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Views/.info new file mode 100644 index 000000000..55b86614b --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Views/.info @@ -0,0 +1 @@ +Folder for Views diff --git a/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Views/MainView.cs b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Views/MainView.cs new file mode 100644 index 000000000..971d306c2 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuff/Views/MainView.cs @@ -0,0 +1,25 @@ +using System; +using System.Windows.Input; +using ConsoleDisplay.View; +using Basic_Del04_TestImposibleStuff.ViewModels; + +namespace Basic_Del04_TestImposibleStuff.Views +{ + public class MainView : ICommand + { + public MainViewModel DataContext { get; set; } = new(); + public IConsole console { get; set; } = new MyConsole(); + + public event EventHandler? CanExecuteChanged; + + public bool CanExecute(object? parameter) + { + return true; + } + + public void Execute(object? parameter) + { + console.WriteLine(DataContext.Greeting); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/Basic_Del04_TestImposibleStuffTests.csproj b/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/Basic_Del04_TestImposibleStuffTests.csproj new file mode 100644 index 000000000..ba1ea97d6 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/Basic_Del04_TestImposibleStuffTests.csproj @@ -0,0 +1,29 @@ + + + + net462;net472;net48;net481 + true + false + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + diff --git a/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/Basic_Del04_TestImposibleStuff_netTests.csproj b/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/Basic_Del04_TestImposibleStuff_netTests.csproj new file mode 100644 index 000000000..6d3e128ed --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/Basic_Del04_TestImposibleStuff_netTests.csproj @@ -0,0 +1,29 @@ + + + + net6.0;net7.0 + true + false + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + diff --git a/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/Models/.info b/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/Models/.info new file mode 100644 index 000000000..df9bd99a4 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/Models/.info @@ -0,0 +1 @@ +Folder for Model-Tests diff --git a/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/ProgramTests.cs b/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/ProgramTests.cs new file mode 100644 index 000000000..204fd5414 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/ProgramTests.cs @@ -0,0 +1,79 @@ +using BaseLib.Model.Tests; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Basic_Del04_TestImposibleStuff; +using System; +using System.Windows.Input; + +namespace Basic_Del04_TestImposibleStuffTests +{ + [TestClass] + public class ProgramTests :BaseTest,ICommand + { + private Action? _OldRun; + private Func? _oldInit; + private bool xInitResult = false; + + public event EventHandler? CanExecuteChanged; + [TestInitialize] + public void Init() { + _OldRun=Program.Run; + _oldInit=Program.Init; + try { _oldInit(Array.Empty()); } catch { } + Program.Init = MyInit; + Program.Run = MyRun; + } + public bool CanExecute(object? parameter) => MyInit(parameter as string[]); + public void Execute(object? parameter)=> MyRun(parameter as string[]); + + private void MyRun(string[] obj) + { + DoLog($"MyRun({string.Join(", ", obj)})"); + } + + private bool MyInit(string[] arg) + { + DoLog($"MyInit({string.Join(", ", arg)})={xInitResult}"); + return xInitResult; + } + + [TestCleanup] + public void CleanUp() + { + Program.Init = _oldInit; + Program.Run = _OldRun; + } + + [DataTestMethod] + [DataRow(new[] { "" }, false, new[] { @"MyInit()=False +" })] + [DataRow(new[] { "" }, true, new[] { @"MyInit()=True +MyRun() +" })] + [DataRow(new[] { "Hello","World" }, false, new[] { @"MyInit(Hello, World)=False +" })] + [DataRow(new[] { "Stormy", "weather", "!" }, true, new[] { @"MyInit(Stormy, weather, !)=True +MyRun(Stormy, weather, !) +" })] + public void MainTest(string[] args,bool xVal, string[] asExp) { + xInitResult = xVal; + Program.Main(args); + Assert.AreEqual(asExp[0],DebugLog); + } + + [DataTestMethod] + [DataRow(new[] { "" },true, new[] { @"MyRun() +" })] + [DataRow(new[] { "" }, false, new[] { @"" })] + [DataRow(new[] { "Hello","World" }, true, new[] { @"MyRun(Hello, World) +" })] + [DataRow(new[] { "Stormy","weather","!" }, false, new[] { @"" })] + public void RunTest(string[] args, bool xSet, string[] asExp) + { + Program.SetView(xSet?this:null!); + _OldRun(args); + Assert.AreEqual(asExp[0], DebugLog); + } + + + } +} diff --git a/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/Properties/SettingsTests.cs b/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/Properties/SettingsTests.cs new file mode 100644 index 000000000..de381ca44 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/Properties/SettingsTests.cs @@ -0,0 +1,71 @@ +// *********************************************************************** +// Assembly : Basic_Del04_TestImposibleStuff_netTests +// Author : Mir +// Created : 05-14-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-14-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Configuration; + +/// +/// The Tests namespace. +/// +/// +namespace Basic_Del04_TestImposibleStuff.Properties.Tests +{ + /// + /// Defines test class SettingsTests. + /// + /// + [TestClass()] + public class SettingsTests + { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + /// + /// The test item + /// + /// + Settings testItem; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + + /// + /// Initializes this instance. + /// + /// + [TestInitialize] + public void Init() + { + testItem = new(); + } + + /// + /// Defines the test method SetupTest. + /// + /// + [TestMethod()] + public void SetupTest() + { + Assert.IsNotNull(testItem); + Assert.IsInstanceOfType(testItem, typeof(Settings)); + Assert.IsInstanceOfType(testItem, typeof(ApplicationSettingsBase)); + } + /// + /// Defines the test method DefaultInstanceTest. + /// + /// + [TestMethod()] + public void DefaultInstanceTest() + { + Assert.IsNotNull(Settings.Default); + Assert.IsInstanceOfType(Settings.Default, typeof(Settings)); + Assert.IsInstanceOfType(Settings.Default, typeof(ApplicationSettingsBase)); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/ValueConverters/.info b/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/ValueConverters/.info new file mode 100644 index 000000000..41afb41fc --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/ValueConverters/.info @@ -0,0 +1 @@ +Folder for ValueConverters-Tests diff --git a/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/ViewModels/MainViewModelTests.cs b/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/ViewModels/MainViewModelTests.cs new file mode 100644 index 000000000..87ab2e05b --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/ViewModels/MainViewModelTests.cs @@ -0,0 +1,60 @@ +// *********************************************************************** +// Assembly : Basic_Del04_TestImposibleStuff_netTests +// Author : Mir +// Created : 05-14-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-19-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using Microsoft.VisualStudio.TestTools.UnitTesting; + +/// +/// The Tests namespace. +/// +/// +namespace Basic_Del04_TestImposibleStuff.ViewModels.Tests +{ + /// + /// Defines test class MainWindowViewModelTests. + /// + /// + [TestClass()] + public class MainViewModelTests //: BaseTestViewModel + { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + /// + /// The test model + /// + /// + MainViewModel testModel; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + + /// + /// Initializes this instance. + /// + /// + [TestInitialize] + public void Init() + { + testModel = new(); + } + + /// + /// Defines the test method SetupTest. + /// + /// + [TestMethod()] + public void SetupTest() + { + Assert.IsNotNull(testModel); + Assert.IsInstanceOfType(testModel, typeof(MainViewModel)); +// Assert.IsInstanceOfType(testModel, typeof(BaseViewModel)); +// Assert.IsInstanceOfType(testModel, typeof(INotifyPropertyChanged)); + } + } +} diff --git a/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/Views/MainViewTests.cs b/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/Views/MainViewTests.cs new file mode 100644 index 000000000..121c18825 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/Views/MainViewTests.cs @@ -0,0 +1,89 @@ +// *********************************************************************** +// Assembly : Basic_Del04_TestImposibleStuff_netTests +// Author : Mir +// Created : 05-14-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-14-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Threading; +using BaseLib.Model.Tests; + +/// +/// The Tests namespace. +/// +/// +namespace Basic_Del04_TestImposibleStuff.Views.Tests +{ + /// + /// Defines test class MainWindowTests. + /// + /// + [TestClass()] + public class MainViewTests : BaseTest + { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + /// + /// The test view + /// + /// + MainView testView; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + + /// + /// Initializes this instance. + /// + /// + [TestInitialize] + public void Init() + { + var t = new Thread(() => testView = new()); + t.SetApartmentState(ApartmentState.STA); //Set the thread to STA + t.Start(); + t.Join(); //Wait for the thread to end + testView.console = new TestConsole(DoLog); + ClearLog(); + } + + /// + /// Defines the test method MainWindowTest. + /// + /// + [TestMethod()] + public void MainWindowTest() + { + Assert.IsNotNull(testView); + Assert.IsInstanceOfType(testView, typeof(MainView)); + } + + /// + /// Defines the test method MainWindowTest. + /// + /// + [TestMethod()] + public void CanExecuteTest() + { + Assert.IsTrue(testView.CanExecute(null!)); + } + + /// + /// Defines the test method MainWindowTest. + /// + /// + [TestMethod()] + public void ExecuteTest() + { + testView.Execute(null!); + Assert.AreEqual(@"WriteLine(Hello World !) +", DebugLog); + } + + } +} diff --git a/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/Views/TestConsole.cs b/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/Views/TestConsole.cs new file mode 100644 index 000000000..88e608438 --- /dev/null +++ b/CSharpBible/Basics/Basic_Del04_TestImposibleStuffTests/Views/TestConsole.cs @@ -0,0 +1,84 @@ +// *********************************************************************** +// Assembly : Basic_Del04_TestImposibleStuff_netTests +// Author : Mir +// Created : 05-14-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-14-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using ConsoleDisplay.View; +using System; + +namespace Basic_Del04_TestImposibleStuff.Views.Tests +{ + public class TestConsole : IConsole + { + private Action _dolog; + + public ConsoleColor ForegroundColor { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public ConsoleColor BackgroundColor { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + + public bool IsOutputRedirected => throw new NotImplementedException(); + + public bool KeyAvailable => throw new NotImplementedException(); + + public int LargestWindowHeight => throw new NotImplementedException(); + + public string Title { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public int WindowHeight { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public int WindowWidth { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + + public TestConsole(Action doLog) { + _dolog = doLog; + } + public void Beep(int freq, int len) + { + throw new NotImplementedException(); + } + + public void Clear() + { + throw new NotImplementedException(); + } + + public (int Left, int Top) GetCursorPosition() + { + throw new NotImplementedException(); + } + + public ConsoleKeyInfo? ReadKey() + { + throw new NotImplementedException(); + } + + public string ReadLine() + { + throw new NotImplementedException(); + } + + public void SetCursorPosition(int left, int top) + { + throw new NotImplementedException(); + } + + public void Write(char ch) + { + throw new NotImplementedException(); + } + + public void Write(string? st) + { + throw new NotImplementedException(); + } + + public void WriteLine(string? st = "") + { + _dolog($"WriteLine({st})"); + } + } +} diff --git a/CSharpBible/Basics/C#-Basics.props b/CSharpBible/Basics/C#-Basics.props new file mode 100644 index 000000000..5dd64e3cf --- /dev/null +++ b/CSharpBible/Basics/C#-Basics.props @@ -0,0 +1,15 @@ + + + ..\.. + ..\..\..\bin\$(MSBuildProjectName)\ + ..\..\..\obj\$(MSBuildProjectName)\ + $(MSBuildProjectName.Replace(".","_").Replace("_net","")) + 9.0 + enable + NULLABLE + disable + JC-Soft + Joe Care + Copyright © JC-Soft 2023 + + \ No newline at end of file diff --git a/CSharpBible/Basics/C#-Basics.sln b/CSharpBible/Basics/C#-Basics.sln new file mode 100644 index 000000000..af5c76081 --- /dev/null +++ b/CSharpBible/Basics/C#-Basics.sln @@ -0,0 +1,215 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Projektmappenelemente", "Projektmappenelemente", "{658BD492-33FF-4995-AAE7-4F6894E92F0C}" + ProjectSection(SolutionItems) = preProject + C#-Basics.props = C#-Basics.props + C#-Basics_net.props = C#-Basics_net.props + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{AF041458-CF94-4D6D-BB0F-8BC50F4F099C}" + ProjectSection(SolutionItems) = preProject + ..\Libraries\Libraries_net.props = ..\Libraries\Libraries_net.props + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_BaseLib", "..\Libraries\MVVM_BaseLib\MVVM_BaseLib.csproj", "{890CF504-3814-443B-9EE6-E8BCACF68203}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_BaseLibTests", "..\Libraries\MVVM_BaseLibTests\MVVM_BaseLibTests.csproj", "{66EB60F2-523D-47C8-95EA-C7E10759E239}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic_Del04_TestImposibleStuff", "Basic_Del04_TestImposibleStuff\Basic_Del04_TestImposibleStuff.csproj", "{788A3DED-B51D-4A3A-9D23-45D8826FFA52}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic_Del04_TestImposibleStuff_net", "Basic_Del04_TestImposibleStuff\Basic_Del04_TestImposibleStuff_net.csproj", "{B7FB79D9-A769-459E-BC5C-E2E6DB051E8E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic_Del04_TestImposibleStuff_netTests", "Basic_Del04_TestImposibleStuffTests\Basic_Del04_TestImposibleStuff_netTests.csproj", "{B3F511AE-D754-43ED-9B72-CF7CD2D47DB2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic_Del04_TestImposibleStuffTests", "Basic_Del04_TestImposibleStuffTests\Basic_Del04_TestImposibleStuffTests.csproj", "{85ADAC36-7623-4E71-BBB1-8419DFFE2551}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic_Del00_Template", "Basic_Del00_Template\Basic_Del00_Template.csproj", "{85ADAC36-7623-4E71-BBB1-8419DFFE2552}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic_Del00_Template_net", "Basic_Del00_Template\Basic_Del00_Template_net.csproj", "{85ADAC36-7623-4E71-BBB1-8419DFFE2553}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic_Del00_Template_netTests", "Basic_Del00_TemplateTests\Basic_Del00_Template_netTests.csproj", "{85ADAC36-7623-4E71-BBB1-8419DFFE2554}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic_Del00_TemplateTests", "Basic_Del00_TemplateTests\Basic_Del00_TemplateTests.csproj", "{85ADAC36-7623-4E71-BBB1-8419DFFE2555}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic_Del01_Action", "Basic_Del01_Action\Basic_Del01_Action.csproj", "{18AB0E73-C943-4C44-9B22-31389058D254}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic_Del01_Action_net", "Basic_Del01_Action\Basic_Del01_Action_net.csproj", "{FD38A2BA-4EA1-46C5-BFC7-667D62FFFA84}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic_Del01_Action_netTests", "Basic_Del01_ActionTests\Basic_Del01_Action_netTests.csproj", "{3199E66C-F4AC-474A-968B-EDDBB8441F86}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic_Del01_ActionTests", "Basic_Del01_ActionTests\Basic_Del01_ActionTests.csproj", "{9CD6498C-C699-4573-832F-A6492E7A3A60}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic_Del02_Filter", "Basic_Del02_Filter\Basic_Del02_Filter.csproj", "{32A2034E-AEC5-43D6-AD36-E56E8196C256}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic_Del02_Filter_net", "Basic_Del02_Filter\Basic_Del02_Filter_net.csproj", "{5A2EEC0D-1B33-4E32-A4C8-68895306C321}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic_Del02_Filter_netTests", "Basic_Del02_FilterTests\Basic_Del02_Filter_netTests.csproj", "{1EBF97D5-62D7-46FC-8822-63FAD5B62C15}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic_Del02_FilterTests", "Basic_Del02_FilterTests\Basic_Del02_FilterTests.csproj", "{7B5B9AEE-608D-42CC-8B62-FF24D087D278}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic_Del03_General", "Basic_Del03_General\Basic_Del03_General.csproj", "{1DA4D9E4-DBF0-4779-AE44-851EA51BC8D8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic_Del03_General_net", "Basic_Del03_General\Basic_Del03_General_net.csproj", "{10717068-AA81-4609-AF68-3C037B6A7840}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic_Del03_General_netTests", "Basic_Del03_GeneralTests\Basic_Del03_General_netTests.csproj", "{150D64E0-243D-40FC-912B-26F5BA571FC9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic_Del03_GeneralTests", "Basic_Del03_GeneralTests\Basic_Del03_GeneralTests.csproj", "{5576EB1C-2543-4611-9CE4-B310D18FE483}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleDisplay", "..\ConsoleDisplay\ConsoleDisplay.csproj", "{F05AC652-A68B-4D7F-B49B-8AFCC8E4E080}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleDisplay_net", "..\ConsoleDisplay\ConsoleDisplay_net.csproj", "{1D4B0450-753F-49A2-8C29-3CEABFC5632A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleDisplay_win", "..\ConsoleDisplay\ConsoleDisplay_win.csproj", "{9011949B-B63D-4FC1-9F9A-60E2631F986F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaseLib", "..\Libraries\BaseLib\BaseLib.csproj", "{BA8BB271-F116-44F5-86AB-2EEF3864F186}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaseLibTests", "..\Libraries\BaseLibTests\BaseLibTests.csproj", "{62CDA133-2F14-4050-A58D-72B84F61D335}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaseLib_netTests", "..\Libraries\BaseLibTests\BaseLib_netTests.csproj", "{101BE09D-6A94-4596-82A4-919EFC9B295A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaseLib_net", "..\Libraries\BaseLib\BaseLib_net.csproj", "{83F21E2B-A865-44AB-AD2B-04F77E1B8E63}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {890CF504-3814-443B-9EE6-E8BCACF68203}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {890CF504-3814-443B-9EE6-E8BCACF68203}.Debug|Any CPU.Build.0 = Debug|Any CPU + {890CF504-3814-443B-9EE6-E8BCACF68203}.Release|Any CPU.ActiveCfg = Release|Any CPU + {890CF504-3814-443B-9EE6-E8BCACF68203}.Release|Any CPU.Build.0 = Release|Any CPU + {66EB60F2-523D-47C8-95EA-C7E10759E239}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {66EB60F2-523D-47C8-95EA-C7E10759E239}.Debug|Any CPU.Build.0 = Debug|Any CPU + {66EB60F2-523D-47C8-95EA-C7E10759E239}.Release|Any CPU.ActiveCfg = Release|Any CPU + {66EB60F2-523D-47C8-95EA-C7E10759E239}.Release|Any CPU.Build.0 = Release|Any CPU + {788A3DED-B51D-4A3A-9D23-45D8826FFA52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {788A3DED-B51D-4A3A-9D23-45D8826FFA52}.Debug|Any CPU.Build.0 = Debug|Any CPU + {788A3DED-B51D-4A3A-9D23-45D8826FFA52}.Release|Any CPU.ActiveCfg = Release|Any CPU + {788A3DED-B51D-4A3A-9D23-45D8826FFA52}.Release|Any CPU.Build.0 = Release|Any CPU + {B7FB79D9-A769-459E-BC5C-E2E6DB051E8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B7FB79D9-A769-459E-BC5C-E2E6DB051E8E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B7FB79D9-A769-459E-BC5C-E2E6DB051E8E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B7FB79D9-A769-459E-BC5C-E2E6DB051E8E}.Release|Any CPU.Build.0 = Release|Any CPU + {B3F511AE-D754-43ED-9B72-CF7CD2D47DB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B3F511AE-D754-43ED-9B72-CF7CD2D47DB2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B3F511AE-D754-43ED-9B72-CF7CD2D47DB2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B3F511AE-D754-43ED-9B72-CF7CD2D47DB2}.Release|Any CPU.Build.0 = Release|Any CPU + {85ADAC36-7623-4E71-BBB1-8419DFFE2551}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85ADAC36-7623-4E71-BBB1-8419DFFE2551}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85ADAC36-7623-4E71-BBB1-8419DFFE2551}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85ADAC36-7623-4E71-BBB1-8419DFFE2551}.Release|Any CPU.Build.0 = Release|Any CPU + {85ADAC36-7623-4E71-BBB1-8419DFFE2552}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85ADAC36-7623-4E71-BBB1-8419DFFE2552}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85ADAC36-7623-4E71-BBB1-8419DFFE2552}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85ADAC36-7623-4E71-BBB1-8419DFFE2552}.Release|Any CPU.Build.0 = Release|Any CPU + {85ADAC36-7623-4E71-BBB1-8419DFFE2553}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85ADAC36-7623-4E71-BBB1-8419DFFE2553}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85ADAC36-7623-4E71-BBB1-8419DFFE2553}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85ADAC36-7623-4E71-BBB1-8419DFFE2553}.Release|Any CPU.Build.0 = Release|Any CPU + {85ADAC36-7623-4E71-BBB1-8419DFFE2554}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85ADAC36-7623-4E71-BBB1-8419DFFE2554}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85ADAC36-7623-4E71-BBB1-8419DFFE2554}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85ADAC36-7623-4E71-BBB1-8419DFFE2554}.Release|Any CPU.Build.0 = Release|Any CPU + {85ADAC36-7623-4E71-BBB1-8419DFFE2555}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85ADAC36-7623-4E71-BBB1-8419DFFE2555}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85ADAC36-7623-4E71-BBB1-8419DFFE2555}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85ADAC36-7623-4E71-BBB1-8419DFFE2555}.Release|Any CPU.Build.0 = Release|Any CPU + {18AB0E73-C943-4C44-9B22-31389058D254}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {18AB0E73-C943-4C44-9B22-31389058D254}.Debug|Any CPU.Build.0 = Debug|Any CPU + {18AB0E73-C943-4C44-9B22-31389058D254}.Release|Any CPU.ActiveCfg = Release|Any CPU + {18AB0E73-C943-4C44-9B22-31389058D254}.Release|Any CPU.Build.0 = Release|Any CPU + {FD38A2BA-4EA1-46C5-BFC7-667D62FFFA84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FD38A2BA-4EA1-46C5-BFC7-667D62FFFA84}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FD38A2BA-4EA1-46C5-BFC7-667D62FFFA84}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FD38A2BA-4EA1-46C5-BFC7-667D62FFFA84}.Release|Any CPU.Build.0 = Release|Any CPU + {3199E66C-F4AC-474A-968B-EDDBB8441F86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3199E66C-F4AC-474A-968B-EDDBB8441F86}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3199E66C-F4AC-474A-968B-EDDBB8441F86}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3199E66C-F4AC-474A-968B-EDDBB8441F86}.Release|Any CPU.Build.0 = Release|Any CPU + {9CD6498C-C699-4573-832F-A6492E7A3A60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9CD6498C-C699-4573-832F-A6492E7A3A60}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9CD6498C-C699-4573-832F-A6492E7A3A60}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9CD6498C-C699-4573-832F-A6492E7A3A60}.Release|Any CPU.Build.0 = Release|Any CPU + {32A2034E-AEC5-43D6-AD36-E56E8196C256}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {32A2034E-AEC5-43D6-AD36-E56E8196C256}.Debug|Any CPU.Build.0 = Debug|Any CPU + {32A2034E-AEC5-43D6-AD36-E56E8196C256}.Release|Any CPU.ActiveCfg = Release|Any CPU + {32A2034E-AEC5-43D6-AD36-E56E8196C256}.Release|Any CPU.Build.0 = Release|Any CPU + {5A2EEC0D-1B33-4E32-A4C8-68895306C321}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5A2EEC0D-1B33-4E32-A4C8-68895306C321}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5A2EEC0D-1B33-4E32-A4C8-68895306C321}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5A2EEC0D-1B33-4E32-A4C8-68895306C321}.Release|Any CPU.Build.0 = Release|Any CPU + {1EBF97D5-62D7-46FC-8822-63FAD5B62C15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1EBF97D5-62D7-46FC-8822-63FAD5B62C15}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1EBF97D5-62D7-46FC-8822-63FAD5B62C15}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1EBF97D5-62D7-46FC-8822-63FAD5B62C15}.Release|Any CPU.Build.0 = Release|Any CPU + {7B5B9AEE-608D-42CC-8B62-FF24D087D278}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7B5B9AEE-608D-42CC-8B62-FF24D087D278}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7B5B9AEE-608D-42CC-8B62-FF24D087D278}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7B5B9AEE-608D-42CC-8B62-FF24D087D278}.Release|Any CPU.Build.0 = Release|Any CPU + {1DA4D9E4-DBF0-4779-AE44-851EA51BC8D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1DA4D9E4-DBF0-4779-AE44-851EA51BC8D8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1DA4D9E4-DBF0-4779-AE44-851EA51BC8D8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1DA4D9E4-DBF0-4779-AE44-851EA51BC8D8}.Release|Any CPU.Build.0 = Release|Any CPU + {10717068-AA81-4609-AF68-3C037B6A7840}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {10717068-AA81-4609-AF68-3C037B6A7840}.Debug|Any CPU.Build.0 = Debug|Any CPU + {10717068-AA81-4609-AF68-3C037B6A7840}.Release|Any CPU.ActiveCfg = Release|Any CPU + {10717068-AA81-4609-AF68-3C037B6A7840}.Release|Any CPU.Build.0 = Release|Any CPU + {150D64E0-243D-40FC-912B-26F5BA571FC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {150D64E0-243D-40FC-912B-26F5BA571FC9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {150D64E0-243D-40FC-912B-26F5BA571FC9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {150D64E0-243D-40FC-912B-26F5BA571FC9}.Release|Any CPU.Build.0 = Release|Any CPU + {5576EB1C-2543-4611-9CE4-B310D18FE483}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5576EB1C-2543-4611-9CE4-B310D18FE483}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5576EB1C-2543-4611-9CE4-B310D18FE483}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5576EB1C-2543-4611-9CE4-B310D18FE483}.Release|Any CPU.Build.0 = Release|Any CPU + {F05AC652-A68B-4D7F-B49B-8AFCC8E4E080}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F05AC652-A68B-4D7F-B49B-8AFCC8E4E080}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F05AC652-A68B-4D7F-B49B-8AFCC8E4E080}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F05AC652-A68B-4D7F-B49B-8AFCC8E4E080}.Release|Any CPU.Build.0 = Release|Any CPU + {1D4B0450-753F-49A2-8C29-3CEABFC5632A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1D4B0450-753F-49A2-8C29-3CEABFC5632A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1D4B0450-753F-49A2-8C29-3CEABFC5632A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1D4B0450-753F-49A2-8C29-3CEABFC5632A}.Release|Any CPU.Build.0 = Release|Any CPU + {9011949B-B63D-4FC1-9F9A-60E2631F986F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9011949B-B63D-4FC1-9F9A-60E2631F986F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9011949B-B63D-4FC1-9F9A-60E2631F986F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9011949B-B63D-4FC1-9F9A-60E2631F986F}.Release|Any CPU.Build.0 = Release|Any CPU + {BA8BB271-F116-44F5-86AB-2EEF3864F186}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BA8BB271-F116-44F5-86AB-2EEF3864F186}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BA8BB271-F116-44F5-86AB-2EEF3864F186}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BA8BB271-F116-44F5-86AB-2EEF3864F186}.Release|Any CPU.Build.0 = Release|Any CPU + {62CDA133-2F14-4050-A58D-72B84F61D335}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {62CDA133-2F14-4050-A58D-72B84F61D335}.Debug|Any CPU.Build.0 = Debug|Any CPU + {62CDA133-2F14-4050-A58D-72B84F61D335}.Release|Any CPU.ActiveCfg = Release|Any CPU + {62CDA133-2F14-4050-A58D-72B84F61D335}.Release|Any CPU.Build.0 = Release|Any CPU + {101BE09D-6A94-4596-82A4-919EFC9B295A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {101BE09D-6A94-4596-82A4-919EFC9B295A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {101BE09D-6A94-4596-82A4-919EFC9B295A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {101BE09D-6A94-4596-82A4-919EFC9B295A}.Release|Any CPU.Build.0 = Release|Any CPU + {83F21E2B-A865-44AB-AD2B-04F77E1B8E63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {83F21E2B-A865-44AB-AD2B-04F77E1B8E63}.Debug|Any CPU.Build.0 = Debug|Any CPU + {83F21E2B-A865-44AB-AD2B-04F77E1B8E63}.Release|Any CPU.ActiveCfg = Release|Any CPU + {83F21E2B-A865-44AB-AD2B-04F77E1B8E63}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {890CF504-3814-443B-9EE6-E8BCACF68203} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {66EB60F2-523D-47C8-95EA-C7E10759E239} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {F05AC652-A68B-4D7F-B49B-8AFCC8E4E080} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {1D4B0450-753F-49A2-8C29-3CEABFC5632A} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {9011949B-B63D-4FC1-9F9A-60E2631F986F} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {BA8BB271-F116-44F5-86AB-2EEF3864F186} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {62CDA133-2F14-4050-A58D-72B84F61D335} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {101BE09D-6A94-4596-82A4-919EFC9B295A} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {83F21E2B-A865-44AB-AD2B-04F77E1B8E63} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {3521070E-C2F7-4845-8411-68EBE201D550} + EndGlobalSection +EndGlobal diff --git a/CSharpBible/Basics/C#-Basics_net.props b/CSharpBible/Basics/C#-Basics_net.props new file mode 100644 index 000000000..6009e939e --- /dev/null +++ b/CSharpBible/Basics/C#-Basics_net.props @@ -0,0 +1,14 @@ + + + ..\.. + ..\..\..\bin\$(MSBuildProjectName)\ + ..\..\..\obj.net\$(MSBuildProjectName)\ + $(MSBuildProjectName.Replace(".","_").Replace("_net","")) + 9.0 + enable + disable + JC-Soft + Joe Care + Copyright © JC-Soft 2023 + + \ No newline at end of file diff --git a/CSharpBible/Basics/ReadMe.md b/CSharpBible/Basics/ReadMe.md new file mode 100644 index 000000000..52180ac38 --- /dev/null +++ b/CSharpBible/Basics/ReadMe.md @@ -0,0 +1,6 @@ +# Basic C# consepts +Exploring and testing some basic C#-Features +See the [Wiki](https://github.com/joecare99/CSharp/wiki/Basics) +heavily inspired by [42 Entwickler] + +## \ No newline at end of file diff --git a/CSharpBible/BindingGroupExp/App.config b/CSharpBible/BindingGroupExp/App.config deleted file mode 100644 index 5ffd8f8ee..000000000 --- a/CSharpBible/BindingGroupExp/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/CSharpBible/BindingGroupExp/App.xaml b/CSharpBible/BindingGroupExp/App.xaml deleted file mode 100644 index ede872c7c..000000000 --- a/CSharpBible/BindingGroupExp/App.xaml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - \ No newline at end of file diff --git a/CSharpBible/BindingGroupExp/App.xaml.cs b/CSharpBible/BindingGroupExp/App.xaml.cs deleted file mode 100644 index 35e2c1777..000000000 --- a/CSharpBible/BindingGroupExp/App.xaml.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Threading.Tasks; -using System.Windows; - -namespace BindingGroupExp -{ - /// - /// Interaktionslogik für "App.xaml" - /// - public partial class App : Application - { - } -} diff --git a/CSharpBible/BindingGroupExp/BindingGroupExp.csproj b/CSharpBible/BindingGroupExp/BindingGroupExp.csproj deleted file mode 100644 index 3fe35133d..000000000 --- a/CSharpBible/BindingGroupExp/BindingGroupExp.csproj +++ /dev/null @@ -1,115 +0,0 @@ - - - - Debug - AnyCPU - {AFCEC61D-9C18-49E5-94AE-17429BB06C78} - WinExe - BindingGroupExp - BindingGroupExp - ..\..\bin\$(MSBuildProjectName)\ - ..\..\obj\$(MSBuildProjectName)\ - ..\..\obj\$(MSBuildProjectName)\ - v4.8 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - true - true - 8.0 - enable - - - - - AnyCPU - true - full - false - ..\..\bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - ..\..\bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - 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 - - - - \ No newline at end of file diff --git a/CSharpBible/BindingGroupExp/Properties/AssemblyInfo.cs b/CSharpBible/BindingGroupExp/Properties/AssemblyInfo.cs deleted file mode 100644 index 49fc0aede..000000000 --- a/CSharpBible/BindingGroupExp/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,55 +0,0 @@ -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("BindingGroupExp")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("JC-Soft")] -[assembly: AssemblyProduct("BindingGroupExp")] -[assembly: AssemblyCopyright("Copyright © JC-Soft 2020")] -[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/BindingGroupExp/Properties/Resources.Designer.cs b/CSharpBible/BindingGroupExp/Properties/Resources.Designer.cs deleted file mode 100644 index 18b0675ac..000000000 --- a/CSharpBible/BindingGroupExp/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 BindingGroupExp.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("BindingGroupExp.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/BindingGroupExp/Properties/Resources.resx b/CSharpBible/BindingGroupExp/Properties/Resources.resx deleted file mode 100644 index ffecec851..000000000 --- a/CSharpBible/BindingGroupExp/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/CSharpBible/BindingGroupExp/Properties/Settings.Designer.cs b/CSharpBible/BindingGroupExp/Properties/Settings.Designer.cs deleted file mode 100644 index fa871ccb1..000000000 --- a/CSharpBible/BindingGroupExp/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 BindingGroupExp.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.2.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/BindingGroupExp/Properties/Settings.settings b/CSharpBible/BindingGroupExp/Properties/Settings.settings deleted file mode 100644 index 8f2fd95d6..000000000 --- a/CSharpBible/BindingGroupExp/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/CSharpBible/BindingGroupExp/View/MainWindow.xaml b/CSharpBible/BindingGroupExp/View/MainWindow.xaml deleted file mode 100644 index edbf80c4c..000000000 --- a/CSharpBible/BindingGroupExp/View/MainWindow.xaml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/CSharpBible/BindingGroupExp/View/MainWindow.xaml.cs b/CSharpBible/BindingGroupExp/View/MainWindow.xaml.cs deleted file mode 100644 index ae6978fad..000000000 --- a/CSharpBible/BindingGroupExp/View/MainWindow.xaml.cs +++ /dev/null @@ -1,54 +0,0 @@ -using BindingGroupExp.ViewModel; -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 BindingGroupExp.View -{ - /// - /// Interaktionslogik für MainWindow.xaml - /// - public partial class MainWindow : Window - { - public MainWindow() - { - InitializeComponent(); - } - private void Window_Loaded(object sender, RoutedEventArgs e) - { - if (DataContext is MainWindowViewModel vm) - { - vm.DataGroup = stackPanel1.BindingGroup; - vm.OnShowMessage = ShowMessage; - } - } - - private bool ShowMessage(string arg) - { - return MessageBox.Show(arg) == MessageBoxResult.OK; - } - - // This event occurs when a ValidationRule in the BindingGroup - // or in a Binding fails. - private void ItemError(object sender, ValidationErrorEventArgs e) => (DataContext as MainWindowViewModel)?.ItemError(sender, e); - - void stackPanel1_Loaded(object sender, RoutedEventArgs e) - { - // Begin an edit transaction that enables - // the object to accept or roll back changes. - stackPanel1.BindingGroup.BeginEdit(); - } - - } -} diff --git a/CSharpBible/BindingGroupExp/View/Validation/FutureDateRule.cs b/CSharpBible/BindingGroupExp/View/Validation/FutureDateRule.cs deleted file mode 100644 index 2bb45d403..000000000 --- a/CSharpBible/BindingGroupExp/View/Validation/FutureDateRule.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Controls; -using System.Windows.Data; - -namespace BindingGroupExp.View.Validation -{ - public class FutureDateRule : ValidationRule - { - - public override ValidationResult Validate(object value, CultureInfo cultureInfo) - { - if (value is string s && DateTime.TryParse(s, cultureInfo,DateTimeStyles.None , out var d)) - return new ValidationResult(DateTime.Compare(DateTime.Now, d)<0, $"Date has to be in the future"); - return new ValidationResult(false, "Argument has wrong type"); - } - - } -} diff --git a/CSharpBible/BindingGroupExp/View/Validation/PriceIsAPositiveNumber.cs b/CSharpBible/BindingGroupExp/View/Validation/PriceIsAPositiveNumber.cs deleted file mode 100644 index e6d5253b6..000000000 --- a/CSharpBible/BindingGroupExp/View/Validation/PriceIsAPositiveNumber.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Globalization; -using System.Windows.Controls; - -namespace BindingGroupExp.View.Validation -{ - public class PriceIsAPositiveNumber : ValidationRule - { - public override ValidationResult Validate(object value, CultureInfo cultureInfo) - { - if (value is string s && decimal.TryParse(s,NumberStyles.Float,cultureInfo,out decimal d)) - return new ValidationResult(d > 0, $"Value has to be positive or zero"); - return new ValidationResult(false,"Argument has wrong type"); - } - } -} diff --git a/CSharpBible/BindingGroupExp/View/Validation/ValidateDateAndPrice.cs b/CSharpBible/BindingGroupExp/View/Validation/ValidateDateAndPrice.cs deleted file mode 100644 index 26a41fbf9..000000000 --- a/CSharpBible/BindingGroupExp/View/Validation/ValidateDateAndPrice.cs +++ /dev/null @@ -1,45 +0,0 @@ -using BindingGroupExp.ViewModel; -using System; -using System.Globalization; -using System.Windows.Controls; -using System.Windows.Data; - -namespace BindingGroupExp.View.Validation -{ - public class ValidateDateAndPrice : ValidationRule - { - public override ValidationResult Validate(object value, CultureInfo cultureInfo) - { - BindingGroup bg = value as BindingGroup; - - // Get the source object. - MainWindowViewModel item = bg.Items[0] as MainWindowViewModel; - - object doubleValue; - object dateTimeValue; - - // Get the proposed values for Price and OfferExpires. - bool priceResult = bg.TryGetValue(item, "Price", out doubleValue); - bool dateResult = bg.TryGetValue(item, "OfferExpires", out dateTimeValue); - - if (!priceResult || !dateResult) - { - return new ValidationResult(false, "Properties not found"); - } - - decimal price = (decimal)doubleValue; - DateTime offerExpires = (DateTime)dateTimeValue; - - // Check that an item over $100 is available for at least 7 days. - if (price > 100) - { - if (offerExpires < DateTime.Today + new TimeSpan(7, 0, 0, 0)) - { - return new ValidationResult(false, "Items over $100 must be available for at least 7 days."); - } - } - - return ValidationResult.ValidResult; - } - } -} diff --git a/CSharpBible/BindingGroupExp/ViewModel/MainWindowViewModel.cs b/CSharpBible/BindingGroupExp/ViewModel/MainWindowViewModel.cs deleted file mode 100644 index e7a9ae451..000000000 --- a/CSharpBible/BindingGroupExp/ViewModel/MainWindowViewModel.cs +++ /dev/null @@ -1,145 +0,0 @@ -// *********************************************************************** -// Assembly : BindingGroupExp -// Author : Mir -// Created : 10-23-2022 -// -// Last Modified By : Mir -// Last Modified On : 10-23-2022 -// *********************************************************************** -// -// Copyright © JC-Soft 2020 -// -// -// *********************************************************************** -using MVVM.ViewModel; -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; - -/// -/// The ViewModel namespace. -/// -/// -namespace BindingGroupExp.ViewModel -{ - /// - /// Class MainWindowViewModel. - /// Implements the - /// - /// - /// - public class MainWindowViewModel : BaseViewModel - { - #region Properties - /// - /// The description - /// - /// - private string _description="Bumlux"; - - /// - /// The price - /// - /// - private decimal _price=(decimal)0.00; - - /// - /// The date - /// - /// - private DateTime _date=DateTime.Now.AddDays(7); - - /// - /// Gets or sets the data binding. - /// - /// The data binding. - /// - public BindingGroup? DataGroup { get; set; } = default; - - /// - /// Gets or sets the description. - /// - /// The description. - /// - public string Description { get => _description; set => SetProperty(ref _description, value); } - - /// - /// Gets or sets the price. - /// - /// The price. - /// - public decimal Price { get => _price; set => SetProperty(ref _price, value); } - - /// - /// Gets or sets the offer expires. - /// - /// The offer expires. - /// - public DateTime OfferExpires { get => _date; set => SetProperty(ref _date, value); } - - /// - /// Gets or sets the submit command. - /// - /// The submit command. - /// - public DelegateCommand SubmitCommand { get; set; } - - /// - /// Gets or sets the cancel command. - /// - /// The cancel command. - /// - public DelegateCommand CancelCommand { get; set; } - public Func OnShowMessage { get; set; } = default; - #endregion - - /// - /// Initializes a new instance of the class. - /// - /// - public MainWindowViewModel() - { - SubmitCommand = new DelegateCommand(SubmitData, canSubmitData); - CancelCommand = new DelegateCommand(DoCancel, canCancel); - } - - private bool canCancel(object obj) - { - return true;// DataGroup?.IsDirty ?? false; - } - - private void DoCancel(object obj) - { - // Cancel the pending changes and begin a new edit transaction. - DataGroup?.CancelEdit(); - DataGroup?.BeginEdit(); - } - - private bool canSubmitData(object obj) - { - return true;// DataGroup?.IsDirty ?? false; - } - - private void SubmitData(object obj) - { - if (DataGroup?.CommitEdit() ?? false) - { - OnShowMessage?.Invoke("Data submitted ..."); - DataGroup?.BeginEdit(); - } - } - - public void ItemError(object sender, ValidationErrorEventArgs e) - { - if (e.Action == ValidationErrorEventAction.Added) - { - OnShowMessage?.Invoke(e.Error.ErrorContent.ToString()); - } - } - } -} diff --git a/CSharpBible/CSV_Viewer/DataSet/TFieldDef.cs b/CSharpBible/CSV_Viewer/DataSet/TFieldDef.cs index aab9ae7ea..39a07ba21 100644 --- a/CSharpBible/CSV_Viewer/DataSet/TFieldDef.cs +++ b/CSharpBible/CSV_Viewer/DataSet/TFieldDef.cs @@ -13,9 +13,6 @@ // *********************************************************************** using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace CSharpBible.CSV_Viewer.CustomDataSet { diff --git a/CSharpBible/CSV_ViewerTest/CSV_ViewerTest.csproj b/CSharpBible/CSV_ViewerTest/CSV_ViewerTest.csproj index 07ae6b068..69aa98c07 100644 --- a/CSharpBible/CSV_ViewerTest/CSV_ViewerTest.csproj +++ b/CSharpBible/CSV_ViewerTest/CSV_ViewerTest.csproj @@ -1,6 +1,8 @@  - + + + Debug AnyCPU @@ -23,6 +25,8 @@ + + @@ -43,14 +47,72 @@ 4 + + ..\packages\Microsoft.ApplicationInsights.2.22.0\lib\net46\Microsoft.ApplicationInsights.dll + + + + ..\packages\Microsoft.Testing.Extensions.Telemetry.1.0.0\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll + + + ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.0.0\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll + + + ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.0.0\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll + + + ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.0\lib\netstandard2.0\Microsoft.Testing.Platform.dll + + + ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.0\lib\netstandard2.0\Microsoft.Testing.Platform.MSBuild.dll + + + ..\packages\Microsoft.TestPlatform.ObjectModel.17.8.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll + + + ..\packages\Microsoft.TestPlatform.ObjectModel.17.8.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll + + + ..\packages\Microsoft.TestPlatform.ObjectModel.17.8.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + - ..\packages\MSTest.TestFramework.3.0.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + ..\packages\MSTest.TestFramework.3.2.0\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - ..\packages\MSTest.TestFramework.3.0.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + ..\packages\MSTest.TestFramework.3.2.0\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + + + ..\packages\NuGet.Frameworks.6.8.0\lib\net472\NuGet.Frameworks.dll + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + ..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll + + + + ..\packages\System.Diagnostics.DiagnosticSource.8.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll + + + ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Reflection.Metadata.8.0.0\lib\net462\System.Reflection.Metadata.dll + + + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + @@ -65,6 +127,7 @@ + @@ -73,8 +136,12 @@ Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}". - - + + + + + - + + \ No newline at end of file diff --git a/CSharpBible/CSV_ViewerTest/DataSet/TFieldDefTest.cs b/CSharpBible/CSV_ViewerTest/DataSet/TFieldDefTest.cs index f0522d695..1522ca700 100644 --- a/CSharpBible/CSV_ViewerTest/DataSet/TFieldDefTest.cs +++ b/CSharpBible/CSV_ViewerTest/DataSet/TFieldDefTest.cs @@ -13,7 +13,6 @@ // *********************************************************************** using System; using CSharpBible.CSV_Viewer.CustomDataSet; -using CSharpBible.CSV_Viewer.DataSet; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace CSharpBible.CSV_Viewer.DataSet.Tests diff --git a/CSharpBible/CSV_ViewerTest/UnitTest1.cs b/CSharpBible/CSV_ViewerTest/UnitTest1.cs index d72508b76..b8c671ed8 100644 --- a/CSharpBible/CSV_ViewerTest/UnitTest1.cs +++ b/CSharpBible/CSV_ViewerTest/UnitTest1.cs @@ -11,7 +11,6 @@ // // // *********************************************************************** -using System; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace CSV_ViewerTest diff --git a/CSharpBible/CSV_ViewerTest/app.config b/CSharpBible/CSV_ViewerTest/app.config new file mode 100644 index 000000000..84f4444d1 --- /dev/null +++ b/CSharpBible/CSV_ViewerTest/app.config @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CSharpBible/CSharpBible.sln b/CSharpBible/CSharpBible.sln index 05aee034d..0f4cb317f 100644 --- a/CSharpBible/CSharpBible.sln +++ b/CSharpBible/CSharpBible.sln @@ -14,10 +14,22 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Resources", "Resources", "{ EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MVVM_Tutorial", "MVVM_Tutorial", "{1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9}" + ProjectSection(SolutionItems) = preProject + MVVM_Tutorial\MVVM_Tutorial.props = MVVM_Tutorial\MVVM_Tutorial.props + MVVM_Tutorial\MVVM_Tutorial_net.props = MVVM_Tutorial\MVVM_Tutorial_net.props + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Bibliotheken", "Bibliotheken", "{7BA535EF-38FA-47A6-A6BD-5D6333D5DB10}" + ProjectSection(SolutionItems) = preProject + Libraries\Libraries.props = Libraries\Libraries.props + Libraries\Libraries_net.props = Libraries\Libraries_net.props + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Calc", "Calc", "{278CFF7F-D799-45EE-BADB-8C8380F05716}" + ProjectSection(SolutionItems) = preProject + Calc\Calc.props = Calc\Calc.props + Calc\Calc_net.props = Calc\Calc_net.props + EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AboutEx", "AboutEx\AboutEx.csproj", "{6D860275-CDFB-48FB-8D51-472EB96884DF}" EndProject @@ -29,9 +41,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpBibleTest", "CSharpBi EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddPage", "AddPage\AddPage.csproj", "{C8249E35-ED76-4180-95BA-317F8DC45683}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calc32", "Calc\Calc32\Calc32.csproj", "{1050FECD-B665-4B48-A068-5C46259D640A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc32", "Calc\Calc32\Calc32.csproj", "{1050FECD-B665-4B48-A068-5C46259D640A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calc32Tests", "Calc\Calc32Tests\Calc32Tests.csproj", "{24267033-7025-4264-9C9C-3888A294B8DA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc32Tests", "Calc\Calc32Tests\Calc32Tests.csproj", "{24267033-7025-4264-9C9C-3888A294B8DA}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CharGrid", "CharGrid\CharGrid.csproj", "{C9207149-1178-4D9E-818E-36C4DA31047C}" EndProject @@ -43,11 +55,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ActionTestWPF", "ActionTest EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddPageWPF", "AddPageWPF\AddPageWPF.csproj", "{AF16F7AF-CF83-4679-8111-0BBE9BCDA102}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calc32WPF", "Calc\Calc32WPF\Calc32WPF.csproj", "{4BCC197C-7F28-4F6E-B831-D02BE0ABE839}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc32WPF", "Calc\Calc32WPF\Calc32WPF.csproj", "{4BCC197C-7F28-4F6E-B831-D02BE0ABE839}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BindingGroupExp", "BindingGroupExp\BindingGroupExp.csproj", "{AFCEC61D-9C18-49E5-94AE-17429BB06C78}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleMouseApp", "ConsoleMouseApp\ConsoleMouseApp.csproj", "{98D9C22F-ED66-4219-B6B8-8E38A04F9771}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleMouseApp", "ConsoleMouseApp\ConsoleMouseApp.csproj", "{98D9C22F-ED66-4219-B6B8-8E38A04F9771}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleMouseApp_net", "ConsoleMouseApp\ConsoleMouseApp_net.csproj", "{DCBA9C93-38E4-4B0C-ABE5-DA89C8CF8785}" EndProject @@ -59,9 +69,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSFreeVision", "Libraries\C EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestDirectives", "TestDirectives\TestDirectives.csproj", "{F22909B4-7DA6-4E52-9682-0AACD6D0E90B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calc32Cons", "Calc\Calc32Cons\Calc32Cons.csproj", "{9A31567A-4BDD-442A-912A-C82D020D6269}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc32Cons", "Calc\Calc32Cons\Calc32Cons.csproj", "{9A31567A-4BDD-442A-912A-C82D020D6269}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calc32WPFTests", "Calc\Calc32WPFTests\Calc32WPFTests.csproj", "{5BD6F565-B18E-4B62-B51B-0EC58AD82AE1}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc32WPFTests", "Calc\Calc32WPFTests\Calc32WPFTests.csproj", "{5BD6F565-B18E-4B62-B51B-0EC58AD82AE1}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_BaseLib", "Libraries\MVVM_BaseLib\MVVM_BaseLib.csproj", "{ABC8A3FB-12D1-40ED-AA6C-DBFF48B7A080}" EndProject @@ -83,14 +93,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MathLibrary_netTests", "Lib EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MathLibraryTests", "Libraries\MathLibraryTests\MathLibraryTests.csproj", "{AD2B36C5-FA6E-4B42-921D-37F667D7F9C0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ListBinding", "MVVM_Tutorial\ListBinding\ListBinding.csproj", "{85A3CD48-2240-45B2-9757-F03877201923}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ListBinding", "MVVM_Tutorial\ListBinding\ListBinding.csproj", "{85A3CD48-2240-45B2-9757-F03877201923}" ProjectSection(ProjectDependencies) = postProject {F1D5E39A-CCC5-40C3-BA67-BAE7B66F6C0E} = {F1D5E39A-CCC5-40C3-BA67-BAE7B66F6C0E} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SyncAsyncParallel", "MVVM_Tutorial\SyncAsyncParallel\SyncAsyncParallel.csproj", "{373A4CB4-0164-43DF-A51B-52368B1C9FA3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SyncAsyncParallel", "MVVM_Tutorial\SyncAsyncParallel\SyncAsyncParallel.csproj", "{373A4CB4-0164-43DF-A51B-52368B1C9FA3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DialogBoxes", "MVVM_Tutorial\DialogBoxes\DialogBoxes.csproj", "{5920E447-6855-4DD9-9A93-57892EBB789C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_09_DialogBoxes", "MVVM_Tutorial\MVVM_09_DialogBoxes\MVVM_09_DialogBoxes.csproj", "{5920E447-6855-4DD9-9A93-57892EBB789C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ItemsControlTut1", "MVVM_Tutorial\ItemsControlTut1\ItemsControlTut1.csproj", "{52CEFB40-D9BD-4A33-9481-1D36ABE3E528}" EndProject @@ -106,45 +116,37 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfDemoUI2", "MVVM_Tutorial EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DemoLibraryTests", "MVVM_Tutorial\DemoLibraryTests\DemoLibraryTests.csproj", "{556D7E83-0A6F-4C8F-8682-429C9F3BCD0E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ListBindingTests", "MVVM_Tutorial\ListBindingTests\ListBindingTests.csproj", "{34D5A083-6197-4603-93C0-539158579DAB}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ListBinding_net", "MVVM_Tutorial\ListBinding_net\ListBinding_net.csproj", "{C14E9E4A-49DB-4DC2-AEA7-FD667B54237E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ListBinding_netTests", "MVVM_Tutorial\ListBinding_netTests\ListBinding_netTests.csproj", "{65DEC645-28C3-465C-B0D3-C81CEC2B40BA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ListBindingTests", "MVVM_Tutorial\ListBindingTests\ListBindingTests.csproj", "{34D5A083-6197-4603-93C0-539158579DAB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfApp_net", "MVVM_Tutorial\WpfApp1\WpfApp_net.csproj", "{5F710E80-7C09-477E-B606-B7ECDDED5FAC}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_6_Converters", "MVVM_Tutorial\MVVM_6_Converters\MVVM_6_Converters.csproj", "{EE09911D-3228-43D9-9F90-29709A9A8A46}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_6_Converters_2", "MVVM_Tutorial\MVVM_6-2_Converters\MVVM_6_Converters_2.csproj", "{DCB63416-79C7-4782-8C87-4FA60270D46A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_6_Converters_3", "MVVM_Tutorial\MVVM_6_Converters_3\MVVM_6_Converters_3.csproj", "{9055DF3D-525F-4258-A5A6-9BCF861EF590}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_17_1_CSV_Laden", "MVVM_Tutorial\MVVM_17_1_CSV_Laden\MVVM_17_1_CSV_Laden.csproj", "{752917E2-0A8D-4B39-8786-76F1EF9426AF}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_18_MultiConverters", "MVVM_Tutorial\MVVM_18_MultiConverters\MVVM_18_MultiConverters.csproj", "{D32FA801-F7D2-42DA-A2FA-B3453E61243E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_16_Usercontrol_1", "MVVM_Tutorial\MVVM_16_Usercontrol_1\MVVM_16_Usercontrol_1.csproj", "{36470BF0-3F84-4D7D-A87B-E51ED1A42035}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_26_BindingGroupExp", "MVVM_Tutorial\MVVM_26_BindingGroupExp\MVVM_26_BindingGroupExp.csproj", "{AFCEC61D-9C18-49E5-94AE-17429BB06C78}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_16_Usercontrol_2", "MVVM_Tutorial\MVVM_16_Usercontrol_2\MVVM_16_Usercontrol_2.csproj", "{026CCC3A-C677-434B-997A-030886044B32}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_18_MultiConverters", "MVVM_Tutorial\MVVM_18_MultiConverters\MVVM_18_MultiConverters.csproj", "{D32FA801-F7D2-42DA-A2FA-B3453E61243E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_20_Sysdialogs", "MVVM_Tutorial\MVVM_20_Sysdialogs\MVVM_20_Sysdialogs.csproj", "{D6A4B6AE-F401-4CBF-8DAF-541B9B46B5F6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_20_SysdialogsTests", "MVVM_Tutorial\MVVM_20_SysdialogsTests\MVVM_20_SysdialogsTests.csproj", "{4B1434DC-C076-4FC3-8E1A-E65C06B3A258}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_21_Buttons", "MVVM_Tutorial\MVVM_21_Buttons\MVVM_21_Buttons.csproj", "{E499895B-C183-4190-9A55-4ADD699C0AD3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_21_Buttons", "MVVM_Tutorial\MVVM_21_Buttons\MVVM_21_Buttons.csproj", "{E499895B-C183-4190-9A55-4ADD699C0AD3}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DialogBoxes_net", "MVVM_Tutorial\DialogBoxes\DialogBoxes_net.csproj", "{0260C25D-E601-4D07-A933-F94DE59B5445}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_09_DialogBoxes_net", "MVVM_Tutorial\MVVM_09_DialogBoxes\MVVM_09_DialogBoxes_net.csproj", "{0260C25D-E601-4D07-A933-F94DE59B5445}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_21_Buttons_net", "MVVM_Tutorial\MVVM_21_Buttons\MVVM_21_Buttons_net.csproj", "{BCD96092-39F7-4DEE-B6E3-4BC4317F5513}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SyncAsyncParallel_net", "MVVM_Tutorial\SyncAsyncParallel\SyncAsyncParallel_net.csproj", "{7A7419CD-963D-424C-BB92-34AA9D966DC2}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_22_WpfCap", "MVVM_Tutorial\MVVM_22_WpfCap\MVVM_22_WpfCap.csproj", "{6DD9F402-FAB4-4113-A378-7007049118DF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_22_WpfCap", "MVVM_Tutorial\MVVM_22_WpfCap\MVVM_22_WpfCap.csproj", "{6DD9F402-FAB4-4113-A378-7007049118DF}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_22_WpfCap_net", "MVVM_Tutorial\MVVM_22_WpfCap\MVVM_22_WpfCap_net.csproj", "{77599858-F490-4056-AAF7-F7092ABE3F23}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Graphics", "Graphics", "{E1D77C39-936E-4ADB-8350-74B5A4401280}" + ProjectSection(SolutionItems) = preProject + Graphics\Graphics.props = Graphics\Graphics.props + Graphics\Graphics_net.props = Graphics\Graphics_net.props + EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CanvasWPF", "Graphics\CanvasWPF\CanvasWPF.csproj", "{F8F1508A-B8A0-48EB-9359-7A043C4B447E}" EndProject @@ -162,9 +164,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_Converter_Grid", "Grap EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mobile", "Mobile", "{8CCD8BF8-F2E9-4282-A9BC-817A051663D4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App1", "App1\App1.csproj", "{7FCCCBC8-4B1D-49CE-8CC1-AB02A0DC2E52}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Games", "Games", "{947E3943-6DE0-46E7-9106-BCE8C6E812E0}" + ProjectSection(SolutionItems) = preProject + Games\Games.props = Games\Games.props + Games\Games_net.props = Games\Games_net.props + SomeThing\Solution.props = SomeThing\Solution.props + EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sokoban_Base", "Games\Sokoban_Base\Sokoban_Base.csproj", "{13662848-3BDB-4119-BF5D-D58EA0F8026E}" EndProject @@ -190,9 +195,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestConsoleDemo", "TestCons EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleDisplay_netTests", "ConsoleDisplayTests\ConsoleDisplay_netTests.csproj", "{6E6FBC29-5A19-4444-BCFE-21E6C88378E1}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SomeThing", "SomeThing\SomeThing.csproj", "{9960C80E-9A03-4D27-BD75-7E1B90A3EDB0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SomeThing", "SomeThing\SomeThing\SomeThing.csproj", "{9960C80E-9A03-4D27-BD75-7E1B90A3EDB0}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SomeThing2", "SomeThing2\SomeThing2.csproj", "{1F55EC24-0EAD-484E-B3C0-7F69D4C6D955}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SomeThing2", "SomeThing\SomeThing2\SomeThing2.csproj", "{1F55EC24-0EAD-484E-B3C0-7F69D4C6D955}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ItemsControlTut3_net", "MVVM_Tutorial\ItemsControlTut3\ItemsControlTut3_net.csproj", "{0B01FB9D-88A8-4C58-AED4-1EDC9AF6934A}" EndProject @@ -219,9 +224,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_BaseLibTests", "Librar EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_BaseLibTests_net", "Libraries\MVVM_BaseLibTests\MVVM_BaseLibTests_net.csproj", "{184DAE30-9D1C-430B-A7CC-9A9F60E64BDB}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfApp", "MVVM_Tutorial\WpfApp1\WpfApp.csproj", "{20AA77E3-3884-4C10-9B62-D48DA98D846A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfApp", "MVVM_Tutorial\WpfApp1\WpfApp.csproj", "{20AA77E3-3884-4C10-9B62-D48DA98D846A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Polyline", "Graphics\Polyline\Polyline.csproj", "{070E91DD-75E9-4186-A773-A2FB576AD1AB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polyline", "Graphics\Polyline\Polyline.csproj", "{070E91DD-75E9-4186-A773-A2FB576AD1AB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaseLib", "Libraries\BaseLib\BaseLib.csproj", "{3A6D15DB-3EC0-4A8D-96CF-39A55D71C508}" EndProject @@ -229,7 +234,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaseLib_net", "Libraries\Ba EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Snake_Base_netTests", "Games\Snake_BaseTests\Snake_Base_netTests.csproj", "{E651DCE4-FD4B-4736-9FF7-2B38A9CE5002}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calc64Base", "Calc\Calc64Base\Calc64Base.csproj", "{5B519E7C-1335-439C-900E-BF0E5FAD92BC}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc64Base", "Calc\Calc64Base\Calc64Base.csproj", "{5B519E7C-1335-439C-900E-BF0E5FAD92BC}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc64Base_net", "Calc\Calc64Base\Calc64Base_net.csproj", "{C540C246-6012-4092-82CB-75468A590C00}" EndProject @@ -244,9 +249,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc32WPF_netTests", "Calc\ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc64Base_netTests", "Calc\Calc64BaseTests\Calc64Base_netTests.csproj", "{47B19FA5-50B8-4856-8D09-DC7AFFD4D3A1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calc64BaseTests", "Calc\Calc64BaseTests\Calc64BaseTests.csproj", "{363ABE13-A78E-401F-BAB7-F0259FC7EF83}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc64BaseTests", "Calc\Calc64BaseTests\Calc64BaseTests.csproj", "{363ABE13-A78E-401F-BAB7-F0259FC7EF83}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calc64WF", "Calc\Calc64WF\Calc64WF.csproj", "{E774D7FD-AAC7-45DF-B839-82C48E8DD18F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc64WF", "Calc\Calc64WF\Calc64WF.csproj", "{E774D7FD-AAC7-45DF-B839-82C48E8DD18F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_Lines_on_Grid", "Graphics\MVVM_Lines_on_Grid\MVVM_Lines_on_Grid.csproj", "{B2E5EE6D-2D56-4B4D-B34C-23C607A6B8F1}" EndProject @@ -254,9 +259,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiApp1", "Mobile\MauiApp1 EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc64WF_net", "Calc\Calc64WF\Calc64WF_net.csproj", "{CBF9810B-C6DB-47A6-9C5D-6E20DBF8B5E1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WFSystem.Windows.Data", "Libraries\WFSystem.Data\WFSystem.Windows.Data.csproj", "{40A6110B-F1A0-4476-B64F-D629313D9FA1}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WFSystem.Windows.Data", "Libraries\WFSystem.Data\WFSystem.Windows.Data.csproj", "{40A6110B-F1A0-4476-B64F-D629313D9FA1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calc64WFTests", "Calc\Calc64WFTests\Calc64WFTests.csproj", "{5532F188-437D-423B-B883-1ECF3BFAF7C1}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc64WFTests", "Calc\Calc64WFTests\Calc64WFTests.csproj", "{5532F188-437D-423B-B883-1ECF3BFAF7C1}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WFSystem.Windows.Data_net", "Libraries\WFSystem.Data\WFSystem.Windows.Data_net.csproj", "{D0F700C1-F416-4F77-9E9F-D37A9B8E466A}" EndProject @@ -279,7 +284,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc64WF_netTests", "Calc\C {CBF9810B-C6DB-47A6-9C5D-6E20DBF8B5E1} = {CBF9810B-C6DB-47A6-9C5D-6E20DBF8B5E1} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_31_Validation1", "MVVM_Tutorial\MVVM_31_Validation1\MVVM_31_Validation1.csproj", "{7BCBBC4E-A7EA-4AB1-AF2D-81325A5368A5}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_31_Validation1", "MVVM_Tutorial\MVVM_31_Validation1\MVVM_31_Validation1.csproj", "{7BCBBC4E-A7EA-4AB1-AF2D-81325A5368A5}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_31_Validation1_net", "MVVM_Tutorial\MVVM_31_Validation1\MVVM_31_Validation1_net.csproj", "{27777C75-0DA7-4489-BE60-51E74F921090}" EndProject @@ -308,6 +313,10 @@ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Game_BaseTests", "Games\Game_BaseTests\Game_BaseTests.csproj", "{C7A0CD1D-504A-44DE-AFA1-61BE31DCAE41}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DB", "DB", "{ABF85DD5-B281-4889-9A8E-5DB3185A8DD5}" + ProjectSection(SolutionItems) = preProject + DB\DB.props = DB\DB.props + DB\DB_net.props = DB\DB_net.props + EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DBTest1", "DB\DBTest1\DBTest1.csproj", "{F0207D93-9C3B-4C45-84AE-F4CD3D12AB84}" EndProject @@ -323,6 +332,707 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CustomerRepositoryTests", " EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestConsole", "TestConsole\TestConsole.csproj", "{D1461ADD-B8EC-4F72-B3B1-4202EC6DB1B9}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_22_WpfCapTests", "MVVM_Tutorial\MVVM_22_WpfCapTests\MVVM_22_WpfCapTests.csproj", "{20E5E7E6-0191-4EBF-BBD7-8A7EF7E32778}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Projektmappenelemente", "Projektmappenelemente", "{3AA3FF9C-70D3-451A-9F1F-A113CC913372}" + ProjectSection(SolutionItems) = preProject + Solution.props = Solution.props + Solution_net.props = Solution_net.props + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SomeThing2a", "SomeThing\SomeThing2a\SomeThing2a.csproj", "{1EC15DBC-47F1-4268-99AF-E8CD46ECC7FB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SomeThing2Tests", "SomeThing\SomeThing2Tests\SomeThing2Tests.csproj", "{A8EF5884-AD1D-4A72-9FBB-87677F4F22A5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SomeThing2aTests", "SomeThing\SomeThing2aTests\SomeThing2aTests.csproj", "{3C09ADED-DB10-4E3D-AC4E-D0E314638E1F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc32_netTests", "Calc\Calc32Tests\Calc32_netTests.csproj", "{CBE80569-113E-4FFF-A00C-230CBB120934}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_18_MultiConvertersTests", "MVVM_Tutorial\MVVM_18_MultiConvertersTests\MVVM_18_MultiConvertersTests.csproj", "{9A36CBEB-BDAF-4FE8-B4A9-604C71110A8E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc64Base_win", "Calc\Calc64Base\Calc64Base_win.csproj", "{B405793C-2446-4427-9329-034518031CD7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2D5888F1-086D-4457-B115-01E17625BCA6}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XSD_Data_Test", "DB\XSD_Data_Test\XSD_Data_Test.csproj", "{BE9DA1B8-3DD8-4A87-8ED8-4DF0940796FC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataLake_App", "DB\DataLake_App\DataLake_App.csproj", "{305696C7-1982-47BF-96F5-972AE87FFD17}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_31_Validation1Tests", "MVVM_Tutorial\MVVM_31_Validation1Tests\MVVM_31_Validation1Tests.csproj", "{9BF13892-7211-42C7-ACD7-C09935B8312C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_31_Validation1_netTests", "MVVM_Tutorial\MVVM_31_Validation1Tests\MVVM_31_Validation1_netTests.csproj", "{7C8A171D-3BF7-4F01-8724-1118D2E9FAFD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_31_Validation2", "MVVM_Tutorial\MVVM_31_Validation2\MVVM_31_Validation2.csproj", "{F53F1115-0D15-4B79-9722-CA71DD2E43EB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfAppTests", "MVVM_Tutorial\WpfAppTests\WpfAppTests.csproj", "{EA6952FA-31F7-4112-851C-CECDFB7E1857}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfApp_netTests", "MVVM_Tutorial\WpfAppTests\WpfApp_netTests.csproj", "{9C23F0AB-C5AF-4179-9D42-52B195E7F8A4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MVVM_Tut_01-10", "MVVM_Tut_01-10", "{6A18D579-BB15-42D9-ACB1-F7201C790CE8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MVVM_Tut_11-20", "MVVM_Tut_11-20", "{FA5C6934-CFA9-4A3C-B027-C1F7D4899984}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_04_DelegateCommand_net", "MVVM_Tutorial\MVVM_04_DelegateCommand\MVVM_04_DelegateCommand_net.csproj", "{5DBE8E36-A918-4820-91AA-8D81B9BB672C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_04_DelegateCommand", "MVVM_Tutorial\MVVM_04_DelegateCommand\MVVM_04_DelegateCommand.csproj", "{1652863C-5971-42D9-80B4-4A1304249B06}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_04_DelegateCommand_netTests", "MVVM_Tutorial\MVVM_04_DelegateCommandTests\MVVM_04_DelegateCommand_netTests.csproj", "{C8FFB08D-A763-467E-ABCB-FCF7EFDDC54A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_04_DelegateCommandTests", "MVVM_Tutorial\MVVM_04_DelegateCommandTests\MVVM_04_DelegateCommandTests.csproj", "{BD61CECD-C220-4743-BE06-F5E864878644}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_03_NotifyChange", "MVVM_Tutorial\MVVM_03_NotifyChange\MVVM_03_NotifyChange.csproj", "{E0344ED7-E92C-4EF0-BF33-D72C47536AFA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_03_NotifyChange_net", "MVVM_Tutorial\MVVM_03_NotifyChange\MVVM_03_NotifyChange_net.csproj", "{0D2CBEEF-92E9-4150-8F62-003397757AD3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_03_NotifyChange_netTests", "MVVM_Tutorial\MVVM_03_NotifyChangeTests\MVVM_03_NotifyChange_netTests.csproj", "{75646623-EE05-4B2B-BF1B-63D9A2ACDF3E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_03_NotifyChangeTests", "MVVM_Tutorial\MVVM_03_NotifyChangeTests\MVVM_03_NotifyChangeTests.csproj", "{6B78EB3B-7A0A-45E1-9DEE-8E96BF31290C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_05_CommandParCalculator", "MVVM_Tutorial\MVVM_05_CommandParCalculator\MVVM_05_CommandParCalculator.csproj", "{3B41B91C-28F1-46B7-9739-0A125221C7DB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_05_CommandParCalculator_net", "MVVM_Tutorial\MVVM_05_CommandParCalculator\MVVM_05_CommandParCalculator_net.csproj", "{37FD19C9-2F73-4369-AF39-16EA4B2BDE2A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_05_CommandParCalculator_netTests", "MVVM_Tutorial\MVVM_05_CommandParCalculatorTests\MVVM_05_CommandParCalculator_netTests.csproj", "{6705D5D9-994E-44F8-A016-824DFEC7ACC2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_05_CommandParCalculatorTests", "MVVM_Tutorial\MVVM_05_CommandParCalculatorTests\MVVM_05_CommandParCalculatorTests.csproj", "{2E79F7C1-392F-4C68-9E94-8C6ABA79BC19}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ListBinding_net", "MVVM_Tutorial\ListBinding\ListBinding_net.csproj", "{827926F3-D8F8-42F4-AD66-C44AAFD9EB35}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ListBinding_netTests", "MVVM_Tutorial\ListBindingTests\ListBinding_netTests.csproj", "{C988DF88-A4A1-4145-A684-C8063E159560}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_06_Converters", "MVVM_Tutorial\MVVM_06_Converters\MVVM_06_Converters.csproj", "{560192D6-F622-4219-A5BB-442BA1D9A7C5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_06_Converters_2", "MVVM_Tutorial\MVVM_06_Converters_2\MVVM_06_Converters_2.csproj", "{9DF2B72E-31A4-4D7F-9DFB-B6A574496C3A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_06_Converters_3", "MVVM_Tutorial\MVVM_06_Converters_3\MVVM_06_Converters_3.csproj", "{070DBB3C-DC63-4407-B037-70DD9180F381}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_06_Converters_4", "MVVM_Tutorial\MVVM_06_Converters_4\MVVM_06_Converters_4.csproj", "{1D7A80BD-0444-430D-A242-AF6FA579E48E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_06_Converters_4Tests", "MVVM_Tutorial\MVVM_06_Converters_4Tests\MVVM_06_Converters_4Tests.csproj", "{B4F3602C-8278-464B-A315-D9D2C42B49F7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TraceCsv2realCsv", "Data\TraceCsv2realCsv\TraceCsv2realCsv.csproj", "{336E0AC8-6CC7-4437-B22D-03A7A836AAFE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Data", "Data", "{050F69CA-1EB1-4D46-B52C-018637E6D525}" + ProjectSection(SolutionItems) = preProject + Data\Data.props = Data\Data.props + Data\Data_net.props = Data\Data_net.props + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TraceCsv2realCsvTests", "Data\TraceCsv2realCsvTests\TraceCsv2realCsvTests.csproj", "{76267660-AA79-4FBA-8AF9-4FB6808CDF35}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_06_ConvertersTests", "MVVM_Tutorial\MVVM_06_ConvertersTests\MVVM_06_ConvertersTests.csproj", "{21103739-7784-4C4F-BA8A-F03D0B295DE3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_19_FilterLists", "MVVM_Tutorial\MVVM_19_FilterLists\MVVM_19_FilterLists.csproj", "{3A0D6E61-D11A-499D-8921-702D3DA72A7D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_19_FilterLists_net", "MVVM_Tutorial\MVVM_19_FilterLists\MVVM_19_FilterLists_net.csproj", "{5BD85F99-D217-4A81-A7E6-C4EAAC3A0F46}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_19_FilterLists_netTests", "MVVM_Tutorial\MVVM_19_FilterListsTests\MVVM_19_FilterLists_netTests.csproj", "{10ABD6B8-9FD6-4736-920C-5256DD1E8FD0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_19_FilterListsTests", "MVVM_Tutorial\MVVM_19_FilterListsTests\MVVM_19_FilterListsTests.csproj", "{D0F20831-9B60-450F-B9B2-43C1A3341C1B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MVVM_Tut_21-30", "MVVM_Tut_21-30", "{BA409E0A-C840-4305-83C7-2934BEFE9E5E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_28_DataGrid", "MVVM_Tutorial\MVVM_28_DataGrid\MVVM_28_DataGrid.csproj", "{FF30A0F2-1C32-4A56-9233-307CA31EB43B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_28_DataGrid_net", "MVVM_Tutorial\MVVM_28_DataGrid\MVVM_28_DataGrid_net.csproj", "{5A727EC9-D754-4976-92BC-FB8769780647}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_28_DataGrid_netTests", "MVVM_Tutorial\MVVM_28_DataGridTests\MVVM_28_DataGrid_netTests.csproj", "{947B4A72-108A-4215-A76B-F11F66253B73}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_28_DataGridTests", "MVVM_Tutorial\MVVM_28_DataGridTests\MVVM_28_DataGridTests.csproj", "{168E7151-AE15-4210-A979-E1347AD8288B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_27_DataGrid", "MVVM_Tutorial\MVVM_27_DataGrid\MVVM_27_DataGrid.csproj", "{D91DA55B-2DAD-4D18-8130-629BD143A7C7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_27_DataGrid_net", "MVVM_Tutorial\MVVM_27_DataGrid\MVVM_27_DataGrid_net.csproj", "{860CB348-BD36-4A45-A8E5-5F0E0751C4A9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_27_DataGrid_netTests", "MVVM_Tutorial\MVVM_27_DataGridTests\MVVM_27_DataGrid_netTests.csproj", "{9625C308-5B63-436D-B1F7-B37BE7E3541B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_27_DataGridTests", "MVVM_Tutorial\MVVM_27_DataGridTests\MVVM_27_DataGridTests.csproj", "{D7867DE5-6ECB-406D-BCED-DEB377F4FB55}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_24_UserControl", "MVVM_Tutorial\MVVM_24_UserControl\MVVM_24_UserControl.csproj", "{FE288996-8C94-4B75-8BF1-16977C98241A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_24_UserControl_net", "MVVM_Tutorial\MVVM_24_UserControl\MVVM_24_UserControl_net.csproj", "{4BD2505B-8426-48F2-86C2-4FFE3D416ED8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_24_UserControl_netTests", "MVVM_Tutorial\MVVM_24_UserControlTests\MVVM_24_UserControl_netTests.csproj", "{A69CDCAB-A96B-4CD5-AE95-562A74DBEF11}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_24_UserControlTests", "MVVM_Tutorial\MVVM_24_UserControlTests\MVVM_24_UserControlTests.csproj", "{50BA28CD-5BFC-4C5E-B702-77A9B1543A04}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Templates", "Templates", "{079E15A6-E931-4AFC-994F-0E5B744C4FD3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_00_Template", "MVVM_Tutorial\MVVM_00_Template\MVVM_00_Template.csproj", "{D2130F2D-B4A1-41AD-BFFA-17AA74888987}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_00_Template_net", "MVVM_Tutorial\MVVM_00_Template\MVVM_00_Template_net.csproj", "{36EF5A3D-2101-46F5-9CC9-47ACCCEC94C4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_00_Template_netTests", "MVVM_Tutorial\MVVM_00_TemplateTests\MVVM_00_Template_netTests.csproj", "{F2D026CA-B596-48EB-9F20-D03029FE852A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_00_TemplateTests", "MVVM_Tutorial\MVVM_00_TemplateTests\MVVM_00_TemplateTests.csproj", "{7A1F9EDE-D619-4B73-9914-137DDE2044E4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_06_Converters_4_net", "MVVM_Tutorial\MVVM_06_Converters_4\MVVM_06_Converters_4_net.csproj", "{70AD3FCB-F529-4E08-BE39-E56C940EA114}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_16_Usercontrol1_net", "MVVM_Tutorial\MVVM_16_Usercontrol1\MVVM_16_Usercontrol1_net.csproj", "{CDC8B1F7-3C94-4686-9EE0-6841231E6144}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Simulation", "Simulation", "{0DF8EC71-8008-41CF-9A87-946604FBD24D}" + ProjectSection(SolutionItems) = preProject + Simulation\Simulation.props = Simulation\Simulation.props + Simulation\Simulation_net.props = Simulation\Simulation_net.props + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AGVFktTests", "Simulation\AGVFktTests\AGVFktTests.csproj", "{E2586A8F-F16C-4532-BDED-8DBF8B47A392}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AGVFkt", "Simulation\AGVFkt\AGVFkt.csproj", "{B11B8CA5-A1DF-4D23-BC65-C53DE68D3094}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MVVM_Tut_31-40", "MVVM_Tut_31-40", "{465E6B8C-A028-4C99-86E7-2710FFC62901}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_33_Events_to_Commands", "MVVM_Tutorial\MVVM_33_Events_to_Commands\MVVM_33_Events_to_Commands.csproj", "{5D298F4A-5A33-4489-8F9D-78FA0A04AC3C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_33_Events_to_Commands_net", "MVVM_Tutorial\MVVM_33_Events_to_Commands\MVVM_33_Events_to_Commands_net.csproj", "{30FCB2D0-9353-4218-A5C9-1807661D2656}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_33_Events_to_Commands_netTests", "MVVM_Tutorial\MVVM_33_Events_to_CommandsTests\MVVM_33_Events_to_Commands_netTests.csproj", "{D73CF550-4CC3-47A9-864E-F7FC46736DBF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_33_Events_to_CommandsTests", "MVVM_Tutorial\MVVM_33_Events_to_CommandsTests\MVVM_33_Events_to_CommandsTests.csproj", "{A5532EED-72CC-4C3A-A81C-5BE3172F0FDF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_16_UserControl1_netTests", "MVVM_Tutorial\MVVM_16_UserControl1Tests\MVVM_16_UserControl1_netTests.csproj", "{48352710-3D49-43A9-89D6-3836A4D49F71}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_16_UserControl2", "MVVM_Tutorial\MVVM_16_Usercontrol2\MVVM_16_UserControl2.csproj", "{CE01EBEF-6E86-4778-B49F-F65081082F3C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_16_UserControl1", "MVVM_Tutorial\MVVM_16_Usercontrol1\MVVM_16_UserControl1.csproj", "{4445A10E-DF6C-461A-9F1B-B4D03F5322E1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_16_UserControl2_net", "MVVM_Tutorial\MVVM_16_Usercontrol2\MVVM_16_UserControl2_net.csproj", "{67482071-FBD5-4D12-A571-C37EDD517365}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_16_UserControl1Tests", "MVVM_Tutorial\MVVM_16_UserControl1Tests\MVVM_16_UserControl1Tests.csproj", "{E8A207D8-5920-419C-8CAE-92B5D34D28E1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_34_BindingEventArgs", "MVVM_Tutorial\MVVM_34_BindingEventArgs\MVVM_34_BindingEventArgs.csproj", "{50AF2EFB-FF15-4058-ABA4-C720E044FD29}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_34_BindingEventArgs_net", "MVVM_Tutorial\MVVM_34_BindingEventArgs\MVVM_34_BindingEventArgs_net.csproj", "{86737A35-BCF5-44D8-A383-9C1E26D8CA54}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_34_BindingEventArgsTests", "MVVM_Tutorial\MVVM_34_BindingEventArgsTests\MVVM_34_BindingEventArgsTests.csproj", "{CF20036E-A856-47E4-8F04-918FB151ECFD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_34_BindingEventArgs_netTests", "MVVM_Tutorial\MVVM_34_BindingEventArgsTests\MVVM_34_BindingEventArgs_netTests.csproj", "{70C2F91D-0C9C-4865-A98F-F0125D4FF0C4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_35_CommunityToolkit", "MVVM_Tutorial\MVVM_35_CommunityToolkit\MVVM_35_CommunityToolkit.csproj", "{12AB67E2-8F23-4463-8460-4DE0BABCEE1A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_35_CommunityToolkit_net", "MVVM_Tutorial\MVVM_35_CommunityToolkit\MVVM_35_CommunityToolkit_net.csproj", "{1417F6CC-4924-490A-8D73-C230B24507DC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_35_CommunityToolkit_netTests", "MVVM_Tutorial\MVVM_35_CommunityToolkitTests\MVVM_35_CommunityToolkit_netTests.csproj", "{6274CE2E-241E-4048-9B06-5804952A90B2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_35_CommunityToolkitTests", "MVVM_Tutorial\MVVM_35_CommunityToolkitTests\MVVM_35_CommunityToolkitTests.csproj", "{C1C5F7E2-AF90-4DC5-8E6D-B74225E422BF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_03a_CTNotifyChange", "MVVM_Tutorial\MVVM_03a_CTNotifyChange\MVVM_03a_CTNotifyChange.csproj", "{73144DF6-CFD2-40DB-AA23-9961CB0419F7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_03a_CTNotifyChange_net", "MVVM_Tutorial\MVVM_03a_CTNotifyChange\MVVM_03a_CTNotifyChange_net.csproj", "{15FCEB5D-C3BB-42AC-BCBC-C44C86FAC1B3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_03a_CTNotifyChangeTests", "MVVM_Tutorial\MVVM_03a_CTNotifyChangeTests\MVVM_03a_CTNotifyChangeTests.csproj", "{D1C70A41-9467-4CC9-961C-2192F7189349}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_03a_CTNotifyChange_netTests", "MVVM_Tutorial\MVVM_03a_CTNotifyChangeTests\MVVM_03a_CTNotifyChange_netTests.csproj", "{7F4B9EAC-F272-4E2F-A2A4-965CCC2C4EA6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_04a_CTRelayCommand", "MVVM_Tutorial\MVVM_04a_CTRelayCommand\MVVM_04a_CTRelayCommand.csproj", "{7D3B107B-61AA-4D1C-B052-D349CC360BE6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_04a_CTRelayCommand_net", "MVVM_Tutorial\MVVM_04a_CTRelayCommand\MVVM_04a_CTRelayCommand_net.csproj", "{5B313241-C556-497B-98CB-8BA86DFEA3F7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_04a_CTRelayCommand_netTests", "MVVM_Tutorial\MVVM_04a_CTRelayCommandTests\MVVM_04a_CTRelayCommand_netTests.csproj", "{67C0EDBF-B64D-4D42-B4D6-87BC9B6A45A4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_04a_CTRelayCommandTests", "MVVM_Tutorial\MVVM_04a_CTRelayCommandTests\MVVM_04a_CTRelayCommandTests.csproj", "{58B40D67-81A4-478F-AF1C-67CFA2975B95}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_05a_CTCommandParCalc", "MVVM_Tutorial\MVVM_05a_CTCommandParCalc\MVVM_05a_CTCommandParCalc.csproj", "{9FD0E881-4F74-4B63-9B77-ECED8589EC79}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_05a_CTCommandParCalc_net", "MVVM_Tutorial\MVVM_05a_CTCommandParCalc\MVVM_05a_CTCommandParCalc_net.csproj", "{5E8D625C-F9BD-47F3-A3B9-4769F895FB97}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_05a_CTCommandParCalcTests", "MVVM_Tutorial\MVVM_05a_CTCommandParCalcTests\MVVM_05a_CTCommandParCalcTests.csproj", "{97F9546F-D70B-45E8-9EA2-0383CF2F6C53}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_05a_CTCommandParCalc_netTests", "MVVM_Tutorial\MVVM_05a_CTCommandParCalcTests\MVVM_05a_CTCommandParCalc_netTests.csproj", "{FCD72C56-8DE4-46BC-B9B9-F870EE2D26E0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_00a_CTTemplate", "MVVM_Tutorial\MVVM_00a_CTTemplate\MVVM_00a_CTTemplate.csproj", "{931E6436-3793-4732-A3DF-473BA5878534}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_00a_CTTemplate_net", "MVVM_Tutorial\MVVM_00a_CTTemplate\MVVM_00a_CTTemplate_net.csproj", "{544A9C70-FE8C-4606-A3EF-74230BF18D45}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_00a_CTTemplate_netTests", "MVVM_Tutorial\MVVM_00a_CTTemplateTests\MVVM_00a_CTTemplate_netTests.csproj", "{E54A6230-93F7-4A0F-925E-FE658B8DF425}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_00a_CTTemplateTests", "MVVM_Tutorial\MVVM_00a_CTTemplateTests\MVVM_00a_CTTemplateTests.csproj", "{C1605309-ABD1-4D6E-A119-9F8213F67A83}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_36_ComToolKtSavesWork", "MVVM_Tutorial\MVVM_36_ComToolKtSavesWork\MVVM_36_ComToolKtSavesWork.csproj", "{B6D67C30-8132-4FB7-909B-DAC73731971B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_36_ComToolKtSavesWork_net", "MVVM_Tutorial\MVVM_36_ComToolKtSavesWork\MVVM_36_ComToolKtSavesWork_net.csproj", "{B9B7EE61-1751-4152-ACC8-717C0D5E34C5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_36_ComToolKtSavesWork_netTests", "MVVM_Tutorial\MVVM_36_ComToolKtSavesWorkTests\MVVM_36_ComToolKtSavesWork_netTests.csproj", "{47143DEF-2CB1-47A3-8E8D-D7AF1190D593}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_36_ComToolKtSavesWorkTests", "MVVM_Tutorial\MVVM_36_ComToolKtSavesWorkTests\MVVM_36_ComToolKtSavesWorkTests.csproj", "{5D6133D4-E4A3-441F-B8E1-AD141FA8AED4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_37_TreeView", "MVVM_Tutorial\MVVM_37_TreeView\MVVM_37_TreeView.csproj", "{2DD54079-CCAE-42BE-9053-DA06591B1D22}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_37_TreeView_net", "MVVM_Tutorial\MVVM_37_TreeView\MVVM_37_TreeView_net.csproj", "{403AF513-EA11-4EA5-B719-46257E5FF0F8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_37_TreeView_netTests", "MVVM_Tutorial\MVVM_37_TreeViewTests\MVVM_37_TreeView_netTests.csproj", "{7C74F87E-B979-48FE-BF82-374A477B359C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_37_TreeViewTests", "MVVM_Tutorial\MVVM_37_TreeViewTests\MVVM_37_TreeViewTests.csproj", "{4468E0D6-CBB0-4D41-952A-0B91A28C558F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_34a_CTBindingEventArgs", "MVVM_Tutorial\MVVM_34a_CTBindingEventArgs\MVVM_34a_CTBindingEventArgs.csproj", "{034E4160-50F0-4944-9D12-5F11CB82C915}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_34a_CTBindingEventArgs_net", "MVVM_Tutorial\MVVM_34a_CTBindingEventArgs\MVVM_34a_CTBindingEventArgs_net.csproj", "{FCB04CDF-4507-470F-A2F5-D02541D10DDC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_34a_CTBindingEventArgs_netTests", "MVVM_Tutorial\MVVM_34a_CTBindingEventArgsTests\MVVM_34a_CTBindingEventArgs_netTests.csproj", "{9F960971-F7C9-4978-8843-28FEA1A4662F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_34a_CTBindingEventArgsTests", "MVVM_Tutorial\MVVM_34a_CTBindingEventArgsTests\MVVM_34a_CTBindingEventArgsTests.csproj", "{6B028F0A-7484-407E-A7E8-312CFAB53B18}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Patterns_Tutorial", "Patterns_Tutorial", "{A02EA190-2D03-40BD-B524-1B7CEB1CA0BF}" + ProjectSection(SolutionItems) = preProject + Patterns_Tutorial\Pattern_Tutorial.props = Patterns_Tutorial\Pattern_Tutorial.props + Patterns_Tutorial\Pattern_Tutorial_net.props = Patterns_Tutorial\Pattern_Tutorial_net.props + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pattern_00_Template", "Patterns_Tutorial\Pattern_00_Template\Pattern_00_Template.csproj", "{6CB3FF5D-96FE-4765-8C15-69B3664F296C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pattern_00_Template_net", "Patterns_Tutorial\Pattern_00_Template\Pattern_00_Template_net.csproj", "{377FEE6C-E6A4-40E5-B723-7872326E66B9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pattern_00_Template_netTests", "Patterns_Tutorial\Pattern_00_TemplateTests\Pattern_00_Template_netTests.csproj", "{47B22880-83E3-406D-839C-D97E56F9A37E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pattern_00_TemplateTests", "Patterns_Tutorial\Pattern_00_TemplateTests\Pattern_00_TemplateTests.csproj", "{3E21F611-8039-46F5-85B5-92AC892A3521}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pattern_01_Singleton", "Patterns_Tutorial\Pattern_01_Singleton\Pattern_01_Singleton.csproj", "{507B6692-06C5-4EA2-98B5-BDE2D5A55B51}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pattern_01_Singleton_net", "Patterns_Tutorial\Pattern_01_Singleton\Pattern_01_Singleton_net.csproj", "{E6869BD3-E28A-4973-9FC6-2DC16EE75DAF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pattern_01_Singleton_netTests", "Patterns_Tutorial\Pattern_01_SingletonTests\Pattern_01_Singleton_netTests.csproj", "{59BA7331-E966-4962-8B91-01EBAA91E0F4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pattern_01_SingletonTests", "Patterns_Tutorial\Pattern_01_SingletonTests\Pattern_01_SingletonTests.csproj", "{C7BAC762-25F8-4D1F-B3FF-94ECA9199BE6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pattern_02_Observer", "Patterns_Tutorial\Pattern_02_Observer\Pattern_02_Observer.csproj", "{5ADB16FD-B2A7-4605-A954-6F4A183519DA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pattern_02_Observer_net", "Patterns_Tutorial\Pattern_02_Observer\Pattern_02_Observer_net.csproj", "{99FD6482-8C75-48FB-8580-01000F850B17}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pattern_02_Observer_netTests", "Patterns_Tutorial\Pattern_02_ObserverTests\Pattern_02_Observer_netTests.csproj", "{2A2F636A-FE6E-4FFF-97D8-18B697B2DDB8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pattern_02_ObserverTests", "Patterns_Tutorial\Pattern_02_ObserverTests\Pattern_02_ObserverTests.csproj", "{856DF852-7271-480F-9A12-F49DFE086263}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_28_1_DataGridExtTests", "MVVM_Tutorial\MVVM_28_1_DataGridExtTests\MVVM_28_1_DataGridExtTests.csproj", "{0A933D61-5F46-4754-A0D8-ADB1F2DEA0E6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_28_1_DataGridExt_netTests", "MVVM_Tutorial\MVVM_28_1_DataGridExtTests\MVVM_28_1_DataGridExt_netTests.csproj", "{28368089-C065-4279-A3C4-6D2815789327}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_28_1_DataGridExt", "MVVM_Tutorial\MVVM_28_1_DataGridExt\MVVM_28_1_DataGridExt.csproj", "{006C67F2-61CB-4FF2-9343-982E6404583F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_28_1_DataGridExt_net", "MVVM_Tutorial\MVVM_28_1_DataGridExt\MVVM_28_1_DataGridExt_net.csproj", "{63E084C3-C741-4285-8094-7BF2AA063C6E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_31_Validation2_net", "MVVM_Tutorial\MVVM_31_Validation2\MVVM_31_Validation2_net.csproj", "{0FEBB470-2752-4E4D-B212-462253E5AF86}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_31_Validation2_netTests", "MVVM_Tutorial\MVVM_31_Validation2Tests\MVVM_31_Validation2_netTests.csproj", "{45AFC9A6-C949-4939-B6FC-0BCE2ED599CF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_31_Validation2Tests", "MVVM_Tutorial\MVVM_31_Validation2Tests\MVVM_31_Validation2Tests.csproj", "{4A4841BC-9AC5-4581-AC50-6AAE6B43E6E7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_31a_CTValidation1_net", "MVVM_Tutorial\MVVM_31a_CTValidation1\MVVM_31a_CTValidation1_net.csproj", "{A3FFA5B4-F3CE-4FBB-82D9-45D85526AB47}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_31a_CTValidation1_netTests", "MVVM_Tutorial\MVVM_31a_CTValidation1Tests\MVVM_31a_CTValidation1_netTests.csproj", "{94E4C64B-919C-48ED-A728-AE95403480FA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_31a_CTValidation1", "MVVM_Tutorial\MVVM_31a_CTValidation1\MVVM_31a_CTValidation1.csproj", "{DBAE5B73-152A-45BF-B5BA-5D598C899A57}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_31a_CTValidation2_net", "MVVM_Tutorial\MVVM_31a_CTValidation2\MVVM_31a_CTValidation2_net.csproj", "{7D29BC5B-683C-4F7E-A87D-746C7FB76732}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_31a_CTValidation2_netTests", "MVVM_Tutorial\MVVM_31a_CTValidation2Tests\MVVM_31a_CTValidation2_netTests.csproj", "{44CD23AC-18B0-4E1A-ADA7-3FF883DA8D03}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_31a_CTValidation2Tests", "MVVM_Tutorial\MVVM_31a_CTValidation2Tests\MVVM_31a_CTValidation2Tests.csproj", "{8BFD4EFE-A009-429B-9AFB-2C77F802F2BC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_31a_CTValidation2", "MVVM_Tutorial\MVVM_31a_CTValidation2\MVVM_31a_CTValidation2.csproj", "{FACD7646-718F-4148-A172-A482063A161E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_31a_CTValidation3", "MVVM_Tutorial\MVVM_31a_CTValidation3\MVVM_31a_CTValidation3.csproj", "{E14F294D-1179-4559-BCEB-0511506AEFA6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_31a_CTValidation3_net", "MVVM_Tutorial\MVVM_31a_CTValidation3\MVVM_31a_CTValidation3_net.csproj", "{5F028E11-1671-461F-87A1-7B27FD6CD01E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_31a_CTValidation3Tests", "MVVM_Tutorial\MVVM_31a_CTValidation3Tests\MVVM_31a_CTValidation3Tests.csproj", "{8B5A7D22-2F96-4934-A204-C192E7E502BE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_31a_CTValidation3_netTests", "MVVM_Tutorial\MVVM_31a_CTValidation3Tests\MVVM_31a_CTValidation3_netTests.csproj", "{D67910D1-2B62-4FB1-A095-A96B1F80C1B9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_33a_CTEvents_To_Commands", "MVVM_Tutorial\MVVM_33a_CTEvents_To_Commands\MVVM_33a_CTEvents_To_Commands.csproj", "{BB247DCA-0566-41B3-9A69-B041019B36D8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_33a_CTEvents_To_Commands_net", "MVVM_Tutorial\MVVM_33a_CTEvents_To_Commands\MVVM_33a_CTEvents_To_Commands_net.csproj", "{2260C062-8317-40EC-BA6B-F1260790CE7D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_33a_CTEvents_To_CommandsTests", "MVVM_Tutorial\MVVM_33a_CTEvents_To_CommandsTests\MVVM_33a_CTEvents_To_CommandsTests.csproj", "{D69A6305-12A9-4190-BDE6-185258D4E8B6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_33a_CTEvents_To_Commands_netTests", "MVVM_Tutorial\MVVM_33a_CTEvents_To_CommandsTests\MVVM_33a_CTEvents_To_Commands_netTests.csproj", "{3E5832F0-1869-4833-8680-7C6952E5D917}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ADO_Test", "DB\ADO_Test\ADO_Test.csproj", "{E7F8BD74-F3EB-4A4D-AF2B-B8492CC6355F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataTable-Test", "DB\DataTable-Test\DataTable-Test.csproj", "{F3128138-A2B7-4C09-9D0A-A93DD4F855A5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OleDbTest", "DB\OLEDBTest\OleDbTest.csproj", "{4C4A49FF-E89F-4108-A4BD-551634A3C4CE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OleDbTest2", "DB\OLEDBTest2\OleDbTest2.csproj", "{A4A4C6CA-FF07-43FD-B1DB-EC9B5E01D11A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleDisplay_win", "ConsoleDisplay\ConsoleDisplay_win.csproj", "{B43805C8-BF34-403A-8933-F1A63AEBDF71}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MdbBrowser", "DB\MdbBrowser\MdbBrowser.csproj", "{F29AAF44-60FE-4189-81C4-FE3A60161394}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MdbBrowserTests", "DB\MdbBrowserTests\MdbBrowserTests.csproj", "{1CF4EBB0-6BBB-456A-9258-83F62D026530}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Werner_Flaschbier_Console", "Games\Werner_Flaschbier\Werner_Flaschbier_Console.csproj", "{200CCE0D-1796-4570-8EDD-7093F0072678}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sokoban_Base_win", "Games\Sokoban_Base\Sokoban_Base_win.csproj", "{AFA889B1-B728-4E16-96B7-9733376B0EA4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Werner_Flaschbier_Base_win", "Games\Werner_Flaschbier\Werner_Flaschbier_Base_win.csproj", "{877417AD-1F8B-48A8-A0C1-A18FEA269564}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{FCA75665-06E8-45DB-94A0-756B79925C54}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Test", "Tests\Test.csproj", "{B8F06FF4-1C87-4483-9B0A-CEC862622BDA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_09_DialogBoxes_netTests", "MVVM_Tutorial\MVVM_09_DialogBoxesTest\MVVM_09_DialogBoxes_netTests.csproj", "{16C31B01-EC91-41E5-8290-EBB887E75F23}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_09_DialogBoxesTest", "MVVM_Tutorial\MVVM_09_DialogBoxesTest\MVVM_09_DialogBoxesTest.csproj", "{0D10C533-F687-40E9-AF63-B06345EAB5DF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sokoban", "Games\Sokoban\Sokoban.csproj", "{83BCDD80-28B3-488A-9F65-27D2637F82F7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_26_CTBindingGroupExp", "MVVM_Tutorial\MVVM_26_CTBindingGroupExp\MVVM_26_CTBindingGroupExp.csproj", "{16EC4035-F8CA-47CB-9F18-4B151EAC28CD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_26_CTBindingGroupExp_net", "MVVM_Tutorial\MVVM_26_CTBindingGroupExp\MVVM_26_CTBindingGroupExp_net.csproj", "{279A92D4-1017-4401-90B2-CDE013D6B2ED}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_38_CTDependencyInjection", "MVVM_Tutorial\MVVM_38_CTDependencyInjection\MVVM_38_CTDependencyInjection.csproj", "{EF6DF7FF-BDE4-40BE-852F-FC7E49C51BFF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_38_CTDependencyInjection_net", "MVVM_Tutorial\MVVM_38_CTDependencyInjection\MVVM_38_CTDependencyInjection_net.csproj", "{97C10721-C4FC-49A0-902D-B28B30BA99B9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_38_CTDependencyInjection_netTests", "MVVM_Tutorial\MVVM_38_CTDependencyInjectionTests\MVVM_38_CTDependencyInjection_netTests.csproj", "{CE791170-2CF8-45BC-B69C-7E0AB29E9FEC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_38_CTDependencyInjectionTests", "MVVM_Tutorial\MVVM_38_CTDependencyInjectionTests\MVVM_38_CTDependencyInjectionTests.csproj", "{3C433895-A214-46AB-9603-4BBF398658AC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_39_MultiModelTest", "MVVM_Tutorial\MVVM_39_MultiModelTest\MVVM_39_MultiModelTest.csproj", "{B5579A89-D734-4C8B-B81C-E0CAA45AB769}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_39_MultiModelTest_net", "MVVM_Tutorial\MVVM_39_MultiModelTest\MVVM_39_MultiModelTest_net.csproj", "{F73FDB0F-D5A5-481C-9ED7-CC4BCD52AD45}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_39_MultiModelTest_netTests", "MVVM_Tutorial\MVVM_39_MultiModelTestTests\MVVM_39_MultiModelTest_netTests.csproj", "{1ABA4692-2B45-487C-AF97-578C289B4D83}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_39_MultiModelTestTests", "MVVM_Tutorial\MVVM_39_MultiModelTestTests\MVVM_39_MultiModelTestTests.csproj", "{43873E03-3D5E-4467-BD34-BFA0F3C62E3E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_28_1_CTDataGridExt", "MVVM_Tutorial\MVVM_28_1_CTDataGridExt\MVVM_28_1_CTDataGridExt.csproj", "{FCFF821D-C176-4F36-972F-0159792DC800}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_28_1_CTDataGridExt_net", "MVVM_Tutorial\MVVM_28_1_CTDataGridExt\MVVM_28_1_CTDataGridExt_net.csproj", "{38CE2218-BAD5-4061-8B68-E266DA86C628}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_28_1_CTDataGridExt_netTests", "MVVM_Tutorial\MVVM_28_1_CTDataGridExtTests\MVVM_28_1_CTDataGridExt_netTests.csproj", "{8D57DECA-7D62-4673-A443-A39265AB925F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_28_1_CTDataGridExtTests", "MVVM_Tutorial\MVVM_28_1_CTDataGridExtTests\MVVM_28_1_CTDataGridExtTests.csproj", "{4F21019C-CC57-4A5F-9A97-AE62D9AE3543}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_24a_CTUserControl", "MVVM_Tutorial\MVVM_24a_CTUserControl\MVVM_24a_CTUserControl.csproj", "{C77FF650-6789-44F4-93AC-7A00674D5E04}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_24a_CTUserControl_net", "MVVM_Tutorial\MVVM_24a_CTUserControl\MVVM_24a_CTUserControl_net.csproj", "{E926AC18-7F96-4FF1-9D32-F857DDA35EB0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_24a_CTUserControl_netTests", "MVVM_Tutorial\MVVM_24a_CTUserControlTests\MVVM_24a_CTUserControl_netTests.csproj", "{E470E285-3A1C-40AA-B3AA-A9EEB9065358}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_24a_CTUserControlTests", "MVVM_Tutorial\MVVM_24a_CTUserControlTests\MVVM_24a_CTUserControlTests.csproj", "{2617DFDC-2935-40D3-9301-2C09C0311145}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_24b_UserControl", "MVVM_Tutorial\MVVM_24b_UserControl\MVVM_24b_UserControl.csproj", "{F60F7E39-DF2C-4312-B716-32AB33F9FDC5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_24b_UserControl_net", "MVVM_Tutorial\MVVM_24b_UserControl\MVVM_24b_UserControl_net.csproj", "{AF5E30DE-3A4C-4F92-94AE-BA7A7AE80D90}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_24b_UserControl_netTests", "MVVM_Tutorial\MVVM_24b_UserControlTests\MVVM_24b_UserControl_netTests.csproj", "{39951A36-F719-4B6F-AF12-FE9FCCE7B9D3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_24b_UserControlTests", "MVVM_Tutorial\MVVM_24b_UserControlTests\MVVM_24b_UserControlTests.csproj", "{73FEA730-2607-47DA-B719-08CDB81D310B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_24c_CTUserControl", "MVVM_Tutorial\MVVM_24c_CTUserControl\MVVM_24c_CTUserControl.csproj", "{E7855CDF-09F7-4323-BDB7-37B8A1307D69}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_24c_CTUserControl_net", "MVVM_Tutorial\MVVM_24c_CTUserControl\MVVM_24c_CTUserControl_net.csproj", "{8342C992-C2E6-4161-B0E7-1F94469DE733}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_24c_CTUserControl_netTests", "MVVM_Tutorial\MVVM_24c_CTUserControlTests\MVVM_24c_CTUserControl_netTests.csproj", "{2E1E4F8B-875E-4AF1-95F4-2A7D1B1EA3D5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_24c_CTUserControlTests", "MVVM_Tutorial\MVVM_24c_CTUserControlTests\MVVM_24c_CTUserControlTests.csproj", "{601063A2-AA25-405D-82D6-978C25E71D0F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc64_Wpf", "Calc\Calc64_Wpf\Calc64_Wpf.csproj", "{F9B66D4E-DD37-4B50-B704-9FBC1EFC3E7F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VectorGfx", "Games\VectorGfx\VectorGfx.csproj", "{539C39B0-2A0F-4218-ADB9-7C4D73C26C24}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_AllExamples", "MVVM_Tutorial\MVVM_AllExamples\MVVM_AllExamples.csproj", "{D63C4162-1D47-4E0B-947B-4104F5601812}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_AllExamples_net", "MVVM_Tutorial\MVVM_AllExamples\MVVM_AllExamples_net.csproj", "{439F5255-5ABB-4097-A718-9D47615FBB0C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "All_Graphics_net", "Graphics\All_Graphics\All_Graphics_net.csproj", "{9A889644-C632-4CC0-AB47-FF8D14932188}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Basics", "Basics", "{FA8A64D6-C0D5-4AD2-92BB-D2718B9D7D36}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic_Del00_Template", "Basics\Basic_Del00_Template\Basic_Del00_Template.csproj", "{F83B6A40-B596-4A5E-81A3-92565F06BD94}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic_Del00_Template_net", "Basics\Basic_Del00_Template\Basic_Del00_Template_net.csproj", "{7757E901-AE0D-424E-A555-49A7EE8A314F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic_Del00_TemplateTests", "Basics\Basic_Del00_TemplateTests\Basic_Del00_TemplateTests.csproj", "{90DBF676-6543-4845-8A05-2CB5C9425E3F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic_Del00_Template_netTests", "Basics\Basic_Del00_TemplateTests\Basic_Del00_Template_netTests.csproj", "{3C4E2021-48CD-4487-8E4E-54E85EF7C69B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic_Del01_Action", "Basics\Basic_Del01_Action\Basic_Del01_Action.csproj", "{82D37BD6-A8B7-439A-9998-1D38FF8F08BA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic_Del01_Action_net", "Basics\Basic_Del01_Action\Basic_Del01_Action_net.csproj", "{FCE1C83E-5C74-41DF-9C26-775F0BD6AA70}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic_Del01_ActionTests", "Basics\Basic_Del01_ActionTests\Basic_Del01_ActionTests.csproj", "{94375706-915F-42D8-B013-0B888F4DD4B0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic_Del01_Action_netTests", "Basics\Basic_Del01_ActionTests\Basic_Del01_Action_netTests.csproj", "{E12773A9-E9B4-4AB0-AB97-B8291AC29DCC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic_Del02_Filter", "Basics\Basic_Del02_Filter\Basic_Del02_Filter.csproj", "{5B3B245A-5916-4DE7-AF6D-C71C703E0E6E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic_Del02_Filter_net", "Basics\Basic_Del02_Filter\Basic_Del02_Filter_net.csproj", "{6D09848F-E58E-479B-A1E8-7E3F1FF90DA2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic_Del02_FilterTests", "Basics\Basic_Del02_FilterTests\Basic_Del02_FilterTests.csproj", "{90814AD6-B387-49A7-9657-020FB917BE1A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic_Del02_Filter_netTests", "Basics\Basic_Del02_FilterTests\Basic_Del02_Filter_netTests.csproj", "{35C18531-353E-44D7-8516-43105B89E5CB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic_Del03_General", "Basics\Basic_Del03_General\Basic_Del03_General.csproj", "{265F2A9D-E12A-4664-B5C8-C338566DD0FC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic_Del03_General_net", "Basics\Basic_Del03_General\Basic_Del03_General_net.csproj", "{282545E3-0E75-4F5D-BDBA-8C8C74F1CEEE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic_Del03_GeneralTests", "Basics\Basic_Del03_GeneralTests\Basic_Del03_GeneralTests.csproj", "{66171F39-F3B1-4714-BFDB-2040551D3D2E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic_Del03_General_netTests", "Basics\Basic_Del03_GeneralTests\Basic_Del03_General_netTests.csproj", "{085B1327-58FB-4359-A54C-402D3F810079}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic_Del04_TestImposibleStuff", "Basics\Basic_Del04_TestImposibleStuff\Basic_Del04_TestImposibleStuff.csproj", "{7E33210D-6A0F-4DB8-951D-B981BE3CB0C7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic_Del04_TestImposibleStuff_net", "Basics\Basic_Del04_TestImposibleStuff\Basic_Del04_TestImposibleStuff_net.csproj", "{D18EA39C-E0F4-4450-9C27-CB471A424A8E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic_Del04_TestImposibleStuffTests", "Basics\Basic_Del04_TestImposibleStuffTests\Basic_Del04_TestImposibleStuffTests.csproj", "{10AEE6DD-C38F-4CCA-BCFE-AC4B74C75EBF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic_Del04_TestImposibleStuff_netTests", "Basics\Basic_Del04_TestImposibleStuffTests\Basic_Del04_TestImposibleStuff_netTests.csproj", "{0EA31342-17C3-40F4-9717-F64DF27F2C59}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calc32Cons_net", "Calc\Calc32Cons\Calc32Cons_net.csproj", "{21DEBE3D-3302-4CDA-B06A-DB25778CB9E3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Asteroids_net", "Games\Asteroids\Asteroids_net.csproj", "{7F4E5B8E-0C7A-4B3B-B23E-E4360DCE6205}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Asteroids_Base", "Games\Asteroids_Base\Asteroids_Base.csproj", "{B67C74E4-CA8C-4278-A5E5-C1006A9E6837}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreateCards", "Games\CreateCards\CreateCards.csproj", "{1A106E37-21A6-48CC-A2E9-AF3FEDCAD7E2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CsEpiphany", "Games\CsEpiphany\CsEpiphany.csproj", "{F1F988EC-6C2D-4B69-BF67-663D2E051100}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sudoku_Base", "Games\Sudoku_Base\Sudoku_Base.csproj", "{1FC80B87-BC1B-416F-9D3A-47BE111C075D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sudoku_BaseTests", "Games\Sudoku_BaseTests\Sudoku_BaseTests.csproj", "{94933E00-C975-4C62-A596-EE9582030BD0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VectorGfx2", "Games\VectorGfx2\VectorGfx2.csproj", "{0F8B0D00-BC20-4FFC-A7C5-88017A3C09A9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CanvasWPF2_CTItemTemplateSelector", "Graphics\CanvasWPF2_CTItemTemplateSelector\CanvasWPF2_CTItemTemplateSelector.csproj", "{6780EF15-C7DF-4D44-82F6-1B98A05B82B7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CanvasWPF_CT", "Graphics\CanvasWPF_CT\CanvasWPF_CT.csproj", "{A58518A6-7E40-4482-AFD4-4DB7E21FF27C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_Converter_CTDrawGrid", "Graphics\MVVM_Converter_CTDrawGrid\MVVM_Converter_CTDrawGrid.csproj", "{080201E0-7712-4A50-A193-98A562030938}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_Converter_CTDrawGrid2", "Graphics\MVVM_Converter_CTDrawGrid2\MVVM_Converter_CTDrawGrid2.csproj", "{4F746914-FBD4-4AE8-A22F-C1745E21515B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_Converter_CTImgGrid", "Graphics\MVVM_Converter_CTImgGrid\MVVM_Converter_CTImgGrid.csproj", "{9AF5B0F0-DA63-4694-98B0-5496A78EB8CB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_DynamicShape", "Graphics\MVVM_DynamicShape\MVVM_DynamicShape.csproj", "{DFBA72E3-FB45-4D7C-A1DE-993D984E7034}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_ImageHandling", "Graphics\MVVM_ImageHandling\MVVM_ImageHandling.csproj", "{2691FC24-086E-417A-84EE-11C481308D4C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_ImageHandling_net", "Graphics\MVVM_ImageHandling\MVVM_ImageHandling_net.csproj", "{9539BC5F-7B48-4E69-8603-703EA84CFE87}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_ImageHandlingTests", "Graphics\MVVM_ImageHandlingTests\MVVM_ImageHandlingTests.csproj", "{697BA3B9-7180-4CE7-98BA-A480770D58AF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_ImageHandling_netTests", "Graphics\MVVM_ImageHandlingTests\MVVM_ImageHandling_netTests.csproj", "{0EB38D32-4706-4C70-8685-4A770322346B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Polyline2", "Graphics\Polyline\Polyline2.csproj", "{3C3B3D15-789A-40C4-AEC0-0B149194BDFA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PolySpline", "Graphics\PolySpline\PolySpline.csproj", "{A01D6EFA-196F-4790-AE91-0976D747282C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PolySpline2", "Graphics\PolySpline\PolySpline2.csproj", "{4E5EC963-1D95-4962-8201-F4D84EA26ED2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PolySpline_net", "Graphics\PolySpline\PolySpline_net.csproj", "{DD2F361F-94AB-4494-A8D1-E69AB68F2FD6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TitleGen2", "Graphics\TitleGen2\TitleGen2.csproj", "{B096AA61-812C-429B-92FF-0C3C7F66F05E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSFreeVision", "Libraries\CSFreeVision_\CSFreeVision.csproj", "{B3315091-13D9-4A5C-B4B0-CAF2AF74F371}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DXMauiApp1", "Mobile\DXMauiApp1\DXMauiApp1.csproj", "{EC1576F4-261B-4040-95D2-9BED62AD48EF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ItemsControlTut3", "MVVM_Tutorial\ItemsControlTut3\ItemsControlTut3.csproj", "{A3768550-A438-4E87-9547-FBA625FB8353}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ItemsControlTut4", "MVVM_Tutorial\ItemsControlTut4\ItemsControlTut4.csproj", "{088072CE-7129-4A2B-8A69-E4A2CFB39EDF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_00_IoCTemplate", "MVVM_Tutorial\MVVM_00_IoCTemplate\MVVM_00_IoCTemplate.csproj", "{9E283327-123E-4495-9142-6A27F55282D5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_00_IoCTemplate_net", "MVVM_Tutorial\MVVM_00_IoCTemplate\MVVM_00_IoCTemplate_net.csproj", "{5FD51DF6-E318-4A52-BECE-B95AFF9AF762}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_00_IoCTemplateTests", "MVVM_Tutorial\MVVM_00_IoCTemplateTests\MVVM_00_IoCTemplateTests.csproj", "{58207E90-49F7-4241-BA38-B4997E04E667}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_00_IoCTemplate_netTests", "MVVM_Tutorial\MVVM_00_IoCTemplateTests\MVVM_00_IoCTemplate_netTests.csproj", "{9B7A791A-725E-40E4-A885-F1FFAFE88612}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_06_Converters_net", "MVVM_Tutorial\MVVM_06_Converters\MVVM_06_Converters_net.csproj", "{6C2391E4-15F3-40CF-8C16-787066E8017C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_06_Converters_2_net", "MVVM_Tutorial\MVVM_06_Converters_2\MVVM_06_Converters_2_net.csproj", "{930FEF59-7A4C-49DA-B522-1D7C8D56F58E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_06_Converters_3_net", "MVVM_Tutorial\MVVM_06_Converters_3\MVVM_06_Converters_3_net.csproj", "{4DC2FB97-A1C0-4085-932B-7D87D1C2CCDE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_06_Converters_3Tests", "MVVM_Tutorial\MVVM_06_Converters_3Tests\MVVM_06_Converters_3Tests.csproj", "{060BF9A0-030F-4C50-91F8-76DAC3F43636}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_06_Converters_3_netTests", "MVVM_Tutorial\MVVM_06_Converters_3Tests\MVVM_06_Converters_3_netTests.csproj", "{F15A392F-762C-4CFB-92BF-E76572E332CD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_06_Converters_4_netTests", "MVVM_Tutorial\MVVM_06_Converters_4Tests\MVVM_06_Converters_4_netTests.csproj", "{E1F3468D-208F-49B8-966B-76C807CE01AD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_09a_CTDialogBoxes", "MVVM_Tutorial\MVVM_09a_CTDialogBoxes\MVVM_09a_CTDialogBoxes.csproj", "{89E47DE5-D2EA-4666-8E1F-CEE8C80303C3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_09a_CTDialogBoxes_net", "MVVM_Tutorial\MVVM_09a_CTDialogBoxes\MVVM_09a_CTDialogBoxes_net.csproj", "{0EAD75CE-B86D-4F52-8B8B-D49F4F4CED29}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_09a_CTDialogBoxesTests", "MVVM_Tutorial\MVVM_09a_CTDialogBoxesTests\MVVM_09a_CTDialogBoxesTests.csproj", "{58271805-C59E-45FB-9D7B-CBAFC7BDF66C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_09a_CTDialogBoxes_netTests", "MVVM_Tutorial\MVVM_09a_CTDialogBoxesTests\MVVM_09a_CTDialogBoxes_netTests.csproj", "{DE5EC147-0305-459E-9FDF-CCE514A239D1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_17_1_CSV_Laden_net", "MVVM_Tutorial\MVVM_17_1_CSV_Laden\MVVM_17_1_CSV_Laden_net.csproj", "{DD8A60AD-D7A9-438F-985E-083132466AC6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_18_MultiConverters_net", "MVVM_Tutorial\MVVM_18_MultiConverters\MVVM_18_MultiConverters_net.csproj", "{2F665879-8865-4765-A03C-FFE2D0D6E734}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_20a_CTSysdialogs", "MVVM_Tutorial\MVVM_20a_CTSysdialogs\MVVM_20a_CTSysdialogs.csproj", "{37896C82-24DF-4FED-8A44-537910360A40}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_20a_CTSysdialogs_net", "MVVM_Tutorial\MVVM_20a_CTSysdialogs\MVVM_20a_CTSysdialogs_net.csproj", "{B4533FEF-E9CF-4E3B-AAB6-DC72C5EB90DD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_20a_CTSysdialogsTests", "MVVM_Tutorial\MVVM_20a_CTSysdialogsTests\MVVM_20a_CTSysdialogsTests.csproj", "{6878680C-37EA-4715-BDF0-7E1143ED0998}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_20a_CTSysdialogs_netTests", "MVVM_Tutorial\MVVM_20a_CTSysdialogsTests\MVVM_20a_CTSysdialogs_netTests.csproj", "{B9817971-4FA0-4B25-9482-77B5A3A971DC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_20_Sysdialogs_net", "MVVM_Tutorial\MVVM_20_Sysdialogs\MVVM_20_Sysdialogs_net.csproj", "{8F1382A8-7B0F-4A8D-AC0A-1F6C293C6847}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_20_Sysdialogs_netTests", "MVVM_Tutorial\MVVM_20_SysdialogsTests\MVVM_20_Sysdialogs_netTests.csproj", "{B0D0BAA9-B6B2-49A4-B08C-F16D7EE65570}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_22_CTWpfCap", "MVVM_Tutorial\MVVM_22_CTWpfCap\MVVM_22_CTWpfCap.csproj", "{9DABFD9F-EC4C-42A1-B744-00F3E0AFF2B8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_22_CTWpfCap_net", "MVVM_Tutorial\MVVM_22_CTWpfCap\MVVM_22_CTWpfCap_net.csproj", "{FB5ABFC7-A493-4F10-B4C9-3E7E44EFC9B9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_22_CTWpfCapTests", "MVVM_Tutorial\MVVM_22_CTWpfCapTests\MVVM_22_CTWpfCapTests.csproj", "{E56B344E-3F12-4FF8-B46C-9D87A5512E72}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_22_CTWpfCap_netTests", "MVVM_Tutorial\MVVM_22_CTWpfCapTests\MVVM_22_CTWpfCap_netTests.csproj", "{EC0C2649-5F1C-4AF6-BC4C-53D1FF9A1BD7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_22_WpfCap_netTests", "MVVM_Tutorial\MVVM_22_WpfCapTests\MVVM_22_WpfCap_netTests.csproj", "{C5C81D9D-27CD-4F23-B660-903AFDDD7B71}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_25_RichTextEdit", "MVVM_Tutorial\MVVM_25_RichTextEdit\MVVM_25_RichTextEdit.csproj", "{C3309B6A-0512-4C93-B472-CF6A10ED8682}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_25_RichTextEdit_net", "MVVM_Tutorial\MVVM_25_RichTextEdit\MVVM_25_RichTextEdit_net.csproj", "{629A1C79-7DE4-4EFC-8D34-ED1809AD5888}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_25_RichTextEditTests", "MVVM_Tutorial\MVVM_25_RichTextEditTests\MVVM_25_RichTextEditTests.csproj", "{40145A2C-6E76-4069-99D8-FFF3CF0CF3BC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_25_RichTextEdit_netTests", "MVVM_Tutorial\MVVM_25_RichTextEditTests\MVVM_25_RichTextEdit_netTests.csproj", "{0E72DA6A-5D09-45F5-AD77-39A92B00A9CF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_26_BindingGroupExp_net", "MVVM_Tutorial\MVVM_26_BindingGroupExp\MVVM_26_BindingGroupExp_net.csproj", "{98A129AB-0FF8-4B07-8516-DA23AB5C8735}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_31a_CTValidation1Tests", "MVVM_Tutorial\MVVM_31a_CTValidation1Tests\MVVM_31a_CTValidation1Tests.csproj", "{B8972679-FDC1-4998-A18D-E501EFFA467D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_40_Wizzard", "MVVM_Tutorial\MVVM_40_Wizzard\MVVM_40_Wizzard.csproj", "{6CDA732B-10A8-441E-A243-F83BA89ED1F6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_40_Wizzard_net", "MVVM_Tutorial\MVVM_40_Wizzard\MVVM_40_Wizzard_net.csproj", "{D8C0C69F-EF4F-4883-972E-C2E6B6A9566E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_40_WizzardTests", "MVVM_Tutorial\MVVM_40_WizzardTests\MVVM_40_WizzardTests.csproj", "{90AA75BA-134C-4E62-B3A5-E7DB05DF12FC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_40_Wizzard_netTests", "MVVM_Tutorial\MVVM_40_WizzardTests\MVVM_40_Wizzard_netTests.csproj", "{2BF08C83-C802-45A8-8219-FC77B3B9CB06}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_41_Sudoku", "MVVM_Tutorial\MVVM_41_Sudoku\MVVM_41_Sudoku.csproj", "{81CB1F26-4C07-4B9F-A695-AB810B38E15B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_41_Sudoku_net", "MVVM_Tutorial\MVVM_41_Sudoku\MVVM_41_Sudoku_net.csproj", "{47A2307D-717C-4ABA-8FBD-9717B0C4CC8C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_41_SudokuTests", "MVVM_Tutorial\MVVM_41_SudokuTests\MVVM_41_SudokuTests.csproj", "{7DE4615E-0E42-4C72-8B63-AFE151321024}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_41_Sudoku_netTests", "MVVM_Tutorial\MVVM_41_SudokuTests\MVVM_41_Sudoku_netTests.csproj", "{42EA49AE-5C87-4C75-83EF-964D4B24E9E9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_AllExamplesTests", "MVVM_Tutorial\MVVM_AllExamplesTests\MVVM_AllExamplesTests.csproj", "{75423717-B64A-4EAC-9762-CD17A2F60857}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVM_AllExamples_netTests", "MVVM_Tutorial\MVVM_AllExamplesTests\MVVM_AllExamples_netTests.csproj", "{687EFF77-3468-444D-A410-1B76E41E74FC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SomeThing", "SomeThing", "{72BE345F-8168-4D28-895C-2A22010B39C8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Quine1", "SomeThing\Quine1\Quine1.csproj", "{CC31DD38-B57D-4A71-9681-E9D7DDFB8909}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Quine2", "SomeThing\Quine2\Quine2.csproj", "{B57AAB4C-0BA8-46B9-B365-F941A54F4DEF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Quine3", "SomeThing\Quine3\Quine3.csproj", "{4879406D-8F0C-4EDF-A7EB-CB549E510E03}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Web", "Web", "{37C1201C-8936-4BAC-9BA1-7B8CAB87BD60}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorApp1", "Web\BlazorApp1\BlazorApp1.csproj", "{FBB68F44-CD6D-4FA3-9889-99FB5F4AD1B3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorWasmDocker", "Web\BlazorWasmDocker\BlazorWasmDocker.csproj", "{DE121B38-5563-463D-B4B0-0817E75F4DDB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MyComponent", "MyComponent", "{827CB9D9-EE91-47E1-BCF3-3DAC2C45EE57}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyComponent.Client", "Web\MyComponent\Client\MyComponent.Client.csproj", "{391D26F2-FAFB-4113-9C80-4DA54BCE5D4A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyComponent.Server", "Web\MyComponent\Server\MyComponent.Server.csproj", "{4E1FFFE6-8379-4029-BBD1-D5BF07155B53}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyComponent", "Web\MyComponent\Shared\MyComponent.csproj", "{8367766D-033A-4555-96CC-008097F45322}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebApp1", "WebApp1", "{13184138-9F85-45CA-8724-EB5F73BF1E88}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorApp2", "Web\WebApp1\BlazorApp2\BlazorApp2.csproj", "{EB7BCC64-FB2A-4056-9492-7A9E83E9A20D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebApplication1", "WebApplication1", "{CD09576B-CA67-4215-8D29-90D819ECD8CA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplication1", "Web\WebApp1\WebApplication1\WebApplication1\WebApplication1.csproj", "{ACE93123-C4B4-462B-8E2C-7AF39D582D5C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WinUI", "WinUI", "{A7AA5940-00E1-4F63-B85A-90BF6A35EA05}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "App1", "App1", "{CCA2402F-A792-4073-A56F-F5F5712CCCBE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App1", "WinUI\App1\App1\App1.csproj", "{478F2C43-61F7-4839-8300-7E42F902BE24}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WPFSamples_2", "WPFSamples_2", "{174E6CB9-42E1-4C99-B8EF-A2C1F426758D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_AnimationTiming", "WPFSamples_2\WPF_AnimationTiming\WPF_AnimationTiming.csproj", "{57702A90-DD4A-491E-9899-AAC9CBFEDB19}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_AnimationTiming_net", "WPFSamples_2\WPF_AnimationTiming\WPF_AnimationTiming_net.csproj", "{099012D1-51F4-4FD7-927B-53D3E5269576}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_AnimationTimingTests", "WPFSamples_2\WPF_AnimationTimingTests\WPF_AnimationTimingTests.csproj", "{E3CDDC1A-54FA-40F2-B468-9BB11DAB3306}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_AnimationTiming_netTests", "WPFSamples_2\WPF_AnimationTimingTests\WPF_AnimationTiming_netTests.csproj", "{CDF0A42D-F719-433A-BFE1-F1AFAF666C14}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_Complex_Layout", "WPFSamples_2\WPF_Complex_Layout\WPF_Complex_Layout.csproj", "{6F0971DF-51B3-4469-AD54-2F442B0FB00E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_Complex_Layout_net", "WPFSamples_2\WPF_Complex_Layout\WPF_Complex_Layout_net.csproj", "{C58BDB0C-EB28-4557-8EE2-395BD77942C1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_Complex_LayoutTests", "WPFSamples_2\WPF_Complex_LayoutTests\WPF_Complex_LayoutTests.csproj", "{38A0DA4D-D22F-4048-B5E8-342BDF854B54}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_Complex_Layout_netTests", "WPFSamples_2\WPF_Complex_LayoutTests\WPF_Complex_Layout_netTests.csproj", "{E4CAC766-8074-4B42-9B16-184D932F3408}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_ControlsAndLayout", "WPFSamples_2\WPF_ControlsAndLayout\WPF_ControlsAndLayout.csproj", "{17B00D17-B20D-4F71-AB1C-C67626FA4D0C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_ControlsAndLayout_net", "WPFSamples_2\WPF_ControlsAndLayout\WPF_ControlsAndLayout_net.csproj", "{19BC952C-53F6-4B84-AD7F-6F9E28F97554}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_ControlsAndLayoutTests", "WPFSamples_2\WPF_ControlsAndLayoutTests\WPF_ControlsAndLayoutTests.csproj", "{D66363A1-E012-4AE2-9013-5F1E6403FCA6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_ControlsAndLayout_netTests", "WPFSamples_2\WPF_ControlsAndLayoutTests\WPF_ControlsAndLayout_netTests.csproj", "{1FFC4F00-BC1E-4BDE-8EDE-556242FBD9DE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_CustomAnimation", "WPFSamples_2\WPF_CustomAnimation\WPF_CustomAnimation.csproj", "{A552D855-105F-417A-B67F-2BD706DD4B35}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_CustomAnimation_net", "WPFSamples_2\WPF_CustomAnimation\WPF_CustomAnimation_net.csproj", "{6DBAA1BB-CADC-41DC-A031-7D04998A3C3C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_CustomAnimationTests", "WPFSamples_2\WPF_CustomAnimationTests\WPF_CustomAnimationTests.csproj", "{7FA0EBBC-BCD4-4BA5-B41E-20C3F5AEDC22}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_CustomAnimation_netTests", "WPFSamples_2\WPF_CustomAnimationTests\WPF_CustomAnimation_netTests.csproj", "{2B4A587F-EC45-4AA3-9AED-1DA68DF99A76}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_Hello_World", "WPFSamples_2\WPF_Hello_World\WPF_Hello_World.csproj", "{32B2D17F-E82C-4D69-9B1B-68F959ED08C3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_Hello_World_net", "WPFSamples_2\WPF_Hello_World\WPF_Hello_World_net.csproj", "{40C44475-D7F3-4213-AB55-3457B9E73AF6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_Hello_WorldTests", "WPFSamples_2\WPF_Hello_WorldTests\WPF_Hello_WorldTests.csproj", "{269BEB2E-4039-47CF-9D17-3205FAFBFA1B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_Hello_World_netTests", "WPFSamples_2\WPF_Hello_WorldTests\WPF_Hello_World_netTests.csproj", "{2B7C81F3-DB44-4C2F-BA0C-C2EFDEF10DBC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_MasterDetail", "WPFSamples_2\WPF_MasterDetail\WPF_MasterDetail.csproj", "{86C55577-0C7D-4111-8C58-7243E198A485}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_MasterDetail_net", "WPFSamples_2\WPF_MasterDetail\WPF_MasterDetail_net.csproj", "{2BE7DBA4-0FF3-47B8-B0A4-DD6B3ED6817A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_MasterDetailTests", "WPFSamples_2\WPF_MasterDetailTests\WPF_MasterDetailTests.csproj", "{FB785377-9D97-4827-B9CA-683387546932}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_MasterDetail_netTests", "WPFSamples_2\WPF_MasterDetailTests\WPF_MasterDetail_netTests.csproj", "{1F06EADA-A052-4EB9-AED7-0A90B37101C4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_MoveWindow", "WPFSamples_2\WPF_MoveWindow\WPF_MoveWindow.csproj", "{0E4A2F12-3CCC-4DA6-8238-77C65CA28F8B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_MoveWindow_net", "WPFSamples_2\WPF_MoveWindow\WPF_MoveWindow_net.csproj", "{0A788F08-4455-4D23-BFAB-C090E3A7E2A0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_MoveWindowTests", "WPFSamples_2\WPF_MoveWindowTests\WPF_MoveWindowTests.csproj", "{F4EEFFF0-B23F-469D-AC76-7E177BEBC5EA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_MoveWindow_netTests", "WPFSamples_2\WPF_MoveWindowTests\WPF_MoveWindow_netTests.csproj", "{878163F4-66EA-46E2-8E8D-C27C78263646}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_Sample_Template", "WPFSamples_2\WPF_Sample_Template\WPF_Sample_Template.csproj", "{52849341-E18B-49ED-BDD9-48F8ECE74C01}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_Sample_Template_net", "WPFSamples_2\WPF_Sample_Template\WPF_Sample_Template_net.csproj", "{25DDCBE1-6F72-4F34-8EF9-62520D3001EC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_Sample_TemplateTests", "WPFSamples_2\WPF_Sample_TemplateTests\WPF_Sample_TemplateTests.csproj", "{6C12AC56-C401-4194-8F45-991EF49B575C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_Sample_Template_netTests", "WPFSamples_2\WPF_Sample_TemplateTests\WPF_Sample_Template_netTests.csproj", "{5B8FCA4C-7CEE-4376-A760-67B387BE3589}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_StickyNotesDemo", "WPFSamples_2\WPF_StickyNotesDemo\WPF_StickyNotesDemo.csproj", "{BEE6C172-A184-4BFB-9591-3C0675A1AF96}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_StickyNotesDemo_net", "WPFSamples_2\WPF_StickyNotesDemo\WPF_StickyNotesDemo_net.csproj", "{E072D6A6-758E-4ABD-9B45-6A1FD8C35BAF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_StickyNotesDemoTests", "WPFSamples_2\WPF_StickyNotesDemoTests\WPF_StickyNotesDemoTests.csproj", "{C4C9533A-06C5-48CD-88DC-A1E7A81228E0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF_StickyNotesDemo_netTests", "WPFSamples_2\WPF_StickyNotesDemoTests\WPF_StickyNotesDemo_netTests.csproj", "{75BC162C-D512-4027-8665-FD5420ACB863}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -381,10 +1091,6 @@ Global {4BCC197C-7F28-4F6E-B831-D02BE0ABE839}.Debug|Any CPU.Build.0 = Debug|Any CPU {4BCC197C-7F28-4F6E-B831-D02BE0ABE839}.Release|Any CPU.ActiveCfg = Release|Any CPU {4BCC197C-7F28-4F6E-B831-D02BE0ABE839}.Release|Any CPU.Build.0 = Release|Any CPU - {AFCEC61D-9C18-49E5-94AE-17429BB06C78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AFCEC61D-9C18-49E5-94AE-17429BB06C78}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AFCEC61D-9C18-49E5-94AE-17429BB06C78}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AFCEC61D-9C18-49E5-94AE-17429BB06C78}.Release|Any CPU.Build.0 = Release|Any CPU {98D9C22F-ED66-4219-B6B8-8E38A04F9771}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {98D9C22F-ED66-4219-B6B8-8E38A04F9771}.Debug|Any CPU.Build.0 = Debug|Any CPU {98D9C22F-ED66-4219-B6B8-8E38A04F9771}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -500,46 +1206,22 @@ Global {34D5A083-6197-4603-93C0-539158579DAB}.Debug|Any CPU.Build.0 = Debug|Any CPU {34D5A083-6197-4603-93C0-539158579DAB}.Release|Any CPU.ActiveCfg = Release|Any CPU {34D5A083-6197-4603-93C0-539158579DAB}.Release|Any CPU.Build.0 = Release|Any CPU - {C14E9E4A-49DB-4DC2-AEA7-FD667B54237E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C14E9E4A-49DB-4DC2-AEA7-FD667B54237E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C14E9E4A-49DB-4DC2-AEA7-FD667B54237E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C14E9E4A-49DB-4DC2-AEA7-FD667B54237E}.Release|Any CPU.Build.0 = Release|Any CPU - {65DEC645-28C3-465C-B0D3-C81CEC2B40BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {65DEC645-28C3-465C-B0D3-C81CEC2B40BA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {65DEC645-28C3-465C-B0D3-C81CEC2B40BA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {65DEC645-28C3-465C-B0D3-C81CEC2B40BA}.Release|Any CPU.Build.0 = Release|Any CPU {5F710E80-7C09-477E-B606-B7ECDDED5FAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5F710E80-7C09-477E-B606-B7ECDDED5FAC}.Debug|Any CPU.Build.0 = Debug|Any CPU {5F710E80-7C09-477E-B606-B7ECDDED5FAC}.Release|Any CPU.ActiveCfg = Release|Any CPU {5F710E80-7C09-477E-B606-B7ECDDED5FAC}.Release|Any CPU.Build.0 = Release|Any CPU - {EE09911D-3228-43D9-9F90-29709A9A8A46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EE09911D-3228-43D9-9F90-29709A9A8A46}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EE09911D-3228-43D9-9F90-29709A9A8A46}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EE09911D-3228-43D9-9F90-29709A9A8A46}.Release|Any CPU.Build.0 = Release|Any CPU - {DCB63416-79C7-4782-8C87-4FA60270D46A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DCB63416-79C7-4782-8C87-4FA60270D46A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DCB63416-79C7-4782-8C87-4FA60270D46A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DCB63416-79C7-4782-8C87-4FA60270D46A}.Release|Any CPU.Build.0 = Release|Any CPU - {9055DF3D-525F-4258-A5A6-9BCF861EF590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9055DF3D-525F-4258-A5A6-9BCF861EF590}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9055DF3D-525F-4258-A5A6-9BCF861EF590}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9055DF3D-525F-4258-A5A6-9BCF861EF590}.Release|Any CPU.Build.0 = Release|Any CPU {752917E2-0A8D-4B39-8786-76F1EF9426AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {752917E2-0A8D-4B39-8786-76F1EF9426AF}.Debug|Any CPU.Build.0 = Debug|Any CPU {752917E2-0A8D-4B39-8786-76F1EF9426AF}.Release|Any CPU.ActiveCfg = Release|Any CPU {752917E2-0A8D-4B39-8786-76F1EF9426AF}.Release|Any CPU.Build.0 = Release|Any CPU + {AFCEC61D-9C18-49E5-94AE-17429BB06C78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AFCEC61D-9C18-49E5-94AE-17429BB06C78}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AFCEC61D-9C18-49E5-94AE-17429BB06C78}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AFCEC61D-9C18-49E5-94AE-17429BB06C78}.Release|Any CPU.Build.0 = Release|Any CPU {D32FA801-F7D2-42DA-A2FA-B3453E61243E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D32FA801-F7D2-42DA-A2FA-B3453E61243E}.Debug|Any CPU.Build.0 = Debug|Any CPU {D32FA801-F7D2-42DA-A2FA-B3453E61243E}.Release|Any CPU.ActiveCfg = Release|Any CPU {D32FA801-F7D2-42DA-A2FA-B3453E61243E}.Release|Any CPU.Build.0 = Release|Any CPU - {36470BF0-3F84-4D7D-A87B-E51ED1A42035}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {36470BF0-3F84-4D7D-A87B-E51ED1A42035}.Debug|Any CPU.Build.0 = Debug|Any CPU - {36470BF0-3F84-4D7D-A87B-E51ED1A42035}.Release|Any CPU.ActiveCfg = Release|Any CPU - {36470BF0-3F84-4D7D-A87B-E51ED1A42035}.Release|Any CPU.Build.0 = Release|Any CPU - {026CCC3A-C677-434B-997A-030886044B32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {026CCC3A-C677-434B-997A-030886044B32}.Debug|Any CPU.Build.0 = Debug|Any CPU - {026CCC3A-C677-434B-997A-030886044B32}.Release|Any CPU.ActiveCfg = Release|Any CPU - {026CCC3A-C677-434B-997A-030886044B32}.Release|Any CPU.Build.0 = Release|Any CPU {D6A4B6AE-F401-4CBF-8DAF-541B9B46B5F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D6A4B6AE-F401-4CBF-8DAF-541B9B46B5F6}.Debug|Any CPU.Build.0 = Debug|Any CPU {D6A4B6AE-F401-4CBF-8DAF-541B9B46B5F6}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -600,12 +1282,6 @@ Global {B94BA22F-CDEF-4EB5-83EA-D87D3C2E4483}.Debug|Any CPU.Build.0 = Debug|Any CPU {B94BA22F-CDEF-4EB5-83EA-D87D3C2E4483}.Release|Any CPU.ActiveCfg = Release|Any CPU {B94BA22F-CDEF-4EB5-83EA-D87D3C2E4483}.Release|Any CPU.Build.0 = Release|Any CPU - {7FCCCBC8-4B1D-49CE-8CC1-AB02A0DC2E52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7FCCCBC8-4B1D-49CE-8CC1-AB02A0DC2E52}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7FCCCBC8-4B1D-49CE-8CC1-AB02A0DC2E52}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {7FCCCBC8-4B1D-49CE-8CC1-AB02A0DC2E52}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7FCCCBC8-4B1D-49CE-8CC1-AB02A0DC2E52}.Release|Any CPU.Build.0 = Release|Any CPU - {7FCCCBC8-4B1D-49CE-8CC1-AB02A0DC2E52}.Release|Any CPU.Deploy.0 = Release|Any CPU {13662848-3BDB-4119-BF5D-D58EA0F8026E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {13662848-3BDB-4119-BF5D-D58EA0F8026E}.Debug|Any CPU.Build.0 = Debug|Any CPU {13662848-3BDB-4119-BF5D-D58EA0F8026E}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -896,6 +1572,1290 @@ Global {D1461ADD-B8EC-4F72-B3B1-4202EC6DB1B9}.Debug|Any CPU.Build.0 = Debug|Any CPU {D1461ADD-B8EC-4F72-B3B1-4202EC6DB1B9}.Release|Any CPU.ActiveCfg = Release|Any CPU {D1461ADD-B8EC-4F72-B3B1-4202EC6DB1B9}.Release|Any CPU.Build.0 = Release|Any CPU + {20E5E7E6-0191-4EBF-BBD7-8A7EF7E32778}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {20E5E7E6-0191-4EBF-BBD7-8A7EF7E32778}.Debug|Any CPU.Build.0 = Debug|Any CPU + {20E5E7E6-0191-4EBF-BBD7-8A7EF7E32778}.Release|Any CPU.ActiveCfg = Release|Any CPU + {20E5E7E6-0191-4EBF-BBD7-8A7EF7E32778}.Release|Any CPU.Build.0 = Release|Any CPU + {1EC15DBC-47F1-4268-99AF-E8CD46ECC7FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1EC15DBC-47F1-4268-99AF-E8CD46ECC7FB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1EC15DBC-47F1-4268-99AF-E8CD46ECC7FB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1EC15DBC-47F1-4268-99AF-E8CD46ECC7FB}.Release|Any CPU.Build.0 = Release|Any CPU + {A8EF5884-AD1D-4A72-9FBB-87677F4F22A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A8EF5884-AD1D-4A72-9FBB-87677F4F22A5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A8EF5884-AD1D-4A72-9FBB-87677F4F22A5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A8EF5884-AD1D-4A72-9FBB-87677F4F22A5}.Release|Any CPU.Build.0 = Release|Any CPU + {3C09ADED-DB10-4E3D-AC4E-D0E314638E1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3C09ADED-DB10-4E3D-AC4E-D0E314638E1F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3C09ADED-DB10-4E3D-AC4E-D0E314638E1F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3C09ADED-DB10-4E3D-AC4E-D0E314638E1F}.Release|Any CPU.Build.0 = Release|Any CPU + {CBE80569-113E-4FFF-A00C-230CBB120934}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CBE80569-113E-4FFF-A00C-230CBB120934}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CBE80569-113E-4FFF-A00C-230CBB120934}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CBE80569-113E-4FFF-A00C-230CBB120934}.Release|Any CPU.Build.0 = Release|Any CPU + {9A36CBEB-BDAF-4FE8-B4A9-604C71110A8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9A36CBEB-BDAF-4FE8-B4A9-604C71110A8E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9A36CBEB-BDAF-4FE8-B4A9-604C71110A8E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9A36CBEB-BDAF-4FE8-B4A9-604C71110A8E}.Release|Any CPU.Build.0 = Release|Any CPU + {B405793C-2446-4427-9329-034518031CD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B405793C-2446-4427-9329-034518031CD7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B405793C-2446-4427-9329-034518031CD7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B405793C-2446-4427-9329-034518031CD7}.Release|Any CPU.Build.0 = Release|Any CPU + {BE9DA1B8-3DD8-4A87-8ED8-4DF0940796FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BE9DA1B8-3DD8-4A87-8ED8-4DF0940796FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BE9DA1B8-3DD8-4A87-8ED8-4DF0940796FC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BE9DA1B8-3DD8-4A87-8ED8-4DF0940796FC}.Release|Any CPU.Build.0 = Release|Any CPU + {305696C7-1982-47BF-96F5-972AE87FFD17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {305696C7-1982-47BF-96F5-972AE87FFD17}.Debug|Any CPU.Build.0 = Debug|Any CPU + {305696C7-1982-47BF-96F5-972AE87FFD17}.Release|Any CPU.ActiveCfg = Release|Any CPU + {305696C7-1982-47BF-96F5-972AE87FFD17}.Release|Any CPU.Build.0 = Release|Any CPU + {9BF13892-7211-42C7-ACD7-C09935B8312C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9BF13892-7211-42C7-ACD7-C09935B8312C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9BF13892-7211-42C7-ACD7-C09935B8312C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9BF13892-7211-42C7-ACD7-C09935B8312C}.Release|Any CPU.Build.0 = Release|Any CPU + {7C8A171D-3BF7-4F01-8724-1118D2E9FAFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7C8A171D-3BF7-4F01-8724-1118D2E9FAFD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7C8A171D-3BF7-4F01-8724-1118D2E9FAFD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7C8A171D-3BF7-4F01-8724-1118D2E9FAFD}.Release|Any CPU.Build.0 = Release|Any CPU + {F53F1115-0D15-4B79-9722-CA71DD2E43EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F53F1115-0D15-4B79-9722-CA71DD2E43EB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F53F1115-0D15-4B79-9722-CA71DD2E43EB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F53F1115-0D15-4B79-9722-CA71DD2E43EB}.Release|Any CPU.Build.0 = Release|Any CPU + {EA6952FA-31F7-4112-851C-CECDFB7E1857}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EA6952FA-31F7-4112-851C-CECDFB7E1857}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EA6952FA-31F7-4112-851C-CECDFB7E1857}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EA6952FA-31F7-4112-851C-CECDFB7E1857}.Release|Any CPU.Build.0 = Release|Any CPU + {9C23F0AB-C5AF-4179-9D42-52B195E7F8A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9C23F0AB-C5AF-4179-9D42-52B195E7F8A4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C23F0AB-C5AF-4179-9D42-52B195E7F8A4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9C23F0AB-C5AF-4179-9D42-52B195E7F8A4}.Release|Any CPU.Build.0 = Release|Any CPU + {5DBE8E36-A918-4820-91AA-8D81B9BB672C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5DBE8E36-A918-4820-91AA-8D81B9BB672C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5DBE8E36-A918-4820-91AA-8D81B9BB672C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5DBE8E36-A918-4820-91AA-8D81B9BB672C}.Release|Any CPU.Build.0 = Release|Any CPU + {1652863C-5971-42D9-80B4-4A1304249B06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1652863C-5971-42D9-80B4-4A1304249B06}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1652863C-5971-42D9-80B4-4A1304249B06}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1652863C-5971-42D9-80B4-4A1304249B06}.Release|Any CPU.Build.0 = Release|Any CPU + {C8FFB08D-A763-467E-ABCB-FCF7EFDDC54A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C8FFB08D-A763-467E-ABCB-FCF7EFDDC54A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C8FFB08D-A763-467E-ABCB-FCF7EFDDC54A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C8FFB08D-A763-467E-ABCB-FCF7EFDDC54A}.Release|Any CPU.Build.0 = Release|Any CPU + {BD61CECD-C220-4743-BE06-F5E864878644}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BD61CECD-C220-4743-BE06-F5E864878644}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BD61CECD-C220-4743-BE06-F5E864878644}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BD61CECD-C220-4743-BE06-F5E864878644}.Release|Any CPU.Build.0 = Release|Any CPU + {E0344ED7-E92C-4EF0-BF33-D72C47536AFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E0344ED7-E92C-4EF0-BF33-D72C47536AFA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E0344ED7-E92C-4EF0-BF33-D72C47536AFA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E0344ED7-E92C-4EF0-BF33-D72C47536AFA}.Release|Any CPU.Build.0 = Release|Any CPU + {0D2CBEEF-92E9-4150-8F62-003397757AD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0D2CBEEF-92E9-4150-8F62-003397757AD3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0D2CBEEF-92E9-4150-8F62-003397757AD3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0D2CBEEF-92E9-4150-8F62-003397757AD3}.Release|Any CPU.Build.0 = Release|Any CPU + {75646623-EE05-4B2B-BF1B-63D9A2ACDF3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {75646623-EE05-4B2B-BF1B-63D9A2ACDF3E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {75646623-EE05-4B2B-BF1B-63D9A2ACDF3E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {75646623-EE05-4B2B-BF1B-63D9A2ACDF3E}.Release|Any CPU.Build.0 = Release|Any CPU + {6B78EB3B-7A0A-45E1-9DEE-8E96BF31290C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6B78EB3B-7A0A-45E1-9DEE-8E96BF31290C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6B78EB3B-7A0A-45E1-9DEE-8E96BF31290C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6B78EB3B-7A0A-45E1-9DEE-8E96BF31290C}.Release|Any CPU.Build.0 = Release|Any CPU + {3B41B91C-28F1-46B7-9739-0A125221C7DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B41B91C-28F1-46B7-9739-0A125221C7DB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B41B91C-28F1-46B7-9739-0A125221C7DB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B41B91C-28F1-46B7-9739-0A125221C7DB}.Release|Any CPU.Build.0 = Release|Any CPU + {37FD19C9-2F73-4369-AF39-16EA4B2BDE2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {37FD19C9-2F73-4369-AF39-16EA4B2BDE2A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {37FD19C9-2F73-4369-AF39-16EA4B2BDE2A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {37FD19C9-2F73-4369-AF39-16EA4B2BDE2A}.Release|Any CPU.Build.0 = Release|Any CPU + {6705D5D9-994E-44F8-A016-824DFEC7ACC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6705D5D9-994E-44F8-A016-824DFEC7ACC2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6705D5D9-994E-44F8-A016-824DFEC7ACC2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6705D5D9-994E-44F8-A016-824DFEC7ACC2}.Release|Any CPU.Build.0 = Release|Any CPU + {2E79F7C1-392F-4C68-9E94-8C6ABA79BC19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2E79F7C1-392F-4C68-9E94-8C6ABA79BC19}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2E79F7C1-392F-4C68-9E94-8C6ABA79BC19}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2E79F7C1-392F-4C68-9E94-8C6ABA79BC19}.Release|Any CPU.Build.0 = Release|Any CPU + {827926F3-D8F8-42F4-AD66-C44AAFD9EB35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {827926F3-D8F8-42F4-AD66-C44AAFD9EB35}.Debug|Any CPU.Build.0 = Debug|Any CPU + {827926F3-D8F8-42F4-AD66-C44AAFD9EB35}.Release|Any CPU.ActiveCfg = Release|Any CPU + {827926F3-D8F8-42F4-AD66-C44AAFD9EB35}.Release|Any CPU.Build.0 = Release|Any CPU + {C988DF88-A4A1-4145-A684-C8063E159560}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C988DF88-A4A1-4145-A684-C8063E159560}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C988DF88-A4A1-4145-A684-C8063E159560}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C988DF88-A4A1-4145-A684-C8063E159560}.Release|Any CPU.Build.0 = Release|Any CPU + {560192D6-F622-4219-A5BB-442BA1D9A7C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {560192D6-F622-4219-A5BB-442BA1D9A7C5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {560192D6-F622-4219-A5BB-442BA1D9A7C5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {560192D6-F622-4219-A5BB-442BA1D9A7C5}.Release|Any CPU.Build.0 = Release|Any CPU + {9DF2B72E-31A4-4D7F-9DFB-B6A574496C3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9DF2B72E-31A4-4D7F-9DFB-B6A574496C3A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9DF2B72E-31A4-4D7F-9DFB-B6A574496C3A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9DF2B72E-31A4-4D7F-9DFB-B6A574496C3A}.Release|Any CPU.Build.0 = Release|Any CPU + {070DBB3C-DC63-4407-B037-70DD9180F381}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {070DBB3C-DC63-4407-B037-70DD9180F381}.Debug|Any CPU.Build.0 = Debug|Any CPU + {070DBB3C-DC63-4407-B037-70DD9180F381}.Release|Any CPU.ActiveCfg = Release|Any CPU + {070DBB3C-DC63-4407-B037-70DD9180F381}.Release|Any CPU.Build.0 = Release|Any CPU + {1D7A80BD-0444-430D-A242-AF6FA579E48E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1D7A80BD-0444-430D-A242-AF6FA579E48E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1D7A80BD-0444-430D-A242-AF6FA579E48E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1D7A80BD-0444-430D-A242-AF6FA579E48E}.Release|Any CPU.Build.0 = Release|Any CPU + {B4F3602C-8278-464B-A315-D9D2C42B49F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B4F3602C-8278-464B-A315-D9D2C42B49F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B4F3602C-8278-464B-A315-D9D2C42B49F7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B4F3602C-8278-464B-A315-D9D2C42B49F7}.Release|Any CPU.Build.0 = Release|Any CPU + {336E0AC8-6CC7-4437-B22D-03A7A836AAFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {336E0AC8-6CC7-4437-B22D-03A7A836AAFE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {336E0AC8-6CC7-4437-B22D-03A7A836AAFE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {336E0AC8-6CC7-4437-B22D-03A7A836AAFE}.Release|Any CPU.Build.0 = Release|Any CPU + {76267660-AA79-4FBA-8AF9-4FB6808CDF35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {76267660-AA79-4FBA-8AF9-4FB6808CDF35}.Debug|Any CPU.Build.0 = Debug|Any CPU + {76267660-AA79-4FBA-8AF9-4FB6808CDF35}.Release|Any CPU.ActiveCfg = Release|Any CPU + {76267660-AA79-4FBA-8AF9-4FB6808CDF35}.Release|Any CPU.Build.0 = Release|Any CPU + {21103739-7784-4C4F-BA8A-F03D0B295DE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {21103739-7784-4C4F-BA8A-F03D0B295DE3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {21103739-7784-4C4F-BA8A-F03D0B295DE3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {21103739-7784-4C4F-BA8A-F03D0B295DE3}.Release|Any CPU.Build.0 = Release|Any CPU + {3A0D6E61-D11A-499D-8921-702D3DA72A7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3A0D6E61-D11A-499D-8921-702D3DA72A7D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3A0D6E61-D11A-499D-8921-702D3DA72A7D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3A0D6E61-D11A-499D-8921-702D3DA72A7D}.Release|Any CPU.Build.0 = Release|Any CPU + {5BD85F99-D217-4A81-A7E6-C4EAAC3A0F46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5BD85F99-D217-4A81-A7E6-C4EAAC3A0F46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5BD85F99-D217-4A81-A7E6-C4EAAC3A0F46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5BD85F99-D217-4A81-A7E6-C4EAAC3A0F46}.Release|Any CPU.Build.0 = Release|Any CPU + {10ABD6B8-9FD6-4736-920C-5256DD1E8FD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {10ABD6B8-9FD6-4736-920C-5256DD1E8FD0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {10ABD6B8-9FD6-4736-920C-5256DD1E8FD0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {10ABD6B8-9FD6-4736-920C-5256DD1E8FD0}.Release|Any CPU.Build.0 = Release|Any CPU + {D0F20831-9B60-450F-B9B2-43C1A3341C1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D0F20831-9B60-450F-B9B2-43C1A3341C1B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D0F20831-9B60-450F-B9B2-43C1A3341C1B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D0F20831-9B60-450F-B9B2-43C1A3341C1B}.Release|Any CPU.Build.0 = Release|Any CPU + {FF30A0F2-1C32-4A56-9233-307CA31EB43B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FF30A0F2-1C32-4A56-9233-307CA31EB43B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FF30A0F2-1C32-4A56-9233-307CA31EB43B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FF30A0F2-1C32-4A56-9233-307CA31EB43B}.Release|Any CPU.Build.0 = Release|Any CPU + {5A727EC9-D754-4976-92BC-FB8769780647}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5A727EC9-D754-4976-92BC-FB8769780647}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5A727EC9-D754-4976-92BC-FB8769780647}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5A727EC9-D754-4976-92BC-FB8769780647}.Release|Any CPU.Build.0 = Release|Any CPU + {947B4A72-108A-4215-A76B-F11F66253B73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {947B4A72-108A-4215-A76B-F11F66253B73}.Debug|Any CPU.Build.0 = Debug|Any CPU + {947B4A72-108A-4215-A76B-F11F66253B73}.Release|Any CPU.ActiveCfg = Release|Any CPU + {947B4A72-108A-4215-A76B-F11F66253B73}.Release|Any CPU.Build.0 = Release|Any CPU + {168E7151-AE15-4210-A979-E1347AD8288B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {168E7151-AE15-4210-A979-E1347AD8288B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {168E7151-AE15-4210-A979-E1347AD8288B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {168E7151-AE15-4210-A979-E1347AD8288B}.Release|Any CPU.Build.0 = Release|Any CPU + {D91DA55B-2DAD-4D18-8130-629BD143A7C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D91DA55B-2DAD-4D18-8130-629BD143A7C7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D91DA55B-2DAD-4D18-8130-629BD143A7C7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D91DA55B-2DAD-4D18-8130-629BD143A7C7}.Release|Any CPU.Build.0 = Release|Any CPU + {860CB348-BD36-4A45-A8E5-5F0E0751C4A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {860CB348-BD36-4A45-A8E5-5F0E0751C4A9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {860CB348-BD36-4A45-A8E5-5F0E0751C4A9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {860CB348-BD36-4A45-A8E5-5F0E0751C4A9}.Release|Any CPU.Build.0 = Release|Any CPU + {9625C308-5B63-436D-B1F7-B37BE7E3541B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9625C308-5B63-436D-B1F7-B37BE7E3541B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9625C308-5B63-436D-B1F7-B37BE7E3541B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9625C308-5B63-436D-B1F7-B37BE7E3541B}.Release|Any CPU.Build.0 = Release|Any CPU + {D7867DE5-6ECB-406D-BCED-DEB377F4FB55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D7867DE5-6ECB-406D-BCED-DEB377F4FB55}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D7867DE5-6ECB-406D-BCED-DEB377F4FB55}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D7867DE5-6ECB-406D-BCED-DEB377F4FB55}.Release|Any CPU.Build.0 = Release|Any CPU + {FE288996-8C94-4B75-8BF1-16977C98241A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FE288996-8C94-4B75-8BF1-16977C98241A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FE288996-8C94-4B75-8BF1-16977C98241A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FE288996-8C94-4B75-8BF1-16977C98241A}.Release|Any CPU.Build.0 = Release|Any CPU + {4BD2505B-8426-48F2-86C2-4FFE3D416ED8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4BD2505B-8426-48F2-86C2-4FFE3D416ED8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4BD2505B-8426-48F2-86C2-4FFE3D416ED8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4BD2505B-8426-48F2-86C2-4FFE3D416ED8}.Release|Any CPU.Build.0 = Release|Any CPU + {A69CDCAB-A96B-4CD5-AE95-562A74DBEF11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A69CDCAB-A96B-4CD5-AE95-562A74DBEF11}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A69CDCAB-A96B-4CD5-AE95-562A74DBEF11}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A69CDCAB-A96B-4CD5-AE95-562A74DBEF11}.Release|Any CPU.Build.0 = Release|Any CPU + {50BA28CD-5BFC-4C5E-B702-77A9B1543A04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {50BA28CD-5BFC-4C5E-B702-77A9B1543A04}.Debug|Any CPU.Build.0 = Debug|Any CPU + {50BA28CD-5BFC-4C5E-B702-77A9B1543A04}.Release|Any CPU.ActiveCfg = Release|Any CPU + {50BA28CD-5BFC-4C5E-B702-77A9B1543A04}.Release|Any CPU.Build.0 = Release|Any CPU + {D2130F2D-B4A1-41AD-BFFA-17AA74888987}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D2130F2D-B4A1-41AD-BFFA-17AA74888987}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D2130F2D-B4A1-41AD-BFFA-17AA74888987}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D2130F2D-B4A1-41AD-BFFA-17AA74888987}.Release|Any CPU.Build.0 = Release|Any CPU + {36EF5A3D-2101-46F5-9CC9-47ACCCEC94C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {36EF5A3D-2101-46F5-9CC9-47ACCCEC94C4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {36EF5A3D-2101-46F5-9CC9-47ACCCEC94C4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {36EF5A3D-2101-46F5-9CC9-47ACCCEC94C4}.Release|Any CPU.Build.0 = Release|Any CPU + {F2D026CA-B596-48EB-9F20-D03029FE852A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F2D026CA-B596-48EB-9F20-D03029FE852A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F2D026CA-B596-48EB-9F20-D03029FE852A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F2D026CA-B596-48EB-9F20-D03029FE852A}.Release|Any CPU.Build.0 = Release|Any CPU + {7A1F9EDE-D619-4B73-9914-137DDE2044E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A1F9EDE-D619-4B73-9914-137DDE2044E4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A1F9EDE-D619-4B73-9914-137DDE2044E4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A1F9EDE-D619-4B73-9914-137DDE2044E4}.Release|Any CPU.Build.0 = Release|Any CPU + {70AD3FCB-F529-4E08-BE39-E56C940EA114}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {70AD3FCB-F529-4E08-BE39-E56C940EA114}.Debug|Any CPU.Build.0 = Debug|Any CPU + {70AD3FCB-F529-4E08-BE39-E56C940EA114}.Release|Any CPU.ActiveCfg = Release|Any CPU + {70AD3FCB-F529-4E08-BE39-E56C940EA114}.Release|Any CPU.Build.0 = Release|Any CPU + {CDC8B1F7-3C94-4686-9EE0-6841231E6144}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CDC8B1F7-3C94-4686-9EE0-6841231E6144}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CDC8B1F7-3C94-4686-9EE0-6841231E6144}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CDC8B1F7-3C94-4686-9EE0-6841231E6144}.Release|Any CPU.Build.0 = Release|Any CPU + {E2586A8F-F16C-4532-BDED-8DBF8B47A392}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E2586A8F-F16C-4532-BDED-8DBF8B47A392}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E2586A8F-F16C-4532-BDED-8DBF8B47A392}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E2586A8F-F16C-4532-BDED-8DBF8B47A392}.Release|Any CPU.Build.0 = Release|Any CPU + {B11B8CA5-A1DF-4D23-BC65-C53DE68D3094}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B11B8CA5-A1DF-4D23-BC65-C53DE68D3094}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B11B8CA5-A1DF-4D23-BC65-C53DE68D3094}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B11B8CA5-A1DF-4D23-BC65-C53DE68D3094}.Release|Any CPU.Build.0 = Release|Any CPU + {5D298F4A-5A33-4489-8F9D-78FA0A04AC3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5D298F4A-5A33-4489-8F9D-78FA0A04AC3C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5D298F4A-5A33-4489-8F9D-78FA0A04AC3C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5D298F4A-5A33-4489-8F9D-78FA0A04AC3C}.Release|Any CPU.Build.0 = Release|Any CPU + {30FCB2D0-9353-4218-A5C9-1807661D2656}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {30FCB2D0-9353-4218-A5C9-1807661D2656}.Debug|Any CPU.Build.0 = Debug|Any CPU + {30FCB2D0-9353-4218-A5C9-1807661D2656}.Release|Any CPU.ActiveCfg = Release|Any CPU + {30FCB2D0-9353-4218-A5C9-1807661D2656}.Release|Any CPU.Build.0 = Release|Any CPU + {D73CF550-4CC3-47A9-864E-F7FC46736DBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D73CF550-4CC3-47A9-864E-F7FC46736DBF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D73CF550-4CC3-47A9-864E-F7FC46736DBF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D73CF550-4CC3-47A9-864E-F7FC46736DBF}.Release|Any CPU.Build.0 = Release|Any CPU + {A5532EED-72CC-4C3A-A81C-5BE3172F0FDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A5532EED-72CC-4C3A-A81C-5BE3172F0FDF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A5532EED-72CC-4C3A-A81C-5BE3172F0FDF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A5532EED-72CC-4C3A-A81C-5BE3172F0FDF}.Release|Any CPU.Build.0 = Release|Any CPU + {48352710-3D49-43A9-89D6-3836A4D49F71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {48352710-3D49-43A9-89D6-3836A4D49F71}.Debug|Any CPU.Build.0 = Debug|Any CPU + {48352710-3D49-43A9-89D6-3836A4D49F71}.Release|Any CPU.ActiveCfg = Release|Any CPU + {48352710-3D49-43A9-89D6-3836A4D49F71}.Release|Any CPU.Build.0 = Release|Any CPU + {CE01EBEF-6E86-4778-B49F-F65081082F3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CE01EBEF-6E86-4778-B49F-F65081082F3C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CE01EBEF-6E86-4778-B49F-F65081082F3C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CE01EBEF-6E86-4778-B49F-F65081082F3C}.Release|Any CPU.Build.0 = Release|Any CPU + {4445A10E-DF6C-461A-9F1B-B4D03F5322E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4445A10E-DF6C-461A-9F1B-B4D03F5322E1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4445A10E-DF6C-461A-9F1B-B4D03F5322E1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4445A10E-DF6C-461A-9F1B-B4D03F5322E1}.Release|Any CPU.Build.0 = Release|Any CPU + {67482071-FBD5-4D12-A571-C37EDD517365}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {67482071-FBD5-4D12-A571-C37EDD517365}.Debug|Any CPU.Build.0 = Debug|Any CPU + {67482071-FBD5-4D12-A571-C37EDD517365}.Release|Any CPU.ActiveCfg = Release|Any CPU + {67482071-FBD5-4D12-A571-C37EDD517365}.Release|Any CPU.Build.0 = Release|Any CPU + {E8A207D8-5920-419C-8CAE-92B5D34D28E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E8A207D8-5920-419C-8CAE-92B5D34D28E1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E8A207D8-5920-419C-8CAE-92B5D34D28E1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E8A207D8-5920-419C-8CAE-92B5D34D28E1}.Release|Any CPU.Build.0 = Release|Any CPU + {50AF2EFB-FF15-4058-ABA4-C720E044FD29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {50AF2EFB-FF15-4058-ABA4-C720E044FD29}.Debug|Any CPU.Build.0 = Debug|Any CPU + {50AF2EFB-FF15-4058-ABA4-C720E044FD29}.Release|Any CPU.ActiveCfg = Release|Any CPU + {50AF2EFB-FF15-4058-ABA4-C720E044FD29}.Release|Any CPU.Build.0 = Release|Any CPU + {86737A35-BCF5-44D8-A383-9C1E26D8CA54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {86737A35-BCF5-44D8-A383-9C1E26D8CA54}.Debug|Any CPU.Build.0 = Debug|Any CPU + {86737A35-BCF5-44D8-A383-9C1E26D8CA54}.Release|Any CPU.ActiveCfg = Release|Any CPU + {86737A35-BCF5-44D8-A383-9C1E26D8CA54}.Release|Any CPU.Build.0 = Release|Any CPU + {CF20036E-A856-47E4-8F04-918FB151ECFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CF20036E-A856-47E4-8F04-918FB151ECFD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CF20036E-A856-47E4-8F04-918FB151ECFD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CF20036E-A856-47E4-8F04-918FB151ECFD}.Release|Any CPU.Build.0 = Release|Any CPU + {70C2F91D-0C9C-4865-A98F-F0125D4FF0C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {70C2F91D-0C9C-4865-A98F-F0125D4FF0C4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {70C2F91D-0C9C-4865-A98F-F0125D4FF0C4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {70C2F91D-0C9C-4865-A98F-F0125D4FF0C4}.Release|Any CPU.Build.0 = Release|Any CPU + {12AB67E2-8F23-4463-8460-4DE0BABCEE1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {12AB67E2-8F23-4463-8460-4DE0BABCEE1A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {12AB67E2-8F23-4463-8460-4DE0BABCEE1A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {12AB67E2-8F23-4463-8460-4DE0BABCEE1A}.Release|Any CPU.Build.0 = Release|Any CPU + {1417F6CC-4924-490A-8D73-C230B24507DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1417F6CC-4924-490A-8D73-C230B24507DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1417F6CC-4924-490A-8D73-C230B24507DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1417F6CC-4924-490A-8D73-C230B24507DC}.Release|Any CPU.Build.0 = Release|Any CPU + {6274CE2E-241E-4048-9B06-5804952A90B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6274CE2E-241E-4048-9B06-5804952A90B2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6274CE2E-241E-4048-9B06-5804952A90B2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6274CE2E-241E-4048-9B06-5804952A90B2}.Release|Any CPU.Build.0 = Release|Any CPU + {C1C5F7E2-AF90-4DC5-8E6D-B74225E422BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C1C5F7E2-AF90-4DC5-8E6D-B74225E422BF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1C5F7E2-AF90-4DC5-8E6D-B74225E422BF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C1C5F7E2-AF90-4DC5-8E6D-B74225E422BF}.Release|Any CPU.Build.0 = Release|Any CPU + {73144DF6-CFD2-40DB-AA23-9961CB0419F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {73144DF6-CFD2-40DB-AA23-9961CB0419F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {73144DF6-CFD2-40DB-AA23-9961CB0419F7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {73144DF6-CFD2-40DB-AA23-9961CB0419F7}.Release|Any CPU.Build.0 = Release|Any CPU + {15FCEB5D-C3BB-42AC-BCBC-C44C86FAC1B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {15FCEB5D-C3BB-42AC-BCBC-C44C86FAC1B3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15FCEB5D-C3BB-42AC-BCBC-C44C86FAC1B3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {15FCEB5D-C3BB-42AC-BCBC-C44C86FAC1B3}.Release|Any CPU.Build.0 = Release|Any CPU + {D1C70A41-9467-4CC9-961C-2192F7189349}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D1C70A41-9467-4CC9-961C-2192F7189349}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D1C70A41-9467-4CC9-961C-2192F7189349}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D1C70A41-9467-4CC9-961C-2192F7189349}.Release|Any CPU.Build.0 = Release|Any CPU + {7F4B9EAC-F272-4E2F-A2A4-965CCC2C4EA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7F4B9EAC-F272-4E2F-A2A4-965CCC2C4EA6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7F4B9EAC-F272-4E2F-A2A4-965CCC2C4EA6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7F4B9EAC-F272-4E2F-A2A4-965CCC2C4EA6}.Release|Any CPU.Build.0 = Release|Any CPU + {7D3B107B-61AA-4D1C-B052-D349CC360BE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7D3B107B-61AA-4D1C-B052-D349CC360BE6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7D3B107B-61AA-4D1C-B052-D349CC360BE6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7D3B107B-61AA-4D1C-B052-D349CC360BE6}.Release|Any CPU.Build.0 = Release|Any CPU + {5B313241-C556-497B-98CB-8BA86DFEA3F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5B313241-C556-497B-98CB-8BA86DFEA3F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5B313241-C556-497B-98CB-8BA86DFEA3F7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5B313241-C556-497B-98CB-8BA86DFEA3F7}.Release|Any CPU.Build.0 = Release|Any CPU + {67C0EDBF-B64D-4D42-B4D6-87BC9B6A45A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {67C0EDBF-B64D-4D42-B4D6-87BC9B6A45A4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {67C0EDBF-B64D-4D42-B4D6-87BC9B6A45A4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {67C0EDBF-B64D-4D42-B4D6-87BC9B6A45A4}.Release|Any CPU.Build.0 = Release|Any CPU + {58B40D67-81A4-478F-AF1C-67CFA2975B95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58B40D67-81A4-478F-AF1C-67CFA2975B95}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58B40D67-81A4-478F-AF1C-67CFA2975B95}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58B40D67-81A4-478F-AF1C-67CFA2975B95}.Release|Any CPU.Build.0 = Release|Any CPU + {9FD0E881-4F74-4B63-9B77-ECED8589EC79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9FD0E881-4F74-4B63-9B77-ECED8589EC79}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9FD0E881-4F74-4B63-9B77-ECED8589EC79}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9FD0E881-4F74-4B63-9B77-ECED8589EC79}.Release|Any CPU.Build.0 = Release|Any CPU + {5E8D625C-F9BD-47F3-A3B9-4769F895FB97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5E8D625C-F9BD-47F3-A3B9-4769F895FB97}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5E8D625C-F9BD-47F3-A3B9-4769F895FB97}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5E8D625C-F9BD-47F3-A3B9-4769F895FB97}.Release|Any CPU.Build.0 = Release|Any CPU + {97F9546F-D70B-45E8-9EA2-0383CF2F6C53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {97F9546F-D70B-45E8-9EA2-0383CF2F6C53}.Debug|Any CPU.Build.0 = Debug|Any CPU + {97F9546F-D70B-45E8-9EA2-0383CF2F6C53}.Release|Any CPU.ActiveCfg = Release|Any CPU + {97F9546F-D70B-45E8-9EA2-0383CF2F6C53}.Release|Any CPU.Build.0 = Release|Any CPU + {FCD72C56-8DE4-46BC-B9B9-F870EE2D26E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FCD72C56-8DE4-46BC-B9B9-F870EE2D26E0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FCD72C56-8DE4-46BC-B9B9-F870EE2D26E0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FCD72C56-8DE4-46BC-B9B9-F870EE2D26E0}.Release|Any CPU.Build.0 = Release|Any CPU + {931E6436-3793-4732-A3DF-473BA5878534}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {931E6436-3793-4732-A3DF-473BA5878534}.Debug|Any CPU.Build.0 = Debug|Any CPU + {931E6436-3793-4732-A3DF-473BA5878534}.Release|Any CPU.ActiveCfg = Release|Any CPU + {931E6436-3793-4732-A3DF-473BA5878534}.Release|Any CPU.Build.0 = Release|Any CPU + {544A9C70-FE8C-4606-A3EF-74230BF18D45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {544A9C70-FE8C-4606-A3EF-74230BF18D45}.Debug|Any CPU.Build.0 = Debug|Any CPU + {544A9C70-FE8C-4606-A3EF-74230BF18D45}.Release|Any CPU.ActiveCfg = Release|Any CPU + {544A9C70-FE8C-4606-A3EF-74230BF18D45}.Release|Any CPU.Build.0 = Release|Any CPU + {E54A6230-93F7-4A0F-925E-FE658B8DF425}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E54A6230-93F7-4A0F-925E-FE658B8DF425}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E54A6230-93F7-4A0F-925E-FE658B8DF425}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E54A6230-93F7-4A0F-925E-FE658B8DF425}.Release|Any CPU.Build.0 = Release|Any CPU + {C1605309-ABD1-4D6E-A119-9F8213F67A83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C1605309-ABD1-4D6E-A119-9F8213F67A83}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1605309-ABD1-4D6E-A119-9F8213F67A83}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C1605309-ABD1-4D6E-A119-9F8213F67A83}.Release|Any CPU.Build.0 = Release|Any CPU + {B6D67C30-8132-4FB7-909B-DAC73731971B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B6D67C30-8132-4FB7-909B-DAC73731971B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B6D67C30-8132-4FB7-909B-DAC73731971B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B6D67C30-8132-4FB7-909B-DAC73731971B}.Release|Any CPU.Build.0 = Release|Any CPU + {B9B7EE61-1751-4152-ACC8-717C0D5E34C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B9B7EE61-1751-4152-ACC8-717C0D5E34C5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B9B7EE61-1751-4152-ACC8-717C0D5E34C5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B9B7EE61-1751-4152-ACC8-717C0D5E34C5}.Release|Any CPU.Build.0 = Release|Any CPU + {47143DEF-2CB1-47A3-8E8D-D7AF1190D593}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {47143DEF-2CB1-47A3-8E8D-D7AF1190D593}.Debug|Any CPU.Build.0 = Debug|Any CPU + {47143DEF-2CB1-47A3-8E8D-D7AF1190D593}.Release|Any CPU.ActiveCfg = Release|Any CPU + {47143DEF-2CB1-47A3-8E8D-D7AF1190D593}.Release|Any CPU.Build.0 = Release|Any CPU + {5D6133D4-E4A3-441F-B8E1-AD141FA8AED4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5D6133D4-E4A3-441F-B8E1-AD141FA8AED4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5D6133D4-E4A3-441F-B8E1-AD141FA8AED4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5D6133D4-E4A3-441F-B8E1-AD141FA8AED4}.Release|Any CPU.Build.0 = Release|Any CPU + {2DD54079-CCAE-42BE-9053-DA06591B1D22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2DD54079-CCAE-42BE-9053-DA06591B1D22}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2DD54079-CCAE-42BE-9053-DA06591B1D22}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2DD54079-CCAE-42BE-9053-DA06591B1D22}.Release|Any CPU.Build.0 = Release|Any CPU + {403AF513-EA11-4EA5-B719-46257E5FF0F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {403AF513-EA11-4EA5-B719-46257E5FF0F8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {403AF513-EA11-4EA5-B719-46257E5FF0F8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {403AF513-EA11-4EA5-B719-46257E5FF0F8}.Release|Any CPU.Build.0 = Release|Any CPU + {7C74F87E-B979-48FE-BF82-374A477B359C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7C74F87E-B979-48FE-BF82-374A477B359C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7C74F87E-B979-48FE-BF82-374A477B359C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7C74F87E-B979-48FE-BF82-374A477B359C}.Release|Any CPU.Build.0 = Release|Any CPU + {4468E0D6-CBB0-4D41-952A-0B91A28C558F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4468E0D6-CBB0-4D41-952A-0B91A28C558F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4468E0D6-CBB0-4D41-952A-0B91A28C558F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4468E0D6-CBB0-4D41-952A-0B91A28C558F}.Release|Any CPU.Build.0 = Release|Any CPU + {034E4160-50F0-4944-9D12-5F11CB82C915}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {034E4160-50F0-4944-9D12-5F11CB82C915}.Debug|Any CPU.Build.0 = Debug|Any CPU + {034E4160-50F0-4944-9D12-5F11CB82C915}.Release|Any CPU.ActiveCfg = Release|Any CPU + {034E4160-50F0-4944-9D12-5F11CB82C915}.Release|Any CPU.Build.0 = Release|Any CPU + {FCB04CDF-4507-470F-A2F5-D02541D10DDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FCB04CDF-4507-470F-A2F5-D02541D10DDC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FCB04CDF-4507-470F-A2F5-D02541D10DDC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FCB04CDF-4507-470F-A2F5-D02541D10DDC}.Release|Any CPU.Build.0 = Release|Any CPU + {9F960971-F7C9-4978-8843-28FEA1A4662F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9F960971-F7C9-4978-8843-28FEA1A4662F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9F960971-F7C9-4978-8843-28FEA1A4662F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9F960971-F7C9-4978-8843-28FEA1A4662F}.Release|Any CPU.Build.0 = Release|Any CPU + {6B028F0A-7484-407E-A7E8-312CFAB53B18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6B028F0A-7484-407E-A7E8-312CFAB53B18}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6B028F0A-7484-407E-A7E8-312CFAB53B18}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6B028F0A-7484-407E-A7E8-312CFAB53B18}.Release|Any CPU.Build.0 = Release|Any CPU + {6CB3FF5D-96FE-4765-8C15-69B3664F296C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6CB3FF5D-96FE-4765-8C15-69B3664F296C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6CB3FF5D-96FE-4765-8C15-69B3664F296C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6CB3FF5D-96FE-4765-8C15-69B3664F296C}.Release|Any CPU.Build.0 = Release|Any CPU + {377FEE6C-E6A4-40E5-B723-7872326E66B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {377FEE6C-E6A4-40E5-B723-7872326E66B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {377FEE6C-E6A4-40E5-B723-7872326E66B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {377FEE6C-E6A4-40E5-B723-7872326E66B9}.Release|Any CPU.Build.0 = Release|Any CPU + {47B22880-83E3-406D-839C-D97E56F9A37E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {47B22880-83E3-406D-839C-D97E56F9A37E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {47B22880-83E3-406D-839C-D97E56F9A37E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {47B22880-83E3-406D-839C-D97E56F9A37E}.Release|Any CPU.Build.0 = Release|Any CPU + {3E21F611-8039-46F5-85B5-92AC892A3521}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3E21F611-8039-46F5-85B5-92AC892A3521}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3E21F611-8039-46F5-85B5-92AC892A3521}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3E21F611-8039-46F5-85B5-92AC892A3521}.Release|Any CPU.Build.0 = Release|Any CPU + {507B6692-06C5-4EA2-98B5-BDE2D5A55B51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {507B6692-06C5-4EA2-98B5-BDE2D5A55B51}.Debug|Any CPU.Build.0 = Debug|Any CPU + {507B6692-06C5-4EA2-98B5-BDE2D5A55B51}.Release|Any CPU.ActiveCfg = Release|Any CPU + {507B6692-06C5-4EA2-98B5-BDE2D5A55B51}.Release|Any CPU.Build.0 = Release|Any CPU + {E6869BD3-E28A-4973-9FC6-2DC16EE75DAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E6869BD3-E28A-4973-9FC6-2DC16EE75DAF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E6869BD3-E28A-4973-9FC6-2DC16EE75DAF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E6869BD3-E28A-4973-9FC6-2DC16EE75DAF}.Release|Any CPU.Build.0 = Release|Any CPU + {59BA7331-E966-4962-8B91-01EBAA91E0F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {59BA7331-E966-4962-8B91-01EBAA91E0F4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {59BA7331-E966-4962-8B91-01EBAA91E0F4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {59BA7331-E966-4962-8B91-01EBAA91E0F4}.Release|Any CPU.Build.0 = Release|Any CPU + {C7BAC762-25F8-4D1F-B3FF-94ECA9199BE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C7BAC762-25F8-4D1F-B3FF-94ECA9199BE6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C7BAC762-25F8-4D1F-B3FF-94ECA9199BE6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C7BAC762-25F8-4D1F-B3FF-94ECA9199BE6}.Release|Any CPU.Build.0 = Release|Any CPU + {5ADB16FD-B2A7-4605-A954-6F4A183519DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5ADB16FD-B2A7-4605-A954-6F4A183519DA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5ADB16FD-B2A7-4605-A954-6F4A183519DA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5ADB16FD-B2A7-4605-A954-6F4A183519DA}.Release|Any CPU.Build.0 = Release|Any CPU + {99FD6482-8C75-48FB-8580-01000F850B17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {99FD6482-8C75-48FB-8580-01000F850B17}.Debug|Any CPU.Build.0 = Debug|Any CPU + {99FD6482-8C75-48FB-8580-01000F850B17}.Release|Any CPU.ActiveCfg = Release|Any CPU + {99FD6482-8C75-48FB-8580-01000F850B17}.Release|Any CPU.Build.0 = Release|Any CPU + {2A2F636A-FE6E-4FFF-97D8-18B697B2DDB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2A2F636A-FE6E-4FFF-97D8-18B697B2DDB8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2A2F636A-FE6E-4FFF-97D8-18B697B2DDB8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2A2F636A-FE6E-4FFF-97D8-18B697B2DDB8}.Release|Any CPU.Build.0 = Release|Any CPU + {856DF852-7271-480F-9A12-F49DFE086263}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {856DF852-7271-480F-9A12-F49DFE086263}.Debug|Any CPU.Build.0 = Debug|Any CPU + {856DF852-7271-480F-9A12-F49DFE086263}.Release|Any CPU.ActiveCfg = Release|Any CPU + {856DF852-7271-480F-9A12-F49DFE086263}.Release|Any CPU.Build.0 = Release|Any CPU + {0A933D61-5F46-4754-A0D8-ADB1F2DEA0E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0A933D61-5F46-4754-A0D8-ADB1F2DEA0E6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0A933D61-5F46-4754-A0D8-ADB1F2DEA0E6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0A933D61-5F46-4754-A0D8-ADB1F2DEA0E6}.Release|Any CPU.Build.0 = Release|Any CPU + {28368089-C065-4279-A3C4-6D2815789327}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28368089-C065-4279-A3C4-6D2815789327}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28368089-C065-4279-A3C4-6D2815789327}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28368089-C065-4279-A3C4-6D2815789327}.Release|Any CPU.Build.0 = Release|Any CPU + {006C67F2-61CB-4FF2-9343-982E6404583F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {006C67F2-61CB-4FF2-9343-982E6404583F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {006C67F2-61CB-4FF2-9343-982E6404583F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {006C67F2-61CB-4FF2-9343-982E6404583F}.Release|Any CPU.Build.0 = Release|Any CPU + {63E084C3-C741-4285-8094-7BF2AA063C6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {63E084C3-C741-4285-8094-7BF2AA063C6E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {63E084C3-C741-4285-8094-7BF2AA063C6E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {63E084C3-C741-4285-8094-7BF2AA063C6E}.Release|Any CPU.Build.0 = Release|Any CPU + {0FEBB470-2752-4E4D-B212-462253E5AF86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0FEBB470-2752-4E4D-B212-462253E5AF86}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0FEBB470-2752-4E4D-B212-462253E5AF86}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0FEBB470-2752-4E4D-B212-462253E5AF86}.Release|Any CPU.Build.0 = Release|Any CPU + {45AFC9A6-C949-4939-B6FC-0BCE2ED599CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45AFC9A6-C949-4939-B6FC-0BCE2ED599CF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45AFC9A6-C949-4939-B6FC-0BCE2ED599CF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45AFC9A6-C949-4939-B6FC-0BCE2ED599CF}.Release|Any CPU.Build.0 = Release|Any CPU + {4A4841BC-9AC5-4581-AC50-6AAE6B43E6E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A4841BC-9AC5-4581-AC50-6AAE6B43E6E7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A4841BC-9AC5-4581-AC50-6AAE6B43E6E7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A4841BC-9AC5-4581-AC50-6AAE6B43E6E7}.Release|Any CPU.Build.0 = Release|Any CPU + {A3FFA5B4-F3CE-4FBB-82D9-45D85526AB47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A3FFA5B4-F3CE-4FBB-82D9-45D85526AB47}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3FFA5B4-F3CE-4FBB-82D9-45D85526AB47}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A3FFA5B4-F3CE-4FBB-82D9-45D85526AB47}.Release|Any CPU.Build.0 = Release|Any CPU + {94E4C64B-919C-48ED-A728-AE95403480FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {94E4C64B-919C-48ED-A728-AE95403480FA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {94E4C64B-919C-48ED-A728-AE95403480FA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {94E4C64B-919C-48ED-A728-AE95403480FA}.Release|Any CPU.Build.0 = Release|Any CPU + {DBAE5B73-152A-45BF-B5BA-5D598C899A57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DBAE5B73-152A-45BF-B5BA-5D598C899A57}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DBAE5B73-152A-45BF-B5BA-5D598C899A57}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DBAE5B73-152A-45BF-B5BA-5D598C899A57}.Release|Any CPU.Build.0 = Release|Any CPU + {7D29BC5B-683C-4F7E-A87D-746C7FB76732}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7D29BC5B-683C-4F7E-A87D-746C7FB76732}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7D29BC5B-683C-4F7E-A87D-746C7FB76732}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7D29BC5B-683C-4F7E-A87D-746C7FB76732}.Release|Any CPU.Build.0 = Release|Any CPU + {44CD23AC-18B0-4E1A-ADA7-3FF883DA8D03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {44CD23AC-18B0-4E1A-ADA7-3FF883DA8D03}.Debug|Any CPU.Build.0 = Debug|Any CPU + {44CD23AC-18B0-4E1A-ADA7-3FF883DA8D03}.Release|Any CPU.ActiveCfg = Release|Any CPU + {44CD23AC-18B0-4E1A-ADA7-3FF883DA8D03}.Release|Any CPU.Build.0 = Release|Any CPU + {8BFD4EFE-A009-429B-9AFB-2C77F802F2BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8BFD4EFE-A009-429B-9AFB-2C77F802F2BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8BFD4EFE-A009-429B-9AFB-2C77F802F2BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8BFD4EFE-A009-429B-9AFB-2C77F802F2BC}.Release|Any CPU.Build.0 = Release|Any CPU + {FACD7646-718F-4148-A172-A482063A161E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FACD7646-718F-4148-A172-A482063A161E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FACD7646-718F-4148-A172-A482063A161E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FACD7646-718F-4148-A172-A482063A161E}.Release|Any CPU.Build.0 = Release|Any CPU + {E14F294D-1179-4559-BCEB-0511506AEFA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E14F294D-1179-4559-BCEB-0511506AEFA6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E14F294D-1179-4559-BCEB-0511506AEFA6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E14F294D-1179-4559-BCEB-0511506AEFA6}.Release|Any CPU.Build.0 = Release|Any CPU + {5F028E11-1671-461F-87A1-7B27FD6CD01E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5F028E11-1671-461F-87A1-7B27FD6CD01E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5F028E11-1671-461F-87A1-7B27FD6CD01E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5F028E11-1671-461F-87A1-7B27FD6CD01E}.Release|Any CPU.Build.0 = Release|Any CPU + {8B5A7D22-2F96-4934-A204-C192E7E502BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8B5A7D22-2F96-4934-A204-C192E7E502BE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8B5A7D22-2F96-4934-A204-C192E7E502BE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8B5A7D22-2F96-4934-A204-C192E7E502BE}.Release|Any CPU.Build.0 = Release|Any CPU + {D67910D1-2B62-4FB1-A095-A96B1F80C1B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D67910D1-2B62-4FB1-A095-A96B1F80C1B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D67910D1-2B62-4FB1-A095-A96B1F80C1B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D67910D1-2B62-4FB1-A095-A96B1F80C1B9}.Release|Any CPU.Build.0 = Release|Any CPU + {BB247DCA-0566-41B3-9A69-B041019B36D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BB247DCA-0566-41B3-9A69-B041019B36D8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BB247DCA-0566-41B3-9A69-B041019B36D8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BB247DCA-0566-41B3-9A69-B041019B36D8}.Release|Any CPU.Build.0 = Release|Any CPU + {2260C062-8317-40EC-BA6B-F1260790CE7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2260C062-8317-40EC-BA6B-F1260790CE7D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2260C062-8317-40EC-BA6B-F1260790CE7D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2260C062-8317-40EC-BA6B-F1260790CE7D}.Release|Any CPU.Build.0 = Release|Any CPU + {D69A6305-12A9-4190-BDE6-185258D4E8B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D69A6305-12A9-4190-BDE6-185258D4E8B6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D69A6305-12A9-4190-BDE6-185258D4E8B6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D69A6305-12A9-4190-BDE6-185258D4E8B6}.Release|Any CPU.Build.0 = Release|Any CPU + {3E5832F0-1869-4833-8680-7C6952E5D917}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3E5832F0-1869-4833-8680-7C6952E5D917}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3E5832F0-1869-4833-8680-7C6952E5D917}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3E5832F0-1869-4833-8680-7C6952E5D917}.Release|Any CPU.Build.0 = Release|Any CPU + {E7F8BD74-F3EB-4A4D-AF2B-B8492CC6355F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E7F8BD74-F3EB-4A4D-AF2B-B8492CC6355F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E7F8BD74-F3EB-4A4D-AF2B-B8492CC6355F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E7F8BD74-F3EB-4A4D-AF2B-B8492CC6355F}.Release|Any CPU.Build.0 = Release|Any CPU + {F3128138-A2B7-4C09-9D0A-A93DD4F855A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F3128138-A2B7-4C09-9D0A-A93DD4F855A5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F3128138-A2B7-4C09-9D0A-A93DD4F855A5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F3128138-A2B7-4C09-9D0A-A93DD4F855A5}.Release|Any CPU.Build.0 = Release|Any CPU + {4C4A49FF-E89F-4108-A4BD-551634A3C4CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4C4A49FF-E89F-4108-A4BD-551634A3C4CE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4C4A49FF-E89F-4108-A4BD-551634A3C4CE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4C4A49FF-E89F-4108-A4BD-551634A3C4CE}.Release|Any CPU.Build.0 = Release|Any CPU + {A4A4C6CA-FF07-43FD-B1DB-EC9B5E01D11A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4A4C6CA-FF07-43FD-B1DB-EC9B5E01D11A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4A4C6CA-FF07-43FD-B1DB-EC9B5E01D11A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4A4C6CA-FF07-43FD-B1DB-EC9B5E01D11A}.Release|Any CPU.Build.0 = Release|Any CPU + {B43805C8-BF34-403A-8933-F1A63AEBDF71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B43805C8-BF34-403A-8933-F1A63AEBDF71}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B43805C8-BF34-403A-8933-F1A63AEBDF71}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B43805C8-BF34-403A-8933-F1A63AEBDF71}.Release|Any CPU.Build.0 = Release|Any CPU + {F29AAF44-60FE-4189-81C4-FE3A60161394}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F29AAF44-60FE-4189-81C4-FE3A60161394}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F29AAF44-60FE-4189-81C4-FE3A60161394}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F29AAF44-60FE-4189-81C4-FE3A60161394}.Release|Any CPU.Build.0 = Release|Any CPU + {1CF4EBB0-6BBB-456A-9258-83F62D026530}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1CF4EBB0-6BBB-456A-9258-83F62D026530}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1CF4EBB0-6BBB-456A-9258-83F62D026530}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1CF4EBB0-6BBB-456A-9258-83F62D026530}.Release|Any CPU.Build.0 = Release|Any CPU + {200CCE0D-1796-4570-8EDD-7093F0072678}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {200CCE0D-1796-4570-8EDD-7093F0072678}.Debug|Any CPU.Build.0 = Debug|Any CPU + {200CCE0D-1796-4570-8EDD-7093F0072678}.Release|Any CPU.ActiveCfg = Release|Any CPU + {200CCE0D-1796-4570-8EDD-7093F0072678}.Release|Any CPU.Build.0 = Release|Any CPU + {AFA889B1-B728-4E16-96B7-9733376B0EA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AFA889B1-B728-4E16-96B7-9733376B0EA4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AFA889B1-B728-4E16-96B7-9733376B0EA4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AFA889B1-B728-4E16-96B7-9733376B0EA4}.Release|Any CPU.Build.0 = Release|Any CPU + {877417AD-1F8B-48A8-A0C1-A18FEA269564}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {877417AD-1F8B-48A8-A0C1-A18FEA269564}.Debug|Any CPU.Build.0 = Debug|Any CPU + {877417AD-1F8B-48A8-A0C1-A18FEA269564}.Release|Any CPU.ActiveCfg = Release|Any CPU + {877417AD-1F8B-48A8-A0C1-A18FEA269564}.Release|Any CPU.Build.0 = Release|Any CPU + {B8F06FF4-1C87-4483-9B0A-CEC862622BDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B8F06FF4-1C87-4483-9B0A-CEC862622BDA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B8F06FF4-1C87-4483-9B0A-CEC862622BDA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B8F06FF4-1C87-4483-9B0A-CEC862622BDA}.Release|Any CPU.Build.0 = Release|Any CPU + {16C31B01-EC91-41E5-8290-EBB887E75F23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {16C31B01-EC91-41E5-8290-EBB887E75F23}.Debug|Any CPU.Build.0 = Debug|Any CPU + {16C31B01-EC91-41E5-8290-EBB887E75F23}.Release|Any CPU.ActiveCfg = Release|Any CPU + {16C31B01-EC91-41E5-8290-EBB887E75F23}.Release|Any CPU.Build.0 = Release|Any CPU + {0D10C533-F687-40E9-AF63-B06345EAB5DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0D10C533-F687-40E9-AF63-B06345EAB5DF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0D10C533-F687-40E9-AF63-B06345EAB5DF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0D10C533-F687-40E9-AF63-B06345EAB5DF}.Release|Any CPU.Build.0 = Release|Any CPU + {83BCDD80-28B3-488A-9F65-27D2637F82F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {83BCDD80-28B3-488A-9F65-27D2637F82F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {83BCDD80-28B3-488A-9F65-27D2637F82F7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {83BCDD80-28B3-488A-9F65-27D2637F82F7}.Release|Any CPU.Build.0 = Release|Any CPU + {16EC4035-F8CA-47CB-9F18-4B151EAC28CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {16EC4035-F8CA-47CB-9F18-4B151EAC28CD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {16EC4035-F8CA-47CB-9F18-4B151EAC28CD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {16EC4035-F8CA-47CB-9F18-4B151EAC28CD}.Release|Any CPU.Build.0 = Release|Any CPU + {279A92D4-1017-4401-90B2-CDE013D6B2ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {279A92D4-1017-4401-90B2-CDE013D6B2ED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {279A92D4-1017-4401-90B2-CDE013D6B2ED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {279A92D4-1017-4401-90B2-CDE013D6B2ED}.Release|Any CPU.Build.0 = Release|Any CPU + {EF6DF7FF-BDE4-40BE-852F-FC7E49C51BFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EF6DF7FF-BDE4-40BE-852F-FC7E49C51BFF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EF6DF7FF-BDE4-40BE-852F-FC7E49C51BFF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EF6DF7FF-BDE4-40BE-852F-FC7E49C51BFF}.Release|Any CPU.Build.0 = Release|Any CPU + {97C10721-C4FC-49A0-902D-B28B30BA99B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {97C10721-C4FC-49A0-902D-B28B30BA99B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {97C10721-C4FC-49A0-902D-B28B30BA99B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {97C10721-C4FC-49A0-902D-B28B30BA99B9}.Release|Any CPU.Build.0 = Release|Any CPU + {CE791170-2CF8-45BC-B69C-7E0AB29E9FEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CE791170-2CF8-45BC-B69C-7E0AB29E9FEC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CE791170-2CF8-45BC-B69C-7E0AB29E9FEC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CE791170-2CF8-45BC-B69C-7E0AB29E9FEC}.Release|Any CPU.Build.0 = Release|Any CPU + {3C433895-A214-46AB-9603-4BBF398658AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3C433895-A214-46AB-9603-4BBF398658AC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3C433895-A214-46AB-9603-4BBF398658AC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3C433895-A214-46AB-9603-4BBF398658AC}.Release|Any CPU.Build.0 = Release|Any CPU + {B5579A89-D734-4C8B-B81C-E0CAA45AB769}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B5579A89-D734-4C8B-B81C-E0CAA45AB769}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B5579A89-D734-4C8B-B81C-E0CAA45AB769}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B5579A89-D734-4C8B-B81C-E0CAA45AB769}.Release|Any CPU.Build.0 = Release|Any CPU + {F73FDB0F-D5A5-481C-9ED7-CC4BCD52AD45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F73FDB0F-D5A5-481C-9ED7-CC4BCD52AD45}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F73FDB0F-D5A5-481C-9ED7-CC4BCD52AD45}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F73FDB0F-D5A5-481C-9ED7-CC4BCD52AD45}.Release|Any CPU.Build.0 = Release|Any CPU + {1ABA4692-2B45-487C-AF97-578C289B4D83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1ABA4692-2B45-487C-AF97-578C289B4D83}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1ABA4692-2B45-487C-AF97-578C289B4D83}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1ABA4692-2B45-487C-AF97-578C289B4D83}.Release|Any CPU.Build.0 = Release|Any CPU + {43873E03-3D5E-4467-BD34-BFA0F3C62E3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {43873E03-3D5E-4467-BD34-BFA0F3C62E3E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {43873E03-3D5E-4467-BD34-BFA0F3C62E3E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {43873E03-3D5E-4467-BD34-BFA0F3C62E3E}.Release|Any CPU.Build.0 = Release|Any CPU + {FCFF821D-C176-4F36-972F-0159792DC800}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FCFF821D-C176-4F36-972F-0159792DC800}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FCFF821D-C176-4F36-972F-0159792DC800}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FCFF821D-C176-4F36-972F-0159792DC800}.Release|Any CPU.Build.0 = Release|Any CPU + {38CE2218-BAD5-4061-8B68-E266DA86C628}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {38CE2218-BAD5-4061-8B68-E266DA86C628}.Debug|Any CPU.Build.0 = Debug|Any CPU + {38CE2218-BAD5-4061-8B68-E266DA86C628}.Release|Any CPU.ActiveCfg = Release|Any CPU + {38CE2218-BAD5-4061-8B68-E266DA86C628}.Release|Any CPU.Build.0 = Release|Any CPU + {8D57DECA-7D62-4673-A443-A39265AB925F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8D57DECA-7D62-4673-A443-A39265AB925F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8D57DECA-7D62-4673-A443-A39265AB925F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8D57DECA-7D62-4673-A443-A39265AB925F}.Release|Any CPU.Build.0 = Release|Any CPU + {4F21019C-CC57-4A5F-9A97-AE62D9AE3543}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4F21019C-CC57-4A5F-9A97-AE62D9AE3543}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4F21019C-CC57-4A5F-9A97-AE62D9AE3543}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4F21019C-CC57-4A5F-9A97-AE62D9AE3543}.Release|Any CPU.Build.0 = Release|Any CPU + {C77FF650-6789-44F4-93AC-7A00674D5E04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C77FF650-6789-44F4-93AC-7A00674D5E04}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C77FF650-6789-44F4-93AC-7A00674D5E04}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C77FF650-6789-44F4-93AC-7A00674D5E04}.Release|Any CPU.Build.0 = Release|Any CPU + {E926AC18-7F96-4FF1-9D32-F857DDA35EB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E926AC18-7F96-4FF1-9D32-F857DDA35EB0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E926AC18-7F96-4FF1-9D32-F857DDA35EB0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E926AC18-7F96-4FF1-9D32-F857DDA35EB0}.Release|Any CPU.Build.0 = Release|Any CPU + {E470E285-3A1C-40AA-B3AA-A9EEB9065358}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E470E285-3A1C-40AA-B3AA-A9EEB9065358}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E470E285-3A1C-40AA-B3AA-A9EEB9065358}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E470E285-3A1C-40AA-B3AA-A9EEB9065358}.Release|Any CPU.Build.0 = Release|Any CPU + {2617DFDC-2935-40D3-9301-2C09C0311145}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2617DFDC-2935-40D3-9301-2C09C0311145}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2617DFDC-2935-40D3-9301-2C09C0311145}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2617DFDC-2935-40D3-9301-2C09C0311145}.Release|Any CPU.Build.0 = Release|Any CPU + {F60F7E39-DF2C-4312-B716-32AB33F9FDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F60F7E39-DF2C-4312-B716-32AB33F9FDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F60F7E39-DF2C-4312-B716-32AB33F9FDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F60F7E39-DF2C-4312-B716-32AB33F9FDC5}.Release|Any CPU.Build.0 = Release|Any CPU + {AF5E30DE-3A4C-4F92-94AE-BA7A7AE80D90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AF5E30DE-3A4C-4F92-94AE-BA7A7AE80D90}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AF5E30DE-3A4C-4F92-94AE-BA7A7AE80D90}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AF5E30DE-3A4C-4F92-94AE-BA7A7AE80D90}.Release|Any CPU.Build.0 = Release|Any CPU + {39951A36-F719-4B6F-AF12-FE9FCCE7B9D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {39951A36-F719-4B6F-AF12-FE9FCCE7B9D3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {39951A36-F719-4B6F-AF12-FE9FCCE7B9D3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {39951A36-F719-4B6F-AF12-FE9FCCE7B9D3}.Release|Any CPU.Build.0 = Release|Any CPU + {73FEA730-2607-47DA-B719-08CDB81D310B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {73FEA730-2607-47DA-B719-08CDB81D310B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {73FEA730-2607-47DA-B719-08CDB81D310B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {73FEA730-2607-47DA-B719-08CDB81D310B}.Release|Any CPU.Build.0 = Release|Any CPU + {E7855CDF-09F7-4323-BDB7-37B8A1307D69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E7855CDF-09F7-4323-BDB7-37B8A1307D69}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E7855CDF-09F7-4323-BDB7-37B8A1307D69}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E7855CDF-09F7-4323-BDB7-37B8A1307D69}.Release|Any CPU.Build.0 = Release|Any CPU + {8342C992-C2E6-4161-B0E7-1F94469DE733}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8342C992-C2E6-4161-B0E7-1F94469DE733}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8342C992-C2E6-4161-B0E7-1F94469DE733}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8342C992-C2E6-4161-B0E7-1F94469DE733}.Release|Any CPU.Build.0 = Release|Any CPU + {2E1E4F8B-875E-4AF1-95F4-2A7D1B1EA3D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2E1E4F8B-875E-4AF1-95F4-2A7D1B1EA3D5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2E1E4F8B-875E-4AF1-95F4-2A7D1B1EA3D5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2E1E4F8B-875E-4AF1-95F4-2A7D1B1EA3D5}.Release|Any CPU.Build.0 = Release|Any CPU + {601063A2-AA25-405D-82D6-978C25E71D0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {601063A2-AA25-405D-82D6-978C25E71D0F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {601063A2-AA25-405D-82D6-978C25E71D0F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {601063A2-AA25-405D-82D6-978C25E71D0F}.Release|Any CPU.Build.0 = Release|Any CPU + {F9B66D4E-DD37-4B50-B704-9FBC1EFC3E7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F9B66D4E-DD37-4B50-B704-9FBC1EFC3E7F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F9B66D4E-DD37-4B50-B704-9FBC1EFC3E7F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F9B66D4E-DD37-4B50-B704-9FBC1EFC3E7F}.Release|Any CPU.Build.0 = Release|Any CPU + {539C39B0-2A0F-4218-ADB9-7C4D73C26C24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {539C39B0-2A0F-4218-ADB9-7C4D73C26C24}.Debug|Any CPU.Build.0 = Debug|Any CPU + {539C39B0-2A0F-4218-ADB9-7C4D73C26C24}.Release|Any CPU.ActiveCfg = Release|Any CPU + {539C39B0-2A0F-4218-ADB9-7C4D73C26C24}.Release|Any CPU.Build.0 = Release|Any CPU + {D63C4162-1D47-4E0B-947B-4104F5601812}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D63C4162-1D47-4E0B-947B-4104F5601812}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D63C4162-1D47-4E0B-947B-4104F5601812}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D63C4162-1D47-4E0B-947B-4104F5601812}.Release|Any CPU.Build.0 = Release|Any CPU + {439F5255-5ABB-4097-A718-9D47615FBB0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {439F5255-5ABB-4097-A718-9D47615FBB0C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {439F5255-5ABB-4097-A718-9D47615FBB0C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {439F5255-5ABB-4097-A718-9D47615FBB0C}.Release|Any CPU.Build.0 = Release|Any CPU + {9A889644-C632-4CC0-AB47-FF8D14932188}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9A889644-C632-4CC0-AB47-FF8D14932188}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9A889644-C632-4CC0-AB47-FF8D14932188}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9A889644-C632-4CC0-AB47-FF8D14932188}.Release|Any CPU.Build.0 = Release|Any CPU + {F83B6A40-B596-4A5E-81A3-92565F06BD94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F83B6A40-B596-4A5E-81A3-92565F06BD94}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F83B6A40-B596-4A5E-81A3-92565F06BD94}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F83B6A40-B596-4A5E-81A3-92565F06BD94}.Release|Any CPU.Build.0 = Release|Any CPU + {7757E901-AE0D-424E-A555-49A7EE8A314F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7757E901-AE0D-424E-A555-49A7EE8A314F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7757E901-AE0D-424E-A555-49A7EE8A314F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7757E901-AE0D-424E-A555-49A7EE8A314F}.Release|Any CPU.Build.0 = Release|Any CPU + {90DBF676-6543-4845-8A05-2CB5C9425E3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90DBF676-6543-4845-8A05-2CB5C9425E3F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90DBF676-6543-4845-8A05-2CB5C9425E3F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90DBF676-6543-4845-8A05-2CB5C9425E3F}.Release|Any CPU.Build.0 = Release|Any CPU + {3C4E2021-48CD-4487-8E4E-54E85EF7C69B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3C4E2021-48CD-4487-8E4E-54E85EF7C69B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3C4E2021-48CD-4487-8E4E-54E85EF7C69B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3C4E2021-48CD-4487-8E4E-54E85EF7C69B}.Release|Any CPU.Build.0 = Release|Any CPU + {82D37BD6-A8B7-439A-9998-1D38FF8F08BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {82D37BD6-A8B7-439A-9998-1D38FF8F08BA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {82D37BD6-A8B7-439A-9998-1D38FF8F08BA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {82D37BD6-A8B7-439A-9998-1D38FF8F08BA}.Release|Any CPU.Build.0 = Release|Any CPU + {FCE1C83E-5C74-41DF-9C26-775F0BD6AA70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FCE1C83E-5C74-41DF-9C26-775F0BD6AA70}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FCE1C83E-5C74-41DF-9C26-775F0BD6AA70}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FCE1C83E-5C74-41DF-9C26-775F0BD6AA70}.Release|Any CPU.Build.0 = Release|Any CPU + {94375706-915F-42D8-B013-0B888F4DD4B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {94375706-915F-42D8-B013-0B888F4DD4B0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {94375706-915F-42D8-B013-0B888F4DD4B0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {94375706-915F-42D8-B013-0B888F4DD4B0}.Release|Any CPU.Build.0 = Release|Any CPU + {E12773A9-E9B4-4AB0-AB97-B8291AC29DCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E12773A9-E9B4-4AB0-AB97-B8291AC29DCC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E12773A9-E9B4-4AB0-AB97-B8291AC29DCC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E12773A9-E9B4-4AB0-AB97-B8291AC29DCC}.Release|Any CPU.Build.0 = Release|Any CPU + {5B3B245A-5916-4DE7-AF6D-C71C703E0E6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5B3B245A-5916-4DE7-AF6D-C71C703E0E6E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5B3B245A-5916-4DE7-AF6D-C71C703E0E6E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5B3B245A-5916-4DE7-AF6D-C71C703E0E6E}.Release|Any CPU.Build.0 = Release|Any CPU + {6D09848F-E58E-479B-A1E8-7E3F1FF90DA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6D09848F-E58E-479B-A1E8-7E3F1FF90DA2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6D09848F-E58E-479B-A1E8-7E3F1FF90DA2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6D09848F-E58E-479B-A1E8-7E3F1FF90DA2}.Release|Any CPU.Build.0 = Release|Any CPU + {90814AD6-B387-49A7-9657-020FB917BE1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90814AD6-B387-49A7-9657-020FB917BE1A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90814AD6-B387-49A7-9657-020FB917BE1A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90814AD6-B387-49A7-9657-020FB917BE1A}.Release|Any CPU.Build.0 = Release|Any CPU + {35C18531-353E-44D7-8516-43105B89E5CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {35C18531-353E-44D7-8516-43105B89E5CB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {35C18531-353E-44D7-8516-43105B89E5CB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {35C18531-353E-44D7-8516-43105B89E5CB}.Release|Any CPU.Build.0 = Release|Any CPU + {265F2A9D-E12A-4664-B5C8-C338566DD0FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {265F2A9D-E12A-4664-B5C8-C338566DD0FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {265F2A9D-E12A-4664-B5C8-C338566DD0FC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {265F2A9D-E12A-4664-B5C8-C338566DD0FC}.Release|Any CPU.Build.0 = Release|Any CPU + {282545E3-0E75-4F5D-BDBA-8C8C74F1CEEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {282545E3-0E75-4F5D-BDBA-8C8C74F1CEEE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {282545E3-0E75-4F5D-BDBA-8C8C74F1CEEE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {282545E3-0E75-4F5D-BDBA-8C8C74F1CEEE}.Release|Any CPU.Build.0 = Release|Any CPU + {66171F39-F3B1-4714-BFDB-2040551D3D2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {66171F39-F3B1-4714-BFDB-2040551D3D2E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {66171F39-F3B1-4714-BFDB-2040551D3D2E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {66171F39-F3B1-4714-BFDB-2040551D3D2E}.Release|Any CPU.Build.0 = Release|Any CPU + {085B1327-58FB-4359-A54C-402D3F810079}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {085B1327-58FB-4359-A54C-402D3F810079}.Debug|Any CPU.Build.0 = Debug|Any CPU + {085B1327-58FB-4359-A54C-402D3F810079}.Release|Any CPU.ActiveCfg = Release|Any CPU + {085B1327-58FB-4359-A54C-402D3F810079}.Release|Any CPU.Build.0 = Release|Any CPU + {7E33210D-6A0F-4DB8-951D-B981BE3CB0C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7E33210D-6A0F-4DB8-951D-B981BE3CB0C7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7E33210D-6A0F-4DB8-951D-B981BE3CB0C7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7E33210D-6A0F-4DB8-951D-B981BE3CB0C7}.Release|Any CPU.Build.0 = Release|Any CPU + {D18EA39C-E0F4-4450-9C27-CB471A424A8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D18EA39C-E0F4-4450-9C27-CB471A424A8E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D18EA39C-E0F4-4450-9C27-CB471A424A8E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D18EA39C-E0F4-4450-9C27-CB471A424A8E}.Release|Any CPU.Build.0 = Release|Any CPU + {10AEE6DD-C38F-4CCA-BCFE-AC4B74C75EBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {10AEE6DD-C38F-4CCA-BCFE-AC4B74C75EBF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {10AEE6DD-C38F-4CCA-BCFE-AC4B74C75EBF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {10AEE6DD-C38F-4CCA-BCFE-AC4B74C75EBF}.Release|Any CPU.Build.0 = Release|Any CPU + {0EA31342-17C3-40F4-9717-F64DF27F2C59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0EA31342-17C3-40F4-9717-F64DF27F2C59}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0EA31342-17C3-40F4-9717-F64DF27F2C59}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0EA31342-17C3-40F4-9717-F64DF27F2C59}.Release|Any CPU.Build.0 = Release|Any CPU + {21DEBE3D-3302-4CDA-B06A-DB25778CB9E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {21DEBE3D-3302-4CDA-B06A-DB25778CB9E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {21DEBE3D-3302-4CDA-B06A-DB25778CB9E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {21DEBE3D-3302-4CDA-B06A-DB25778CB9E3}.Release|Any CPU.Build.0 = Release|Any CPU + {7F4E5B8E-0C7A-4B3B-B23E-E4360DCE6205}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7F4E5B8E-0C7A-4B3B-B23E-E4360DCE6205}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7F4E5B8E-0C7A-4B3B-B23E-E4360DCE6205}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7F4E5B8E-0C7A-4B3B-B23E-E4360DCE6205}.Release|Any CPU.Build.0 = Release|Any CPU + {B67C74E4-CA8C-4278-A5E5-C1006A9E6837}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B67C74E4-CA8C-4278-A5E5-C1006A9E6837}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B67C74E4-CA8C-4278-A5E5-C1006A9E6837}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B67C74E4-CA8C-4278-A5E5-C1006A9E6837}.Release|Any CPU.Build.0 = Release|Any CPU + {1A106E37-21A6-48CC-A2E9-AF3FEDCAD7E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1A106E37-21A6-48CC-A2E9-AF3FEDCAD7E2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1A106E37-21A6-48CC-A2E9-AF3FEDCAD7E2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1A106E37-21A6-48CC-A2E9-AF3FEDCAD7E2}.Release|Any CPU.Build.0 = Release|Any CPU + {F1F988EC-6C2D-4B69-BF67-663D2E051100}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F1F988EC-6C2D-4B69-BF67-663D2E051100}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F1F988EC-6C2D-4B69-BF67-663D2E051100}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F1F988EC-6C2D-4B69-BF67-663D2E051100}.Release|Any CPU.Build.0 = Release|Any CPU + {1FC80B87-BC1B-416F-9D3A-47BE111C075D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1FC80B87-BC1B-416F-9D3A-47BE111C075D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1FC80B87-BC1B-416F-9D3A-47BE111C075D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1FC80B87-BC1B-416F-9D3A-47BE111C075D}.Release|Any CPU.Build.0 = Release|Any CPU + {94933E00-C975-4C62-A596-EE9582030BD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {94933E00-C975-4C62-A596-EE9582030BD0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {94933E00-C975-4C62-A596-EE9582030BD0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {94933E00-C975-4C62-A596-EE9582030BD0}.Release|Any CPU.Build.0 = Release|Any CPU + {0F8B0D00-BC20-4FFC-A7C5-88017A3C09A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0F8B0D00-BC20-4FFC-A7C5-88017A3C09A9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0F8B0D00-BC20-4FFC-A7C5-88017A3C09A9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0F8B0D00-BC20-4FFC-A7C5-88017A3C09A9}.Release|Any CPU.Build.0 = Release|Any CPU + {6780EF15-C7DF-4D44-82F6-1B98A05B82B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6780EF15-C7DF-4D44-82F6-1B98A05B82B7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6780EF15-C7DF-4D44-82F6-1B98A05B82B7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6780EF15-C7DF-4D44-82F6-1B98A05B82B7}.Release|Any CPU.Build.0 = Release|Any CPU + {A58518A6-7E40-4482-AFD4-4DB7E21FF27C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A58518A6-7E40-4482-AFD4-4DB7E21FF27C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A58518A6-7E40-4482-AFD4-4DB7E21FF27C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A58518A6-7E40-4482-AFD4-4DB7E21FF27C}.Release|Any CPU.Build.0 = Release|Any CPU + {080201E0-7712-4A50-A193-98A562030938}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {080201E0-7712-4A50-A193-98A562030938}.Debug|Any CPU.Build.0 = Debug|Any CPU + {080201E0-7712-4A50-A193-98A562030938}.Release|Any CPU.ActiveCfg = Release|Any CPU + {080201E0-7712-4A50-A193-98A562030938}.Release|Any CPU.Build.0 = Release|Any CPU + {4F746914-FBD4-4AE8-A22F-C1745E21515B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4F746914-FBD4-4AE8-A22F-C1745E21515B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4F746914-FBD4-4AE8-A22F-C1745E21515B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4F746914-FBD4-4AE8-A22F-C1745E21515B}.Release|Any CPU.Build.0 = Release|Any CPU + {9AF5B0F0-DA63-4694-98B0-5496A78EB8CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9AF5B0F0-DA63-4694-98B0-5496A78EB8CB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9AF5B0F0-DA63-4694-98B0-5496A78EB8CB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9AF5B0F0-DA63-4694-98B0-5496A78EB8CB}.Release|Any CPU.Build.0 = Release|Any CPU + {DFBA72E3-FB45-4D7C-A1DE-993D984E7034}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DFBA72E3-FB45-4D7C-A1DE-993D984E7034}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DFBA72E3-FB45-4D7C-A1DE-993D984E7034}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DFBA72E3-FB45-4D7C-A1DE-993D984E7034}.Release|Any CPU.Build.0 = Release|Any CPU + {2691FC24-086E-417A-84EE-11C481308D4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2691FC24-086E-417A-84EE-11C481308D4C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2691FC24-086E-417A-84EE-11C481308D4C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2691FC24-086E-417A-84EE-11C481308D4C}.Release|Any CPU.Build.0 = Release|Any CPU + {9539BC5F-7B48-4E69-8603-703EA84CFE87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9539BC5F-7B48-4E69-8603-703EA84CFE87}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9539BC5F-7B48-4E69-8603-703EA84CFE87}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9539BC5F-7B48-4E69-8603-703EA84CFE87}.Release|Any CPU.Build.0 = Release|Any CPU + {697BA3B9-7180-4CE7-98BA-A480770D58AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {697BA3B9-7180-4CE7-98BA-A480770D58AF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {697BA3B9-7180-4CE7-98BA-A480770D58AF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {697BA3B9-7180-4CE7-98BA-A480770D58AF}.Release|Any CPU.Build.0 = Release|Any CPU + {0EB38D32-4706-4C70-8685-4A770322346B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0EB38D32-4706-4C70-8685-4A770322346B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0EB38D32-4706-4C70-8685-4A770322346B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0EB38D32-4706-4C70-8685-4A770322346B}.Release|Any CPU.Build.0 = Release|Any CPU + {3C3B3D15-789A-40C4-AEC0-0B149194BDFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3C3B3D15-789A-40C4-AEC0-0B149194BDFA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3C3B3D15-789A-40C4-AEC0-0B149194BDFA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3C3B3D15-789A-40C4-AEC0-0B149194BDFA}.Release|Any CPU.Build.0 = Release|Any CPU + {A01D6EFA-196F-4790-AE91-0976D747282C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A01D6EFA-196F-4790-AE91-0976D747282C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A01D6EFA-196F-4790-AE91-0976D747282C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A01D6EFA-196F-4790-AE91-0976D747282C}.Release|Any CPU.Build.0 = Release|Any CPU + {4E5EC963-1D95-4962-8201-F4D84EA26ED2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4E5EC963-1D95-4962-8201-F4D84EA26ED2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4E5EC963-1D95-4962-8201-F4D84EA26ED2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4E5EC963-1D95-4962-8201-F4D84EA26ED2}.Release|Any CPU.Build.0 = Release|Any CPU + {DD2F361F-94AB-4494-A8D1-E69AB68F2FD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DD2F361F-94AB-4494-A8D1-E69AB68F2FD6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DD2F361F-94AB-4494-A8D1-E69AB68F2FD6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DD2F361F-94AB-4494-A8D1-E69AB68F2FD6}.Release|Any CPU.Build.0 = Release|Any CPU + {B096AA61-812C-429B-92FF-0C3C7F66F05E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B096AA61-812C-429B-92FF-0C3C7F66F05E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B096AA61-812C-429B-92FF-0C3C7F66F05E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B096AA61-812C-429B-92FF-0C3C7F66F05E}.Release|Any CPU.Build.0 = Release|Any CPU + {B3315091-13D9-4A5C-B4B0-CAF2AF74F371}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B3315091-13D9-4A5C-B4B0-CAF2AF74F371}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B3315091-13D9-4A5C-B4B0-CAF2AF74F371}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B3315091-13D9-4A5C-B4B0-CAF2AF74F371}.Release|Any CPU.Build.0 = Release|Any CPU + {EC1576F4-261B-4040-95D2-9BED62AD48EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EC1576F4-261B-4040-95D2-9BED62AD48EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC1576F4-261B-4040-95D2-9BED62AD48EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC1576F4-261B-4040-95D2-9BED62AD48EF}.Release|Any CPU.Build.0 = Release|Any CPU + {A3768550-A438-4E87-9547-FBA625FB8353}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A3768550-A438-4E87-9547-FBA625FB8353}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3768550-A438-4E87-9547-FBA625FB8353}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A3768550-A438-4E87-9547-FBA625FB8353}.Release|Any CPU.Build.0 = Release|Any CPU + {088072CE-7129-4A2B-8A69-E4A2CFB39EDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {088072CE-7129-4A2B-8A69-E4A2CFB39EDF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {088072CE-7129-4A2B-8A69-E4A2CFB39EDF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {088072CE-7129-4A2B-8A69-E4A2CFB39EDF}.Release|Any CPU.Build.0 = Release|Any CPU + {9E283327-123E-4495-9142-6A27F55282D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9E283327-123E-4495-9142-6A27F55282D5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9E283327-123E-4495-9142-6A27F55282D5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9E283327-123E-4495-9142-6A27F55282D5}.Release|Any CPU.Build.0 = Release|Any CPU + {5FD51DF6-E318-4A52-BECE-B95AFF9AF762}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5FD51DF6-E318-4A52-BECE-B95AFF9AF762}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5FD51DF6-E318-4A52-BECE-B95AFF9AF762}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5FD51DF6-E318-4A52-BECE-B95AFF9AF762}.Release|Any CPU.Build.0 = Release|Any CPU + {58207E90-49F7-4241-BA38-B4997E04E667}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58207E90-49F7-4241-BA38-B4997E04E667}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58207E90-49F7-4241-BA38-B4997E04E667}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58207E90-49F7-4241-BA38-B4997E04E667}.Release|Any CPU.Build.0 = Release|Any CPU + {9B7A791A-725E-40E4-A885-F1FFAFE88612}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9B7A791A-725E-40E4-A885-F1FFAFE88612}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9B7A791A-725E-40E4-A885-F1FFAFE88612}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9B7A791A-725E-40E4-A885-F1FFAFE88612}.Release|Any CPU.Build.0 = Release|Any CPU + {6C2391E4-15F3-40CF-8C16-787066E8017C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6C2391E4-15F3-40CF-8C16-787066E8017C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6C2391E4-15F3-40CF-8C16-787066E8017C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6C2391E4-15F3-40CF-8C16-787066E8017C}.Release|Any CPU.Build.0 = Release|Any CPU + {930FEF59-7A4C-49DA-B522-1D7C8D56F58E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {930FEF59-7A4C-49DA-B522-1D7C8D56F58E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {930FEF59-7A4C-49DA-B522-1D7C8D56F58E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {930FEF59-7A4C-49DA-B522-1D7C8D56F58E}.Release|Any CPU.Build.0 = Release|Any CPU + {4DC2FB97-A1C0-4085-932B-7D87D1C2CCDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4DC2FB97-A1C0-4085-932B-7D87D1C2CCDE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4DC2FB97-A1C0-4085-932B-7D87D1C2CCDE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4DC2FB97-A1C0-4085-932B-7D87D1C2CCDE}.Release|Any CPU.Build.0 = Release|Any CPU + {060BF9A0-030F-4C50-91F8-76DAC3F43636}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {060BF9A0-030F-4C50-91F8-76DAC3F43636}.Debug|Any CPU.Build.0 = Debug|Any CPU + {060BF9A0-030F-4C50-91F8-76DAC3F43636}.Release|Any CPU.ActiveCfg = Release|Any CPU + {060BF9A0-030F-4C50-91F8-76DAC3F43636}.Release|Any CPU.Build.0 = Release|Any CPU + {F15A392F-762C-4CFB-92BF-E76572E332CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F15A392F-762C-4CFB-92BF-E76572E332CD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F15A392F-762C-4CFB-92BF-E76572E332CD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F15A392F-762C-4CFB-92BF-E76572E332CD}.Release|Any CPU.Build.0 = Release|Any CPU + {E1F3468D-208F-49B8-966B-76C807CE01AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E1F3468D-208F-49B8-966B-76C807CE01AD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E1F3468D-208F-49B8-966B-76C807CE01AD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E1F3468D-208F-49B8-966B-76C807CE01AD}.Release|Any CPU.Build.0 = Release|Any CPU + {89E47DE5-D2EA-4666-8E1F-CEE8C80303C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {89E47DE5-D2EA-4666-8E1F-CEE8C80303C3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {89E47DE5-D2EA-4666-8E1F-CEE8C80303C3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {89E47DE5-D2EA-4666-8E1F-CEE8C80303C3}.Release|Any CPU.Build.0 = Release|Any CPU + {0EAD75CE-B86D-4F52-8B8B-D49F4F4CED29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0EAD75CE-B86D-4F52-8B8B-D49F4F4CED29}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0EAD75CE-B86D-4F52-8B8B-D49F4F4CED29}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0EAD75CE-B86D-4F52-8B8B-D49F4F4CED29}.Release|Any CPU.Build.0 = Release|Any CPU + {58271805-C59E-45FB-9D7B-CBAFC7BDF66C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58271805-C59E-45FB-9D7B-CBAFC7BDF66C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58271805-C59E-45FB-9D7B-CBAFC7BDF66C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58271805-C59E-45FB-9D7B-CBAFC7BDF66C}.Release|Any CPU.Build.0 = Release|Any CPU + {DE5EC147-0305-459E-9FDF-CCE514A239D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DE5EC147-0305-459E-9FDF-CCE514A239D1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DE5EC147-0305-459E-9FDF-CCE514A239D1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DE5EC147-0305-459E-9FDF-CCE514A239D1}.Release|Any CPU.Build.0 = Release|Any CPU + {DD8A60AD-D7A9-438F-985E-083132466AC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DD8A60AD-D7A9-438F-985E-083132466AC6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DD8A60AD-D7A9-438F-985E-083132466AC6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DD8A60AD-D7A9-438F-985E-083132466AC6}.Release|Any CPU.Build.0 = Release|Any CPU + {2F665879-8865-4765-A03C-FFE2D0D6E734}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2F665879-8865-4765-A03C-FFE2D0D6E734}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2F665879-8865-4765-A03C-FFE2D0D6E734}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2F665879-8865-4765-A03C-FFE2D0D6E734}.Release|Any CPU.Build.0 = Release|Any CPU + {37896C82-24DF-4FED-8A44-537910360A40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {37896C82-24DF-4FED-8A44-537910360A40}.Debug|Any CPU.Build.0 = Debug|Any CPU + {37896C82-24DF-4FED-8A44-537910360A40}.Release|Any CPU.ActiveCfg = Release|Any CPU + {37896C82-24DF-4FED-8A44-537910360A40}.Release|Any CPU.Build.0 = Release|Any CPU + {B4533FEF-E9CF-4E3B-AAB6-DC72C5EB90DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B4533FEF-E9CF-4E3B-AAB6-DC72C5EB90DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B4533FEF-E9CF-4E3B-AAB6-DC72C5EB90DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B4533FEF-E9CF-4E3B-AAB6-DC72C5EB90DD}.Release|Any CPU.Build.0 = Release|Any CPU + {6878680C-37EA-4715-BDF0-7E1143ED0998}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6878680C-37EA-4715-BDF0-7E1143ED0998}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6878680C-37EA-4715-BDF0-7E1143ED0998}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6878680C-37EA-4715-BDF0-7E1143ED0998}.Release|Any CPU.Build.0 = Release|Any CPU + {B9817971-4FA0-4B25-9482-77B5A3A971DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B9817971-4FA0-4B25-9482-77B5A3A971DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B9817971-4FA0-4B25-9482-77B5A3A971DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B9817971-4FA0-4B25-9482-77B5A3A971DC}.Release|Any CPU.Build.0 = Release|Any CPU + {8F1382A8-7B0F-4A8D-AC0A-1F6C293C6847}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8F1382A8-7B0F-4A8D-AC0A-1F6C293C6847}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8F1382A8-7B0F-4A8D-AC0A-1F6C293C6847}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8F1382A8-7B0F-4A8D-AC0A-1F6C293C6847}.Release|Any CPU.Build.0 = Release|Any CPU + {B0D0BAA9-B6B2-49A4-B08C-F16D7EE65570}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0D0BAA9-B6B2-49A4-B08C-F16D7EE65570}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0D0BAA9-B6B2-49A4-B08C-F16D7EE65570}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0D0BAA9-B6B2-49A4-B08C-F16D7EE65570}.Release|Any CPU.Build.0 = Release|Any CPU + {9DABFD9F-EC4C-42A1-B744-00F3E0AFF2B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9DABFD9F-EC4C-42A1-B744-00F3E0AFF2B8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9DABFD9F-EC4C-42A1-B744-00F3E0AFF2B8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9DABFD9F-EC4C-42A1-B744-00F3E0AFF2B8}.Release|Any CPU.Build.0 = Release|Any CPU + {FB5ABFC7-A493-4F10-B4C9-3E7E44EFC9B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FB5ABFC7-A493-4F10-B4C9-3E7E44EFC9B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FB5ABFC7-A493-4F10-B4C9-3E7E44EFC9B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FB5ABFC7-A493-4F10-B4C9-3E7E44EFC9B9}.Release|Any CPU.Build.0 = Release|Any CPU + {E56B344E-3F12-4FF8-B46C-9D87A5512E72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E56B344E-3F12-4FF8-B46C-9D87A5512E72}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E56B344E-3F12-4FF8-B46C-9D87A5512E72}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E56B344E-3F12-4FF8-B46C-9D87A5512E72}.Release|Any CPU.Build.0 = Release|Any CPU + {EC0C2649-5F1C-4AF6-BC4C-53D1FF9A1BD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EC0C2649-5F1C-4AF6-BC4C-53D1FF9A1BD7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC0C2649-5F1C-4AF6-BC4C-53D1FF9A1BD7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC0C2649-5F1C-4AF6-BC4C-53D1FF9A1BD7}.Release|Any CPU.Build.0 = Release|Any CPU + {C5C81D9D-27CD-4F23-B660-903AFDDD7B71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C5C81D9D-27CD-4F23-B660-903AFDDD7B71}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C5C81D9D-27CD-4F23-B660-903AFDDD7B71}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C5C81D9D-27CD-4F23-B660-903AFDDD7B71}.Release|Any CPU.Build.0 = Release|Any CPU + {C3309B6A-0512-4C93-B472-CF6A10ED8682}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C3309B6A-0512-4C93-B472-CF6A10ED8682}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C3309B6A-0512-4C93-B472-CF6A10ED8682}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C3309B6A-0512-4C93-B472-CF6A10ED8682}.Release|Any CPU.Build.0 = Release|Any CPU + {629A1C79-7DE4-4EFC-8D34-ED1809AD5888}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {629A1C79-7DE4-4EFC-8D34-ED1809AD5888}.Debug|Any CPU.Build.0 = Debug|Any CPU + {629A1C79-7DE4-4EFC-8D34-ED1809AD5888}.Release|Any CPU.ActiveCfg = Release|Any CPU + {629A1C79-7DE4-4EFC-8D34-ED1809AD5888}.Release|Any CPU.Build.0 = Release|Any CPU + {40145A2C-6E76-4069-99D8-FFF3CF0CF3BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {40145A2C-6E76-4069-99D8-FFF3CF0CF3BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {40145A2C-6E76-4069-99D8-FFF3CF0CF3BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {40145A2C-6E76-4069-99D8-FFF3CF0CF3BC}.Release|Any CPU.Build.0 = Release|Any CPU + {0E72DA6A-5D09-45F5-AD77-39A92B00A9CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E72DA6A-5D09-45F5-AD77-39A92B00A9CF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E72DA6A-5D09-45F5-AD77-39A92B00A9CF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E72DA6A-5D09-45F5-AD77-39A92B00A9CF}.Release|Any CPU.Build.0 = Release|Any CPU + {98A129AB-0FF8-4B07-8516-DA23AB5C8735}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {98A129AB-0FF8-4B07-8516-DA23AB5C8735}.Debug|Any CPU.Build.0 = Debug|Any CPU + {98A129AB-0FF8-4B07-8516-DA23AB5C8735}.Release|Any CPU.ActiveCfg = Release|Any CPU + {98A129AB-0FF8-4B07-8516-DA23AB5C8735}.Release|Any CPU.Build.0 = Release|Any CPU + {B8972679-FDC1-4998-A18D-E501EFFA467D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B8972679-FDC1-4998-A18D-E501EFFA467D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B8972679-FDC1-4998-A18D-E501EFFA467D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B8972679-FDC1-4998-A18D-E501EFFA467D}.Release|Any CPU.Build.0 = Release|Any CPU + {6CDA732B-10A8-441E-A243-F83BA89ED1F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6CDA732B-10A8-441E-A243-F83BA89ED1F6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6CDA732B-10A8-441E-A243-F83BA89ED1F6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6CDA732B-10A8-441E-A243-F83BA89ED1F6}.Release|Any CPU.Build.0 = Release|Any CPU + {D8C0C69F-EF4F-4883-972E-C2E6B6A9566E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D8C0C69F-EF4F-4883-972E-C2E6B6A9566E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D8C0C69F-EF4F-4883-972E-C2E6B6A9566E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D8C0C69F-EF4F-4883-972E-C2E6B6A9566E}.Release|Any CPU.Build.0 = Release|Any CPU + {90AA75BA-134C-4E62-B3A5-E7DB05DF12FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90AA75BA-134C-4E62-B3A5-E7DB05DF12FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90AA75BA-134C-4E62-B3A5-E7DB05DF12FC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90AA75BA-134C-4E62-B3A5-E7DB05DF12FC}.Release|Any CPU.Build.0 = Release|Any CPU + {2BF08C83-C802-45A8-8219-FC77B3B9CB06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2BF08C83-C802-45A8-8219-FC77B3B9CB06}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2BF08C83-C802-45A8-8219-FC77B3B9CB06}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2BF08C83-C802-45A8-8219-FC77B3B9CB06}.Release|Any CPU.Build.0 = Release|Any CPU + {81CB1F26-4C07-4B9F-A695-AB810B38E15B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {81CB1F26-4C07-4B9F-A695-AB810B38E15B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {81CB1F26-4C07-4B9F-A695-AB810B38E15B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {81CB1F26-4C07-4B9F-A695-AB810B38E15B}.Release|Any CPU.Build.0 = Release|Any CPU + {47A2307D-717C-4ABA-8FBD-9717B0C4CC8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {47A2307D-717C-4ABA-8FBD-9717B0C4CC8C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {47A2307D-717C-4ABA-8FBD-9717B0C4CC8C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {47A2307D-717C-4ABA-8FBD-9717B0C4CC8C}.Release|Any CPU.Build.0 = Release|Any CPU + {7DE4615E-0E42-4C72-8B63-AFE151321024}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7DE4615E-0E42-4C72-8B63-AFE151321024}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7DE4615E-0E42-4C72-8B63-AFE151321024}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7DE4615E-0E42-4C72-8B63-AFE151321024}.Release|Any CPU.Build.0 = Release|Any CPU + {42EA49AE-5C87-4C75-83EF-964D4B24E9E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {42EA49AE-5C87-4C75-83EF-964D4B24E9E9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {42EA49AE-5C87-4C75-83EF-964D4B24E9E9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {42EA49AE-5C87-4C75-83EF-964D4B24E9E9}.Release|Any CPU.Build.0 = Release|Any CPU + {75423717-B64A-4EAC-9762-CD17A2F60857}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {75423717-B64A-4EAC-9762-CD17A2F60857}.Debug|Any CPU.Build.0 = Debug|Any CPU + {75423717-B64A-4EAC-9762-CD17A2F60857}.Release|Any CPU.ActiveCfg = Release|Any CPU + {75423717-B64A-4EAC-9762-CD17A2F60857}.Release|Any CPU.Build.0 = Release|Any CPU + {687EFF77-3468-444D-A410-1B76E41E74FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {687EFF77-3468-444D-A410-1B76E41E74FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {687EFF77-3468-444D-A410-1B76E41E74FC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {687EFF77-3468-444D-A410-1B76E41E74FC}.Release|Any CPU.Build.0 = Release|Any CPU + {CC31DD38-B57D-4A71-9681-E9D7DDFB8909}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CC31DD38-B57D-4A71-9681-E9D7DDFB8909}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CC31DD38-B57D-4A71-9681-E9D7DDFB8909}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CC31DD38-B57D-4A71-9681-E9D7DDFB8909}.Release|Any CPU.Build.0 = Release|Any CPU + {B57AAB4C-0BA8-46B9-B365-F941A54F4DEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B57AAB4C-0BA8-46B9-B365-F941A54F4DEF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B57AAB4C-0BA8-46B9-B365-F941A54F4DEF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B57AAB4C-0BA8-46B9-B365-F941A54F4DEF}.Release|Any CPU.Build.0 = Release|Any CPU + {4879406D-8F0C-4EDF-A7EB-CB549E510E03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4879406D-8F0C-4EDF-A7EB-CB549E510E03}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4879406D-8F0C-4EDF-A7EB-CB549E510E03}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4879406D-8F0C-4EDF-A7EB-CB549E510E03}.Release|Any CPU.Build.0 = Release|Any CPU + {FBB68F44-CD6D-4FA3-9889-99FB5F4AD1B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FBB68F44-CD6D-4FA3-9889-99FB5F4AD1B3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FBB68F44-CD6D-4FA3-9889-99FB5F4AD1B3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FBB68F44-CD6D-4FA3-9889-99FB5F4AD1B3}.Release|Any CPU.Build.0 = Release|Any CPU + {DE121B38-5563-463D-B4B0-0817E75F4DDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DE121B38-5563-463D-B4B0-0817E75F4DDB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DE121B38-5563-463D-B4B0-0817E75F4DDB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DE121B38-5563-463D-B4B0-0817E75F4DDB}.Release|Any CPU.Build.0 = Release|Any CPU + {391D26F2-FAFB-4113-9C80-4DA54BCE5D4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {391D26F2-FAFB-4113-9C80-4DA54BCE5D4A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {391D26F2-FAFB-4113-9C80-4DA54BCE5D4A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {391D26F2-FAFB-4113-9C80-4DA54BCE5D4A}.Release|Any CPU.Build.0 = Release|Any CPU + {4E1FFFE6-8379-4029-BBD1-D5BF07155B53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4E1FFFE6-8379-4029-BBD1-D5BF07155B53}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4E1FFFE6-8379-4029-BBD1-D5BF07155B53}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4E1FFFE6-8379-4029-BBD1-D5BF07155B53}.Release|Any CPU.Build.0 = Release|Any CPU + {8367766D-033A-4555-96CC-008097F45322}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8367766D-033A-4555-96CC-008097F45322}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8367766D-033A-4555-96CC-008097F45322}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8367766D-033A-4555-96CC-008097F45322}.Release|Any CPU.Build.0 = Release|Any CPU + {EB7BCC64-FB2A-4056-9492-7A9E83E9A20D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EB7BCC64-FB2A-4056-9492-7A9E83E9A20D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EB7BCC64-FB2A-4056-9492-7A9E83E9A20D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EB7BCC64-FB2A-4056-9492-7A9E83E9A20D}.Release|Any CPU.Build.0 = Release|Any CPU + {ACE93123-C4B4-462B-8E2C-7AF39D582D5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ACE93123-C4B4-462B-8E2C-7AF39D582D5C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ACE93123-C4B4-462B-8E2C-7AF39D582D5C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ACE93123-C4B4-462B-8E2C-7AF39D582D5C}.Release|Any CPU.Build.0 = Release|Any CPU + {478F2C43-61F7-4839-8300-7E42F902BE24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {478F2C43-61F7-4839-8300-7E42F902BE24}.Debug|Any CPU.Build.0 = Debug|Any CPU + {478F2C43-61F7-4839-8300-7E42F902BE24}.Release|Any CPU.ActiveCfg = Release|Any CPU + {478F2C43-61F7-4839-8300-7E42F902BE24}.Release|Any CPU.Build.0 = Release|Any CPU + {57702A90-DD4A-491E-9899-AAC9CBFEDB19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {57702A90-DD4A-491E-9899-AAC9CBFEDB19}.Debug|Any CPU.Build.0 = Debug|Any CPU + {57702A90-DD4A-491E-9899-AAC9CBFEDB19}.Release|Any CPU.ActiveCfg = Release|Any CPU + {57702A90-DD4A-491E-9899-AAC9CBFEDB19}.Release|Any CPU.Build.0 = Release|Any CPU + {099012D1-51F4-4FD7-927B-53D3E5269576}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {099012D1-51F4-4FD7-927B-53D3E5269576}.Debug|Any CPU.Build.0 = Debug|Any CPU + {099012D1-51F4-4FD7-927B-53D3E5269576}.Release|Any CPU.ActiveCfg = Release|Any CPU + {099012D1-51F4-4FD7-927B-53D3E5269576}.Release|Any CPU.Build.0 = Release|Any CPU + {E3CDDC1A-54FA-40F2-B468-9BB11DAB3306}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E3CDDC1A-54FA-40F2-B468-9BB11DAB3306}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E3CDDC1A-54FA-40F2-B468-9BB11DAB3306}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E3CDDC1A-54FA-40F2-B468-9BB11DAB3306}.Release|Any CPU.Build.0 = Release|Any CPU + {CDF0A42D-F719-433A-BFE1-F1AFAF666C14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CDF0A42D-F719-433A-BFE1-F1AFAF666C14}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CDF0A42D-F719-433A-BFE1-F1AFAF666C14}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CDF0A42D-F719-433A-BFE1-F1AFAF666C14}.Release|Any CPU.Build.0 = Release|Any CPU + {6F0971DF-51B3-4469-AD54-2F442B0FB00E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6F0971DF-51B3-4469-AD54-2F442B0FB00E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6F0971DF-51B3-4469-AD54-2F442B0FB00E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6F0971DF-51B3-4469-AD54-2F442B0FB00E}.Release|Any CPU.Build.0 = Release|Any CPU + {C58BDB0C-EB28-4557-8EE2-395BD77942C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C58BDB0C-EB28-4557-8EE2-395BD77942C1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C58BDB0C-EB28-4557-8EE2-395BD77942C1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C58BDB0C-EB28-4557-8EE2-395BD77942C1}.Release|Any CPU.Build.0 = Release|Any CPU + {38A0DA4D-D22F-4048-B5E8-342BDF854B54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {38A0DA4D-D22F-4048-B5E8-342BDF854B54}.Debug|Any CPU.Build.0 = Debug|Any CPU + {38A0DA4D-D22F-4048-B5E8-342BDF854B54}.Release|Any CPU.ActiveCfg = Release|Any CPU + {38A0DA4D-D22F-4048-B5E8-342BDF854B54}.Release|Any CPU.Build.0 = Release|Any CPU + {E4CAC766-8074-4B42-9B16-184D932F3408}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E4CAC766-8074-4B42-9B16-184D932F3408}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E4CAC766-8074-4B42-9B16-184D932F3408}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E4CAC766-8074-4B42-9B16-184D932F3408}.Release|Any CPU.Build.0 = Release|Any CPU + {17B00D17-B20D-4F71-AB1C-C67626FA4D0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {17B00D17-B20D-4F71-AB1C-C67626FA4D0C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {17B00D17-B20D-4F71-AB1C-C67626FA4D0C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {17B00D17-B20D-4F71-AB1C-C67626FA4D0C}.Release|Any CPU.Build.0 = Release|Any CPU + {19BC952C-53F6-4B84-AD7F-6F9E28F97554}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {19BC952C-53F6-4B84-AD7F-6F9E28F97554}.Debug|Any CPU.Build.0 = Debug|Any CPU + {19BC952C-53F6-4B84-AD7F-6F9E28F97554}.Release|Any CPU.ActiveCfg = Release|Any CPU + {19BC952C-53F6-4B84-AD7F-6F9E28F97554}.Release|Any CPU.Build.0 = Release|Any CPU + {D66363A1-E012-4AE2-9013-5F1E6403FCA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D66363A1-E012-4AE2-9013-5F1E6403FCA6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D66363A1-E012-4AE2-9013-5F1E6403FCA6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D66363A1-E012-4AE2-9013-5F1E6403FCA6}.Release|Any CPU.Build.0 = Release|Any CPU + {1FFC4F00-BC1E-4BDE-8EDE-556242FBD9DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1FFC4F00-BC1E-4BDE-8EDE-556242FBD9DE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1FFC4F00-BC1E-4BDE-8EDE-556242FBD9DE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1FFC4F00-BC1E-4BDE-8EDE-556242FBD9DE}.Release|Any CPU.Build.0 = Release|Any CPU + {A552D855-105F-417A-B67F-2BD706DD4B35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A552D855-105F-417A-B67F-2BD706DD4B35}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A552D855-105F-417A-B67F-2BD706DD4B35}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A552D855-105F-417A-B67F-2BD706DD4B35}.Release|Any CPU.Build.0 = Release|Any CPU + {6DBAA1BB-CADC-41DC-A031-7D04998A3C3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6DBAA1BB-CADC-41DC-A031-7D04998A3C3C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6DBAA1BB-CADC-41DC-A031-7D04998A3C3C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6DBAA1BB-CADC-41DC-A031-7D04998A3C3C}.Release|Any CPU.Build.0 = Release|Any CPU + {7FA0EBBC-BCD4-4BA5-B41E-20C3F5AEDC22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7FA0EBBC-BCD4-4BA5-B41E-20C3F5AEDC22}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7FA0EBBC-BCD4-4BA5-B41E-20C3F5AEDC22}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7FA0EBBC-BCD4-4BA5-B41E-20C3F5AEDC22}.Release|Any CPU.Build.0 = Release|Any CPU + {2B4A587F-EC45-4AA3-9AED-1DA68DF99A76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2B4A587F-EC45-4AA3-9AED-1DA68DF99A76}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2B4A587F-EC45-4AA3-9AED-1DA68DF99A76}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2B4A587F-EC45-4AA3-9AED-1DA68DF99A76}.Release|Any CPU.Build.0 = Release|Any CPU + {32B2D17F-E82C-4D69-9B1B-68F959ED08C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {32B2D17F-E82C-4D69-9B1B-68F959ED08C3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {32B2D17F-E82C-4D69-9B1B-68F959ED08C3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {32B2D17F-E82C-4D69-9B1B-68F959ED08C3}.Release|Any CPU.Build.0 = Release|Any CPU + {40C44475-D7F3-4213-AB55-3457B9E73AF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {40C44475-D7F3-4213-AB55-3457B9E73AF6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {40C44475-D7F3-4213-AB55-3457B9E73AF6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {40C44475-D7F3-4213-AB55-3457B9E73AF6}.Release|Any CPU.Build.0 = Release|Any CPU + {269BEB2E-4039-47CF-9D17-3205FAFBFA1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {269BEB2E-4039-47CF-9D17-3205FAFBFA1B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {269BEB2E-4039-47CF-9D17-3205FAFBFA1B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {269BEB2E-4039-47CF-9D17-3205FAFBFA1B}.Release|Any CPU.Build.0 = Release|Any CPU + {2B7C81F3-DB44-4C2F-BA0C-C2EFDEF10DBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2B7C81F3-DB44-4C2F-BA0C-C2EFDEF10DBC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2B7C81F3-DB44-4C2F-BA0C-C2EFDEF10DBC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2B7C81F3-DB44-4C2F-BA0C-C2EFDEF10DBC}.Release|Any CPU.Build.0 = Release|Any CPU + {86C55577-0C7D-4111-8C58-7243E198A485}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {86C55577-0C7D-4111-8C58-7243E198A485}.Debug|Any CPU.Build.0 = Debug|Any CPU + {86C55577-0C7D-4111-8C58-7243E198A485}.Release|Any CPU.ActiveCfg = Release|Any CPU + {86C55577-0C7D-4111-8C58-7243E198A485}.Release|Any CPU.Build.0 = Release|Any CPU + {2BE7DBA4-0FF3-47B8-B0A4-DD6B3ED6817A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2BE7DBA4-0FF3-47B8-B0A4-DD6B3ED6817A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2BE7DBA4-0FF3-47B8-B0A4-DD6B3ED6817A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2BE7DBA4-0FF3-47B8-B0A4-DD6B3ED6817A}.Release|Any CPU.Build.0 = Release|Any CPU + {FB785377-9D97-4827-B9CA-683387546932}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FB785377-9D97-4827-B9CA-683387546932}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FB785377-9D97-4827-B9CA-683387546932}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FB785377-9D97-4827-B9CA-683387546932}.Release|Any CPU.Build.0 = Release|Any CPU + {1F06EADA-A052-4EB9-AED7-0A90B37101C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F06EADA-A052-4EB9-AED7-0A90B37101C4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F06EADA-A052-4EB9-AED7-0A90B37101C4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F06EADA-A052-4EB9-AED7-0A90B37101C4}.Release|Any CPU.Build.0 = Release|Any CPU + {0E4A2F12-3CCC-4DA6-8238-77C65CA28F8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E4A2F12-3CCC-4DA6-8238-77C65CA28F8B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E4A2F12-3CCC-4DA6-8238-77C65CA28F8B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E4A2F12-3CCC-4DA6-8238-77C65CA28F8B}.Release|Any CPU.Build.0 = Release|Any CPU + {0A788F08-4455-4D23-BFAB-C090E3A7E2A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0A788F08-4455-4D23-BFAB-C090E3A7E2A0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0A788F08-4455-4D23-BFAB-C090E3A7E2A0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0A788F08-4455-4D23-BFAB-C090E3A7E2A0}.Release|Any CPU.Build.0 = Release|Any CPU + {F4EEFFF0-B23F-469D-AC76-7E177BEBC5EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F4EEFFF0-B23F-469D-AC76-7E177BEBC5EA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F4EEFFF0-B23F-469D-AC76-7E177BEBC5EA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F4EEFFF0-B23F-469D-AC76-7E177BEBC5EA}.Release|Any CPU.Build.0 = Release|Any CPU + {878163F4-66EA-46E2-8E8D-C27C78263646}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {878163F4-66EA-46E2-8E8D-C27C78263646}.Debug|Any CPU.Build.0 = Debug|Any CPU + {878163F4-66EA-46E2-8E8D-C27C78263646}.Release|Any CPU.ActiveCfg = Release|Any CPU + {878163F4-66EA-46E2-8E8D-C27C78263646}.Release|Any CPU.Build.0 = Release|Any CPU + {52849341-E18B-49ED-BDD9-48F8ECE74C01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {52849341-E18B-49ED-BDD9-48F8ECE74C01}.Debug|Any CPU.Build.0 = Debug|Any CPU + {52849341-E18B-49ED-BDD9-48F8ECE74C01}.Release|Any CPU.ActiveCfg = Release|Any CPU + {52849341-E18B-49ED-BDD9-48F8ECE74C01}.Release|Any CPU.Build.0 = Release|Any CPU + {25DDCBE1-6F72-4F34-8EF9-62520D3001EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {25DDCBE1-6F72-4F34-8EF9-62520D3001EC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {25DDCBE1-6F72-4F34-8EF9-62520D3001EC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {25DDCBE1-6F72-4F34-8EF9-62520D3001EC}.Release|Any CPU.Build.0 = Release|Any CPU + {6C12AC56-C401-4194-8F45-991EF49B575C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6C12AC56-C401-4194-8F45-991EF49B575C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6C12AC56-C401-4194-8F45-991EF49B575C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6C12AC56-C401-4194-8F45-991EF49B575C}.Release|Any CPU.Build.0 = Release|Any CPU + {5B8FCA4C-7CEE-4376-A760-67B387BE3589}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5B8FCA4C-7CEE-4376-A760-67B387BE3589}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5B8FCA4C-7CEE-4376-A760-67B387BE3589}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5B8FCA4C-7CEE-4376-A760-67B387BE3589}.Release|Any CPU.Build.0 = Release|Any CPU + {BEE6C172-A184-4BFB-9591-3C0675A1AF96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BEE6C172-A184-4BFB-9591-3C0675A1AF96}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BEE6C172-A184-4BFB-9591-3C0675A1AF96}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BEE6C172-A184-4BFB-9591-3C0675A1AF96}.Release|Any CPU.Build.0 = Release|Any CPU + {E072D6A6-758E-4ABD-9B45-6A1FD8C35BAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E072D6A6-758E-4ABD-9B45-6A1FD8C35BAF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E072D6A6-758E-4ABD-9B45-6A1FD8C35BAF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E072D6A6-758E-4ABD-9B45-6A1FD8C35BAF}.Release|Any CPU.Build.0 = Release|Any CPU + {C4C9533A-06C5-48CD-88DC-A1E7A81228E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C4C9533A-06C5-48CD-88DC-A1E7A81228E0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C4C9533A-06C5-48CD-88DC-A1E7A81228E0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C4C9533A-06C5-48CD-88DC-A1E7A81228E0}.Release|Any CPU.Build.0 = Release|Any CPU + {75BC162C-D512-4027-8665-FD5420ACB863}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {75BC162C-D512-4027-8665-FD5420ACB863}.Debug|Any CPU.Build.0 = Debug|Any CPU + {75BC162C-D512-4027-8665-FD5420ACB863}.Release|Any CPU.ActiveCfg = Release|Any CPU + {75BC162C-D512-4027-8665-FD5420ACB863}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -919,7 +2879,7 @@ Global {AD2B36C5-FA6E-4B42-921D-37F667D7F9C0} = {7BA535EF-38FA-47A6-A6BD-5D6333D5DB10} {85A3CD48-2240-45B2-9757-F03877201923} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} {373A4CB4-0164-43DF-A51B-52368B1C9FA3} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} - {5920E447-6855-4DD9-9A93-57892EBB789C} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {5920E447-6855-4DD9-9A93-57892EBB789C} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} {52CEFB40-D9BD-4A33-9481-1D36ABE3E528} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} {B91620F6-4909-4C9A-821B-8A82F525D747} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} {5D9F6134-D9CB-4D09-A1B1-C22E10B43506} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} @@ -928,24 +2888,18 @@ Global {31B2E563-29C0-44A1-8961-6A32BEF118BF} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} {556D7E83-0A6F-4C8F-8682-429C9F3BCD0E} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} {34D5A083-6197-4603-93C0-539158579DAB} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} - {C14E9E4A-49DB-4DC2-AEA7-FD667B54237E} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} - {65DEC645-28C3-465C-B0D3-C81CEC2B40BA} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} {5F710E80-7C09-477E-B606-B7ECDDED5FAC} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} - {EE09911D-3228-43D9-9F90-29709A9A8A46} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} - {DCB63416-79C7-4782-8C87-4FA60270D46A} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} - {9055DF3D-525F-4258-A5A6-9BCF861EF590} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} - {752917E2-0A8D-4B39-8786-76F1EF9426AF} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} - {D32FA801-F7D2-42DA-A2FA-B3453E61243E} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} - {36470BF0-3F84-4D7D-A87B-E51ED1A42035} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} - {026CCC3A-C677-434B-997A-030886044B32} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} - {D6A4B6AE-F401-4CBF-8DAF-541B9B46B5F6} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} - {4B1434DC-C076-4FC3-8E1A-E65C06B3A258} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} - {E499895B-C183-4190-9A55-4ADD699C0AD3} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} - {0260C25D-E601-4D07-A933-F94DE59B5445} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} - {BCD96092-39F7-4DEE-B6E3-4BC4317F5513} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {752917E2-0A8D-4B39-8786-76F1EF9426AF} = {FA5C6934-CFA9-4A3C-B027-C1F7D4899984} + {AFCEC61D-9C18-49E5-94AE-17429BB06C78} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {D32FA801-F7D2-42DA-A2FA-B3453E61243E} = {FA5C6934-CFA9-4A3C-B027-C1F7D4899984} + {D6A4B6AE-F401-4CBF-8DAF-541B9B46B5F6} = {FA5C6934-CFA9-4A3C-B027-C1F7D4899984} + {4B1434DC-C076-4FC3-8E1A-E65C06B3A258} = {FA5C6934-CFA9-4A3C-B027-C1F7D4899984} + {E499895B-C183-4190-9A55-4ADD699C0AD3} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {0260C25D-E601-4D07-A933-F94DE59B5445} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {BCD96092-39F7-4DEE-B6E3-4BC4317F5513} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} {7A7419CD-963D-424C-BB92-34AA9D966DC2} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} - {6DD9F402-FAB4-4113-A378-7007049118DF} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} - {77599858-F490-4056-AAF7-F7092ABE3F23} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {6DD9F402-FAB4-4113-A378-7007049118DF} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {77599858-F490-4056-AAF7-F7092ABE3F23} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} {F8F1508A-B8A0-48EB-9359-7A043C4B447E} = {E1D77C39-936E-4ADB-8350-74B5A4401280} {B143A3A3-7C40-4C17-9AA0-37BE3B85C231} = {E1D77C39-936E-4ADB-8350-74B5A4401280} {424A36FC-064A-4C1E-8DD4-356921B7B31B} = {E1D77C39-936E-4ADB-8350-74B5A4401280} @@ -953,7 +2907,6 @@ Global {8A930C1B-86BB-4E19-9E11-3D857113C48F} = {E1D77C39-936E-4ADB-8350-74B5A4401280} {2FDB68BC-3D1C-45EA-BAFE-A3A5BD7437D5} = {E1D77C39-936E-4ADB-8350-74B5A4401280} {B94BA22F-CDEF-4EB5-83EA-D87D3C2E4483} = {E1D77C39-936E-4ADB-8350-74B5A4401280} - {7FCCCBC8-4B1D-49CE-8CC1-AB02A0DC2E52} = {8CCD8BF8-F2E9-4282-A9BC-817A051663D4} {13662848-3BDB-4119-BF5D-D58EA0F8026E} = {947E3943-6DE0-46E7-9106-BCE8C6E812E0} {CFD81363-B1EC-46C6-9B43-8DE2CFBF0628} = {947E3943-6DE0-46E7-9106-BCE8C6E812E0} {48DB524E-13DC-412B-A6BF-E8912F5682EA} = {947E3943-6DE0-46E7-9106-BCE8C6E812E0} @@ -1006,8 +2959,8 @@ Global {A66C16B1-C48C-4C1B-9FC0-61826967F933} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} {229D9174-FB54-4366-BC1C-072366D8A6B2} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} {246F7428-D220-4DC7-8F12-05CEF2F666A7} = {278CFF7F-D799-45EE-BADB-8C8380F05716} - {7BCBBC4E-A7EA-4AB1-AF2D-81325A5368A5} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} - {27777C75-0DA7-4489-BE60-51E74F921090} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {7BCBBC4E-A7EA-4AB1-AF2D-81325A5368A5} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {27777C75-0DA7-4489-BE60-51E74F921090} = {465E6B8C-A028-4C99-86E7-2710FFC62901} {9EA5388E-5333-4C8A-8B27-8E16AC4E7137} = {947E3943-6DE0-46E7-9106-BCE8C6E812E0} {385737C2-FB69-44AD-ACBB-A2CBE11686E4} = {E1D77C39-936E-4ADB-8350-74B5A4401280} {B804C315-1A8A-4952-966C-3E590CF1AEE0} = {947E3943-6DE0-46E7-9106-BCE8C6E812E0} @@ -1026,6 +2979,335 @@ Global {1E835620-C60E-49C8-9855-4CFA0F2A54AE} = {4123A0E1-EDB7-426D-9E21-903B83D20A68} {7D5AE513-2636-4981-A459-88DB90C3DFA9} = {4123A0E1-EDB7-426D-9E21-903B83D20A68} {D1461ADD-B8EC-4F72-B3B1-4202EC6DB1B9} = {947E3943-6DE0-46E7-9106-BCE8C6E812E0} + {20E5E7E6-0191-4EBF-BBD7-8A7EF7E32778} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {1EC15DBC-47F1-4268-99AF-E8CD46ECC7FB} = {947E3943-6DE0-46E7-9106-BCE8C6E812E0} + {A8EF5884-AD1D-4A72-9FBB-87677F4F22A5} = {947E3943-6DE0-46E7-9106-BCE8C6E812E0} + {3C09ADED-DB10-4E3D-AC4E-D0E314638E1F} = {947E3943-6DE0-46E7-9106-BCE8C6E812E0} + {CBE80569-113E-4FFF-A00C-230CBB120934} = {278CFF7F-D799-45EE-BADB-8C8380F05716} + {9A36CBEB-BDAF-4FE8-B4A9-604C71110A8E} = {FA5C6934-CFA9-4A3C-B027-C1F7D4899984} + {B405793C-2446-4427-9329-034518031CD7} = {278CFF7F-D799-45EE-BADB-8C8380F05716} + {BE9DA1B8-3DD8-4A87-8ED8-4DF0940796FC} = {ABF85DD5-B281-4889-9A8E-5DB3185A8DD5} + {305696C7-1982-47BF-96F5-972AE87FFD17} = {ABF85DD5-B281-4889-9A8E-5DB3185A8DD5} + {9BF13892-7211-42C7-ACD7-C09935B8312C} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {7C8A171D-3BF7-4F01-8724-1118D2E9FAFD} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {F53F1115-0D15-4B79-9722-CA71DD2E43EB} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {EA6952FA-31F7-4112-851C-CECDFB7E1857} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {9C23F0AB-C5AF-4179-9D42-52B195E7F8A4} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {6A18D579-BB15-42D9-ACB1-F7201C790CE8} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {FA5C6934-CFA9-4A3C-B027-C1F7D4899984} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {5DBE8E36-A918-4820-91AA-8D81B9BB672C} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {1652863C-5971-42D9-80B4-4A1304249B06} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {C8FFB08D-A763-467E-ABCB-FCF7EFDDC54A} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {BD61CECD-C220-4743-BE06-F5E864878644} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {E0344ED7-E92C-4EF0-BF33-D72C47536AFA} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {0D2CBEEF-92E9-4150-8F62-003397757AD3} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {75646623-EE05-4B2B-BF1B-63D9A2ACDF3E} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {6B78EB3B-7A0A-45E1-9DEE-8E96BF31290C} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {3B41B91C-28F1-46B7-9739-0A125221C7DB} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {37FD19C9-2F73-4369-AF39-16EA4B2BDE2A} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {6705D5D9-994E-44F8-A016-824DFEC7ACC2} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {2E79F7C1-392F-4C68-9E94-8C6ABA79BC19} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {827926F3-D8F8-42F4-AD66-C44AAFD9EB35} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {C988DF88-A4A1-4145-A684-C8063E159560} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {560192D6-F622-4219-A5BB-442BA1D9A7C5} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {9DF2B72E-31A4-4D7F-9DFB-B6A574496C3A} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {070DBB3C-DC63-4407-B037-70DD9180F381} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {1D7A80BD-0444-430D-A242-AF6FA579E48E} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {B4F3602C-8278-464B-A315-D9D2C42B49F7} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {336E0AC8-6CC7-4437-B22D-03A7A836AAFE} = {050F69CA-1EB1-4D46-B52C-018637E6D525} + {76267660-AA79-4FBA-8AF9-4FB6808CDF35} = {050F69CA-1EB1-4D46-B52C-018637E6D525} + {21103739-7784-4C4F-BA8A-F03D0B295DE3} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {3A0D6E61-D11A-499D-8921-702D3DA72A7D} = {FA5C6934-CFA9-4A3C-B027-C1F7D4899984} + {5BD85F99-D217-4A81-A7E6-C4EAAC3A0F46} = {FA5C6934-CFA9-4A3C-B027-C1F7D4899984} + {10ABD6B8-9FD6-4736-920C-5256DD1E8FD0} = {FA5C6934-CFA9-4A3C-B027-C1F7D4899984} + {D0F20831-9B60-450F-B9B2-43C1A3341C1B} = {FA5C6934-CFA9-4A3C-B027-C1F7D4899984} + {BA409E0A-C840-4305-83C7-2934BEFE9E5E} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {FF30A0F2-1C32-4A56-9233-307CA31EB43B} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {5A727EC9-D754-4976-92BC-FB8769780647} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {947B4A72-108A-4215-A76B-F11F66253B73} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {168E7151-AE15-4210-A979-E1347AD8288B} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {D91DA55B-2DAD-4D18-8130-629BD143A7C7} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {860CB348-BD36-4A45-A8E5-5F0E0751C4A9} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {9625C308-5B63-436D-B1F7-B37BE7E3541B} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {D7867DE5-6ECB-406D-BCED-DEB377F4FB55} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {FE288996-8C94-4B75-8BF1-16977C98241A} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {4BD2505B-8426-48F2-86C2-4FFE3D416ED8} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {A69CDCAB-A96B-4CD5-AE95-562A74DBEF11} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {50BA28CD-5BFC-4C5E-B702-77A9B1543A04} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {079E15A6-E931-4AFC-994F-0E5B744C4FD3} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {D2130F2D-B4A1-41AD-BFFA-17AA74888987} = {079E15A6-E931-4AFC-994F-0E5B744C4FD3} + {36EF5A3D-2101-46F5-9CC9-47ACCCEC94C4} = {079E15A6-E931-4AFC-994F-0E5B744C4FD3} + {F2D026CA-B596-48EB-9F20-D03029FE852A} = {079E15A6-E931-4AFC-994F-0E5B744C4FD3} + {7A1F9EDE-D619-4B73-9914-137DDE2044E4} = {079E15A6-E931-4AFC-994F-0E5B744C4FD3} + {70AD3FCB-F529-4E08-BE39-E56C940EA114} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {CDC8B1F7-3C94-4686-9EE0-6841231E6144} = {FA5C6934-CFA9-4A3C-B027-C1F7D4899984} + {E2586A8F-F16C-4532-BDED-8DBF8B47A392} = {0DF8EC71-8008-41CF-9A87-946604FBD24D} + {B11B8CA5-A1DF-4D23-BC65-C53DE68D3094} = {0DF8EC71-8008-41CF-9A87-946604FBD24D} + {465E6B8C-A028-4C99-86E7-2710FFC62901} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {5D298F4A-5A33-4489-8F9D-78FA0A04AC3C} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {30FCB2D0-9353-4218-A5C9-1807661D2656} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {D73CF550-4CC3-47A9-864E-F7FC46736DBF} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {A5532EED-72CC-4C3A-A81C-5BE3172F0FDF} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {48352710-3D49-43A9-89D6-3836A4D49F71} = {FA5C6934-CFA9-4A3C-B027-C1F7D4899984} + {CE01EBEF-6E86-4778-B49F-F65081082F3C} = {FA5C6934-CFA9-4A3C-B027-C1F7D4899984} + {4445A10E-DF6C-461A-9F1B-B4D03F5322E1} = {FA5C6934-CFA9-4A3C-B027-C1F7D4899984} + {67482071-FBD5-4D12-A571-C37EDD517365} = {FA5C6934-CFA9-4A3C-B027-C1F7D4899984} + {E8A207D8-5920-419C-8CAE-92B5D34D28E1} = {FA5C6934-CFA9-4A3C-B027-C1F7D4899984} + {50AF2EFB-FF15-4058-ABA4-C720E044FD29} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {86737A35-BCF5-44D8-A383-9C1E26D8CA54} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {CF20036E-A856-47E4-8F04-918FB151ECFD} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {70C2F91D-0C9C-4865-A98F-F0125D4FF0C4} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {12AB67E2-8F23-4463-8460-4DE0BABCEE1A} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {1417F6CC-4924-490A-8D73-C230B24507DC} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {6274CE2E-241E-4048-9B06-5804952A90B2} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {C1C5F7E2-AF90-4DC5-8E6D-B74225E422BF} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {73144DF6-CFD2-40DB-AA23-9961CB0419F7} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {15FCEB5D-C3BB-42AC-BCBC-C44C86FAC1B3} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {D1C70A41-9467-4CC9-961C-2192F7189349} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {7F4B9EAC-F272-4E2F-A2A4-965CCC2C4EA6} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {7D3B107B-61AA-4D1C-B052-D349CC360BE6} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {5B313241-C556-497B-98CB-8BA86DFEA3F7} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {67C0EDBF-B64D-4D42-B4D6-87BC9B6A45A4} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {58B40D67-81A4-478F-AF1C-67CFA2975B95} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {9FD0E881-4F74-4B63-9B77-ECED8589EC79} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {5E8D625C-F9BD-47F3-A3B9-4769F895FB97} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {97F9546F-D70B-45E8-9EA2-0383CF2F6C53} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {FCD72C56-8DE4-46BC-B9B9-F870EE2D26E0} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {931E6436-3793-4732-A3DF-473BA5878534} = {079E15A6-E931-4AFC-994F-0E5B744C4FD3} + {544A9C70-FE8C-4606-A3EF-74230BF18D45} = {079E15A6-E931-4AFC-994F-0E5B744C4FD3} + {E54A6230-93F7-4A0F-925E-FE658B8DF425} = {079E15A6-E931-4AFC-994F-0E5B744C4FD3} + {C1605309-ABD1-4D6E-A119-9F8213F67A83} = {079E15A6-E931-4AFC-994F-0E5B744C4FD3} + {B6D67C30-8132-4FB7-909B-DAC73731971B} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {B9B7EE61-1751-4152-ACC8-717C0D5E34C5} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {47143DEF-2CB1-47A3-8E8D-D7AF1190D593} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {5D6133D4-E4A3-441F-B8E1-AD141FA8AED4} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {2DD54079-CCAE-42BE-9053-DA06591B1D22} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {403AF513-EA11-4EA5-B719-46257E5FF0F8} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {7C74F87E-B979-48FE-BF82-374A477B359C} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {4468E0D6-CBB0-4D41-952A-0B91A28C558F} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {034E4160-50F0-4944-9D12-5F11CB82C915} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {FCB04CDF-4507-470F-A2F5-D02541D10DDC} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {9F960971-F7C9-4978-8843-28FEA1A4662F} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {6B028F0A-7484-407E-A7E8-312CFAB53B18} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {6CB3FF5D-96FE-4765-8C15-69B3664F296C} = {A02EA190-2D03-40BD-B524-1B7CEB1CA0BF} + {377FEE6C-E6A4-40E5-B723-7872326E66B9} = {A02EA190-2D03-40BD-B524-1B7CEB1CA0BF} + {47B22880-83E3-406D-839C-D97E56F9A37E} = {A02EA190-2D03-40BD-B524-1B7CEB1CA0BF} + {3E21F611-8039-46F5-85B5-92AC892A3521} = {A02EA190-2D03-40BD-B524-1B7CEB1CA0BF} + {507B6692-06C5-4EA2-98B5-BDE2D5A55B51} = {A02EA190-2D03-40BD-B524-1B7CEB1CA0BF} + {E6869BD3-E28A-4973-9FC6-2DC16EE75DAF} = {A02EA190-2D03-40BD-B524-1B7CEB1CA0BF} + {59BA7331-E966-4962-8B91-01EBAA91E0F4} = {A02EA190-2D03-40BD-B524-1B7CEB1CA0BF} + {C7BAC762-25F8-4D1F-B3FF-94ECA9199BE6} = {A02EA190-2D03-40BD-B524-1B7CEB1CA0BF} + {5ADB16FD-B2A7-4605-A954-6F4A183519DA} = {A02EA190-2D03-40BD-B524-1B7CEB1CA0BF} + {99FD6482-8C75-48FB-8580-01000F850B17} = {A02EA190-2D03-40BD-B524-1B7CEB1CA0BF} + {2A2F636A-FE6E-4FFF-97D8-18B697B2DDB8} = {A02EA190-2D03-40BD-B524-1B7CEB1CA0BF} + {856DF852-7271-480F-9A12-F49DFE086263} = {A02EA190-2D03-40BD-B524-1B7CEB1CA0BF} + {0A933D61-5F46-4754-A0D8-ADB1F2DEA0E6} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {28368089-C065-4279-A3C4-6D2815789327} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {006C67F2-61CB-4FF2-9343-982E6404583F} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {63E084C3-C741-4285-8094-7BF2AA063C6E} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {0FEBB470-2752-4E4D-B212-462253E5AF86} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {45AFC9A6-C949-4939-B6FC-0BCE2ED599CF} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {4A4841BC-9AC5-4581-AC50-6AAE6B43E6E7} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {A3FFA5B4-F3CE-4FBB-82D9-45D85526AB47} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {94E4C64B-919C-48ED-A728-AE95403480FA} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {DBAE5B73-152A-45BF-B5BA-5D598C899A57} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {7D29BC5B-683C-4F7E-A87D-746C7FB76732} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {44CD23AC-18B0-4E1A-ADA7-3FF883DA8D03} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {8BFD4EFE-A009-429B-9AFB-2C77F802F2BC} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {FACD7646-718F-4148-A172-A482063A161E} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {E14F294D-1179-4559-BCEB-0511506AEFA6} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {5F028E11-1671-461F-87A1-7B27FD6CD01E} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {8B5A7D22-2F96-4934-A204-C192E7E502BE} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {D67910D1-2B62-4FB1-A095-A96B1F80C1B9} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {BB247DCA-0566-41B3-9A69-B041019B36D8} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {2260C062-8317-40EC-BA6B-F1260790CE7D} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {D69A6305-12A9-4190-BDE6-185258D4E8B6} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {3E5832F0-1869-4833-8680-7C6952E5D917} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {E7F8BD74-F3EB-4A4D-AF2B-B8492CC6355F} = {ABF85DD5-B281-4889-9A8E-5DB3185A8DD5} + {F3128138-A2B7-4C09-9D0A-A93DD4F855A5} = {ABF85DD5-B281-4889-9A8E-5DB3185A8DD5} + {4C4A49FF-E89F-4108-A4BD-551634A3C4CE} = {ABF85DD5-B281-4889-9A8E-5DB3185A8DD5} + {A4A4C6CA-FF07-43FD-B1DB-EC9B5E01D11A} = {ABF85DD5-B281-4889-9A8E-5DB3185A8DD5} + {B43805C8-BF34-403A-8933-F1A63AEBDF71} = {947E3943-6DE0-46E7-9106-BCE8C6E812E0} + {F29AAF44-60FE-4189-81C4-FE3A60161394} = {ABF85DD5-B281-4889-9A8E-5DB3185A8DD5} + {1CF4EBB0-6BBB-456A-9258-83F62D026530} = {ABF85DD5-B281-4889-9A8E-5DB3185A8DD5} + {200CCE0D-1796-4570-8EDD-7093F0072678} = {947E3943-6DE0-46E7-9106-BCE8C6E812E0} + {AFA889B1-B728-4E16-96B7-9733376B0EA4} = {947E3943-6DE0-46E7-9106-BCE8C6E812E0} + {877417AD-1F8B-48A8-A0C1-A18FEA269564} = {947E3943-6DE0-46E7-9106-BCE8C6E812E0} + {B8F06FF4-1C87-4483-9B0A-CEC862622BDA} = {FCA75665-06E8-45DB-94A0-756B79925C54} + {16C31B01-EC91-41E5-8290-EBB887E75F23} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {0D10C533-F687-40E9-AF63-B06345EAB5DF} = {6A18D579-BB15-42D9-ACB1-F7201C790CE8} + {83BCDD80-28B3-488A-9F65-27D2637F82F7} = {947E3943-6DE0-46E7-9106-BCE8C6E812E0} + {16EC4035-F8CA-47CB-9F18-4B151EAC28CD} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {279A92D4-1017-4401-90B2-CDE013D6B2ED} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {EF6DF7FF-BDE4-40BE-852F-FC7E49C51BFF} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {97C10721-C4FC-49A0-902D-B28B30BA99B9} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {CE791170-2CF8-45BC-B69C-7E0AB29E9FEC} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {3C433895-A214-46AB-9603-4BBF398658AC} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {B5579A89-D734-4C8B-B81C-E0CAA45AB769} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {F73FDB0F-D5A5-481C-9ED7-CC4BCD52AD45} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {1ABA4692-2B45-487C-AF97-578C289B4D83} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {43873E03-3D5E-4467-BD34-BFA0F3C62E3E} = {465E6B8C-A028-4C99-86E7-2710FFC62901} + {FCFF821D-C176-4F36-972F-0159792DC800} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {38CE2218-BAD5-4061-8B68-E266DA86C628} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {8D57DECA-7D62-4673-A443-A39265AB925F} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {4F21019C-CC57-4A5F-9A97-AE62D9AE3543} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {C77FF650-6789-44F4-93AC-7A00674D5E04} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {E926AC18-7F96-4FF1-9D32-F857DDA35EB0} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {E470E285-3A1C-40AA-B3AA-A9EEB9065358} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {2617DFDC-2935-40D3-9301-2C09C0311145} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {F60F7E39-DF2C-4312-B716-32AB33F9FDC5} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {AF5E30DE-3A4C-4F92-94AE-BA7A7AE80D90} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {39951A36-F719-4B6F-AF12-FE9FCCE7B9D3} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {73FEA730-2607-47DA-B719-08CDB81D310B} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {E7855CDF-09F7-4323-BDB7-37B8A1307D69} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {8342C992-C2E6-4161-B0E7-1F94469DE733} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {2E1E4F8B-875E-4AF1-95F4-2A7D1B1EA3D5} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {601063A2-AA25-405D-82D6-978C25E71D0F} = {BA409E0A-C840-4305-83C7-2934BEFE9E5E} + {F9B66D4E-DD37-4B50-B704-9FBC1EFC3E7F} = {278CFF7F-D799-45EE-BADB-8C8380F05716} + {539C39B0-2A0F-4218-ADB9-7C4D73C26C24} = {947E3943-6DE0-46E7-9106-BCE8C6E812E0} + {D63C4162-1D47-4E0B-947B-4104F5601812} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {439F5255-5ABB-4097-A718-9D47615FBB0C} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {9A889644-C632-4CC0-AB47-FF8D14932188} = {E1D77C39-936E-4ADB-8350-74B5A4401280} + {F83B6A40-B596-4A5E-81A3-92565F06BD94} = {FA8A64D6-C0D5-4AD2-92BB-D2718B9D7D36} + {7757E901-AE0D-424E-A555-49A7EE8A314F} = {FA8A64D6-C0D5-4AD2-92BB-D2718B9D7D36} + {90DBF676-6543-4845-8A05-2CB5C9425E3F} = {FA8A64D6-C0D5-4AD2-92BB-D2718B9D7D36} + {3C4E2021-48CD-4487-8E4E-54E85EF7C69B} = {FA8A64D6-C0D5-4AD2-92BB-D2718B9D7D36} + {82D37BD6-A8B7-439A-9998-1D38FF8F08BA} = {FA8A64D6-C0D5-4AD2-92BB-D2718B9D7D36} + {FCE1C83E-5C74-41DF-9C26-775F0BD6AA70} = {FA8A64D6-C0D5-4AD2-92BB-D2718B9D7D36} + {94375706-915F-42D8-B013-0B888F4DD4B0} = {FA8A64D6-C0D5-4AD2-92BB-D2718B9D7D36} + {E12773A9-E9B4-4AB0-AB97-B8291AC29DCC} = {FA8A64D6-C0D5-4AD2-92BB-D2718B9D7D36} + {5B3B245A-5916-4DE7-AF6D-C71C703E0E6E} = {FA8A64D6-C0D5-4AD2-92BB-D2718B9D7D36} + {6D09848F-E58E-479B-A1E8-7E3F1FF90DA2} = {FA8A64D6-C0D5-4AD2-92BB-D2718B9D7D36} + {90814AD6-B387-49A7-9657-020FB917BE1A} = {FA8A64D6-C0D5-4AD2-92BB-D2718B9D7D36} + {35C18531-353E-44D7-8516-43105B89E5CB} = {FA8A64D6-C0D5-4AD2-92BB-D2718B9D7D36} + {265F2A9D-E12A-4664-B5C8-C338566DD0FC} = {FA8A64D6-C0D5-4AD2-92BB-D2718B9D7D36} + {282545E3-0E75-4F5D-BDBA-8C8C74F1CEEE} = {FA8A64D6-C0D5-4AD2-92BB-D2718B9D7D36} + {66171F39-F3B1-4714-BFDB-2040551D3D2E} = {FA8A64D6-C0D5-4AD2-92BB-D2718B9D7D36} + {085B1327-58FB-4359-A54C-402D3F810079} = {FA8A64D6-C0D5-4AD2-92BB-D2718B9D7D36} + {7E33210D-6A0F-4DB8-951D-B981BE3CB0C7} = {FA8A64D6-C0D5-4AD2-92BB-D2718B9D7D36} + {D18EA39C-E0F4-4450-9C27-CB471A424A8E} = {FA8A64D6-C0D5-4AD2-92BB-D2718B9D7D36} + {10AEE6DD-C38F-4CCA-BCFE-AC4B74C75EBF} = {FA8A64D6-C0D5-4AD2-92BB-D2718B9D7D36} + {0EA31342-17C3-40F4-9717-F64DF27F2C59} = {FA8A64D6-C0D5-4AD2-92BB-D2718B9D7D36} + {21DEBE3D-3302-4CDA-B06A-DB25778CB9E3} = {278CFF7F-D799-45EE-BADB-8C8380F05716} + {7F4E5B8E-0C7A-4B3B-B23E-E4360DCE6205} = {947E3943-6DE0-46E7-9106-BCE8C6E812E0} + {B67C74E4-CA8C-4278-A5E5-C1006A9E6837} = {947E3943-6DE0-46E7-9106-BCE8C6E812E0} + {1A106E37-21A6-48CC-A2E9-AF3FEDCAD7E2} = {947E3943-6DE0-46E7-9106-BCE8C6E812E0} + {F1F988EC-6C2D-4B69-BF67-663D2E051100} = {947E3943-6DE0-46E7-9106-BCE8C6E812E0} + {1FC80B87-BC1B-416F-9D3A-47BE111C075D} = {947E3943-6DE0-46E7-9106-BCE8C6E812E0} + {94933E00-C975-4C62-A596-EE9582030BD0} = {947E3943-6DE0-46E7-9106-BCE8C6E812E0} + {0F8B0D00-BC20-4FFC-A7C5-88017A3C09A9} = {947E3943-6DE0-46E7-9106-BCE8C6E812E0} + {6780EF15-C7DF-4D44-82F6-1B98A05B82B7} = {E1D77C39-936E-4ADB-8350-74B5A4401280} + {A58518A6-7E40-4482-AFD4-4DB7E21FF27C} = {E1D77C39-936E-4ADB-8350-74B5A4401280} + {080201E0-7712-4A50-A193-98A562030938} = {E1D77C39-936E-4ADB-8350-74B5A4401280} + {4F746914-FBD4-4AE8-A22F-C1745E21515B} = {E1D77C39-936E-4ADB-8350-74B5A4401280} + {9AF5B0F0-DA63-4694-98B0-5496A78EB8CB} = {E1D77C39-936E-4ADB-8350-74B5A4401280} + {DFBA72E3-FB45-4D7C-A1DE-993D984E7034} = {E1D77C39-936E-4ADB-8350-74B5A4401280} + {2691FC24-086E-417A-84EE-11C481308D4C} = {E1D77C39-936E-4ADB-8350-74B5A4401280} + {9539BC5F-7B48-4E69-8603-703EA84CFE87} = {E1D77C39-936E-4ADB-8350-74B5A4401280} + {697BA3B9-7180-4CE7-98BA-A480770D58AF} = {E1D77C39-936E-4ADB-8350-74B5A4401280} + {0EB38D32-4706-4C70-8685-4A770322346B} = {E1D77C39-936E-4ADB-8350-74B5A4401280} + {3C3B3D15-789A-40C4-AEC0-0B149194BDFA} = {E1D77C39-936E-4ADB-8350-74B5A4401280} + {A01D6EFA-196F-4790-AE91-0976D747282C} = {E1D77C39-936E-4ADB-8350-74B5A4401280} + {4E5EC963-1D95-4962-8201-F4D84EA26ED2} = {E1D77C39-936E-4ADB-8350-74B5A4401280} + {DD2F361F-94AB-4494-A8D1-E69AB68F2FD6} = {E1D77C39-936E-4ADB-8350-74B5A4401280} + {B096AA61-812C-429B-92FF-0C3C7F66F05E} = {E1D77C39-936E-4ADB-8350-74B5A4401280} + {EC1576F4-261B-4040-95D2-9BED62AD48EF} = {8CCD8BF8-F2E9-4282-A9BC-817A051663D4} + {A3768550-A438-4E87-9547-FBA625FB8353} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {088072CE-7129-4A2B-8A69-E4A2CFB39EDF} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {9E283327-123E-4495-9142-6A27F55282D5} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {5FD51DF6-E318-4A52-BECE-B95AFF9AF762} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {58207E90-49F7-4241-BA38-B4997E04E667} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {9B7A791A-725E-40E4-A885-F1FFAFE88612} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {6C2391E4-15F3-40CF-8C16-787066E8017C} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {930FEF59-7A4C-49DA-B522-1D7C8D56F58E} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {4DC2FB97-A1C0-4085-932B-7D87D1C2CCDE} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {060BF9A0-030F-4C50-91F8-76DAC3F43636} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {F15A392F-762C-4CFB-92BF-E76572E332CD} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {E1F3468D-208F-49B8-966B-76C807CE01AD} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {89E47DE5-D2EA-4666-8E1F-CEE8C80303C3} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {0EAD75CE-B86D-4F52-8B8B-D49F4F4CED29} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {58271805-C59E-45FB-9D7B-CBAFC7BDF66C} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {DE5EC147-0305-459E-9FDF-CCE514A239D1} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {DD8A60AD-D7A9-438F-985E-083132466AC6} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {2F665879-8865-4765-A03C-FFE2D0D6E734} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {37896C82-24DF-4FED-8A44-537910360A40} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {B4533FEF-E9CF-4E3B-AAB6-DC72C5EB90DD} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {6878680C-37EA-4715-BDF0-7E1143ED0998} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {B9817971-4FA0-4B25-9482-77B5A3A971DC} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {8F1382A8-7B0F-4A8D-AC0A-1F6C293C6847} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {B0D0BAA9-B6B2-49A4-B08C-F16D7EE65570} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {9DABFD9F-EC4C-42A1-B744-00F3E0AFF2B8} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {FB5ABFC7-A493-4F10-B4C9-3E7E44EFC9B9} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {E56B344E-3F12-4FF8-B46C-9D87A5512E72} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {EC0C2649-5F1C-4AF6-BC4C-53D1FF9A1BD7} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {C5C81D9D-27CD-4F23-B660-903AFDDD7B71} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {C3309B6A-0512-4C93-B472-CF6A10ED8682} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {629A1C79-7DE4-4EFC-8D34-ED1809AD5888} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {40145A2C-6E76-4069-99D8-FFF3CF0CF3BC} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {0E72DA6A-5D09-45F5-AD77-39A92B00A9CF} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {98A129AB-0FF8-4B07-8516-DA23AB5C8735} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {B8972679-FDC1-4998-A18D-E501EFFA467D} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {6CDA732B-10A8-441E-A243-F83BA89ED1F6} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {D8C0C69F-EF4F-4883-972E-C2E6B6A9566E} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {90AA75BA-134C-4E62-B3A5-E7DB05DF12FC} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {2BF08C83-C802-45A8-8219-FC77B3B9CB06} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {81CB1F26-4C07-4B9F-A695-AB810B38E15B} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {47A2307D-717C-4ABA-8FBD-9717B0C4CC8C} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {7DE4615E-0E42-4C72-8B63-AFE151321024} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {42EA49AE-5C87-4C75-83EF-964D4B24E9E9} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {75423717-B64A-4EAC-9762-CD17A2F60857} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {687EFF77-3468-444D-A410-1B76E41E74FC} = {1BD34A20-4B18-43A2-AEEE-1E24B93C8BC9} + {CC31DD38-B57D-4A71-9681-E9D7DDFB8909} = {72BE345F-8168-4D28-895C-2A22010B39C8} + {B57AAB4C-0BA8-46B9-B365-F941A54F4DEF} = {72BE345F-8168-4D28-895C-2A22010B39C8} + {4879406D-8F0C-4EDF-A7EB-CB549E510E03} = {72BE345F-8168-4D28-895C-2A22010B39C8} + {FBB68F44-CD6D-4FA3-9889-99FB5F4AD1B3} = {37C1201C-8936-4BAC-9BA1-7B8CAB87BD60} + {DE121B38-5563-463D-B4B0-0817E75F4DDB} = {37C1201C-8936-4BAC-9BA1-7B8CAB87BD60} + {827CB9D9-EE91-47E1-BCF3-3DAC2C45EE57} = {37C1201C-8936-4BAC-9BA1-7B8CAB87BD60} + {391D26F2-FAFB-4113-9C80-4DA54BCE5D4A} = {827CB9D9-EE91-47E1-BCF3-3DAC2C45EE57} + {4E1FFFE6-8379-4029-BBD1-D5BF07155B53} = {827CB9D9-EE91-47E1-BCF3-3DAC2C45EE57} + {8367766D-033A-4555-96CC-008097F45322} = {827CB9D9-EE91-47E1-BCF3-3DAC2C45EE57} + {13184138-9F85-45CA-8724-EB5F73BF1E88} = {37C1201C-8936-4BAC-9BA1-7B8CAB87BD60} + {EB7BCC64-FB2A-4056-9492-7A9E83E9A20D} = {13184138-9F85-45CA-8724-EB5F73BF1E88} + {CD09576B-CA67-4215-8D29-90D819ECD8CA} = {13184138-9F85-45CA-8724-EB5F73BF1E88} + {ACE93123-C4B4-462B-8E2C-7AF39D582D5C} = {CD09576B-CA67-4215-8D29-90D819ECD8CA} + {CCA2402F-A792-4073-A56F-F5F5712CCCBE} = {A7AA5940-00E1-4F63-B85A-90BF6A35EA05} + {478F2C43-61F7-4839-8300-7E42F902BE24} = {CCA2402F-A792-4073-A56F-F5F5712CCCBE} + {57702A90-DD4A-491E-9899-AAC9CBFEDB19} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {099012D1-51F4-4FD7-927B-53D3E5269576} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {E3CDDC1A-54FA-40F2-B468-9BB11DAB3306} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {CDF0A42D-F719-433A-BFE1-F1AFAF666C14} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {6F0971DF-51B3-4469-AD54-2F442B0FB00E} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {C58BDB0C-EB28-4557-8EE2-395BD77942C1} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {38A0DA4D-D22F-4048-B5E8-342BDF854B54} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {E4CAC766-8074-4B42-9B16-184D932F3408} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {17B00D17-B20D-4F71-AB1C-C67626FA4D0C} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {19BC952C-53F6-4B84-AD7F-6F9E28F97554} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {D66363A1-E012-4AE2-9013-5F1E6403FCA6} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {1FFC4F00-BC1E-4BDE-8EDE-556242FBD9DE} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {A552D855-105F-417A-B67F-2BD706DD4B35} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {6DBAA1BB-CADC-41DC-A031-7D04998A3C3C} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {7FA0EBBC-BCD4-4BA5-B41E-20C3F5AEDC22} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {2B4A587F-EC45-4AA3-9AED-1DA68DF99A76} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {32B2D17F-E82C-4D69-9B1B-68F959ED08C3} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {40C44475-D7F3-4213-AB55-3457B9E73AF6} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {269BEB2E-4039-47CF-9D17-3205FAFBFA1B} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {2B7C81F3-DB44-4C2F-BA0C-C2EFDEF10DBC} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {86C55577-0C7D-4111-8C58-7243E198A485} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {2BE7DBA4-0FF3-47B8-B0A4-DD6B3ED6817A} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {FB785377-9D97-4827-B9CA-683387546932} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {1F06EADA-A052-4EB9-AED7-0A90B37101C4} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {0E4A2F12-3CCC-4DA6-8238-77C65CA28F8B} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {0A788F08-4455-4D23-BFAB-C090E3A7E2A0} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {F4EEFFF0-B23F-469D-AC76-7E177BEBC5EA} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {878163F4-66EA-46E2-8E8D-C27C78263646} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {52849341-E18B-49ED-BDD9-48F8ECE74C01} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {25DDCBE1-6F72-4F34-8EF9-62520D3001EC} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {6C12AC56-C401-4194-8F45-991EF49B575C} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {5B8FCA4C-7CEE-4376-A760-67B387BE3589} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {BEE6C172-A184-4BFB-9591-3C0675A1AF96} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {E072D6A6-758E-4ABD-9B45-6A1FD8C35BAF} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {C4C9533A-06C5-48CD-88DC-A1E7A81228E0} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} + {75BC162C-D512-4027-8665-FD5420ACB863} = {174E6CB9-42E1-4C99-B8EF-A2C1F426758D} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {DAF8B3ED-D51A-4CDA-8BF1-1E032CF0AC4F} diff --git a/CSharpBible/CSharpBible.sln.GhostDoc.xml b/CSharpBible/CSharpBible.sln.GhostDoc.xml new file mode 100644 index 000000000..90ef85f95 --- /dev/null +++ b/CSharpBible/CSharpBible.sln.GhostDoc.xml @@ -0,0 +1,155 @@ + + + *.min.js + jquery*.js + + + + + + + + + + + + .\Help + true + CSharpBible + MemberName + + FlatGray + + false + false + false + true + true + + + true + true + true + false + true + false + false + + + + + + true + false + false + + true + + + + + + + + AboutEx + AboutExTests + ActionTest + ActionTestWPF + AddPage + AddPageWPF + BaseLib + BaseLibTests + BindingGroupExp + Calc32 + Calc32Cons + Calc32Tests + Calc32WPF + Calc32WPFTests + Calc64Base + Calc64BaseTests + Calc64WF + Calc64WFTests + CanvasWPF + CanvasWPF2_ItemTemplateSelector + CharGrid + CommonDialogs + ConsoleDisplay + ConsoleLib + ConsoleMouseApp + CSFreeVision + CSharpBibleTest + CSV_Viewer + CSV_ViewerTest + DataGridEx + DataGridExWPF + DemoLibrary + DemoLibraryTests + DialogBoxes + Display_Test + DynamicShapeWPF + ItemsControlTut1 + ItemsControlTut2 + ItemsControlTut3_net + ItemsControlTut3_netTests + ItemsControlTut4_net + ItemsControlTut4_netTests + ListBinding + ListBindingTests + MathLibrary + MathLibraryTests + MVVM_16_Usercontrol_1 + MVVM_16_Usercontrol_2 + MVVM_17_1_CSV_Laden + MVVM_18_MultiConverters + MVVM_20_Sysdialogs + MVVM_20_SysdialogsTests + MVVM_21_Buttons + MVVM_22_WpfCap + MVVM_6_Converters + MVVM_6_Converters_2 + MVVM_6_Converters_3 + MVVM_BaseLib + MVVM_BaseLibTests + MVVM_Converter_DrawGrid + MVVM_Converter_DrawGrid2 + MVVM_Converter_DrawGrid3_NonLin + MVVM_Converter_Grid + MVVM_Converter_Grid2 + MVVM_Converter_Grid3_NonLin + MVVM_Converter_ImgGrid + MVVM_Converter_ImgGrid2 + MVVM_Lines_on_Grid + MVVM_TiledDisplay_net + Permutation + PermutationTests + PlotgraphWPF + Polyline + Snake_Base + Snake_BaseTests + Snake_Console_net + Sokoban_Base + Sokoban_BaseTests + SomeThing2 + SyncAsyncParallel + TestConsole + TestConsoleDemo + TestConsoleTests + TestDirectives + Tetris_Base + Tetris_BaseTests + TitleGen + VTileEdit + Werner_Flaschbier_Base + Werner_Flaschbier_BaseTests + WFSystem.Windows.Data + WpfApp + WpfApp_net + WpfDemoUI + WpfDemoUI1 + WpfDemoUI2 + + + + + + diff --git a/CSharpBible/CSharpBibleTest/CSharpBibleTest.csproj b/CSharpBible/CSharpBibleTest/CSharpBibleTest.csproj index a87fa8118..a55c8dc22 100644 --- a/CSharpBible/CSharpBibleTest/CSharpBibleTest.csproj +++ b/CSharpBible/CSharpBibleTest/CSharpBibleTest.csproj @@ -1,6 +1,8 @@  - + + + Debug AnyCPU @@ -23,6 +25,8 @@ + + @@ -43,20 +47,79 @@ 4 + + ..\packages\Microsoft.ApplicationInsights.2.22.0\lib\net46\Microsoft.ApplicationInsights.dll + + + + ..\packages\Microsoft.Testing.Extensions.Telemetry.1.0.0\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll + + + ..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.0.0\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll + + + ..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.0.0\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll + + + ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.0\lib\netstandard2.0\Microsoft.Testing.Platform.dll + + + ..\packages\Microsoft.Testing.Platform.MSBuild.1.0.0\lib\netstandard2.0\Microsoft.Testing.Platform.MSBuild.dll + + + ..\packages\Microsoft.TestPlatform.ObjectModel.17.8.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll + + + ..\packages\Microsoft.TestPlatform.ObjectModel.17.8.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll + + + ..\packages\Microsoft.TestPlatform.ObjectModel.17.8.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + - ..\packages\MSTest.TestFramework.3.0.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + ..\packages\MSTest.TestFramework.3.2.0\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - ..\packages\MSTest.TestFramework.3.0.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + ..\packages\MSTest.TestFramework.3.2.0\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + + + ..\packages\NuGet.Frameworks.6.8.0\lib\net472\NuGet.Frameworks.dll + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + ..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll + + + + ..\packages\System.Diagnostics.DiagnosticSource.8.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll + + + ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Reflection.Metadata.8.0.0\lib\net462\System.Reflection.Metadata.dll + + + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + + @@ -65,8 +128,12 @@ Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}". - - + + + + + - + + \ No newline at end of file diff --git a/CSharpBible/CSharpBibleTest/UnitTest1.cs b/CSharpBible/CSharpBibleTest/UnitTest1.cs index ed03496ba..679997cfd 100644 --- a/CSharpBible/CSharpBibleTest/UnitTest1.cs +++ b/CSharpBible/CSharpBibleTest/UnitTest1.cs @@ -11,7 +11,6 @@ // // // *********************************************************************** -using System; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace CSharpBibleTest diff --git a/CSharpBible/CSharpBibleTest/app.config b/CSharpBible/CSharpBibleTest/app.config new file mode 100644 index 000000000..84f4444d1 --- /dev/null +++ b/CSharpBible/CSharpBibleTest/app.config @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CSharpBible/Calc/Calc.props b/CSharpBible/Calc/Calc.props new file mode 100644 index 000000000..a7e1da5b0 --- /dev/null +++ b/CSharpBible/Calc/Calc.props @@ -0,0 +1,14 @@ + + + ..\.. + ..\..\..\bin\$(MSBuildProjectName)\ + ..\..\..\obj\$(MSBuildProjectName)\ + 12.0 + enable + disable + JC-Soft + Joe Care + Copyright © JC-Soft 2023 + $(MSBuildProjectName.Replace(" ", "_").Replace("_net","")) + + \ No newline at end of file diff --git a/CSharpBible/Calc/Calc.sln b/CSharpBible/Calc/Calc.sln new file mode 100644 index 000000000..cb5bf2d3e --- /dev/null +++ b/CSharpBible/Calc/Calc.sln @@ -0,0 +1,159 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Projektmappenelemente", "Projektmappenelemente", "{658BD492-33FF-4995-AAE7-4F6894E92F0C}" + ProjectSection(SolutionItems) = preProject + Calc.props = Calc.props + Calc_net.props = Calc_net.props + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_BaseLib", "..\Libraries\MVVM_BaseLib\MVVM_BaseLib.csproj", "{890CF504-3814-443B-9EE6-E8BCACF68203}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{AF041458-CF94-4D6D-BB0F-8BC50F4F099C}" + ProjectSection(SolutionItems) = preProject + ..\Libraries\Libraries_net.props = ..\Libraries\Libraries_net.props + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_BaseLibTests", "..\Libraries\MVVM_BaseLibTests\MVVM_BaseLibTests.csproj", "{66EB60F2-523D-47C8-95EA-C7E10759E239}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WFSystem.Windows.Data", "..\Libraries\WFSystem.Data\WFSystem.Windows.Data.csproj", "{A475FCEE-744A-444C-90B9-1F211B019F61}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc32", "Calc32\Calc32.csproj", "{1EAF991F-7568-4A07-8E44-46B363676825}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc32_net", "Calc32\Calc32_net.csproj", "{E4543496-79D8-48F4-A197-A4CF742D9E90}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc32Cons", "Calc32Cons\Calc32Cons.csproj", "{27B15469-4A62-4220-B05A-ABD38CC99745}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calc32Cons_net", "Calc32Cons\Calc32Cons_net.csproj", "{9A31567A-4BDD-442A-912A-C82D020D6269}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc32_netTests", "Calc32Tests\Calc32_netTests.csproj", "{D28D7985-370A-4ECB-B297-554E0CA6DF28}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc32Tests", "Calc32Tests\Calc32Tests.csproj", "{0D22F9E3-D73B-41B2-AC20-40B7C725DDC9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleLib", "..\Libraries\ConsoleLib\ConsoleLib.csproj", "{3939ECD6-E203-4AA3-887D-D1E60C28080C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaseLib", "..\Libraries\BaseLib\BaseLib.csproj", "{23D5E06C-0491-4B34-A77E-B32C30409F6E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleLib_net", "..\Libraries\ConsoleLib\ConsoleLib_net.csproj", "{BFA03065-9947-4047-88A1-254C83EE99FC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc32WPF", "Calc32WPF\Calc32WPF.csproj", "{E09FE3E3-B911-4CDB-BDD1-763ED90C2C2E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc32WPF_net", "Calc32WPF\Calc32WPF_net.csproj", "{46E2AAF0-A18F-40F0-80D0-933A1F30A72D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc64Base", "Calc64Base\Calc64Base.csproj", "{8129C98F-ECE8-43B4-9A3F-819314F33D55}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc64Base_net", "Calc64Base\Calc64Base_net.csproj", "{F8569EDA-3EFB-4F06-88B8-1A8AAC2242CB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc64Base_win", "Calc64Base\Calc64Base_win.csproj", "{82653EF1-0910-4E58-8D34-177473F649E1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc64Base_netTests", "Calc64BaseTests\Calc64Base_netTests.csproj", "{097F1148-EE73-4829-B745-80DED5F189FE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Calc64BaseTests", "Calc64BaseTests\Calc64BaseTests.csproj", "{61A959C7-1789-4E1B-BBDD-7F68CDF7F012}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaseLib_net", "..\Libraries\BaseLib\BaseLib_net.csproj", "{54722CDC-D023-482B-A722-0BDCEDCE7C77}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {890CF504-3814-443B-9EE6-E8BCACF68203}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {890CF504-3814-443B-9EE6-E8BCACF68203}.Debug|Any CPU.Build.0 = Debug|Any CPU + {890CF504-3814-443B-9EE6-E8BCACF68203}.Release|Any CPU.ActiveCfg = Release|Any CPU + {890CF504-3814-443B-9EE6-E8BCACF68203}.Release|Any CPU.Build.0 = Release|Any CPU + {66EB60F2-523D-47C8-95EA-C7E10759E239}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {66EB60F2-523D-47C8-95EA-C7E10759E239}.Debug|Any CPU.Build.0 = Debug|Any CPU + {66EB60F2-523D-47C8-95EA-C7E10759E239}.Release|Any CPU.ActiveCfg = Release|Any CPU + {66EB60F2-523D-47C8-95EA-C7E10759E239}.Release|Any CPU.Build.0 = Release|Any CPU + {A475FCEE-744A-444C-90B9-1F211B019F61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A475FCEE-744A-444C-90B9-1F211B019F61}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A475FCEE-744A-444C-90B9-1F211B019F61}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A475FCEE-744A-444C-90B9-1F211B019F61}.Release|Any CPU.Build.0 = Release|Any CPU + {1EAF991F-7568-4A07-8E44-46B363676825}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1EAF991F-7568-4A07-8E44-46B363676825}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1EAF991F-7568-4A07-8E44-46B363676825}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1EAF991F-7568-4A07-8E44-46B363676825}.Release|Any CPU.Build.0 = Release|Any CPU + {E4543496-79D8-48F4-A197-A4CF742D9E90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E4543496-79D8-48F4-A197-A4CF742D9E90}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E4543496-79D8-48F4-A197-A4CF742D9E90}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E4543496-79D8-48F4-A197-A4CF742D9E90}.Release|Any CPU.Build.0 = Release|Any CPU + {27B15469-4A62-4220-B05A-ABD38CC99745}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {27B15469-4A62-4220-B05A-ABD38CC99745}.Debug|Any CPU.Build.0 = Debug|Any CPU + {27B15469-4A62-4220-B05A-ABD38CC99745}.Release|Any CPU.ActiveCfg = Release|Any CPU + {27B15469-4A62-4220-B05A-ABD38CC99745}.Release|Any CPU.Build.0 = Release|Any CPU + {9A31567A-4BDD-442A-912A-C82D020D6269}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9A31567A-4BDD-442A-912A-C82D020D6269}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9A31567A-4BDD-442A-912A-C82D020D6269}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9A31567A-4BDD-442A-912A-C82D020D6269}.Release|Any CPU.Build.0 = Release|Any CPU + {D28D7985-370A-4ECB-B297-554E0CA6DF28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D28D7985-370A-4ECB-B297-554E0CA6DF28}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D28D7985-370A-4ECB-B297-554E0CA6DF28}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D28D7985-370A-4ECB-B297-554E0CA6DF28}.Release|Any CPU.Build.0 = Release|Any CPU + {0D22F9E3-D73B-41B2-AC20-40B7C725DDC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0D22F9E3-D73B-41B2-AC20-40B7C725DDC9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0D22F9E3-D73B-41B2-AC20-40B7C725DDC9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0D22F9E3-D73B-41B2-AC20-40B7C725DDC9}.Release|Any CPU.Build.0 = Release|Any CPU + {3939ECD6-E203-4AA3-887D-D1E60C28080C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3939ECD6-E203-4AA3-887D-D1E60C28080C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3939ECD6-E203-4AA3-887D-D1E60C28080C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3939ECD6-E203-4AA3-887D-D1E60C28080C}.Release|Any CPU.Build.0 = Release|Any CPU + {23D5E06C-0491-4B34-A77E-B32C30409F6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {23D5E06C-0491-4B34-A77E-B32C30409F6E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {23D5E06C-0491-4B34-A77E-B32C30409F6E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {23D5E06C-0491-4B34-A77E-B32C30409F6E}.Release|Any CPU.Build.0 = Release|Any CPU + {BFA03065-9947-4047-88A1-254C83EE99FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BFA03065-9947-4047-88A1-254C83EE99FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BFA03065-9947-4047-88A1-254C83EE99FC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BFA03065-9947-4047-88A1-254C83EE99FC}.Release|Any CPU.Build.0 = Release|Any CPU + {E09FE3E3-B911-4CDB-BDD1-763ED90C2C2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E09FE3E3-B911-4CDB-BDD1-763ED90C2C2E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E09FE3E3-B911-4CDB-BDD1-763ED90C2C2E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E09FE3E3-B911-4CDB-BDD1-763ED90C2C2E}.Release|Any CPU.Build.0 = Release|Any CPU + {46E2AAF0-A18F-40F0-80D0-933A1F30A72D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {46E2AAF0-A18F-40F0-80D0-933A1F30A72D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {46E2AAF0-A18F-40F0-80D0-933A1F30A72D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {46E2AAF0-A18F-40F0-80D0-933A1F30A72D}.Release|Any CPU.Build.0 = Release|Any CPU + {8129C98F-ECE8-43B4-9A3F-819314F33D55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8129C98F-ECE8-43B4-9A3F-819314F33D55}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8129C98F-ECE8-43B4-9A3F-819314F33D55}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8129C98F-ECE8-43B4-9A3F-819314F33D55}.Release|Any CPU.Build.0 = Release|Any CPU + {F8569EDA-3EFB-4F06-88B8-1A8AAC2242CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F8569EDA-3EFB-4F06-88B8-1A8AAC2242CB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F8569EDA-3EFB-4F06-88B8-1A8AAC2242CB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F8569EDA-3EFB-4F06-88B8-1A8AAC2242CB}.Release|Any CPU.Build.0 = Release|Any CPU + {82653EF1-0910-4E58-8D34-177473F649E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {82653EF1-0910-4E58-8D34-177473F649E1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {82653EF1-0910-4E58-8D34-177473F649E1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {82653EF1-0910-4E58-8D34-177473F649E1}.Release|Any CPU.Build.0 = Release|Any CPU + {097F1148-EE73-4829-B745-80DED5F189FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {097F1148-EE73-4829-B745-80DED5F189FE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {097F1148-EE73-4829-B745-80DED5F189FE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {097F1148-EE73-4829-B745-80DED5F189FE}.Release|Any CPU.Build.0 = Release|Any CPU + {61A959C7-1789-4E1B-BBDD-7F68CDF7F012}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {61A959C7-1789-4E1B-BBDD-7F68CDF7F012}.Debug|Any CPU.Build.0 = Debug|Any CPU + {61A959C7-1789-4E1B-BBDD-7F68CDF7F012}.Release|Any CPU.ActiveCfg = Release|Any CPU + {61A959C7-1789-4E1B-BBDD-7F68CDF7F012}.Release|Any CPU.Build.0 = Release|Any CPU + {54722CDC-D023-482B-A722-0BDCEDCE7C77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {54722CDC-D023-482B-A722-0BDCEDCE7C77}.Debug|Any CPU.Build.0 = Debug|Any CPU + {54722CDC-D023-482B-A722-0BDCEDCE7C77}.Release|Any CPU.ActiveCfg = Release|Any CPU + {54722CDC-D023-482B-A722-0BDCEDCE7C77}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {890CF504-3814-443B-9EE6-E8BCACF68203} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {66EB60F2-523D-47C8-95EA-C7E10759E239} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {A475FCEE-744A-444C-90B9-1F211B019F61} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {3939ECD6-E203-4AA3-887D-D1E60C28080C} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {23D5E06C-0491-4B34-A77E-B32C30409F6E} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {BFA03065-9947-4047-88A1-254C83EE99FC} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {54722CDC-D023-482B-A722-0BDCEDCE7C77} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {7122B3E4-D85C-47AC-B303-C0E0C77FA84F} + EndGlobalSection +EndGlobal diff --git a/CSharpBible/Calc/Calc32/Calc32.csproj b/CSharpBible/Calc/Calc32/Calc32.csproj index 799a51204..606bd0732 100644 --- a/CSharpBible/Calc/Calc32/Calc32.csproj +++ b/CSharpBible/Calc/Calc32/Calc32.csproj @@ -1,115 +1,53 @@ - - - - Debug - AnyCPU - {1050FECD-B665-4B48-A068-5C46259D640A} - WinExe - Calc32 - Calc32 - ..\..\..\bin\$(MSBuildProjectName)\ - ..\..\..\obj\$(MSBuildProjectName)\ - ..\..\..\obj\$(MSBuildProjectName)\ - v4.8 - 512 - true - true - - - - - AnyCPU - true - full - false - ..\..\..\bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - ..\..\..\bin\Release\ - TRACE - prompt - 4 - - - Resources\Calc_32.ico - - - - - - - - - - - - - - - - - Component - - - - - Form - - - FrmCalc32Main.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - FrmCalc32Main.cs - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - - - - - - - - - - - - - - - - - - - {ABC8A3FB-12D1-40ED-AA6C-DBFF48B7A080} - MVVM_BaseLib - - - + + + + WinExe + net462-windows;net472-windows;net48-windows;net481-windows + true + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + PublicSettingsSingleFileGenerator + Settings.Designer.cs + + \ No newline at end of file diff --git a/CSharpBible/Calc/Calc32/Calc32_net.csproj b/CSharpBible/Calc/Calc32/Calc32_net.csproj index f5b5b0309..a173402ff 100644 --- a/CSharpBible/Calc/Calc32/Calc32_net.csproj +++ b/CSharpBible/Calc/Calc32/Calc32_net.csproj @@ -1,21 +1,12 @@  + WinExe - net6.0-windows - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\bin\$(MSBuildProjectName) + net6.0-windows;net7.0-windows;net8.0-windows true - - enable - disable - - - $(MSBuildProjectName.Replace(" ", "_").Replace("_net","")) - @@ -28,7 +19,7 @@ - + diff --git a/CSharpBible/Calc/Calc32/NonVisual/CalculatorClass.cs b/CSharpBible/Calc/Calc32/NonVisual/CalculatorClass.cs index c6602ec7a..ee4b39ee5 100644 --- a/CSharpBible/Calc/Calc32/NonVisual/CalculatorClass.cs +++ b/CSharpBible/Calc/Calc32/NonVisual/CalculatorClass.cs @@ -11,6 +11,7 @@ // // // *********************************************************************** +using BaseLib.Helper; using System; using System.ComponentModel; @@ -30,7 +31,7 @@ public class CalculatorClass : Component /// Enum Mode /// of Operation /// - enum eOpMode + public enum eOpMode { /// /// No mode @@ -77,20 +78,26 @@ enum eOpMode /// The binary not /// mode /// - BinaryNot = 9 + BinaryNot = 9, + /// + /// The binary not + /// mode + /// + Negate = 10 }; #region Property #region private property // Fields /// - /// The n akkumulator + /// The accumulator /// - private int nAkkumulator; // Editorfeld + private int nAccumulator; // Editorfeld /// /// The n mode /// - private eOpMode nMode; + private eOpMode nMode { get => _nMode; set => value.SetProperty(ref _nMode, FireModeChangeEvent); } + /// /// The b edit mode /// @@ -100,6 +107,7 @@ enum eOpMode /// The n memory /// private int nMemory; // Gemerkte Zahl für Operationen + private eOpMode _nMode; #endregion /// @@ -109,22 +117,17 @@ enum eOpMode /// /// Occurs when a change happens. /// - public event EventHandler OnChange; + public event EventHandler<(string,object?,object?)>? OnChange; // Properties /// - /// Gets or sets the akkumulator. + /// Gets or sets the accumulator. /// - /// The akkumulator. - public int Akkumulator + /// The accumulator. + public int Accumulator { - get => nAkkumulator; - set - { - if (value == nAkkumulator) return; - nAkkumulator = value; - OnChange?.Invoke(this, null); - } + get => nAccumulator; + set => value.SetProperty(ref nAccumulator, FireChangeEvent); } /// @@ -134,13 +137,10 @@ public int Akkumulator public int Memory { get => nMemory; - set - { - if (value == nMemory) return; - nMemory = value; - OnChange?.Invoke(this, null); - } + set => value.SetProperty(ref nMemory, FireChangeEvent); } + + /// /// Gets the operation text. /// @@ -154,10 +154,20 @@ public int Memory /// public CalculatorClass() { - nAkkumulator = 0; + nAccumulator = 0; nMode = 0; OnChange = null; } + private void FireChangeEvent(string Prop, int ol, int nw) + { + OnChange?.Invoke(this, (Prop,ol,nw)); + } + + private void FireModeChangeEvent(string arg1, eOpMode arg2, eOpMode arg3) + { + OnChange?.Invoke(this,(nameof(OperationText), sMode[(int)arg2], sMode[(int)arg3])); + } + /// /// Button of Numbers. @@ -167,15 +177,15 @@ public void NumberButton(int aNumber) { if (bEditMode) { - if (nAkkumulator < int.MaxValue / 10) + if (nAccumulator < int.MaxValue / 10) { - Akkumulator = nAkkumulator * 10 + aNumber; + Accumulator = nAccumulator * 10 + aNumber; } } else { bEditMode = true; - Akkumulator = aNumber; + Accumulator = aNumber; } } @@ -185,35 +195,20 @@ public void NumberButton(int aNumber) /// The operation. public void Operation(int v) { - if ((v > 0) && (v <= (int)eOpMode.BinaryNot)) + if ((v > 0) && (v <= (int)eOpMode.Negate)) { - bEditMode = false; - switch (nMode) + bEditMode &= (v ==(int)eOpMode.Negate); + Accumulator = nMode switch { - case eOpMode.Plus: - nAkkumulator = nMemory + nAkkumulator; - break; - case eOpMode.Minus: - nAkkumulator = nMemory - nAkkumulator; - break; - case eOpMode.Multiply: - nAkkumulator = nMemory * nAkkumulator; - break; - case eOpMode.Divide: - nAkkumulator = nMemory / nAkkumulator; - break; - case eOpMode.BinaryAnd: - nAkkumulator = nMemory & nAkkumulator; - break; - case eOpMode.BinaryOr: - nAkkumulator = nMemory | nAkkumulator; - break; - case eOpMode.BinaryXor: - nAkkumulator = nMemory ^ nAkkumulator; - break; - default: - break; - } + eOpMode.Plus => nMemory + nAccumulator, + eOpMode.Minus => nMemory - nAccumulator, + eOpMode.Multiply => nMemory * nAccumulator, + eOpMode.Divide => nMemory / nAccumulator, + eOpMode.BinaryAnd => nMemory & nAccumulator, + eOpMode.BinaryOr => nMemory | nAccumulator, + eOpMode.BinaryXor => nMemory ^ nAccumulator, + _ => nAccumulator + }; if ((eOpMode)v == eOpMode.CalcResult) { @@ -222,12 +217,16 @@ public void Operation(int v) } else if ((eOpMode) v == eOpMode.BinaryNot) { - Akkumulator = ~nAkkumulator; + Accumulator = ~nAccumulator; + } + else if ((eOpMode)v == eOpMode.Negate) + { + Accumulator = -nAccumulator; } else { nMode = (eOpMode)v; - Memory = nAkkumulator; + Memory = nAccumulator; } } @@ -236,17 +235,8 @@ public void Operation(int v) /// /// Backs the space. /// - public void BackSpace() - { - if (bEditMode) - { - Akkumulator = nAkkumulator / 10; - } - else - { - Akkumulator = 0; - } - } + public void BackSpace() + => Accumulator = bEditMode ? nAccumulator / 10 : 0; #endregion } } diff --git a/CSharpBible/Calc/Calc32/Program.cs b/CSharpBible/Calc/Calc32/Program.cs index 6bf6601b4..edd2bb5c0 100644 --- a/CSharpBible/Calc/Calc32/Program.cs +++ b/CSharpBible/Calc/Calc32/Program.cs @@ -24,17 +24,19 @@ namespace CSharpBible.Calc32 /// /// Class Program. /// - static class Program + public static class Program { + public static Func GetMainForm { get; set; } = ()=>new FrmCalc32Main(); + /// /// Der Haupteinstiegspunkt für die Anwendung. /// [STAThread] - static void Main() + public static void Main() { Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new FrmCalc32Main()); +// Application.SetCompatibleTextRenderingDefault(false); + Application.Run(GetMainForm()); } } } diff --git a/CSharpBible/Calc/Calc32/Properties/Resources.Designer.cs b/CSharpBible/Calc/Calc32/Properties/Resources.Designer.cs index 87f80981f..fd5401b70 100644 --- a/CSharpBible/Calc/Calc32/Properties/Resources.Designer.cs +++ b/CSharpBible/Calc/Calc32/Properties/Resources.Designer.cs @@ -1,27 +1,19 @@ -// *********************************************************************** -// Assembly : Calc32 -// Author : Mir -// Created : 12-19-2021 +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 // -// Last Modified By : Mir -// Last Modified On : 10-22-2022 -// *********************************************************************** -// -// Copyright © JC-Soft 2020 -// -// -// *********************************************************************** +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. +// +//------------------------------------------------------------------------------ -/// -/// The Properties namespace. -/// -/// namespace Calc32.Properties { using System; - - + + /// - /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + /// 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. @@ -31,31 +23,18 @@ namespace Calc32.Properties { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { - - /// - /// The resource man - /// - /// + private static global::System.Resources.ResourceManager resourceMan; - - /// - /// The resource culture - /// - /// + private static global::System.Globalization.CultureInfo resourceCulture; - - /// - /// Initializes a new instance of the class. - /// - /// + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Resources() { } - + /// - /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. /// - /// The resource manager. [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { get { @@ -66,12 +45,11 @@ internal Resources() { return resourceMan; } } - + /// - /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. /// - /// The culture. [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { get { @@ -81,44 +59,40 @@ internal Resources() { resourceCulture = value; } } - + /// - /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol). + /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol). /// - /// The calculate 32. internal static System.Drawing.Icon Calc_32 { get { object obj = ResourceManager.GetObject("Calc_32", resourceCulture); return ((System.Drawing.Icon)(obj)); } } - + /// - /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. /// - /// The calculator 64. internal static System.Drawing.Bitmap calculator_64 { get { object obj = ResourceManager.GetObject("calculator_64", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } - + /// - /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. /// - /// The exit. internal static System.Drawing.Bitmap Exit { get { object obj = ResourceManager.GetObject("Exit", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } - + /// - /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. /// - /// The glow white. internal static System.Drawing.Bitmap Glow_White { get { object obj = ResourceManager.GetObject("Glow_White", resourceCulture); diff --git a/CSharpBible/Calc/Calc32/Properties/Settings.Designer.cs b/CSharpBible/Calc/Calc32/Properties/Settings.Designer.cs index 31d6025cd..f43b071d1 100644 --- a/CSharpBible/Calc/Calc32/Properties/Settings.Designer.cs +++ b/CSharpBible/Calc/Calc32/Properties/Settings.Designer.cs @@ -1,45 +1,22 @@ -// *********************************************************************** -// Assembly : Calc32 -// Author : Mir -// Created : 12-19-2021 +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 // -// Last Modified By : Mir -// Last Modified On : 10-22-2022 -// *********************************************************************** -// -// Copyright © JC-Soft 2020 -// -// -// *********************************************************************** +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. +// +//------------------------------------------------------------------------------ -/// -/// The Properties namespace. -/// -/// namespace Calc32.Properties { - - - /// - /// Class Settings. This class cannot be inherited. - /// Implements the - /// - /// - /// + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.3.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - /// - /// The default instance - /// - /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0")] + public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - /// - /// Gets the default. - /// - /// The default. - /// + public static Settings Default { get { return defaultInstance; diff --git a/CSharpBible/Calc/Calc32/Visual/FrmCalc32Main.Designer.cs b/CSharpBible/Calc/Calc32/Visual/FrmCalc32Main.Designer.cs index 340cef09d..f75d29522 100644 --- a/CSharpBible/Calc/Calc32/Visual/FrmCalc32Main.Designer.cs +++ b/CSharpBible/Calc/Calc32/Visual/FrmCalc32Main.Designer.cs @@ -54,879 +54,857 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - this.btnOne = new System.Windows.Forms.Button(); - this.lblResult = new System.Windows.Forms.Label(); - this.calculatorClass1 = new Calc32.NonVisual.CalculatorClass(); - this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.button1 = new System.Windows.Forms.Button(); - this.button2 = new System.Windows.Forms.Button(); - this.button3 = new System.Windows.Forms.Button(); - this.button4 = new System.Windows.Forms.Button(); - this.button5 = new System.Windows.Forms.Button(); - this.button6 = new System.Windows.Forms.Button(); - this.button7 = new System.Windows.Forms.Button(); - this.button8 = new System.Windows.Forms.Button(); - this.btnHexA = new System.Windows.Forms.Button(); - this.button10 = new System.Windows.Forms.Button(); - this.button11 = new System.Windows.Forms.Button(); - this.lblOperation = new System.Windows.Forms.Label(); - this.lblMemory = new System.Windows.Forms.Label(); - this.btnBack = new System.Windows.Forms.Button(); - this.btnClear = new System.Windows.Forms.Button(); - this.btnClearAll = new System.Windows.Forms.Button(); - this.btnHexB = new System.Windows.Forms.Button(); - this.btnHexC = new System.Windows.Forms.Button(); - this.btnHexF = new System.Windows.Forms.Button(); - this.btnHexE = new System.Windows.Forms.Button(); - this.btnHexD = new System.Windows.Forms.Button(); - this.btnMult = new System.Windows.Forms.Button(); - this.btnDivide = new System.Windows.Forms.Button(); - this.btnPlus = new System.Windows.Forms.Button(); - this.btnMinus = new System.Windows.Forms.Button(); - this.btnResult = new System.Windows.Forms.Button(); - this.btnOpAnd = new System.Windows.Forms.Button(); - this.btnOpOR = new System.Windows.Forms.Button(); - this.btnOpXOR = new System.Windows.Forms.Button(); - this.btnOpNOT = new System.Windows.Forms.Button(); - this.pnlLeft = new System.Windows.Forms.Panel(); - this.panel2 = new System.Windows.Forms.Panel(); - this.pnlRight = new System.Windows.Forms.Panel(); - this.button9 = new System.Windows.Forms.Button(); - this.button12 = new System.Windows.Forms.Button(); - this.pnlBottom = new System.Windows.Forms.Panel(); - this.btnClose = new System.Windows.Forms.Button(); - this.panel1 = new System.Windows.Forms.Panel(); - this.panel3 = new System.Windows.Forms.Panel(); - this.panel4 = new System.Windows.Forms.Panel(); - this.panel5 = new System.Windows.Forms.Panel(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); - this.pnlLeft.SuspendLayout(); - this.SuspendLayout(); + btnOne = new System.Windows.Forms.Button(); + lblResult = new System.Windows.Forms.Label(); + calculatorClass1 = new CalculatorClass(); + pictureBox1 = new System.Windows.Forms.PictureBox(); + button1 = new System.Windows.Forms.Button(); + button2 = new System.Windows.Forms.Button(); + button3 = new System.Windows.Forms.Button(); + button4 = new System.Windows.Forms.Button(); + button5 = new System.Windows.Forms.Button(); + button6 = new System.Windows.Forms.Button(); + button7 = new System.Windows.Forms.Button(); + button8 = new System.Windows.Forms.Button(); + btnHexA = new System.Windows.Forms.Button(); + button10 = new System.Windows.Forms.Button(); + button11 = new System.Windows.Forms.Button(); + lblOperation = new System.Windows.Forms.Label(); + lblMemory = new System.Windows.Forms.Label(); + btnBack = new System.Windows.Forms.Button(); + btnClear = new System.Windows.Forms.Button(); + btnClearAll = new System.Windows.Forms.Button(); + btnHexB = new System.Windows.Forms.Button(); + btnHexC = new System.Windows.Forms.Button(); + btnHexF = new System.Windows.Forms.Button(); + btnHexE = new System.Windows.Forms.Button(); + btnHexD = new System.Windows.Forms.Button(); + btnMult = new System.Windows.Forms.Button(); + btnDivide = new System.Windows.Forms.Button(); + btnPlus = new System.Windows.Forms.Button(); + btnMinus = new System.Windows.Forms.Button(); + btnResult = new System.Windows.Forms.Button(); + btnOpAnd = new System.Windows.Forms.Button(); + btnOpOR = new System.Windows.Forms.Button(); + btnOpXOR = new System.Windows.Forms.Button(); + btnOpNOT = new System.Windows.Forms.Button(); + pnlLeft = new System.Windows.Forms.Panel(); + panel2 = new System.Windows.Forms.Panel(); + pnlRight = new System.Windows.Forms.Panel(); + button9 = new System.Windows.Forms.Button(); + button12 = new System.Windows.Forms.Button(); + pnlBottom = new System.Windows.Forms.Panel(); + btnClose = new System.Windows.Forms.Button(); + panel1 = new System.Windows.Forms.Panel(); + panel3 = new System.Windows.Forms.Panel(); + panel4 = new System.Windows.Forms.Panel(); + panel5 = new System.Windows.Forms.Panel(); + ((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit(); + pnlLeft.SuspendLayout(); + SuspendLayout(); // // btnOne // - this.btnOne.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnOne.AutoEllipsis = true; - this.btnOne.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.btnOne.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.btnOne.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnOne.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnOne.Location = new System.Drawing.Point(363, 299); - this.btnOne.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.btnOne.Name = "btnOne"; - this.btnOne.Size = new System.Drawing.Size(37, 38); - this.btnOne.TabIndex = 0; - this.btnOne.Tag = "1"; - this.btnOne.Text = "1"; - this.btnOne.UseVisualStyleBackColor = true; - this.btnOne.Click += new System.EventHandler(this.btnNummber_Click); - this.btnOne.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmCalc32Main_KeyDown); - this.btnOne.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + btnOne.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + btnOne.AutoEllipsis = true; + btnOne.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + btnOne.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + btnOne.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + btnOne.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + btnOne.Location = new System.Drawing.Point(605, 575); + btnOne.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + btnOne.Name = "btnOne"; + btnOne.Size = new System.Drawing.Size(62, 73); + btnOne.TabIndex = 0; + btnOne.Tag = "1"; + btnOne.Text = "1"; + btnOne.UseVisualStyleBackColor = true; + btnOne.Click += btnNumber_Click; + btnOne.KeyDown += FrmCalc32Main_KeyDown; + btnOne.MouseMove += FrmCalc32Main_MouseMove; // // lblResult // - this.lblResult.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lblResult.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(240))))); - this.lblResult.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.lblResult.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblResult.Location = new System.Drawing.Point(124, 47); - this.lblResult.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.lblResult.Name = "lblResult"; - this.lblResult.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.lblResult.Size = new System.Drawing.Size(444, 37); - this.lblResult.TabIndex = 1; - this.lblResult.Text = "0"; - this.lblResult.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - this.lblResult.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + lblResult.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + lblResult.BackColor = System.Drawing.Color.FromArgb(192, 255, 240); + lblResult.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + lblResult.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point); + lblResult.Location = new System.Drawing.Point(207, 90); + lblResult.Name = "lblResult"; + lblResult.RightToLeft = System.Windows.Forms.RightToLeft.No; + lblResult.Size = new System.Drawing.Size(740, 71); + lblResult.TabIndex = 1; + lblResult.Text = "0"; + lblResult.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + lblResult.MouseMove += FrmCalc32Main_MouseMove; // // calculatorClass1 // - this.calculatorClass1.Akkumulator = 0; - this.calculatorClass1.Memory = 0; - this.calculatorClass1.OnChange += new System.EventHandler(this.calculatorClassChange); + calculatorClass1.Accumulator = 0; + calculatorClass1.Memory = 0; + calculatorClass1.OnChange += calculatorClassChange; // // pictureBox1 // - this.pictureBox1.BackgroundImage = Resources.Glow_White; - this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; - this.pictureBox1.Location = new System.Drawing.Point(627, 383); - this.pictureBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(130, 135); - this.pictureBox1.TabIndex = 2; - this.pictureBox1.TabStop = false; - this.pictureBox1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + pictureBox1.BackgroundImage = Resources.Glow_White; + pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + pictureBox1.Location = new System.Drawing.Point(1045, 737); + pictureBox1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + pictureBox1.Name = "pictureBox1"; + pictureBox1.Size = new System.Drawing.Size(217, 260); + pictureBox1.TabIndex = 2; + pictureBox1.TabStop = false; + pictureBox1.MouseMove += FrmCalc32Main_MouseMove; // // button1 // - this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button1.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.button1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.button1.Location = new System.Drawing.Point(405, 299); - this.button1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(37, 38); - this.button1.TabIndex = 4; - this.button1.Tag = "2"; - this.button1.Text = "2"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.btnNummber_Click); - this.button1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmCalc32Main_KeyDown); - this.button1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + button1.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + button1.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + button1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + button1.Location = new System.Drawing.Point(675, 575); + button1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + button1.Name = "button1"; + button1.Size = new System.Drawing.Size(62, 73); + button1.TabIndex = 4; + button1.Tag = "2"; + button1.Text = "2"; + button1.UseVisualStyleBackColor = true; + button1.Click += btnNumber_Click; + button1.KeyDown += FrmCalc32Main_KeyDown; + button1.MouseMove += FrmCalc32Main_MouseMove; // // button2 // - this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button2.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.button2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.button2.Location = new System.Drawing.Point(446, 299); - this.button2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(37, 38); - this.button2.TabIndex = 5; - this.button2.Tag = "3"; - this.button2.Text = "3"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.btnNummber_Click); - this.button2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmCalc32Main_KeyDown); - this.button2.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + button2.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + button2.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + button2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + button2.Location = new System.Drawing.Point(743, 575); + button2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + button2.Name = "button2"; + button2.Size = new System.Drawing.Size(62, 73); + button2.TabIndex = 5; + button2.Tag = "3"; + button2.Text = "3"; + button2.UseVisualStyleBackColor = true; + button2.Click += btnNumber_Click; + button2.KeyDown += FrmCalc32Main_KeyDown; + button2.MouseMove += FrmCalc32Main_MouseMove; // // button3 // - this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button3.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.button3.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.button3.Location = new System.Drawing.Point(363, 257); - this.button3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.button3.Name = "button3"; - this.button3.Size = new System.Drawing.Size(37, 38); - this.button3.TabIndex = 6; - this.button3.Tag = "4"; - this.button3.Text = "4"; - this.button3.UseVisualStyleBackColor = true; - this.button3.Click += new System.EventHandler(this.btnNummber_Click); - this.button3.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmCalc32Main_KeyDown); - this.button3.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + button3.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + button3.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + button3.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + button3.Location = new System.Drawing.Point(605, 494); + button3.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + button3.Name = "button3"; + button3.Size = new System.Drawing.Size(62, 73); + button3.TabIndex = 6; + button3.Tag = "4"; + button3.Text = "4"; + button3.UseVisualStyleBackColor = true; + button3.Click += btnNumber_Click; + button3.KeyDown += FrmCalc32Main_KeyDown; + button3.MouseMove += FrmCalc32Main_MouseMove; // // button4 // - this.button4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button4.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.button4.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.button4.Location = new System.Drawing.Point(405, 257); - this.button4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.button4.Name = "button4"; - this.button4.Size = new System.Drawing.Size(37, 38); - this.button4.TabIndex = 7; - this.button4.Tag = "5"; - this.button4.Text = "5"; - this.button4.UseVisualStyleBackColor = true; - this.button4.Click += new System.EventHandler(this.btnNummber_Click); - this.button4.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmCalc32Main_KeyDown); - this.button4.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + button4.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + button4.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + button4.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + button4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + button4.Location = new System.Drawing.Point(675, 494); + button4.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + button4.Name = "button4"; + button4.Size = new System.Drawing.Size(62, 73); + button4.TabIndex = 7; + button4.Tag = "5"; + button4.Text = "5"; + button4.UseVisualStyleBackColor = true; + button4.Click += btnNumber_Click; + button4.KeyDown += FrmCalc32Main_KeyDown; + button4.MouseMove += FrmCalc32Main_MouseMove; // // button5 // - this.button5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button5.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.button5.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.button5.Location = new System.Drawing.Point(446, 257); - this.button5.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.button5.Name = "button5"; - this.button5.Size = new System.Drawing.Size(37, 38); - this.button5.TabIndex = 8; - this.button5.Tag = "6"; - this.button5.Text = "6"; - this.button5.UseVisualStyleBackColor = true; - this.button5.Click += new System.EventHandler(this.btnNummber_Click); - this.button5.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmCalc32Main_KeyDown); - this.button5.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + button5.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + button5.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + button5.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + button5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + button5.Location = new System.Drawing.Point(743, 494); + button5.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + button5.Name = "button5"; + button5.Size = new System.Drawing.Size(62, 73); + button5.TabIndex = 8; + button5.Tag = "6"; + button5.Text = "6"; + button5.UseVisualStyleBackColor = true; + button5.Click += btnNumber_Click; + button5.KeyDown += FrmCalc32Main_KeyDown; + button5.MouseMove += FrmCalc32Main_MouseMove; // // button6 // - this.button6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button6.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.button6.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button6.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.button6.Location = new System.Drawing.Point(363, 214); - this.button6.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.button6.Name = "button6"; - this.button6.Size = new System.Drawing.Size(37, 38); - this.button6.TabIndex = 9; - this.button6.Tag = "7"; - this.button6.Text = "7"; - this.button6.UseVisualStyleBackColor = true; - this.button6.Click += new System.EventHandler(this.btnNummber_Click); - this.button6.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmCalc32Main_KeyDown); - this.button6.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + button6.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + button6.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + button6.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + button6.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + button6.Location = new System.Drawing.Point(605, 412); + button6.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + button6.Name = "button6"; + button6.Size = new System.Drawing.Size(62, 73); + button6.TabIndex = 9; + button6.Tag = "7"; + button6.Text = "7"; + button6.UseVisualStyleBackColor = true; + button6.Click += btnNumber_Click; + button6.KeyDown += FrmCalc32Main_KeyDown; + button6.MouseMove += FrmCalc32Main_MouseMove; // // button7 // - this.button7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button7.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.button7.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.button7.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.button7.Location = new System.Drawing.Point(405, 214); - this.button7.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.button7.Name = "button7"; - this.button7.Size = new System.Drawing.Size(37, 38); - this.button7.TabIndex = 10; - this.button7.Tag = "8"; - this.button7.Text = "8"; - this.button7.UseVisualStyleBackColor = true; - this.button7.Click += new System.EventHandler(this.btnNummber_Click); - this.button7.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmCalc32Main_KeyDown); - this.button7.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + button7.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + button7.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + button7.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + button7.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + button7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + button7.Location = new System.Drawing.Point(675, 412); + button7.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + button7.Name = "button7"; + button7.Size = new System.Drawing.Size(62, 73); + button7.TabIndex = 10; + button7.Tag = "8"; + button7.Text = "8"; + button7.UseVisualStyleBackColor = true; + button7.Click += btnNumber_Click; + button7.KeyDown += FrmCalc32Main_KeyDown; + button7.MouseMove += FrmCalc32Main_MouseMove; // // button8 // - this.button8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button8.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.button8.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.button8.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button8.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.button8.Location = new System.Drawing.Point(446, 214); - this.button8.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.button8.Name = "button8"; - this.button8.Size = new System.Drawing.Size(37, 38); - this.button8.TabIndex = 11; - this.button8.Tag = "9"; - this.button8.Text = "9"; - this.button8.UseVisualStyleBackColor = true; - this.button8.Click += new System.EventHandler(this.btnNummber_Click); - this.button8.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmCalc32Main_KeyDown); - this.button8.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + button8.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + button8.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + button8.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + button8.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + button8.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + button8.Location = new System.Drawing.Point(743, 412); + button8.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + button8.Name = "button8"; + button8.Size = new System.Drawing.Size(62, 73); + button8.TabIndex = 11; + button8.Tag = "9"; + button8.Text = "9"; + button8.UseVisualStyleBackColor = true; + button8.Click += btnNumber_Click; + button8.KeyDown += FrmCalc32Main_KeyDown; + button8.MouseMove += FrmCalc32Main_MouseMove; // // btnHexA // - this.btnHexA.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnHexA.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.btnHexA.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.btnHexA.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnHexA.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnHexA.Location = new System.Drawing.Point(363, 172); - this.btnHexA.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.btnHexA.Name = "btnHexA"; - this.btnHexA.Size = new System.Drawing.Size(37, 38); - this.btnHexA.TabIndex = 12; - this.btnHexA.Tag = "10"; - this.btnHexA.Text = "A"; - this.btnHexA.UseVisualStyleBackColor = true; - this.btnHexA.Click += new System.EventHandler(this.btnNummber_Click); - this.btnHexA.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmCalc32Main_KeyDown); - this.btnHexA.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + btnHexA.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + btnHexA.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + btnHexA.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + btnHexA.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + btnHexA.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + btnHexA.Location = new System.Drawing.Point(605, 331); + btnHexA.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + btnHexA.Name = "btnHexA"; + btnHexA.Size = new System.Drawing.Size(62, 73); + btnHexA.TabIndex = 12; + btnHexA.Tag = "10"; + btnHexA.Text = "A"; + btnHexA.UseVisualStyleBackColor = true; + btnHexA.Click += btnNumber_Click; + btnHexA.KeyDown += FrmCalc32Main_KeyDown; + btnHexA.MouseMove += FrmCalc32Main_MouseMove; // // button10 // - this.button10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button10.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.button10.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.button10.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button10.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.button10.Location = new System.Drawing.Point(363, 341); - this.button10.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.button10.Name = "button10"; - this.button10.Size = new System.Drawing.Size(79, 38); - this.button10.TabIndex = 13; - this.button10.Tag = "0"; - this.button10.Text = "0"; - this.button10.UseVisualStyleBackColor = true; - this.button10.Click += new System.EventHandler(this.btnNummber_Click); - this.button10.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmCalc32Main_KeyDown); - this.button10.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + button10.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + button10.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + button10.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + button10.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + button10.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + button10.Location = new System.Drawing.Point(605, 656); + button10.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + button10.Name = "button10"; + button10.Size = new System.Drawing.Size(132, 73); + button10.TabIndex = 13; + button10.Tag = "0"; + button10.Text = "0"; + button10.UseVisualStyleBackColor = true; + button10.Click += btnNumber_Click; + button10.KeyDown += FrmCalc32Main_KeyDown; + button10.MouseMove += FrmCalc32Main_MouseMove; // // button11 // - this.button11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button11.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.button11.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.button11.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button11.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.button11.Location = new System.Drawing.Point(446, 341); - this.button11.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.button11.Name = "button11"; - this.button11.Size = new System.Drawing.Size(37, 38); - this.button11.TabIndex = 14; - this.button11.Tag = "+/-"; - this.button11.Text = "+/-"; - this.button11.UseVisualStyleBackColor = true; - this.button11.Click += new System.EventHandler(this.btnOperator_Click); - this.button11.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmCalc32Main_KeyDown); - this.button11.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + button11.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + button11.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + button11.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + button11.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + button11.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + button11.Location = new System.Drawing.Point(743, 656); + button11.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + button11.Name = "button11"; + button11.Size = new System.Drawing.Size(62, 73); + button11.TabIndex = 14; + button11.Tag = "+/-"; + button11.Text = "+/-"; + button11.UseVisualStyleBackColor = true; + button11.Click += btnOperator_Click; + button11.KeyDown += FrmCalc32Main_KeyDown; + button11.MouseMove += FrmCalc32Main_MouseMove; // // lblOperation // - this.lblOperation.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.lblOperation.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(240))))); - this.lblOperation.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.lblOperation.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblOperation.Location = new System.Drawing.Point(497, 6); - this.lblOperation.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.lblOperation.Name = "lblOperation"; - this.lblOperation.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.lblOperation.Size = new System.Drawing.Size(71, 37); - this.lblOperation.TabIndex = 15; - this.lblOperation.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - this.lblOperation.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + lblOperation.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right; + lblOperation.BackColor = System.Drawing.Color.FromArgb(192, 255, 240); + lblOperation.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + lblOperation.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point); + lblOperation.Location = new System.Drawing.Point(828, 12); + lblOperation.Name = "lblOperation"; + lblOperation.RightToLeft = System.Windows.Forms.RightToLeft.No; + lblOperation.Size = new System.Drawing.Size(118, 71); + lblOperation.TabIndex = 15; + lblOperation.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + lblOperation.MouseMove += FrmCalc32Main_MouseMove; // // lblMemory // - this.lblMemory.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lblMemory.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(240))))); - this.lblMemory.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.lblMemory.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblMemory.Location = new System.Drawing.Point(124, 6); - this.lblMemory.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.lblMemory.Name = "lblMemory"; - this.lblMemory.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.lblMemory.Size = new System.Drawing.Size(369, 37); - this.lblMemory.TabIndex = 16; - this.lblMemory.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - this.lblMemory.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + lblMemory.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + lblMemory.BackColor = System.Drawing.Color.FromArgb(192, 255, 240); + lblMemory.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + lblMemory.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point); + lblMemory.Location = new System.Drawing.Point(207, 12); + lblMemory.Name = "lblMemory"; + lblMemory.RightToLeft = System.Windows.Forms.RightToLeft.No; + lblMemory.Size = new System.Drawing.Size(615, 71); + lblMemory.TabIndex = 16; + lblMemory.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + lblMemory.MouseMove += FrmCalc32Main_MouseMove; // // btnBack // - this.btnBack.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnBack.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.btnBack.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.btnBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnBack.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnBack.Location = new System.Drawing.Point(83, 130); - this.btnBack.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.btnBack.Name = "btnBack"; - this.btnBack.Size = new System.Drawing.Size(79, 38); - this.btnBack.TabIndex = 17; - this.btnBack.Tag = "2"; - this.btnBack.Text = "<=="; - this.btnBack.UseVisualStyleBackColor = true; - this.btnBack.Click += new System.EventHandler(this.btnBack_Click); - this.btnBack.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + btnBack.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left; + btnBack.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + btnBack.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + btnBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + btnBack.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + btnBack.Location = new System.Drawing.Point(138, 250); + btnBack.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + btnBack.Name = "btnBack"; + btnBack.Size = new System.Drawing.Size(132, 73); + btnBack.TabIndex = 17; + btnBack.Tag = "2"; + btnBack.Text = "<=="; + btnBack.UseVisualStyleBackColor = true; + btnBack.Click += btnBack_Click; + btnBack.MouseMove += FrmCalc32Main_MouseMove; // // btnClear // - this.btnClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnClear.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.btnClear.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.btnClear.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnClear.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnClear.Location = new System.Drawing.Point(239, 130); - this.btnClear.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.btnClear.Name = "btnClear"; - this.btnClear.Size = new System.Drawing.Size(79, 38); - this.btnClear.TabIndex = 18; - this.btnClear.Tag = "1"; - this.btnClear.Text = "C"; - this.btnClear.UseVisualStyleBackColor = true; - this.btnClear.Click += new System.EventHandler(this.btnOperator_Click); - this.btnClear.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + btnClear.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + btnClear.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + btnClear.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + btnClear.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + btnClear.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + btnClear.Location = new System.Drawing.Point(398, 250); + btnClear.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + btnClear.Name = "btnClear"; + btnClear.Size = new System.Drawing.Size(132, 73); + btnClear.TabIndex = 18; + btnClear.Tag = "1"; + btnClear.Text = "C"; + btnClear.UseVisualStyleBackColor = true; + btnClear.Click += btnOperator_Click; + btnClear.MouseMove += FrmCalc32Main_MouseMove; // // btnClearAll // - this.btnClearAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnClearAll.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.btnClearAll.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.btnClearAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnClearAll.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnClearAll.Location = new System.Drawing.Point(239, 172); - this.btnClearAll.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.btnClearAll.Name = "btnClearAll"; - this.btnClearAll.Size = new System.Drawing.Size(79, 38); - this.btnClearAll.TabIndex = 19; - this.btnClearAll.Tag = "3"; - this.btnClearAll.Text = "&CE"; - this.btnClearAll.UseVisualStyleBackColor = true; - this.btnClearAll.Click += new System.EventHandler(this.btnOperator_Click); - this.btnClearAll.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + btnClearAll.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + btnClearAll.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + btnClearAll.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + btnClearAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + btnClearAll.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + btnClearAll.Location = new System.Drawing.Point(398, 331); + btnClearAll.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + btnClearAll.Name = "btnClearAll"; + btnClearAll.Size = new System.Drawing.Size(132, 73); + btnClearAll.TabIndex = 19; + btnClearAll.Tag = "3"; + btnClearAll.Text = "&CE"; + btnClearAll.UseVisualStyleBackColor = true; + btnClearAll.Click += btnOperator_Click; + btnClearAll.MouseMove += FrmCalc32Main_MouseMove; // // btnHexB // - this.btnHexB.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnHexB.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.btnHexB.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.btnHexB.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnHexB.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnHexB.Location = new System.Drawing.Point(405, 172); - this.btnHexB.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.btnHexB.Name = "btnHexB"; - this.btnHexB.Size = new System.Drawing.Size(37, 38); - this.btnHexB.TabIndex = 20; - this.btnHexB.Tag = "11"; - this.btnHexB.Text = "B"; - this.btnHexB.UseVisualStyleBackColor = true; - this.btnHexB.Click += new System.EventHandler(this.btnNummber_Click); - this.btnHexB.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + btnHexB.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + btnHexB.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + btnHexB.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + btnHexB.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + btnHexB.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + btnHexB.Location = new System.Drawing.Point(675, 331); + btnHexB.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + btnHexB.Name = "btnHexB"; + btnHexB.Size = new System.Drawing.Size(62, 73); + btnHexB.TabIndex = 20; + btnHexB.Tag = "11"; + btnHexB.Text = "B"; + btnHexB.UseVisualStyleBackColor = true; + btnHexB.Click += btnNumber_Click; + btnHexB.MouseMove += FrmCalc32Main_MouseMove; // // btnHexC // - this.btnHexC.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnHexC.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.btnHexC.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.btnHexC.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnHexC.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnHexC.Location = new System.Drawing.Point(446, 172); - this.btnHexC.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.btnHexC.Name = "btnHexC"; - this.btnHexC.Size = new System.Drawing.Size(37, 38); - this.btnHexC.TabIndex = 21; - this.btnHexC.Tag = "12"; - this.btnHexC.Text = "C"; - this.btnHexC.UseVisualStyleBackColor = true; - this.btnHexC.Click += new System.EventHandler(this.btnNummber_Click); - this.btnHexC.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + btnHexC.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + btnHexC.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + btnHexC.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + btnHexC.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + btnHexC.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + btnHexC.Location = new System.Drawing.Point(743, 331); + btnHexC.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + btnHexC.Name = "btnHexC"; + btnHexC.Size = new System.Drawing.Size(62, 73); + btnHexC.TabIndex = 21; + btnHexC.Tag = "12"; + btnHexC.Text = "C"; + btnHexC.UseVisualStyleBackColor = true; + btnHexC.Click += btnNumber_Click; + btnHexC.MouseMove += FrmCalc32Main_MouseMove; // // btnHexF // - this.btnHexF.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnHexF.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.btnHexF.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.btnHexF.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnHexF.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnHexF.Location = new System.Drawing.Point(446, 130); - this.btnHexF.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.btnHexF.Name = "btnHexF"; - this.btnHexF.Size = new System.Drawing.Size(37, 38); - this.btnHexF.TabIndex = 24; - this.btnHexF.Tag = "15"; - this.btnHexF.Text = "F"; - this.btnHexF.UseVisualStyleBackColor = true; - this.btnHexF.Click += new System.EventHandler(this.btnNummber_Click); - this.btnHexF.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + btnHexF.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + btnHexF.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + btnHexF.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + btnHexF.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + btnHexF.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + btnHexF.Location = new System.Drawing.Point(743, 250); + btnHexF.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + btnHexF.Name = "btnHexF"; + btnHexF.Size = new System.Drawing.Size(62, 73); + btnHexF.TabIndex = 24; + btnHexF.Tag = "15"; + btnHexF.Text = "F"; + btnHexF.UseVisualStyleBackColor = true; + btnHexF.Click += btnNumber_Click; + btnHexF.MouseMove += FrmCalc32Main_MouseMove; // // btnHexE // - this.btnHexE.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnHexE.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.btnHexE.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.btnHexE.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnHexE.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnHexE.Location = new System.Drawing.Point(405, 130); - this.btnHexE.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.btnHexE.Name = "btnHexE"; - this.btnHexE.Size = new System.Drawing.Size(37, 38); - this.btnHexE.TabIndex = 23; - this.btnHexE.Tag = "14"; - this.btnHexE.Text = "E"; - this.btnHexE.UseVisualStyleBackColor = true; - this.btnHexE.Click += new System.EventHandler(this.btnNummber_Click); - this.btnHexE.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + btnHexE.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + btnHexE.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + btnHexE.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + btnHexE.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + btnHexE.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + btnHexE.Location = new System.Drawing.Point(675, 250); + btnHexE.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + btnHexE.Name = "btnHexE"; + btnHexE.Size = new System.Drawing.Size(62, 73); + btnHexE.TabIndex = 23; + btnHexE.Tag = "14"; + btnHexE.Text = "E"; + btnHexE.UseVisualStyleBackColor = true; + btnHexE.Click += btnNumber_Click; + btnHexE.MouseMove += FrmCalc32Main_MouseMove; // // btnHexD // - this.btnHexD.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnHexD.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.btnHexD.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.btnHexD.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnHexD.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnHexD.Location = new System.Drawing.Point(363, 130); - this.btnHexD.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.btnHexD.Name = "btnHexD"; - this.btnHexD.Size = new System.Drawing.Size(37, 38); - this.btnHexD.TabIndex = 22; - this.btnHexD.Tag = "13"; - this.btnHexD.Text = "D"; - this.btnHexD.UseVisualStyleBackColor = true; - this.btnHexD.Click += new System.EventHandler(this.btnNummber_Click); - this.btnHexD.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + btnHexD.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + btnHexD.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + btnHexD.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + btnHexD.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + btnHexD.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + btnHexD.Location = new System.Drawing.Point(605, 250); + btnHexD.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + btnHexD.Name = "btnHexD"; + btnHexD.Size = new System.Drawing.Size(62, 73); + btnHexD.TabIndex = 22; + btnHexD.Tag = "13"; + btnHexD.Text = "D"; + btnHexD.UseVisualStyleBackColor = true; + btnHexD.Click += btnNumber_Click; + btnHexD.MouseMove += FrmCalc32Main_MouseMove; // // btnMult // - this.btnMult.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnMult.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.btnMult.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.btnMult.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnMult.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnMult.Location = new System.Drawing.Point(322, 130); - this.btnMult.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.btnMult.Name = "btnMult"; - this.btnMult.Size = new System.Drawing.Size(37, 38); - this.btnMult.TabIndex = 29; - this.btnMult.Tag = "-4"; - this.btnMult.Text = "*"; - this.btnMult.UseVisualStyleBackColor = true; - this.btnMult.Click += new System.EventHandler(this.btnOperator_Click); - this.btnMult.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + btnMult.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + btnMult.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + btnMult.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + btnMult.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + btnMult.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + btnMult.Location = new System.Drawing.Point(537, 250); + btnMult.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + btnMult.Name = "btnMult"; + btnMult.Size = new System.Drawing.Size(62, 73); + btnMult.TabIndex = 29; + btnMult.Tag = "-4"; + btnMult.Text = "*"; + btnMult.UseVisualStyleBackColor = true; + btnMult.Click += btnOperator_Click; + btnMult.MouseMove += FrmCalc32Main_MouseMove; // // btnDivide // - this.btnDivide.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnDivide.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.btnDivide.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.btnDivide.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnDivide.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnDivide.Location = new System.Drawing.Point(322, 172); - this.btnDivide.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.btnDivide.Name = "btnDivide"; - this.btnDivide.Size = new System.Drawing.Size(37, 38); - this.btnDivide.TabIndex = 28; - this.btnDivide.Tag = "-5"; - this.btnDivide.Text = "/"; - this.btnDivide.UseVisualStyleBackColor = true; - this.btnDivide.Click += new System.EventHandler(this.btnOperator_Click); - this.btnDivide.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + btnDivide.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + btnDivide.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + btnDivide.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + btnDivide.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + btnDivide.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + btnDivide.Location = new System.Drawing.Point(537, 331); + btnDivide.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + btnDivide.Name = "btnDivide"; + btnDivide.Size = new System.Drawing.Size(62, 73); + btnDivide.TabIndex = 28; + btnDivide.Tag = "-5"; + btnDivide.Text = "/"; + btnDivide.UseVisualStyleBackColor = true; + btnDivide.Click += btnOperator_Click; + btnDivide.MouseMove += FrmCalc32Main_MouseMove; // // btnPlus // - this.btnPlus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnPlus.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.btnPlus.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.btnPlus.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnPlus.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnPlus.Location = new System.Drawing.Point(322, 214); - this.btnPlus.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.btnPlus.Name = "btnPlus"; - this.btnPlus.Size = new System.Drawing.Size(37, 38); - this.btnPlus.TabIndex = 27; - this.btnPlus.Tag = "-2"; - this.btnPlus.Text = "+"; - this.btnPlus.UseVisualStyleBackColor = true; - this.btnPlus.Click += new System.EventHandler(this.btnOperator_Click); - this.btnPlus.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + btnPlus.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + btnPlus.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + btnPlus.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + btnPlus.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + btnPlus.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + btnPlus.Location = new System.Drawing.Point(537, 412); + btnPlus.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + btnPlus.Name = "btnPlus"; + btnPlus.Size = new System.Drawing.Size(62, 73); + btnPlus.TabIndex = 27; + btnPlus.Tag = "-2"; + btnPlus.Text = "+"; + btnPlus.UseVisualStyleBackColor = true; + btnPlus.Click += btnOperator_Click; + btnPlus.MouseMove += FrmCalc32Main_MouseMove; // // btnMinus // - this.btnMinus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnMinus.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.btnMinus.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.btnMinus.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnMinus.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnMinus.Location = new System.Drawing.Point(322, 257); - this.btnMinus.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.btnMinus.Name = "btnMinus"; - this.btnMinus.Size = new System.Drawing.Size(37, 38); - this.btnMinus.TabIndex = 26; - this.btnMinus.Tag = "-3"; - this.btnMinus.Text = "-"; - this.btnMinus.UseVisualStyleBackColor = true; - this.btnMinus.Click += new System.EventHandler(this.btnOperator_Click); - this.btnMinus.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + btnMinus.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + btnMinus.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + btnMinus.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + btnMinus.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + btnMinus.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + btnMinus.Location = new System.Drawing.Point(537, 494); + btnMinus.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + btnMinus.Name = "btnMinus"; + btnMinus.Size = new System.Drawing.Size(62, 73); + btnMinus.TabIndex = 26; + btnMinus.Tag = "-3"; + btnMinus.Text = "-"; + btnMinus.UseVisualStyleBackColor = true; + btnMinus.Click += btnOperator_Click; + btnMinus.MouseMove += FrmCalc32Main_MouseMove; // // btnResult // - this.btnResult.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnResult.AutoEllipsis = true; - this.btnResult.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.btnResult.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.btnResult.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnResult.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnResult.Location = new System.Drawing.Point(322, 299); - this.btnResult.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.btnResult.Name = "btnResult"; - this.btnResult.Size = new System.Drawing.Size(37, 81); - this.btnResult.TabIndex = 25; - this.btnResult.Tag = "-1"; - this.btnResult.Text = "="; - this.btnResult.UseVisualStyleBackColor = true; - this.btnResult.Click += new System.EventHandler(this.btnOperator_Click); - this.btnResult.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmCalc32Main_KeyDown); - this.btnResult.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + btnResult.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + btnResult.AutoEllipsis = true; + btnResult.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + btnResult.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + btnResult.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + btnResult.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + btnResult.Location = new System.Drawing.Point(537, 575); + btnResult.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + btnResult.Name = "btnResult"; + btnResult.Size = new System.Drawing.Size(62, 156); + btnResult.TabIndex = 25; + btnResult.Tag = "-1"; + btnResult.Text = "="; + btnResult.UseVisualStyleBackColor = true; + btnResult.Click += btnOperator_Click; + btnResult.KeyDown += FrmCalc32Main_KeyDown; + btnResult.MouseMove += FrmCalc32Main_MouseMove; // // btnOpAnd // - this.btnOpAnd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnOpAnd.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.btnOpAnd.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.btnOpAnd.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnOpAnd.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnOpAnd.Location = new System.Drawing.Point(487, 130); - this.btnOpAnd.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.btnOpAnd.Name = "btnOpAnd"; - this.btnOpAnd.Size = new System.Drawing.Size(80, 59); - this.btnOpAnd.TabIndex = 33; - this.btnOpAnd.Tag = "-6"; - this.btnOpAnd.Text = "AND"; - this.btnOpAnd.UseVisualStyleBackColor = true; - this.btnOpAnd.Click += new System.EventHandler(this.btnOperator_Click); - this.btnOpAnd.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + btnOpAnd.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + btnOpAnd.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + btnOpAnd.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + btnOpAnd.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + btnOpAnd.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + btnOpAnd.Location = new System.Drawing.Point(812, 250); + btnOpAnd.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + btnOpAnd.Name = "btnOpAnd"; + btnOpAnd.Size = new System.Drawing.Size(133, 113); + btnOpAnd.TabIndex = 33; + btnOpAnd.Tag = "-6"; + btnOpAnd.Text = "AND"; + btnOpAnd.UseVisualStyleBackColor = true; + btnOpAnd.Click += btnOperator_Click; + btnOpAnd.MouseMove += FrmCalc32Main_MouseMove; // // btnOpOR // - this.btnOpOR.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnOpOR.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.btnOpOR.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.btnOpOR.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnOpOR.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnOpOR.Location = new System.Drawing.Point(487, 194); - this.btnOpOR.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.btnOpOR.Name = "btnOpOR"; - this.btnOpOR.Size = new System.Drawing.Size(80, 59); - this.btnOpOR.TabIndex = 32; - this.btnOpOR.Tag = "-7"; - this.btnOpOR.Text = "OR"; - this.btnOpOR.UseVisualStyleBackColor = true; - this.btnOpOR.Click += new System.EventHandler(this.btnOperator_Click); - this.btnOpOR.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + btnOpOR.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + btnOpOR.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + btnOpOR.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + btnOpOR.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + btnOpOR.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + btnOpOR.Location = new System.Drawing.Point(812, 373); + btnOpOR.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + btnOpOR.Name = "btnOpOR"; + btnOpOR.Size = new System.Drawing.Size(133, 113); + btnOpOR.TabIndex = 32; + btnOpOR.Tag = "-7"; + btnOpOR.Text = "OR"; + btnOpOR.UseVisualStyleBackColor = true; + btnOpOR.Click += btnOperator_Click; + btnOpOR.MouseMove += FrmCalc32Main_MouseMove; // // btnOpXOR // - this.btnOpXOR.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnOpXOR.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.btnOpXOR.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.btnOpXOR.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnOpXOR.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnOpXOR.Location = new System.Drawing.Point(487, 257); - this.btnOpXOR.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.btnOpXOR.Name = "btnOpXOR"; - this.btnOpXOR.Size = new System.Drawing.Size(80, 59); - this.btnOpXOR.TabIndex = 31; - this.btnOpXOR.Tag = "-8"; - this.btnOpXOR.Text = "XOR"; - this.btnOpXOR.UseVisualStyleBackColor = true; - this.btnOpXOR.Click += new System.EventHandler(this.btnOperator_Click); - this.btnOpXOR.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + btnOpXOR.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + btnOpXOR.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + btnOpXOR.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + btnOpXOR.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + btnOpXOR.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + btnOpXOR.Location = new System.Drawing.Point(812, 494); + btnOpXOR.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + btnOpXOR.Name = "btnOpXOR"; + btnOpXOR.Size = new System.Drawing.Size(133, 113); + btnOpXOR.TabIndex = 31; + btnOpXOR.Tag = "-8"; + btnOpXOR.Text = "XOR"; + btnOpXOR.UseVisualStyleBackColor = true; + btnOpXOR.Click += btnOperator_Click; + btnOpXOR.MouseMove += FrmCalc32Main_MouseMove; // // btnOpNOT // - this.btnOpNOT.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnOpNOT.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.btnOpNOT.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.btnOpNOT.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnOpNOT.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnOpNOT.Location = new System.Drawing.Point(487, 321); - this.btnOpNOT.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.btnOpNOT.Name = "btnOpNOT"; - this.btnOpNOT.Size = new System.Drawing.Size(80, 59); - this.btnOpNOT.TabIndex = 30; - this.btnOpNOT.Tag = "-9"; - this.btnOpNOT.Text = "NOT"; - this.btnOpNOT.UseVisualStyleBackColor = true; - this.btnOpNOT.Click += new System.EventHandler(this.btnOperator_Click); - this.btnOpNOT.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + btnOpNOT.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + btnOpNOT.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + btnOpNOT.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + btnOpNOT.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + btnOpNOT.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + btnOpNOT.Location = new System.Drawing.Point(812, 617); + btnOpNOT.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + btnOpNOT.Name = "btnOpNOT"; + btnOpNOT.Size = new System.Drawing.Size(133, 113); + btnOpNOT.TabIndex = 30; + btnOpNOT.Tag = "-9"; + btnOpNOT.Text = "NOT"; + btnOpNOT.UseVisualStyleBackColor = true; + btnOpNOT.Click += btnOperator_Click; + btnOpNOT.MouseMove += FrmCalc32Main_MouseMove; // // pnlLeft // - this.pnlLeft.Controls.Add(this.panel2); - this.pnlLeft.Dock = System.Windows.Forms.DockStyle.Left; - this.pnlLeft.Location = new System.Drawing.Point(0, 0); - this.pnlLeft.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.pnlLeft.Name = "pnlLeft"; - this.pnlLeft.Size = new System.Drawing.Size(79, 451); - this.pnlLeft.TabIndex = 34; - this.pnlLeft.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + pnlLeft.Controls.Add(panel2); + pnlLeft.Dock = System.Windows.Forms.DockStyle.Left; + pnlLeft.Location = new System.Drawing.Point(0, 0); + pnlLeft.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + pnlLeft.Name = "pnlLeft"; + pnlLeft.Size = new System.Drawing.Size(132, 867); + pnlLeft.TabIndex = 34; + pnlLeft.MouseMove += FrmCalc32Main_MouseMove; // // panel2 // - this.panel2.Location = new System.Drawing.Point(79, 172); - this.panel2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(156, 147); - this.panel2.TabIndex = 41; + panel2.Location = new System.Drawing.Point(132, 331); + panel2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + panel2.Name = "panel2"; + panel2.Size = new System.Drawing.Size(260, 283); + panel2.TabIndex = 41; // // pnlRight // - this.pnlRight.Dock = System.Windows.Forms.DockStyle.Right; - this.pnlRight.Location = new System.Drawing.Point(572, 0); - this.pnlRight.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.pnlRight.Name = "pnlRight"; - this.pnlRight.Size = new System.Drawing.Size(79, 451); - this.pnlRight.TabIndex = 35; - this.pnlRight.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + pnlRight.Dock = System.Windows.Forms.DockStyle.Right; + pnlRight.Location = new System.Drawing.Point(953, 0); + pnlRight.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + pnlRight.Name = "pnlRight"; + pnlRight.Size = new System.Drawing.Size(132, 867); + pnlRight.TabIndex = 35; + pnlRight.MouseMove += FrmCalc32Main_MouseMove; // // button9 // - this.button9.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.button9.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.button9.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button9.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.button9.Location = new System.Drawing.Point(83, 5); - this.button9.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.button9.Name = "button9"; - this.button9.Size = new System.Drawing.Size(37, 38); - this.button9.TabIndex = 36; - this.button9.Tag = "-4"; - this.button9.Text = "*"; - this.button9.UseVisualStyleBackColor = true; - this.button9.Click += new System.EventHandler(this.btnOperator_Click); - this.button9.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + button9.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + button9.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + button9.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + button9.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + button9.Location = new System.Drawing.Point(138, 10); + button9.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + button9.Name = "button9"; + button9.Size = new System.Drawing.Size(62, 73); + button9.TabIndex = 36; + button9.Tag = "-4"; + button9.Text = "*"; + button9.UseVisualStyleBackColor = true; + button9.Click += btnOperator_Click; + button9.MouseMove += FrmCalc32Main_MouseMove; // // button12 // - this.button12.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.button12.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.button12.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button12.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.button12.Location = new System.Drawing.Point(83, 47); - this.button12.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.button12.Name = "button12"; - this.button12.Size = new System.Drawing.Size(37, 38); - this.button12.TabIndex = 37; - this.button12.Tag = "-4"; - this.button12.Text = "*"; - this.button12.UseVisualStyleBackColor = true; - this.button12.Click += new System.EventHandler(this.btnOperator_Click); - this.button12.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + button12.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + button12.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + button12.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + button12.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + button12.Location = new System.Drawing.Point(138, 90); + button12.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + button12.Name = "button12"; + button12.Size = new System.Drawing.Size(62, 73); + button12.TabIndex = 37; + button12.Tag = "-4"; + button12.Text = "*"; + button12.UseVisualStyleBackColor = true; + button12.Click += btnOperator_Click; + button12.MouseMove += FrmCalc32Main_MouseMove; // // pnlBottom // - this.pnlBottom.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnlBottom.Location = new System.Drawing.Point(79, 386); - this.pnlBottom.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.pnlBottom.Name = "pnlBottom"; - this.pnlBottom.Size = new System.Drawing.Size(493, 65); - this.pnlBottom.TabIndex = 38; - this.pnlBottom.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + pnlBottom.Dock = System.Windows.Forms.DockStyle.Bottom; + pnlBottom.Location = new System.Drawing.Point(132, 742); + pnlBottom.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + pnlBottom.Name = "pnlBottom"; + pnlBottom.Size = new System.Drawing.Size(821, 125); + pnlBottom.TabIndex = 38; + pnlBottom.MouseMove += FrmCalc32Main_MouseMove; // // btnClose // - this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnClose.BackgroundImage = Resources.Exit; - this.btnClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.btnClose.DialogResult = System.Windows.Forms.DialogResult.OK; - this.btnClose.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; - this.btnClose.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; - this.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnClose.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnClose.Location = new System.Drawing.Point(83, 323); - this.btnClose.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.btnClose.Name = "btnClose"; - this.btnClose.Size = new System.Drawing.Size(138, 59); - this.btnClose.TabIndex = 39; - this.btnClose.Tag = "0"; - this.btnClose.Text = "Schliessen"; - this.btnClose.UseVisualStyleBackColor = true; - this.btnClose.Click += new System.EventHandler(this.btnClose_Click); - this.btnClose.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + btnClose.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left; + btnClose.BackgroundImage = Resources.Exit; + btnClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + btnClose.DialogResult = System.Windows.Forms.DialogResult.OK; + btnClose.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control; + btnClose.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Lavender; + btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + btnClose.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + btnClose.Location = new System.Drawing.Point(138, 621); + btnClose.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + btnClose.Name = "btnClose"; + btnClose.Size = new System.Drawing.Size(230, 113); + btnClose.TabIndex = 39; + btnClose.Tag = "0"; + btnClose.Text = "Schliessen"; + btnClose.UseVisualStyleBackColor = true; + btnClose.Click += btnClose_Click; + btnClose.MouseMove += FrmCalc32Main_MouseMove; // // panel1 // - this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.panel1.Location = new System.Drawing.Point(225, 215); - this.panel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(93, 177); - this.panel1.TabIndex = 40; - this.panel1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + panel1.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + panel1.Location = new System.Drawing.Point(375, 413); + panel1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + panel1.Name = "panel1"; + panel1.Size = new System.Drawing.Size(155, 340); + panel1.TabIndex = 40; + panel1.MouseMove += FrmCalc32Main_MouseMove; // // panel3 // - this.panel3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.panel3.Location = new System.Drawing.Point(79, 172); - this.panel3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(157, 146); - this.panel3.TabIndex = 41; - this.panel3.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + panel3.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + panel3.Location = new System.Drawing.Point(132, 331); + panel3.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + panel3.Name = "panel3"; + panel3.Size = new System.Drawing.Size(262, 281); + panel3.TabIndex = 41; + panel3.MouseMove += FrmCalc32Main_MouseMove; // // panel4 // - this.panel4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.panel4.Location = new System.Drawing.Point(78, 89); - this.panel4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.panel4.Name = "panel4"; - this.panel4.Size = new System.Drawing.Size(495, 36); - this.panel4.TabIndex = 45; - this.panel4.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + panel4.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + panel4.Location = new System.Drawing.Point(130, 171); + panel4.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + panel4.Name = "panel4"; + panel4.Size = new System.Drawing.Size(825, 69); + panel4.TabIndex = 45; + panel4.MouseMove += FrmCalc32Main_MouseMove; // // panel5 // - this.panel5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.panel5.Location = new System.Drawing.Point(165, 125); - this.panel5.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.panel5.Name = "panel5"; - this.panel5.Size = new System.Drawing.Size(70, 51); - this.panel5.TabIndex = 46; - this.panel5.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); + panel5.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + panel5.Location = new System.Drawing.Point(275, 240); + panel5.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + panel5.Name = "panel5"; + panel5.Size = new System.Drawing.Size(117, 98); + panel5.TabIndex = 46; + panel5.MouseMove += FrmCalc32Main_MouseMove; // // FrmCalc32Main // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.SystemColors.ControlLight; - this.ClientSize = new System.Drawing.Size(651, 451); - this.Controls.Add(this.panel5); - this.Controls.Add(this.panel4); - this.Controls.Add(this.panel3); - this.Controls.Add(this.panel1); - this.Controls.Add(this.btnClose); - this.Controls.Add(this.pnlBottom); - this.Controls.Add(this.button12); - this.Controls.Add(this.button9); - this.Controls.Add(this.pnlRight); - this.Controls.Add(this.pnlLeft); - this.Controls.Add(this.btnOpAnd); - this.Controls.Add(this.btnOpOR); - this.Controls.Add(this.btnOpXOR); - this.Controls.Add(this.btnOpNOT); - this.Controls.Add(this.btnMult); - this.Controls.Add(this.btnDivide); - this.Controls.Add(this.btnPlus); - this.Controls.Add(this.btnMinus); - this.Controls.Add(this.btnResult); - this.Controls.Add(this.btnHexF); - this.Controls.Add(this.btnHexE); - this.Controls.Add(this.btnHexD); - this.Controls.Add(this.btnHexC); - this.Controls.Add(this.btnHexB); - this.Controls.Add(this.btnClearAll); - this.Controls.Add(this.btnClear); - this.Controls.Add(this.btnBack); - this.Controls.Add(this.lblMemory); - this.Controls.Add(this.lblOperation); - this.Controls.Add(this.button11); - this.Controls.Add(this.button10); - this.Controls.Add(this.btnHexA); - this.Controls.Add(this.button8); - this.Controls.Add(this.button7); - this.Controls.Add(this.button6); - this.Controls.Add(this.button5); - this.Controls.Add(this.button4); - this.Controls.Add(this.button3); - this.Controls.Add(this.button2); - this.Controls.Add(this.button1); - this.Controls.Add(this.lblResult); - this.Controls.Add(this.btnOne); - this.Controls.Add(this.pictureBox1); - this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.Name = "FrmCalc32Main"; -#if NET5_0_OR_GREATER - this.Text = "FrmCalc32Main .NET 6.0"; -#else - this.Text = "FrmCalc32Main FW 4.8"; -#endif - this.Click += new System.EventHandler(this.btnOperator_Click); - this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmCalc32Main_KeyDown); - this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FrmCalc32Main_MouseMove); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); - this.pnlLeft.ResumeLayout(false); - this.ResumeLayout(false); - + AutoScaleDimensions = new System.Drawing.SizeF(10F, 25F); + AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + BackColor = System.Drawing.SystemColors.ControlLight; + ClientSize = new System.Drawing.Size(1085, 867); + Controls.Add(panel5); + Controls.Add(panel4); + Controls.Add(panel3); + Controls.Add(panel1); + Controls.Add(btnClose); + Controls.Add(pnlBottom); + Controls.Add(button12); + Controls.Add(button9); + Controls.Add(pnlRight); + Controls.Add(pnlLeft); + Controls.Add(btnOpAnd); + Controls.Add(btnOpOR); + Controls.Add(btnOpXOR); + Controls.Add(btnOpNOT); + Controls.Add(btnMult); + Controls.Add(btnDivide); + Controls.Add(btnPlus); + Controls.Add(btnMinus); + Controls.Add(btnResult); + Controls.Add(btnHexF); + Controls.Add(btnHexE); + Controls.Add(btnHexD); + Controls.Add(btnHexC); + Controls.Add(btnHexB); + Controls.Add(btnClearAll); + Controls.Add(btnClear); + Controls.Add(btnBack); + Controls.Add(lblMemory); + Controls.Add(lblOperation); + Controls.Add(button11); + Controls.Add(button10); + Controls.Add(btnHexA); + Controls.Add(button8); + Controls.Add(button7); + Controls.Add(button6); + Controls.Add(button5); + Controls.Add(button4); + Controls.Add(button3); + Controls.Add(button2); + Controls.Add(button1); + Controls.Add(lblResult); + Controls.Add(btnOne); + Controls.Add(pictureBox1); + Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + Name = "FrmCalc32Main"; + Text = "FrmCalc32Main .NET 6.0"; + Click += btnOperator_Click; + KeyDown += FrmCalc32Main_KeyDown; + MouseMove += FrmCalc32Main_MouseMove; + ((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit(); + pnlLeft.ResumeLayout(false); + ResumeLayout(false); } - #endregion - /// - /// The BTN one - /// - private System.Windows.Forms.Button btnOne; + #endregion /// /// The label result /// - private System.Windows.Forms.Label lblResult; + public System.Windows.Forms.Label lblResult; /// /// The picture box1 /// private System.Windows.Forms.PictureBox pictureBox1; /// - /// The calculator class1 - /// - private NonVisual.CalculatorClass calculatorClass1; - /// /// The button1 /// private System.Windows.Forms.Button button1; @@ -979,10 +957,6 @@ private void InitializeComponent() /// private System.Windows.Forms.Label lblMemory; /// - /// The BTN back - /// - private System.Windows.Forms.Button btnBack; - /// /// The BTN clear /// private System.Windows.Forms.Button btnClear; @@ -1027,10 +1001,6 @@ private void InitializeComponent() /// private System.Windows.Forms.Button btnMinus; /// - /// The BTN result - /// - private System.Windows.Forms.Button btnResult; - /// /// The BTN op and /// private System.Windows.Forms.Button btnOpAnd; @@ -1090,5 +1060,9 @@ private void InitializeComponent() /// The panel5 /// private System.Windows.Forms.Panel panel5; + public System.Windows.Forms.Button btnOne; + public CalculatorClass calculatorClass1; + public System.Windows.Forms.Button btnBack; + public System.Windows.Forms.Button btnResult; } } \ No newline at end of file diff --git a/CSharpBible/Calc/Calc32/Visual/FrmCalc32Main.cs b/CSharpBible/Calc/Calc32/Visual/FrmCalc32Main.cs index af557dd36..d0578733a 100644 --- a/CSharpBible/Calc/Calc32/Visual/FrmCalc32Main.cs +++ b/CSharpBible/Calc/Calc32/Visual/FrmCalc32Main.cs @@ -12,13 +12,7 @@ // // *********************************************************************** using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; using Calc32.NonVisual; using MVVM.ViewModel; @@ -36,11 +30,17 @@ namespace Calc32.Visual /// public partial class FrmCalc32Main : Form { + #region Properties /// /// Gets the data context. /// /// The data context. - public NotificationObject DataContext { get; private set; } + public +#if NET7_0_OR_GREATER + new +#endif + NotificationObject DataContext { get; private set; } = null!; + #endregion /// /// Initializes a new instance of the class. @@ -48,7 +48,7 @@ public partial class FrmCalc32Main : Form public FrmCalc32Main() { InitializeComponent(); -// DataContext = new BaseViewModel + // DataContext = new BaseViewModel } /// @@ -56,25 +56,22 @@ public FrmCalc32Main() /// /// The sender. /// The instance containing the event data. - private void calculatorClassChange(object sender, EventArgs e) + private void calculatorClassChange(object sender, (string, object, object) e) { - using (CalculatorClass cc = (CalculatorClass)sender) - { - lblResult.Text = cc.Akkumulator.ToString(); - lblMemory.Text = cc.Memory.ToString(); - lblOperation.Text = cc.OperationText; - - } + using CalculatorClass cc = (CalculatorClass)sender; + lblResult.Text = cc.Accumulator.ToString(); + lblMemory.Text = cc.Memory.ToString(); + lblOperation.Text = cc.OperationText; } /// - /// Handles the Click event of the btnNummber control. + /// Handles the Click event of the btnNumber control. /// /// The source of the event. /// The instance containing the event data. - private void btnNummber_Click(object sender, EventArgs e) + private void btnNumber_Click(object sender, EventArgs e) { - if (int.TryParse(((Control)sender).Tag.ToString(), out int aNumber)) + if (int.TryParse(((Control)sender)?.Tag?.ToString(), out int aNumber)) { calculatorClass1.NumberButton(aNumber); } @@ -85,15 +82,15 @@ private void btnNummber_Click(object sender, EventArgs e) /// /// The source of the event. /// The instance containing the event data. - private void FrmCalc32Main_MouseMove(object sender, MouseEventArgs e) + public void FrmCalc32Main_MouseMove(object sender, MouseEventArgs e) { Point lMousePnt = e.Location; - if (sender!= this) + if (sender != this) { lMousePnt.X += ((Control)sender).Location.X; lMousePnt.Y += ((Control)sender).Location.Y; } - lMousePnt.Offset(-pictureBox1.Size.Width/2, -pictureBox1.Size.Height/2); + lMousePnt.Offset(-pictureBox1.Size.Width / 2, -pictureBox1.Size.Height / 2); pictureBox1.Location = lMousePnt; } @@ -102,7 +99,7 @@ private void FrmCalc32Main_MouseMove(object sender, MouseEventArgs e) /// /// The source of the event. /// The instance containing the event data. - private void FrmCalc32Main_KeyDown(object sender, KeyEventArgs e) + public void FrmCalc32Main_KeyDown(object sender, KeyEventArgs e) { Char ActKey = (char)0; if ((char)e.KeyValue >= "0"[0] && (char)e.KeyValue <= "9"[0]) @@ -153,7 +150,7 @@ private void FrmCalc32Main_KeyDown(object sender, KeyEventArgs e) /// The instance containing the event data. private void btnOperator_Click(object sender, EventArgs e) { - if (int.TryParse(((Control)sender).Tag.ToString(), out int aNumber)) + if (int.TryParse(((Control)sender)?.Tag?.ToString(), out int aNumber)) { calculatorClass1.Operation(-aNumber); } diff --git a/CSharpBible/Calc/Calc32/Visual/FrmCalc32Main.resx b/CSharpBible/Calc/Calc32/Visual/FrmCalc32Main.resx index 110697f72..18d7e85ec 100644 --- a/CSharpBible/Calc/Calc32/Visual/FrmCalc32Main.resx +++ b/CSharpBible/Calc/Calc32/Visual/FrmCalc32Main.resx @@ -1,64 +1,4 @@ - - - + diff --git a/CSharpBible/Calc/Calc32Cons/Calc32Cons.csproj b/CSharpBible/Calc/Calc32Cons/Calc32Cons.csproj index 7253ae805..85e43b1bb 100644 --- a/CSharpBible/Calc/Calc32Cons/Calc32Cons.csproj +++ b/CSharpBible/Calc/Calc32Cons/Calc32Cons.csproj @@ -1,70 +1,57 @@ - - - - Debug - AnyCPU - {9A31567A-4BDD-442A-912A-C82D020D6269} - Exe - Calc32Cons - Calc32Cons - ..\..\..\bin\$(MSBuildProjectName)\ - ..\..\..\obj\$(MSBuildProjectName)\ - ..\..\..\obj\$(MSBuildProjectName)\ - v4.8 - 512 - true - true - - - - - AnyCPU - true - full - false - ..\..\..\bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - ..\..\..\bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - NonVisual\CalculatorClass.cs - Component - - - - - - - - - - - {26ccce4d-a445-46af-ba58-6fed8ef8412a} - ConsoleLib - - - + + + + Exe + net462-windows;net472-windows;net481-windows;net48-windows + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + \ No newline at end of file diff --git a/CSharpBible/Calc/Calc32Cons/Calc32Cons_net.csproj b/CSharpBible/Calc/Calc32Cons/Calc32Cons_net.csproj index fa3a979c7..88522a5d1 100644 --- a/CSharpBible/Calc/Calc32Cons/Calc32Cons_net.csproj +++ b/CSharpBible/Calc/Calc32Cons/Calc32Cons_net.csproj @@ -1,70 +1,57 @@ - - - - Debug - AnyCPU - {9A31567A-4BDD-442A-912A-C82D020D6269} - Exe - Calc32Cons - Calc32Cons - ..\..\bin\$(MSBuildProjectName)\ - ..\..\obj\$(MSBuildProjectName)\ - ..\..\obj\$(MSBuildProjectName)\ - v4.8 - 512 - true - true - - - - - AnyCPU - true - full - false - ..\..\bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - ..\..\bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - NonVisual\CalculatorClass.cs - Component - - - - - - - - - - - {26ccce4d-a445-46af-ba58-6fed8ef8412a} - ConsoleLib - - - + + + + Exe + net6.0-windows;net7.0-windows + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + \ No newline at end of file diff --git a/CSharpBible/Calc/Calc32Cons/Program.cs b/CSharpBible/Calc/Calc32Cons/Program.cs index 58bb7a7e8..25b983dc4 100644 --- a/CSharpBible/Calc/Calc32Cons/Program.cs +++ b/CSharpBible/Calc/Calc32Cons/Program.cs @@ -32,11 +32,11 @@ internal class Program /// /// The mouse /// - private static Pixel Mouse = new Pixel(); + private static readonly Pixel Mouse = new(); /// /// The application /// - private static ConsoleLib.CommonControls.Application App; + private static readonly ConsoleLib.CommonControls.Application App; /// /// Initializes static members of the class. @@ -73,7 +73,7 @@ static Program() { /// Defines the entry point of the application. /// /// The arguments. - static void Main(string[] args) + static void Main(string[] _) { App.Run(); @@ -87,7 +87,7 @@ static void Main(string[] args) /// /// The sender. /// The e. - private static void App_CanvasResize(object sender, Point e) + private static void App_CanvasResize(object? sender, Point e) { var cl = ConsoleFramework.Canvas.ClipRect; cl.Inflate(-3, -3); @@ -99,9 +99,9 @@ private static void App_CanvasResize(object sender, Point e) /// /// The source of the event. /// The instance containing the event data. - private static void App_MouseMove(object sender, MouseEventArgs e) + private static void App_MouseMove(object? sender, MouseEventArgs e) { - Mouse.Set(Point.Subtract(e.Location, (Size)Mouse.parent.position)); + Mouse.Set(Point.Subtract(e.Location, (Size?)Mouse.parent?.position??Size.Empty)); } } diff --git a/CSharpBible/Calc/Calc32Cons/Visual/ConsoleCalcView.cs b/CSharpBible/Calc/Calc32Cons/Visual/ConsoleCalcView.cs index 559bee9fc..6ce6f38de 100644 --- a/CSharpBible/Calc/Calc32Cons/Visual/ConsoleCalcView.cs +++ b/CSharpBible/Calc/Calc32Cons/Visual/ConsoleCalcView.cs @@ -32,17 +32,17 @@ public class ConsoleCalcView : ConsoleLib.CommonControls.Panel /// /// The calculator /// - private static CalculatorClass Calculator = new CalculatorClass(); + private readonly CalculatorClass Calculator = new(); /// - /// The label akkumulator + /// The label accumulator /// - private static ConsoleLib.CommonControls.Label lblAkkumulator; + private readonly ConsoleLib.CommonControls.Label lblAccumulator; /// /// Initializes a new instance of the class. /// /// The application. - public ConsoleCalcView(ConsoleLib.Control App = null) + public ConsoleCalcView(ConsoleLib.Control? App = null) { parent = App; Boarder = ConsoleFramework.doubleBoarder; @@ -50,7 +50,7 @@ public ConsoleCalcView(ConsoleLib.Control App = null) BackColor = ConsoleColor.DarkBlue; BoarderColor = ConsoleColor.Green; dimension = new Rectangle(3, 5, 50, 20); - shaddow = true; + shadow = true; ConsoleLib.CommonControls.Button[] btnNumbers = new ConsoleLib.CommonControls.Button[10]; @@ -62,10 +62,10 @@ public ConsoleCalcView(ConsoleLib.Control App = null) parent = this, ForeColor = ConsoleColor.White, BackColor = ConsoleColor.DarkGray, - shaddow = true, + shadow = true, position = new Point(p.X * 8 + 2, 14 - p.Y * 2), Tag = i, - Accellerator = i.ToString()[0], + Accelerator = i.ToString()[0], Text = $"░{i}░" }; btnNumbers[i].OnClick += btnNumber_Click; @@ -76,28 +76,29 @@ public ConsoleCalcView(ConsoleLib.Control App = null) for (int i = 1; i < 10; i++) { var p = new Point(0, 0); - switch (i) + (p.X, p.Y) = i switch { - case 1: (p.X, p.Y) = (4, 1); break; - case 2: (p.X, p.Y) = (4, 3); break; - case 3: (p.X, p.Y) = (4, 4); break; - case 4: (p.X, p.Y) = (3, 4); break; - case 5: (p.X, p.Y) = (2, 4); break; - case 6: (p.X, p.Y) = (5, 0); break; - case 7: (p.X, p.Y) = (5, 1); break; - case 8: (p.X, p.Y) = (5, 2); break; - case 9: (p.X, p.Y) = (3, 0); break; - default: (p.X, p.Y) = (0, 0); break; + 1 => (4, 1), + 2 => (4, 3), + 3 => (4, 4), + 4 => (3, 4), + 5 => (2, 4), + 6 => (5, 0), + 7 => (5, 1), + 8 => (5, 2), + 9 => (3, 0), + _ => (0, 0), }; + ; btnCommandss[i] = new ConsoleLib.CommonControls.Button { parent = this, ForeColor = ConsoleColor.White, BackColor = ConsoleColor.DarkGray, - shaddow = true, + shadow = true, position = new Point(p.X * 8 + 2, 14 - p.Y * 2), Tag = -i, - Accellerator = (i == 1) ? '=' : CalculatorClass.sMode[i][0], + Accelerator = (i == 1) ? '=' : CalculatorClass.sMode[i][0], Text = (i == 1) ? "░=░" : $"░{CalculatorClass.sMode[i]}░" }; btnCommandss[i].OnClick += btnCommand_Click; @@ -105,7 +106,7 @@ public ConsoleCalcView(ConsoleLib.Control App = null) btnCommandss[1].size = new Size(5, 3); btnCommandss[2].size = new Size(5, 3); - lblAkkumulator = new ConsoleLib.CommonControls.Label + lblAccumulator = new ConsoleLib.CommonControls.Label { parent = this, ForeColor = ConsoleColor.White, @@ -120,7 +121,7 @@ public ConsoleCalcView(ConsoleLib.Control App = null) parent = this, ForeColor = ConsoleColor.White, BackColor = ConsoleColor.DarkGray, - shaddow = true, + shadow = true, position = new Point(14, 16), Text = "░Close░", }; @@ -134,9 +135,9 @@ public ConsoleCalcView(ConsoleLib.Control App = null) /// /// The source of the event. /// The instance containing the event data. - private void btnCommand_Click(object sender, EventArgs e) + private void btnCommand_Click(object? sender, EventArgs? e) { - Calculator.Operation(-((ConsoleLib.CommonControls.Button)sender).Tag); + Calculator.Operation(-((ConsoleLib.CommonControls.Button?)sender)?.Tag??0); } /// @@ -144,9 +145,9 @@ private void btnCommand_Click(object sender, EventArgs e) /// /// The source of the event. /// The instance containing the event data. - private void Calculator_OnChange(object sender, EventArgs e) - { - lblAkkumulator.Text = Calculator.Akkumulator.ToString(); + private void Calculator_OnChange(object? sender, (string,object?,object?) e) + { + lblAccumulator.Text = Calculator.Accumulator.ToString(); } /// @@ -154,10 +155,10 @@ private void Calculator_OnChange(object sender, EventArgs e) /// /// The source of the event. /// The instance containing the event data. - private void btnCancel_Click(object sender, EventArgs e) + private void btnCancel_Click(object? sender, EventArgs? e) { - (parent as ConsoleLib.CommonControls.Application).Stop(); + (parent as ConsoleLib.CommonControls.Application)?.Stop(); } @@ -166,9 +167,9 @@ private void btnCancel_Click(object sender, EventArgs e) /// /// The source of the event. /// The instance containing the event data. - private void btnNumber_Click(object sender, EventArgs e) + private void btnNumber_Click(object? sender, EventArgs? e) { - Calculator.NumberButton(((ConsoleLib.CommonControls.Button)sender).Tag); + Calculator.NumberButton(((ConsoleLib.CommonControls.Button?)sender)?.Tag??0); } } diff --git a/CSharpBible/Calc/Calc32Tests/Calc32Tests.csproj b/CSharpBible/Calc/Calc32Tests/Calc32Tests.csproj index 49211b532..58f60874d 100644 --- a/CSharpBible/Calc/Calc32Tests/Calc32Tests.csproj +++ b/CSharpBible/Calc/Calc32Tests/Calc32Tests.csproj @@ -1,110 +1,34 @@ - - - - - Debug - AnyCPU - {24267033-7025-4264-9C9C-3888A294B8DA} - Library - Properties - Calc32Tests - Calc32Tests - ..\..\..\bin\$(MSBuildProjectName)\ - ..\..\..\obj\$(MSBuildProjectName)\ - ..\..\..\obj\$(MSBuildProjectName)\ - v4.8 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - - - - - - true - full - false - ..\..\..\bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\..\..\bin\Release\ - TRACE - prompt - 4 - - - - ..\..\packages\MSTest.TestFramework.3.0.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - - - ..\..\packages\MSTest.TestFramework.3.0.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - - - - - - - - - - - - - - - - - - - {1050FECD-B665-4B48-A068-5C46259D640A} - Calc32 - - - - - - - - - - False - - - False - - - False - - - False - - - - - - - - - Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}". - - - - - - - \ No newline at end of file + + + + net462-windows;net472-windows;net48-windows;net481-windows + false + true + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + diff --git a/CSharpBible/Calc/Calc32Tests/Calc32_netTests.csproj b/CSharpBible/Calc/Calc32Tests/Calc32_netTests.csproj index 4a0aaa81c..ef5c3a5aa 100644 --- a/CSharpBible/Calc/Calc32Tests/Calc32_netTests.csproj +++ b/CSharpBible/Calc/Calc32Tests/Calc32_netTests.csproj @@ -1,10 +1,8 @@  + - net6.0-windows + net6.0-windows;net7.0-windows;net8.0-windows disable - ..\..\..\bin\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - enable true false @@ -20,12 +18,18 @@ + + + - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/CSharpBible/Calc/Calc32Tests/NonVisual/CalculatorClassTests.cs b/CSharpBible/Calc/Calc32Tests/NonVisual/CalculatorClassTests.cs index d1b9192eb..6dd04f521 100644 --- a/CSharpBible/Calc/Calc32Tests/NonVisual/CalculatorClassTests.cs +++ b/CSharpBible/Calc/Calc32Tests/NonVisual/CalculatorClassTests.cs @@ -30,12 +30,16 @@ public class CalculatorClassTests /// /// The f calculator class /// +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. private CalculatorClass FCalculatorClass; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. /// /// The n changes /// private int nChanges; + public string DebugLog = ""; + /// /// Initializes this instance. /// @@ -43,6 +47,7 @@ public class CalculatorClassTests public void Init() { FCalculatorClass = new CalculatorClass(); + DebugLog = ""; } /// @@ -52,7 +57,10 @@ public void Init() public void TestSetup() { Assert.IsNotNull(FCalculatorClass); - Assert.AreEqual(0,FCalculatorClass.Akkumulator); + Assert.AreEqual(0, FCalculatorClass.Accumulator); + Assert.AreEqual(0, FCalculatorClass.Memory); + Assert.AreEqual("", FCalculatorClass.OperationText); + Assert.AreEqual("", DebugLog); } /// @@ -61,22 +69,22 @@ public void TestSetup() [TestMethod()] public void CalculatorClassTest() { - Assert.IsInstanceOfType(FCalculatorClass,typeof(CalculatorClass)); + Assert.IsInstanceOfType(FCalculatorClass, typeof(CalculatorClass)); } /// - /// Defines the test method AkkumulatorTest. + /// Defines the test method AccumulatorTest. /// [TestMethod()] - public void AkkumulatorTest() + public void AccumulatorTest() { - Assert.AreEqual(0, FCalculatorClass.Akkumulator); - FCalculatorClass.Akkumulator = 1; - Assert.AreEqual(1, FCalculatorClass.Akkumulator); - FCalculatorClass.Akkumulator = int.MaxValue; - Assert.AreEqual(int.MaxValue, FCalculatorClass.Akkumulator); - FCalculatorClass.Akkumulator = int.MinValue; - Assert.AreEqual(int.MinValue, FCalculatorClass.Akkumulator); + Assert.AreEqual(0, FCalculatorClass.Accumulator); + FCalculatorClass.Accumulator = 1; + Assert.AreEqual(1, FCalculatorClass.Accumulator); + FCalculatorClass.Accumulator = int.MaxValue; + Assert.AreEqual(int.MaxValue, FCalculatorClass.Accumulator); + FCalculatorClass.Accumulator = int.MinValue; + Assert.AreEqual(int.MinValue, FCalculatorClass.Accumulator); } /// @@ -84,8 +92,9 @@ public void AkkumulatorTest() /// /// The sender. /// The instance containing the event data. - private void CalcChange(object sender, EventArgs e) + void CalcChange(object? sender, (string, object?, object?) e) { + DebugLog += $"{sender}.Change({e.Item1},{e.Item2}=>{e.Item3}){Environment.NewLine}"; nChanges++; } @@ -95,60 +104,177 @@ private void CalcChange(object sender, EventArgs e) [TestMethod()] public void OnChangeTest1() { - FCalculatorClass.OnChange += new EventHandler(CalcChange); - AkkumulatorTest(); + FCalculatorClass.OnChange += CalcChange; + AccumulatorTest(); Assert.AreEqual(3, nChanges); } + /// /// Defines the test method OnChangeTest2. /// [TestMethod()] public void OnChangeTest2() { - FCalculatorClass.OnChange += new EventHandler(CalcChange); + FCalculatorClass.OnChange += CalcChange; FCalculatorClass.NumberButton(3); - Assert.AreEqual(3, FCalculatorClass.Akkumulator); + Assert.AreEqual(3, FCalculatorClass.Accumulator); FCalculatorClass.NumberButton(2); - Assert.AreEqual(32, FCalculatorClass.Akkumulator); + Assert.AreEqual(32, FCalculatorClass.Accumulator); FCalculatorClass.NumberButton(1); - Assert.AreEqual(321, FCalculatorClass.Akkumulator); + Assert.AreEqual(321, FCalculatorClass.Accumulator); Assert.AreEqual(3, nChanges); } /// /// Defines the test method ButtonTest. /// - [TestMethod()] - public void ButtonTest() + [DataTestMethod()] + [DataRow("432", new int[] { 4, 3, 2 }, new int[] { 4, 43, 432 })] + [DataRow("1234", new int[] { 1, 2, 3, 4 }, new int[] { 1, 12, 123, 1234 })] + [DataRow("1234", new int[] { 1, 2, 3, 4 }, new int[] { 1, 12, 123, 1234 })] + [DataRow("999999999", new int[] { 9, 9, 9, 9, 9, 9, 9, 9 }, new int[] { 9, 99, 999, 9999, 99999, 999999, 9999999, 99999999, 999999999, 999999999 })] + public void ButtonTest(string name, int[] aiButtons, int[] aiExp) { - FCalculatorClass.NumberButton(4); - Assert.AreEqual(4, FCalculatorClass.Akkumulator); - FCalculatorClass.NumberButton(3); - Assert.AreEqual(43, FCalculatorClass.Akkumulator); - FCalculatorClass.NumberButton(2); - Assert.AreEqual(432, FCalculatorClass.Akkumulator); + for (int i = 0; i < aiButtons.Length; i++) + { + FCalculatorClass.NumberButton(aiButtons[i]); + Assert.AreEqual(aiExp[i], FCalculatorClass.Accumulator, $"{name}[{i}]"); + } + } /// /// Defines the test method ButtonBack. /// - [TestMethod()] - public void ButtonBack() + [DataTestMethod()] + [DataRow("4", 4, false, 0, "Calc32.NonVisual.CalculatorClass.Change(Accumulator,4=>0)\r\n")] + [DataRow("431", 431, false, 0, "Calc32.NonVisual.CalculatorClass.Change(Accumulator,431=>0)\r\n")] + [DataRow("4", 4, true, 0, "Calc32.NonVisual.CalculatorClass.Change(Accumulator,4=>0)\r\n")] + [DataRow("431", 431, true, 43, "Calc32.NonVisual.CalculatorClass.Change(Accumulator,431=>43)\r\n")] + [DataRow("-4", -4, true, 0, "Calc32.NonVisual.CalculatorClass.Change(Accumulator,-4=>0)\r\n")] + [DataRow("-456", -456, true, -45, "Calc32.NonVisual.CalculatorClass.Change(Accumulator,-456=>-45)\r\n")] + [DataRow("0", 0, true, 0, "")] + public void ButtonBack(string name, int iAkk, bool xEdit, int iExp, string sExp) { - FCalculatorClass.OnChange += new EventHandler(CalcChange); - FCalculatorClass.NumberButton(4); - Assert.AreEqual(4, FCalculatorClass.Akkumulator); - FCalculatorClass.NumberButton(3); - Assert.AreEqual(43, FCalculatorClass.Akkumulator); - FCalculatorClass.NumberButton(2); - Assert.AreEqual(432, FCalculatorClass.Akkumulator); - FCalculatorClass.BackSpace(); - Assert.AreEqual(43, FCalculatorClass.Akkumulator); - FCalculatorClass.BackSpace(); - Assert.AreEqual(4, FCalculatorClass.Akkumulator); + FCalculatorClass.OnChange += CalcChange; + + if (!xEdit) FCalculatorClass.Accumulator = iAkk; + else + Enter(iAkk, FCalculatorClass); + DebugLog = ""; FCalculatorClass.BackSpace(); - Assert.AreEqual(0, FCalculatorClass.Akkumulator); + Assert.AreEqual(iExp, FCalculatorClass.Accumulator, $"Calc({name}).result"); + Assert.AreEqual(sExp, DebugLog, $"Calc({name}).DebugLog"); + } + + private static void Enter(int iAkk, CalculatorClass fCalculatorClass) + { + var s = iAkk.ToString(); + fCalculatorClass.Operation(1); + bool xNeg = false; + if (s[0] == '-') + { + xNeg = true; + s = s.Remove(0, 1); + } + while (s.Length > 0) + { + fCalculatorClass.NumberButton(s[0] - 48); + s = s.Remove(0, 1); + } + if (xNeg) + fCalculatorClass.Operation((int)CalculatorClass.eOpMode.Negate); + + } + + /// + /// Defines the test method ButtonTest. + /// + [DataTestMethod()] + [DataRow("4+3", CalculatorClass.eOpMode.Plus, new int[] { 4, 3 }, 7, new string[] { @"Calc32.NonVisual.CalculatorClass.Change(OperationText,=>=) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,0=>4) +Calc32.NonVisual.CalculatorClass.Change(OperationText,==>+) +Calc32.NonVisual.CalculatorClass.Change(Memory,0=>4) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,4=>3) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,3=>7) +Calc32.NonVisual.CalculatorClass.Change(OperationText,+=>=) +Calc32.NonVisual.CalculatorClass.Change(Memory,4=>0) +" })] + [DataRow("12-4", CalculatorClass.eOpMode.Minus, new int[] { 12, 4 }, 8, new string[] { @"Calc32.NonVisual.CalculatorClass.Change(OperationText,=>=) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,0=>12) +Calc32.NonVisual.CalculatorClass.Change(OperationText,==>-) +Calc32.NonVisual.CalculatorClass.Change(Memory,0=>12) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,12=>4) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,4=>8) +Calc32.NonVisual.CalculatorClass.Change(OperationText,-=>=) +Calc32.NonVisual.CalculatorClass.Change(Memory,12=>0) +" })] + [DataRow("7*6", CalculatorClass.eOpMode.Multiply, new int[] { 7, 6 }, 42, new string[] { @"Calc32.NonVisual.CalculatorClass.Change(OperationText,=>=) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,0=>7) +Calc32.NonVisual.CalculatorClass.Change(OperationText,==>*) +Calc32.NonVisual.CalculatorClass.Change(Memory,0=>7) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,7=>6) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,6=>42) +Calc32.NonVisual.CalculatorClass.Change(OperationText,*=>=) +Calc32.NonVisual.CalculatorClass.Change(Memory,7=>0) +" })] + [DataRow("99/11", CalculatorClass.eOpMode.Divide, new int[] { 99, 11 }, 9, new string[] { @"Calc32.NonVisual.CalculatorClass.Change(OperationText,=>=) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,0=>99) +Calc32.NonVisual.CalculatorClass.Change(OperationText,==>/) +Calc32.NonVisual.CalculatorClass.Change(Memory,0=>99) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,99=>11) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,11=>9) +Calc32.NonVisual.CalculatorClass.Change(OperationText,/=>=) +Calc32.NonVisual.CalculatorClass.Change(Memory,99=>0) +" })] + [DataRow("99 & 7", CalculatorClass.eOpMode.BinaryAnd, new int[] { 99, 7 }, 3, new string[] { @"Calc32.NonVisual.CalculatorClass.Change(OperationText,=>=) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,0=>99) +Calc32.NonVisual.CalculatorClass.Change(OperationText,==>&) +Calc32.NonVisual.CalculatorClass.Change(Memory,0=>99) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,99=>7) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,7=>3) +Calc32.NonVisual.CalculatorClass.Change(OperationText,&=>=) +Calc32.NonVisual.CalculatorClass.Change(Memory,99=>0) +" })] + [DataRow("12 | 7", CalculatorClass.eOpMode.BinaryOr, new int[] { 12, 7 }, 15, new string[] { @"Calc32.NonVisual.CalculatorClass.Change(OperationText,=>=) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,0=>12) +Calc32.NonVisual.CalculatorClass.Change(OperationText,==>|) +Calc32.NonVisual.CalculatorClass.Change(Memory,0=>12) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,12=>7) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,7=>15) +Calc32.NonVisual.CalculatorClass.Change(OperationText,|=>=) +Calc32.NonVisual.CalculatorClass.Change(Memory,12=>0) +" })] + [DataRow("12 x 7", CalculatorClass.eOpMode.BinaryXor, new int[] { 12, 7 }, 11, new string[] { @"Calc32.NonVisual.CalculatorClass.Change(OperationText,=>=) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,0=>12) +Calc32.NonVisual.CalculatorClass.Change(OperationText,==>x) +Calc32.NonVisual.CalculatorClass.Change(Memory,0=>12) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,12=>7) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,7=>11) +Calc32.NonVisual.CalculatorClass.Change(OperationText,x=>=) +Calc32.NonVisual.CalculatorClass.Change(Memory,12=>0) +" })] + [DataRow("12 ! 7", CalculatorClass.eOpMode.BinaryNot, new int[] { 12, -2 }, -2, new string[] { @"Calc32.NonVisual.CalculatorClass.Change(OperationText,=>=) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,0=>12) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,12=>-13) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,-13=>-2) +" })] + [DataRow("12 ~ 7", CalculatorClass.eOpMode.Negate, new int[] { 12, -2 }, -2, new string[] { @"Calc32.NonVisual.CalculatorClass.Change(OperationText,=>=) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,0=>12) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,12=>-12) +Calc32.NonVisual.CalculatorClass.Change(Accumulator,-12=>-2) +" })] + public void OperationTest(string name, CalculatorClass.eOpMode eO, int[] aiData, int iExp, string[] asExp) + { + FCalculatorClass.OnChange += CalcChange; + FCalculatorClass.Operation(1); + FCalculatorClass.Accumulator = aiData[0]; + FCalculatorClass.Operation((int)eO); + FCalculatorClass.Accumulator = aiData[1]; + FCalculatorClass.Operation(1); + Assert.AreEqual(iExp, FCalculatorClass.Accumulator, $"Calc({name}).result"); + Assert.AreEqual(asExp[0], DebugLog); } } diff --git a/CSharpBible/Calc/Calc32Tests/ProgramTests.cs b/CSharpBible/Calc/Calc32Tests/ProgramTests.cs new file mode 100644 index 000000000..cc4c99809 --- /dev/null +++ b/CSharpBible/Calc/Calc32Tests/ProgramTests.cs @@ -0,0 +1,26 @@ +using CSharpBible.Calc32; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; + +namespace Calc32.Tests +{ + class testFrm : System.Windows.Forms.Form + { + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + Close(); + } + } + [TestClass] + public class ProgramTests + { + [TestMethod] + public void MainTest() + { + var f = Program.GetMainForm(); + Program.GetMainForm = () => new testFrm(); + Program.Main(); + } + } +} diff --git a/CSharpBible/Calc/Calc32Tests/Properties/SettingsTests.cs b/CSharpBible/Calc/Calc32Tests/Properties/SettingsTests.cs new file mode 100644 index 000000000..aa3845193 --- /dev/null +++ b/CSharpBible/Calc/Calc32Tests/Properties/SettingsTests.cs @@ -0,0 +1,14 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Calc32.Properties.Tests +{ + [TestClass] + public class SettingsTests + { + [TestMethod] + public void SettingsTest() + { + Assert.IsNotNull(Settings.Default); + } + } +} diff --git a/CSharpBible/Calc/Calc32Tests/Visual/FrmCalc32MainTests.cs b/CSharpBible/Calc/Calc32Tests/Visual/FrmCalc32MainTests.cs index a90d80864..20cea0a46 100644 --- a/CSharpBible/Calc/Calc32Tests/Visual/FrmCalc32MainTests.cs +++ b/CSharpBible/Calc/Calc32Tests/Visual/FrmCalc32MainTests.cs @@ -12,6 +12,8 @@ // // *********************************************************************** using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Threading; +using System.Windows.Forms; /// /// The Tests namespace. @@ -28,7 +30,9 @@ public class FrmCalc32MainTests /// /// The test frame /// +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. private FrmCalc32Main testFrame; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. /// /// Initializes this instance. @@ -46,7 +50,7 @@ public void Init() public void SetUpTest() { Assert.IsNotNull(testFrame); - Assert.IsInstanceOfType(testFrame,typeof(FrmCalc32Main)); + Assert.IsInstanceOfType(testFrame, typeof(FrmCalc32Main)); } /// /// Defines the test method FrmCalc32MainTest. @@ -54,7 +58,42 @@ public void SetUpTest() [TestMethod()] public void FrmCalc32MainTest() { - Assert.Fail(); + testFrame.Show(); + Assert.AreEqual(true, testFrame.Visible); + Application.DoEvents(); + Thread.Sleep(10); + testFrame.Hide(); + Assert.AreEqual(false, testFrame.Visible); } + + [TestMethod()] + public void calculatorClassChangeTest() + { + var i=( testFrame.calculatorClass1.Accumulator+=1); + Assert.AreEqual(i.ToString(), testFrame.lblResult.Text); + } + + [TestMethod()] + public void btnNumber_ClickTest() + { + testFrame.Show(); + var i = testFrame.calculatorClass1.Accumulator; + testFrame.btnOne.PerformClick(); + Assert.AreNotEqual(i, testFrame.calculatorClass1.Accumulator); + testFrame.Hide(); + } + + [TestMethod()] + public void btnBack_ClickTest() + { + testFrame.Show(); + var i = testFrame.calculatorClass1.Accumulator=123; + testFrame.btnBack.PerformClick(); + Assert.AreNotEqual(i, testFrame.calculatorClass1.Accumulator); + testFrame.Hide(); + } + + + } } \ No newline at end of file diff --git a/CSharpBible/Calc/Calc32WPF/App.xaml.cs b/CSharpBible/Calc/Calc32WPF/App.xaml.cs index ece1392f9..2818ab5b7 100644 --- a/CSharpBible/Calc/Calc32WPF/App.xaml.cs +++ b/CSharpBible/Calc/Calc32WPF/App.xaml.cs @@ -11,12 +11,6 @@ // // // *********************************************************************** -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Threading.Tasks; using System.Windows; /// diff --git a/CSharpBible/Calc/Calc32WPF/Calc32WPF.csproj b/CSharpBible/Calc/Calc32WPF/Calc32WPF.csproj index 1a763d495..2f55b2b38 100644 --- a/CSharpBible/Calc/Calc32WPF/Calc32WPF.csproj +++ b/CSharpBible/Calc/Calc32WPF/Calc32WPF.csproj @@ -1,113 +1,57 @@ - - - - - Debug - AnyCPU - {4BCC197C-7F28-4F6E-B831-D02BE0ABE839} - 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 - - - - AnyCPU - true - full - false - ..\..\..\bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - ..\..\..\bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - 4.0 - - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - App.xaml - Code - - - - MainWindow.xaml - Code - - - - - Component - NonVisual\CalculatorClass.cs - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - ResXFileCodeGenerator - Resources.Designer.cs - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - - - {abc8a3fb-12d1-40ed-aa6c-dbff48b7a080} - MVVM_BaseLib - - - + + + + WinExe + net462-windows;net472-windows;net48-windows;net481-windows + true + + + + + enable + disable + + + $(MSBuildProjectName.Replace(" ", "_").Replace("_net","")) + + + + + + + + + + + NonVisual\CalulatorClass.cs + + + + + + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + \ No newline at end of file diff --git a/CSharpBible/Calc/Calc32WPF/Calc32WPF_net.csproj b/CSharpBible/Calc/Calc32WPF/Calc32WPF_net.csproj index 66e961434..573476e71 100644 --- a/CSharpBible/Calc/Calc32WPF/Calc32WPF_net.csproj +++ b/CSharpBible/Calc/Calc32WPF/Calc32WPF_net.csproj @@ -1,10 +1,8 @@  + WinExe - net6.0-windows - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\bin\$(MSBuildProjectName) + net6.0-windows;net7.0-windows;net8.0-windows true @@ -18,18 +16,18 @@ + + - - - - + + NonVisual\CalulatorClass.cs + - - + diff --git a/CSharpBible/Calc/Calc32WPF/Properties/Settings.Designer.cs b/CSharpBible/Calc/Calc32WPF/Properties/Settings.Designer.cs index a79c54455..c9cf9c8f2 100644 --- a/CSharpBible/Calc/Calc32WPF/Properties/Settings.Designer.cs +++ b/CSharpBible/Calc/Calc32WPF/Properties/Settings.Designer.cs @@ -13,7 +13,7 @@ namespace Calc32WPF.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.3.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/CSharpBible/Calc/Calc32WPF/ViewModel/MainWindowViewModel.cs b/CSharpBible/Calc/Calc32WPF/ViewModel/MainWindowViewModel.cs deleted file mode 100644 index 8b669dd0f..000000000 --- a/CSharpBible/Calc/Calc32WPF/ViewModel/MainWindowViewModel.cs +++ /dev/null @@ -1,120 +0,0 @@ -// *********************************************************************** -// Assembly : Calc32WPF_net -// Author : Mir -// Created : 12-22-2021 -// -// Last Modified By : Mir -// Last Modified On : 10-22-2022 -// *********************************************************************** -// -// Copyright (c) JC-Soft. All rights reserved. -// -// -// *********************************************************************** -using MVVM.ViewModel; -using Calc32.NonVisual; -using System; - -/// -/// The ViewModel namespace. -/// -namespace Calc32WPF.ViewModel -{ - /// - /// Class MainWindowViewModel. - /// Implements the - /// - public class MainWindowViewModel: BaseViewModel - { - #region Properties - #region private properties - /// - /// The calculator class - /// - private CalculatorClass calculatorClass; - #endregion - - /// - /// Gets or sets the akkumulator. - /// - /// - /// The akkumulator. - public int Akkumulator - { - get => calculatorClass.Akkumulator; set - { - calculatorClass.Akkumulator = value; - RaisePropertyChanged(); - } - } - - /// - /// Gets or sets the memory. - /// - /// - /// The memory. - public int Memory - { - get => calculatorClass.Memory; set - { - calculatorClass.Memory = value; - RaisePropertyChanged(); - } - } - - /// - /// Gets the operation text. - /// - /// The operation text. - public string OperationText { get => calculatorClass.OperationText; } - - /// - /// Gets or sets the number-button - delegate. - /// - /// The BTN number. - public DelegateCommand btnNumber { get; set; } - /// - /// Gets or sets the Delegate for the operation command. - /// - /// The BTN operation. - public DelegateCommand btnOperation { get; set; } - /// - /// Gets or sets the BTN backspace. - /// - /// The BTN backspace. - public DelegateCommand btnBackspace { get; set; } - #endregion - #region Methods - /// - /// Initializes a new instance of the class. - /// - public MainWindowViewModel() - { - calculatorClass = new CalculatorClass(); - calculatorClass.OnChange += CalculatorClass_OnChange; - btnNumber =new DelegateCommand( (o) => { - calculatorClass.NumberButton(int.Parse((string)o)); - }); - btnOperation = new DelegateCommand( (o) => { - calculatorClass.Operation(-int.Parse((string)o)); - }); - btnBackspace = new DelegateCommand( - (o) => { calculatorClass.Operation((int)(o ?? 0)); }, - (o)=>calculatorClass.Akkumulator!=0); - CommandCanExecuteBinding.Add((nameof(calculatorClass.Akkumulator), nameof(btnBackspace))); - } - - /// - /// Handles the OnChange event of the CalculatorClass control. - /// - /// The source of the event. - /// The instance containing the event data. - private void CalculatorClass_OnChange(object sender, EventArgs e) - { - RaisePropertyChanged(nameof(Akkumulator)); - RaisePropertyChanged(nameof(Memory)); - RaisePropertyChanged(nameof(OperationText)); - } - #endregion - } -} diff --git a/CSharpBible/Calc/Calc32WPF/ViewModels/MainWindowViewModel.cs b/CSharpBible/Calc/Calc32WPF/ViewModels/MainWindowViewModel.cs new file mode 100644 index 000000000..1a90fa038 --- /dev/null +++ b/CSharpBible/Calc/Calc32WPF/ViewModels/MainWindowViewModel.cs @@ -0,0 +1,116 @@ +// *********************************************************************** +// Assembly : Calc32WPF_net +// Author : Mir +// Created : 12-22-2021 +// +// Last Modified By : Mir +// Last Modified On : 10-22-2022 +// *********************************************************************** +// +// Copyright (c) JC-Soft. All rights reserved. +// +// +// *********************************************************************** +using MVVM.ViewModel; +using Calc32.NonVisual; +using System; + +/// +/// The ViewModel namespace. +/// +namespace Calc32WPF.ViewModel +{ + /// + /// Class MainWindowViewModel. + /// Implements the + /// + public class MainWindowViewModel: BaseViewModel + { + #region Properties + #region private properties + /// + /// The calculator class + /// + private readonly CalculatorClass calculatorClass; + #endregion + + /// + /// Gets or sets the akkumulator. + /// + /// + /// The akkumulator. + public int Akkumulator + { + get => calculatorClass.Accumulator; set + { + calculatorClass.Accumulator = value; + RaisePropertyChanged(); + } + } + + /// + /// Gets or sets the memory. + /// + /// + /// The memory. + public int Memory + { + get => calculatorClass.Memory; + } + + /// + /// Gets the operation text. + /// + /// The operation text. + public string OperationText { get => calculatorClass.OperationText; } + + /// + /// Gets or sets the number-button - delegate. + /// + /// The BTN number. + public DelegateCommand btnNumber { get; set; } + /// + /// Gets or sets the Delegate for the operation command. + /// + /// The BTN operation. + public DelegateCommand btnOperation { get; set; } + /// + /// Gets or sets the BTN backspace. + /// + /// The BTN backspace. + public DelegateCommand btnBackspace { get; set; } + #endregion + #region Methods + /// + /// Initializes a new instance of the class. + /// + public MainWindowViewModel() + { + calculatorClass = new CalculatorClass(); + calculatorClass.OnChange += CalculatorClass_OnChange; + btnNumber =new DelegateCommand( (o) => { + calculatorClass.NumberButton(int.Parse((string?)o??"")); + }); + btnOperation = new DelegateCommand( (o) => { + calculatorClass.Operation(-int.Parse((string?)o??"")); + }); + btnBackspace = new DelegateCommand( + (o) => { calculatorClass.BackSpace(); }, + (o)=>calculatorClass.Accumulator!=0); + AddPropertyDependency(nameof(btnBackspace), nameof(calculatorClass.Accumulator)); + } + + /// + /// Handles the OnChange event of the CalculatorClass control. + /// + /// The source of the event. + /// The instance containing the event data. + private void CalculatorClass_OnChange(object? sender, (string, object?, object?) e) + { + RaisePropertyChanged(nameof(Akkumulator)); + RaisePropertyChanged(nameof(Memory)); + RaisePropertyChanged(nameof(OperationText)); + } + #endregion + } +} diff --git a/CSharpBible/Calc/Calc32WPF/Visual/MainWindow.xaml b/CSharpBible/Calc/Calc32WPF/Visual/MainWindow.xaml index 8e018f0c1..2a4ce17c6 100644 --- a/CSharpBible/Calc/Calc32WPF/Visual/MainWindow.xaml +++ b/CSharpBible/Calc/Calc32WPF/Visual/MainWindow.xaml @@ -60,7 +60,7 @@ - + diff --git a/CSharpBible/Calc/Calc32WPF/Visual/MainWindow.xaml.cs b/CSharpBible/Calc/Calc32WPF/Visual/MainWindow.xaml.cs index 45c6de76c..aa8a9c9b6 100644 --- a/CSharpBible/Calc/Calc32WPF/Visual/MainWindow.xaml.cs +++ b/CSharpBible/Calc/Calc32WPF/Visual/MainWindow.xaml.cs @@ -26,9 +26,9 @@ namespace Calc32WPF public partial class MainWindow : Window { /// - /// The TMR anim + /// The animation timer /// - Timer tmrAnim = new Timer(); + readonly Timer tmrAnimation = new(); /// /// The time /// @@ -41,16 +41,16 @@ public MainWindow() { InitializeComponent(); - tmrAnim.Interval = 100; - tmrAnim.Elapsed += new ElapsedEventHandler(onAnimTimer); + tmrAnimation.Interval = 100; + tmrAnimation.Elapsed += new ElapsedEventHandler(onAnimationTimer); } /// - /// Ons the anim timer. + /// On animation timer. /// /// The sender. /// The instance containing the event data. - private void onAnimTimer(object sender, ElapsedEventArgs e) + private void onAnimationTimer(object? sender, ElapsedEventArgs e) { nTime = DateTime.Now.Ticks / 1000; } @@ -62,16 +62,7 @@ private void onAnimTimer(object sender, ElapsedEventArgs e) /// The instance containing the event data. private void frmCalc32Main_Initialized(object sender, EventArgs e) { - tmrAnim.Start(); - } - - /// - /// Handles the GotFocus event of the frmCalc32Main control. - /// - /// The source of the event. - /// The instance containing the event data. - private void frmCalc32Main_GotFocus(object sender, RoutedEventArgs e) - { + tmrAnimation.Start(); } } diff --git a/CSharpBible/Calc/Calc32WPFTests/Calc32WPFTests.csproj b/CSharpBible/Calc/Calc32WPFTests/Calc32WPFTests.csproj index 5e9687105..777b08c29 100644 --- a/CSharpBible/Calc/Calc32WPFTests/Calc32WPFTests.csproj +++ b/CSharpBible/Calc/Calc32WPFTests/Calc32WPFTests.csproj @@ -1,114 +1,39 @@ - - - - - - Debug - AnyCPU - {5BD6F565-B18E-4B62-B51B-0EC58AD82AE1} - Library - Properties - $(MSBuildProjectName) - $(MSBuildProjectName) - ..\..\..\bin\$(MSBuildProjectName)\ - ..\..\..\obj\$(MSBuildProjectName)\ - ..\..\..\obj\$(MSBuildProjectName)\ - v4.8 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - - - - - - true - full - false - ..\..\..\bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\..\..\bin\Release\ - TRACE - prompt - 4 - - - - ..\..\packages\MSTest.TestFramework.3.0.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - - - ..\..\packages\MSTest.TestFramework.3.0.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - - - - - - - - - - - - - - - - - - {4BCC197C-7F28-4F6E-B831-D02BE0ABE839} - Calc32WPF - - - {ABC8A3FB-12D1-40ED-AA6C-DBFF48B7A080} - MVVM_BaseLib - - - - - - - - - - False - - - False - - - False - - - False - - - - - - - - - Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}". - - - - - - - \ No newline at end of file + + + + net462-windows;net472-windows;net48-windows;net481-windows + true + false + + + + + + + + + + + + + + + + + NonVisual\CalulatorClassTests.cs + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + diff --git a/CSharpBible/Calc/Calc32WPFTests/Calc32WPF_netTests.csproj b/CSharpBible/Calc/Calc32WPFTests/Calc32WPF_netTests.csproj index d49b46597..28143e6f1 100644 --- a/CSharpBible/Calc/Calc32WPFTests/Calc32WPF_netTests.csproj +++ b/CSharpBible/Calc/Calc32WPFTests/Calc32WPF_netTests.csproj @@ -1,40 +1,45 @@  - - net6.0-windows - disable - ..\..\..\bin\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - enable - true - false - - - - - - - - + + + net6.0-windows;net7.0-windows;net8.0-windows + true + false + + + + + + - - + - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - + + - - + + NonVisual\CalulatorClassTests.cs + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + - + diff --git a/CSharpBible/Calc/Calc32WPFTests/MainWindowTests.cs b/CSharpBible/Calc/Calc32WPFTests/MainWindowTests.cs new file mode 100644 index 000000000..e41471837 --- /dev/null +++ b/CSharpBible/Calc/Calc32WPFTests/MainWindowTests.cs @@ -0,0 +1,27 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Threading; + +namespace Calc32WPF.Tests +{ + [TestClass()] + public class MainWindowTests + { + MainWindow testView; + + [TestInitialize] + public void Init() + { + var t=new Thread(()=> + testView = new MainWindow()); + t.SetApartmentState(ApartmentState.STA); + t.Start(); + t.Join(); + } + + [TestMethod()] + public void MainWindowTest() + { + Assert.IsNotNull(testView); + } + } +} \ No newline at end of file diff --git a/CSharpBible/Calc/Calc32WPFTests/Properties/SettingsTests.cs b/CSharpBible/Calc/Calc32WPFTests/Properties/SettingsTests.cs new file mode 100644 index 000000000..7b0dcd9da --- /dev/null +++ b/CSharpBible/Calc/Calc32WPFTests/Properties/SettingsTests.cs @@ -0,0 +1,14 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Calc32WPF.Properties.Tests +{ + [TestClass] + public class SettingsTests + { + [TestMethod] + public void SettingsTest() + { + Assert.IsNotNull(Settings.Default); + } + } +} diff --git a/CSharpBible/Calc/Calc32WPFTests/ViewModel/MainWindowViewModelTests.cs b/CSharpBible/Calc/Calc32WPFTests/ViewModel/MainWindowViewModelTests.cs deleted file mode 100644 index c724ad93c..000000000 --- a/CSharpBible/Calc/Calc32WPFTests/ViewModel/MainWindowViewModelTests.cs +++ /dev/null @@ -1,179 +0,0 @@ -// *********************************************************************** -// Assembly : Calc32WPFTests -// Author : Mir -// Created : 12-23-2021 -// -// Last Modified By : Mir -// Last Modified On : 08-28-2022 -// *********************************************************************** -// -// Copyright © JC-Soft 2021 -// -// -// *********************************************************************** -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System.ComponentModel; - -/// -/// The Tests namespace. -/// -/// -namespace Calc32WPF.ViewModel.Tests -{ - /// - /// Defines test class MainWindowViewModelTests. - /// - /// - [TestClass()] - public class MainWindowViewModelTests - { - /// - /// The property changed count - /// - /// - private int _PropChangedCount; - /// - /// The property changed - /// - /// - private string _PropChanged = ""; - /// - /// The model view - /// - /// - private MainWindowViewModel _ModelView; - - /// - /// Tests the initialize. - /// - /// - [TestInitialize] - public void TestInitialize() - { - ClearResults(); - _ModelView = new MainWindowViewModel(); - _ModelView.PropertyChanged += MainWindow_VM_PropChanged; - } - - private void ClearResults() - { - _PropChangedCount = 0; - _PropChanged = ""; - } - - /// - /// Handles the PropChanged event of the MainWindow_VM control. - /// - /// The source of the event. - /// The instance containing the event data. - /// - private void MainWindow_VM_PropChanged(object sender, PropertyChangedEventArgs e) - { - _PropChangedCount++; - _PropChanged += $"{e.PropertyName}:{sender.GetType().GetProperty(e.PropertyName).GetValue(sender)}\r\n"; - } - - /// - /// Defines the test method MainWindowViewModelTestSetup. - /// - /// - [TestMethod()] - public void MainWindowViewModelTestSetup() - { - Assert.IsNotNull(_ModelView); - Assert.AreEqual(0, _PropChangedCount); - } - - /// - /// Mains the window vm number button. - /// - /// The s buttons. - /// The i pc count. - /// The s akk. - /// - [DataTestMethod()] - [DataRow("0", 0, 0, "")] - [DataRow("1", 3, 1, "Akkumulator:1\r\nMemory:0\r\nOperationText:\r\n")] - [DataRow("2", 3, 2, "Akkumulator:2\r\nMemory:0\r\nOperationText:\r\n")] - [DataRow("3", 3, 3, "Akkumulator:3\r\nMemory:0\r\nOperationText:\r\n")] - [DataRow("4", 3, 4, "Akkumulator:4\r\nMemory:0\r\nOperationText:\r\n")] - [DataRow("5", 3, 5, "Akkumulator:5\r\nMemory:0\r\nOperationText:\r\n")] - [DataRow("6", 3, 6, "Akkumulator:6\r\nMemory:0\r\nOperationText:\r\n")] - [DataRow("7", 3, 7, "Akkumulator:7\r\nMemory:0\r\nOperationText:\r\n")] - [DataRow("8", 3, 8, "Akkumulator:8\r\nMemory:0\r\nOperationText:\r\n")] - [DataRow("9", 3, 9, "Akkumulator:9\r\nMemory:0\r\nOperationText:\r\n")] - [DataRow("00", 0, 0, "")] - [DataRow("01", 3, 1, "Akkumulator:1\r\nMemory:0\r\nOperationText:\r\n")] - [DataRow("10", 6, 10, "Akkumulator:1\r\nMemory:0\r\nOperationText:\r\nAkkumulator:10\r\nMemory:0\r\nOperationText:\r\n")] - public void MainWindow_VM_NumButton(string sButtons, int iPCCount, int sAkk, string sExpPC) - { - foreach (var button in sButtons) - { - if (button >= '0' && button <= '9') - _ModelView.btnNumber.Execute($"{button}"); - - } - Assert.AreEqual(iPCCount, _PropChangedCount); - Assert.AreEqual(sAkk, _ModelView.Akkumulator); - Assert.AreEqual(sExpPC, _PropChanged); - - } - - [DataTestMethod()] - [DataRow("0",100, 0, 100, "", "")] - [DataRow("0", 0, 0, 0, "", "")] - [DataRow("0", -1, 0, -1, "", "")] - [DataRow("0", int.MaxValue, 0, int.MaxValue, "", "")] - [DataRow("0", int.MinValue, 0, int.MinValue, "", "")] - [DataRow("1", 100, 0, 100, "=", "")] - [DataRow("1", 0, 0, 0, "=", "")] - [DataRow("1", -1, 0, -1, "=", "")] - [DataRow("1", int.MaxValue, 0, int.MaxValue, "=", "")] - [DataRow("1", int.MinValue, 0, int.MinValue, "=", "")] - [DataRow("2", 100, 3, 100, "+", "Akkumulator:100\r\nMemory:100\r\nOperationText:+\r\n")] - [DataRow("21", 100, 6, 200, "=", "Akkumulator:100\r\nMemory:100\r\nOperationText:+\r\nAkkumulator:200\r\nMemory:0\r\nOperationText:=\r\n")] - [DataRow("22", 100, 6, 200, "+", "Akkumulator:100\r\nMemory:100\r\nOperationText:+\r\nAkkumulator:200\r\nMemory:200\r\nOperationText:+\r\n")] - [DataRow("2", 0, 0, 0, "+", "")] - [DataRow("21", 0, 0, 0, "=", "")] - [DataRow("22", 0, 0, 0, "+", "")] - [DataRow("2", -1, 3, -1, "+", "Akkumulator:-1\r\nMemory:-1\r\nOperationText:+\r\n")] - [DataRow("21", -1, 6, -2, "=", "Akkumulator:-1\r\nMemory:-1\r\nOperationText:+\r\nAkkumulator:-2\r\nMemory:0\r\nOperationText:=\r\n")] - [DataRow("22", -1, 6, -2, "+", "Akkumulator:-1\r\nMemory:-1\r\nOperationText:+\r\nAkkumulator:-2\r\nMemory:-2\r\nOperationText:+\r\n")] - [DataRow("3", 100, 3, 100, "-", "Akkumulator:100\r\nMemory:100\r\nOperationText:-\r\n")] - [DataRow("31", 100, 6, 0, "=", "Akkumulator:100\r\nMemory:100\r\nOperationText:-\r\nAkkumulator:0\r\nMemory:0\r\nOperationText:=\r\n")] - [DataRow("311", 100, 6, 0, "=", "Akkumulator:100\r\nMemory:100\r\nOperationText:-\r\nAkkumulator:0\r\nMemory:0\r\nOperationText:=\r\n")] - [DataRow("33", 100, 6, 0, "-", "Akkumulator:100\r\nMemory:100\r\nOperationText:-\r\nAkkumulator:0\r\nMemory:0\r\nOperationText:-\r\n")] - [DataRow("4", 100, 3, 100, "*", "Akkumulator:100\r\nMemory:100\r\nOperationText:*\r\n")] - [DataRow("41", 100, 6, 10000, "=", "Akkumulator:100\r\nMemory:100\r\nOperationText:*\r\nAkkumulator:10000\r\nMemory:0\r\nOperationText:=\r\n")] - [DataRow("44", 100, 6, 10000, "*", "Akkumulator:100\r\nMemory:100\r\nOperationText:*\r\nAkkumulator:10000\r\nMemory:10000\r\nOperationText:*\r\n")] - [DataRow("5", 100, 3, 100, "/", "Akkumulator:100\r\nMemory:100\r\nOperationText:/\r\n")] - [DataRow("51", 100, 6, 1, "=", "Akkumulator:100\r\nMemory:100\r\nOperationText:/\r\nAkkumulator:1\r\nMemory:0\r\nOperationText:=\r\n")] - [DataRow("55", 100, 6, 1, "/", "Akkumulator:100\r\nMemory:100\r\nOperationText:/\r\nAkkumulator:1\r\nMemory:1\r\nOperationText:/\r\n")] - [DataRow("6", 100, 3, 100, "&", "Akkumulator:100\r\nMemory:100\r\nOperationText:&\r\n")] - [DataRow("61", 100, 6, 100, "=", "Akkumulator:100\r\nMemory:100\r\nOperationText:&\r\nAkkumulator:100\r\nMemory:0\r\nOperationText:=\r\n")] - [DataRow("66", 100, 3, 100, "&", "Akkumulator:100\r\nMemory:100\r\nOperationText:&\r\n")] - [DataRow("7", 100, 3, 100, "|", "Akkumulator:100\r\nMemory:100\r\nOperationText:|\r\n")] - [DataRow("71", 100, 6, 100, "=", "Akkumulator:100\r\nMemory:100\r\nOperationText:|\r\nAkkumulator:100\r\nMemory:0\r\nOperationText:=\r\n")] - [DataRow("77", 100, 3, 100, "|", "Akkumulator:100\r\nMemory:100\r\nOperationText:|\r\n")] - [DataRow("8", 100, 3, 100, "x", "Akkumulator:100\r\nMemory:100\r\nOperationText:x\r\n")] - [DataRow("81", 100, 6, 0, "=", "Akkumulator:100\r\nMemory:100\r\nOperationText:x\r\nAkkumulator:0\r\nMemory:0\r\nOperationText:=\r\n")] - [DataRow("88", 100, 6, 0, "x", "Akkumulator:100\r\nMemory:100\r\nOperationText:x\r\nAkkumulator:0\r\nMemory:0\r\nOperationText:x\r\n")] - [DataRow("9", 100, 3, -101, "", "Akkumulator:-101\r\nMemory:0\r\nOperationText:\r\n")] - [DataRow("99", 100, 6, 100, "", "Akkumulator:-101\r\nMemory:0\r\nOperationText:\r\nAkkumulator:100\r\nMemory:0\r\nOperationText:\r\n")] - public void MainWindow_VM_OpButton(string sButtons, int iAcc, int iPCCount, int iExpAkk,string sExpOp , string sExpPC) - { - _ModelView.Akkumulator = iAcc; - ClearResults(); - foreach (var button in sButtons) - { - if (button >= '0' && button <= '9') - _ModelView.btnOperation.Execute($"-{button}"); - - } - Assert.AreEqual(iPCCount, _PropChangedCount,$"Test: {sButtons}.PCCount"); - Assert.AreEqual(iExpAkk, _ModelView.Akkumulator, $"Test: {sButtons}.Acc"); - Assert.AreEqual(sExpOp, _ModelView.OperationText, $"Test: {sButtons}.Op"); - Assert.AreEqual(sExpPC, _PropChanged, $"Test: {sButtons}.PropChanges"); - } - } -} \ No newline at end of file diff --git a/CSharpBible/Calc/Calc32WPFTests/ViewModels/MainWindowViewModelTests.cs b/CSharpBible/Calc/Calc32WPFTests/ViewModels/MainWindowViewModelTests.cs new file mode 100644 index 000000000..30315ba96 --- /dev/null +++ b/CSharpBible/Calc/Calc32WPFTests/ViewModels/MainWindowViewModelTests.cs @@ -0,0 +1,202 @@ +// *********************************************************************** +// Assembly : Calc32WPFTests +// Author : Mir +// Created : 12-23-2021 +// +// Last Modified By : Mir +// Last Modified On : 08-28-2022 +// *********************************************************************** +// +// Copyright © JC-Soft 2021 +// +// +// *********************************************************************** +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.ComponentModel; + +/// +/// The Tests namespace. +/// +/// +namespace Calc32WPF.ViewModel.Tests +{ + /// + /// Defines test class MainWindowViewModelTests. + /// + /// + [TestClass()] + public class MainWindowViewModelTests + { + /// + /// The property changed count + /// + /// + private int _PropChangedCount; + /// + /// The property changed + /// + /// + private string _PropChanged = ""; + /// + /// The model view + /// + /// +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + private MainWindowViewModel _ModelView; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + + /// + /// Tests the initialize. + /// + /// + [TestInitialize] + public void TestInitialize() + { + ClearResults(); + _ModelView = new MainWindowViewModel(); + _ModelView.PropertyChanged += MainWindow_VM_PropChanged; + } + + private void ClearResults() + { + _PropChangedCount = 0; + _PropChanged = ""; + } + + /// + /// Handles the PropChanged event of the MainWindow_VM control. + /// + /// The source of the event. + /// The instance containing the event data. + /// + private void MainWindow_VM_PropChanged(object? sender, PropertyChangedEventArgs e) + { + _PropChangedCount++; + _PropChanged += $"{e.PropertyName}:{sender?.GetType()?.GetProperty(e.PropertyName!)?.GetValue(sender)}\r\n"; + } + + /// + /// Defines the test method MainWindowViewModelTestSetup. + /// + /// + [TestMethod()] + public void MainWindowViewModelTestSetup() + { + Assert.IsNotNull(_ModelView); + Assert.AreEqual(0, _PropChangedCount); + } + + /// + /// Mains the window vm number button. + /// + /// The s buttons. + /// The i pc count. + /// The s akk. + /// + [DataTestMethod()] + [DataRow("0", 0, 0, "")] + [DataRow("1", 3, 1, "Akkumulator:1\r\nMemory:0\r\nOperationText:\r\n")] + [DataRow("2", 3, 2, "Akkumulator:2\r\nMemory:0\r\nOperationText:\r\n")] + [DataRow("3", 3, 3, "Akkumulator:3\r\nMemory:0\r\nOperationText:\r\n")] + [DataRow("4", 3, 4, "Akkumulator:4\r\nMemory:0\r\nOperationText:\r\n")] + [DataRow("5", 3, 5, "Akkumulator:5\r\nMemory:0\r\nOperationText:\r\n")] + [DataRow("6", 3, 6, "Akkumulator:6\r\nMemory:0\r\nOperationText:\r\n")] + [DataRow("7", 3, 7, "Akkumulator:7\r\nMemory:0\r\nOperationText:\r\n")] + [DataRow("8", 3, 8, "Akkumulator:8\r\nMemory:0\r\nOperationText:\r\n")] + [DataRow("9", 3, 9, "Akkumulator:9\r\nMemory:0\r\nOperationText:\r\n")] + [DataRow("00", 0, 0, "")] + [DataRow("01", 3, 1, "Akkumulator:1\r\nMemory:0\r\nOperationText:\r\n")] + [DataRow("10", 6, 10, "Akkumulator:1\r\nMemory:0\r\nOperationText:\r\nAkkumulator:10\r\nMemory:0\r\nOperationText:\r\n")] + public void MainWindow_VM_NumButton(string sButtons, int iPCCount, int sAkk, string sExpPC) + { + foreach (var button in sButtons) + { + if (button >= '0' && button <= '9') + _ModelView.btnNumber.Execute($"{button}"); + + } + Assert.AreEqual(iPCCount, _PropChangedCount); + Assert.AreEqual(sAkk, _ModelView.Akkumulator); + Assert.AreEqual(sExpPC, _PropChanged); + + } + + [DataTestMethod()] + [DataRow("0",100, 0, 100, "", new string[] { "" })] + [DataRow("0", 0, 0, 0, "", new string[] { "" })] + [DataRow("0", -1, 0, -1, "", new string[] { "" })] + [DataRow("0", int.MaxValue, 0, int.MaxValue, "", new string[] { "" })] + [DataRow("0", int.MinValue, 0, int.MinValue, "", new string[] { "" })] + [DataRow("1", 100, 3, 100, "=", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:=\r\n" })] + [DataRow("1", 0, 3, 0, "=", new string[] { "Akkumulator:0\r\nMemory:0\r\nOperationText:=\r\n" })] + [DataRow("1", -1, 3, -1, "=", new string[] { "Akkumulator:-1\r\nMemory:0\r\nOperationText:=\r\n" })] + [DataRow("1", int.MaxValue, 3, int.MaxValue, "=", new string[] { "Akkumulator:2147483647\r\nMemory:0\r\nOperationText:=\r\n" })] + [DataRow("1", int.MinValue, 3, int.MinValue, "=", new string[] { "Akkumulator:-2147483648\r\nMemory:0\r\nOperationText:=\r\n" })] + [DataRow("2", 0, 3, 0, "+", new string[] { "Akkumulator:0\r\nMemory:0\r\nOperationText:+\r\n" })] + [DataRow("2", -1, 6, -1, "+", new string[] { "Akkumulator:-1\r\nMemory:0\r\nOperationText:+\r\nAkkumulator:-1\r\nMemory:-1\r\nOperationText:+\r\n" })] + [DataRow("2", 100, 6, 100, "+", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:+\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:+\r\n" })] + [DataRow("21", 0, 6, 0, "=", new string[] { "Akkumulator:0\r\nMemory:0\r\nOperationText:+\r\nAkkumulator:0\r\nMemory:0\r\nOperationText:=\r\n" })] + [DataRow("21", -1, 15, -2, "=", new string[] { "Akkumulator:-1\r\nMemory:0\r\nOperationText:+\r\nAkkumulator:-1\r\nMemory:-1\r\nOperationText:+\r\nAkkumulator:-2\r\nMemory:-1\r\nOperationText:+\r\nAkkumulator:-2\r\nMemory:-1\r\nOperationText:=\r\nAkkumulator:-2\r\nMemory:0\r\nOperationText:=\r\n" })] + [DataRow("21", 100, 15, 200, "=", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:+\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:+\r\nAkkumulator:200\r\nMemory:100\r\nOperationText:+\r\nAkkumulator:200\r\nMemory:100\r\nOperationText:=\r\nAkkumulator:200\r\nMemory:0\r\nOperationText:=\r\n" })] + [DataRow("22", 0, 3, 0, "+", new string[] { "Akkumulator:0\r\nMemory:0\r\nOperationText:+\r\n" })] + [DataRow("22", -1, 12, -2, "+", new string[] { "Akkumulator:-1\r\nMemory:0\r\nOperationText:+\r\nAkkumulator:-1\r\nMemory:-1\r\nOperationText:+\r\nAkkumulator:-2\r\nMemory:-1\r\nOperationText:+\r\nAkkumulator:-2\r\nMemory:-2\r\nOperationText:+\r\n" })] + [DataRow("22", 100, 12, 200, "+", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:+\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:+\r\nAkkumulator:200\r\nMemory:100\r\nOperationText:+\r\nAkkumulator:200\r\nMemory:200\r\nOperationText:+\r\n" })] + [DataRow("3", 100, 6, 100, "-", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:-\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:-\r\n" })] + [DataRow("31", 100, 15, 0, "=", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:-\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:-\r\nAkkumulator:0\r\nMemory:100\r\nOperationText:-\r\nAkkumulator:0\r\nMemory:100\r\nOperationText:=\r\nAkkumulator:0\r\nMemory:0\r\nOperationText:=\r\n" })] + [DataRow("311", 100, 15, 0, "=", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:-\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:-\r\nAkkumulator:0\r\nMemory:100\r\nOperationText:-\r\nAkkumulator:0\r\nMemory:100\r\nOperationText:=\r\nAkkumulator:0\r\nMemory:0\r\nOperationText:=\r\n" })] + [DataRow("33", 100, 12, 0, "-", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:-\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:-\r\nAkkumulator:0\r\nMemory:100\r\nOperationText:-\r\nAkkumulator:0\r\nMemory:0\r\nOperationText:-\r\n" })] + [DataRow("4", 100, 6, 100, "*", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:*\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:*\r\n" })] + [DataRow("41", 100, 15, 10000, "=", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:*\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:*\r\nAkkumulator:10000\r\nMemory:100\r\nOperationText:*\r\nAkkumulator:10000\r\nMemory:100\r\nOperationText:=\r\nAkkumulator:10000\r\nMemory:0\r\nOperationText:=\r\n" })] + [DataRow("44", 100, 12, 10000, "*", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:*\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:*\r\nAkkumulator:10000\r\nMemory:100\r\nOperationText:*\r\nAkkumulator:10000\r\nMemory:10000\r\nOperationText:*\r\n" })] + [DataRow("5", 100, 6, 100, "/", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:/\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:/\r\n" })] + [DataRow("51", 100, 15, 1, "=", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:/\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:/\r\nAkkumulator:1\r\nMemory:100\r\nOperationText:/\r\nAkkumulator:1\r\nMemory:100\r\nOperationText:=\r\nAkkumulator:1\r\nMemory:0\r\nOperationText:=\r\n" })] + [DataRow("55", 100, 12, 1, "/", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:/\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:/\r\nAkkumulator:1\r\nMemory:100\r\nOperationText:/\r\nAkkumulator:1\r\nMemory:1\r\nOperationText:/\r\n" })] + [DataRow("6", 100, 6, 100, "&", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:&\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:&\r\n" })] + [DataRow("61", 100, 12, 100, "=", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:&\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:&\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:=\r\nAkkumulator:100\r\nMemory:0\r\nOperationText:=\r\n" })] + [DataRow("66", 100, 6, 100, "&", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:&\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:&\r\n" })] + [DataRow("7", 100, 6, 100, "|", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:|\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:|\r\n" })] + [DataRow("71", 100, 12, 100, "=", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:|\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:|\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:=\r\nAkkumulator:100\r\nMemory:0\r\nOperationText:=\r\n" })] + [DataRow("77", 100, 6, 100, "|", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:|\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:|\r\n" })] + [DataRow("8", 100, 6, 100, "x", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:x\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:x\r\n" })] + [DataRow("81", 100, 15, 0, "=", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:x\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:x\r\nAkkumulator:0\r\nMemory:100\r\nOperationText:x\r\nAkkumulator:0\r\nMemory:100\r\nOperationText:=\r\nAkkumulator:0\r\nMemory:0\r\nOperationText:=\r\n" })] + [DataRow("88", 100, 12, 0, "x", new string[] { "Akkumulator:100\r\nMemory:0\r\nOperationText:x\r\nAkkumulator:100\r\nMemory:100\r\nOperationText:x\r\nAkkumulator:0\r\nMemory:100\r\nOperationText:x\r\nAkkumulator:0\r\nMemory:0\r\nOperationText:x\r\n" })] + [DataRow("9", 100, 3, -101, "", new string[] { "Akkumulator:-101\r\nMemory:0\r\nOperationText:\r\n" })] + [DataRow("99", 100, 6, 100, "", new string[] { "Akkumulator:-101\r\nMemory:0\r\nOperationText:\r\nAkkumulator:100\r\nMemory:0\r\nOperationText:\r\n" })] + public void MainWindow_VM_OpButton(string sButtons, int iAcc, int iPCCount, int iExpAkk,string sExpOp , string[] asExpPC) + { + _ModelView.Akkumulator = iAcc; + ClearResults(); + foreach (var button in sButtons) + { + if (button >= '0' && button <= '9') + _ModelView.btnOperation.Execute($"-{button}"); + + } + Assert.AreEqual(iPCCount, _PropChangedCount,$"Test: {sButtons}.PCCount"); + Assert.AreEqual(iExpAkk, _ModelView.Akkumulator, $"Test: {sButtons}.Acc"); + Assert.AreEqual(sExpOp, _ModelView.OperationText, $"Test: {sButtons}.Op"); + Assert.AreEqual(asExpPC[0], _PropChanged, $"Test: {sButtons}.PropChanges"); + } + + [DataTestMethod] + [DataRow("",false,0,0,new string[] {"" })] + [DataRow("1", true, 3, 0, new string[] { "Akkumulator:0\r\nMemory:0\r\nOperationText:\r\n" })] + [DataRow("10", true, 3, 1, new string[] { "Akkumulator:1\r\nMemory:0\r\nOperationText:\r\n" })] + public void MainWindow_VM_BackButtonTest(string sButtons,bool xEnab, int iPCCount, int sAkk, string[] asExpPC) + { + foreach (var button in sButtons) + { + if (button >= '0' && button <= '9') + _ModelView.btnNumber.Execute($"{button}"); + } + ClearResults(); + Assert.AreEqual(xEnab,_ModelView.btnBackspace.CanExecute(null)); + if (xEnab) + _ModelView.btnBackspace.Execute(null); + Assert.AreEqual(iPCCount, _PropChangedCount); + Assert.AreEqual(sAkk, _ModelView.Akkumulator); + Assert.AreEqual(asExpPC[0], _PropChanged); + + } + } +} \ No newline at end of file diff --git a/CSharpBible/Calc/Calc64Base/Calc64.cs b/CSharpBible/Calc/Calc64Base/Calc64.cs index a71af78d0..c3d2fa3a3 100644 --- a/CSharpBible/Calc/Calc64Base/Calc64.cs +++ b/CSharpBible/Calc/Calc64Base/Calc64.cs @@ -45,17 +45,17 @@ public class Calc64 /// /// The calculate operations /// - private static Dictionary _calcOperations = new Dictionary(); + private static readonly Dictionary _calcOperations = new(); /// /// The calculate operations identifier /// - private static Dictionary _calcOperationsID = new Dictionary(); + private static readonly Dictionary _calcOperationsID = new(); #endregion /// - /// Gets the short desciptions. + /// Gets the short descriptions. /// - /// The short desciptions. - public Dictionary.KeyCollection ShortDesciptions => _calcOperations.Keys; + /// The short descriptions. + public Dictionary.KeyCollection ShortDescriptions => _calcOperations.Keys; /// /// Gets the i ds. /// @@ -70,34 +70,31 @@ public class Calc64 /// Gets or sets the accumulator. /// /// The accumulator. - public Int64 Accumulator { get=>_accumulator; set=> Property.SetProperty(ref _accumulator, value,PropChange); } + public Int64 Accumulator { get=>_accumulator; set=> value.SetProperty(ref _accumulator,PropChange); } /// /// Gets or sets the memory. /// /// The memory. - public Int64 Memory { get => _memory; set => Property.SetProperty(ref _memory, value, PropChange); } + public Int64 Memory { get => _memory; set => value.SetProperty(ref _memory, PropChange); } /// /// Gets or sets the register. /// /// The register. - public Int64 Register { get => _register; set => Property.SetProperty(ref _register, value, PropChange); } -#if NET5_0_OR_GREATER - public Exception? LastError { get; set; } -#else + public Int64 Register { get => _register; set => value.SetProperty(ref _register, PropChange); } /// /// Gets or sets the last error. /// /// The last error. - public Exception LastError { get; set; } -#endif + public Exception? LastError { get; set; } + /// /// Occurs when [calculate operation changed]. /// - public event EventHandler<(string prop,object oldVal,object newVal )> CalcOperationChanged; + public event EventHandler<(string prop,object? oldVal,object? newVal )>? CalcOperationChanged; /// /// Occurs when [calculate operation error]. /// - public event EventHandler CalcOperationError; + public event EventHandler? CalcOperationError; #endregion #region Methods @@ -116,8 +113,8 @@ static Calc64() { /// The calculate operation. public static void RegisterOperation(CalcOperation calcOperation) { - if (!_calcOperations.ContainsKey(calcOperation.ShortDescr)) - _calcOperations.Add(calcOperation.ShortDescr,calcOperation); + if (!_calcOperations.ContainsKey(calcOperation.ShortDesc)) + _calcOperations.Add(calcOperation.ShortDesc,calcOperation); if (_calcOperationsID.ContainsKey(calcOperation.ID)) calcOperation.SetID( _calcOperationsID.Keys.Max()+1); _calcOperationsID.Add(calcOperation.ID, calcOperation); @@ -128,54 +125,38 @@ public static void RegisterOperation(CalcOperation calcOperation) /// /// The co. /// true if [is register operation] [the specified co]; otherwise, false. - public static bool IsRegisterOperation( -#if NET5_0_OR_GREATER - CalcOperation? -#else - CalcOperation -#endif - co) => co?.NeedRegister ?? false; + public static bool IsRegisterOperation( CalcOperation? co) + => co?.NeedRegister ?? false; /// - /// Determines whether [is register opeation] [the specified short desc]. + /// Determines whether [is register operation] [the specified short description]. /// - /// The short desc. - /// true if [is register opeation] [the specified short desc]; otherwise, false. - public static bool IsRegisterOperation(string shortDesc) => IsRegisterOperation(ToCalcOperation(shortDesc)); + /// The short description. + /// true if [is register operation] [the specified short description]; otherwise, false. + public static bool IsRegisterOperation(string? shortDesc) + => IsRegisterOperation(ToCalcOperation(shortDesc)); /// - /// Determines whether [is register opeation] [the specified identifier]. + /// Determines whether [is register operation] [the specified identifier]. /// /// The identifier. - /// true if [is register opeation] [the specified identifier]; otherwise, false. + /// true if [is register operation] [the specified identifier]; otherwise, false. public static bool IsRegisterOperation(int id) => IsRegisterOperation(ToCalcOperation(id)); /// - /// Converts to calcoperation. + /// Converts to calcOperation. /// - /// The short desc. + /// The short description. /// CalcOperation. - public static -#if NET5_0_OR_GREATER - CalcOperation? -#else - CalcOperation -#endif - ToCalcOperation(string shortDesc) => - (shortDesc != null && _calcOperations.ContainsKey(shortDesc)) ? - _calcOperations[shortDesc] : null; + public static CalcOperation? ToCalcOperation(string? shortDesc) => + (shortDesc != null && _calcOperations.TryGetValue(shortDesc,out var co)) ? + co : null; /// - /// Converts to calcoperation. + /// Converts to calcOperation. /// /// The identifier. /// CalcOperation. - public static -#if NET5_0_OR_GREATER - CalcOperation? -#else - CalcOperation -#endif - ToCalcOperation(int id) => - _calcOperationsID.ContainsKey(id) ? _calcOperationsID[id] : null; + public static CalcOperation? ToCalcOperation(int id) => + _calcOperationsID.TryGetValue(id,out var co) ? co : null; /// /// Properties the change. @@ -191,17 +172,11 @@ protected void PropChange(string prop, T oldVal, T newVal) #endregion /// - /// Does the opeation. + /// Does the operation. /// /// The co. /// true if XXXX, false otherwise. - public bool DoOpeation( - #if NET5_0_OR_GREATER - CalcOperation? -#else - CalcOperation - #endif - co) + public bool DoOperation( CalcOperation? co) { if (co == null) return false; LastError = null; @@ -231,17 +206,17 @@ public bool DoOpeation( } /// - /// Does the opeation. + /// Does the operation. /// - /// The short desc. + /// The short description. /// true if XXXX, false otherwise. - public bool DoOpeation(string shortDesc) => DoOpeation(ToCalcOperation(shortDesc)); + public bool DoOperation(string shortDesc) => DoOperation(ToCalcOperation(shortDesc)); /// - /// Does the opeation. + /// Does the operation. /// /// The identifier. /// true if XXXX, false otherwise. - public bool DoOpeation(int id) => DoOpeation(ToCalcOperation(id)); + public bool DoOperation(int id) => DoOperation(ToCalcOperation(id)); #endregion } diff --git a/CSharpBible/Calc/Calc64Base/Calc64Base.csproj b/CSharpBible/Calc/Calc64Base/Calc64Base.csproj index 037ed5191..3379006f3 100644 --- a/CSharpBible/Calc/Calc64Base/Calc64Base.csproj +++ b/CSharpBible/Calc/Calc64Base/Calc64Base.csproj @@ -1,60 +1,28 @@ - - - - - Debug - AnyCPU - {5B519E7C-1335-439C-900E-BF0E5FAD92BC} - Library - Properties - $(MSBuildProjectName) - $(MSBuildProjectName) - ..\..\..\bin\$(MSBuildProjectName)\ - ..\..\..\obj\$(MSBuildProjectName)\ - ..\..\..\obj\$(MSBuildProjectName)\ - v4.8 - 512 - true - - - true - full - false - ..\..\..\bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\..\..\bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - {3A6D15DB-3EC0-4A8D-96CF-39A55D71C508} - BaseLib - - - + + + + Library + net4.6.2;net4.7.2;net4.8;net4.8.1 + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CSharpBible/Calc/Calc64Base/Calc64Base_net.csproj b/CSharpBible/Calc/Calc64Base/Calc64Base_net.csproj index e3080e8f3..963f0ccb0 100644 --- a/CSharpBible/Calc/Calc64Base/Calc64Base_net.csproj +++ b/CSharpBible/Calc/Calc64Base/Calc64Base_net.csproj @@ -1,32 +1,33 @@  - - net6.0 - enable - ..\..\..\bin\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - - - - - $(MSBuildProjectName.Replace(" ", "_").Replace("_net","")) - + + + Library + net6.0;net7.0;net8.0;net481;net48;net472;net462 + + + + + $(MSBuildProjectName.Replace(" ", "_").Replace("_net","")) + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CSharpBible/Calc/Calc64Base/Calc64Base_win.csproj b/CSharpBible/Calc/Calc64Base/Calc64Base_win.csproj new file mode 100644 index 000000000..4246b86de --- /dev/null +++ b/CSharpBible/Calc/Calc64Base/Calc64Base_win.csproj @@ -0,0 +1,32 @@ + + + + Library + net481-windows;net48-windows;net472-windows;net462-windows + + + + + $(MSBuildProjectName.Replace(" ", "_").Replace("_net","")) + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CSharpBible/Calc/Calc64Base/Calc64Model.cs b/CSharpBible/Calc/Calc64Base/Calc64Model.cs index 6a105af16..a136d8412 100644 --- a/CSharpBible/Calc/Calc64Base/Calc64Model.cs +++ b/CSharpBible/Calc/Calc64Base/Calc64Model.cs @@ -25,56 +25,14 @@ namespace Calc64Base /// Implements the /// /// - public class Calc64Model : Calc64 + public partial class Calc64Model : Calc64, ICalculator { - /// - /// Enum Exceptions - /// - public enum eOpMode - { - /// - /// No mode - /// - NoMode = 0, - /// - /// Calculate result - /// - CalcResult = 1, - Plus = 2, - Minus = 3, - Multiply = 4, - /// - /// The divide - /// - /// - Divide = 5, - /// - /// The none - /// - BinaryAnd = 6, - BinaryOr = 7, - BinaryXor = 8, - BinaryNot = 9, - /// - /// The e div by zero ex - /// - Power = 10, Negate=11, Modulo=12, - /// - /// The nand - /// - Nand = 13, Nor=14, XNor=15, BinaryEquals=16, - - /// - /// The memory retreive - /// - MemRetreive = 20, MemStore=21, MemAdd=22, MemSubtract=23, MemClear=24 - }; /// /// Gets or sets the operation mode. /// /// The operation mode. - public eOpMode OperationMode { get => _nMode; set => Property.SetProperty(ref _nMode, value, PropChange); } + public EOpMode OperationMode { get => _nMode; set => value.SetProperty(ref _nMode, PropChange); } /// /// The b edit mode @@ -83,7 +41,7 @@ public enum eOpMode /// /// The n mode /// - private eOpMode _nMode; + private EOpMode _nMode; /// /// Initializes a new instance of the class. @@ -94,12 +52,12 @@ public Calc64Model() } /// - /// Gets the short desc. + /// Gets the short description. /// /// The e. /// System.String. /// - public static string GetShortDesc(eOpMode e) => (e!=eOpMode.CalcResult)? Calc64.ToCalcOperation((int)e)?.ShortDescr ?? "":"="; + public static string GetShortDesc(EOpMode e) => (e!=EOpMode.CalcResult)? Calc64.ToCalcOperation((int)e)?.ShortDesc ?? "":"="; /// /// Buttons the specified a number. /// @@ -108,7 +66,7 @@ public Calc64Model() public void Button(int aNumber,int nBase=10) { if (!bEditMode) - (bEditMode, Accumulator) = (true, aNumber); + (bEditMode, Accumulator) = (true, Math.Min(aNumber,nBase-1)); else if (aNumber 0) { bEditMode = false; - if (OperationMode > eOpMode.CalcResult && ((eOpMode)v == eOpMode.CalcResult || IsRegisterOperation(v))) - DoOpeation((int)OperationMode); - if ((eOpMode)v == eOpMode.CalcResult) - (OperationMode, Register) = ((eOpMode)v, 0); + if (OperationMode > EOpMode.CalcResult && ((EOpMode)v == EOpMode.CalcResult || IsRegisterOperation(v))) + DoOperation((int)OperationMode); + if ((EOpMode)v == EOpMode.CalcResult) + (OperationMode, Register) = ((EOpMode)v, 0); else if (IsRegisterOperation(v)) - (OperationMode, Register) = ((eOpMode)v, Accumulator); - else DoOpeation(v); + (OperationMode, Register) = ((EOpMode)v, Accumulator); + else DoOperation(v); } if (v<0) switch(-v) @@ -137,7 +95,7 @@ public void Operation(int v) // clear editor case 1: Accumulator = 0; break; // Clear all - case 3: (Accumulator, Register, OperationMode) = (0, 0,eOpMode.NoMode); break; + case 3: (Accumulator, Register, OperationMode) = (0, 0,EOpMode.NoMode); break; default:break; } } diff --git a/CSharpBible/Calc/Calc64Base/CalcOperation.cs b/CSharpBible/Calc/Calc64Base/CalcOperation.cs index 542f403c4..f7a531363 100644 --- a/CSharpBible/Calc/Calc64Base/CalcOperation.cs +++ b/CSharpBible/Calc/Calc64Base/CalcOperation.cs @@ -69,7 +69,7 @@ public ClcOpSetting(bool a = false, bool r = false, bool m = false) /// /// The short description /// - private string _shortDescr; + private readonly string _shortDesc; /// /// The identifier /// @@ -81,7 +81,7 @@ public ClcOpSetting(bool a = false, bool r = false, bool m = false) /// /// The long description /// - private string _longDescr; + private readonly string _longDesc; /// /// The setting /// @@ -111,7 +111,7 @@ public ClcOpSetting(bool a = false, bool r = false, bool m = false) /// Gets the short description. /// /// The short description. - public string ShortDescr => _shortDescr; + public string ShortDesc => _shortDesc; /// /// Gets the identifier. /// @@ -122,20 +122,20 @@ public ClcOpSetting(bool a = false, bool r = false, bool m = false) /// Gets the long description. /// /// The long description. - public string LongDescr => _longDescr; + public string LongDesc => _longDesc; #endregion #region Methods /// /// Initializes a new instance of the class. /// - /// The short description. - /// The long description. + /// The short description. + /// The long description. /// The identifier. - protected CalcOperation(string shortDescr, string longDescr, int id = -1 ) + protected CalcOperation(string shortDesc, string longDesc, int id = -1 ) { - this._shortDescr = shortDescr; - this._longDescr = longDescr; + this._shortDesc = shortDesc; + this._longDesc = longDesc; if (id == -1) { ID = ++_lastID; @@ -165,7 +165,7 @@ protected CalcOperation(string shortDescr, string longDescr, int id = -1 ) /// Sets the identifier. /// /// The v. - internal void SetID(int v) => ID = v; + public void SetID(int v) => ID = v; #endregion } @@ -186,18 +186,18 @@ public class UnaryOperation : CalcOperation /// Gets or sets the function. /// /// The function. - public Func Function { get => _func; set=> Property.SetProperty(ref _func, value);} + public Func Function { get => _func; set=> value.SetProperty(ref _func);} #endregion #region Methods /// /// Initializes a new instance of the class. /// - /// The short description. + /// The short description. /// The identifier. - /// The long description. + /// The long description. /// The function. - public UnaryOperation(string shortDescr,int id, string longDescr, Func func) : base(shortDescr, longDescr, id) + public UnaryOperation(string shortDesc,int id, string longDesc, Func func) : base(shortDesc, longDesc, id) { NeedAccumulator = true; _func = func; @@ -206,10 +206,10 @@ public UnaryOperation(string shortDescr,int id, string longDescr, Func /// Initializes a new instance of the class. /// - /// The short description. - /// The long description. + /// The short description. + /// The long description. /// The function. - public UnaryOperation(string shortDescr, string longDescr, Func func) : this(shortDescr, -1, longDescr, func) { } + public UnaryOperation(string shortDesc, string longDesc, Func func) : this(shortDesc, -1, longDesc, func) { } /// /// Executes the specified o. @@ -245,16 +245,18 @@ public class BinaryOperation : CalcOperation /// Gets or sets the function. /// /// The function. - public Func Function { get => _func; set => Property.SetProperty(ref _func, value); } + public Func Function { get => _func; + // set => value.SetProperty(ref _func); + } /// /// Initializes a new instance of the class. /// - /// The short description. + /// The short description. /// The identifier. - /// The long description. + /// The long description. /// The function. - public BinaryOperation(string shortDescr,int id, string longDescr, Func func) : base(shortDescr, longDescr,id) + public BinaryOperation(string shortDesc,int id, string longDesc, Func func) : base(shortDesc, longDesc,id) { NeedRegister = true; NeedAccumulator = true; @@ -263,10 +265,10 @@ public BinaryOperation(string shortDescr,int id, string longDescr, Func /// Initializes a new instance of the class. /// - /// The short description. - /// The long description. + /// The short description. + /// The long description. /// The function. - public BinaryOperation(string shortDescr, string longDescr, Func func) : this(shortDescr, -1, longDescr, func) { } + public BinaryOperation(string shortDesc, string longDesc, Func func) : this(shortDesc, -1, longDesc, func) { } /// /// Executes the specified o. @@ -294,18 +296,18 @@ public class FromMemOperation : BinaryOperation /// /// Initializes a new instance of the class. /// - /// The short description. - /// The long description. + /// The short description. + /// The long description. /// The function. - public FromMemOperation(string shortDescr, string longDescr, Func func) : this(shortDescr, -1, longDescr, func) { } + public FromMemOperation(string shortDesc, string longDesc, Func func) : this(shortDesc, -1, longDesc, func) { } /// /// Initializes a new instance of the class. /// - /// The short description. + /// The short description. /// The identifier. - /// The long description. + /// The long description. /// The function. - public FromMemOperation(string shortDescr, int id, string longDescr, Func func) : base(shortDescr, id, longDescr, func) + public FromMemOperation(string shortDesc, int id, string longDesc, Func func) : base(shortDesc, id, longDesc, func) { NeedRegister = false; NeedMemory = true; @@ -322,18 +324,18 @@ public class ToMemOperation : BinaryOperation /// /// Initializes a new instance of the class. /// - /// The short description. - /// The long description. + /// The short description. + /// The long description. /// The function. - public ToMemOperation(string shortDescr, string longDescr, Func func) : this(shortDescr, -1, longDescr, func) { } + public ToMemOperation(string shortDesc, string longDesc, Func func) : this(shortDesc, -1, longDesc, func) { } /// /// Initializes a new instance of the class. /// - /// The short description. + /// The short description. /// The identifier. - /// The long description. + /// The long description. /// The function. - public ToMemOperation(string shortDescr, int id, string longDescr, Func func) : base(shortDescr, id, longDescr,func) + public ToMemOperation(string shortDesc, int id, string longDesc, Func func) : base(shortDesc, id, longDesc,func) { NeedRegister = false; NeedMemory = true; @@ -346,7 +348,7 @@ public ToMemOperation(string shortDescr, int id, string longDescr, Functrue if XXXX, false otherwise. public override bool Execute(ref object[] o) { - if (o.Length > 0 && o[0] is Int64 akk && o[1] is Int64 mem) + if (o.Length > 1 && o[0] is Int64 akk && o[1] is Int64 mem) { o[1] = _func?.Invoke(akk,mem) ?? mem; return true; diff --git a/CSharpBible/Calc/Calc64Base/EOpMode.cs b/CSharpBible/Calc/Calc64Base/EOpMode.cs new file mode 100644 index 000000000..3fc74f5b1 --- /dev/null +++ b/CSharpBible/Calc/Calc64Base/EOpMode.cs @@ -0,0 +1,58 @@ +// *********************************************************************** +// Assembly : Calc64Base +// Author : Mir +// Created : 08-28-2022 +// +// Last Modified By : Mir +// Last Modified On : 10-22-2022 +// *********************************************************************** +// +// Copyright © JC-Soft 2022 +// +// +// *********************************************************************** +/// +/// The Calc64Base namespace. +/// +/// +namespace Calc64Base; + +public enum EOpMode +{ + /// + /// No mode + /// + NoMode = 0, + /// + /// Calculate result + /// + CalcResult = 1, + Plus = 2, + Minus = 3, + Multiply = 4, + /// + /// The divide + /// + /// + Divide = 5, + /// + /// The none + /// + BinaryAnd = 6, + BinaryOr = 7, + BinaryXor = 8, + BinaryNot = 9, + /// + /// The e div by zero ex + /// + Power = 10, Negate = 11, Modulo = 12, + /// + /// The nand + /// + Nand = 13, Nor = 14, XNor = 15, BinaryEquals = 16, + + /// + /// The memory retrieve + /// + MemRetrieve = 20, MemStore = 21, MemAdd = 22, MemSubtract = 23, MemClear = 24 +}; diff --git a/CSharpBible/Calc/Calc64Base/ICalculator.cs b/CSharpBible/Calc/Calc64Base/ICalculator.cs new file mode 100644 index 000000000..e01c264fd --- /dev/null +++ b/CSharpBible/Calc/Calc64Base/ICalculator.cs @@ -0,0 +1,34 @@ +// *********************************************************************** +// Assembly : Calc64Base +// Author : Mir +// Created : 08-27-2022 +// +// Last Modified By : Mir +// Last Modified On : 10-22-2022 +// *********************************************************************** +// +// Copyright © JC-Soft 2022 +// +// +// *********************************************************************** +using System; + +namespace Calc64Base +{ + public interface ICalculator + { + long Accumulator { get; set; } + long Memory { get; set; } + Exception? LastError { get; set; } + + /// + /// Occurs when [calculate operation changed]. + /// + public event EventHandler<(string prop, object? oldVal, object? newVal)>? CalcOperationChanged; + /// + /// Occurs when [calculate operation error]. + /// + public event EventHandler? CalcOperationError; + + } +} \ No newline at end of file diff --git a/CSharpBible/Calc/Calc64BaseTests/BinaryOperationTests.cs b/CSharpBible/Calc/Calc64BaseTests/BinaryOperationTests.cs index 0cbd6e9ad..0ad00f4a2 100644 --- a/CSharpBible/Calc/Calc64BaseTests/BinaryOperationTests.cs +++ b/CSharpBible/Calc/Calc64BaseTests/BinaryOperationTests.cs @@ -12,12 +12,8 @@ // // *********************************************************************** using Microsoft.VisualStudio.TestTools.UnitTesting; -using Calc64Base; using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; /// /// The Tests namespace. @@ -32,6 +28,15 @@ namespace Calc64Base.Tests [TestClass()] public class BinaryOperationTests { + static IEnumerable ExecuteTestData => new[] { + new object[]{"Nix", new object[] { }, false, false, 0L, 0L }, + new object[]{"01 - 15", new object[] { 15L }, false, false, 15L, 0L }, + new object[]{"02 - 15,2", new object[] { 15L, "2" }, false, false, 15L, 2u }, + new object[]{"03 - 15,3", new object[] { "15", 3L }, false, false, 15u, 3L }, + new object[]{"04 - 15,3", new object[] { 15L, 3L }, true, true, 15L, 3L }, + new object[]{"15 - 15,3", new object[] { 15L, 3L }, false, true, 12L, 3L }, + }; + /// /// Defines the test method BinaryOperationTest. /// @@ -40,27 +45,33 @@ public class BinaryOperationTests public void BinaryOperationTest() { var bco = new BinaryOperation("?2", "Quest2", (a, r) => a ^ r); - Assert.AreEqual("?2",bco.ShortDescr); - Assert.AreEqual("Quest2", bco.LongDescr); + Assert.AreEqual("?2",bco.ShortDesc); + Assert.AreEqual("Quest2", bco.LongDesc); Assert.AreEqual(true, bco.NeedAccumulator); Assert.AreEqual(true, bco.NeedRegister); Assert.AreEqual(false, bco.NeedMemory); + Assert.IsNotNull(bco.Function); } /// /// Defines the test method ExecuteTest. /// /// - [TestMethod()] - public void ExecuteTest() + [DataTestMethod()] + [DynamicData(nameof(ExecuteTestData))] + public void ExecuteTest(string name, object[] oArgs, bool xNoFkt, bool xRes, long lExp1, long lExp2) { - var bco = new BinaryOperation("?", "Quest", (a,r) => a ^ r); - var arg = CalcOperation.CreateArguments(bco); - arg[0] = 5L; - arg[1] = 6L; - Assert.AreEqual(true, bco.Execute(ref arg)); - Assert.AreEqual(3L, arg[0]); - Assert.AreEqual(6L, arg[1]); + var bco = new BinaryOperation("?", "Quest", null!); + if (!xNoFkt) + bco = new BinaryOperation("?", "Quest", (a, r) => a ^ r); + if (oArgs.Length > 0 && oArgs[0] is int i) oArgs[0] = (long)i; + if (oArgs.Length > 1 && oArgs[1] is int i2) oArgs[1] = (long)i2; + Assert.AreEqual(xRes, bco.Execute(ref oArgs), name); + if (oArgs.Length > 0) + Assert.AreEqual(lExp1, Convert.ToInt64(oArgs[0])); + if (oArgs.Length > 1) + Assert.AreEqual(lExp2, Convert.ToInt64(oArgs[1])); } + } } \ No newline at end of file diff --git a/CSharpBible/Calc/Calc64BaseTests/Calc64BaseTests.csproj b/CSharpBible/Calc/Calc64BaseTests/Calc64BaseTests.csproj index 7f0cc6040..5ec6a67e5 100644 --- a/CSharpBible/Calc/Calc64BaseTests/Calc64BaseTests.csproj +++ b/CSharpBible/Calc/Calc64BaseTests/Calc64BaseTests.csproj @@ -1,119 +1,40 @@ - - - - - Debug - AnyCPU - {363ABE13-A78E-401F-BAB7-F0259FC7EF83} - Library - Properties - $(MSBuildProjectName) - $(MSBuildProjectName) - ..\..\..\bin\$(MSBuildProjectName)\ - ..\..\..\obj\$(MSBuildProjectName)\ - ..\..\..\obj\$(MSBuildProjectName)\ - v4.8 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - - - - - - true - - - true - full - false - ..\..\..\bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\..\..\bin\Release\ - TRACE - prompt - 4 - - - - ..\..\packages\MSTest.TestFramework.3.0.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - - - ..\..\packages\MSTest.TestFramework.3.0.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - - - - - - - - - - - - - - - - - - - - - - - - - {5B519E7C-1335-439C-900E-BF0E5FAD92BC} - Calc64Base - - - - - - - - - - False - - - False - - - False - - - False - - - - - - - - - Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}". - - - - - - - \ No newline at end of file + + + + net462;net472;net48;net481 + + + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + diff --git a/CSharpBible/Calc/Calc64BaseTests/Calc64Base_netTests.csproj b/CSharpBible/Calc/Calc64BaseTests/Calc64Base_netTests.csproj index a813d7a06..276ce9686 100644 --- a/CSharpBible/Calc/Calc64BaseTests/Calc64Base_netTests.csproj +++ b/CSharpBible/Calc/Calc64BaseTests/Calc64Base_netTests.csproj @@ -1,52 +1,39 @@ - - - - net6.0-windows - disable - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\bin\$(MSBuildProjectName) - false - enable - - - - True - - - - False - + + + + net6.0;net7.0;net8.0 + - - - + + + - + - - + + - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + - + - + diff --git a/CSharpBible/Calc/Calc64BaseTests/Calc64ModelTests.cs b/CSharpBible/Calc/Calc64BaseTests/Calc64ModelTests.cs new file mode 100644 index 000000000..900f67981 --- /dev/null +++ b/CSharpBible/Calc/Calc64BaseTests/Calc64ModelTests.cs @@ -0,0 +1,181 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; + +namespace Calc64Base.Tests +{ + [TestClass()] + public class Calc64ModelTests + { + Calc64Model testModel = null!; + private string DebugLog = ""; + + [TestInitialize] + public void Init() + { + testModel = new Calc64Model(); + testModel.CalcOperationChanged += OnCalcOpChg; + testModel.CalcOperationError += OnCalcOpErr; + DebugLog = ""; + } + + private void OnCalcOpErr(object? sender, Exception e) + { + throw new NotImplementedException(); + } + + private void OnCalcOpChg(object? sender, (string prop, object? oldVal, object? newVal) e) + { + DoLog($"COpChg({sender},{e.prop},{e.oldVal} => {e.newVal})"); + } + + private void DoLog(string v) + { + DebugLog+=$"{v}{Environment.NewLine}"; + } + + [TestMethod()] + public void Calc64ModelTest() + { + Assert.IsNotNull(testModel); + Assert.IsInstanceOfType(testModel,typeof(Calc64)); + Assert.IsInstanceOfType(testModel, typeof(Calc64Model)); + Assert.AreEqual(0L,testModel.Accumulator); + Assert.AreEqual(0L, testModel.Register); + Assert.AreEqual(0L, testModel.Memory); + Assert.AreEqual("", DebugLog); + } + + [TestMethod()] + [DataRow(Calc64Model.EOpMode.CalcResult)] + [DataRow(Calc64Model.EOpMode.MemRetrieve)] + [DataRow(Calc64Model.EOpMode.BinaryNot)] + [DataRow(Calc64Model.EOpMode.Power)] + public void OperationModeTest(Calc64Model.EOpMode eVal) + { + Assert.AreEqual(Calc64Model.EOpMode.NoMode, testModel.OperationMode); + testModel.OperationMode = eVal; + Assert.AreEqual(eVal, testModel.OperationMode); + Assert.AreEqual($"COpChg(Calc64Base.Calc64Model,OperationMode,NoMode => {eVal})\r\n", DebugLog); + } + + [TestMethod()] + [DataRow(Calc64Model.EOpMode.NoMode, "")] + [DataRow(Calc64Model.EOpMode.CalcResult,"=")] + [DataRow(Calc64Model.EOpMode.MemRetrieve,"MR")] + [DataRow(Calc64Model.EOpMode.BinaryNot,"~")] + [DataRow(Calc64Model.EOpMode.Power,"^")] + public void GetShortDescTest(Calc64Model.EOpMode eVal,string sExp) + { + Assert.AreEqual(sExp, Calc64Model.GetShortDesc(eVal)); + } + + [DataTestMethod()] + [DataRow(" 0",new int[] {0},null,0L,new string[] {"" })] + [DataRow(" 98", new int[] { 9,8 }, null, 98L, new string[] { @"COpChg(Calc64Base.Calc64Model,Accumulator,0 => 9) +COpChg(Calc64Base.Calc64Model,Accumulator,9 => 98) +" })] + [DataRow(" 123", new int[] { 1,2,3 }, null, 123L, new string[] { @"COpChg(Calc64Base.Calc64Model,Accumulator,0 => 1) +COpChg(Calc64Base.Calc64Model,Accumulator,1 => 12) +COpChg(Calc64Base.Calc64Model,Accumulator,12 => 123) +" })] + [DataRow("0", new int[] { 0 }, 16, 0L, new string[] { "" })] + [DataRow("0x98", new int[] { 9, 8 }, 16, 0x98L, new string[] { @"COpChg(Calc64Base.Calc64Model,Accumulator,0 => 9) +COpChg(Calc64Base.Calc64Model,Accumulator,9 => 152) +" })] + [DataRow("0x123", new int[] { 1, 2, 3 }, 16, 0x123L, new string[] { @"COpChg(Calc64Base.Calc64Model,Accumulator,0 => 1) +COpChg(Calc64Base.Calc64Model,Accumulator,1 => 18) +COpChg(Calc64Base.Calc64Model,Accumulator,18 => 291) +" })] + [DataRow("b0", new int[] { 0 }, 2, 0L, new string[] { "" })] + [DataRow("b10", new int[] { 1,0 }, 2, 2L, new string[] { @"COpChg(Calc64Base.Calc64Model,Accumulator,0 => 1) +COpChg(Calc64Base.Calc64Model,Accumulator,1 => 2) +" })] + [DataRow("b110010100101000", new int[] { 1,1,0,0,1,0,1,0,0,1,0,1,0,0 }, 2, 12948L, new string[] { @"COpChg(Calc64Base.Calc64Model,Accumulator,0 => 1) +COpChg(Calc64Base.Calc64Model,Accumulator,1 => 3) +COpChg(Calc64Base.Calc64Model,Accumulator,3 => 6) +COpChg(Calc64Base.Calc64Model,Accumulator,6 => 12) +COpChg(Calc64Base.Calc64Model,Accumulator,12 => 25) +COpChg(Calc64Base.Calc64Model,Accumulator,25 => 50) +COpChg(Calc64Base.Calc64Model,Accumulator,50 => 101) +COpChg(Calc64Base.Calc64Model,Accumulator,101 => 202) +COpChg(Calc64Base.Calc64Model,Accumulator,202 => 404) +COpChg(Calc64Base.Calc64Model,Accumulator,404 => 809) +COpChg(Calc64Base.Calc64Model,Accumulator,809 => 1618) +COpChg(Calc64Base.Calc64Model,Accumulator,1618 => 3237) +COpChg(Calc64Base.Calc64Model,Accumulator,3237 => 6474) +COpChg(Calc64Base.Calc64Model,Accumulator,6474 => 12948) +" })] + [DataRow("b12345", new int[] { 1, 2,3,4,5 }, 2, 1L, new string[] { "COpChg(Calc64Base.Calc64Model,Accumulator,0 => 1)\r\n" })] + public void ButtonTest(string name, int[] iVal,int? iBase,long lExp,string[] asExp) + { + foreach (int i in iVal) + { + if (iBase == null) + testModel.Button(i); + else + testModel.Button(i, iBase.Value); + } + Assert.AreEqual(lExp,testModel.Accumulator,name); + Assert.AreEqual(asExp[0],DebugLog); + } + + [DataTestMethod()] + [DataRow(1,0,new int[] { -1},0,0,0,new string[] { "COpChg(Calc64Base.Calc64Model,Accumulator,1 => 0)\r\n" })] + [DataRow(2, 1, new int[] { 2,1 }, 3, 0, 0, new string[] { @"COpChg(Calc64Base.Calc64Model,OperationMode,NoMode => Plus) +COpChg(Calc64Base.Calc64Model,Register,0 => 2) +COpChg(Calc64Base.Calc64Model,Accumulator,2 => 1) +COpChg(Calc64Base.Calc64Model,Accumulator,1 => 3) +COpChg(Calc64Base.Calc64Model,OperationMode,Plus => CalcResult) +COpChg(Calc64Base.Calc64Model,Register,2 => 0) +" })] + [DataRow(-2, 0, new int[] { 9 }, 1, 0, 0, new string[] { @"COpChg(Calc64Base.Calc64Model,Accumulator,-2 => 1) +" })] + [DataRow(4, 1, new int[] { 2, -3 }, 0, 0, 0, new string[] { @"COpChg(Calc64Base.Calc64Model,OperationMode,NoMode => Plus) +COpChg(Calc64Base.Calc64Model,Register,0 => 4) +COpChg(Calc64Base.Calc64Model,Accumulator,4 => 1) +COpChg(Calc64Base.Calc64Model,Accumulator,1 => 0) +COpChg(Calc64Base.Calc64Model,Register,4 => 0) +COpChg(Calc64Base.Calc64Model,OperationMode,Plus => NoMode) +" })] + [DataRow(5, 0, new int[] { -2 }, 5, 0, 0, new string[] { @"" })] + [DataRow(6, 1, new int[] { 3, 3 }, 5, 5, 0, new string[] { @"COpChg(Calc64Base.Calc64Model,OperationMode,NoMode => Minus) +COpChg(Calc64Base.Calc64Model,Register,0 => 6) +COpChg(Calc64Base.Calc64Model,Accumulator,6 => 1) +COpChg(Calc64Base.Calc64Model,Accumulator,1 => 5) +COpChg(Calc64Base.Calc64Model,Register,6 => 5) +" })] + [DataRow(7, 1, new int[] { 4, 9,1 }, -14, 0, 0, new string[] { @"COpChg(Calc64Base.Calc64Model,OperationMode,NoMode => Multiply) +COpChg(Calc64Base.Calc64Model,Register,0 => 7) +COpChg(Calc64Base.Calc64Model,Accumulator,7 => 1) +COpChg(Calc64Base.Calc64Model,Accumulator,1 => -2) +COpChg(Calc64Base.Calc64Model,Accumulator,-2 => -14) +COpChg(Calc64Base.Calc64Model,OperationMode,Multiply => CalcResult) +COpChg(Calc64Base.Calc64Model,Register,7 => 0) +" })] + public void OperationTest(long lVar1,long lVar2, int[] iOp,long lXAkk,long lXReg, long lXMem, string[] asExp) + { + testModel.Accumulator = lVar1; + bool xFirst = lVar2!=0; + DebugLog = ""; + foreach (int i in iOp) + { + testModel.Operation(i); + if (xFirst) testModel.Accumulator = lVar2; + xFirst = false; + } + Assert.AreEqual(lXAkk,testModel.Accumulator); + Assert.AreEqual(lXReg, testModel.Register); + Assert.AreEqual(lXMem, testModel.Memory); + Assert.AreEqual(asExp[0],DebugLog); + } + + [TestMethod()] + public void BackSpaceTest() + { + testModel.Accumulator = 12345L; + testModel.BackSpace(); + testModel.BackSpace(); + Assert.AreEqual(0L, testModel.Accumulator); + } + } +} \ No newline at end of file diff --git a/CSharpBible/Calc/Calc64BaseTests/Calc64Tests.cs b/CSharpBible/Calc/Calc64BaseTests/Calc64Tests.cs index a4e7f8c37..be7260b8b 100644 --- a/CSharpBible/Calc/Calc64BaseTests/Calc64Tests.cs +++ b/CSharpBible/Calc/Calc64BaseTests/Calc64Tests.cs @@ -12,12 +12,9 @@ // // *********************************************************************** using Microsoft.VisualStudio.TestTools.UnitTesting; -using Calc64Base; using System; -using System.Collections.Generic; +using System.Globalization; using System.Linq; -using System.Text; -using System.Threading.Tasks; /// /// The Tests namespace. @@ -42,7 +39,9 @@ public class Calc64Tests /// The test calc64 /// /// - private Calc64 testCalc64; + private Calc64 testCalc64 = null!; + + private string DebugOut=""; /// /// Initializes static members of the class. @@ -53,6 +52,20 @@ static Calc64Tests(){ testCO = new TestCalcOp(); Calc64.RegisterOperation(testCO); } + private void OnCalcOpChg(object? sender, (string prop, object? oldVal, object? newVal) e) + { + DoLog($"ChgCalcOp({sender},{e.prop},{e.oldVal} => {e.newVal})"); + } + + private void OnCalcOpErr(object? sender, Exception e) + { + DoLog($"Err({sender},{e.Message})"); + } + + private void DoLog(string v) + { + DebugOut += $"{v}{Environment.NewLine}"; + } /// /// Initializes this instance. @@ -62,6 +75,11 @@ static Calc64Tests(){ public void Init() { testCalc64 = new Calc64(); + testCalc64.CalcOperationChanged += OnCalcOpChg; + testCalc64.CalcOperationError += OnCalcOpErr; + DebugOut = ""; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; + CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture; } /// @@ -71,14 +89,39 @@ public void Init() [TestMethod()] public void RegisterOperationTest() { - Assert.IsTrue(testCalc64.ShortDesciptions.Contains("?")); + Assert.IsTrue(testCalc64.ShortDescriptions.Contains("?")); Assert.IsTrue(testCalc64.IDs.Contains(1)); Assert.IsTrue(testCalc64.Operations.Contains(testCO)); Assert.AreEqual(1, testCO.ID); + + } + + /// + /// Defines the test method RegisterOperationTest. + /// + /// + [TestMethod()] + public void RegisterOperation2Test() + { + var testCO2 = new TestCalcOp(); + Calc64.RegisterOperation(testCO2); + Assert.AreEqual(25, testCO2.ID); + } + + /// + /// Defines the test method RegisterOperationTest. + /// + /// + [TestMethod()] + public void NoPropChangeTest() + { + testCalc64.CalcOperationChanged-= OnCalcOpChg; + testCalc64.Accumulator += 1; + Assert.AreEqual("", DebugOut); } /// - /// Does the opeation test. + /// Does the operation test. /// /// The name. /// The i exp argument count. @@ -93,30 +136,28 @@ public void RegisterOperationTest() [DataRow("2-", 2, new long[] { 1, 2 }, new long[] { 5, 6 }, false)] [DataRow("3", 1, new long[] { 1 }, new long[] { 5 }, true)] [DataRow("3-", 1, new long[] { 1 }, new long[] { 5 }, false)] - public void DoOpeationTest(string Name, int iExpArgCount, long[] oInData, long[] oOutData, bool xExpResult) + public void DoOperationTest(string Name, int iExpArgCount, long[] oInData, long[] oOutData, bool xExpResult) { { - var co = new TestCalcOp(); - co.SetNeedAccumulator=true; - testCalc64.Accumulator = oInData[0]; - if (iExpArgCount > 1) + var co = new TestCalcOp { - co.SetNeedRegister = true; - testCalc64.Register = oInData[1]; - } - if (iExpArgCount > 2) { - co.SetNeedMemory=true; - testCalc64.Memory = oInData[2]; - } - co.oExpData = new object[iExpArgCount]; - co.oSetData = new object[iExpArgCount]; + SetNeedAccumulator = true, + SetNeedRegister = iExpArgCount > 1, + SetNeedMemory= iExpArgCount > 2, + oExpData = new object[iExpArgCount], + oSetData = new object[iExpArgCount], + iExpLength = iExpArgCount, + xSetResult = xExpResult + }; + + testCalc64.Accumulator = oInData[0]; + if (co.NeedRegister) testCalc64.Register = oInData[1]; + if (co.NeedMemory) testCalc64.Memory = oInData[2]; for (var i = 0; i < iExpArgCount; i++) { - co.oExpData[i]=oInData[i]; + co.oExpData[i] = oInData[i]; co.oSetData[i] = oOutData[i]; } - co.iExpLength = iExpArgCount; - co.xSetResult = xExpResult; - Assert.AreEqual(xExpResult, testCalc64.DoOpeation(co)); + Assert.AreEqual(xExpResult, testCalc64.DoOperation(co),Name); if (!xExpResult) oOutData = oInData; Assert.AreEqual((object)oOutData[0], testCalc64.Accumulator); if (iExpArgCount > 1) @@ -131,7 +172,7 @@ public void DoOpeationTest(string Name, int iExpArgCount, long[] oInData, long[] } /// - /// Does the opeation test1. + /// Does the operation test1. /// /// The name. /// The op. @@ -152,7 +193,7 @@ public void DoOpeationTest(string Name, int iExpArgCount, long[] oInData, long[] [DataRow("6*", "*", 2, new long[] { 7, 3 }, new long[] { 21, 3 }, true)] [DataRow("7/", "/", 2, new long[] { -7, 21 }, new long[] { -3, 21 }, true)] [DataRow("8^", "^", 2, new long[] { 3, 7 }, new long[] { 343, 7 }, true)] - public void DoOpeationTest1(string Name, string Op, int iExpArgCount, long[] oInData, long[] oOutData, bool xExpResult) + public void DoOperationTest1(string Name, string Op, int iExpArgCount, long[] oInData, long[] oOutData, bool xExpResult) { var co = testCO; co.SetNeedAccumulator = true; @@ -174,7 +215,7 @@ public void DoOpeationTest1(string Name, string Op, int iExpArgCount, long[] oIn } co.iExpLength = iExpArgCount; co.xSetResult = xExpResult; - Assert.AreEqual(xExpResult, testCalc64.DoOpeation(Op)); + Assert.AreEqual(xExpResult, testCalc64.DoOperation(Op), Name); Assert.AreEqual(null, testCalc64.LastError); if (!xExpResult) oOutData = oInData; Assert.AreEqual((object)oOutData[0], testCalc64.Accumulator); @@ -189,7 +230,7 @@ public void DoOpeationTest1(string Name, string Op, int iExpArgCount, long[] oIn } /// - /// Does the opeation test1. + /// Does the operation test1. /// /// The name. /// The op. @@ -213,10 +254,10 @@ public void DoOpeationTest1(string Name, string Op, int iExpArgCount, long[] oIn [DataRow("9-6", 6, 2, new long[] { 3, 14 }, new long[] { 2, 14 }, true)] [DataRow("10-7", 7, 2, new long[] { 3, 14 }, new long[] { 15, 14 }, true)] [DataRow("11-8", 8, 2, new long[] { 3, 14 }, new long[] { 13, 14 }, true)] - [DataRow("12-13", 13, 2, new long[] { 3, 14 }, new long[] { 343, 14 }, true)] - [DataRow("13-14", 14, 2, new long[] { 3, 14 }, new long[] { 343, 14 }, true)] - [DataRow("14-15", 15, 2, new long[] { 3, 14 }, new long[] { 343, 14 }, true)] - public void DoOpeationTest1(string Name, int Op, int iExpArgCount, long[] oInData, long[] oOutData, bool xExpResult) + [DataRow("12-13", 13, 2, new long[] { 3, 14 }, new long[] { 12, 14 }, true)] + [DataRow("13-14", 14, 2, new long[] { 3, 14 }, new long[] { -2, 14 }, true)] + [DataRow("14-15", 15, 2, new long[] { 3, 14 }, new long[] { -14, 14 }, true)] + public void DoOperationTest2(string Name, int Op, int iExpArgCount, long[] oInData, long[] oOutData, bool xExpResult) { var co = testCO; co.SetNeedAccumulator = true; @@ -238,7 +279,7 @@ public void DoOpeationTest1(string Name, int Op, int iExpArgCount, long[] oInDat } co.iExpLength = iExpArgCount; co.xSetResult = xExpResult; - Assert.AreEqual(xExpResult, testCalc64.DoOpeation(Op)); + Assert.AreEqual(xExpResult, testCalc64.DoOperation(Op), Name); Assert.AreEqual(null, testCalc64.LastError); if (!xExpResult) oOutData = oInData; Assert.AreEqual((object)oOutData[0], testCalc64.Accumulator); @@ -252,9 +293,37 @@ public void DoOpeationTest1(string Name, int Op, int iExpArgCount, long[] oInDat Assert.AreEqual(0, testCalc64.Memory); } + [TestMethod] + public void DoOperationNIOTest() + { + testCalc64.Register = 5L; + testCalc64.Accumulator = 0L; + DebugOut = ""; + testCalc64.DoOperation(5); + Assert.AreEqual("Err(Calc64Base.Calc64,Attempted to divide by zero.)\r\n", DebugOut); + } + + [TestMethod] + public void DoOperationNIO2Test() + { + testCalc64.Register = 5L; + testCalc64.Accumulator = 0L; + testCalc64.CalcOperationError -= OnCalcOpErr; + DebugOut = ""; + testCalc64.DoOperation(5); + Assert.AreEqual("", DebugOut); + } + + [TestMethod] + public void DoOperationNIO3Test() + { + DebugOut = ""; + Assert.IsFalse(testCalc64.DoOperation((CalcOperation?)null)); + Assert.AreEqual("", DebugOut); + } /// - /// Determines whether [is register opeation test] [the specified name]. + /// Determines whether [is register operation test] [the specified name]. /// /// The name. /// The i op. @@ -264,14 +333,18 @@ public void DoOpeationTest1(string Name, int Op, int iExpArgCount, long[] oInDat [DataTestMethod()] [DataRow("1+", 1, "?", true)] [DataRow("1-", 1, "?", false)] - public void IsRegisterOpeationTest(string Name, int iOp, string sOp, bool xExpResult) + [DataRow("0-", 0, "?", false)] + public void IsRegisterOperationTest(string Name, int iOp, string _, bool xExpResult) { testCO.SetNeedRegister = xExpResult; - Assert.AreEqual(xExpResult, Calc64.IsRegisterOperation(testCO)); + if (iOp==1) + Assert.AreEqual(xExpResult, Calc64.IsRegisterOperation(testCO), Name); + else + Assert.AreEqual(xExpResult, Calc64.IsRegisterOperation((CalcOperation?)null),Name); } /// - /// Determines whether [is register opeation test1] [the specified name]. + /// Determines whether [is register operation test1] [the specified name]. /// /// The name. /// The i op. @@ -296,14 +369,14 @@ public void IsRegisterOpeationTest(string Name, int iOp, string sOp, bool xExpRe [DataRow("14", 14, "|~", true)] [DataRow("15", 15, "x~", true)] [DataRow("16", 16, "==", true)] - public void IsRegisterOpeationTest1(string Name, int iOp, string sOp, bool xExpResult) + public void IsRegisterOperationTest1(string Name, int _, string sOp, bool xExpResult) { testCO.SetNeedRegister = xExpResult; - Assert.AreEqual(xExpResult, Calc64.IsRegisterOperation(sOp)); + Assert.AreEqual(xExpResult, Calc64.IsRegisterOperation(sOp),Name); } /// - /// Determines whether [is register opeation test2] [the specified name]. + /// Determines whether [is register operation test2] [the specified name]. /// /// The name. /// The i op. @@ -328,14 +401,14 @@ public void IsRegisterOpeationTest1(string Name, int iOp, string sOp, bool xExpR [DataRow("14", 14, "|~", true)] [DataRow("15", 15, "x~", true)] [DataRow("16", 16, "==", true)] - public void IsRegisterOpeationTest2(string Name, int iOp, string sOp,bool xExpResult) + public void IsRegisterOperationTest2(string Name, int iOp, string _,bool xExpResult) { testCO.SetNeedRegister = xExpResult; - Assert.AreEqual(xExpResult, Calc64.IsRegisterOperation(iOp)); + Assert.AreEqual(xExpResult, Calc64.IsRegisterOperation(iOp), Name); } /// - /// Converts to calcoperationtest. + /// tests the conversion to calc-operation. /// /// The name. /// The i op. @@ -358,12 +431,19 @@ public void IsRegisterOpeationTest2(string Name, int iOp, string sOp,bool xExpRe [DataRow("14", 14, "|~")] [DataRow("15", 15, "x~")] [DataRow("16", 16, "==")] - public void ToCalcOperationTest(string Name, int iOp, string sOp) + [DataRow("16", 0, "")] + [DataRow("16", 0, null)] + public void ToCalcOperationTest(string Name, int iOp, string? sOp) { - CalcOperation co; - Assert.IsNotNull(co = Calc64.ToCalcOperation(sOp)); - Assert.AreEqual(sOp, co.ShortDescr); - Assert.AreEqual(iOp, co.ID); + CalcOperation? co; + if (iOp != 0) + { + Assert.IsNotNull(co = Calc64.ToCalcOperation(sOp),Name); + Assert.AreEqual(sOp, co.ShortDesc); + } + else + Assert.IsNull(co = Calc64.ToCalcOperation(sOp), Name); + Assert.AreEqual(iOp, co?.ID ?? 0, $"{Name}.ID"); } /// @@ -392,9 +472,9 @@ public void ToCalcOperationTest(string Name, int iOp, string sOp) [DataRow("16", 16, "==")] public void ToCalcOperationTest1(string Name, int iOp, string sOp) { - CalcOperation co; - Assert.IsNotNull(co=Calc64.ToCalcOperation(iOp)); - Assert.AreEqual(sOp, co.ShortDescr); + CalcOperation? co; + Assert.IsNotNull(co=Calc64.ToCalcOperation(iOp), Name); + Assert.AreEqual(sOp, co.ShortDesc); Assert.AreEqual(iOp, co.ID); } } diff --git a/CSharpBible/Calc/Calc64BaseTests/CalcOperationTests.cs b/CSharpBible/Calc/Calc64BaseTests/CalcOperationTests.cs index 18bd83e5d..100b62a1e 100644 --- a/CSharpBible/Calc/Calc64BaseTests/CalcOperationTests.cs +++ b/CSharpBible/Calc/Calc64BaseTests/CalcOperationTests.cs @@ -12,12 +12,6 @@ // // *********************************************************************** using Microsoft.VisualStudio.TestTools.UnitTesting; -using Calc64Base; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; /// /// The Tests namespace. @@ -42,8 +36,8 @@ public void CalcOpDefautTest() { var co = new TestCalcOp(); Assert.IsNotNull(co); - Assert.AreEqual("?", co.ShortDescr); - Assert.AreEqual("SomeQuest", co.LongDescr); + Assert.AreEqual("?", co.ShortDesc); + Assert.AreEqual("SomeQuest", co.LongDesc); Assert.AreEqual(false, co.NeedAccumulator); Assert.AreEqual(false, co.NeedRegister); Assert.AreEqual(false, co.NeedMemory); @@ -59,16 +53,16 @@ public void CalcOpDefautTest() /// if set to true [x exp result]. /// [DataTestMethod()] - [DataRow("1",3, new object[] { 1, 2, 3 },new object[] { 4, 5, 6 },true)] + [DataRow("1", 3, new object[] { 1, 2, 3 }, new object[] { 4, 5, 6 }, true)] [DataRow("2", 2, new object[] { 1, 2 }, new object[] { 5, 6 }, false)] - public void ExecuteTest(string Name,int iExpArgCount, object[] oInData, object[] oOutData,bool xExpResult) + public void ExecuteTest(string Name, int iExpArgCount, object[] oInData, object[] oOutData, bool xExpResult) { var co = new TestCalcOp(); co.oExpData = oInData; co.oSetData = oOutData; co.iExpLength = iExpArgCount; co.xSetResult = xExpResult; - var arg=oInData; + var arg = oInData; Assert.AreEqual(xExpResult, co.Execute(ref arg)); Assert.AreEqual(iExpArgCount, arg.Length); for (var i = 0; i < arg.Length; i++) @@ -83,21 +77,43 @@ public void ExecuteTest(string Name,int iExpArgCount, object[] oInData, object[] public void CreateArgumentsTest() { var co = new TestCalcOp(); - for (int i = 0;i<8;i++) + for (int i = 0; i < 8; i++) { co.SetNeedAccumulator = ((i & 1) != 0); co.SetNeedRegister = (i & 2) != 0; co.SetNeedMemory = (i & 4) != 0; var arg = CalcOperation.CreateArguments(co); - + var argCount = 2; if (i == 0) argCount = 0; else if (i == 7) argCount = 3; - else if (i == 1 || i == 2 || i == 4) argCount = 1; + else if (i == 1 || i == 2 || i == 4) argCount = 1; Assert.AreEqual(argCount, arg.Length); Assert.IsInstanceOfType(arg, typeof(object)); } } + + [TestMethod] + public void ClcOpSettingTest2() + { + for (int i = 0; i < 8; i++) + { + var s = new CalcOperation.ClcOpSetting((i & 1) != 0, (i & 2) != 0, (i & 4) != 0); + Assert.AreEqual((i & 1) != 0, s.NeedAccumulator); + Assert.AreEqual((i & 2) != 0, s.NeedRegister); + Assert.AreEqual((i & 4) != 0, s.NeedMemory); + } + } + + [TestMethod] + public void SetIDTest() + { + var co = new TestCalcOp(); + Assert.AreEqual(1, co.ID); + co.SetID(-1); + Assert.AreEqual(-1, co.ID); + } + } } \ No newline at end of file diff --git a/CSharpBible/Calc/Calc64BaseTests/FromMemOperationTests.cs b/CSharpBible/Calc/Calc64BaseTests/FromMemOperationTests.cs index 720a14b9f..69c8eb72b 100644 --- a/CSharpBible/Calc/Calc64BaseTests/FromMemOperationTests.cs +++ b/CSharpBible/Calc/Calc64BaseTests/FromMemOperationTests.cs @@ -12,12 +12,6 @@ // // *********************************************************************** using Microsoft.VisualStudio.TestTools.UnitTesting; -using Calc64Base; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; /// /// The Tests namespace. @@ -40,8 +34,8 @@ public class FromMemOperationTests public void FromMemOperationTest() { var fmco = new FromMemOperation("?3", "Quest3", (a, m) => a << (int)(m%64)); - Assert.AreEqual("?3", fmco.ShortDescr); - Assert.AreEqual("Quest3", fmco.LongDescr); + Assert.AreEqual("?3", fmco.ShortDesc); + Assert.AreEqual("Quest3", fmco.LongDesc); Assert.AreEqual(true, fmco.NeedAccumulator); Assert.AreEqual(false, fmco.NeedRegister); Assert.AreEqual(true, fmco.NeedMemory); diff --git a/CSharpBible/Calc/Calc64BaseTests/StandardOperationsTests.cs b/CSharpBible/Calc/Calc64BaseTests/StandardOperationsTests.cs index e12ac76f8..98932d3c2 100644 --- a/CSharpBible/Calc/Calc64BaseTests/StandardOperationsTests.cs +++ b/CSharpBible/Calc/Calc64BaseTests/StandardOperationsTests.cs @@ -12,12 +12,8 @@ // // *********************************************************************** using Microsoft.VisualStudio.TestTools.UnitTesting; -using Calc64Base; using System; -using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; /// /// The Tests namespace. @@ -133,9 +129,44 @@ private enum Exceptions [DataRow("x~", "3", new Int64[] { 1L, -1L }, true, new Int64[] { 1L, -1L })] [DataRow("x~", "4", new Int64[] { 1000000000000L, -999999999999L }, true, new Int64[] { 8190L, -999999999999L })] [DataRow("x~", "5", new Int64[] { Int64.MaxValue, 1L }, true, new Int64[] { Int64.MinValue + 1, 1L })] - public void GetAllTest1(string sOp,string s, Int64[] argL,bool xResult, Int64[] erg, object e = null) + [DataRow("%", "1", new Int64[] { 0, 0 }, true, new Int64[] { 0L, 0L }, (object)Exceptions.eDivByZeroEx)] + [DataRow("%", "2", new Int64[] { 1L, 1L }, true, new Int64[] { 0L, 1L })] + [DataRow("%", "3", new Int64[] { 1L, -1L }, true, new Int64[] { 0L, -1L })] + [DataRow("%", "4", new Int64[] { 1000000000000L, -999999999999L }, true, new Int64[] { -999999999999L, -999999999999L })] + [DataRow("%", "5", new Int64[] { Int64.MaxValue, 1L }, true, new Int64[] { 1, 1L })] + [DataRow("==", "1", new Int64[] { 0, 0 }, true, new Int64[] { -1L, 0L })] + [DataRow("==", "2", new Int64[] { 1L, 1L }, true, new Int64[] { -1L, 1L })] + [DataRow("==", "3", new Int64[] { 1L, -1L }, true, new Int64[] { 1L, -1L })] + [DataRow("==", "4", new Int64[] { 1000000000000L, -999999999999L }, true, new Int64[] { 8190L, -999999999999L })] + [DataRow("==", "5", new Int64[] { Int64.MaxValue, 1L }, true, new Int64[] { Int64.MinValue + 1, 1L })] + [DataRow("MR", "1", new Int64[] { 0, 0 }, true, new Int64[] { 0L, 0L })] + [DataRow("MR", "2", new Int64[] { 1L, 1L }, true, new Int64[] { 1L, 1L })] + [DataRow("MR", "3", new Int64[] { 1L, -1L }, true, new Int64[] { -1L, -1L })] + [DataRow("MR", "4", new Int64[] { 1000000000000L, -999999999999L }, true, new Int64[] { -999999999999L, -999999999999L })] + [DataRow("MR", "5", new Int64[] { Int64.MaxValue, 1L }, true, new Int64[] { 1L, 1L })] + [DataRow("MS", "1", new Int64[] { 0, 0 }, true, new Int64[] { 0L, 0L })] + [DataRow("MS", "2", new Int64[] { 1L, 1L }, true, new Int64[] { 1L, 1L })] + [DataRow("MS", "3", new Int64[] { 1L, -1L }, true, new Int64[] { 1L, 1L })] + [DataRow("MS", "4", new Int64[] { 1000000000000L, -999999999999L }, true, new Int64[] { 1000000000000L, 1000000000000L })] + [DataRow("MS", "5", new Int64[] { Int64.MaxValue, 1L }, true, new Int64[] { Int64.MaxValue, Int64.MaxValue })] + [DataRow("M+", "1", new Int64[] { 0, 0 }, true, new Int64[] { 0L, 0L })] + [DataRow("M+", "2", new Int64[] { 1L, 1L }, true, new Int64[] { 1L, 2L })] + [DataRow("M+", "3", new Int64[] { 1L, -1L }, true, new Int64[] { 1L, 0L })] + [DataRow("M+", "4", new Int64[] { 1000000000000L, -999999999999L }, true, new Int64[] { 1000000000000L, 1L })] + [DataRow("M+", "5", new Int64[] { Int64.MaxValue, 1L }, true, new Int64[] { Int64.MaxValue, Int64.MinValue })] + [DataRow("M-", "1", new Int64[] { 0, 0 }, true, new Int64[] { 0L, 0L })] + [DataRow("M-", "2", new Int64[] { 1L, 1L }, true, new Int64[] { 1L, 0L })] + [DataRow("M-", "3", new Int64[] { 1L, -1L }, true, new Int64[] { 1L, -2L })] + [DataRow("M-", "4", new Int64[] { 1000000000000L, -999999999999L }, true, new Int64[] { 1000000000000L, -1999999999999L })] + [DataRow("M-", "5", new Int64[] { Int64.MaxValue, 1L }, true, new Int64[] { Int64.MaxValue, Int64.MinValue + 2 })] + [DataRow("MC", "1", new Int64[] { 0, 0 }, true, new Int64[] { 0L, 0L })] + [DataRow("MC", "2", new Int64[] { 1L, 1L }, true, new Int64[] { 1L, 0L })] + [DataRow("MC", "3", new Int64[] { 1L, -1L }, true, new Int64[] { 1L, 0L })] + [DataRow("MC", "4", new Int64[] { 1000000000000L, -999999999999L }, true, new Int64[] { 1000000000000L, 0L })] + [DataRow("MC", "5", new Int64[] { Int64.MaxValue, 1L }, true, new Int64[] { Int64.MaxValue, 0L })] + public void GetAllTest1(string sOp,string _, Int64[] argL,bool xResult, Int64[] erg, object? e = null) { - var co = StandardOperations.GetAll().First((o)=>o.ShortDescr==sOp); + var co = StandardOperations.GetAll().First((o)=>o.ShortDesc==sOp); Assert.IsNotNull(co); var arg = new object[argL.Length]; for (int i = 0; i < arg.Length; i++) diff --git a/CSharpBible/Calc/Calc64BaseTests/TestCalcOp.cs b/CSharpBible/Calc/Calc64BaseTests/TestCalcOp.cs index 457db8f34..9d9a5ecc6 100644 --- a/CSharpBible/Calc/Calc64BaseTests/TestCalcOp.cs +++ b/CSharpBible/Calc/Calc64BaseTests/TestCalcOp.cs @@ -34,23 +34,19 @@ public class TestCalcOp : CalcOperation /// The length of the i exp. /// public int iExpLength { get; set; } -#if NET5_0_OR_GREATER - public object[]? oExpData { get; set; } - public object[]? oSetData { get; set; } -#else + /// /// Gets or sets the o exp data. /// /// The o exp data. /// - public object[] oExpData { get; set; } + public object[]? oExpData { get; set; } /// /// Gets or sets the o set data. /// /// The o set data. /// - public object[] oSetData { get; set; } -#endif + public object[]? oSetData { get; set; } /// /// Gets or sets a value indicating whether [x set result]. /// diff --git a/CSharpBible/Calc/Calc64BaseTests/ToMemOperationTests.cs b/CSharpBible/Calc/Calc64BaseTests/ToMemOperationTests.cs index 9f329ced7..f44dc4f32 100644 --- a/CSharpBible/Calc/Calc64BaseTests/ToMemOperationTests.cs +++ b/CSharpBible/Calc/Calc64BaseTests/ToMemOperationTests.cs @@ -12,12 +12,8 @@ // // *********************************************************************** using Microsoft.VisualStudio.TestTools.UnitTesting; -using Calc64Base; using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; /// /// The Tests namespace. @@ -40,27 +36,38 @@ public class ToMemOperationTests public void ToMemOperationTest() { var tmco = new ToMemOperation("?4", "Quest4", (a, m) => a ^ m); - Assert.AreEqual("?4", tmco.ShortDescr); - Assert.AreEqual("Quest4", tmco.LongDescr); + Assert.AreEqual("?4", tmco.ShortDesc); + Assert.AreEqual("Quest4", tmco.LongDesc); Assert.AreEqual(true, tmco.NeedAccumulator); Assert.AreEqual(false, tmco.NeedRegister); Assert.AreEqual(true, tmco.NeedMemory); } - + static IEnumerable ExecuteTestData => new[] { + new object[]{"Nix", new object[] { }, false, false, 0L, 0L }, + new object[]{"01 - 15", new object[] { 15L }, false, false, 15L, 0L }, + new object[]{"02 - 15,2", new object[] { 15L, "2" }, false, false, 15L, 2u }, + new object[]{"03 - 15,3", new object[] { "15", 3L }, false, false, 15u, 3L }, + new object[]{"04 - 15,3", new object[] { 15L, 3L }, true, true, 15L, 3L }, + new object[]{"15 - 15,3", new object[] { 15L, 3L }, false, true, 15L, 11L }, + }; /// /// Defines the test method ExecuteTest. /// /// - [TestMethod()] - public void ExecuteTest() + [DataTestMethod()] + [DynamicData(nameof(ExecuteTestData))] + public void ExecuteTest(string name, object[] oArgs, bool xNoFkt,bool xRes,long lExp1,long lExp2) { - var tmco = new ToMemOperation("?4", "Quest4", (a, m) => (a ^ m) - 1); - var arg = CalcOperation.CreateArguments(tmco); - arg[0] = 3L; - arg[1] = 15L; - Assert.AreEqual(true, tmco.Execute(ref arg)); - Assert.AreEqual(3L, arg[0]); - Assert.AreEqual(11L, arg[1]); + var tmco = new ToMemOperation("?4n", "Quest4Null",null!); + if (!xNoFkt) + tmco = new ToMemOperation("?4", "Quest4",(a, m) => (a ^ m) - 1); + if (oArgs.Length > 0 && oArgs[0] is int i) oArgs[0] = (long)i; + if (oArgs.Length > 1 && oArgs[1] is int i2) oArgs[1] = (long)i2; + Assert.AreEqual(xRes, tmco.Execute(ref oArgs),name); + if (oArgs.Length>0) + Assert.AreEqual(lExp1, Convert.ToInt64(oArgs[0]) ); + if (oArgs.Length > 1) + Assert.AreEqual(lExp2, Convert.ToInt64(oArgs[1])); } } } \ No newline at end of file diff --git a/CSharpBible/Calc/Calc64BaseTests/UnaryOperationTests.cs b/CSharpBible/Calc/Calc64BaseTests/UnaryOperationTests.cs index 84bb328e1..6a1cd3434 100644 --- a/CSharpBible/Calc/Calc64BaseTests/UnaryOperationTests.cs +++ b/CSharpBible/Calc/Calc64BaseTests/UnaryOperationTests.cs @@ -12,12 +12,8 @@ // // *********************************************************************** using Microsoft.VisualStudio.TestTools.UnitTesting; -using Calc64Base; using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; /// /// The Tests namespace. @@ -41,26 +37,41 @@ public class UnaryOperationTests public void UnaryOperationTest() { var uco= new UnaryOperation("?1", "Quest1", (a) => a * 2); - Assert.AreEqual("?1", uco.ShortDescr); - Assert.AreEqual("Quest1", uco.LongDescr); + Assert.AreEqual("?1", uco.ShortDesc); + Assert.AreEqual("Quest1", uco.LongDesc); Assert.AreEqual(true, uco.NeedAccumulator); Assert.AreEqual(false, uco.NeedRegister); Assert.AreEqual(false, uco.NeedMemory); - + Assert.IsNotNull(uco.Function); } + static IEnumerable ExecuteTestData => new[] { + new object[]{"Nix", new object[] { }, false, false, 0L, 0L }, + new object[]{"01 - 15", new object[] { 15L }, false, true, 30L, 0L }, + // new object[]{"02 - 15,2", new object[] { 15L, "2" }, false, false, 15L, 2u }, + new object[]{"03 - 15", new object[] { "15" }, false, false, 15u, 3L }, + new object[]{"04 - 15", new object[] { 15L }, true, true, 15L, 3L }, + new object[]{"15 - 15", new object[] { 15L }, false, true, 30L, 11L }, + }; /// /// Defines the test method ExecuteTest. /// /// - [TestMethod()] - public void ExecuteTest() + [DataTestMethod()] + [DynamicData(nameof(ExecuteTestData))] + public void ExecuteTest(string name, object[] oArgs, bool xNoFkt, bool xRes, long lExp1, long _) { - var uco = new UnaryOperation("?", "Quest", (a) => a * 2); - var arg = CalcOperation.CreateArguments(uco); - arg[0] = 5L; - Assert.AreEqual(true,uco.Execute(ref arg)); - Assert.AreEqual(10L,arg[0]); + var tmco = new UnaryOperation("?1n", "Quest1Null", null!); + if (!xNoFkt) + tmco = new UnaryOperation("?", "Quest", (a) => a * 2); + if (oArgs.Length > 0 && oArgs[0] is int i) oArgs[0] = (long)i; +// if (oArgs.Length > 0 && oArgs[1] is int i) oArgs[1] = (long)i; + Assert.AreEqual(xRes, tmco.Execute(ref oArgs), name); + if (oArgs.Length > 0) + Assert.AreEqual(lExp1, Convert.ToInt64(oArgs[0])); + // if (oArgs.Length > 1) + // Assert.AreEqual(lExp2, Convert.ToInt64(oArgs[1])); } + } } \ No newline at end of file diff --git a/CSharpBible/Calc/Calc64WF/Calc64WF.csproj b/CSharpBible/Calc/Calc64WF/Calc64WF.csproj index 7009e2608..429ffd9cf 100644 --- a/CSharpBible/Calc/Calc64WF/Calc64WF.csproj +++ b/CSharpBible/Calc/Calc64WF/Calc64WF.csproj @@ -1,125 +1,57 @@ - - - - Debug - AnyCPU - {E774D7FD-AAC7-45DF-B839-82C48E8DD18F} - WinExe - Calc64WF - Calc64WF - ..\..\..\bin\$(MSBuildProjectName)\ - ..\..\..\obj\$(MSBuildProjectName)\ - ..\..\..\obj\$(MSBuildProjectName)\ - v4.8;v4.7.2;v4.6.1 - 512 - true - true - - v4.8 - - - - AnyCPU - true - full - false - ..\..\..\bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - AnyCPU - pdbonly - true - ..\..\..\bin\Release\ - TRACE - prompt - 4 - false - - - Resources\Calc_32.ico - - - - - - - - - - - - - - - - - - - - - Form - - - FrmCalc64Main.cs - - - PublicResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - FrmCalc64Main.cs - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - - - - - - - - - - - - - - - - - - - {ABC8A3FB-12D1-40ED-AA6C-DBFF48B7A080} - MVVM_BaseLib - - - {40A6110B-F1A0-4476-B64F-D629313D9FA1} - WFSystem.Windows.Data - - - {5B519E7C-1335-439C-900E-BF0E5FAD92BC} - Calc64Base - - - + + + + WinExe + net462-windows;net472-windows;net48-windows;net481-windows + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + PublicSettingsSingleFileGenerator + Settings.Designer.cs + + \ No newline at end of file diff --git a/CSharpBible/Calc/Calc64WF/Calc64WF_net.csproj b/CSharpBible/Calc/Calc64WF/Calc64WF_net.csproj index 909163def..325b1dfaa 100644 --- a/CSharpBible/Calc/Calc64WF/Calc64WF_net.csproj +++ b/CSharpBible/Calc/Calc64WF/Calc64WF_net.csproj @@ -1,60 +1,57 @@  + - WinExe - net6.0-windows - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\bin\$(MSBuildProjectName) - true + WinExe + net481-windows;net48-windows;net472-windows;net462-windows;net6.0-windows;net7.0-windows;net8.0-windows + true - - enable - disable - $(MSBuildProjectName.Replace(" ", "_").Replace("_net","")) - - - + + + + + - + - - + + + - - - - + + + + - - True - True - Resources.resx - - - True - True - Settings.settings - + + True + True + Resources.resx + + + True + True + Settings.settings + - - ResXFileCodeGenerator - Resources.Designer.cs - + + ResXFileCodeGenerator + Resources.Designer.cs + - - SettingsSingleFileGenerator - Settings.Designer.cs - + + SettingsSingleFileGenerator + Settings.Designer.cs + \ No newline at end of file diff --git a/CSharpBible/Calc/Calc64WF/Properties/Resources.Designer.cs b/CSharpBible/Calc/Calc64WF/Properties/Resources.Designer.cs index 045036a7c..5a68186a0 100644 --- a/CSharpBible/Calc/Calc64WF/Properties/Resources.Designer.cs +++ b/CSharpBible/Calc/Calc64WF/Properties/Resources.Designer.cs @@ -22,7 +22,7 @@ namespace Calc64WF.Properties { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - public class Resources { + internal class Resources { private static global::System.Resources.ResourceManager resourceMan; @@ -36,7 +36,7 @@ internal Resources() { /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Resources.ResourceManager ResourceManager { + internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Calc64WF.Properties.Resources", typeof(Resources).Assembly); @@ -51,7 +51,7 @@ internal Resources() { /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Globalization.CultureInfo Culture { + internal static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } @@ -63,7 +63,7 @@ internal Resources() { /// /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol). /// - public static System.Drawing.Icon Calc_32 { + internal static System.Drawing.Icon Calc_32 { get { object obj = ResourceManager.GetObject("Calc_32", resourceCulture); return ((System.Drawing.Icon)(obj)); @@ -73,7 +73,7 @@ public static System.Drawing.Icon Calc_32 { /// /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. /// - public static System.Drawing.Bitmap calculator_64 { + internal static System.Drawing.Bitmap calculator_64 { get { object obj = ResourceManager.GetObject("calculator_64", resourceCulture); return ((System.Drawing.Bitmap)(obj)); @@ -83,7 +83,7 @@ public static System.Drawing.Bitmap calculator_64 { /// /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. /// - public static System.Drawing.Bitmap Exit { + internal static System.Drawing.Bitmap Exit { get { object obj = ResourceManager.GetObject("Exit", resourceCulture); return ((System.Drawing.Bitmap)(obj)); @@ -93,7 +93,7 @@ public static System.Drawing.Bitmap Exit { /// /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. /// - public static System.Drawing.Bitmap Glow_White { + internal static System.Drawing.Bitmap Glow_White { get { object obj = ResourceManager.GetObject("Glow_White", resourceCulture); return ((System.Drawing.Bitmap)(obj)); @@ -103,7 +103,7 @@ public static System.Drawing.Bitmap Glow_White { /// /// Sucht eine lokalisierte Zeichenfolge, die /\ ähnelt. /// - public static string OPMode_BinaryAnd { + internal static string OPMode_BinaryAnd { get { return ResourceManager.GetString("OPMode_BinaryAnd", resourceCulture); } @@ -112,7 +112,7 @@ public static string OPMode_BinaryAnd { /// /// Sucht eine lokalisierte Zeichenfolge, die == ähnelt. /// - public static string OPMode_BinaryEquals { + internal static string OPMode_BinaryEquals { get { return ResourceManager.GetString("OPMode_BinaryEquals", resourceCulture); } @@ -121,7 +121,7 @@ public static string OPMode_BinaryEquals { /// /// Sucht eine lokalisierte Zeichenfolge, die ! ähnelt. /// - public static string OPMode_BinaryNot { + internal static string OPMode_BinaryNot { get { return ResourceManager.GetString("OPMode_BinaryNot", resourceCulture); } @@ -130,7 +130,7 @@ public static string OPMode_BinaryNot { /// /// Sucht eine lokalisierte Zeichenfolge, die \/ ähnelt. /// - public static string OPMode_BinaryOr { + internal static string OPMode_BinaryOr { get { return ResourceManager.GetString("OPMode_BinaryOr", resourceCulture); } @@ -139,7 +139,7 @@ public static string OPMode_BinaryOr { /// /// Sucht eine lokalisierte Zeichenfolge, die X ähnelt. /// - public static string OPMode_BinaryXor { + internal static string OPMode_BinaryXor { get { return ResourceManager.GetString("OPMode_BinaryXor", resourceCulture); } @@ -148,7 +148,7 @@ public static string OPMode_BinaryXor { /// /// Sucht eine lokalisierte Zeichenfolge, die = ähnelt. /// - public static string OPMode_CalcResult { + internal static string OPMode_CalcResult { get { return ResourceManager.GetString("OPMode_CalcResult", resourceCulture); } @@ -157,7 +157,7 @@ public static string OPMode_CalcResult { /// /// Sucht eine lokalisierte Zeichenfolge, die / ähnelt. /// - public static string OPMode_Divide { + internal static string OPMode_Divide { get { return ResourceManager.GetString("OPMode_Divide", resourceCulture); } @@ -166,7 +166,7 @@ public static string OPMode_Divide { /// /// Sucht eine lokalisierte Zeichenfolge, die M+ ähnelt. /// - public static string OPMode_MemAdd { + internal static string OPMode_MemAdd { get { return ResourceManager.GetString("OPMode_MemAdd", resourceCulture); } @@ -175,7 +175,7 @@ public static string OPMode_MemAdd { /// /// Sucht eine lokalisierte Zeichenfolge, die MC ähnelt. /// - public static string OPMode_MemClear { + internal static string OPMode_MemClear { get { return ResourceManager.GetString("OPMode_MemClear", resourceCulture); } @@ -184,7 +184,7 @@ public static string OPMode_MemClear { /// /// Sucht eine lokalisierte Zeichenfolge, die MR ähnelt. /// - public static string OPMode_MemRetreive { + internal static string OPMode_MemRetreive { get { return ResourceManager.GetString("OPMode_MemRetreive", resourceCulture); } @@ -193,7 +193,7 @@ public static string OPMode_MemRetreive { /// /// Sucht eine lokalisierte Zeichenfolge, die MS ähnelt. /// - public static string OPMode_MemStore { + internal static string OPMode_MemStore { get { return ResourceManager.GetString("OPMode_MemStore", resourceCulture); } @@ -202,7 +202,7 @@ public static string OPMode_MemStore { /// /// Sucht eine lokalisierte Zeichenfolge, die M- ähnelt. /// - public static string OPMode_MemSubtract { + internal static string OPMode_MemSubtract { get { return ResourceManager.GetString("OPMode_MemSubtract", resourceCulture); } @@ -211,7 +211,7 @@ public static string OPMode_MemSubtract { /// /// Sucht eine lokalisierte Zeichenfolge, die - ähnelt. /// - public static string OPMode_Minus { + internal static string OPMode_Minus { get { return ResourceManager.GetString("OPMode_Minus", resourceCulture); } @@ -220,7 +220,7 @@ public static string OPMode_Minus { /// /// Sucht eine lokalisierte Zeichenfolge, die Mod ähnelt. /// - public static string OPMode_Modulo { + internal static string OPMode_Modulo { get { return ResourceManager.GetString("OPMode_Modulo", resourceCulture); } @@ -229,7 +229,7 @@ public static string OPMode_Modulo { /// /// Sucht eine lokalisierte Zeichenfolge, die * ähnelt. /// - public static string OPMode_Multiply { + internal static string OPMode_Multiply { get { return ResourceManager.GetString("OPMode_Multiply", resourceCulture); } @@ -238,7 +238,7 @@ public static string OPMode_Multiply { /// /// Sucht eine lokalisierte Zeichenfolge, die !/\ ähnelt. /// - public static string OPMode_Nand { + internal static string OPMode_Nand { get { return ResourceManager.GetString("OPMode_Nand", resourceCulture); } @@ -247,7 +247,7 @@ public static string OPMode_Nand { /// /// Sucht eine lokalisierte Zeichenfolge, die +/- ähnelt. /// - public static string OPMode_Negate { + internal static string OPMode_Negate { get { return ResourceManager.GetString("OPMode_Negate", resourceCulture); } @@ -256,7 +256,7 @@ public static string OPMode_Negate { /// /// Sucht eine lokalisierte Zeichenfolge, die ähnelt. /// - public static string OPMode_NoMode { + internal static string OPMode_NoMode { get { return ResourceManager.GetString("OPMode_NoMode", resourceCulture); } @@ -265,7 +265,7 @@ public static string OPMode_NoMode { /// /// Sucht eine lokalisierte Zeichenfolge, die !/\ ähnelt. /// - public static string OPMode_Nor { + internal static string OPMode_Nor { get { return ResourceManager.GetString("OPMode_Nor", resourceCulture); } @@ -274,7 +274,7 @@ public static string OPMode_Nor { /// /// Sucht eine lokalisierte Zeichenfolge, die + ähnelt. /// - public static string OPMode_Plus { + internal static string OPMode_Plus { get { return ResourceManager.GetString("OPMode_Plus", resourceCulture); } @@ -283,7 +283,7 @@ public static string OPMode_Plus { /// /// Sucht eine lokalisierte Zeichenfolge, die ^ ähnelt. /// - public static string OPMode_Power { + internal static string OPMode_Power { get { return ResourceManager.GetString("OPMode_Power", resourceCulture); } @@ -292,7 +292,7 @@ public static string OPMode_Power { /// /// Sucht eine lokalisierte Zeichenfolge, die !X ähnelt. /// - public static string OPMode_XNor { + internal static string OPMode_XNor { get { return ResourceManager.GetString("OPMode_XNor", resourceCulture); } diff --git a/CSharpBible/Calc/Calc64WF/Properties/Settings.Designer.cs b/CSharpBible/Calc/Calc64WF/Properties/Settings.Designer.cs index dda465d76..7a9cd1880 100644 --- a/CSharpBible/Calc/Calc64WF/Properties/Settings.Designer.cs +++ b/CSharpBible/Calc/Calc64WF/Properties/Settings.Designer.cs @@ -12,8 +12,8 @@ namespace Calc64WF.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.3.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0")] + public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/CSharpBible/Calc/Calc64WF/ViewModel/FrmCalc64MainViewModel.cs b/CSharpBible/Calc/Calc64WF/ViewModels/FrmCalc64MainViewModel.cs similarity index 93% rename from CSharpBible/Calc/Calc64WF/ViewModel/FrmCalc64MainViewModel.cs rename to CSharpBible/Calc/Calc64WF/ViewModels/FrmCalc64MainViewModel.cs index b05e94670..8821fa2b0 100644 --- a/CSharpBible/Calc/Calc64WF/ViewModel/FrmCalc64MainViewModel.cs +++ b/CSharpBible/Calc/Calc64WF/ViewModels/FrmCalc64MainViewModel.cs @@ -1,179 +1,179 @@ -// *********************************************************************** -// Assembly : Calc64WF -// Author : Mir -// Created : 08-28-2022 -// -// Last Modified By : Mir -// Last Modified On : 08-31-2022 -// *********************************************************************** -// -// Copyright © JC-Soft 2020 -// -// -// *********************************************************************** -using Calc64Base; -using MVVM.ViewModel; -using System; -using System.Windows.Forms; - -namespace Calc64WF.ViewModel -{ - /// - /// Class FrmCalc64MainViewModel. - /// Implements the - /// - /// - public class FrmCalc64MainViewModel :BaseViewModel - { - #region Properties - #region private properties - /// - /// The calc64model - /// - private Calc64Model _calc64model = new Calc64Model(); - #endregion - - /// - /// Occurs when [on data changed]. - /// - public event EventHandler<(string prop, object oldVal, object newVal)> OnDataChanged; - /// - /// Occurs when [close form]. - /// - public event EventHandler CloseForm; - /// - /// Occurs when [press number key]. - /// - public event EventHandler PressNumberKey; - - /// Gets or sets the accumulator. - /// The accumulator. - /// - public long Akkumulator { get => _calc64model.Accumulator; set => _calc64model.Accumulator = value; } - - /// Gets or sets the memory. - /// The accumulator. - /// - public long Memory { get => _calc64model.Memory; set => _calc64model.Memory = value; } - - /// Gets or sets the register. - /// The accumulator. - /// - public long Register { get => _calc64model.Register; private set => _calc64model.Register = value; } - - /// Gets the operation text. - /// The accumulator. - /// - public string OperationText { get => Calc64Model.GetShortDesc(_calc64model.OperationMode); } - #endregion - #region Methods - /// - /// Initializes a new instance of the class. - /// - public FrmCalc64MainViewModel() - { - _calc64model.CalcOperationChanged += (s, e) => { OnDataChanged?.Invoke(s, e); RaisePropertyChanged(e.prop); }; - CommandCanExecuteBinding.Add((nameof(_calc64model.Accumulator), nameof(Akkumulator))); - CommandCanExecuteBinding.Add((nameof(_calc64model.OperationMode), nameof(OperationText))); - } - - /// - /// BTNs the close click. - /// - /// The sender. - /// The tag. - /// The instance containing the event data. - public void btnClose_Click(object sender, object tag, EventArgs e) - { - CloseForm?.Invoke(this,e); - } - - /// - /// BTNs the nummber click. - /// - /// The sender. - /// The tag. - /// The instance containing the event data. - public void btnNummber_Click(object sender,object tag, EventArgs e) - { - if (int.TryParse(tag.ToString(), out int aNumber)) - { - _calc64model.Button(aNumber); - } - } - - /// - /// BTNs the operator click. - /// - /// The sender. - /// The tag. - /// The instance containing the event data. - public void btnOperator_Click(object sender, object tag, EventArgs e) - { - if (int.TryParse(tag.ToString(), out int aNumber)) - { - _calc64model.Operation(-aNumber); - } - } - - /// - /// FRMs the key down. - /// - /// The sender. - /// The tag. - /// The instance containing the event data. - public void frm_KeyDown(object sender, object tag, KeyEventArgs e) - { - Char ActKey = (char)0; - if ((char)e.KeyValue >= "0"[0] && (char)e.KeyValue <= "9"[0]) - { - ActKey = (char)e.KeyValue; - } - else if ((char)e.KeyValue >= 96 && (char)e.KeyValue <= 105) - { - ActKey = (char)(e.KeyValue - 96 + (int)("0"[0])); - } - - switch (e.KeyCode) - { - case Keys.Oemplus: - case Keys.Add: - btnOperator_Click(sender,"-2",e); - break; - case Keys.OemMinus: - case Keys.Subtract: - btnOperator_Click(sender, "-3", e); - break; - case Keys.Divide: - //case Keys.Add: - btnOperator_Click(sender, "-5", e); - break; - case Keys.Multiply: - //case Keys.: - btnOperator_Click(sender, "-4", e); - break; - case Keys.Escape: - break; - case Keys.Back: - btnBack_Click(sender, "", e); - break; - default: - if (ActKey != (char)0) - PressNumberKey?.Invoke(sender, ActKey); - break; - } - } - - /// - /// BTNs the back click. - /// - /// The sender. - /// The tag. - /// The instance containing the event data. - public void btnBack_Click(object sender, object tag, EventArgs e) - { - _calc64model.BackSpace(); - } - #endregion - } -} +// *********************************************************************** +// Assembly : Calc64WF +// Author : Mir +// Created : 08-28-2022 +// +// Last Modified By : Mir +// Last Modified On : 08-31-2022 +// *********************************************************************** +// +// Copyright © JC-Soft 2020 +// +// +// *********************************************************************** +using Calc64Base; +using MVVM.ViewModel; +using System; +using System.Windows.Forms; + +namespace Calc64WF.ViewModel +{ + /// + /// Class FrmCalc64MainViewModel. + /// Implements the + /// + /// + public class FrmCalc64MainViewModel :BaseViewModel + { + #region Properties + #region private properties + /// + /// The calc64model + /// + private Calc64Model _calc64model = new Calc64Model(); + #endregion + + /// + /// Occurs when [on data changed]. + /// + public event EventHandler<(string prop, object? oldVal, object? newVal)> OnDataChanged; + /// + /// Occurs when [close form]. + /// + public event EventHandler CloseForm; + /// + /// Occurs when [press number key]. + /// + public event EventHandler PressNumberKey; + + /// Gets or sets the accumulator. + /// The accumulator. + /// + public long Akkumulator { get => _calc64model.Accumulator; set => _calc64model.Accumulator = value; } + + /// Gets or sets the memory. + /// The accumulator. + /// + public long Memory { get => _calc64model.Memory; set => _calc64model.Memory = value; } + + /// Gets or sets the register. + /// The accumulator. + /// + public long Register { get => _calc64model.Register; private set => _calc64model.Register = value; } + + /// Gets the operation text. + /// The accumulator. + /// + public string OperationText { get => Calc64Model.GetShortDesc(_calc64model.OperationMode); } + #endregion + #region Methods + /// + /// Initializes a new instance of the class. + /// + public FrmCalc64MainViewModel() + { + _calc64model.CalcOperationChanged += (s, e) => { OnDataChanged?.Invoke(s, e); RaisePropertyChanged(e.prop); }; + AddPropertyDependency(nameof(Akkumulator), nameof(_calc64model.Accumulator)); + AddPropertyDependency(nameof(OperationText), nameof(_calc64model.OperationMode)); + } + + /// + /// BTNs the close click. + /// + /// The sender. + /// The tag. + /// The instance containing the event data. + public void btnClose_Click(object sender, object tag, EventArgs e) + { + CloseForm?.Invoke(this,e); + } + + /// + /// BTNs the nummber click. + /// + /// The sender. + /// The tag. + /// The instance containing the event data. + public void btnNummber_Click(object sender,object tag, EventArgs e) + { + if (int.TryParse(tag.ToString(), out int aNumber)) + { + _calc64model.Button(aNumber); + } + } + + /// + /// BTNs the operator click. + /// + /// The sender. + /// The tag. + /// The instance containing the event data. + public void btnOperator_Click(object sender, object tag, EventArgs e) + { + if (int.TryParse(tag.ToString(), out int aNumber)) + { + _calc64model.Operation(-aNumber); + } + } + + /// + /// FRMs the key down. + /// + /// The sender. + /// The tag. + /// The instance containing the event data. + public void frm_KeyDown(object sender, object tag, KeyEventArgs e) + { + Char ActKey = (char)0; + if ((char)e.KeyValue >= "0"[0] && (char)e.KeyValue <= "9"[0]) + { + ActKey = (char)e.KeyValue; + } + else if ((char)e.KeyValue >= 96 && (char)e.KeyValue <= 105) + { + ActKey = (char)(e.KeyValue - 96 + (int)("0"[0])); + } + + switch (e.KeyCode) + { + case Keys.Oemplus: + case Keys.Add: + btnOperator_Click(sender,"-2",e); + break; + case Keys.OemMinus: + case Keys.Subtract: + btnOperator_Click(sender, "-3", e); + break; + case Keys.Divide: + //case Keys.Add: + btnOperator_Click(sender, "-5", e); + break; + case Keys.Multiply: + //case Keys.: + btnOperator_Click(sender, "-4", e); + break; + case Keys.Escape: + break; + case Keys.Back: + btnBack_Click(sender, "", e); + break; + default: + if (ActKey != (char)0) + PressNumberKey?.Invoke(sender, ActKey); + break; + } + } + + /// + /// BTNs the back click. + /// + /// The sender. + /// The tag. + /// The instance containing the event data. + public void btnBack_Click(object sender, object tag, EventArgs e) + { + _calc64model.BackSpace(); + } + #endregion + } +} diff --git a/CSharpBible/Calc/Calc64WF/Visual/Converter/OperationModeToShortString.cs b/CSharpBible/Calc/Calc64WF/Visual/Converter/OperationModeToShortString.cs index efd73d3e9..76241f153 100644 --- a/CSharpBible/Calc/Calc64WF/Visual/Converter/OperationModeToShortString.cs +++ b/CSharpBible/Calc/Calc64WF/Visual/Converter/OperationModeToShortString.cs @@ -33,15 +33,12 @@ public class OperationModeToShortString : IValueConverter /// The parameter. /// The culture. /// System.Object. - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) => value switch { - switch (value) - { - case Calc64Model.eOpMode opMode when targetType == typeof(string): - return Properties.Resources.ResourceManager.GetString($"OPMode_{opMode}", Properties.Resources.Culture); - default: return ""; - } - } + Calc64Model.EOpMode opMode when targetType == typeof(string) + => Properties.Resources.ResourceManager.GetString($"OPMode_{opMode}", Properties.Resources.Culture) ?? "", + _ => "", + }; /// /// Converts the back. diff --git a/CSharpBible/Calc/Calc64WF/Visual/FrmCalc64Main.cs b/CSharpBible/Calc/Calc64WF/Visual/FrmCalc64Main.cs index b0dffff40..4be52d21b 100644 --- a/CSharpBible/Calc/Calc64WF/Visual/FrmCalc64Main.cs +++ b/CSharpBible/Calc/Calc64WF/Visual/FrmCalc64Main.cs @@ -15,8 +15,6 @@ using System.Drawing; using System.Drawing.Drawing2D; using System.Globalization; -using System.Security.Cryptography.X509Certificates; -using System.Threading; using System.Windows.Forms; using Calc64Base; using Calc64WF.ViewModel; @@ -85,9 +83,14 @@ public partial class FrmCalc64Main : Form /// Gets the data context. /// /// The data context. - public NotificationObject DataContext { get; private set; } + public +#if NET7_0_OR_GREATER + + new +#endif + NotificationObject DataContext { get; private set; } #endregion -#region Methods + #region Methods /// /// Initializes a new instance of the class. /// @@ -198,7 +201,7 @@ private void FrmCalc32Main_MouseMove(object sender, MouseEventArgs e) /// The source of the event. /// The instance containing the event data. private void btnNummber_Click(object sender, EventArgs e) - => (DataContext as FrmCalc64MainViewModel).btnNummber_Click(sender, ((Control)sender).Tag, e); + => (DataContext as FrmCalc64MainViewModel)?.btnNummber_Click(sender, ((Control)sender)?.Tag, e); /// /// Handles the KeyDown event of the FrmCalc32Main control. @@ -206,7 +209,7 @@ private void btnNummber_Click(object sender, EventArgs e) /// The source of the event. /// The instance containing the event data. private void FrmCalc32Main_KeyDown(object sender, KeyEventArgs e) - => (DataContext as FrmCalc64MainViewModel).frm_KeyDown(sender, ((Control)sender).Tag, e); + => (DataContext as FrmCalc64MainViewModel)?.frm_KeyDown(sender, ((Control)sender)?.Tag, e); /// /// Handles the Click event of the btnOperator control. @@ -214,7 +217,7 @@ private void FrmCalc32Main_KeyDown(object sender, KeyEventArgs e) /// The source of the event. /// The instance containing the event data. private void btnOperator_Click(object sender, EventArgs e) - => (DataContext as FrmCalc64MainViewModel).btnOperator_Click(sender, ((Control)sender).Tag, e); + => (DataContext as FrmCalc64MainViewModel)?.btnOperator_Click(sender, ((Control)sender)?.Tag, e); /// /// Handles the Click event of the btnClose control. @@ -222,7 +225,7 @@ private void btnOperator_Click(object sender, EventArgs e) /// The source of the event. /// The instance containing the event data. private void btnClose_Click(object sender, EventArgs e) - => (DataContext as FrmCalc64MainViewModel).btnClose_Click(sender, ((Control)sender).Tag, e); + => (DataContext as FrmCalc64MainViewModel)?.btnClose_Click(sender, ((Control)sender)?.Tag, e); /// /// Handles the Click event of the btnBack control. @@ -230,7 +233,7 @@ private void btnClose_Click(object sender, EventArgs e) /// The source of the event. /// The instance containing the event data. private void btnBack_Click(object sender, EventArgs e) - => (DataContext as FrmCalc64MainViewModel).btnBack_Click(sender, ((Control)sender).Tag, e); + => (DataContext as FrmCalc64MainViewModel)?.btnBack_Click(sender, ((Control)sender)?.Tag, e); #endregion /// @@ -244,11 +247,7 @@ private void pnlMaster_SizeChanged(object sender, EventArgs e) SetMasterRegion(); } -#if NET6_0_OR_GREATER private void SetMasterRegionWhenIdle(object? sender, EventArgs e) -#else - private void SetMasterRegionWhenIdle(object sender, EventArgs e) -#endif { Application.Idle -= SetMasterRegionWhenIdle; SetMasterRegion(); diff --git a/CSharpBible/Calc/Calc64WFTests/Calc64WFTests.csproj b/CSharpBible/Calc/Calc64WFTests/Calc64WFTests.csproj index 29a7797cb..18c4365c3 100644 --- a/CSharpBible/Calc/Calc64WFTests/Calc64WFTests.csproj +++ b/CSharpBible/Calc/Calc64WFTests/Calc64WFTests.csproj @@ -1,121 +1,40 @@ - - - - - Debug - AnyCPU - {5532F188-437D-423B-B883-1ECF3BFAF7C1} - Library - Properties - Calc64WFTests - Calc64WFTests - ..\..\..\bin\$(MSBuildProjectName)\ - ..\..\..\obj\$(MSBuildProjectName)\ - ..\..\..\obj\$(MSBuildProjectName)\ - v4.8;v4.7.2;v4.6.1 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - - - - v4.8 - - - true - full - false - ..\..\..\bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - ..\..\..\bin\Release\ - TRACE - prompt - 4 - false - - - - ..\..\packages\MSTest.TestFramework.3.0.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - - - ..\..\packages\MSTest.TestFramework.3.0.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - - - - - - - - - - - - - - - - - - - {ABC8A3FB-12D1-40ED-AA6C-DBFF48B7A080} - MVVM_BaseLib - - - {5B519E7C-1335-439C-900E-BF0E5FAD92BC} - Calc64Base - - - {E774D7FD-AAC7-45DF-B839-82C48E8DD18F} - Calc64WF - - - - - - - - - - False - - - False - - - False - - - False - - - - - - - - - Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}". - - - - - - + + + + Library + UnitTest + {5532F188-437D-423B-B883-1ECF3BFAF7C1} + Properties + Calc64WF + Calc64WFTests + net481-windows;net48-windows;net472-windows;net462-windows + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + true + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CSharpBible/Calc/Calc64WFTests/Calc64WF_netTests.csproj b/CSharpBible/Calc/Calc64WFTests/Calc64WF_netTests.csproj index 9cec3ea0b..308428648 100644 --- a/CSharpBible/Calc/Calc64WFTests/Calc64WF_netTests.csproj +++ b/CSharpBible/Calc/Calc64WFTests/Calc64WF_netTests.csproj @@ -1,10 +1,7 @@  - - net6.0-windows - disable - ..\..\..\bin\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - enable + + + net6.0-windows;net7.0-windows;net8.0-windows true false @@ -22,10 +19,10 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/CSharpBible/Calc/Calc64WFTests/Properties/AssemblyInfo.cs b/CSharpBible/Calc/Calc64WFTests/Properties/AssemblyInfo.cs index a8f2b3b44..91d6f3506 100644 --- a/CSharpBible/Calc/Calc64WFTests/Properties/AssemblyInfo.cs +++ b/CSharpBible/Calc/Calc64WFTests/Properties/AssemblyInfo.cs @@ -39,7 +39,7 @@ // // Hauptversion // Nebenversion -// Buildnummer +// BuildNummer // Revision // // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, diff --git a/CSharpBible/Calc/Calc64WFTests/Properties/SettingsTests.cs b/CSharpBible/Calc/Calc64WFTests/Properties/SettingsTests.cs new file mode 100644 index 000000000..12fb42292 --- /dev/null +++ b/CSharpBible/Calc/Calc64WFTests/Properties/SettingsTests.cs @@ -0,0 +1,14 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Calc64WF.Properties.Tests +{ + [TestClass] + public class SettingsTests + { + [TestMethod] + public void SettingsTest() + { + Assert.IsNotNull(Settings.Default); + } + } +} diff --git a/CSharpBible/Calc/Calc64WFTests/ViewModel/FrmCalc64MainViewModelTests.cs b/CSharpBible/Calc/Calc64WFTests/ViewModels/FrmCalc64MainViewModelTests.cs similarity index 77% rename from CSharpBible/Calc/Calc64WFTests/ViewModel/FrmCalc64MainViewModelTests.cs rename to CSharpBible/Calc/Calc64WFTests/ViewModels/FrmCalc64MainViewModelTests.cs index 856e822cd..b757f5e94 100644 --- a/CSharpBible/Calc/Calc64WFTests/ViewModel/FrmCalc64MainViewModelTests.cs +++ b/CSharpBible/Calc/Calc64WFTests/ViewModels/FrmCalc64MainViewModelTests.cs @@ -1,152 +1,195 @@ -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Calc64WF.ViewModel; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.ComponentModel; - -namespace Calc64WF.ViewModel.Tests -{ - [TestClass()] - public class FrmCalc64MainViewModelTests - { - /// - /// The property changed count - /// - /// - private int _PropChangedCount; - /// - /// The property changed - /// - /// - private string _PropChanged = ""; - /// - /// The model view - /// - /// - private FrmCalc64MainViewModel _ModelView; - - /// - /// Tests the initialize. - /// - /// - [TestInitialize] - public void TestInitialize() - { - ClearResults(); - _ModelView = new FrmCalc64MainViewModel(); - _ModelView.PropertyChanged += MainWindow_VM_PropChanged; - } - - private void MainWindow_VM_PropChanged(object sender, PropertyChangedEventArgs e) - { - _PropChangedCount++; - _PropChanged += $"{e.PropertyName}:{sender.GetType().GetProperty(e.PropertyName)?.GetValue(sender)}\r\n"; - } - - private void ClearResults() - { - _PropChangedCount = 0; - _PropChanged = ""; - } - - [TestMethod()] - public void SetupTest() - { - Assert.IsNotNull(_ModelView); - Assert.IsInstanceOfType(_ModelView, typeof(FrmCalc64MainViewModel)); - } - - /// - /// Mains the window vm number button. - /// - /// The s buttons. - /// The i pc count. - /// The s akk. - /// - [DataTestMethod()] - [DataRow("0", 0, 0, "")] - [DataRow("1", 2, 1, "Akkumulator:1\r\nAccumulator:\r\n")] - [DataRow("2", 2, 2, "Akkumulator:2\r\nAccumulator:\r\n")] - [DataRow("3", 2, 3, "Akkumulator:3\r\nAccumulator:\r\n")] - [DataRow("4", 2, 4, "Akkumulator:4\r\nAccumulator:\r\n")] - [DataRow("5", 2, 5, "Akkumulator:5\r\nAccumulator:\r\n")] - [DataRow("6", 2, 6, "Akkumulator:6\r\nAccumulator:\r\n")] - [DataRow("7", 2, 7, "Akkumulator:7\r\nAccumulator:\r\n")] - [DataRow("8", 2, 8, "Akkumulator:8\r\nAccumulator:\r\n")] - [DataRow("9", 2, 9, "Akkumulator:9\r\nAccumulator:\r\n")] - [DataRow("00", 0, 0, "")] - [DataRow("01", 2, 1, "Akkumulator:1\r\nAccumulator:\r\n")] - [DataRow("10", 4, 10, "Akkumulator:1\r\nAccumulator:\r\nAkkumulator:10\r\nAccumulator:\r\n")] - public void MainWindow_VM_NumButton(string sButtons, int iPCCount, int iExpAkk, string sExpPC) - { - foreach (var button in sButtons) - { - if (button >= '0' && button <= '9') - _ModelView.btnNummber_Click(this,$"{button}",new EventArgs()); - } - Assert.AreEqual(iPCCount, _PropChangedCount); - Assert.AreEqual(iExpAkk, _ModelView.Akkumulator); - Assert.AreEqual(sExpPC, _PropChanged); - } - - [DataTestMethod()] - [DataRow("0", 100, 0, 100, "", "")] - [DataRow("0", 0, 0, 0, "", "")] - [DataRow("0", -1, 0, -1, "", "")] - [DataRow("0", int.MaxValue, 0, int.MaxValue, "", "")] - [DataRow("0", int.MinValue, 0, int.MinValue, "", "")] - [DataRow("1", 100, 2, 100, "=", "OperationText:=\r\nOperationMode:\r\n")] - [DataRow("1", 0, 2, 0, "=", "OperationText:=\r\nOperationMode:\r\n")] - [DataRow("1", -1, 2, -1, "=", "OperationText:=\r\nOperationMode:\r\n")] - [DataRow("1", int.MaxValue, 2, int.MaxValue, "=", "OperationText:=\r\nOperationMode:\r\n")] - [DataRow("1", int.MinValue, 2, int.MinValue, "=", "OperationText:=\r\nOperationMode:\r\n")] - [DataRow("2", 0, 2, 0, "+", "OperationText:+\r\nOperationMode:\r\n")] - [DataRow("2", -1, 3, -1, "+", "OperationText:+\r\nOperationMode:\r\nRegister:-1\r\n")] - [DataRow("2", 100, 3, 100, "+", "OperationText:+\r\nOperationMode:\r\nRegister:100\r\n")] - [DataRow("21", 0, 4, 0, "=", "OperationText:+\r\nOperationMode:\r\nOperationText:=\r\nOperationMode:\r\n")] - [DataRow("21", -1, 8, -2, "=", "OperationText:+\r\nOperationMode:\r\nRegister:-1\r\nAkkumulator:-2\r\nAccumulator:\r\nOperationText:=\r\nOperationMode:\r\nRegister:0\r\n")] - [DataRow("21", 100, 8, 200, "=", "OperationText:+\r\nOperationMode:\r\nRegister:100\r\nAkkumulator:200\r\nAccumulator:\r\nOperationText:=\r\nOperationMode:\r\nRegister:0\r\n")] - [DataRow("22", 0, 2, 0, "+", "OperationText:+\r\nOperationMode:\r\n")] - [DataRow("22", -1, 6, -2, "+", "OperationText:+\r\nOperationMode:\r\nRegister:-1\r\nAkkumulator:-2\r\nAccumulator:\r\nRegister:-2\r\n")] - [DataRow("22", 100, 6, 200, "+", "OperationText:+\r\nOperationMode:\r\nRegister:100\r\nAkkumulator:200\r\nAccumulator:\r\nRegister:200\r\n")] - [DataRow("3", 100, 3, 100, "-", "OperationText:-\r\nOperationMode:\r\nRegister:100\r\n")] - [DataRow("31", 100, 8, 0, "=", "OperationText:-\r\nOperationMode:\r\nRegister:100\r\nAkkumulator:0\r\nAccumulator:\r\nOperationText:=\r\nOperationMode:\r\nRegister:0\r\n")] - [DataRow("311", 100, 8, 0, "=", "OperationText:-\r\nOperationMode:\r\nRegister:100\r\nAkkumulator:0\r\nAccumulator:\r\nOperationText:=\r\nOperationMode:\r\nRegister:0\r\n")] - [DataRow("33", 100, 6, 0, "-", "OperationText:-\r\nOperationMode:\r\nRegister:100\r\nAkkumulator:0\r\nAccumulator:\r\nRegister:0\r\n")] - [DataRow("4", 100, 3, 100, "*", "OperationText:*\r\nOperationMode:\r\nRegister:100\r\n")] - [DataRow("41", 100, 8, 10000, "=", "OperationText:*\r\nOperationMode:\r\nRegister:100\r\nAkkumulator:10000\r\nAccumulator:\r\nOperationText:=\r\nOperationMode:\r\nRegister:0\r\n")] - [DataRow("44", 100, 6, 10000, "*", "OperationText:*\r\nOperationMode:\r\nRegister:100\r\nAkkumulator:10000\r\nAccumulator:\r\nRegister:10000\r\n")] - [DataRow("5", 100, 3, 100, "/", "OperationText:/\r\nOperationMode:\r\nRegister:100\r\n")] - [DataRow("51", 100, 8, 1, "=", "OperationText:/\r\nOperationMode:\r\nRegister:100\r\nAkkumulator:1\r\nAccumulator:\r\nOperationText:=\r\nOperationMode:\r\nRegister:0\r\n")] - [DataRow("55", 100, 6, 1, "/", "OperationText:/\r\nOperationMode:\r\nRegister:100\r\nAkkumulator:1\r\nAccumulator:\r\nRegister:1\r\n")] - [DataRow("6", 100, 3, 100, "&", "OperationText:&\r\nOperationMode:\r\nRegister:100\r\n")] - [DataRow("61", 100, 6, 100, "=", "OperationText:&\r\nOperationMode:\r\nRegister:100\r\nOperationText:=\r\nOperationMode:\r\nRegister:0\r\n")] - [DataRow("66", 100, 3, 100, "&", "OperationText:&\r\nOperationMode:\r\nRegister:100\r\n")] - [DataRow("7", 100, 3, 100, "|", "OperationText:|\r\nOperationMode:\r\nRegister:100\r\n")] - [DataRow("71", 100, 6, 100, "=", "OperationText:|\r\nOperationMode:\r\nRegister:100\r\nOperationText:=\r\nOperationMode:\r\nRegister:0\r\n")] - [DataRow("77", 100, 3, 100, "|", "OperationText:|\r\nOperationMode:\r\nRegister:100\r\n")] - [DataRow("8", 100, 3, 100, "x", "OperationText:x\r\nOperationMode:\r\nRegister:100\r\n")] - [DataRow("81", 100, 8, 0, "=", "OperationText:x\r\nOperationMode:\r\nRegister:100\r\nAkkumulator:0\r\nAccumulator:\r\nOperationText:=\r\nOperationMode:\r\nRegister:0\r\n")] - [DataRow("88", 100, 6, 0, "x", "OperationText:x\r\nOperationMode:\r\nRegister:100\r\nAkkumulator:0\r\nAccumulator:\r\nRegister:0\r\n")] - [DataRow("9", 100, 2, -101, "", "Akkumulator:-101\r\nAccumulator:\r\n")] - [DataRow("99", 100, 4, 100, "", "Akkumulator:-101\r\nAccumulator:\r\nAkkumulator:100\r\nAccumulator:\r\n")] - public void MainWindow_VM_OpButton(string sButtons, long iAcc, int iPCCount, long iExpAkk, string sExpOp, string sExpPC) - { - _ModelView.Akkumulator = iAcc; - ClearResults(); - foreach (var button in sButtons) - { - if (button >= '0' && button <= '9') - _ModelView.btnOperator_Click(this,$"-{button}",new EventArgs()); - - } - Assert.AreEqual(iPCCount, _PropChangedCount, $"Test: {sButtons}.PCCount"); - Assert.AreEqual(iExpAkk, _ModelView.Akkumulator, $"Test: {sButtons}.Acc"); - Assert.AreEqual(sExpOp, _ModelView.OperationText, $"Test: {sButtons}.Op"); - Assert.AreEqual(sExpPC, _PropChanged, $"Test: {sButtons}.PropChanges"); - } - } +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.ComponentModel; +using System.Windows.Forms; + +namespace Calc64WF.ViewModel.Tests +{ + [TestClass()] + public class FrmCalc64MainViewModelTests + { + /// + /// The property changed count + /// + /// + private int _PropChangedCount; + /// + /// The property changed + /// + /// + private string _PropChanged = ""; + /// + /// The model view + /// + /// +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + private FrmCalc64MainViewModel _ModelView; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + + /// + /// Tests the initialize. + /// + /// + [TestInitialize] + public void TestInitialize() + { + ClearResults(); + _ModelView = new FrmCalc64MainViewModel(); + _ModelView.PropertyChanged += MainWindow_VM_PropChanged; + } + + private void MainWindow_VM_PropChanged(object? sender, PropertyChangedEventArgs e) + { + _PropChangedCount++; + _PropChanged += $"{e.PropertyName}:{sender?.GetType().GetProperty(e.PropertyName ?? "")?.GetValue(sender)}\r\n"; + } + + private void ClearResults() + { + _PropChangedCount = 0; + _PropChanged = ""; + } + + [TestMethod()] + public void SetupTest() + { + Assert.IsNotNull(_ModelView); + Assert.IsInstanceOfType(_ModelView, typeof(FrmCalc64MainViewModel)); + } + + /// + /// Mains the window vm number button. + /// + /// The s buttons. + /// The i pc count. + /// The s akk. + /// + [DataTestMethod()] + [DataRow("0", 0, 0, "")] + [DataRow("1", 2, 1, "Akkumulator:1\r\nAccumulator:\r\n")] + [DataRow("2", 2, 2, "Akkumulator:2\r\nAccumulator:\r\n")] + [DataRow("3", 2, 3, "Akkumulator:3\r\nAccumulator:\r\n")] + [DataRow("4", 2, 4, "Akkumulator:4\r\nAccumulator:\r\n")] + [DataRow("5", 2, 5, "Akkumulator:5\r\nAccumulator:\r\n")] + [DataRow("6", 2, 6, "Akkumulator:6\r\nAccumulator:\r\n")] + [DataRow("7", 2, 7, "Akkumulator:7\r\nAccumulator:\r\n")] + [DataRow("8", 2, 8, "Akkumulator:8\r\nAccumulator:\r\n")] + [DataRow("9", 2, 9, "Akkumulator:9\r\nAccumulator:\r\n")] + [DataRow("00", 0, 0, "")] + [DataRow("01", 2, 1, "Akkumulator:1\r\nAccumulator:\r\n")] + [DataRow("10", 4, 10, "Akkumulator:1\r\nAccumulator:\r\nAkkumulator:10\r\nAccumulator:\r\n")] + public void MainWindow_VM_NumButton(string sButtons, int iPCCount, int iExpAkk, string sExpPC) + { + foreach (var button in sButtons) + { + if (button >= '0' && button <= '9') + _ModelView.btnNummber_Click(this, $"{button}", new EventArgs()); + } + Assert.AreEqual(iPCCount, _PropChangedCount); + Assert.AreEqual(iExpAkk, _ModelView.Akkumulator); + Assert.AreEqual(sExpPC, _PropChanged); + } + + [DataTestMethod()] + [DataRow("0", 100, 0, 100, "", "")] + [DataRow("0", 0, 0, 0, "", "")] + [DataRow("0", -1, 0, -1, "", "")] + [DataRow("0", int.MaxValue, 0, int.MaxValue, "", "")] + [DataRow("0", int.MinValue, 0, int.MinValue, "", "")] + [DataRow("1", 100, 2, 100, "=", "OperationText:=\r\nOperationMode:\r\n")] + [DataRow("1", 0, 2, 0, "=", "OperationText:=\r\nOperationMode:\r\n")] + [DataRow("1", -1, 2, -1, "=", "OperationText:=\r\nOperationMode:\r\n")] + [DataRow("1", int.MaxValue, 2, int.MaxValue, "=", "OperationText:=\r\nOperationMode:\r\n")] + [DataRow("1", int.MinValue, 2, int.MinValue, "=", "OperationText:=\r\nOperationMode:\r\n")] + [DataRow("2", 0, 2, 0, "+", "OperationText:+\r\nOperationMode:\r\n")] + [DataRow("2", -1, 3, -1, "+", "OperationText:+\r\nOperationMode:\r\nRegister:-1\r\n")] + [DataRow("2", 100, 3, 100, "+", "OperationText:+\r\nOperationMode:\r\nRegister:100\r\n")] + [DataRow("21", 0, 4, 0, "=", "OperationText:+\r\nOperationMode:\r\nOperationText:=\r\nOperationMode:\r\n")] + [DataRow("21", -1, 8, -2, "=", "OperationText:+\r\nOperationMode:\r\nRegister:-1\r\nAkkumulator:-2\r\nAccumulator:\r\nOperationText:=\r\nOperationMode:\r\nRegister:0\r\n")] + [DataRow("21", 100, 8, 200, "=", "OperationText:+\r\nOperationMode:\r\nRegister:100\r\nAkkumulator:200\r\nAccumulator:\r\nOperationText:=\r\nOperationMode:\r\nRegister:0\r\n")] + [DataRow("22", 0, 2, 0, "+", "OperationText:+\r\nOperationMode:\r\n")] + [DataRow("22", -1, 6, -2, "+", "OperationText:+\r\nOperationMode:\r\nRegister:-1\r\nAkkumulator:-2\r\nAccumulator:\r\nRegister:-2\r\n")] + [DataRow("22", 100, 6, 200, "+", "OperationText:+\r\nOperationMode:\r\nRegister:100\r\nAkkumulator:200\r\nAccumulator:\r\nRegister:200\r\n")] + [DataRow("3", 100, 3, 100, "-", "OperationText:-\r\nOperationMode:\r\nRegister:100\r\n")] + [DataRow("31", 100, 8, 0, "=", "OperationText:-\r\nOperationMode:\r\nRegister:100\r\nAkkumulator:0\r\nAccumulator:\r\nOperationText:=\r\nOperationMode:\r\nRegister:0\r\n")] + [DataRow("311", 100, 8, 0, "=", "OperationText:-\r\nOperationMode:\r\nRegister:100\r\nAkkumulator:0\r\nAccumulator:\r\nOperationText:=\r\nOperationMode:\r\nRegister:0\r\n")] + [DataRow("33", 100, 6, 0, "-", "OperationText:-\r\nOperationMode:\r\nRegister:100\r\nAkkumulator:0\r\nAccumulator:\r\nRegister:0\r\n")] + [DataRow("4", 100, 3, 100, "*", "OperationText:*\r\nOperationMode:\r\nRegister:100\r\n")] + [DataRow("41", 100, 8, 10000, "=", "OperationText:*\r\nOperationMode:\r\nRegister:100\r\nAkkumulator:10000\r\nAccumulator:\r\nOperationText:=\r\nOperationMode:\r\nRegister:0\r\n")] + [DataRow("44", 100, 6, 10000, "*", "OperationText:*\r\nOperationMode:\r\nRegister:100\r\nAkkumulator:10000\r\nAccumulator:\r\nRegister:10000\r\n")] + [DataRow("5", 100, 3, 100, "/", "OperationText:/\r\nOperationMode:\r\nRegister:100\r\n")] + [DataRow("51", 100, 8, 1, "=", "OperationText:/\r\nOperationMode:\r\nRegister:100\r\nAkkumulator:1\r\nAccumulator:\r\nOperationText:=\r\nOperationMode:\r\nRegister:0\r\n")] + [DataRow("55", 100, 6, 1, "/", "OperationText:/\r\nOperationMode:\r\nRegister:100\r\nAkkumulator:1\r\nAccumulator:\r\nRegister:1\r\n")] + [DataRow("6", 100, 3, 100, "&", "OperationText:&\r\nOperationMode:\r\nRegister:100\r\n")] + [DataRow("61", 100, 6, 100, "=", "OperationText:&\r\nOperationMode:\r\nRegister:100\r\nOperationText:=\r\nOperationMode:\r\nRegister:0\r\n")] + [DataRow("66", 100, 3, 100, "&", "OperationText:&\r\nOperationMode:\r\nRegister:100\r\n")] + [DataRow("7", 100, 3, 100, "|", "OperationText:|\r\nOperationMode:\r\nRegister:100\r\n")] + [DataRow("71", 100, 6, 100, "=", "OperationText:|\r\nOperationMode:\r\nRegister:100\r\nOperationText:=\r\nOperationMode:\r\nRegister:0\r\n")] + [DataRow("77", 100, 3, 100, "|", "OperationText:|\r\nOperationMode:\r\nRegister:100\r\n")] + [DataRow("8", 100, 3, 100, "x", "OperationText:x\r\nOperationMode:\r\nRegister:100\r\n")] + [DataRow("81", 100, 8, 0, "=", "OperationText:x\r\nOperationMode:\r\nRegister:100\r\nAkkumulator:0\r\nAccumulator:\r\nOperationText:=\r\nOperationMode:\r\nRegister:0\r\n")] + [DataRow("88", 100, 6, 0, "x", "OperationText:x\r\nOperationMode:\r\nRegister:100\r\nAkkumulator:0\r\nAccumulator:\r\nRegister:0\r\n")] + [DataRow("9", 100, 2, -101, "", "Akkumulator:-101\r\nAccumulator:\r\n")] + [DataRow("99", 100, 4, 100, "", "Akkumulator:-101\r\nAccumulator:\r\nAkkumulator:100\r\nAccumulator:\r\n")] + public void MainWindow_VM_OpButton(string sButtons, long iAcc, int iPCCount, long iExpAkk, string sExpOp, string sExpPC) + { + _ModelView.Akkumulator = iAcc; + ClearResults(); + foreach (var button in sButtons) + { + if (button >= '0' && button <= '9') + _ModelView.btnOperator_Click(this, $"-{button}", new EventArgs()); + + } + Assert.AreEqual(iPCCount, _PropChangedCount, $"Test: {sButtons}.PCCount"); + Assert.AreEqual(iExpAkk, _ModelView.Akkumulator, $"Test: {sButtons}.Acc"); + Assert.AreEqual(sExpOp, _ModelView.OperationText, $"Test: {sButtons}.Op"); + Assert.AreEqual(sExpPC, _PropChanged, $"Test: {sButtons}.PropChanges"); + } + + /// + /// Mains the window vm number button. + /// + /// The s buttons. + /// The i pc count. + /// The s akk. + /// + [DataTestMethod()] + [DataRow("0", Keys.None, "")] + [DataRow("01", Keys.Oemplus, "OperationText:+\r\nOperationMode:\r\n")] + [DataRow("02", Keys.Add, "OperationText:+\r\nOperationMode:\r\n")] + [DataRow("03", Keys.OemMinus, "OperationText:-\r\nOperationMode:\r\n")] + [DataRow("04", Keys.Subtract, "OperationText:-\r\nOperationMode:\r\n")] + [DataRow("05", Keys.Divide, "OperationText:/\r\nOperationMode:\r\n")] + [DataRow("06", Keys.Multiply, "OperationText:*\r\nOperationMode:\r\n")] + [DataRow("07", Keys.Escape, "")] + [DataRow("08", Keys.Back, "")] + [DataRow("10", Keys.A, "")] + [DataRow("11", Keys.NumPad1, "")] + [DataRow("12", Keys.D2, "")] + public void MainWindow_frm_KeyDown(string sName, Keys keys, string sExpPC) + { + var e = new KeyEventArgs(keys); + _ModelView.frm_KeyDown(this, null!, e); + Assert.AreEqual(sExpPC, _PropChanged, $"Test: {keys}.PropChanges"); + + } + + [TestMethod()] + public void MainWindow_CloseForm() + { + _ModelView.btnClose_Click(this, null!, null!); + Assert.AreEqual("", _PropChanged, $"Test: .CloseForm"); + + } + + [TestMethod()] + public void MemoryTest() + { + Assert.AreEqual(0, _ModelView.Memory, $"Test: .Memory"); + + } + + + } } \ No newline at end of file diff --git a/CSharpBible/Calc/Calc64WFTests/Visual/Converter/OperationModeToShortStringTests.cs b/CSharpBible/Calc/Calc64WFTests/Visual/Converter/OperationModeToShortStringTests.cs index 954b67d0b..dd0f5920b 100644 --- a/CSharpBible/Calc/Calc64WFTests/Visual/Converter/OperationModeToShortStringTests.cs +++ b/CSharpBible/Calc/Calc64WFTests/Visual/Converter/OperationModeToShortStringTests.cs @@ -36,7 +36,7 @@ public class OperationModeToShortStringTests public void ConvertTest() { var vcTest = new OperationModeToShortString(); - foreach(var e in typeof(Calc64Model.eOpMode).GetEnumValues()) + foreach(var e in typeof(Calc64Model.EOpMode).GetEnumValues()) { Assert.IsNotNull(vcTest.Convert(e, typeof(string), null, System.Globalization.CultureInfo.CurrentCulture)); } diff --git a/CSharpBible/Calc/Calc64_Wpf/App.xaml b/CSharpBible/Calc/Calc64_Wpf/App.xaml new file mode 100644 index 000000000..cbff8d9ae --- /dev/null +++ b/CSharpBible/Calc/Calc64_Wpf/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/CSharpBible/Calc/Calc64_Wpf/App.xaml.cs b/CSharpBible/Calc/Calc64_Wpf/App.xaml.cs new file mode 100644 index 000000000..a1a5df46a --- /dev/null +++ b/CSharpBible/Calc/Calc64_Wpf/App.xaml.cs @@ -0,0 +1,30 @@ +using System.Configuration; +using System.Data; +using System.Windows; +using Microsoft.Extensions.DependencyInjection; +using Calc64Base; +using MVVM.View.Extension; + + +namespace Calc64_Wpf +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + + var BaseServices = new ServiceCollection() + .AddSingleton(); + + var serviceProvider = BaseServices.BuildServiceProvider(); + + IoC.Configure(serviceProvider); + + } + } + +} diff --git a/CSharpBible/Calc/Calc64_Wpf/AssemblyInfo.cs b/CSharpBible/Calc/Calc64_Wpf/AssemblyInfo.cs new file mode 100644 index 000000000..b0ec82757 --- /dev/null +++ b/CSharpBible/Calc/Calc64_Wpf/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/CSharpBible/Calc/Calc64_Wpf/Calc64_Wpf.csproj b/CSharpBible/Calc/Calc64_Wpf/Calc64_Wpf.csproj new file mode 100644 index 000000000..fbcc390f8 --- /dev/null +++ b/CSharpBible/Calc/Calc64_Wpf/Calc64_Wpf.csproj @@ -0,0 +1,22 @@ + + + + WinExe + net6.0-windows;net7.0-windows;net8.0-windows + enable + disable + true + + + + + + + + + + + + + + diff --git a/CSharpBible/Calc/Calc64_Wpf/MainWindow.xaml b/CSharpBible/Calc/Calc64_Wpf/MainWindow.xaml new file mode 100644 index 000000000..8d7bb0d1c --- /dev/null +++ b/CSharpBible/Calc/Calc64_Wpf/MainWindow.xaml @@ -0,0 +1,16 @@ + + + + + + + + diff --git a/CSharpBible/Calc/Calc64_Wpf/MainWindow.xaml.cs b/CSharpBible/Calc/Calc64_Wpf/MainWindow.xaml.cs new file mode 100644 index 000000000..eff44405a --- /dev/null +++ b/CSharpBible/Calc/Calc64_Wpf/MainWindow.xaml.cs @@ -0,0 +1,24 @@ +using System.Text; +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 Calc64_Wpf +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/CSharpBible/Calc/Calc64_Wpf/ViewModels/CalculatorViewModel.cs b/CSharpBible/Calc/Calc64_Wpf/ViewModels/CalculatorViewModel.cs new file mode 100644 index 000000000..0faf4cdb9 --- /dev/null +++ b/CSharpBible/Calc/Calc64_Wpf/ViewModels/CalculatorViewModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using MVVM.ViewModel; + +namespace Calc64_Wpf.ViewModels; + +public class CalculatorViewModel:BaseViewModelCT +{ + +} diff --git a/CSharpBible/Calc/Calc64_Wpf/ViewModels/MainWindowViewModel.cs b/CSharpBible/Calc/Calc64_Wpf/ViewModels/MainWindowViewModel.cs new file mode 100644 index 000000000..6308c4a22 --- /dev/null +++ b/CSharpBible/Calc/Calc64_Wpf/ViewModels/MainWindowViewModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using MVVM.ViewModel; + +namespace Calc64_Wpf.ViewModels +{ + public partial class MainWindowViewModel:BaseViewModelCT + { + } +} diff --git a/CSharpBible/Calc/Calc64_Wpf/Views/CalculatorView.xaml b/CSharpBible/Calc/Calc64_Wpf/Views/CalculatorView.xaml new file mode 100644 index 000000000..16336cd5f --- /dev/null +++ b/CSharpBible/Calc/Calc64_Wpf/Views/CalculatorView.xaml @@ -0,0 +1,17 @@ + + + + + + + + diff --git a/CSharpBible/Calc/Calc64_Wpf/Views/CalculatorView.xaml.cs b/CSharpBible/Calc/Calc64_Wpf/Views/CalculatorView.xaml.cs new file mode 100644 index 000000000..b9d5d0b8d --- /dev/null +++ b/CSharpBible/Calc/Calc64_Wpf/Views/CalculatorView.xaml.cs @@ -0,0 +1,28 @@ +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 Calc64_Wpf.Views +{ + /// + /// Interaktionslogik für CalculatorView.xaml + /// + public partial class CalculatorView : Page + { + public CalculatorView() + { + InitializeComponent(); + } + } +} diff --git a/CSharpBible/Calc/Calc_net.props b/CSharpBible/Calc/Calc_net.props new file mode 100644 index 000000000..42a6e622d --- /dev/null +++ b/CSharpBible/Calc/Calc_net.props @@ -0,0 +1,14 @@ + + + ..\.. + ..\..\..\bin\$(MSBuildProjectName)\ + ..\..\..\obj.net\$(MSBuildProjectName)\ + 12.0 + enable + disable + JC-Soft + Joe Care + Copyright © JC-Soft 2023 + $(MSBuildProjectName.Replace(" ", "_").Replace("_net","")) + + \ No newline at end of file diff --git a/CSharpBible/ConsoleDisplay/ConsoleDisplay.csproj b/CSharpBible/ConsoleDisplay/ConsoleDisplay.csproj index fd698805c..39501b4be 100644 --- a/CSharpBible/ConsoleDisplay/ConsoleDisplay.csproj +++ b/CSharpBible/ConsoleDisplay/ConsoleDisplay.csproj @@ -1,26 +1,20 @@  - - net461;net472;net48 - ..\..\obj\$(MSBuildProjectName)\ - ..\..\obj\$(MSBuildProjectName)\ - ..\..\bin\$(MSBuildProjectName) - JC-Soft - Copyright © 2022 by JC-Soft - - - - - disable - 8.0 - enable - - - - - - - - - - + + + Library + net462;net472;net48;net481 + + + + + + + + + + + + + + diff --git a/CSharpBible/ConsoleDisplay/ConsoleDisplay_net.csproj b/CSharpBible/ConsoleDisplay/ConsoleDisplay_net.csproj index 5727391c4..84cd881b8 100644 --- a/CSharpBible/ConsoleDisplay/ConsoleDisplay_net.csproj +++ b/CSharpBible/ConsoleDisplay/ConsoleDisplay_net.csproj @@ -1,16 +1,11 @@  - - net6.0 - ..\..\obj.net\$(MSBuildProjectName)\ - ..\..\obj.net\$(MSBuildProjectName)\ - ..\..\bin\$(MSBuildProjectName) - JC-Soft - Copyright © 2022 by JC-Soft + + + net6.0;net7.0;net8.0 - enable enable @@ -18,5 +13,8 @@ + + + diff --git a/CSharpBible/ConsoleDisplay/ConsoleDisplay_win.csproj b/CSharpBible/ConsoleDisplay/ConsoleDisplay_win.csproj new file mode 100644 index 000000000..0d4382262 --- /dev/null +++ b/CSharpBible/ConsoleDisplay/ConsoleDisplay_win.csproj @@ -0,0 +1,20 @@ + + + + Library + net462-windows;net472-windows;net48-windows;net481-windows + + + + + + + + + + + + + + + diff --git a/CSharpBible/ConsoleDisplay/View/IConsole.cs b/CSharpBible/ConsoleDisplay/View/IConsole.cs new file mode 100644 index 000000000..05fe63e42 --- /dev/null +++ b/CSharpBible/ConsoleDisplay/View/IConsole.cs @@ -0,0 +1,39 @@ +// *********************************************************************** +// Assembly : ConsoleDisplay +// Author : Mir +// Created : 07-16-2022 +// +// Last Modified By : Mir +// Last Modified On : 07-24-2022 +// *********************************************************************** +// +// Copyright (c) JC-Soft. All rights reserved. +// +// +// *********************************************************************** +using System; + +namespace ConsoleDisplay.View +{ + public interface IConsole + { + ConsoleColor ForegroundColor { get; set; } + ConsoleColor BackgroundColor { get; set; } + bool IsOutputRedirected { get; } + bool KeyAvailable { get; } + int LargestWindowHeight { get; } + string Title { get; set; } + int WindowHeight { get; set; } + int WindowWidth { get; set; } + + void Beep(int freq, int len); + void Clear(); + (int Left, int Top) GetCursorPosition(); + ConsoleKeyInfo? ReadKey(); + string ReadLine(); + void SetCursorPosition(int left, int top); + void Write(char ch); + void Write(string? st); + void WriteLine(string? st = ""); + } +} \ No newline at end of file diff --git a/CSharpBible/ConsoleDisplay/View/MyConsole.cs b/CSharpBible/ConsoleDisplay/View/MyConsole.cs index 6b965ad5f..bce91d03e 100644 --- a/CSharpBible/ConsoleDisplay/View/MyConsole.cs +++ b/CSharpBible/ConsoleDisplay/View/MyConsole.cs @@ -30,86 +30,104 @@ public class MyConsole : MyConsoleBase /// /// The color of the foreground. protected PropertyInfo? foregroundColor { get; set; } - = typeof(Console).GetProperty("ForegroundColor"); + = typeof(Console).GetProperty(nameof(ForegroundColor)); /// /// Gets or sets the color of the background. /// /// The color of the background. protected PropertyInfo? backgroundColor { get; set; } - = typeof(Console).GetProperty("BackgroundColor"); + = typeof(Console).GetProperty(nameof(BackgroundColor)); /// /// Gets or sets the key available. /// /// The key available. protected PropertyInfo? keyAvailable { get; set; } - = typeof(Console).GetProperty("KeyAvailable"); + = typeof(Console).GetProperty(nameof(KeyAvailable)); /// /// Gets or sets the height of the window. /// /// The height of the window. protected PropertyInfo? windowHeight { get; set; } - = typeof(Console).GetProperty("WindowHeight"); + = typeof(Console).GetProperty(nameof(WindowHeight)); /// /// Gets or sets the width of the window. /// /// The width of the window. protected PropertyInfo? windowWidth { get; set; } - = typeof(Console).GetProperty("WindowWidth"); + = typeof(Console).GetProperty(nameof(WindowWidth)); /// /// Gets or sets the height of the largest window. /// /// The height of the largest window. protected PropertyInfo? largestWindowHeight { get; set; } - = typeof(Console).GetProperty("LargestWindowHeight"); + = typeof(Console).GetProperty(nameof(LargestWindowHeight)); + /// + /// Gets if the Output is redirected. + /// + /// TRUE if the Output is redirected + protected PropertyInfo? isOutputRedirected { get; set; } + = typeof(Console).GetProperty(nameof(IsOutputRedirected)); /// /// Gets or sets the title of the window. /// /// The height of the largest window. protected PropertyInfo? title { get; set; } - = typeof(Console).GetProperty("Title"); + = typeof(Console).GetProperty(nameof(Title)); /// /// Gets or sets the clear. /// /// The clear. protected MethodInfo? clear { get; set; } - = typeof(Console).GetMember("Clear")?.First( + = typeof(Console).GetMember(nameof(Clear))?.First( (o) => true) as MethodInfo; /// /// Gets or sets the read key. /// /// The read key. protected MethodInfo? readKey { get; set; } - = typeof(Console).GetMember("ReadKey")?.First( + = typeof(Console).GetMember(nameof(ReadKey))?.First( (o) => true) as MethodInfo; /// /// Gets or sets the write ch. /// /// The write ch. protected MethodInfo? write_ch { get; set; } - = typeof(Console).GetMember("Write")?.First( + = typeof(Console).GetMember(nameof(Console.Write))?.First( (o) => (o as MethodInfo)?.GetParameters()?[0].ParameterType==typeof(char) ) as MethodInfo; /// /// Gets or sets the write st. /// /// The write st. protected MethodInfo? write_st { get; set; } - = typeof(Console).GetMember("Write")?.First( - (o) => (o as MethodInfo)?.GetParameters().Length==1 && (o as MethodInfo)?.GetParameters()?[0].ParameterType == typeof(string)) as MethodInfo; + = typeof(Console).GetMember(nameof(Console.Write))?.First( + (o) => o is MethodInfo m + && m.GetParameters().Length==1 + && m.GetParameters()?[0].ParameterType == typeof(string)) as MethodInfo; + /// + /// Gets or sets the write st. + /// + /// The write st. + protected MethodInfo? read_st { get; set; } + = typeof(Console).GetMember(nameof(Console.ReadLine))?.First( + (o) => o is MethodInfo m + && (m.GetParameters().Length == 0) + && m.ReturnType == typeof(string)) as MethodInfo; + /// /// Gets or sets the set cursor position. /// /// The set cursor position. protected MethodInfo? setCursorPos { get; set; } - = typeof(Console).GetMember("SetCursorPosition")?.First((o) => true) as MethodInfo; + = typeof(Console).GetMember(nameof(SetCursorPosition))?.First((o) => true) as MethodInfo; /// /// Gets or sets the beep int. /// /// The beep int. protected MethodInfo? beep_int { get; set; } - = typeof(Console).GetMember("Beep")?.First( + = typeof(Console).GetMember(nameof(Beep))?.First( (o) => (o as MethodInfo)?.GetParameters().Length == 2) as MethodInfo; /// /// Gets or sets the get cursor position. @@ -117,14 +135,15 @@ public class MyConsole : MyConsoleBase /// The get cursor position. protected MethodInfo? getCursorPos { get; set; } #if NET6_0_OR_GREATER - = typeof(Console).GetMember("GetCursorPosition")?.First((o) => true) as MethodInfo; + = typeof(Console).GetMember(nameof(Console.GetCursorPosition))?.First((o) => true) as MethodInfo; #else - = typeof(Console).GetMethod("GetCursorPosition"); + = typeof(MyConsole).GetMethod(nameof(_GetCursorPosition)); + public static (int Left, int Top) _GetCursorPosition() => (Console.CursorLeft, Console.CursorTop); #endif - /// - /// The instance - /// - protected object? instance = null; + /// + /// The instance + /// + protected object? instance = null; /// /// Gets or sets the color of the foreground. @@ -183,9 +202,13 @@ public override int WindowWidth { /// /// The width of the window. public override string Title { - get => (string)title?.GetValue(instance) ??""; + get => (string)(title?.GetValue(instance) ??""); set => title?.SetValue(instance, value); } + public override bool IsOutputRedirected + => (bool)(isOutputRedirected?.GetValue(instance) ?? false); + + /// /// Clears this instance. /// @@ -206,6 +229,13 @@ public override string Title { /// The st. public override void WriteLine(string? st="") => write_st?.Invoke(instance, new object[] { st+"\r\n" }); + /// + /// Writes the line. + /// + /// The st. + public override string ReadLine() => + (string)(read_st?.Invoke(instance, new object[] {}) ?? ""); + /// /// Sets the cursor position. /// diff --git a/CSharpBible/ConsoleDisplay/View/MyConsoleBase.cs b/CSharpBible/ConsoleDisplay/View/MyConsoleBase.cs index b5db5f097..d5d6c101f 100644 --- a/CSharpBible/ConsoleDisplay/View/MyConsoleBase.cs +++ b/CSharpBible/ConsoleDisplay/View/MyConsoleBase.cs @@ -18,7 +18,7 @@ namespace ConsoleDisplay.View /// /// Class MyConsoleBase. /// - public abstract class MyConsoleBase + public abstract class MyConsoleBase : IConsole { /// /// Gets or sets the color of the foreground. @@ -51,6 +51,13 @@ public abstract class MyConsoleBase /// The height of the largest window. public abstract int LargestWindowHeight { get; } + /// + /// Gets if the output is redirected. + /// + /// Gets if the output is redirected. + public abstract bool IsOutputRedirected { get; } + + /// /// Gets or sets the title of the window. /// @@ -94,6 +101,12 @@ public abstract class MyConsoleBase /// The st. public abstract void WriteLine(string? st = ""); + /// + /// Writes the line. + /// + /// The st. + public abstract string ReadLine(); + /// /// Beeps the specified freq. /// diff --git a/CSharpBible/ConsoleDisplay/View/TileDefBase.cs b/CSharpBible/ConsoleDisplay/View/TileDefBase.cs index da44bbcc6..46c2fb1a2 100644 --- a/CSharpBible/ConsoleDisplay/View/TileDefBase.cs +++ b/CSharpBible/ConsoleDisplay/View/TileDefBase.cs @@ -25,7 +25,7 @@ public abstract class TileDefBase /// Gets the tile definition. /// /// The tile. - /// The visual defintion of the tile + /// The visual definition of the tile public abstract (string[] lines, (ConsoleColor fgr,ConsoleColor bgr)[] colors) GetTileDef(Enum? tile); /// @@ -42,14 +42,14 @@ public abstract class TileDefBase /// The array. /// The tile. /// T. - protected static T GetArrayElement(T[] array, Enum tile) => Tile2Int(tile) < array.Length ? array[Tile2Int(tile)] : array[array.Length - 1]; + protected static T GetArrayElement(T[] array, Enum? tile) => Tile2Int(tile) < array.Length ? array[Tile2Int(tile)] : array[^1]; /// /// Tile2s the int. /// /// The tile. /// System.Int32. - protected static int Tile2Int(Enum tile) { return ((int)((object)tile ?? 0)); } + protected static int Tile2Int(Enum? tile) { return ((int)((object?)tile ?? 0)); } public Size TileSize { get; protected set; } } diff --git a/CSharpBible/ConsoleDisplay/View/TileDisplay.cs b/CSharpBible/ConsoleDisplay/View/TileDisplay.cs index 260140c1e..532a916b7 100644 --- a/CSharpBible/ConsoleDisplay/View/TileDisplay.cs +++ b/CSharpBible/ConsoleDisplay/View/TileDisplay.cs @@ -14,28 +14,26 @@ using System; using System.Collections.Generic; using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -namespace ConsoleDisplay.View { +namespace ConsoleDisplay.View +{ - /// - /// Class TileDisplay. - /// - /// The type of the enum. - public class TileDisplay + /// + /// Class TileDisplay. + /// + /// The type of the enum. + public class TileDisplay { #region Properties #region static Properties /// /// The default tile /// - public static T defaultTile; + public static T? defaultTile { get; set; } /// /// The default tile definition /// - public static TileDefBase tileDef; + public static TileDefBase? tileDef { get; set; } #endregion /// @@ -43,16 +41,16 @@ public class TileDisplay /// /// The index. /// T. - public T this[Point Idx] { get => GetTile(Idx); set => SetTile(Idx,value); } + public T? this[Point Idx] { get => GetTile(Idx); set => SetTile(Idx,value); } /// /// Gets the position. /// /// The position. public Point Position => _rect.Location; /// - /// Gets the size of the disp. + /// Gets the size of the display. /// - /// The size of the disp. + /// The size of the display. public Size DispSize => _size; /// /// Gets the size of the tile. @@ -68,7 +66,7 @@ public class TileDisplay /// it returns the default-tileDef when the local tileDef isn't set. /// /// The tile definition. - public TileDefBase TileDef { get => _tileDef ?? tileDef; set => _tileDef = value; } + public TileDefBase? TileDef { get => _tileDef ?? tileDef; set => _tileDef = value; } public Point DispOffset { get; set; } = Point.Empty; public Func? FncGetTile; @@ -78,11 +76,11 @@ public class TileDisplay /// /// The tiles /// - private Dictionary _tiles = new Dictionary(); + private readonly Dictionary _tiles = new(); /// /// The rect /// - private Rectangle _rect = new Rectangle(); + private Rectangle _rect = new(); /// /// The size /// @@ -94,11 +92,11 @@ public class TileDisplay /// /// The changed /// - private bool _changed; + private bool _changed=false; /// /// The (local) tile-definition /// - private TileDefBase _tileDef; + private TileDefBase? _tileDef; #endregion #endregion @@ -130,7 +128,7 @@ public static void WriteTile(Point Offset,PointF p, T tile, Size ts) { var def = tileDef?.GetTileDef(tile as Enum) ?? default; Size s = (ts == Size.Empty)?new Size(def.lines[0].Length, def.lines.Length):ts; - Point pc = new Point(); + Point pc = new(); for (pc.Y = 0; pc.Y < def.lines.Length; pc.Y++) for (pc.X = 0; pc.X < def.lines[pc.Y].Length; pc.X++) WriteTileChunk(Offset, p, def, s, pc); @@ -201,7 +199,7 @@ public void WriteTile(PointF p, T tile) { var def = TileDef?.GetTileDef(tile as Enum) ?? default; Size s = TileSize; - Point pc = new Point((int)p.X*s.Width,(int)p.Y*s.Height); + Point pc = new((int)p.X*s.Width,(int)p.Y*s.Height); var _rect2 = new Rectangle(Point.Empty, _rect.Size); _rect2.Inflate(s); if (_rect2.Contains(pc)) @@ -223,9 +221,9 @@ public void WriteTile(PointF p, T tile) /// /// The index. /// T. - private T GetTile(Point Idx) { + private T? GetTile(Point Idx) { if (Idx.X < 0 || Idx.X >= _size.Width || Idx.Y < 0 || Idx.Y >= _size.Height) return defaultTile; - if (_tiles.ContainsKey(Idx)) return _tiles[Idx]; + if (_tiles.TryGetValue(Idx, out T? value)) return value; return defaultTile; } @@ -234,11 +232,14 @@ private T GetTile(Point Idx) { /// /// The index. /// The value. - private void SetTile(Point Idx, T value) + private void SetTile(Point Idx, T? value) { if (Idx.X < 0 || Idx.X >= _size.Width || Idx.Y < 0 || Idx.Y >= _size.Height) return; - if (_tiles.ContainsKey(Idx) && (_tiles[Idx] is T e) && e.Equals(value) ) return; - _tiles[Idx] = value; + if (_tiles.TryGetValue(Idx, out T? v) && (v is T e) && e.Equals(value) ) return; + if (value!=null) + _tiles[Idx] = value; + else + _tiles.Remove(Idx); _changed = true; } @@ -246,7 +247,7 @@ public void Update(bool e) { var diffFields = new List<(Point, T, Point?)>(); var p = new Point(); - Point p3 = new Point(); + Point p3 = new(); if (FncGetTile == null) return; for (p.Y = 0; p.Y < DispSize.Height; p.Y++) @@ -254,13 +255,15 @@ public void Update(bool e) { p3.X = p.X + DispOffset.X; p3.Y = p.Y + DispOffset.Y; - object td = FncGetTile(p3); - object ot = GetTile(p); + T td = FncGetTile(p3)!; + T? ot = GetTile(p); var po = FncOldPos?.Invoke(p3); - if (((int)td != (int)ot) - || ((po ?? p3) != p3)) + bool x1 = !td.Equals(ot); + bool x2 = (po != null) && (po != p3); + + if (x1 || x2) { - Point pp = new Point(p.X, p.Y); + Point pp = new(p.X, p.Y); diffFields.Add((pp, (T)td, Point.Subtract(po ?? p3, (Size)DispOffset))); if (!e) @@ -300,8 +303,8 @@ public void FullRedraw() { if (FncGetTile == null) return; // Draw playfield - Point p = new Point(); - Point p2 = new Point(); + Point p = new(); + Point p2 = new(); for (p.Y = 0; p.Y < DispSize.Height; p.Y++) for (p.X = 0; p.X < DispSize.Width; p.X++) { p2.X = p.X + DispOffset.X; diff --git a/CSharpBible/ConsoleDisplay/View/TileDisplayHex.cs b/CSharpBible/ConsoleDisplay/View/TileDisplayHex.cs index dd16937ec..b4e3a2b62 100644 --- a/CSharpBible/ConsoleDisplay/View/TileDisplayHex.cs +++ b/CSharpBible/ConsoleDisplay/View/TileDisplayHex.cs @@ -1,24 +1,21 @@ using System; using System.Collections.Generic; using System.Drawing; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; -namespace ConsoleDisplay.View { - public static class HexMath { - public static PointF HexPointF((float X, float Y) f, bool v) => +namespace ConsoleDisplay.View +{ + public static class HexMath { + public static PointF HexPointF(this (float X, float Y) f, bool v) => v ? new PointF(f.X, f.Y + ZigZag(f.X ) * 0.5f) : new PointF(f.X + ZigZag(f.Y) * 0.5f, f.Y); - public static Point HexKPoint((float X, float Y) f, bool v) => + public static Point HexKPoint(this (float X, float Y) f, bool v) => v ? - new Point((int)Math.Round(f.X), (int)Math.Round(f.Y - ZigZag(f.X) * 0.5f)) : - new Point((int)Math.Round(f.X - ZigZag(f.Y) * 0.5f), (int)Math.Round(f.Y)); + new Point((int)Math.Round(f.X), (int)Math.Round(f.Y + ZigZag(f.X) * 0.5f)) : + new Point((int)Math.Round(f.X + ZigZag(f.Y) * 0.5f), (int)Math.Round(f.Y)); - public static float ZigZag(float x) => + public static float ZigZag(this float x) => (float)Math.Abs(x - Math.Floor((x + 1.0) * 0.5) * 2.0); } /// @@ -32,11 +29,11 @@ public class TileDisplayHex /// /// The default tile /// - public static T defaultTile; + public static T? defaultTile { get; set; } = default!; /// /// The default tile definition /// - public static TileDefBase tileDef; + public static TileDefBase? tileDef { get; set; } #endregion /// The Display is vertical @@ -56,7 +53,7 @@ public class TileDisplayHex /// /// The index. /// T. - public T this[Point Idx] { get => GetTile(Idx); set => SetTile(Idx, value); } + public T? this[Point Idx] { get => GetTile(Idx); set => SetTile(Idx, value); } /// /// Gets the position. /// @@ -75,13 +72,13 @@ public class TileDisplayHex /// /// My console /// - public static MyConsoleBase myConsole = new MyConsole(); + public static MyConsoleBase myConsole { get; set; } = new MyConsole(); /// /// Gets or sets the tile definition. /// it returns the default-tileDef when the local tileDef isn't set. /// /// The tile definition. - public TileDefBase TileDef { get => _tileDef ?? tileDef; set => _tileDef = value; } + public TileDefBase? TileDef { get => _tileDef ?? tileDef; set => _tileDef = value; } public Point DispOffset { get; set; } = Point.Empty; public Func? FncGetTile; @@ -103,11 +100,11 @@ public class TileDisplayHex /// /// The tiles /// - private Dictionary _tiles = new Dictionary(); + private readonly Dictionary _tiles = new(); /// /// The rect /// - private Rectangle _rect = new Rectangle(); + private readonly Rectangle _rect = new(); /// /// The size /// @@ -119,11 +116,11 @@ public class TileDisplayHex /// /// The changed /// - private bool _changed; + private bool _changed=false; /// /// The (local) tile-definition /// - private TileDefBase _tileDef; + private TileDefBase? _tileDef; #endregion #endregion @@ -154,7 +151,7 @@ static TileDisplayHex() { public static void WriteTile(Point Offset, PointF p, T tile, Size ts) { var def = tileDef?.GetTileDef(tile as Enum) ?? default; Size s = (ts == Size.Empty) ? new Size(def.lines[0].Length, def.lines.Length) : ts; - Point pc = new Point(); + Point pc = new(); for (pc.Y = 0; pc.Y < def.lines.Length; pc.Y++) for (pc.X = 0; pc.X < def.lines[pc.Y].Length; pc.X++) WriteTileChunk(Offset, p, def, s, pc); @@ -223,7 +220,7 @@ public TileDisplayHex(Point position, Size size, Size tileSize, bool vertical = public void WriteTile(PointF p, T tile) { var def = TileDef?.GetTileDef(tile as Enum) ?? default; Size s = TileSize; - Point pc = new Point((int)p.X * s.Width, (int)p.Y * s.Height); + Point pc = new((int)p.X * s.Width, (int)p.Y * s.Height); var _rect2 = new Rectangle(Point.Empty, _rect.Size); _rect2.Inflate(s); if (_rect2.Contains(pc)) { @@ -244,7 +241,7 @@ public void WriteTile(PointF p, T tile) { /// /// The index. /// T. - private T GetTile(Point Idx) { + private T? GetTile(Point Idx) { if (Idx.X < 0 || Idx.X >= _size.Width || Idx.Y < 0 || Idx.Y >= _size.Height) return defaultTile; if (_tiles.ContainsKey(Idx)) return _tiles[Idx]; return defaultTile; @@ -255,27 +252,30 @@ private T GetTile(Point Idx) { /// /// The index. /// The value. - private void SetTile(Point Idx, T value) { + private void SetTile(Point Idx, T? value) { if (Idx.X < 0 || Idx.X >= _size.Width || Idx.Y < 0 || Idx.Y >= _size.Height) return; - if (_tiles.ContainsKey(Idx) && (_tiles[Idx] is T e) && e.Equals(value)) return; - _tiles[Idx] = value; + if (_tiles.TryGetValue(Idx,out T? e ) && e!.Equals(value)) return; + if (value != null) + _tiles[Idx] = value; + else + _tiles.Remove(Idx); _changed = true; } public void Update(bool e) { var diffFields = new List<(PointF, T, PointF)>(); var p = new Point(); - Point p3 = new Point(); + Point p3 = new(); if (FncGetTile == null) return; for (p.Y = 0; p.Y < DispSize.Height; p.Y++) for (p.X = 0; p.X < DispSize.Width; p.X++) { p3.X = p.X + DispOffset.X; p3.Y = p.Y + DispOffset.Y; - object td = FncGetTile(p3); - object ot = GetTile(p); + object td = FncGetTile(p3)!; + object? ot = GetTile(p); var po = FncOldPos?.Invoke(p3); - if (((int)td != (int)ot) + if (!td.Equals(ot) || ((po ?? p3) != p3)) { var pp = Point.Subtract(po ?? p3, (Size)DispOffset); diffFields.Add(( HexMath.HexPointF((p.X, p.Y), _vertical), (T)td, HexMath.HexPointF((pp.X, pp.Y), _vertical))); @@ -316,21 +316,22 @@ public void Update(bool e) { else WriteTile(HexMath.HexPointF((f.Item1.X, f.Item1.Y),_vertical) , f.Item2); } - } + _changed = false; + } - public void FullRedraw() { + public void FullRedraw() { if (FncGetTile == null) return; // Draw playfield - Point p = new Point(); - Point p2 = new Point(); - PointF p3 = new Point(); - for (p.Y = 0; p.Y < DispSize.Height; p.Y++) + Point p = new(); + Point p2 = new(); + for (p.Y = 0; p.Y < DispSize.Height; p.Y++) for (p.X = 0; p.X < DispSize.Width; p.X++) { p2.X = p.X + DispOffset.X; p2.Y = p.Y + DispOffset.Y; - p3= HexMath.HexPointF((p.X,p.Y),_vertical); - WriteTile(p3, _tiles[p] = FncGetTile(p2)); + PointF p3 = HexMath.HexPointF((p.X, p.Y), _vertical); + WriteTile(p3, _tiles[p] = FncGetTile(p2)); } + _changed = false; } #endregion #endregion diff --git a/CSharpBible/ConsoleDisplayTests/ConsoleDisplayTests.csproj b/CSharpBible/ConsoleDisplayTests/ConsoleDisplayTests.csproj index 2f9c9ce07..6aba1fa08 100644 --- a/CSharpBible/ConsoleDisplayTests/ConsoleDisplayTests.csproj +++ b/CSharpBible/ConsoleDisplayTests/ConsoleDisplayTests.csproj @@ -1,15 +1,8 @@ - - - net461;net472;net48 - disable - 8.0 - enable + + + + net462;net472;net48;net481 true - ..\..\obj\$(MSBuildProjectName)\ - ..\..\obj\$(MSBuildProjectName)\ - ..\..\bin\$(MSBuildProjectName) - JC-Soft - Copyright © 2022 by JC-Soft false true @@ -25,10 +18,10 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -36,6 +29,7 @@ + diff --git a/CSharpBible/ConsoleDisplayTests/ConsoleDisplay_netTests.csproj b/CSharpBible/ConsoleDisplayTests/ConsoleDisplay_netTests.csproj index c66747a9d..a43e43149 100644 --- a/CSharpBible/ConsoleDisplayTests/ConsoleDisplay_netTests.csproj +++ b/CSharpBible/ConsoleDisplayTests/ConsoleDisplay_netTests.csproj @@ -1,14 +1,8 @@ - + + - net6.0-windows - enable - enable + net6.0-windows;net7.0-windows;net8.0-windows true - ..\..\obj.net\$(MSBuildProjectName)\ - ..\..\obj.net\$(MSBuildProjectName)\ - ..\..\bin\$(MSBuildProjectName) - JC-Soft - Copyright © 2022 by JC-Soft false @@ -23,10 +17,10 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -34,6 +28,7 @@ + diff --git a/CSharpBible/ConsoleDisplayTests/View/DisplayTests.cs b/CSharpBible/ConsoleDisplayTests/View/DisplayTests.cs index f7ae41bcf..fe3b627f3 100644 --- a/CSharpBible/ConsoleDisplayTests/View/DisplayTests.cs +++ b/CSharpBible/ConsoleDisplayTests/View/DisplayTests.cs @@ -65,13 +65,13 @@ public void Init() } /// - /// Dones this instance. + /// Clean up this instance. /// [TestCleanup()] - public void Done() + public void CleanUp() { Application.DoEvents(); - Thread.Sleep(500); + Thread.Sleep(100); } /// diff --git a/CSharpBible/ConsoleDisplayTests/View/MyConsoleTests.cs b/CSharpBible/ConsoleDisplayTests/View/MyConsoleTests.cs new file mode 100644 index 000000000..e9ccc4924 --- /dev/null +++ b/CSharpBible/ConsoleDisplayTests/View/MyConsoleTests.cs @@ -0,0 +1,390 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Linq; +using System.Reflection; +using System.Runtime.CompilerServices; + +namespace ConsoleDisplay.View.Tests +{ + + [TestClass()] + public class MyConsoleTests : MyConsole + { + #region Properties + private ConsoleColor _debColorProp; + private string DebugLog = ""; + private int _debIntProp; + private bool _debBoolProp; + private string _debStringProp = ""; + private int _i1; + private int _i2; + private string _st = ""; + + public ConsoleColor DebColorProp + { + get + { + LogDeb("Get", _debColorProp); + return _debColorProp; + } + set + { + LogDeb("Set", value); + _debColorProp = value; + } + } + + public int DebIntProp + { + get + { + LogDeb("Get", _debIntProp); + return _debIntProp; + } + set + { + LogDeb("Set", value); + _debIntProp = value; + } + } + + public bool DebBoolProp + { + get + { + LogDeb("Get", _debBoolProp); + return _debBoolProp; + } + set + { + LogDeb("Set", value); + _debBoolProp = value; + } + } + + public string DebStringProp + { + get + { + LogDeb("Get", _debStringProp); + return _debStringProp; + } + set + { + LogDeb("Set", value); + _debStringProp = value; + } + } + #endregion + + #region Methods + private void LogDeb(string sMethod, object prop, [CallerMemberName] string sProp = "") + => DebugLog += $"{sProp}.{sMethod}({prop}){Environment.NewLine}"; + + public void DebVoidMethod() + => LogDeb("Call", null); + + public ConsoleKeyInfo DebConsKInfoFunc() + { + LogDeb("Call", $"(#{_debIntProp};{(ConsoleKey)_debIntProp})"); + return new ConsoleKeyInfo((char)_debIntProp, (ConsoleKey)_debIntProp,false,false,false ); + } + + public (int, int) DebIntIntFunc() + { + LogDeb("Call", $"({_i1};{_i2})"); + return (_i1, _i2); + } + + public void DebIntIntMethod(int i1, int i2) + => LogDeb("Call", $"({_i1 = i1};{_i2 = i2})"); + + public string DebStringFunc() + { + LogDeb("Call", _st); + return _st; + } + + public void DebStringMethod(string st) + => LogDeb("Call", _st = st); + + public void DebCharMethod(char ch) + => LogDeb("Call", ch); + + [DataTestMethod()] + [DataRow(nameof(foregroundColor))] + [DataRow(nameof(backgroundColor))] + [DataRow(nameof(keyAvailable))] + [DataRow(nameof(windowHeight))] + [DataRow(nameof(windowWidth))] + [DataRow(nameof(largestWindowHeight))] + [DataRow(nameof(title))] + [DataRow(nameof(clear))] + [DataRow(nameof(readKey))] + [DataRow(nameof(write_ch))] + [DataRow(nameof(write_st))] + [DataRow(nameof(setCursorPos))] + [DataRow(nameof(beep_int))] +#if NET6_0_OR_GREATER + [DataRow(nameof(getCursorPos))] +#endif + public void PropertyTest(string name) + { + var pi = GetType().GetProperties(BindingFlags.NonPublic | BindingFlags.Instance).First((p) => p.Name == name)?.GetValue(this); + Assert.IsNotNull(pi); + Assert.IsInstanceOfType(pi, typeof(MemberInfo)); + } + + public bool SetDebugProp() + { + instance = this; + foregroundColor = GetType().GetProperty(nameof(DebColorProp)); + backgroundColor = GetType().GetProperty(nameof(DebColorProp)); + windowHeight = GetType().GetProperty(nameof(DebIntProp)); + windowWidth = GetType().GetProperty(nameof(DebIntProp)); + keyAvailable = GetType().GetProperty(nameof(DebBoolProp)); + largestWindowHeight = GetType().GetProperty(nameof(DebIntProp)); + title = GetType().GetProperty(nameof(DebStringProp)); + + clear = GetType().GetMethod(nameof(DebVoidMethod)); + write_ch = GetType().GetMethod(nameof(DebCharMethod)); + write_st = GetType().GetMethod(nameof(DebStringMethod)); + read_st = GetType().GetMethod(nameof(DebStringFunc)); + setCursorPos = GetType().GetMethod(nameof(DebIntIntMethod)); + getCursorPos = GetType().GetMethod(nameof(DebIntIntFunc)); + readKey = GetType().GetMethod(nameof(DebConsKInfoFunc)); + beep_int = GetType().GetMethod(nameof(DebIntIntMethod)); + return true; + } + + public bool SetDebugProp2() + { + instance = this; + foregroundColor = + backgroundColor = + windowHeight = + windowWidth = + keyAvailable = + largestWindowHeight = + title = null; + + clear = + write_ch = + write_st = + read_st = + setCursorPos = + getCursorPos = + readKey = + beep_int = null; + return true; + } + + + [DataTestMethod()] + [DataRow("Normal Green",0,ConsoleColor.Green,new string[] { "Green", "DebColorProp.Set(Green)\r\nDebColorProp.Get(Green)\r\n" })] + [DataRow("None Green", 1, ConsoleColor.Green, new string[] {"Gray", "" })] + [DataRow("Normal Green", 0, ConsoleColor.Red, new string[] { "Red", "DebColorProp.Set(Red)\r\nDebColorProp.Get(Red)\r\n" })] + [DataRow("None Green", 1, ConsoleColor.Red, new string[] { "Gray", "" })] + public void ForegroundColorTest(string name,int iInit,object oData, object[] aExp) + { + _=iInit switch { 0 => SetDebugProp(), 1 => SetDebugProp2(), _ => true }; + ForegroundColor = (ConsoleColor)oData; + Assert.AreEqual(aExp[0], ForegroundColor.ToString()); + Assert.AreEqual(aExp[1], DebugLog); + } + + [DataTestMethod()] + [DataRow("Normal Green", 0, ConsoleColor.Green, new string[] { "Green", "DebColorProp.Set(Green)\r\nDebColorProp.Get(Green)\r\n" })] + [DataRow("None Green", 1, ConsoleColor.Green, new string[] { "Gray", "" })] + [DataRow("Normal Green", 0, ConsoleColor.Red, new string[] { "Red", "DebColorProp.Set(Red)\r\nDebColorProp.Get(Red)\r\n" })] + [DataRow("None Green", 1, ConsoleColor.Red, new string[] { "Gray", "" })] + public void BackgroundColorTest(string name, int iInit, object oData, object[] aExp) + { + _ = iInit switch { 0 => SetDebugProp(), 1 => SetDebugProp2(), _ => true }; + BackgroundColor = (ConsoleColor)oData; + Assert.AreEqual(aExp[0], BackgroundColor.ToString()); + Assert.AreEqual(aExp[1], DebugLog); + } + + [DataTestMethod()] + [DataRow("Normal 30", 0, 30, new string[] { "30", "DebIntProp.Set(30)\r\nDebIntProp.Get(30)\r\n" })] + [DataRow("None 30", 1, 30, new string[] { "0", "" })] + [DataRow("Normal 60", 0, 60, new string[] { "60", "DebIntProp.Set(60)\r\nDebIntProp.Get(60)\r\n" })] + [DataRow("None 60", 1, 60, new string[] { "0", "" })] + public void WindowHeightTest(string name, int iInit, object oData, object[] aExp) + { + _ = iInit switch { 0 => SetDebugProp(), 1 => SetDebugProp2(), _ => true }; + WindowHeight = (int)oData; + Assert.AreEqual(aExp[0], WindowHeight.ToString()); + Assert.AreEqual(aExp[1], DebugLog); + } + + [DataTestMethod()] + [DataRow("Normal 30", 0, 123, new string[] { "123", "DebIntProp.Set(123)\r\nDebIntProp.Get(123)\r\n" })] + [DataRow("None 30", 1, 123, new string[] { "0", "" })] + [DataRow("Normal 60", 0, 80, new string[] { "80", "DebIntProp.Set(80)\r\nDebIntProp.Get(80)\r\n" })] + [DataRow("None 60", 1, 80, new string[] { "0", "" })] + public void WindowWidthTest(string name, int iInit, object oData, object[] aExp) + { + _ = iInit switch { 0 => SetDebugProp(), 1 => SetDebugProp2(), _ => true }; + WindowWidth = (int)oData; + Assert.AreEqual(aExp[0], WindowWidth.ToString()); + Assert.AreEqual(aExp[1], DebugLog); + } + + [DataTestMethod()] + [DataRow("Normal 30", 0, 30, new string[] { "30", "DebIntProp.Get(30)\r\n" })] + [DataRow("None 30", 1, 30, new string[] { "0", "" })] + [DataRow("Normal 60", 0, 60, new string[] { "60", "DebIntProp.Get(60)\r\n" })] + [DataRow("None 60", 1, 60, new string[] { "0", "" })] + public void LargestWindowHeightTest(string name, int iInit, object oData, object[] aExp) + { + _ = iInit switch { 0 => SetDebugProp(), 1 => SetDebugProp2(), _ => true }; + _debIntProp = (int)oData; + Assert.AreEqual(aExp[0], LargestWindowHeight.ToString()); + Assert.AreEqual(aExp[1], DebugLog); + } + + [DataTestMethod()] + [DataRow("Normal T", 0, true, new string[] { "True", "DebBoolProp.Get(True)\r\n" })] + [DataRow("None T", 1, true, new string[] { "False", "" })] + [DataRow("Normal F", 0, false, new string[] { "False", "DebBoolProp.Get(False)\r\n" })] + [DataRow("None F", 1, false, new string[] { "False", "" })] + public void KeyAvailableTest(string name, int iInit, object oData, object[] aExp) + { + _ = iInit switch { 0 => SetDebugProp(), 1 => SetDebugProp2(), _ => true }; + _debBoolProp = (bool)oData; + Assert.AreEqual(aExp[0], KeyAvailable.ToString()); + Assert.AreEqual(aExp[1], DebugLog); + } + + [DataTestMethod()] + [DataRow("Normal T", 0, true, new string[] { "True", "DebVoidMethod.Call()\r\n" })] + [DataRow("None T", 1, true, new string[] { "False", "" })] + [DataRow("Normal F", 0, false, new string[] { "False", "DebVoidMethod.Call()\r\n" })] + [DataRow("None F", 1, false, new string[] { "False", "" })] + public void ClearTest(string name, int iInit, object oData, object[] aExp) + { + _ = iInit switch { 0 => SetDebugProp(), 1 => SetDebugProp2(), _ => true }; + Clear(); + Assert.AreEqual(aExp[1], DebugLog); + } + + [DataTestMethod()] + [DataRow("Normal X", 0, 'X', new string[] { "X", "DebCharMethod.Call(X)\r\n" })] + [DataRow("None X", 1, 'X', new string[] { "False", "" })] + [DataRow("Normal Y", 0, 'Y', new string[] { "Y", "DebCharMethod.Call(Y)\r\n" })] + [DataRow("None Y", 1, 'Y', new string[] { "False", "" })] + public void WriteTest(string name, int iInit, object oData, object[] aExp) + { + _ = iInit switch { 0 => SetDebugProp(), 1 => SetDebugProp2(), _ => true }; + Write((char)oData); + Assert.AreEqual(aExp[1], DebugLog); + } + + [DataTestMethod()] + [DataRow("Normal X", 0, "Hello World", new string[] { "Hello World", "DebStringMethod.Call(Hello World)\r\n" })] + [DataRow("None X", 1, "Hello World", new string[] { "", "" })] + [DataRow("Normal Y", 0, "To be, or not to be ...", new string[] { "To be, or not to be ...", "DebStringMethod.Call(To be, or not to be ...)\r\n" })] + [DataRow("None Y", 1, "To be, or not to be ...", new string[] { "", "" })] + public void WriteTest1(string name, int iInit, object oData, object[] aExp) + { + _ = iInit switch { 0 => SetDebugProp(), 1 => SetDebugProp2(), _ => true }; + Write((string)oData); + Assert.AreEqual(aExp[0], _st); + Assert.AreEqual(aExp[1], DebugLog); + } + + [DataTestMethod()] + [DataRow("Normal X", 0, "Hello World", new string[] { "Hello World\r\n", "DebStringMethod.Call(Hello World\r\n)\r\n" })] + [DataRow("None X", 1, "Hello World", new string[] { "", "" })] + [DataRow("Normal Y", 0, "To be, or not to be ...", new string[] { "To be, or not to be ...\r\n", "DebStringMethod.Call(To be, or not to be ...\r\n)\r\n" })] + [DataRow("None Y", 1, "To be, or not to be ...", new string[] { "", "" })] + public void WriteLineTest(string name, int iInit, object oData, object[] aExp) + { + _ = iInit switch { 0 => SetDebugProp(), 1 => SetDebugProp2(), _ => true }; + WriteLine((string)oData); + Assert.AreEqual(aExp[0], _st); + Assert.AreEqual(aExp[1], DebugLog); + } + + [DataTestMethod()] + [DataRow("Normal X", 0, "Hello World", new string[] { "Hello World", "DebStringFunc.Call(Hello World)\r\n" })] + [DataRow("None X", 1, "Hello World", new string[] { "", "" })] + [DataRow("Normal Y", 0, "To be, or not to be ...", new string[] { "To be, or not to be ...", "DebStringFunc.Call(To be, or not to be ...)\r\n" })] + [DataRow("None Y", 1, "To be, or not to be ...", new string[] { "", "" })] + [DataRow("Normal", 0, "In this nice country ...", new string[] { "In this nice country ...", "DebStringFunc.Call(In this nice country ...)\r\n" })] + [DataRow("None", 1, "In this nice country ...", new string[] { "", "" })] + public void ReadLineTest(string name, int iInit, object oData, object[] aExp) + { + _ = iInit switch { 0 => SetDebugProp(), 1 => SetDebugProp2(), _ => true }; + _st = (string)oData; + Assert.AreEqual(aExp[0], ReadLine()); + Assert.AreEqual(aExp[1], DebugLog); + } + + [DataTestMethod()] + [DataRow("Normal Hello ...", 0, "Hello World", new string[] { "Hello World", "DebStringProp.Set(Hello World)\r\nDebStringProp.Get(Hello World)\r\n" })] + [DataRow("None X", 1, "Hello World", new string[] { "", "" })] + [DataRow("Normal To be ...", 0, "To be, or not to be ...", new string[] { "To be, or not to be ...", "DebStringProp.Set(To be, or not to be ...)\r\nDebStringProp.Get(To be, or not to be ...)\r\n" })] + [DataRow("None Y", 1, "To be, or not to be ...", new string[] { "", "" })] + public void TitleTest(string name, int iInit, object oData, object[] aExp) + { + _ = iInit switch { 0 => SetDebugProp(), 1 => SetDebugProp2(), _ => true }; + Title=(string)oData; + Assert.AreEqual(aExp[0], Title); + Assert.AreEqual(aExp[1], DebugLog); + } + + [DataTestMethod()] + [DataRow("Normal 50,15", 0, 50,15, new string[] { "(50, 15)", "DebIntIntMethod.Call((50;15))\r\n" })] + [DataRow("None 50,15", 1, 50, 15, new string[] { "(0, 0)", "" })] + [DataRow("Normal 80, 25", 0, 80, 25, new string[] { "(80, 25)", "DebIntIntMethod.Call((80;25))\r\n" })] + [DataRow("None 80, 25", 1, 80, 25, new string[] { "(0, 0)", "" })] + public void SetCursorPositionTest(string name, int iInit, int oData1,int oData2 , object[] aExp) + { + _ = iInit switch { 0 => SetDebugProp(), 1 => SetDebugProp2(), _ => true }; + SetCursorPosition(oData1,oData2); + Assert.AreEqual(aExp[0], (_i1,_i2).ToString() ); + Assert.AreEqual(aExp[1], DebugLog); + } + + [DataTestMethod()] + [DataRow("Normal Hello ...", 0, 65, new string[] { "A,A", "DebConsKInfoFunc.Call((#65;A))\r\n" })] + [DataRow("None X", 1, 65, new string[] { ",", "" })] + [DataRow("Normal To be ...", 0, 127, new string[] { "F16,\x7f", "DebConsKInfoFunc.Call((#127;F16))\r\n" })] + [DataRow("None Y", 1, 127, new string[] { ",", "" })] + [DataRow("Normal To be ...", 0, ConsoleKey.Backspace, new string[] { "Backspace,\x8", "DebConsKInfoFunc.Call((#8;Backspace))\r\n" })] + [DataRow("None Y", 1, ConsoleKey.Backspace, new string[] { ",", "" })] + public void ReadKeyTest(string name, int iInit, object oData, object[] aExp) + { + _ = iInit switch { 0 => SetDebugProp(), 1 => SetDebugProp2(), _ => true }; + _debIntProp = (int)oData; + var cki = ReadKey(); + Assert.AreEqual(aExp[0], $"{cki?.Key},{cki?.KeyChar}"); + Assert.AreEqual(aExp[1], DebugLog); + } + + [TestMethod()] + public void GetCursorPositionTest() + { + SetDebugProp(); + var c = GetCursorPosition(); + Assert.AreEqual(0, c.Left); + Assert.AreEqual(0, c.Top); + (_i1, _i2) = (43, 21); + c = GetCursorPosition(); + Assert.AreEqual(43, c.Left); + Assert.AreEqual(21, c.Top); + Assert.AreEqual("DebIntIntFunc.Call((0;0))\r\nDebIntIntFunc.Call((43;21))\r\n", DebugLog); + } + + [TestMethod()] + public void BeepTest() + { + SetDebugProp(); + Beep(220, 200); + } + #endregion + } +} \ No newline at end of file diff --git a/CSharpBible/ConsoleDisplayTests/View/TestTileDef21.cs b/CSharpBible/ConsoleDisplayTests/View/TestTileDef21.cs index a192e71cb..4982c4371 100644 --- a/CSharpBible/ConsoleDisplayTests/View/TestTileDef21.cs +++ b/CSharpBible/ConsoleDisplayTests/View/TestTileDef21.cs @@ -36,7 +36,7 @@ internal class TestTileDef21 : TileDefBase }; - public override (string[] lines, (ConsoleColor fgr, ConsoleColor bgr)[] colors) GetTileDef(Enum tile) + public override (string[] lines, (ConsoleColor fgr, ConsoleColor bgr)[] colors) GetTileDef(Enum? tile) { (string[] lines, (ConsoleColor fgr, ConsoleColor bgr)[] colors) result = default; result.lines = GetArrayElement(_vTileDefStr, tile); diff --git a/CSharpBible/ConsoleDisplayTests/View/TestTileDef42.cs b/CSharpBible/ConsoleDisplayTests/View/TestTileDef42.cs index 51b56bade..daa742b35 100644 --- a/CSharpBible/ConsoleDisplayTests/View/TestTileDef42.cs +++ b/CSharpBible/ConsoleDisplayTests/View/TestTileDef42.cs @@ -36,7 +36,7 @@ internal class TestTileDef42 : TileDefBase }; - public override (string[] lines, (ConsoleColor fgr, ConsoleColor bgr)[] colors) GetTileDef(Enum tile) + public override (string[] lines, (ConsoleColor fgr, ConsoleColor bgr)[] colors) GetTileDef(Enum? tile) { (string[] lines, (ConsoleColor fgr, ConsoleColor bgr)[] colors) result = default; result.lines = GetArrayElement(_vTileDefStr, tile); diff --git a/CSharpBible/ConsoleDisplayTests/View/TileDefTests.cs b/CSharpBible/ConsoleDisplayTests/View/TileDefTests.cs index 9ed679776..72e0289d7 100644 --- a/CSharpBible/ConsoleDisplayTests/View/TileDefTests.cs +++ b/CSharpBible/ConsoleDisplayTests/View/TileDefTests.cs @@ -60,9 +60,9 @@ internal class TestTileDef : TileDefBase /// Gets the tile definition. /// /// The tile. - /// The visual defintion of the tile + /// The visual definition of the tile /// - public override (string[] lines, (ConsoleColor fgr, ConsoleColor bgr)[] colors) GetTileDef(Enum tile) + public override (string[] lines, (ConsoleColor fgr, ConsoleColor bgr)[] colors) GetTileDef(Enum? tile) { throw new NotImplementedException(); } @@ -173,7 +173,7 @@ public void GetArrayElementTest3() if (i < array.Length) Assert.AreEqual(array[i], TestTileDef.TestGetArrayElement(array, (TestEnum)i)); else - Assert.AreEqual(array[array.Length-1], TestTileDef.TestGetArrayElement(array, (TestEnum)i)); + Assert.AreEqual(array[^1], TestTileDef.TestGetArrayElement(array, (TestEnum)i)); } diff --git a/CSharpBible/ConsoleDisplayTests/View/TileDisplayHexTests.cs b/CSharpBible/ConsoleDisplayTests/View/TileDisplayHexTests.cs index 9efd147cf..032511a49 100644 --- a/CSharpBible/ConsoleDisplayTests/View/TileDisplayHexTests.cs +++ b/CSharpBible/ConsoleDisplayTests/View/TileDisplayHexTests.cs @@ -1,32 +1,57 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; -using System.Drawing; -using System.Threading; -using System.Windows.Forms; using TestConsole; +using System.Drawing; +using static BaseLib.Helper.TestHelper; +using System; namespace ConsoleDisplay.View.Tests { - [TestClass()] + [TestClass()] public class HexMathTests { + static System.Collections.Generic.IEnumerable PointHexTestData => new[]{ + new object[]{"Zero", new float[] { 0f, 0f }, false, new float[] { 0f, 0f }}, + new object[] { "(0,1)", new float[] { 0f, 1f }, false, new float[] { 0.5f, 1f } }, + new object[] { "(0,2)", new float[] { 0f, 2f }, false, new float[] { 0f, 2f } }, + new object[] { "(1,0)", new float[] { 1f, 0f }, false, new float[] { 1f, 0f } }, + new object[] { "(1,1)", new float[] { 1f, 1f }, false, new float[] { 1.5f, 1f } }, + new object[] { "(1,2)", new float[] { 1f, 2f }, false, new float[] { 1f, 2f } }, + new object[] { "(2,0)", new float[] { 2f, 0f }, false, new float[] { 2f, 0f } }, + new object[] { "(2,1)", new float[] { 2f, 1f }, false, new float[] { 2.5f, 1f } }, + new object[] { "(2,2)", new float[] { 2f, 2f }, false, new float[] { 2f, 2f } }, + new object[] { "Zero", new float[] { 0f, 0f }, true, new float[] { 0f, 0f } }, + new object[] { "(0,1)", new float[] { 0f, 1f }, true, new float[] { 0f, 1f } }, + new object[] { "(0,2)", new float[] { 0f, 2f }, true, new float[] { 0f, 2f } }, + new object[] { "(1,0)", new float[] { 1f, 0f }, true, new float[] { 1f, 0.5f } }, + new object[] { "(1,1)", new float[] { 1f, 1f }, true, new float[] { 1f, 1.5f } }, + new object[] { "(1,2)", new float[] { 1f, 2f }, true, new float[] { 1f, 2.5f } }, + new object[] { "(2,0)", new float[] { 2f, 0f }, true, new float[] { 2f, 0f } }, + new object[] { "(2,1)", new float[] { 2f, 1f }, true, new float[] { 2f, 1f } }, + new object[] { "(2,2)", new float[] { 2f, 2f }, true, new float[] { 2f, 2f } }, + }; + + static System.Collections.Generic.IEnumerable ZigZagTestData => new[] { + new object[]{"Zero", 0f, 0f}, + new object[]{"One", 1f, 1f}, + new object[]{"-One", -1f, 1f}, + new object[]{"Two", 2f, 0f}, + new object[]{"-1.5", -1.5f, 0.5f}, + new object[]{"-0.5", -0.5f, 0.5f}, + new object[]{" 0.5", 0.5f, 0.5f}, + new object[]{" 1.5", 1.5f, 0.5f}, + new object[]{"-1.75", -1.75f, 0.25f}, + new object[]{"-1.25", -1.25f, 0.75f}, + new object[]{"-0.75", -0.75f, 0.75f}, + new object[]{"-0.25", -0.25f, 0.25f}, + new object[]{" 0.25", 0.25f, 0.25f}, + new object[]{" 0.75", 0.75f, 0.75f}, + new object[]{" 1.25", 1.25f, 0.75f}, + new object[]{" 1.75", 1.75f, 0.25f}, + }; + [DataTestMethod()] [TestProperty("Author", "J.C.")] - [DataRow("Zero", 0f, 0f)] - [DataRow("One", 1f, 1f)] - [DataRow("-One", -1f, 1f)] - [DataRow("Two", 2f, 0f)] - [DataRow("-1.5", -1.5f, 0.5f)] - [DataRow("-0.5", -0.5f, 0.5f)] - [DataRow(" 0.5", 0.5f, 0.5f)] - [DataRow(" 1.5", 1.5f, 0.5f)] - [DataRow("-1.75", -1.75f, 0.25f)] - [DataRow("-1.25", -1.25f, 0.75f)] - [DataRow("-0.75", -0.75f, 0.75f)] - [DataRow("-0.25", -0.25f, 0.25f)] - [DataRow(" 0.25", 0.25f, 0.25f)] - [DataRow(" 0.75", 0.75f, 0.75f)] - [DataRow(" 1.25", 1.25f, 0.75f)] - [DataRow(" 1.75", 1.75f, 0.25f)] + [TestCategory("Math")] + [DynamicData(nameof(ZigZagTestData))] public void ZigZagTest(string name, float fVal, float fExp) { for (var i = 0; i < 1000; i++) { Assert.AreEqual(fExp, HexMath.ZigZag(fVal), 1e-5, $"{name}({fVal})"); @@ -35,43 +60,78 @@ public void ZigZagTest(string name, float fVal, float fExp) { } } - [DataTestMethod()] + [DataTestMethod()] + [TestProperty("Author", "J.C.")] + [TestCategory("Math")] + [DynamicData(nameof(ZigZagTestData))] + public void ZigZagTest1(string name, float fVal, float fExp) + { + for (var i = 0; i < 1000; i++) + { + Assert.AreEqual(fExp, fVal.ZigZag(), 1e-5, $"{name}({fVal})"); + Assert.AreEqual(fExp, (fVal + 1e-6f).ZigZag(), 1e-5, $"{name}({fVal + 1e-6f})"); + Assert.AreEqual(fExp, (fVal - 1e-6f).ZigZag(), 1e-5, $"{name}({fVal - 1e-6f})"); + } + } + + [DataTestMethod()] [TestProperty("Author", "J.C.")] - [DataRow("Zero", new float[] {0f, 0f},false, new float[] { 0f, 0f })] - [DataRow("(0,1)", new float[] { 0f, 1f }, false, new float[] { 0.5f, 1f })] - [DataRow("(0,2)", new float[] { 0f, 2f }, false, new float[] { 0f, 2f })] - [DataRow("(1,0)", new float[] { 1f, 0f }, false, new float[] { 1f, 0f })] - [DataRow("(1,1)", new float[] { 1f, 1f }, false, new float[] { 1.5f, 1f })] - [DataRow("(1,2)", new float[] { 1f, 2f }, false, new float[] { 1f, 2f })] - [DataRow("(2,0)", new float[] { 2f, 0f }, false, new float[] { 2f, 0f })] - [DataRow("(2,1)", new float[] { 2f, 1f }, false, new float[] { 2.5f, 1f })] - [DataRow("(2,2)", new float[] { 2f, 2f }, false, new float[] { 2f, 2f })] - [DataRow("Zero", new float[] { 0f, 0f }, true, new float[] { 0f, 0f })] - [DataRow("(0,1)", new float[] { 0f, 1f }, true, new float[] { 0f, 1f })] - [DataRow("(0,2)", new float[] { 0f, 2f }, true, new float[] { 0f, 2f })] - [DataRow("(1,0)", new float[] { 1f, 0f }, true, new float[] { 1f, 0.5f })] - [DataRow("(1,1)", new float[] { 1f, 1f }, true, new float[] { 1f, 1.5f })] - [DataRow("(1,2)", new float[] { 1f, 2f }, true, new float[] { 1f, 2.5f })] - [DataRow("(2,0)", new float[] { 2f, 0f }, true, new float[] { 2f, 0f })] - [DataRow("(2,1)", new float[] { 2f, 1f }, true, new float[] { 2f, 1f })] - [DataRow("(2,2)", new float[] { 2f, 2f }, true, new float[] { 2f, 2f })] - public void HexPointFTest(string name, float[] fVal,bool xVal, float[] fExp) { + [TestCategory("Math")] + [DynamicData(nameof(PointHexTestData))] + public void HexPointFTest(string name, float[] fVal,bool xVal, float[] fExp) { var pfExp = new PointF(fExp[0], fExp[1]); Assert.AreEqual(pfExp, HexMath.HexPointF((fVal[0], fVal[1]),xVal), $"{name}({fVal[0]},{fVal[1]})"); } - } - [TestClass()] + [DataTestMethod()] + [TestProperty("Author", "J.C.")] + [TestCategory("Math")] + [DynamicData(nameof(PointHexTestData))] + public void HexPointFTest2(string name, float[] fVal, bool xVal, float[] fExp) + { + var pfExp = new PointF(fExp[0], fExp[1]); + Assert.AreEqual(pfExp, (fVal[0], fVal[1]).HexPointF(xVal), $"{name}({fVal[0]},{fVal[1]})"); + } + + [DataTestMethod()] + [TestProperty("Author", "J.C.")] + [TestCategory("Math")] + [DynamicData(nameof(PointHexTestData))] + public void HexPointTest(string name, float[] fVal, bool xVal, float[] fExp) + { + var pfExp = new Point((int)Math.Round(fExp[0]), (int)Math.Round(fExp[1])); + Assert.AreEqual(pfExp, HexMath.HexKPoint((fVal[0], fVal[1]), xVal), $"{name}({fVal[0]},{fVal[1]})"); + } + + [DataTestMethod()] + [TestProperty("Author", "J.C.")] + [TestCategory("Math")] + [DynamicData(nameof(PointHexTestData))] + public void HexPointTest2(string name, float[] fVal, bool xVal, float[] fExp) + { + var pfExp = new Point((int)Math.Round(fExp[0]), (int)Math.Round(fExp[1])); + Assert.AreEqual(pfExp, (fVal[0], fVal[1]).HexKPoint(xVal), $"{name}({fVal[0]},{fVal[1]})"); + } + + } + + [TestClass()] public class TileDisplayHexTests { static TileDisplayHexTests() { - TileDisplayHex.defaultTile = (Enum)VTiles.zero; + TileDisplayHex.defaultTile = VTiles.zero; TileDisplayHex.tileDef = new TestTileDef42(); } + private void Application_DoEvents() => + System.Windows.Forms.Application.DoEvents(); + + private void Thread_Sleep(int _) => + System.Threading.Thread.Sleep(0); + private static MyConsoleBase? console; - private static TstConsole _tstCon; + private static TstConsole? _tstCon; private readonly string cExpWriteTile=@"\c00 \x00\x00\x00\x00\x00\x00\x00\x00\c4F─┴┬─\c00\x00\x00\x00\x00\x00\x00\x00\x00\c6F⌐°@)\c00\x00\x00\x00\x00\x00\x00\x00\x00\c1A]\cA0°°\c1A[\c00 \x00\x00\c6E=-=-\c00\x00\x00\c4F─┬┴─\c00\x00\x00\c0E ╓╖ \c00\x00\x00\c6F ⌡⌡‼\c00\x00\x00\c6E/¯¯\\\c00\x00\x00\c1A_\cA0!!\c1A_\c00\x00\x00\c1A◄\cA0°@\c1A[\c00 \c1A]\cA0oo\c1A[\c00\x00\x00\c6E-=-=\c00\x00\x00\c6E/╨╨\\\c00\x00\x00\c2A▓\c22░\c02▒\c22▓\c00\x00\x00\x00\x00\x00\x00\x00\x00\c6E\\__/\c00\x00\x00\x00\x00\x00\x00\x00\x00\c1A_\cA0!!\c1A\\\c00 @@ -202,7 +262,7 @@ static TileDisplayHexTests() public void Init() { TileDisplayHex.myConsole = console ?? ( console= _tstCon = new TstConsole()); - Application.DoEvents(); + Application_DoEvents(); console.Clear(); } @@ -219,21 +279,21 @@ public void TileDisplayTest1() foreach (VTiles tile in typeof(VTiles).GetEnumValues()) { tileDisplayHex.WriteTile(new PointF((((int)tile) % 3) * 1.5f-0.5f, (((int)tile) % 2) * 0.5f + (((int)tile) / 3) * 1.5f-0.5f), tile); - Thread.Sleep(0); + Thread_Sleep(0); } - Application.DoEvents(); - Assert.AreEqual(cTileDisplayTest1, _tstCon.Content); + System.Windows.Forms.Application.DoEvents(); + Assert.AreEqual(cTileDisplayTest1, _tstCon?.Content); tileDisplayHex = new TileDisplayHex(new Point(62, 12), new Size(3, 5)); foreach (VTiles tile in typeof(VTiles).GetEnumValues()) { tileDisplayHex.WriteTile(new PointF((((int)tile) % 3) * 1.5f - 0.5f, (((int)tile) % 2) * 0.5f + (((int)tile) / 3) * 1.5f - 0.5f), tile); - Thread.Sleep(0); + Thread_Sleep(0); } - Application.DoEvents(); - Assert.AreEqual(cTileDisplayTest12, _tstCon.Content); + System.Windows.Forms.Application.DoEvents(); + Assert.AreEqual(cTileDisplayTest12, _tstCon?.Content); - Thread.Sleep(500); + Thread_Sleep(100); } [TestMethod()] @@ -243,33 +303,35 @@ public void TileDisplayTest2() foreach (VTiles tile in typeof(VTiles).GetEnumValues()) { tileDisplayHex.WriteTile(new PointF((((int)tile) % 3) * 1.5f - 0.5f, (((int)tile) % 2) * 0.5f + (((int)tile) / 3) * 1.5f - 0.5f), tile); - Thread.Sleep(0); + Thread_Sleep(0); } - Application.DoEvents(); - Assert.AreEqual(cTileDisplayTest2, _tstCon.Content); + Application_DoEvents(); + Assert.AreEqual(cTileDisplayTest2, _tstCon?.Content); tileDisplayHex = new TileDisplayHex(new Point(62, 12), new Size(3, 5),new Size(2, 2)); foreach (VTiles tile in typeof(VTiles).GetEnumValues()) { tileDisplayHex.WriteTile(new PointF((((int)tile) % 3) * 1.5f - 0.5f, (((int)tile) % 2) * 0.5f + (((int)tile) / 3) * 1.5f - 0.5f), tile); - Thread.Sleep(0); + Thread_Sleep(0); } - Application.DoEvents(); - Assert.AreEqual(cTileDisplayTest22, _tstCon.Content); + Application_DoEvents(); + Assert.AreEqual(cTileDisplayTest22, _tstCon?.Content); tileDisplayHex = new TileDisplayHex(new Point(40, 6), new Size(3, 5), new Size(4, 2)); - var tileDisplay2 = new TileDisplayHex(new Point(32, 8), new Size(3, 5),new Size(2,1)); - tileDisplay2.TileDef = new TestTileDef21(); + var tileDisplay2 = new TileDisplayHex(new Point(32, 8), new Size(3, 5), new Size(2, 1)) + { + TileDef = new TestTileDef21() + }; foreach (VTiles tile in typeof(VTiles).GetEnumValues()) { tileDisplayHex.WriteTile(new PointF((((int)tile) % 3) * 1.5f - 0.5f, (((int)tile) % 2) * 0.5f + (((int)tile) / 3) * 1.5f - 0.5f), tile); tileDisplay2.WriteTile(new PointF((((int)tile) % 3) * 1.5f - 0.5f, (((int)tile) % 2) * 0.5f + (((int)tile) / 3) * 1.5f - 0.5f), tile); - Thread.Sleep(0); + Thread_Sleep(0); } - Application.DoEvents(); - Assert.AreEqual(cTileDisplayTest23, _tstCon.Content); + Application_DoEvents(); + Assert.AreEqual(cTileDisplayTest23, _tstCon?.Content); - Thread.Sleep(500); + Thread_Sleep(100); } [TestMethod()] @@ -278,10 +340,10 @@ public void WriteTileTest() foreach (VTiles tile in typeof(VTiles).GetEnumValues()) { TileDisplayHex.WriteTile(Point.Empty, new PointF((((int)tile) % 8) * 1.5f, (((int)tile) % 2) * 0.5f + (((int)tile) / 8)), tile); - Thread.Sleep(0); + Thread_Sleep(0); } - Assert.AreEqual(cExpWriteTile, _tstCon.Content); - Thread.Sleep(500); + Assert.AreEqual(cExpWriteTile, _tstCon?.Content); + Thread_Sleep(100); } [DataTestMethod()] @@ -305,19 +367,19 @@ public void FullRedrawTest(string name,VTiles vt,string sExp) { tileDisplayHex.FncGetTile = (p) => (VTiles)(p.X + p.Y * tileDisplayHex.DispSize.Width); tileDisplayHex.FullRedraw(); - Application.DoEvents(); - Assert.AreEqual(cTileDisplayTest3, _tstCon.Content); - Thread.Sleep(500); + Application_DoEvents(); + Assert.AreEqual(cTileDisplayTest3, _tstCon?.Content,name); + Thread_Sleep(100); } tileDisplayHex.FncGetTile = (p) => vt; tileDisplayHex.FullRedraw(); - Application.DoEvents(); - Assert.AreEqual(sExp, _tstCon.Content); + Application_DoEvents(); + Assert.AreEqual(sExp, _tstCon?.Content,name); - Thread.Sleep(500); + Thread_Sleep(100); } - [DataTestMethod()] + [DataTestMethod()] [TestProperty("Author", "J.C.")] [DataRow("00 _", VTiles.zero, VTiles.zero, new string[] { "\\c00\\x00\\x00 \r\n\\x00\\x00\\x00 \r\n\\x00\\x00 \r\n\\x00\\x00\\x00" , @@ -330,137 +392,200 @@ public void FullRedrawTest(string name,VTiles vt,string sExp) "\\c00\\x00\\x00 \r\n\\x00\\x00\\x00 \\c4F|_|_\\c00 \r\n\\x00\\x00 \\c4F|_|_\\c00 \r\n\\x00\\x00\\x00"})] [DataRow("03 _", VTiles.Dest, VTiles.zero, new string[] { "\\c00\\x00\\x00 \r\n\\x00\\x00\\x00 \\c0E╓╖\\c00 \\c0E╓╖\\c00\r\n\\x00\\x00 \\c0E╓╖\\c00 \\c0E╓╖\\c00 \r\n\\x00\\x00\\x00" , - "\\c00\\x00\\x00 \r\n\\x00\\x00\\x00 \\c0E╓╖╓╖╖\\c00 \r\n\\x00\\x00 \\c0E╓╖╓╖\\c00 \r\n\\x00\\x00\\x00"})] + "\\c00\\x00\\x00 \r\n\\x00\\x00\\x00 \\c0E╓╖╓╖\\c00 \r\n\\x00\\x00 \\c0E╓╖╓╖\\c00 \r\n\\x00\\x00\\x00"})] [DataRow("04 _", VTiles.Player, VTiles.zero, new string[] { "\\c00\\x00\\x00 \r\n\\x00\\x00\\x00 \\c6F⌐@\\c00 \\c6F⌐@\\c00\r\n\\x00\\x00 \\c6F⌐@\\c00 \\c6F⌐@\\c00 \r\n\\x00\\x00\\x00" , - "\\c00\\x00\\x00 \r\n\\x00\\x00\\x00 \\c6F⌐@⌐@@\\c00 \r\n\\x00\\x00 \\c6F⌐@⌐@\\c00 \r\n\\x00\\x00\\x00"})] + "\\c00\\x00\\x00 \r\n\\x00\\x00\\x00 \\c6F⌐@⌐@\\c00 \r\n\\x00\\x00 \\c6F⌐@⌐@\\c00 \r\n\\x00\\x00\\x00"})] [DataRow("05 _", VTiles.Boulder, VTiles.zero, new string[] { "\\c00\\x00\\x00 \r\n\\x00\\x00\\x00 \\c6E[]\\c00 \\c6E[]\\c00\r\n\\x00\\x00 \\c6E[]\\c00 \\c6E[]\\c00 \r\n\\x00\\x00\\x00" , - "\\c00\\x00\\x00 \r\n\\x00\\x00\\x00 \\c6E[][]]\\c00 \r\n\\x00\\x00 \\c6E[][]\\c00 \r\n\\x00\\x00\\x00"})] + "\\c00\\x00\\x00 \r\n\\x00\\x00\\x00 \\c6E[][]\\c00 \r\n\\x00\\x00 \\c6E[][]\\c00 \r\n\\x00\\x00\\x00"})] [DataRow("10 _", VTiles.zero, VTiles.tile1, new string[] { "\\c00\\x00\\x00\\c6E=-=-=-=-\\c00\r\n\\x00\\x00\\x00\\c6E=\\c00 \\c6E-=\\c00 \r\n\\x00\\x00\\c6E=\\c00 \\c6E-=\\c00 \\c6E-\\c00\r\n\\x00\\x00\\x00\\c6E=-=-=-=\\c00" , - "\\c00\\x00\\x00\\c6E=-=-=-=-\\c00\r\n\\x00\\x00\\x00\\c6E=\\c00 \\c6E=\\c00\r\n\\x00\\x00\\c6E=-\\c00 \\c6E=-\\c00\r\n\\x00\\x00\\x00\\c6E=-=-=-=\\c00"})] + "\\c00\\x00\\x00\\c6E=-=-=-=-\\c00\r\n\\x00\\x00\\x00\\c6E=-\\c00 \\c6E=\\c00\r\n\\x00\\x00\\c6E=-\\c00 \\c6E=-\\c00\r\n\\x00\\x00\\x00\\c6E=-=-=-=\\c00"})] [DataRow("11 _", VTiles.tile1, VTiles.tile1, new string[] { "\\c00\\x00\\x00\\c6E=-=-=-=-\\c00\r\n\\x00\\x00\\x00\\c6E==--==-\\c00\r\n\\x00\\x00\\c6E==--==--\\c00\r\n\\x00\\x00\\x00\\c6E=-=-=-=\\c00" , - "\\c00\\x00\\x00\\c6E=-=-=-=-\\c00\r\n\\x00\\x00\\x00\\c6E==-=--=\\c00\r\n\\x00\\x00\\c6E=-=-=-=-\\c00\r\n\\x00\\x00\\x00\\c6E=-=-=-=\\c00"})] + "\\c00\\x00\\x00\\c6E=-=-=-=-\\c00\r\n\\x00\\x00\\x00\\c6E=-=-=-=\\c00\r\n\\x00\\x00\\c6E=-=-=-=-\\c00\r\n\\x00\\x00\\x00\\c6E=-=-=-=\\c00"})] [DataRow("12 _", VTiles.Wall, VTiles.tile1, new string[] { "\\c00\\x00\\x00\\c6E=-=-=-=-\\c00\r\n\\x00\\x00\\x00\\c6E=\\c4F|_\\c6E-=\\c4F|_\\c00\r\n\\x00\\x00\\c6E=\\c4F|_\\c6E-=\\c4F|_\\c6E-\\c00\r\n\\x00\\x00\\x00\\c6E=-=-=-=\\c00" , - "\\c00\\x00\\x00\\c6E=-=-=-=-\\c00\r\n\\x00\\x00\\x00\\c6E=\\c4F|_|__\\c6E=\\c00\r\n\\x00\\x00\\c6E=-\\c4F|_|_\\c6E=-\\c00\r\n\\x00\\x00\\x00\\c6E=-=-=-=\\c00"})] + "\\c00\\x00\\x00\\c6E=-=-=-=-\\c00\r\n\\x00\\x00\\x00\\c6E=-\\c4F|_|_\\c6E=\\c00\r\n\\x00\\x00\\c6E=-\\c4F|_|_\\c6E=-\\c00\r\n\\x00\\x00\\x00\\c6E=-=-=-=\\c00"})] [DataRow("13 _", VTiles.Dest, VTiles.tile1, new string[] { "\\c00\\x00\\x00\\c6E=-=-=-=-\\c00\r\n\\x00\\x00\\x00\\c6E=\\c0E╓╖\\c6E-=\\c0E╓╖\\c00\r\n\\x00\\x00\\c6E=\\c0E╓╖\\c6E-=\\c0E╓╖\\c6E-\\c00\r\n\\x00\\x00\\x00\\c6E=-=-=-=\\c00" , - "\\c00\\x00\\x00\\c6E=-=-=-=-\\c00\r\n\\x00\\x00\\x00\\c6E=\\c0E╓╖╓╖╖\\c6E=\\c00\r\n\\x00\\x00\\c6E=-\\c0E╓╖╓╖\\c6E=-\\c00\r\n\\x00\\x00\\x00\\c6E=-=-=-=\\c00"})] + "\\c00\\x00\\x00\\c6E=-=-=-=-\\c00\r\n\\x00\\x00\\x00\\c6E=-\\c0E╓╖╓╖\\c6E=\\c00\r\n\\x00\\x00\\c6E=-\\c0E╓╖╓╖\\c6E=-\\c00\r\n\\x00\\x00\\x00\\c6E=-=-=-=\\c00"})] [DataRow("14 _", VTiles.Player, VTiles.tile1, new string[] { "\\c00\\x00\\x00\\c6E=-=-=-=-\\c00\r\n\\x00\\x00\\x00\\c6E=\\c6F⌐@\\c6E-=\\c6F⌐@\\c00\r\n\\x00\\x00\\c6E=\\c6F⌐@\\c6E-=\\c6F⌐@\\c6E-\\c00\r\n\\x00\\x00\\x00\\c6E=-=-=-=\\c00" , - "\\c00\\x00\\x00\\c6E=-=-=-=-\\c00\r\n\\x00\\x00\\x00\\c6E=\\c6F⌐@⌐@@\\c6E=\\c00\r\n\\x00\\x00\\c6E=-\\c6F⌐@⌐@\\c6E=-\\c00\r\n\\x00\\x00\\x00\\c6E=-=-=-=\\c00"})] + "\\c00\\x00\\x00\\c6E=-=-=-=-\\c00\r\n\\x00\\x00\\x00\\c6E=-\\c6F⌐@⌐@\\c6E=\\c00\r\n\\x00\\x00\\c6E=-\\c6F⌐@⌐@\\c6E=-\\c00\r\n\\x00\\x00\\x00\\c6E=-=-=-=\\c00"})] [DataRow("15 _", VTiles.Boulder, VTiles.tile1, new string[] { "\\c00\\x00\\x00\\c6E=-=-=-=-\\c00\r\n\\x00\\x00\\x00\\c6E=[]-=[]\\c00\r\n\\x00\\x00\\c6E=[]-=[]-\\c00\r\n\\x00\\x00\\x00\\c6E=-=-=-=\\c00" , - "\\c00\\x00\\x00\\c6E=-=-=-=-\\c00\r\n\\x00\\x00\\x00\\c6E=[][]]=\\c00\r\n\\x00\\x00\\c6E=-[][]=-\\c00\r\n\\x00\\x00\\x00\\c6E=-=-=-=\\c00"})] + "\\c00\\x00\\x00\\c6E=-=-=-=-\\c00\r\n\\x00\\x00\\x00\\c6E=-[][]=\\c00\r\n\\x00\\x00\\c6E=-[][]=-\\c00\r\n\\x00\\x00\\x00\\c6E=-=-=-=\\c00"})] [DataRow("20 _", VTiles.zero, VTiles.Wall, new string[] { "\\c00\\x00\\x00\\c4F|_|_|_|_\\c00\r\n\\x00\\x00\\x00\\c4F|\\c00 \\c4F_|\\c00 \r\n\\x00\\x00\\c4F|\\c00 \\c4F_|\\c00 \\c4F_\\c00\r\n\\x00\\x00\\x00\\c4F|_|_|_|\\c00" , - "\\c00\\x00\\x00\\c4F|_|_|_|_\\c00\r\n\\x00\\x00\\x00\\c4F|\\c00 \\c4F|\\c00\r\n\\x00\\x00\\c4F|_\\c00 \\c4F|_\\c00\r\n\\x00\\x00\\x00\\c4F|_|_|_|\\c00"})] + "\\c00\\x00\\x00\\c4F|_|_|_|_\\c00\r\n\\x00\\x00\\x00\\c4F|_\\c00 \\c4F|\\c00\r\n\\x00\\x00\\c4F|_\\c00 \\c4F|_\\c00\r\n\\x00\\x00\\x00\\c4F|_|_|_|\\c00"})] [DataRow("21 _", VTiles.tile1, VTiles.Wall, new string[] { "\\c00\\x00\\x00\\c4F|_|_|_|_\\c00\r\n\\x00\\x00\\x00\\c4F|\\c6E=-\\c4F_|\\c6E=-\\c00\r\n\\x00\\x00\\c4F|\\c6E=-\\c4F_|\\c6E=-\\c4F_\\c00\r\n\\x00\\x00\\x00\\c4F|_|_|_|\\c00", - "\\c00\\x00\\x00\\c4F|_|_|_|_\\c00\r\n\\x00\\x00\\x00\\c4F|\\c6E=-=--\\c4F|\\c00\r\n\\x00\\x00\\c4F|_\\c6E=-=-\\c4F|_\\c00\r\n\\x00\\x00\\x00\\c4F|_|_|_|\\c00" })] + "\\c00\\x00\\x00\\c4F|_|_|_|_\\c00\r\n\\x00\\x00\\x00\\c4F|_\\c6E=-=-\\c4F|\\c00\r\n\\x00\\x00\\c4F|_\\c6E=-=-\\c4F|_\\c00\r\n\\x00\\x00\\x00\\c4F|_|_|_|\\c00" })] [DataRow("22 _", VTiles.Wall, VTiles.Wall, new string[] { "\\c00\\x00\\x00\\c4F|_|_|_|_\\c00\r\n\\x00\\x00\\x00\\c4F||__||_\\c00\r\n\\x00\\x00\\c4F||__||__\\c00\r\n\\x00\\x00\\x00\\c4F|_|_|_|\\c00", - "\\c00\\x00\\x00\\c4F|_|_|_|_\\c00\r\n\\x00\\x00\\x00\\c4F||_|__|\\c00\r\n\\x00\\x00\\c4F|_|_|_|_\\c00\r\n\\x00\\x00\\x00\\c4F|_|_|_|\\c00" })] + "\\c00\\x00\\x00\\c4F|_|_|_|_\\c00\r\n\\x00\\x00\\x00\\c4F|_|_|_|\\c00\r\n\\x00\\x00\\c4F|_|_|_|_\\c00\r\n\\x00\\x00\\x00\\c4F|_|_|_|\\c00" })] [DataRow("23 _", VTiles.Dest, VTiles.Wall, new string[] { "\\c00\\x00\\x00\\c4F|_|_|_|_\\c00\r\n\\x00\\x00\\x00\\c4F|\\c0E╓╖\\c4F_|\\c0E╓╖\\c00\r\n\\x00\\x00\\c4F|\\c0E╓╖\\c4F_|\\c0E╓╖\\c4F_\\c00\r\n\\x00\\x00\\x00\\c4F|_|_|_|\\c00", - "" })] + @"\c00\x00\x00\c4F|_|_|_|_\c00 +\x00\x00\x00\c4F|_\c0E╓╖╓╖\c4F|\c00 +\x00\x00\c4F|_\c0E╓╖╓╖\c4F|_\c00 +\x00\x00\x00\c4F|_|_|_|\c00" })] [DataRow("24 _", VTiles.Player, VTiles.Wall, new string[] { "\\c00\\x00\\x00\\c4F|_|_|_|_\\c00\r\n\\x00\\x00\\x00\\c4F|\\c6F⌐@\\c4F_|\\c6F⌐@\\c00\r\n\\x00\\x00\\c4F|\\c6F⌐@\\c4F_|\\c6F⌐@\\c4F_\\c00\r\n\\x00\\x00\\x00\\c4F|_|_|_|\\c00", - "" })] + @"\c00\x00\x00\c4F|_|_|_|_\c00 +\x00\x00\x00\c4F|_\c6F⌐@⌐@\c4F|\c00 +\x00\x00\c4F|_\c6F⌐@⌐@\c4F|_\c00 +\x00\x00\x00\c4F|_|_|_|\c00" })] [DataRow("25 _", VTiles.Boulder, VTiles.Wall, new string[] { "\\c00\\x00\\x00\\c4F|_|_|_|_\\c00\r\n\\x00\\x00\\x00\\c4F|\\c6E[]\\c4F_|\\c6E[]\\c00\r\n\\x00\\x00\\c4F|\\c6E[]\\c4F_|\\c6E[]\\c4F_\\c00\r\n\\x00\\x00\\x00\\c4F|_|_|_|\\c00", - "" })] + @"\c00\x00\x00\c4F|_|_|_|_\c00 +\x00\x00\x00\c4F|_\c6E[][]\c4F|\c00 +\x00\x00\c4F|_\c6E[][]\c4F|_\c00 +\x00\x00\x00\c4F|_|_|_|\c00" })] [DataRow("30 _", VTiles.zero, VTiles.Dest, new string[] { "\\c00\\x00\\x00\\c0E╓╖╓╖╓╖╓╖\\c00\r\n\\x00\\x00\\x00\\c0E╓\\c00 \\c0E╖╓\\c00 \r\n\\x00\\x00\\c0E╓\\c00 \\c0E╖╓\\c00 \\c0E╖\\c00\r\n\\x00\\x00\\x00\\c0E╓╖╓╖╓╖╓\\c00", - "" })] + @"\c00\x00\x00\c0E╓╖╓╖╓╖╓╖\c00 +\x00\x00\x00\c0E╓╖\c00 \c0E╓\c00 +\x00\x00\c0E╓╖\c00 \c0E╓╖\c00 +\x00\x00\x00\c0E╓╖╓╖╓╖╓\c00" })] [DataRow("31 _", VTiles.tile1, VTiles.Dest, new string[] { "\\c00\\x00\\x00\\c0E╓╖╓╖╓╖╓╖\\c00\r\n\\x00\\x00\\x00\\c0E╓\\c6E=-\\c0E╖╓\\c6E=-\\c00\r\n\\x00\\x00\\c0E╓\\c6E=-\\c0E╖╓\\c6E=-\\c0E╖\\c00\r\n\\x00\\x00\\x00\\c0E╓╖╓╖╓╖╓\\c00", - "" })] + @"\c00\x00\x00\c0E╓╖╓╖╓╖╓╖\c00 +\x00\x00\x00\c0E╓╖\c6E=-=-\c0E╓\c00 +\x00\x00\c0E╓╖\c6E=-=-\c0E╓╖\c00 +\x00\x00\x00\c0E╓╖╓╖╓╖╓\c00" })] [DataRow("32 _", VTiles.Wall, VTiles.Dest, new string[] { "\\c00\\x00\\x00\\c0E╓╖╓╖╓╖╓╖\\c00\r\n\\x00\\x00\\x00\\c0E╓\\c4F|_\\c0E╖╓\\c4F|_\\c00\r\n\\x00\\x00\\c0E╓\\c4F|_\\c0E╖╓\\c4F|_\\c0E╖\\c00\r\n\\x00\\x00\\x00\\c0E╓╖╓╖╓╖╓\\c00", - "" })] + @"\c00\x00\x00\c0E╓╖╓╖╓╖╓╖\c00 +\x00\x00\x00\c0E╓╖\c4F|_|_\c0E╓\c00 +\x00\x00\c0E╓╖\c4F|_|_\c0E╓╖\c00 +\x00\x00\x00\c0E╓╖╓╖╓╖╓\c00" })] [DataRow("33 _", VTiles.Dest, VTiles.Dest, new string[] { "\\c00\\x00\\x00\\c0E╓╖╓╖╓╖╓╖\\c00\r\n\\x00\\x00\\x00\\c0E╓╓╖╖╓╓╖\\c00\r\n\\x00\\x00\\c0E╓╓╖╖╓╓╖╖\\c00\r\n\\x00\\x00\\x00\\c0E╓╖╓╖╓╖╓\\c00", - "" })] + @"\c00\x00\x00\c0E╓╖╓╖╓╖╓╖\c00 +\x00\x00\x00\c0E╓╖╓╖╓╖╓\c00 +\x00\x00\c0E╓╖╓╖╓╖╓╖\c00 +\x00\x00\x00\c0E╓╖╓╖╓╖╓\c00" })] [DataRow("34 _", VTiles.Player, VTiles.Dest, new string[] { "\\c00\\x00\\x00\\c0E╓╖╓╖╓╖╓╖\\c00\r\n\\x00\\x00\\x00\\c0E╓\\c6F⌐@\\c0E╖╓\\c6F⌐@\\c00\r\n\\x00\\x00\\c0E╓\\c6F⌐@\\c0E╖╓\\c6F⌐@\\c0E╖\\c00\r\n\\x00\\x00\\x00\\c0E╓╖╓╖╓╖╓\\c00", - "" })] + @"\c00\x00\x00\c0E╓╖╓╖╓╖╓╖\c00 +\x00\x00\x00\c0E╓╖\c6F⌐@⌐@\c0E╓\c00 +\x00\x00\c0E╓╖\c6F⌐@⌐@\c0E╓╖\c00 +\x00\x00\x00\c0E╓╖╓╖╓╖╓\c00" })] [DataRow("35 _", VTiles.Boulder, VTiles.Dest, new string[] { "\\c00\\x00\\x00\\c0E╓╖╓╖╓╖╓╖\\c00\r\n\\x00\\x00\\x00\\c0E╓\\c6E[]\\c0E╖╓\\c6E[]\\c00\r\n\\x00\\x00\\c0E╓\\c6E[]\\c0E╖╓\\c6E[]\\c0E╖\\c00\r\n\\x00\\x00\\x00\\c0E╓╖╓╖╓╖╓\\c00", - "" })] + @"\c00\x00\x00\c0E╓╖╓╖╓╖╓╖\c00 +\x00\x00\x00\c0E╓╖\c6E[][]\c0E╓\c00 +\x00\x00\c0E╓╖\c6E[][]\c0E╓╖\c00 +\x00\x00\x00\c0E╓╖╓╖╓╖╓\c00" })] [DataRow("40 _", VTiles.zero, VTiles.Player, new string[] { "\\c00\\x00\\x00\\c6F⌐@⌐@⌐@⌐@\\c00\r\n\\x00\\x00\\x00\\c6F⌐\\c00 \\c6F@⌐\\c00 \r\n\\x00\\x00\\c6F⌐\\c00 \\c6F@⌐\\c00 \\c6F@\\c00\r\n\\x00\\x00\\x00\\c6F⌐@⌐@⌐@⌐\\c00", - "" })] + @"\c00\x00\x00\c6F⌐@⌐@⌐@⌐@\c00 +\x00\x00\x00\c6F⌐@\c00 \c6F⌐\c00 +\x00\x00\c6F⌐@\c00 \c6F⌐@\c00 +\x00\x00\x00\c6F⌐@⌐@⌐@⌐\c00" })] [DataRow("41 _", VTiles.tile1, VTiles.Player, new string[] { "\\c00\\x00\\x00\\c6F⌐@⌐@⌐@⌐@\\c00\r\n\\x00\\x00\\x00\\c6F⌐\\c6E=-\\c6F@⌐\\c6E=-\\c00\r\n\\x00\\x00\\c6F⌐\\c6E=-\\c6F@⌐\\c6E=-\\c6F@\\c00\r\n\\x00\\x00\\x00\\c6F⌐@⌐@⌐@⌐\\c00", - "" })] + @"\c00\x00\x00\c6F⌐@⌐@⌐@⌐@\c00 +\x00\x00\x00\c6F⌐@\c6E=-=-\c6F⌐\c00 +\x00\x00\c6F⌐@\c6E=-=-\c6F⌐@\c00 +\x00\x00\x00\c6F⌐@⌐@⌐@⌐\c00" })] [DataRow("42 _", VTiles.Wall, VTiles.Player, new string[] { "\\c00\\x00\\x00\\c6F⌐@⌐@⌐@⌐@\\c00\r\n\\x00\\x00\\x00\\c6F⌐\\c4F|_\\c6F@⌐\\c4F|_\\c00\r\n\\x00\\x00\\c6F⌐\\c4F|_\\c6F@⌐\\c4F|_\\c6F@\\c00\r\n\\x00\\x00\\x00\\c6F⌐@⌐@⌐@⌐\\c00", - "" })] + @"\c00\x00\x00\c6F⌐@⌐@⌐@⌐@\c00 +\x00\x00\x00\c6F⌐@\c4F|_|_\c6F⌐\c00 +\x00\x00\c6F⌐@\c4F|_|_\c6F⌐@\c00 +\x00\x00\x00\c6F⌐@⌐@⌐@⌐\c00" })] [DataRow("43 _", VTiles.Dest, VTiles.Player, new string[] { "\\c00\\x00\\x00\\c6F⌐@⌐@⌐@⌐@\\c00\r\n\\x00\\x00\\x00\\c6F⌐\\c0E╓╖\\c6F@⌐\\c0E╓╖\\c00\r\n\\x00\\x00\\c6F⌐\\c0E╓╖\\c6F@⌐\\c0E╓╖\\c6F@\\c00\r\n\\x00\\x00\\x00\\c6F⌐@⌐@⌐@⌐\\c00", - "" })] + @"\c00\x00\x00\c6F⌐@⌐@⌐@⌐@\c00 +\x00\x00\x00\c6F⌐@\c0E╓╖╓╖\c6F⌐\c00 +\x00\x00\c6F⌐@\c0E╓╖╓╖\c6F⌐@\c00 +\x00\x00\x00\c6F⌐@⌐@⌐@⌐\c00" })] [DataRow("44 _", VTiles.Player, VTiles.Player, new string[] { "\\c00\\x00\\x00\\c6F⌐@⌐@⌐@⌐@\\c00\r\n\\x00\\x00\\x00\\c6F⌐⌐@@⌐⌐@\\c00\r\n\\x00\\x00\\c6F⌐⌐@@⌐⌐@@\\c00\r\n\\x00\\x00\\x00\\c6F⌐@⌐@⌐@⌐\\c00", - "" })] + @"\c00\x00\x00\c6F⌐@⌐@⌐@⌐@\c00 +\x00\x00\x00\c6F⌐@⌐@⌐@⌐\c00 +\x00\x00\c6F⌐@⌐@⌐@⌐@\c00 +\x00\x00\x00\c6F⌐@⌐@⌐@⌐\c00" })] [DataRow("45 _", VTiles.Boulder, VTiles.Player, new string[] { "\\c00\\x00\\x00\\c6F⌐@⌐@⌐@⌐@\\c00\r\n\\x00\\x00\\x00\\c6F⌐\\c6E[]\\c6F@⌐\\c6E[]\\c00\r\n\\x00\\x00\\c6F⌐\\c6E[]\\c6F@⌐\\c6E[]\\c6F@\\c00\r\n\\x00\\x00\\x00\\c6F⌐@⌐@⌐@⌐\\c00", - "" })] + @"\c00\x00\x00\c6F⌐@⌐@⌐@⌐@\c00 +\x00\x00\x00\c6F⌐@\c6E[][]\c6F⌐\c00 +\x00\x00\c6F⌐@\c6E[][]\c6F⌐@\c00 +\x00\x00\x00\c6F⌐@⌐@⌐@⌐\c00" })] [DataRow("50 _", VTiles.zero, VTiles.Boulder, new string[] { "\\c00\\x00\\x00\\c6E[][][][]\\c00\r\n\\x00\\x00\\x00\\c6E[\\c00 \\c6E][\\c00 \r\n\\x00\\x00\\c6E[\\c00 \\c6E][\\c00 \\c6E]\\c00\r\n\\x00\\x00\\x00\\c6E[][][][\\c00", - "" })] + @"\c00\x00\x00\c6E[][][][]\c00 +\x00\x00\x00\c6E[]\c00 \c6E[\c00 +\x00\x00\c6E[]\c00 \c6E[]\c00 +\x00\x00\x00\c6E[][][][\c00" })] [DataRow("51 _", VTiles.tile1, VTiles.Boulder, new string[] { "\\c00\\x00\\x00\\c6E[][][][]\\c00\r\n\\x00\\x00\\x00\\c6E[=-][=-\\c00\r\n\\x00\\x00\\c6E[=-][=-]\\c00\r\n\\x00\\x00\\x00\\c6E[][][][\\c00", - "" })] + @"\c00\x00\x00\c6E[][][][]\c00 +\x00\x00\x00\c6E[]=-=-[\c00 +\x00\x00\c6E[]=-=-[]\c00 +\x00\x00\x00\c6E[][][][\c00" })] [DataRow("52 _", VTiles.Wall, VTiles.Boulder, new string[] { "\\c00\\x00\\x00\\c6E[][][][]\\c00\r\n\\x00\\x00\\x00\\c6E[\\c4F|_\\c6E][\\c4F|_\\c00\r\n\\x00\\x00\\c6E[\\c4F|_\\c6E][\\c4F|_\\c6E]\\c00\r\n\\x00\\x00\\x00\\c6E[][][][\\c00", - "" })] + @"\c00\x00\x00\c6E[][][][]\c00 +\x00\x00\x00\c6E[]\c4F|_|_\c6E[\c00 +\x00\x00\c6E[]\c4F|_|_\c6E[]\c00 +\x00\x00\x00\c6E[][][][\c00" })] [DataRow("53 _", VTiles.Dest, VTiles.Boulder, new string[] { "\\c00\\x00\\x00\\c6E[][][][]\\c00\r\n\\x00\\x00\\x00\\c6E[\\c0E╓╖\\c6E][\\c0E╓╖\\c00\r\n\\x00\\x00\\c6E[\\c0E╓╖\\c6E][\\c0E╓╖\\c6E]\\c00\r\n\\x00\\x00\\x00\\c6E[][][][\\c00", - "" })] + @"\c00\x00\x00\c6E[][][][]\c00 +\x00\x00\x00\c6E[]\c0E╓╖╓╖\c6E[\c00 +\x00\x00\c6E[]\c0E╓╖╓╖\c6E[]\c00 +\x00\x00\x00\c6E[][][][\c00" })] [DataRow("54 _", VTiles.Player, VTiles.Boulder, new string[] { "\\c00\\x00\\x00\\c6E[][][][]\\c00\r\n\\x00\\x00\\x00\\c6E[\\c6F⌐@\\c6E][\\c6F⌐@\\c00\r\n\\x00\\x00\\c6E[\\c6F⌐@\\c6E][\\c6F⌐@\\c6E]\\c00\r\n\\x00\\x00\\x00\\c6E[][][][\\c00", - "" })] + @"\c00\x00\x00\c6E[][][][]\c00 +\x00\x00\x00\c6E[]\c6F⌐@⌐@\c6E[\c00 +\x00\x00\c6E[]\c6F⌐@⌐@\c6E[]\c00 +\x00\x00\x00\c6E[][][][\c00" })] [DataRow("55 _", VTiles.Boulder, VTiles.Boulder, new string[] { "\\c00\\x00\\x00\\c6E[][][][]\\c00\r\n\\x00\\x00\\x00\\c6E[[]][[]\\c00\r\n\\x00\\x00\\c6E[[]][[]]\\c00\r\n\\x00\\x00\\x00\\c6E[][][][\\c00", - "" })] + @"\c00\x00\x00\c6E[][][][]\c00 +\x00\x00\x00\c6E[][][][\c00 +\x00\x00\c6E[][][][]\c00 +\x00\x00\x00\c6E[][][][\c00" })] public void UpdateTest(string name, VTiles vt, VTiles vt2, string[] sExp) { - var tileDisplayHex = new TileDisplayHex(new Point(2, 0), new Size(4, 4), new TestTileDef21()); - - tileDisplayHex.FncGetTile = (p) => vt2; + var tileDisplayHex = new TileDisplayHex(new Point(2, 0), new Size(4, 4), new TestTileDef21()) + { + FncGetTile = (p) => vt2 + }; tileDisplayHex.FullRedraw(); - Application.DoEvents(); - Assert.AreEqual(cExpUpdateText[(int)vt2], _tstCon.Content); + Application_DoEvents(); + AssertAreEqual(cExpUpdateText[(int)vt2], _tstCon?.Content ?? ""); - Thread.Sleep(100); + Thread_Sleep(10); tileDisplayHex.FncGetTile = (p) => xTst(p)? vt:vt2; tileDisplayHex.FncOldPos = (p) => xTst(p) ? new Point(p.X * 3 - 3, p.Y) : p; - tileDisplayHex.Update(true); //Halvstep - Application.DoEvents(); - Assert.AreEqual(sExp[0], _tstCon.Content,$"Test:{name}.Halfstep"); + tileDisplayHex.Update(true); //HalfStep + Application_DoEvents(); + AssertAreEqual(sExp[0], _tstCon?.Content ?? "",$"Test:{name}.HalfStep"); - Thread.Sleep(100); + Thread_Sleep(10); - tileDisplayHex.Update(false); //Fullstep - Application.DoEvents(); - Assert.AreEqual(sExp[1], _tstCon.Content, $"Test:{name}.Fullstep"); + tileDisplayHex.Update(false); //FullStep + Application_DoEvents(); + AssertAreEqual(sExp[1], _tstCon?.Content??"", $"Test:{name}.FullStep"); - Thread.Sleep(100); - Application.DoEvents(); + Thread_Sleep(10); + Application_DoEvents(); console!.Clear(); tileDisplayHex.FullRedraw(); - Application.DoEvents(); - Assert.AreEqual(sExp[1], _tstCon.Content, $"Test:{name}.Fullredraw"); - + Application_DoEvents(); + Assert.AreEqual(sExp[1], _tstCon?.Content, $"Test:{name}.FullRedraw"); - bool xTst(Point p) => p.X > 0 && p.Y > 0 && p.X < 3 && p.Y < 3; + static bool xTst(Point p) => p.X > 0 && p.Y > 0 && p.X < 3 && p.Y < 3; } [DataTestMethod()] @@ -482,16 +607,16 @@ public void FullRedrawTest2(string name, VTiles vt, string sExp) { if (vt == VTiles.zero) { tileDisplayHex.FncGetTile = (p) => (VTiles)(p.X + p.Y * tileDisplayHex.DispSize.Width); tileDisplayHex.FullRedraw(); - Application.DoEvents(); - Assert.AreEqual(cTileDisplayTest4, _tstCon.Content); - Thread.Sleep(500); + Application_DoEvents(); + Assert.AreEqual(cTileDisplayTest4, _tstCon?.Content); + Thread_Sleep(100); } tileDisplayHex.FncGetTile = (p) => vt; tileDisplayHex.FullRedraw(); - Application.DoEvents(); - Assert.AreEqual(sExp, _tstCon.Content); + Application_DoEvents(); + Assert.AreEqual(sExp, _tstCon?.Content); - Thread.Sleep(500); + Thread_Sleep(100); } [DataTestMethod()] @@ -513,16 +638,16 @@ public void FullRedrawTest3(string name, VTiles vt, string sExp) { if (vt == VTiles.zero) { tileDisplayHex.FncGetTile = (p) => (VTiles)(p.X + p.Y * tileDisplayHex.DispSize.Width); tileDisplayHex.FullRedraw(); - Application.DoEvents(); - Assert.AreEqual(cTileDisplayTest5, _tstCon.Content); - Thread.Sleep(500); + Application_DoEvents(); + Assert.AreEqual(cTileDisplayTest5, _tstCon?.Content); + Thread_Sleep(100); } tileDisplayHex.FncGetTile = (p) => vt; tileDisplayHex.FullRedraw(); - Application.DoEvents(); - Assert.AreEqual(sExp, _tstCon.Content); + Application_DoEvents(); + Assert.AreEqual(sExp, _tstCon?.Content); - Thread.Sleep(500); + Thread_Sleep(100); } [DataTestMethod()] @@ -538,7 +663,14 @@ public void FullRedrawTest3(string name, VTiles vt, string sExp) { "\\c00\\x00\\x00 \r\n\\x00\\x00 \r\n\\x00\\x00\\x00\\x00 \\c4F─┴┬──┴┬─\\c00 \r\n\\x00\\x00\\x00\\x00 \\c4F─┬┴──┬┴─\\c00 \r\n\\x00\\x00 \\c4F─┴┬──┴┬─\\c00 \r\n\\x00\\x00 \\c4F─┬┴──┬┴─\\c00 \r\n\\x00\\x00\\x00\\x00 \r\n\\x00\\x00\\x00\\x00"})] [DataRow("03 _", VTiles.Dest, VTiles.zero, new string[] { "\\c00\\x00\\x00 \r\n\\x00\\x00 \r\n\\x00\\x00\\x00\\x00 \\c0E ╓╖ \\c00 \\c0E ╓╖ \\c00\r\n\\x00\\x00\\x00\\x00 \\c2A▓\\c22░\\c02▒\\c22▓\\c00 \\c2A▓\\c22░\\c02▒\\c22▓\\c00\r\n\\x00\\x00 \\c0E ╓╖ \\c00 \\c0E ╓╖ \\c00 \r\n\\x00\\x00 \\c2A▓\\c22░\\c02▒\\c22▓\\c00 \\c2A▓\\c22░\\c02▒\\c22▓\\c00 \r\n\\x00\\x00\\x00\\x00 \r\n\\x00\\x00\\x00\\x00" , - "\\c00\\x00\\x00 \r\n\\x00\\x00 \r\n\\x00\\x00\\x00\\x00 \\c0E ╓╖ ╓╖ ╖ \\c00 \r\n\\x00\\x00\\x00\\x00 \\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c02▒\\c22▓\\c00 \r\n\\x00\\x00 \\c0E ╓╖ ╓╖ \\c00 \r\n\\x00\\x00 \\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c00 \r\n\\x00\\x00\\x00\\x00 \r\n\\x00\\x00\\x00\\x00>. Tatsächlich:<\\c00\\x00\\x00 \r\n\\x00\\x00 \r\n\\x00\\x00\\x00\\x00 \\c0E ╓╖ ╓╖ \\c00 \r\n\\x00\\x00\\x00\\x00 \\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c00 \r\n\\x00\\x00 \\c0E ╓╖ ╓╖ \\c00 \r\n\\x00\\x00 \\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c00 \r\n\\x00\\x00\\x00\\x00 \r\n\\x00\\x00\\x00\\x00"})] + @"\c00\x00\x00 +\x00\x00 +\x00\x00\x00\x00 \c0E ╓╖ ╓╖ \c00 +\x00\x00\x00\x00 \c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c00 +\x00\x00 \c0E ╓╖ ╓╖ \c00 +\x00\x00 \c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c00 +\x00\x00\x00\x00 +\x00\x00\x00\x00"})] [DataRow("04 _", VTiles.Player, VTiles.zero, new string[] { "\\c00\\x00\\x00 \r\n\\x00\\x00 \r\n\\x00\\x00\\x00\\x00 \\c6F⌐°@)\\c00 \\c6F⌐°@)\\c00\r\n\\x00\\x00\\x00\\x00 \\c6F ⌡⌡‼\\c00 \\c6F ⌡⌡‼\\c00\r\n\\x00\\x00 \\c6F⌐°@)\\c00 \\c6F⌐°@)\\c00 \r\n\\x00\\x00 \\c6F ⌡⌡‼\\c00 \\c6F ⌡⌡‼\\c00 \r\n\\x00\\x00\\x00\\x00 \r\n\\x00\\x00\\x00\\x00" , "\\c00\\x00\\x00 \r\n\\x00\\x00 \r\n\\x00\\x00\\x00\\x00 \\c6F⌐°@)⌐°@)\\c00 \r\n\\x00\\x00\\x00\\x00 \\c6F ⌡⌡‼ ⌡⌡‼\\c00 \r\n\\x00\\x00 \\c6F⌐°@)⌐°@)\\c00 \r\n\\x00\\x00 \\c6F ⌡⌡‼ ⌡⌡‼\\c00 \r\n\\x00\\x00\\x00\\x00 \r\n\\x00\\x00\\x00\\x00"})] @@ -568,106 +700,253 @@ public void FullRedrawTest3(string name, VTiles vt, string sExp) { "\\c00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴┬─\\c00\r\n\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴┬─\\c00 \\c4F─┴\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬┴─\\c00 \\c4F─┬\\c00\r\n\\x00\\x00\\c4F─┴┬─\\c00 \\c4F─┴┬─\\c00\r\n\\x00\\x00\\c4F─┬┴─\\c00 \\c4F─┬┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬\\c00"})] [DataRow("21 _", VTiles.tile1, VTiles.Wall, new string[] { "\\c00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴┬─\\c00\r\n\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴\\c6E=-=-\\c4F┬──┴\\c6E=-=-\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬\\c6E-=-=\\c4F┴──┬\\c6E-=-=\\c00\r\n\\x00\\x00\\c4F─┴\\c6E=-=-\\c4F┬──┴\\c6E=-=-\\c4F┬─\\c00\r\n\\x00\\x00\\c4F─┬\\c6E-=-=\\c4F┴──┬\\c6E-=-=\\c4F┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬\\c00", - "\\c00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴┬─\\c00\r\n\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴\\c6E=-=-=-=-=-\\c4F─┴\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬\\c6E-=-=-=-=-=\\c4F─┬\\c00\r\n\\x00\\x00\\c4F─┴┬─\\c6E=-=-=-=-\\c4F─┴┬─\\c00\r\n\\x00\\x00\\c4F─┬┴─\\c6E-=-=-=-=\\c4F─┬┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬\\c00" })] + "\\c00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴┬─\\c00\r\n\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴┬─\\c6E=-=-=-=-\\c4F─┴\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬┴─\\c6E-=-=-=-=\\c4F─┬\\c00\r\n\\x00\\x00\\c4F─┴┬─\\c6E=-=-=-=-\\c4F─┴┬─\\c00\r\n\\x00\\x00\\c4F─┬┴─\\c6E-=-=-=-=\\c4F─┬┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬\\c00" })] [DataRow("22 _", VTiles.Wall, VTiles.Wall, new string[] { "\\c00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴┬─\\c00\r\n\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴─┴┬─┬──┴─┴┬─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬─┬┴─┴──┬─┬┴─\\c00\r\n\\x00\\x00\\c4F─┴─┴┬─┬──┴─┴┬─┬─\\c00\r\n\\x00\\x00\\c4F─┬─┬┴─┴──┬─┬┴─┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬\\c00", - "\\c00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴┬─\\c00\r\n\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴─┴┬──┴┬─┬──┴\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬─┬┴──┬┴─┴──┬\\c00\r\n\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴┬─\\c00\r\n\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬\\c00" })] + "\\c00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴┬─\\c00\r\n\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬\\c00\r\n\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴┬─\\c00\r\n\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬\\c00" })] [DataRow("23 _", VTiles.Dest, VTiles.Wall, new string[] { "\\c00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴┬─\\c00\r\n\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴\\c0E ╓╖ \\c4F┬──┴\\c0E ╓╖ \\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬\\c2A▓\\c22░\\c02▒\\c22▓\\c4F┴──┬\\c2A▓\\c22░\\c02▒\\c22▓\\c00\r\n\\x00\\x00\\c4F─┴\\c0E ╓╖ \\c4F┬──┴\\c0E ╓╖ \\c4F┬─\\c00\r\n\\x00\\x00\\c4F─┬\\c2A▓\\c22░\\c02▒\\c22▓\\c4F┴──┬\\c2A▓\\c22░\\c02▒\\c22▓\\c4F┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬\\c00", - "\\c00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴┬─\\c00\r\n\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴\\c0E ╓╖ ╓╖ ╖ \\c4F─┴\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c02▒\\c22▓\\c4F─┬\\c00\r\n\\x00\\x00\\c4F─┴┬─\\c0E ╓╖ ╓╖ \\c4F─┴┬─\\c00\r\n\\x00\\x00\\c4F─┬┴─\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c4F─┬┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬\\c00" })] + @"\c00\x00\x00\c4F─┴┬──┴┬──┴┬──┴┬─\c00 +\x00\x00\c4F─┬┴──┬┴──┬┴──┬┴─\c00 +\x00\x00\x00\x00\c4F─┴┬─\c0E ╓╖ ╓╖ \c4F─┴\c00 +\x00\x00\x00\x00\c4F─┬┴─\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c4F─┬\c00 +\x00\x00\c4F─┴┬─\c0E ╓╖ ╓╖ \c4F─┴┬─\c00 +\x00\x00\c4F─┬┴─\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c4F─┬┴─\c00 +\x00\x00\x00\x00\c4F─┴┬──┴┬──┴┬──┴\c00 +\x00\x00\x00\x00\c4F─┬┴──┬┴──┬┴──┬\c00" })] [DataRow("24 _", VTiles.Player, VTiles.Wall, new string[] { "\\c00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴┬─\\c00\r\n\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴\\c6F⌐°@)\\c4F┬──┴\\c6F⌐°@)\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬\\c6F ⌡⌡‼\\c4F┴──┬\\c6F ⌡⌡‼\\c00\r\n\\x00\\x00\\c4F─┴\\c6F⌐°@)\\c4F┬──┴\\c6F⌐°@)\\c4F┬─\\c00\r\n\\x00\\x00\\c4F─┬\\c6F ⌡⌡‼\\c4F┴──┬\\c6F ⌡⌡‼\\c4F┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬\\c00", - "\\c00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴┬─\\c00\r\n\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴\\c6F⌐°@)⌐°@)@)\\c4F─┴\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬\\c6F ⌡⌡‼ ⌡⌡‼⌡‼\\c4F─┬\\c00\r\n\\x00\\x00\\c4F─┴┬─\\c6F⌐°@)⌐°@)\\c4F─┴┬─\\c00\r\n\\x00\\x00\\c4F─┬┴─\\c6F ⌡⌡‼ ⌡⌡‼\\c4F─┬┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬\\c00" })] + @"\c00\x00\x00\c4F─┴┬──┴┬──┴┬──┴┬─\c00 +\x00\x00\c4F─┬┴──┬┴──┬┴──┬┴─\c00 +\x00\x00\x00\x00\c4F─┴┬─\c6F⌐°@)⌐°@)\c4F─┴\c00 +\x00\x00\x00\x00\c4F─┬┴─\c6F ⌡⌡‼ ⌡⌡‼\c4F─┬\c00 +\x00\x00\c4F─┴┬─\c6F⌐°@)⌐°@)\c4F─┴┬─\c00 +\x00\x00\c4F─┬┴─\c6F ⌡⌡‼ ⌡⌡‼\c4F─┬┴─\c00 +\x00\x00\x00\x00\c4F─┴┬──┴┬──┴┬──┴\c00 +\x00\x00\x00\x00\c4F─┬┴──┬┴──┬┴──┬\c00" })] [DataRow("25 _", VTiles.Boulder, VTiles.Wall, new string[] { "\\c00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴┬─\\c00\r\n\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴\\c6E/¯¯\\\\\\c4F┬──┴\\c6E/¯¯\\\\\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬\\c6E\\\\__/\\c4F┴──┬\\c6E\\\\__/\\c00\r\n\\x00\\x00\\c4F─┴\\c6E/¯¯\\\\\\c4F┬──┴\\c6E/¯¯\\\\\\c4F┬─\\c00\r\n\\x00\\x00\\c4F─┬\\c6E\\\\__/\\c4F┴──┬\\c6E\\\\__/\\c4F┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬\\c00", - "\\c00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴┬─\\c00\r\n\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴\\c6E/¯¯\\\\/¯¯\\\\¯\\\\\\c4F─┴\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬\\c6E\\\\__/\\\\__/_/\\c4F─┬\\c00\r\n\\x00\\x00\\c4F─┴┬─\\c6E/¯¯\\\\/¯¯\\\\\\c4F─┴┬─\\c00\r\n\\x00\\x00\\c4F─┬┴─\\c6E\\\\__/\\\\__/\\c4F─┬┴─\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┴┬──┴┬──┴┬──┴\\c00\r\n\\x00\\x00\\x00\\x00\\c4F─┬┴──┬┴──┬┴──┬\\c00" })] + @"\c00\x00\x00\c4F─┴┬──┴┬──┴┬──┴┬─\c00 +\x00\x00\c4F─┬┴──┬┴──┬┴──┬┴─\c00 +\x00\x00\x00\x00\c4F─┴┬─\c6E/¯¯\\/¯¯\\\c4F─┴\c00 +\x00\x00\x00\x00\c4F─┬┴─\c6E\\__/\\__/\c4F─┬\c00 +\x00\x00\c4F─┴┬─\c6E/¯¯\\/¯¯\\\c4F─┴┬─\c00 +\x00\x00\c4F─┬┴─\c6E\\__/\\__/\c4F─┬┴─\c00 +\x00\x00\x00\x00\c4F─┴┬──┴┬──┴┬──┴\c00 +\x00\x00\x00\x00\c4F─┬┴──┬┴──┬┴──┬\c00" })] [DataRow("30 _", VTiles.zero, VTiles.Dest, new string[] { "\\c00\\x00\\x00\\c0E ╓╖ ╓╖ ╓╖ ╓╖ \\c00\r\n\\x00\\x00\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c00\r\n\\x00\\x00\\x00\\x00\\c0E ╓\\c00 \\c0E╖ ╓\\c00 \r\n\\x00\\x00\\x00\\x00\\c2A▓\\c22░\\c00 \\c02▒\\c22▓\\c2A▓\\c22░\\c00 \r\n\\x00\\x00\\c0E ╓\\c00 \\c0E╖ ╓\\c00 \\c0E╖ \\c00\r\n\\x00\\x00\\c2A▓\\c22░\\c00 \\c02▒\\c22▓\\c2A▓\\c22░\\c00 \\c02▒\\c22▓\\c00\r\n\\x00\\x00\\x00\\x00\\c0E ╓╖ ╓╖ ╓╖ ╓\\c00\r\n\\x00\\x00\\x00\\x00\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c00", - "\\c00\\x00\\x00\\c0E ╓╖ ╓╖ ╓╖ ╓╖ \\c00\r\n\\x00\\x00\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c00\r\n\\x00\\x00\\x00\\x00\\c0E ╓\\c00 \\c0E ╓\\c00\r\n\\x00\\x00\\x00\\x00\\c2A▓\\c22░\\c00 \\c2A▓\\c22░\\c00\r\n\\x00\\x00\\c0E ╓╖ \\c00 \\c0E ╓╖ \\c00\r\n\\x00\\x00\\c2A▓\\c22░\\c02▒\\c22▓\\c00 \\c2A▓\\c22░\\c02▒\\c22▓\\c00\r\n\\x00\\x00\\x00\\x00\\c0E ╓╖ ╓╖ ╓╖ ╓\\c00\r\n\\x00\\x00\\x00\\x00\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c00" })] + @"\c00\x00\x00\c0E ╓╖ ╓╖ ╓╖ ╓╖ \c00 +\x00\x00\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c00 +\x00\x00\x00\x00\c0E ╓╖ \c00 \c0E ╓\c00 +\x00\x00\x00\x00\c2A▓\c22░\c02▒\c22▓\c00 \c2A▓\c22░\c00 +\x00\x00\c0E ╓╖ \c00 \c0E ╓╖ \c00 +\x00\x00\c2A▓\c22░\c02▒\c22▓\c00 \c2A▓\c22░\c02▒\c22▓\c00 +\x00\x00\x00\x00\c0E ╓╖ ╓╖ ╓╖ ╓\c00 +\x00\x00\x00\x00\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c00" })] [DataRow("31 _", VTiles.tile1, VTiles.Dest, new string[] { "\\c00\\x00\\x00\\c0E ╓╖ ╓╖ ╓╖ ╓╖ \\c00\r\n\\x00\\x00\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c00\r\n\\x00\\x00\\x00\\x00\\c0E ╓\\c6E=-=-\\c0E╖ ╓\\c6E=-=-\\c00\r\n\\x00\\x00\\x00\\x00\\c2A▓\\c22░\\c6E-=-=\\c02▒\\c22▓\\c2A▓\\c22░\\c6E-=-=\\c00\r\n\\x00\\x00\\c0E ╓\\c6E=-=-\\c0E╖ ╓\\c6E=-=-\\c0E╖ \\c00\r\n\\x00\\x00\\c2A▓\\c22░\\c6E-=-=\\c02▒\\c22▓\\c2A▓\\c22░\\c6E-=-=\\c02▒\\c22▓\\c00\r\n\\x00\\x00\\x00\\x00\\c0E ╓╖ ╓╖ ╓╖ ╓\\c00\r\n\\x00\\x00\\x00\\x00\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c00", - "" })] + @"\c00\x00\x00\c0E ╓╖ ╓╖ ╓╖ ╓╖ \c00 +\x00\x00\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c00 +\x00\x00\x00\x00\c0E ╓╖ \c6E=-=-=-=-\c0E ╓\c00 +\x00\x00\x00\x00\c2A▓\c22░\c02▒\c22▓\c6E-=-=-=-=\c2A▓\c22░\c00 +\x00\x00\c0E ╓╖ \c6E=-=-=-=-\c0E ╓╖ \c00 +\x00\x00\c2A▓\c22░\c02▒\c22▓\c6E-=-=-=-=\c2A▓\c22░\c02▒\c22▓\c00 +\x00\x00\x00\x00\c0E ╓╖ ╓╖ ╓╖ ╓\c00 +\x00\x00\x00\x00\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c00" })] [DataRow("32 _", VTiles.Wall, VTiles.Dest, new string[] { "\\c00\\x00\\x00\\c0E ╓╖ ╓╖ ╓╖ ╓╖ \\c00\r\n\\x00\\x00\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c00\r\n\\x00\\x00\\x00\\x00\\c0E ╓\\c4F─┴┬─\\c0E╖ ╓\\c4F─┴┬─\\c00\r\n\\x00\\x00\\x00\\x00\\c2A▓\\c22░\\c4F─┬┴─\\c02▒\\c22▓\\c2A▓\\c22░\\c4F─┬┴─\\c00\r\n\\x00\\x00\\c0E ╓\\c4F─┴┬─\\c0E╖ ╓\\c4F─┴┬─\\c0E╖ \\c00\r\n\\x00\\x00\\c2A▓\\c22░\\c4F─┬┴─\\c02▒\\c22▓\\c2A▓\\c22░\\c4F─┬┴─\\c02▒\\c22▓\\c00\r\n\\x00\\x00\\x00\\x00\\c0E ╓╖ ╓╖ ╓╖ ╓\\c00\r\n\\x00\\x00\\x00\\x00\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c00", - "" })] + @"\c00\x00\x00\c0E ╓╖ ╓╖ ╓╖ ╓╖ \c00 +\x00\x00\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c00 +\x00\x00\x00\x00\c0E ╓╖ \c4F─┴┬──┴┬─\c0E ╓\c00 +\x00\x00\x00\x00\c2A▓\c22░\c02▒\c22▓\c4F─┬┴──┬┴─\c2A▓\c22░\c00 +\x00\x00\c0E ╓╖ \c4F─┴┬──┴┬─\c0E ╓╖ \c00 +\x00\x00\c2A▓\c22░\c02▒\c22▓\c4F─┬┴──┬┴─\c2A▓\c22░\c02▒\c22▓\c00 +\x00\x00\x00\x00\c0E ╓╖ ╓╖ ╓╖ ╓\c00 +\x00\x00\x00\x00\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c00" })] [DataRow("33 _", VTiles.Dest, VTiles.Dest, new string[] { "\\c00\\x00\\x00\\c0E ╓╖ ╓╖ ╓╖ ╓╖ \\c00\r\n\\x00\\x00\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c00\r\n\\x00\\x00\\x00\\x00\\c0E ╓ ╓╖ ╖ ╓ ╓╖ \\c00\r\n\\x00\\x00\\x00\\x00\\c2A▓\\c22░\\c2A▓\\c22░\\c02▒\\c22▓\\c02▒\\c22▓\\c2A▓\\c22░\\c2A▓\\c22░\\c02▒\\c22▓\\c00\r\n\\x00\\x00\\c0E ╓ ╓╖ ╖ ╓ ╓╖ ╖ \\c00\r\n\\x00\\x00\\c2A▓\\c22░\\c2A▓\\c22░\\c02▒\\c22▓\\c02▒\\c22▓\\c2A▓\\c22░\\c2A▓\\c22░\\c02▒\\c22▓\\c02▒\\c22▓\\c00\r\n\\x00\\x00\\x00\\x00\\c0E ╓╖ ╓╖ ╓╖ ╓\\c00\r\n\\x00\\x00\\x00\\x00\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c00", - "" })] + @"\c00\x00\x00\c0E ╓╖ ╓╖ ╓╖ ╓╖ \c00 +\x00\x00\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c00 +\x00\x00\x00\x00\c0E ╓╖ ╓╖ ╓╖ ╓\c00 +\x00\x00\x00\x00\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c00 +\x00\x00\c0E ╓╖ ╓╖ ╓╖ ╓╖ \c00 +\x00\x00\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c00 +\x00\x00\x00\x00\c0E ╓╖ ╓╖ ╓╖ ╓\c00 +\x00\x00\x00\x00\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c00" })] [DataRow("34 _", VTiles.Player, VTiles.Dest, new string[] { "\\c00\\x00\\x00\\c0E ╓╖ ╓╖ ╓╖ ╓╖ \\c00\r\n\\x00\\x00\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c00\r\n\\x00\\x00\\x00\\x00\\c0E ╓\\c6F⌐°@)\\c0E╖ ╓\\c6F⌐°@)\\c00\r\n\\x00\\x00\\x00\\x00\\c2A▓\\c22░\\c6F ⌡⌡‼\\c02▒\\c22▓\\c2A▓\\c22░\\c6F ⌡⌡‼\\c00\r\n\\x00\\x00\\c0E ╓\\c6F⌐°@)\\c0E╖ ╓\\c6F⌐°@)\\c0E╖ \\c00\r\n\\x00\\x00\\c2A▓\\c22░\\c6F ⌡⌡‼\\c02▒\\c22▓\\c2A▓\\c22░\\c6F ⌡⌡‼\\c02▒\\c22▓\\c00\r\n\\x00\\x00\\x00\\x00\\c0E ╓╖ ╓╖ ╓╖ ╓\\c00\r\n\\x00\\x00\\x00\\x00\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c00", - "" })] + @"\c00\x00\x00\c0E ╓╖ ╓╖ ╓╖ ╓╖ \c00 +\x00\x00\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c00 +\x00\x00\x00\x00\c0E ╓╖ \c6F⌐°@)⌐°@)\c0E ╓\c00 +\x00\x00\x00\x00\c2A▓\c22░\c02▒\c22▓\c6F ⌡⌡‼ ⌡⌡‼\c2A▓\c22░\c00 +\x00\x00\c0E ╓╖ \c6F⌐°@)⌐°@)\c0E ╓╖ \c00 +\x00\x00\c2A▓\c22░\c02▒\c22▓\c6F ⌡⌡‼ ⌡⌡‼\c2A▓\c22░\c02▒\c22▓\c00 +\x00\x00\x00\x00\c0E ╓╖ ╓╖ ╓╖ ╓\c00 +\x00\x00\x00\x00\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c00" })] [DataRow("35 _", VTiles.Boulder, VTiles.Dest, new string[] { "\\c00\\x00\\x00\\c0E ╓╖ ╓╖ ╓╖ ╓╖ \\c00\r\n\\x00\\x00\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c00\r\n\\x00\\x00\\x00\\x00\\c0E ╓\\c6E/¯¯\\\\\\c0E╖ ╓\\c6E/¯¯\\\\\\c00\r\n\\x00\\x00\\x00\\x00\\c2A▓\\c22░\\c6E\\\\__/\\c02▒\\c22▓\\c2A▓\\c22░\\c6E\\\\__/\\c00\r\n\\x00\\x00\\c0E ╓\\c6E/¯¯\\\\\\c0E╖ ╓\\c6E/¯¯\\\\\\c0E╖ \\c00\r\n\\x00\\x00\\c2A▓\\c22░\\c6E\\\\__/\\c02▒\\c22▓\\c2A▓\\c22░\\c6E\\\\__/\\c02▒\\c22▓\\c00\r\n\\x00\\x00\\x00\\x00\\c0E ╓╖ ╓╖ ╓╖ ╓\\c00\r\n\\x00\\x00\\x00\\x00\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c02▒\\c22▓\\c2A▓\\c22░\\c00", - "" })] + @"\c00\x00\x00\c0E ╓╖ ╓╖ ╓╖ ╓╖ \c00 +\x00\x00\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c00 +\x00\x00\x00\x00\c0E ╓╖ \c6E/¯¯\\/¯¯\\\c0E ╓\c00 +\x00\x00\x00\x00\c2A▓\c22░\c02▒\c22▓\c6E\\__/\\__/\c2A▓\c22░\c00 +\x00\x00\c0E ╓╖ \c6E/¯¯\\/¯¯\\\c0E ╓╖ \c00 +\x00\x00\c2A▓\c22░\c02▒\c22▓\c6E\\__/\\__/\c2A▓\c22░\c02▒\c22▓\c00 +\x00\x00\x00\x00\c0E ╓╖ ╓╖ ╓╖ ╓\c00 +\x00\x00\x00\x00\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c00" })] [DataRow("40 _", VTiles.zero, VTiles.Player, new string[] { "\\c00\\x00\\x00\\c6F⌐°@)⌐°@)⌐°@)⌐°@)\\c00\r\n\\x00\\x00\\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡⌡‼\\c00\r\n\\x00\\x00\\x00\\x00\\c6F⌐°\\c00 \\c6F@)⌐°\\c00 \r\n\\x00\\x00\\x00\\x00\\c6F ⌡\\c00 \\c6F⌡‼ ⌡\\c00 \r\n\\x00\\x00\\c6F⌐°\\c00 \\c6F@)⌐°\\c00 \\c6F@)\\c00\r\n\\x00\\x00\\c6F ⌡\\c00 \\c6F⌡‼ ⌡\\c00 \\c6F⌡‼\\c00\r\n\\x00\\x00\\x00\\x00\\c6F⌐°@)⌐°@)⌐°@)⌐°\\c00\r\n\\x00\\x00\\x00\\x00\\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡\\c00", - "" })] + @"\c00\x00\x00\c6F⌐°@)⌐°@)⌐°@)⌐°@)\c00 +\x00\x00\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡⌡‼\c00 +\x00\x00\x00\x00\c6F⌐°@)\c00 \c6F⌐°\c00 +\x00\x00\x00\x00\c6F ⌡⌡‼\c00 \c6F ⌡\c00 +\x00\x00\c6F⌐°@)\c00 \c6F⌐°@)\c00 +\x00\x00\c6F ⌡⌡‼\c00 \c6F ⌡⌡‼\c00 +\x00\x00\x00\x00\c6F⌐°@)⌐°@)⌐°@)⌐°\c00 +\x00\x00\x00\x00\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡\c00" })] [DataRow("41 _", VTiles.tile1, VTiles.Player, new string[] { "\\c00\\x00\\x00\\c6F⌐°@)⌐°@)⌐°@)⌐°@)\\c00\r\n\\x00\\x00\\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡⌡‼\\c00\r\n\\x00\\x00\\x00\\x00\\c6F⌐°\\c6E=-=-\\c6F@)⌐°\\c6E=-=-\\c00\r\n\\x00\\x00\\x00\\x00\\c6F ⌡\\c6E-=-=\\c6F⌡‼ ⌡\\c6E-=-=\\c00\r\n\\x00\\x00\\c6F⌐°\\c6E=-=-\\c6F@)⌐°\\c6E=-=-\\c6F@)\\c00\r\n\\x00\\x00\\c6F ⌡\\c6E-=-=\\c6F⌡‼ ⌡\\c6E-=-=\\c6F⌡‼\\c00\r\n\\x00\\x00\\x00\\x00\\c6F⌐°@)⌐°@)⌐°@)⌐°\\c00\r\n\\x00\\x00\\x00\\x00\\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡\\c00", - "" })] + @"\c00\x00\x00\c6F⌐°@)⌐°@)⌐°@)⌐°@)\c00 +\x00\x00\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡⌡‼\c00 +\x00\x00\x00\x00\c6F⌐°@)\c6E=-=-=-=-\c6F⌐°\c00 +\x00\x00\x00\x00\c6F ⌡⌡‼\c6E-=-=-=-=\c6F ⌡\c00 +\x00\x00\c6F⌐°@)\c6E=-=-=-=-\c6F⌐°@)\c00 +\x00\x00\c6F ⌡⌡‼\c6E-=-=-=-=\c6F ⌡⌡‼\c00 +\x00\x00\x00\x00\c6F⌐°@)⌐°@)⌐°@)⌐°\c00 +\x00\x00\x00\x00\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡\c00" })] [DataRow("42 _", VTiles.Wall, VTiles.Player, new string[] { "\\c00\\x00\\x00\\c6F⌐°@)⌐°@)⌐°@)⌐°@)\\c00\r\n\\x00\\x00\\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡⌡‼\\c00\r\n\\x00\\x00\\x00\\x00\\c6F⌐°\\c4F─┴┬─\\c6F@)⌐°\\c4F─┴┬─\\c00\r\n\\x00\\x00\\x00\\x00\\c6F ⌡\\c4F─┬┴─\\c6F⌡‼ ⌡\\c4F─┬┴─\\c00\r\n\\x00\\x00\\c6F⌐°\\c4F─┴┬─\\c6F@)⌐°\\c4F─┴┬─\\c6F@)\\c00\r\n\\x00\\x00\\c6F ⌡\\c4F─┬┴─\\c6F⌡‼ ⌡\\c4F─┬┴─\\c6F⌡‼\\c00\r\n\\x00\\x00\\x00\\x00\\c6F⌐°@)⌐°@)⌐°@)⌐°\\c00\r\n\\x00\\x00\\x00\\x00\\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡\\c00", - "" })] + @"\c00\x00\x00\c6F⌐°@)⌐°@)⌐°@)⌐°@)\c00 +\x00\x00\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡⌡‼\c00 +\x00\x00\x00\x00\c6F⌐°@)\c4F─┴┬──┴┬─\c6F⌐°\c00 +\x00\x00\x00\x00\c6F ⌡⌡‼\c4F─┬┴──┬┴─\c6F ⌡\c00 +\x00\x00\c6F⌐°@)\c4F─┴┬──┴┬─\c6F⌐°@)\c00 +\x00\x00\c6F ⌡⌡‼\c4F─┬┴──┬┴─\c6F ⌡⌡‼\c00 +\x00\x00\x00\x00\c6F⌐°@)⌐°@)⌐°@)⌐°\c00 +\x00\x00\x00\x00\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡\c00" })] [DataRow("43 _", VTiles.Dest, VTiles.Player, new string[] { "\\c00\\x00\\x00\\c6F⌐°@)⌐°@)⌐°@)⌐°@)\\c00\r\n\\x00\\x00\\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡⌡‼\\c00\r\n\\x00\\x00\\x00\\x00\\c6F⌐°\\c0E ╓╖ \\c6F@)⌐°\\c0E ╓╖ \\c00\r\n\\x00\\x00\\x00\\x00\\c6F ⌡\\c2A▓\\c22░\\c02▒\\c22▓\\c6F⌡‼ ⌡\\c2A▓\\c22░\\c02▒\\c22▓\\c00\r\n\\x00\\x00\\c6F⌐°\\c0E ╓╖ \\c6F@)⌐°\\c0E ╓╖ \\c6F@)\\c00\r\n\\x00\\x00\\c6F ⌡\\c2A▓\\c22░\\c02▒\\c22▓\\c6F⌡‼ ⌡\\c2A▓\\c22░\\c02▒\\c22▓\\c6F⌡‼\\c00\r\n\\x00\\x00\\x00\\x00\\c6F⌐°@)⌐°@)⌐°@)⌐°\\c00\r\n\\x00\\x00\\x00\\x00\\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡\\c00", - "" })] + @"\c00\x00\x00\c6F⌐°@)⌐°@)⌐°@)⌐°@)\c00 +\x00\x00\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡⌡‼\c00 +\x00\x00\x00\x00\c6F⌐°@)\c0E ╓╖ ╓╖ \c6F⌐°\c00 +\x00\x00\x00\x00\c6F ⌡⌡‼\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c6F ⌡\c00 +\x00\x00\c6F⌐°@)\c0E ╓╖ ╓╖ \c6F⌐°@)\c00 +\x00\x00\c6F ⌡⌡‼\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c6F ⌡⌡‼\c00 +\x00\x00\x00\x00\c6F⌐°@)⌐°@)⌐°@)⌐°\c00 +\x00\x00\x00\x00\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡\c00" })] [DataRow("44 _", VTiles.Player, VTiles.Player, new string[] { "\\c00\\x00\\x00\\c6F⌐°@)⌐°@)⌐°@)⌐°@)\\c00\r\n\\x00\\x00\\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡⌡‼\\c00\r\n\\x00\\x00\\x00\\x00\\c6F⌐°⌐°@)@)⌐°⌐°@)\\c00\r\n\\x00\\x00\\x00\\x00\\c6F ⌡ ⌡⌡‼⌡‼ ⌡ ⌡⌡‼\\c00\r\n\\x00\\x00\\c6F⌐°⌐°@)@)⌐°⌐°@)@)\\c00\r\n\\x00\\x00\\c6F ⌡ ⌡⌡‼⌡‼ ⌡ ⌡⌡‼⌡‼\\c00\r\n\\x00\\x00\\x00\\x00\\c6F⌐°@)⌐°@)⌐°@)⌐°\\c00\r\n\\x00\\x00\\x00\\x00\\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡\\c00", - "" })] + @"\c00\x00\x00\c6F⌐°@)⌐°@)⌐°@)⌐°@)\c00 +\x00\x00\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡⌡‼\c00 +\x00\x00\x00\x00\c6F⌐°@)⌐°@)⌐°@)⌐°\c00 +\x00\x00\x00\x00\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡\c00 +\x00\x00\c6F⌐°@)⌐°@)⌐°@)⌐°@)\c00 +\x00\x00\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡⌡‼\c00 +\x00\x00\x00\x00\c6F⌐°@)⌐°@)⌐°@)⌐°\c00 +\x00\x00\x00\x00\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡\c00" })] [DataRow("45 _", VTiles.Boulder, VTiles.Player, new string[] { "\\c00\\x00\\x00\\c6F⌐°@)⌐°@)⌐°@)⌐°@)\\c00\r\n\\x00\\x00\\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡⌡‼\\c00\r\n\\x00\\x00\\x00\\x00\\c6F⌐°\\c6E/¯¯\\\\\\c6F@)⌐°\\c6E/¯¯\\\\\\c00\r\n\\x00\\x00\\x00\\x00\\c6F ⌡\\c6E\\\\__/\\c6F⌡‼ ⌡\\c6E\\\\__/\\c00\r\n\\x00\\x00\\c6F⌐°\\c6E/¯¯\\\\\\c6F@)⌐°\\c6E/¯¯\\\\\\c6F@)\\c00\r\n\\x00\\x00\\c6F ⌡\\c6E\\\\__/\\c6F⌡‼ ⌡\\c6E\\\\__/\\c6F⌡‼\\c00\r\n\\x00\\x00\\x00\\x00\\c6F⌐°@)⌐°@)⌐°@)⌐°\\c00\r\n\\x00\\x00\\x00\\x00\\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡\\c00", - "" })] + @"\c00\x00\x00\c6F⌐°@)⌐°@)⌐°@)⌐°@)\c00 +\x00\x00\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡⌡‼\c00 +\x00\x00\x00\x00\c6F⌐°@)\c6E/¯¯\\/¯¯\\\c6F⌐°\c00 +\x00\x00\x00\x00\c6F ⌡⌡‼\c6E\\__/\\__/\c6F ⌡\c00 +\x00\x00\c6F⌐°@)\c6E/¯¯\\/¯¯\\\c6F⌐°@)\c00 +\x00\x00\c6F ⌡⌡‼\c6E\\__/\\__/\c6F ⌡⌡‼\c00 +\x00\x00\x00\x00\c6F⌐°@)⌐°@)⌐°@)⌐°\c00 +\x00\x00\x00\x00\c6F ⌡⌡‼ ⌡⌡‼ ⌡⌡‼ ⌡\c00" })] [DataRow("50 _", VTiles.zero, VTiles.Boulder, new string[] { "\\c00\\x00\\x00\\c6E/¯¯\\\\/¯¯\\\\/¯¯\\\\/¯¯\\\\\\c00\r\n\\x00\\x00\\c6E\\\\__/\\\\__/\\\\__/\\\\__/\\c00\r\n\\x00\\x00\\x00\\x00\\c6E/¯\\c00 \\c6E¯\\\\/¯\\c00 \r\n\\x00\\x00\\x00\\x00\\c6E\\\\_\\c00 \\c6E_/\\\\_\\c00 \r\n\\x00\\x00\\c6E/¯\\c00 \\c6E¯\\\\/¯\\c00 \\c6E¯\\\\\\c00\r\n\\x00\\x00\\c6E\\\\_\\c00 \\c6E_/\\\\_\\c00 \\c6E_/\\c00\r\n\\x00\\x00\\x00\\x00\\c6E/¯¯\\\\/¯¯\\\\/¯¯\\\\/¯\\c00\r\n\\x00\\x00\\x00\\x00\\c6E\\\\__/\\\\__/\\\\__/\\\\_\\c00", - "" })] + @"\c00\x00\x00\c6E/¯¯\\/¯¯\\/¯¯\\/¯¯\\\c00 +\x00\x00\c6E\\__/\\__/\\__/\\__/\c00 +\x00\x00\x00\x00\c6E/¯¯\\\c00 \c6E/¯\c00 +\x00\x00\x00\x00\c6E\\__/\c00 \c6E\\_\c00 +\x00\x00\c6E/¯¯\\\c00 \c6E/¯¯\\\c00 +\x00\x00\c6E\\__/\c00 \c6E\\__/\c00 +\x00\x00\x00\x00\c6E/¯¯\\/¯¯\\/¯¯\\/¯\c00 +\x00\x00\x00\x00\c6E\\__/\\__/\\__/\\_\c00" })] [DataRow("51 _", VTiles.tile1, VTiles.Boulder, new string[] { "\\c00\\x00\\x00\\c6E/¯¯\\\\/¯¯\\\\/¯¯\\\\/¯¯\\\\\\c00\r\n\\x00\\x00\\c6E\\\\__/\\\\__/\\\\__/\\\\__/\\c00\r\n\\x00\\x00\\x00\\x00\\c6E/¯=-=-¯\\\\/¯=-=-\\c00\r\n\\x00\\x00\\x00\\x00\\c6E\\\\_-=-=_/\\\\_-=-=\\c00\r\n\\x00\\x00\\c6E/¯=-=-¯\\\\/¯=-=-¯\\\\\\c00\r\n\\x00\\x00\\c6E\\\\_-=-=_/\\\\_-=-=_/\\c00\r\n\\x00\\x00\\x00\\x00\\c6E/¯¯\\\\/¯¯\\\\/¯¯\\\\/¯\\c00\r\n\\x00\\x00\\x00\\x00\\c6E\\\\__/\\\\__/\\\\__/\\\\_\\c00", - "" })] + @"\c00\x00\x00\c6E/¯¯\\/¯¯\\/¯¯\\/¯¯\\\c00 +\x00\x00\c6E\\__/\\__/\\__/\\__/\c00 +\x00\x00\x00\x00\c6E/¯¯\\=-=-=-=-/¯\c00 +\x00\x00\x00\x00\c6E\\__/-=-=-=-=\\_\c00 +\x00\x00\c6E/¯¯\\=-=-=-=-/¯¯\\\c00 +\x00\x00\c6E\\__/-=-=-=-=\\__/\c00 +\x00\x00\x00\x00\c6E/¯¯\\/¯¯\\/¯¯\\/¯\c00 +\x00\x00\x00\x00\c6E\\__/\\__/\\__/\\_\c00" })] [DataRow("52 _", VTiles.Wall, VTiles.Boulder, new string[] { "\\c00\\x00\\x00\\c6E/¯¯\\\\/¯¯\\\\/¯¯\\\\/¯¯\\\\\\c00\r\n\\x00\\x00\\c6E\\\\__/\\\\__/\\\\__/\\\\__/\\c00\r\n\\x00\\x00\\x00\\x00\\c6E/¯\\c4F─┴┬─\\c6E¯\\\\/¯\\c4F─┴┬─\\c00\r\n\\x00\\x00\\x00\\x00\\c6E\\\\_\\c4F─┬┴─\\c6E_/\\\\_\\c4F─┬┴─\\c00\r\n\\x00\\x00\\c6E/¯\\c4F─┴┬─\\c6E¯\\\\/¯\\c4F─┴┬─\\c6E¯\\\\\\c00\r\n\\x00\\x00\\c6E\\\\_\\c4F─┬┴─\\c6E_/\\\\_\\c4F─┬┴─\\c6E_/\\c00\r\n\\x00\\x00\\x00\\x00\\c6E/¯¯\\\\/¯¯\\\\/¯¯\\\\/¯\\c00\r\n\\x00\\x00\\x00\\x00\\c6E\\\\__/\\\\__/\\\\__/\\\\_\\c00", - "" })] + @"\c00\x00\x00\c6E/¯¯\\/¯¯\\/¯¯\\/¯¯\\\c00 +\x00\x00\c6E\\__/\\__/\\__/\\__/\c00 +\x00\x00\x00\x00\c6E/¯¯\\\c4F─┴┬──┴┬─\c6E/¯\c00 +\x00\x00\x00\x00\c6E\\__/\c4F─┬┴──┬┴─\c6E\\_\c00 +\x00\x00\c6E/¯¯\\\c4F─┴┬──┴┬─\c6E/¯¯\\\c00 +\x00\x00\c6E\\__/\c4F─┬┴──┬┴─\c6E\\__/\c00 +\x00\x00\x00\x00\c6E/¯¯\\/¯¯\\/¯¯\\/¯\c00 +\x00\x00\x00\x00\c6E\\__/\\__/\\__/\\_\c00" })] [DataRow("53 _", VTiles.Dest, VTiles.Boulder, new string[] { "\\c00\\x00\\x00\\c6E/¯¯\\\\/¯¯\\\\/¯¯\\\\/¯¯\\\\\\c00\r\n\\x00\\x00\\c6E\\\\__/\\\\__/\\\\__/\\\\__/\\c00\r\n\\x00\\x00\\x00\\x00\\c6E/¯\\c0E ╓╖ \\c6E¯\\\\/¯\\c0E ╓╖ \\c00\r\n\\x00\\x00\\x00\\x00\\c6E\\\\_\\c2A▓\\c22░\\c02▒\\c22▓\\c6E_/\\\\_\\c2A▓\\c22░\\c02▒\\c22▓\\c00\r\n\\x00\\x00\\c6E/¯\\c0E ╓╖ \\c6E¯\\\\/¯\\c0E ╓╖ \\c6E¯\\\\\\c00\r\n\\x00\\x00\\c6E\\\\_\\c2A▓\\c22░\\c02▒\\c22▓\\c6E_/\\\\_\\c2A▓\\c22░\\c02▒\\c22▓\\c6E_/\\c00\r\n\\x00\\x00\\x00\\x00\\c6E/¯¯\\\\/¯¯\\\\/¯¯\\\\/¯\\c00\r\n\\x00\\x00\\x00\\x00\\c6E\\\\__/\\\\__/\\\\__/\\\\_\\c00", - "" })] + @"\c00\x00\x00\c6E/¯¯\\/¯¯\\/¯¯\\/¯¯\\\c00 +\x00\x00\c6E\\__/\\__/\\__/\\__/\c00 +\x00\x00\x00\x00\c6E/¯¯\\\c0E ╓╖ ╓╖ \c6E/¯\c00 +\x00\x00\x00\x00\c6E\\__/\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c6E\\_\c00 +\x00\x00\c6E/¯¯\\\c0E ╓╖ ╓╖ \c6E/¯¯\\\c00 +\x00\x00\c6E\\__/\c2A▓\c22░\c02▒\c22▓\c2A▓\c22░\c02▒\c22▓\c6E\\__/\c00 +\x00\x00\x00\x00\c6E/¯¯\\/¯¯\\/¯¯\\/¯\c00 +\x00\x00\x00\x00\c6E\\__/\\__/\\__/\\_\c00" })] [DataRow("54 _", VTiles.Player, VTiles.Boulder, new string[] { "\\c00\\x00\\x00\\c6E/¯¯\\\\/¯¯\\\\/¯¯\\\\/¯¯\\\\\\c00\r\n\\x00\\x00\\c6E\\\\__/\\\\__/\\\\__/\\\\__/\\c00\r\n\\x00\\x00\\x00\\x00\\c6E/¯\\c6F⌐°@)\\c6E¯\\\\/¯\\c6F⌐°@)\\c00\r\n\\x00\\x00\\x00\\x00\\c6E\\\\_\\c6F ⌡⌡‼\\c6E_/\\\\_\\c6F ⌡⌡‼\\c00\r\n\\x00\\x00\\c6E/¯\\c6F⌐°@)\\c6E¯\\\\/¯\\c6F⌐°@)\\c6E¯\\\\\\c00\r\n\\x00\\x00\\c6E\\\\_\\c6F ⌡⌡‼\\c6E_/\\\\_\\c6F ⌡⌡‼\\c6E_/\\c00\r\n\\x00\\x00\\x00\\x00\\c6E/¯¯\\\\/¯¯\\\\/¯¯\\\\/¯\\c00\r\n\\x00\\x00\\x00\\x00\\c6E\\\\__/\\\\__/\\\\__/\\\\_\\c00", - "" })] + @"\c00\x00\x00\c6E/¯¯\\/¯¯\\/¯¯\\/¯¯\\\c00 +\x00\x00\c6E\\__/\\__/\\__/\\__/\c00 +\x00\x00\x00\x00\c6E/¯¯\\\c6F⌐°@)⌐°@)\c6E/¯\c00 +\x00\x00\x00\x00\c6E\\__/\c6F ⌡⌡‼ ⌡⌡‼\c6E\\_\c00 +\x00\x00\c6E/¯¯\\\c6F⌐°@)⌐°@)\c6E/¯¯\\\c00 +\x00\x00\c6E\\__/\c6F ⌡⌡‼ ⌡⌡‼\c6E\\__/\c00 +\x00\x00\x00\x00\c6E/¯¯\\/¯¯\\/¯¯\\/¯\c00 +\x00\x00\x00\x00\c6E\\__/\\__/\\__/\\_\c00" })] [DataRow("55 _", VTiles.Boulder, VTiles.Boulder, new string[] { "\\c00\\x00\\x00\\c6E/¯¯\\\\/¯¯\\\\/¯¯\\\\/¯¯\\\\\\c00\r\n\\x00\\x00\\c6E\\\\__/\\\\__/\\\\__/\\\\__/\\c00\r\n\\x00\\x00\\x00\\x00\\c6E/¯/¯¯\\\\¯\\\\/¯/¯¯\\\\\\c00\r\n\\x00\\x00\\x00\\x00\\c6E\\\\_\\\\__/_/\\\\_\\\\__/\\c00\r\n\\x00\\x00\\c6E/¯/¯¯\\\\¯\\\\/¯/¯¯\\\\¯\\\\\\c00\r\n\\x00\\x00\\c6E\\\\_\\\\__/_/\\\\_\\\\__/_/\\c00\r\n\\x00\\x00\\x00\\x00\\c6E/¯¯\\\\/¯¯\\\\/¯¯\\\\/¯\\c00\r\n\\x00\\x00\\x00\\x00\\c6E\\\\__/\\\\__/\\\\__/\\\\_\\c00", - "" })] + @"\c00\x00\x00\c6E/¯¯\\/¯¯\\/¯¯\\/¯¯\\\c00 +\x00\x00\c6E\\__/\\__/\\__/\\__/\c00 +\x00\x00\x00\x00\c6E/¯¯\\/¯¯\\/¯¯\\/¯\c00 +\x00\x00\x00\x00\c6E\\__/\\__/\\__/\\_\c00 +\x00\x00\c6E/¯¯\\/¯¯\\/¯¯\\/¯¯\\\c00 +\x00\x00\c6E\\__/\\__/\\__/\\__/\c00 +\x00\x00\x00\x00\c6E/¯¯\\/¯¯\\/¯¯\\/¯\c00 +\x00\x00\x00\x00\c6E\\__/\\__/\\__/\\_\c00" })] public void UpdateTest2(string name, VTiles vt, VTiles vt2, string[] sExp) { - var tileDisplayHex = new TileDisplayHex(new Point(2, 0), new Size(4, 4), new TestTileDef42()); - - tileDisplayHex.FncGetTile = (p) => vt2; - tileDisplayHex.FullRedraw(); - Application.DoEvents(); - Assert.AreEqual(cExpUpdateText2[(int)vt2], _tstCon.Content); + var tileDisplayHex = new TileDisplayHex(new Point(2, 0), new Size(4, 4), new TestTileDef42()) + { + FncGetTile = (p) => vt2 + }; + tileDisplayHex.FullRedraw(); + Application_DoEvents(); + AssertAreEqual(cExpUpdateText2[(int)vt2], _tstCon?.Content??""); - Thread.Sleep(100); + Thread_Sleep(10); tileDisplayHex.FncGetTile = (p) => xTst(p) ? vt : vt2; tileDisplayHex.FncOldPos = (p) => xTst(p) ? new Point(p.X * 3 - 3, p.Y) : p; - tileDisplayHex.Update(true); //Halvstep - Application.DoEvents(); - Assert.AreEqual(sExp[0], _tstCon.Content, $"Test:{name}.Halfstep"); + tileDisplayHex.Update(true); //HalfStep + Application_DoEvents(); + AssertAreEqual(sExp[0], _tstCon?.Content ??"", $"Test:{name}.HalfStep"); - Thread.Sleep(100); + Thread_Sleep(10); - tileDisplayHex.Update(false); //Fullstep - Application.DoEvents(); - Assert.AreEqual(sExp[1], _tstCon.Content, $"Test:{name}.Fullstep"); + tileDisplayHex.Update(false); //FullStep + Application_DoEvents(); + AssertAreEqual(sExp[1], _tstCon?.Content ?? "", $"Test:{name}.FullStep"); - Thread.Sleep(100); - Application.DoEvents(); + Thread_Sleep(10); + Application_DoEvents(); console!.Clear(); tileDisplayHex.FullRedraw(); - Application.DoEvents(); - Assert.AreEqual(sExp[1], _tstCon.Content, $"Test:{name}.Fullredraw"); + Application_DoEvents(); + AssertAreEqual(sExp[1], _tstCon?.Content ?? "", $"Test:{name}.FullRedraw"); - - bool xTst(Point p) => p.X > 0 && p.Y > 0 && p.X < 3 && p.Y < 3; + static bool xTst(Point p) => p.X > 0 && p.Y > 0 && p.X < 3 && p.Y < 3; } [DataTestMethod()] @@ -782,37 +1061,37 @@ public void UpdateTest2(string name, VTiles vt, VTiles vt2, string[] sExp) { "\\c00\\x00\\x00\\c6E/¯¯\\\\\\c00\\x00\\x00\\x00\\x00\\c6E/¯¯\\\\\\c00\r\n\\x00\\x00\\c6E\\\\__//¯¯\\\\\\\\__//¯¯\\\\\\c00\r\n\\x00\\x00\\c6E/¯¯\\\\\\\\__//¯¯\\\\\\\\__/\\c00\r\n\\x00\\x00\\c6E\\\\__//¯¯\\\\\\\\__//¯¯\\\\\\c00\r\n\\x00\\x00\\c6E/¯¯\\\\\\\\__//¯¯\\\\\\\\__/\\c00\r\n\\x00\\x00\\c6E\\\\__//¯¯\\\\\\\\__//¯¯\\\\\\c00\r\n\\x00\\x00\\c6E/¯¯\\\\\\\\__//¯¯\\\\\\\\__/\\c00\r\n\\x00\\x00\\c6E\\\\__//¯¯\\\\\\\\__//¯¯\\\\\\c00" })] public void UpdateTest3(string name, VTiles vt, VTiles vt2, string[] sExp) { - var tileDisplayHex = new TileDisplayHex(new Point(2, 0), new Size(4, 4), new TestTileDef42(),true); - - tileDisplayHex.FncGetTile = (p) => vt2; - tileDisplayHex.FullRedraw(); - Application.DoEvents(); - Assert.AreEqual(cExpUpdateText3[(int)vt2], _tstCon.Content); + var tileDisplayHex = new TileDisplayHex(new Point(2, 0), new Size(4, 4), new TestTileDef42(), true) + { + FncGetTile = (p) => vt2 + }; + tileDisplayHex.FullRedraw(); + Application_DoEvents(); + AssertAreEqual(cExpUpdateText3[(int)vt2], _tstCon?.Content ?? ""); - Thread.Sleep(100); + Thread_Sleep(10); tileDisplayHex.FncGetTile = (p) => xTst(p) ? vt : vt2; tileDisplayHex.FncOldPos = (p) => xTst(p) ? new Point(p.X * 3 - 3, p.Y) : p; - tileDisplayHex.Update(true); //Halvstep - Application.DoEvents(); - Assert.AreEqual(sExp[0], _tstCon.Content, $"Test:{name}.Halfstep"); + tileDisplayHex.Update(true); //HalfStep + Application_DoEvents(); + AssertAreEqual(sExp[0], _tstCon?.Content ?? "", $"Test:{name}.HalfStep"); - Thread.Sleep(100); + Thread_Sleep(10); - tileDisplayHex.Update(false); //Fullstep - Application.DoEvents(); - Assert.AreEqual(sExp[1], _tstCon.Content, $"Test:{name}.Fullstep"); + tileDisplayHex.Update(false); //FullStep + Application_DoEvents(); + AssertAreEqual(sExp[1], _tstCon?.Content ??"", $"Test:{name}.FullStep"); - Thread.Sleep(100); - Application.DoEvents(); + Thread_Sleep(10); + Application_DoEvents(); console!.Clear(); tileDisplayHex.FullRedraw(); - Application.DoEvents(); - Assert.AreEqual(sExp[1], _tstCon.Content, $"Test:{name}.Fullredraw"); - + Application_DoEvents(); + AssertAreEqual(sExp[1], _tstCon?.Content ?? "", $"Test:{name}.FullRedraw"); - bool xTst(Point p) => p.X > 0 && p.Y > 0 && p.X < 3 && p.Y < 3; + static bool xTst(Point p) => p.X > 0 && p.Y > 0 && p.X < 3 && p.Y < 3; } } } diff --git a/CSharpBible/ConsoleDisplayTests/View/TileDisplayTests.cs b/CSharpBible/ConsoleDisplayTests/View/TileDisplayTests.cs index 76cc6b699..8cbea315e 100644 --- a/CSharpBible/ConsoleDisplayTests/View/TileDisplayTests.cs +++ b/CSharpBible/ConsoleDisplayTests/View/TileDisplayTests.cs @@ -18,7 +18,7 @@ static TileDisplayTests() } private static MyConsoleBase? console; - private static TstConsole _tstCon; + private static TstConsole? _tstCon; private readonly string cExpWriteTile=@"\c00 \x00\x00\x00\x00\x00\x00\x00\x00\c4F─┴┬─\c00\x00\x00\x00\x00\x00\x00\x00\x00\c6F⌐°@)\c00\x00\x00\x00\x00\x00\x00\x00\x00\c1A]\cA0°°\c1A[\c00 \x00\x00\c6E=-=-\c00\x00\x00\c4F─┬┴─\c00\x00\x00\c0E ╓╖ \c00\x00\x00\c6F ⌡⌡‼\c00\x00\x00\c6E/¯¯\\\c00\x00\x00\c1A_\cA0!!\c1A_\c00\x00\x00\c1A◄\cA0°@\c1A[\c00 \c1A]\cA0oo\c1A[\c00\x00\x00\c6E-=-=\c00\x00\x00\c6E/╨╨\\\c00\x00\x00\c2A▓\c22░\c02▒\c22▓\c00\x00\x00\x00\x00\x00\x00\x00\x00\c6E\\__/\c00\x00\x00\x00\x00\x00\x00\x00\x00\c1A_\cA0!!\c1A\\\c00 @@ -150,7 +150,7 @@ public void TileDisplayTest1() Thread.Sleep(0); } Application.DoEvents(); - Assert.AreEqual(cTileDisplayTest1, _tstCon.Content); + Assert.AreEqual(cTileDisplayTest1, _tstCon?.Content); tileDisplay = new TileDisplay(new Point(62, 12), new Size(3, 5)); foreach (VTiles tile in typeof(VTiles).GetEnumValues()) @@ -159,9 +159,9 @@ public void TileDisplayTest1() Thread.Sleep(0); } Application.DoEvents(); - Assert.AreEqual(cTileDisplayTest12, _tstCon.Content); + Assert.AreEqual(cTileDisplayTest12, _tstCon?.Content); - Thread.Sleep(500); + Thread.Sleep(100); } [TestMethod()] @@ -174,7 +174,7 @@ public void TileDisplayTest2() Thread.Sleep(0); } Application.DoEvents(); - Assert.AreEqual(cTileDisplayTest2, _tstCon.Content); + Assert.AreEqual(cTileDisplayTest2, _tstCon?.Content); tileDisplay = new TileDisplay(new Point(62, 12), new Size(3, 5),new Size(2, 2)); foreach (VTiles tile in typeof(VTiles).GetEnumValues()) @@ -183,11 +183,13 @@ public void TileDisplayTest2() Thread.Sleep(0); } Application.DoEvents(); - Assert.AreEqual(cTileDisplayTest22, _tstCon.Content); + Assert.AreEqual(cTileDisplayTest22, _tstCon?.Content); tileDisplay = new TileDisplay(new Point(40, 6), new Size(3, 5), new Size(4, 2)); - var tileDisplay2 = new TileDisplay(new Point(32, 8), new Size(3, 5),new Size(2,1)); - tileDisplay2.TileDef = new TestTileDef21(); + var tileDisplay2 = new TileDisplay(new Point(32, 8), new Size(3, 5), new Size(2, 1)) + { + TileDef = new TestTileDef21() + }; foreach (VTiles tile in typeof(VTiles).GetEnumValues()) { tileDisplay.WriteTile(new PointF((((int)tile) % 3) * 1.5f - 0.5f, (((int)tile) % 2) * 0.5f + (((int)tile) / 3) * 1.5f - 0.5f), tile); @@ -195,9 +197,9 @@ public void TileDisplayTest2() Thread.Sleep(0); } Application.DoEvents(); - Assert.AreEqual(cTileDisplayTest23, _tstCon.Content); + Assert.AreEqual(cTileDisplayTest23, _tstCon?.Content); - Thread.Sleep(500); + Thread.Sleep(100); } [TestMethod()] @@ -208,8 +210,8 @@ public void WriteTileTest() TileDisplay.WriteTile(Point.Empty, new PointF((((int)tile) % 8) * 1.5f, (((int)tile) % 2) * 0.5f + (((int)tile) / 8)), tile); Thread.Sleep(0); } - Assert.AreEqual(cExpWriteTile, _tstCon.Content); - Thread.Sleep(500); + Assert.AreEqual(cExpWriteTile, _tstCon?.Content); + Thread.Sleep(100); } [DataTestMethod()] @@ -234,15 +236,15 @@ public void FullRedrawTest(string name,VTiles vt,string sExp) tileDisplay.FncGetTile = (p) => (VTiles)(p.X + p.Y * tileDisplay.DispSize.Width); tileDisplay.FullRedraw(); Application.DoEvents(); - Assert.AreEqual(cTileDisplayTest3, _tstCon.Content); - Thread.Sleep(500); + Assert.AreEqual(cTileDisplayTest3, _tstCon?.Content); + Thread.Sleep(100); } tileDisplay.FncGetTile = (p) => vt; tileDisplay.FullRedraw(); Application.DoEvents(); - Assert.AreEqual(sExp, _tstCon.Content); + Assert.AreEqual(sExp, _tstCon?.Content); - Thread.Sleep(500); + Thread.Sleep(100); } [DataTestMethod()] @@ -357,34 +359,35 @@ public void FullRedrawTest(string name,VTiles vt,string sExp) "\\c00\\x00\\x00\\c6E[][][][]\\c00\r\n\\x00\\x00\\c6E[][][][]\\c00\r\n\\x00\\x00\\c6E[][][][]\\c00\r\n\\x00\\x00\\c6E[][][][]\\c00"})] public void UpdateTest(string name, VTiles vt, VTiles vt2, string[] sExp) { - var tileDisplay = new TileDisplay(new Point(2, 0), new Size(4, 4), new TestTileDef21()); - - tileDisplay.FncGetTile = (p) => vt2; + var tileDisplay = new TileDisplay(new Point(2, 0), new Size(4, 4), new TestTileDef21()) + { + FncGetTile = (p) => vt2 + }; tileDisplay.FullRedraw(); Application.DoEvents(); - Assert.AreEqual(cExpUpdateText[(int)vt2], _tstCon.Content); + Assert.AreEqual(cExpUpdateText[(int)vt2], _tstCon?.Content); - Thread.Sleep(100); + Thread.Sleep(10); tileDisplay.FncGetTile = (p) => xTst(p)? vt:vt2; tileDisplay.FncOldPos = (p) => xTst(p) ? new Point(p.X * 3 - 3, p.Y) : p; tileDisplay.Update(true); //Halvstep Application.DoEvents(); - Assert.AreEqual(sExp[0], _tstCon.Content,$"Test:{name}.Halfstep"); + Assert.AreEqual(sExp[0], _tstCon?.Content,$"Test:{name}.Halfstep"); - Thread.Sleep(100); + Thread.Sleep(10); tileDisplay.Update(false); //Fullstep Application.DoEvents(); - Assert.AreEqual(sExp[1], _tstCon.Content, $"Test:{name}.Fullstep"); + Assert.AreEqual(sExp[1], _tstCon?.Content, $"Test:{name}.Fullstep"); - Thread.Sleep(100); + Thread.Sleep(10); Application.DoEvents(); console!.Clear(); tileDisplay.FullRedraw(); Application.DoEvents(); - Assert.AreEqual(sExp[1], _tstCon.Content, $"Test:{name}.Fullredraw"); + Assert.AreEqual(sExp[1], _tstCon?.Content, $"Test:{name}.Fullredraw"); bool xTst(Point p) => p.X > 0 && p.Y > 0 && p.X < 3 && p.Y < 3; diff --git a/CSharpBible/ConsoleMouseApp/ConsoleMouseApp.csproj b/CSharpBible/ConsoleMouseApp/ConsoleMouseApp.csproj index 093a55738..d86f09793 100644 --- a/CSharpBible/ConsoleMouseApp/ConsoleMouseApp.csproj +++ b/CSharpBible/ConsoleMouseApp/ConsoleMouseApp.csproj @@ -1,61 +1,53 @@ - - - - Debug - AnyCPU - {98D9C22F-ED66-4219-B6B8-8E38A04F9771} - Exe - ConsoleMouseApp - ConsoleMouseApp - ..\..\bin\$(MSBuildProjectName)\ - ..\..\obj\$(MSBuildProjectName)\ - ..\..\obj\$(MSBuildProjectName)\ - v4.8 - 512 - true - true - - - - - AnyCPU - true - full - false - ..\..\bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - ..\..\bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - {26ccce4d-a445-46af-ba58-6fed8ef8412a} - ConsoleLib - - - + + + + Exe + net462-windows;net472-windows;net481-windows;net48-windows + true + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + \ No newline at end of file diff --git a/CSharpBible/ConsoleMouseApp/ConsoleMouseApp_net.csproj b/CSharpBible/ConsoleMouseApp/ConsoleMouseApp_net.csproj index 1dbddde7e..8fc91ff14 100644 --- a/CSharpBible/ConsoleMouseApp/ConsoleMouseApp_net.csproj +++ b/CSharpBible/ConsoleMouseApp/ConsoleMouseApp_net.csproj @@ -1,10 +1,7 @@ - - + + net6.0-windows - ..\..\bin\$(MSBuildProjectName)\ - ..\..\obj.net\$(MSBuildProjectName)\ - enable true Exe @@ -15,9 +12,6 @@ false false 1.0.* - JC-Soft - Joe Care - Copyright © JC-Soft 2022 ConsoleMouseApp 1.0 False @@ -36,7 +30,7 @@ - + \ No newline at end of file diff --git a/CSharpBible/ConsoleMouseApp/View/ConsoleMouseView.cs b/CSharpBible/ConsoleMouseApp/View/ConsoleMouseView.cs index 55b5a6950..ff2f13039 100644 --- a/CSharpBible/ConsoleMouseApp/View/ConsoleMouseView.cs +++ b/CSharpBible/ConsoleMouseApp/View/ConsoleMouseView.cs @@ -61,7 +61,7 @@ public ConsoleMouseView() parent = this, ForeColor = ConsoleColor.White, BackColor = ConsoleColor.Gray, - shaddow = true, + shadow = true, position = new Point(5, 10), Text = "░░1░░" }; @@ -99,7 +99,7 @@ private ConsoleLib.CommonControls.Panel CreatePanel(Rectangle cl) BackColor = ConsoleColor.DarkBlue, BoarderColor = ConsoleColor.Green, dimension = cl, - shaddow = true + shadow = true }; var btnOK = new ConsoleLib.CommonControls.Button @@ -107,7 +107,7 @@ private ConsoleLib.CommonControls.Panel CreatePanel(Rectangle cl) parent = result, ForeColor = ConsoleColor.White, BackColor = ConsoleColor.Gray, - shaddow = true, + shadow = true, position = new Point(2, 2), Text = "░░░OK░░░", }; @@ -118,7 +118,7 @@ private ConsoleLib.CommonControls.Panel CreatePanel(Rectangle cl) parent = result, ForeColor = ConsoleColor.White, BackColor = ConsoleColor.Gray, - shaddow = true, + shadow = true, position = new Point(14, 2), Text = "░Cancel░", }; diff --git a/CSharpBible/DB/DB.props b/CSharpBible/DB/DB.props new file mode 100644 index 000000000..7988d239f --- /dev/null +++ b/CSharpBible/DB/DB.props @@ -0,0 +1,13 @@ + + + ..\..\..\bin\$(MSBuildProjectName)\ + ..\..\..\obj\$(MSBuildProjectName)\ + 9.0 + enable + NULLABLE + disable + JC-Soft + Joe Care + Copyright © JC-Soft 2023 + + \ No newline at end of file diff --git a/CSharpBible/DB/DBTest1/DBTest1.csproj b/CSharpBible/DB/DBTest1/DBTest1.csproj index 536b113fb..a5bd3b6c2 100644 --- a/CSharpBible/DB/DBTest1/DBTest1.csproj +++ b/CSharpBible/DB/DBTest1/DBTest1.csproj @@ -1,18 +1,19 @@  - + Exe - net6.0 - disable - enable - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\bin\$(MSBuildProjectName) + net6.0;net7.0;net8.0 + AnyCPU;x86 - + + + + diff --git a/CSharpBible/DB/DBTest1/Model/BasicExample.cs b/CSharpBible/DB/DBTest1/Model/BasicExample.cs index 3537c4255..9b1491427 100644 --- a/CSharpBible/DB/DBTest1/Model/BasicExample.cs +++ b/CSharpBible/DB/DBTest1/Model/BasicExample.cs @@ -1,47 +1,95 @@ -using MySqlConnector; +//using MySql.Data.MySqlClient; +using MySqlConnector; using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Reflection.PortableExecutable; -using System.Text; -using System.Threading.Tasks; +using System.Data; namespace DBTest1.Model { public class BasicExample { - public static async Task DoExampleAsync(params object[]? args) + public static void DoExample(params string[] args) { - var connString = "Server={0};User ID={1};Password={2};Database={3}"; + var builder = new MySqlConnectionStringBuilder + { + Server = args[0], + UserID = args[1], + Password = args[2], + Database = args[3], + CharacterSet ="UTF8" + }; - using (var conn = new MySqlConnection(String.Format(connString, args))) + using var conn = new MySqlConnection(builder.ConnectionString); + conn.StateChange += Conn_StateChange; + try { - conn.StateChange += Conn_StateChange; - try - { - await conn.OpenAsync(); - } - catch (Exception ex) - { - Console.WriteLine($"Exception: {ex.Message}"); - throw; - } - // Insert some data - using (var cmd = new MySqlCommand()) - { - cmd.Connection = conn; - cmd.CommandText = "INSERT INTO data (some_field) VALUES (@p)"; - cmd.Parameters.AddWithValue("p", "Hello world"); - await cmd.ExecuteNonQueryAsync(); - } - - // Retrieve all rows - using (var cmd = new MySqlCommand("SELECT some_field FROM data", conn)) - using (var reader = await cmd.ExecuteReaderAsync()) - while (await reader.ReadAsync()) - Console.WriteLine(reader.GetString(0)); + conn.Open(); + } + catch (Exception ex) + { + Console.WriteLine($"Exception: {ex.Message}"); + throw; } + + // Insert some data + using (var cmd = new MySqlCommand()) + { + cmd.Connection = conn; + cmd.CommandText = "INSERT INTO Testtable (Description) VALUES (@d)"; + cmd.Parameters.AddWithValue("d", "Héllo wörld"); + cmd.ExecuteNonQuery(); + } + + var s= conn.GetSchema(); + foreach (var col in s.Columns) + Console.Write($"{col}\t"); + Console.WriteLine(); + Console.WriteLine("======================="); + foreach (DataRow row in s.Rows) + { + foreach(var col in row.ItemArray) + Console.Write($"{col}\t"); + Console.WriteLine(); + } + + + s = conn.GetSchema("Tables"); + foreach (var col in s.Columns) + Console.Write($"{col}\t"); + Console.WriteLine(); + Console.WriteLine("======================="); + foreach (DataRow row in s.Rows) + { + foreach (var col in row.ItemArray) + Console.Write($"{col}\t"); + Console.WriteLine(); + } + + + // Retrieve all rows + var xFirst = true; + using (var cmd = new MySqlCommand("SELECT * FROM Testtable", conn)) + using (var reader = cmd.ExecuteReader()) + while (reader.Read()) + { + if ( xFirst) + { + for (int i = 0; i < reader.FieldCount; i++) + Console.Write($"{reader.GetName(i)}\t"); + Console.WriteLine(); + for (int i = 0; i < reader.FieldCount; i++) + Console.Write($"{new string('=',reader.GetName(i).Length)}\t"); + Console.WriteLine(); + xFirst = false; + } + + for (int i = 0; i < reader.FieldCount; i++) + switch (reader.GetDataTypeName(i)) + { + case "VARCHAR": Console.Write($"{reader.GetString(i)}\t"); break; + case "INT": Console.Write($"{reader.GetInt32(i)}\t"); break; + } + Console.WriteLine(); + } } private static void Conn_StateChange(object sender, System.Data.StateChangeEventArgs e) diff --git a/CSharpBible/DB/DBTest1/Model/DB1.cs b/CSharpBible/DB/DBTest1/Model/DB1.cs index 9d6d29d44..177a4a08c 100644 --- a/CSharpBible/DB/DBTest1/Model/DB1.cs +++ b/CSharpBible/DB/DBTest1/Model/DB1.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace DBTest1.Model +namespace DBTest1.Model { public class DB1 { diff --git a/CSharpBible/DB/DBTest1/OleDbConnectorFactory.cs b/CSharpBible/DB/DBTest1/OleDbConnectorFactory.cs new file mode 100644 index 000000000..ba9c73215 --- /dev/null +++ b/CSharpBible/DB/DBTest1/OleDbConnectorFactory.cs @@ -0,0 +1,19 @@ +using System.Data.Common; +using System.Data.OleDb; + +namespace DBTest1 +{ + public sealed class OleDbConnectorFactory : DbProviderFactory + { + public static readonly OleDbConnectorFactory Instance = new OleDbConnectorFactory(); + private OleDbConnectorFactory() { } + + public override DbCommand? CreateCommand() => new OleDbCommand(); + public override DbCommandBuilder? CreateCommandBuilder() => new OleDbCommandBuilder(); + public override DbConnection? CreateConnection() => new OleDbConnection(); + public override DbConnectionStringBuilder? CreateConnectionStringBuilder() => new OleDbConnectionStringBuilder(); + public override DbDataAdapter? CreateDataAdapter() => new OleDbDataAdapter(); + public override DbParameter? CreateParameter() => new OleDbParameter(); + + } +} \ No newline at end of file diff --git a/CSharpBible/DB/DBTest1/Program.cs b/CSharpBible/DB/DBTest1/Program.cs index 5be8be05d..b3cbf6025 100644 --- a/CSharpBible/DB/DBTest1/Program.cs +++ b/CSharpBible/DB/DBTest1/Program.cs @@ -1,4 +1,7 @@ using DBTest1.Model; +using MySqlConnector; +using System.Data.Common; +using System.Data.OleDb; namespace DBTest1 { @@ -7,11 +10,18 @@ public static class program static program() { // The Initialization +#if NET6_0_OR_GREATER + DbProviderFactories.RegisterFactory("MySqlConnector", MySqlConnectorFactory.Instance); + DbProviderFactories.RegisterFactory("OleDBConnector", OleDbConnectorFactory.Instance); +#endif } public static void Main(params string[] args) { - BasicExample.DoExampleAsync("192.168.0.98", "root", "", "TestDB"); + foreach(var s in DbProviderFactories.GetProviderInvariantNames()) + System.Console.WriteLine(s); + System.Console.WriteLine(new string('=',50)); + BasicExample.DoExample("192.168.0.98", "root", "", "test"); } } } \ No newline at end of file diff --git a/CSharpBible/DB/DB_net.props b/CSharpBible/DB/DB_net.props new file mode 100644 index 000000000..9822987be --- /dev/null +++ b/CSharpBible/DB/DB_net.props @@ -0,0 +1,12 @@ + + + ..\..\..\bin\$(MSBuildProjectName)\ + ..\..\..\obj.net\$(MSBuildProjectName)\ + 9.0 + enable + disable + JC-Soft + Joe Care + Copyright © JC-Soft 2023 + + \ No newline at end of file diff --git a/CSharpBible/DB/DataLake_App/DataLake_App.csproj b/CSharpBible/DB/DataLake_App/DataLake_App.csproj new file mode 100644 index 000000000..d43980000 --- /dev/null +++ b/CSharpBible/DB/DataLake_App/DataLake_App.csproj @@ -0,0 +1,10 @@ + + + + Exe + net7.0 + enable + enable + + + diff --git a/CSharpBible/DB/DataLake_App/Program.cs b/CSharpBible/DB/DataLake_App/Program.cs new file mode 100644 index 000000000..f5d053b55 --- /dev/null +++ b/CSharpBible/DB/DataLake_App/Program.cs @@ -0,0 +1,10 @@ +namespace DataLake_App +{ + internal class Program + { + static void Main(string[] args) + { + Console.WriteLine("Hello, World!"); + } + } +} \ No newline at end of file diff --git a/CSharpBible/DB/DataLake_Example/DataLake_Example.sln b/CSharpBible/DB/DataLake_Example/DataLake_Example.sln new file mode 100644 index 000000000..31d44a5dc --- /dev/null +++ b/CSharpBible/DB/DataLake_Example/DataLake_Example.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.33530.505 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{0C603C2C-620A-423B-A800-4F3E2F6281F1}") = "DataLake_Example", "DataLake_Example\DataLake_Example.usqldbproj", "{050D4AC1-25FE-449E-B04C-8C8B326F6D73}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {050D4AC1-25FE-449E-B04C-8C8B326F6D73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {050D4AC1-25FE-449E-B04C-8C8B326F6D73}.Debug|Any CPU.Build.0 = Debug|Any CPU + {050D4AC1-25FE-449E-B04C-8C8B326F6D73}.Release|Any CPU.ActiveCfg = Release|Any CPU + {050D4AC1-25FE-449E-B04C-8C8B326F6D73}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {EC6360D7-EC62-48F8-84D0-BB8CD769F954} + EndGlobalSection +EndGlobal diff --git a/CSharpBible/DB/DataLake_Example/DataLake_Example/DataLake_Example.usqldbproj b/CSharpBible/DB/DataLake_Example/DataLake_Example/DataLake_Example.usqldbproj new file mode 100644 index 000000000..660f01743 --- /dev/null +++ b/CSharpBible/DB/DataLake_Example/DataLake_Example/DataLake_Example.usqldbproj @@ -0,0 +1,27 @@ + + + Debug + AnyCPU + 2.0 + 050d4ac1-25fe-449e-b04c-8c8b326f6d73 + File + DataLake_Example.usqldbpack + v4.8.1 + DataLake_Example + DataLake_Example + + + true + bin\Debug\ + + + false + bin\Release\ + + + + + + \ No newline at end of file diff --git a/CSharpBible/DB/DataLake_Example/DataLake_Example/Schema1.usql b/CSharpBible/DB/DataLake_Example/DataLake_Example/Schema1.usql new file mode 100644 index 000000000..5eede43b1 --- /dev/null +++ b/CSharpBible/DB/DataLake_Example/DataLake_Example/Schema1.usql @@ -0,0 +1 @@ +CREATE SCHEMA IF NOT EXISTS [schema1]; diff --git a/CSharpBible/DB/FoxCon/FoxCon.csproj b/CSharpBible/DB/FoxCon/FoxCon.csproj index 1cfd258d7..e0d592c01 100644 --- a/CSharpBible/DB/FoxCon/FoxCon.csproj +++ b/CSharpBible/DB/FoxCon/FoxCon.csproj @@ -19,7 +19,7 @@ - + diff --git a/CSharpBible/DB/FoxCon/Model/FoxConMain.cs b/CSharpBible/DB/FoxCon/Model/FoxConMain.cs index 48f476ff6..2c470e401 100644 --- a/CSharpBible/DB/FoxCon/Model/FoxConMain.cs +++ b/CSharpBible/DB/FoxCon/Model/FoxConMain.cs @@ -1,13 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Text; -using System.Threading.Tasks; -using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; +using OpenQA.Selenium; using OpenQA.Selenium.Edge; -using OpenQA.Selenium.Firefox; using OpenQA.Selenium.Support.UI; namespace FoxCon.Model diff --git a/CSharpBible/DB/MdbBrowser/App.xaml b/CSharpBible/DB/MdbBrowser/App.xaml new file mode 100644 index 000000000..a1843f381 --- /dev/null +++ b/CSharpBible/DB/MdbBrowser/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/CSharpBible/DB/MdbBrowser/App.xaml.cs b/CSharpBible/DB/MdbBrowser/App.xaml.cs new file mode 100644 index 000000000..fbf8ff799 --- /dev/null +++ b/CSharpBible/DB/MdbBrowser/App.xaml.cs @@ -0,0 +1,11 @@ +using System.Windows; + +namespace MdbBrowser +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/CSharpBible/Graphics/Polyline/AssemblyInfo.cs b/CSharpBible/DB/MdbBrowser/AssemblyInfo.cs similarity index 100% rename from CSharpBible/Graphics/Polyline/AssemblyInfo.cs rename to CSharpBible/DB/MdbBrowser/AssemblyInfo.cs diff --git a/CSharpBible/DB/MdbBrowser/MdbBrowser.csproj b/CSharpBible/DB/MdbBrowser/MdbBrowser.csproj new file mode 100644 index 000000000..63c425502 --- /dev/null +++ b/CSharpBible/DB/MdbBrowser/MdbBrowser.csproj @@ -0,0 +1,59 @@ + + + + WinExe + net481-windows;net472-windows;net462-windows;net6.0-windows;net7.0-windows;net8.0-windows + enable + true + AnyCPU;x86 + + + 7 + + + 7 + + + 7 + + + 7 + + + 7 + + + 7 + + + 7 + + + 7 + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CSharpBible/DB/MdbBrowser/MdbBrowser2.csproj b/CSharpBible/DB/MdbBrowser/MdbBrowser2.csproj new file mode 100644 index 000000000..77540d220 --- /dev/null +++ b/CSharpBible/DB/MdbBrowser/MdbBrowser2.csproj @@ -0,0 +1,119 @@ + + + + + WinExe + enable + true + x86 + WinExe + Properties + MdbBrowser + MdbBrowser2 + v4.8.1 + 512 + true + + {B69D2514-586E-4E9C-9E2C-D9191754393B} + + + AnyCPU + true + full + true + ..\..\bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + + + AnyCPU + pdbonly + true + ..\..\bin\Release\ + TRACE + prompt + 4 + + + MdbBrowser.App + + + + + + + + + + + + + + App.xaml + + + + + DBView.xaml + + + MainWindow.xaml + + + + TableView.xaml + + + + + tlbimp + 0 + 6 + 00000600-0000-0010-8000-00aa006d2ea4 + 0 + false + False + + + tlbimp + 1 + 6 + b691e011-1797-432e-907a-4d8c69339129 + 0 + false + true + + + + + + + + + + + + + + XamlIntelliSenseFileGenerator + Designer + + + XamlIntelliSenseFileGenerator + Designer + + + XamlIntelliSenseFileGenerator + Designer + + + + + XamlIntelliSenseFileGenerator + Designer + + + + \ No newline at end of file diff --git a/CSharpBible/DB/MdbBrowser/Models/DBMetaData.cs b/CSharpBible/DB/MdbBrowser/Models/DBMetaData.cs new file mode 100644 index 000000000..611496fd9 --- /dev/null +++ b/CSharpBible/DB/MdbBrowser/Models/DBMetaData.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; + +namespace MdbBrowser.Models +{ + // public record DBMetaData(string Name, EKind Kind, IEnumerable Data); + public struct DBMetaData + { + public string Name { get; set; } + public EKind Kind { get; set; } + public object This; + public IEnumerable Data { get; set; } + public DBMetaData(string Name, EKind Kind, object This, IEnumerable Data) + { + this.Name = Name; + this.Kind = Kind; + this.This = This; + this.Data = Data; + } + } +} diff --git a/CSharpBible/DB/MdbBrowser/Models/DBModel.cs b/CSharpBible/DB/MdbBrowser/Models/DBModel.cs new file mode 100644 index 000000000..680e06912 --- /dev/null +++ b/CSharpBible/DB/MdbBrowser/Models/DBModel.cs @@ -0,0 +1,114 @@ +using System; +using System.Data.OleDb; +using System.IO; +using System.Collections.Generic; +using System.Data.Common; +using System.Data; +using MdbBrowser.Models.Interfaces; +using System.Linq; + +namespace MdbBrowser.Models +{ + public class DBModel : IDBModel + { + OleDbConnectionStringBuilder connectionStringBuilder = new(); + + public DBModel(string filename) : this(new OleDbConnectionStringBuilder() { + Provider = "Microsoft.ACE.OLEDB.16.0", + // Provider = "Microsoft.ACE.OLEDB.12.0", + // Provider = "Microsoft.Jet.OLEDB.4.0", + DataSource = filename, PersistSecurityInfo = false }) + {} + public DBModel(DbConnectionStringBuilder connect) + { + database.ConnectionString = connect.ConnectionString; + database.InfoMessage += (sender, e) => System.Diagnostics.Debug.WriteLine($"{sender}: {e.Message}"); + database.StateChange += (sender, e) => + { + System.Diagnostics.Debug.WriteLine($"{sender}: {e.OriginalState}=>{e.CurrentState}"); + + QueryDB(sender as OleDbConnection); + }; + if (File.Exists(connect["Data Source"].ToString())) + database.Open(); + else + try { + // copy empty database to filename + database.OpenAsync(); + } + catch (Exception) { } + } + + private void QueryDB(OleDbConnection oleDbConnection) + { + if (oleDbConnection != null && oleDbConnection.State == ConnectionState.Open) + { + dbMetaData.Clear(); + var schema = oleDbConnection.GetSchema(); + foreach (DataRow schemaDef in schema.Rows) + { + dbMetaData.Add(new DBMetaData(schemaDef[0].ToString(), EKind.Schema, schemaDef, null)); + } + var tables = oleDbConnection.GetSchema("Tables"); + foreach (DataRow table in tables.Rows) + { + if (!table["TABLE_NAME"].ToString().StartsWith("MSys")) + { + dbMetaData.Add(new DBMetaData(table["TABLE_NAME"].ToString(), EKind.Table, table, null)); + } + } + var views = oleDbConnection.GetSchema("Views"); + foreach (DataRow view in views.Rows) + { + dbMetaData.Add(new DBMetaData(view[0].ToString(), EKind.Query, view, null )); + } + dbDataTypes.Clear(); + var datatypes = oleDbConnection.GetSchema("DataTypes"); + foreach (DataRow datatype in datatypes.Rows) + { + dbDataTypes.Add(new DBMetaData(datatype[0].ToString(), EKind.DataTypes, datatype, new[] { datatype[5].ToString(), datatype[1].ToString(), datatype[2].ToString() })); + } + + } + } + + public IList QueryTable(string sTableName) + { + var oleDbConnection = database; + var result = new List(); + if (oleDbConnection != null + && oleDbConnection.State == ConnectionState.Open) + { + var schema = oleDbConnection.GetSchema("Columns", new string[] { null, null, sTableName }); + foreach (DataRow schemaDef in schema.Rows) + { + result.Add(new DBMetaData(schemaDef[3].ToString(), EKind.Column, schemaDef, new[] { GetTypeName((int)schemaDef[11]), schemaDef[13].ToString() } )); + } + } + return result; + } + + private string GetTypeName(int iID) { + foreach (var dt in dbDataTypes) + if (dt.Data?.ToList()[1] is string sID && int.TryParse(sID, out int iID2) && iID2 == iID) + return dt.Name; + + return iID switch { + 130 => "VarChar", + _ => "Unknown" + }; + } + + public DataTable? QueryTableData(string value) + { + var result = new DataTable(); + result.Load(new OleDbCommand($"SELECT * FROM {value}",database).ExecuteReader()); + return result; + } + + public OleDbConnection database { get; } = new(); + + public List dbMetaData = new(); + public List dbDataTypes = new(); + } +} diff --git a/CSharpBible/DB/MdbBrowser/Models/EKind.cs b/CSharpBible/DB/MdbBrowser/Models/EKind.cs new file mode 100644 index 000000000..8385891f0 --- /dev/null +++ b/CSharpBible/DB/MdbBrowser/Models/EKind.cs @@ -0,0 +1,19 @@ +namespace MdbBrowser.Models +{ + public enum EKind + { + Table, + Query, + Column, + Index, + Form, + Group, + Macro, + Module, + Relation, + Unknown, + User, + Schema, + DataTypes + } +} \ No newline at end of file diff --git a/CSharpBible/DB/MdbBrowser/Models/Interfaces/IDBModel.cs b/CSharpBible/DB/MdbBrowser/Models/Interfaces/IDBModel.cs new file mode 100644 index 000000000..5d80752c4 --- /dev/null +++ b/CSharpBible/DB/MdbBrowser/Models/Interfaces/IDBModel.cs @@ -0,0 +1,11 @@ +using System.Collections.Generic; +using System.Data; + +namespace MdbBrowser.Models.Interfaces +{ + public interface IDBModel + { + IList QueryTable(string sTableName); + DataTable? QueryTableData(string value); + } +} \ No newline at end of file diff --git a/CSharpBible/DB/MdbBrowser/Properties/AssemblyInfo.cs b/CSharpBible/DB/MdbBrowser/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..1fa1bd05e --- /dev/null +++ b/CSharpBible/DB/MdbBrowser/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Resources; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 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("Browser for MDB-Files")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("JC-Soft")] +[assembly: AssemblyProduct("MdbBrowser.Properties")] +[assembly: AssemblyCopyright("(c) by Joe Care")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar +// für COM-Komponenten. 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)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("9e3a82ee-4f52-43f8-8136-4420071ec307")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: NeutralResourcesLanguage("en-AS")] diff --git a/CSharpBible/DB/MdbBrowser/ViewModels/CategorizedDBMetadata.cs b/CSharpBible/DB/MdbBrowser/ViewModels/CategorizedDBMetadata.cs new file mode 100644 index 000000000..0899c5bf6 --- /dev/null +++ b/CSharpBible/DB/MdbBrowser/ViewModels/CategorizedDBMetadata.cs @@ -0,0 +1,18 @@ +using CommunityToolkit.Mvvm.ComponentModel; +using MdbBrowser.Models; +using System.Collections.ObjectModel; + +namespace MdbBrowser.ViewModels +{ + public partial class CategorizedDBMetadata : ObservableObject + { + [ObservableProperty] + private string _category = ""; + + [ObservableProperty] + private DBMetaData? _this = null; + + [ObservableProperty] + private ObservableCollection _entries = new(); + } +} diff --git a/CSharpBible/DB/MdbBrowser/ViewModels/DBViewViewModel.cs b/CSharpBible/DB/MdbBrowser/ViewModels/DBViewViewModel.cs new file mode 100644 index 000000000..0112a7a35 --- /dev/null +++ b/CSharpBible/DB/MdbBrowser/ViewModels/DBViewViewModel.cs @@ -0,0 +1,131 @@ +using CommunityToolkit.Mvvm.ComponentModel; +using CommunityToolkit.Mvvm.Input; +using MdbBrowser.Models; +using MdbBrowser.Models.Interfaces; +using MdbBrowser.ViewModels.Interfaces; +using Microsoft.Win32; +using CommonDialogs; +using CommonDialogs.Interfaces; +using System; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using System.Windows; + +namespace MdbBrowser.ViewModels +{ + + public partial class DBViewViewModel : ObservableValidator, IDBViewViewModel + { + #region Delegates + /// + /// Delegate FileDialogHandler + /// + /// The filename. + /// The par. + /// The on accept. + /// true if XXXX, false otherwise. + public delegate bool? FileDialogHandler(string Filename, IFileDialog Par, Action? OnAccept = null); + #endregion + + #region Properties + private DBModel _DBModel; + [ObservableProperty] + private string _FileOpenName; + [ObservableProperty] + private string _CurrentView; + [ObservableProperty] + private ObservableCollection _dbMetaInfo = new(); + + [ObservableProperty] + private DBMetaData? _selectedEntry = null; + + /// + /// Gets or sets the file open dialog. + /// + /// The file open dialog. + public FileDialogHandler? FileOpenDialog { get; set; } + /// + /// Gets or sets the file save as dialog. + /// + /// The file save as dialog. + public FileDialogHandler? FileSaveAsDialog { get; set; } + public static IDBViewViewModel? This { get; private set; } + + public IDBModel? dBModel => _DBModel; + + #endregion + + + public DBViewViewModel() + { + } + + + [RelayCommand] + private void Open() + { + // Show the dialog and get result. + IFileDialog foPar = new FileDialogProxy(new() + { + FileName = FileOpenName, + Filter = "Access Database (*.mdb)|*.mdb|All files (*.*)|*.*", + Title = "Open Access Database", + CheckFileExists = false + }); + FileOpenDialog?.Invoke(FileOpenName, foPar, + (s, p) => + { + FileOpenName = s; + _DBModel = new DBModel(FileOpenName); + DbMetaInfo.Clear(); + + var entriesToAdd = _DBModel.dbMetaData + .GroupBy(b => b.Kind) + .Select(b => new CategorizedDBMetadata() + { + Category = $"{b.Key}", + Entries = new(b.Select(b1 => new CategorizedDBMetadata() + { + Category = $"{b1.Name}", + This = b1 + })) + }); + + foreach (var entry in entriesToAdd) + DbMetaInfo.Add(entry); + + }); + + } + + [RelayCommand] + private void DoSelectedItemChanged(object? prop) + { + if (prop is RoutedPropertyChangedEventArgs rpcEa && rpcEa.NewValue is CategorizedDBMetadata cbvm) + { + SelectedEntry = cbvm.This; + if (SelectedEntry is DBMetaData dbmd) + try + { + This = this; + if (Assembly.GetExecutingAssembly().GetType($"{Assembly.GetExecutingAssembly().GetName().Name}.Views.{dbmd.Kind}View",true,true) is Type) + CurrentView = $"/Views/{dbmd.Kind}View.xaml"; + } + catch { CurrentView = ""; } + } + else + SelectedEntry = null; + } + + [RelayCommand] + private void Close() + { + } + + [RelayCommand] + private void Exit() + { + } + } +} diff --git a/CSharpBible/DB/MdbBrowser/ViewModels/Interfaces/IDBViewViewModel.cs b/CSharpBible/DB/MdbBrowser/ViewModels/Interfaces/IDBViewViewModel.cs new file mode 100644 index 000000000..4894cdd74 --- /dev/null +++ b/CSharpBible/DB/MdbBrowser/ViewModels/Interfaces/IDBViewViewModel.cs @@ -0,0 +1,15 @@ +using MdbBrowser.Models; +using MdbBrowser.Models.Interfaces; +using System.ComponentModel; + +namespace MdbBrowser.ViewModels.Interfaces +{ + public interface IDBViewViewModel + { + public DBMetaData? SelectedEntry { get; } + + public event PropertyChangedEventHandler? PropertyChanged; + + public IDBModel? dBModel { get; } + } +} \ No newline at end of file diff --git a/CSharpBible/DB/MdbBrowser/ViewModels/MainWindowViewModel.cs b/CSharpBible/DB/MdbBrowser/ViewModels/MainWindowViewModel.cs new file mode 100644 index 000000000..1c41ecc21 --- /dev/null +++ b/CSharpBible/DB/MdbBrowser/ViewModels/MainWindowViewModel.cs @@ -0,0 +1,17 @@ +using CommunityToolkit.Mvvm.ComponentModel; + +namespace MdbBrowser.ViewModels +{ + public partial class MainWindowViewModel : ObservableValidator + { + + public MainWindowViewModel() + { + View = "DBView.xaml"; + } + + [ObservableProperty] + private string _view; + + } +} diff --git a/CSharpBible/DB/MdbBrowser/ViewModels/TableViewViewModel.cs b/CSharpBible/DB/MdbBrowser/ViewModels/TableViewViewModel.cs new file mode 100644 index 000000000..e28daf60a --- /dev/null +++ b/CSharpBible/DB/MdbBrowser/ViewModels/TableViewViewModel.cs @@ -0,0 +1,56 @@ +using CommunityToolkit.Mvvm.ComponentModel; +using MdbBrowser.ViewModels.Interfaces; +using MdbBrowser.Models; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Data; + +namespace MdbBrowser.ViewModels +{ + public partial class TableViewViewModel : ObservableValidator + { + [ObservableProperty] + string _tableName = ""; + [ObservableProperty] + ObservableCollection _columns = new() { + new(){ Name = "Column1", Kind = EKind.Column, Data = new List() { "1", "2", "3" } }, + new(){ Name = "Column2", Kind = EKind.Column, Data = new List() { "1", "2", "3" } }, + new(){ Name = "Column3", Kind = EKind.Column, Data = new List() { "1", "2", "3" } }, + }; + + [ObservableProperty] + DataTable _tableData = new() { + Columns = { "Column1", "Column2", "Column3" }, + Rows = { { "1", "2", "3" }, { "1", "2", "3" }, { "1", "2", "3" } } + }; + + private IDBViewViewModel? _parent; + + public TableViewViewModel() + { + _parent = DBViewViewModel.This; + if (_parent != null) + { + TableName = _parent.SelectedEntry?.Name ?? ""; + _parent.PropertyChanged += (sender, e) => + { + if (e.PropertyName == "SelectedEntry" + && _parent.SelectedEntry?.Kind == EKind.Table) + { + TableName = _parent.SelectedEntry?.Name ?? ""; + } + }; + } + } + + partial void OnTableNameChanged(string value) + { + Columns.Clear(); + foreach(var d in _parent?.dBModel?.QueryTable(value) ?? new List()) + Columns.Add(d); + // OnPropertyChanged(nameof(Columns)); + TableData = _parent?.dBModel?.QueryTableData(value) ?? new DataTable(); + } + + } +} diff --git a/CSharpBible/DB/MdbBrowser/Views/DBView.xaml b/CSharpBible/DB/MdbBrowser/Views/DBView.xaml new file mode 100644 index 000000000..7be5a3f6b --- /dev/null +++ b/CSharpBible/DB/MdbBrowser/Views/DBView.xaml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CSharpBible/DB/MdbBrowser/Views/DBView.xaml.cs b/CSharpBible/DB/MdbBrowser/Views/DBView.xaml.cs new file mode 100644 index 000000000..2ea20bae8 --- /dev/null +++ b/CSharpBible/DB/MdbBrowser/Views/DBView.xaml.cs @@ -0,0 +1,42 @@ +using MdbBrowser.ViewModels; +using System.Windows; +using System; +using System.Windows.Controls; +using CommonDialogs.Interfaces; + +namespace MdbBrowser.Views +{ + /// + /// Interaktionslogik für DBView.xaml + /// + public partial class DBView : Page + { + public DBView() + { + InitializeComponent(); + } + + private void Page_Loaded(object sender, System.Windows.RoutedEventArgs e) + { + var vm = (DBViewViewModel)DataContext; + vm.FileOpenDialog = DoFileDialog; + vm.FileSaveAsDialog = DoFileDialog; + } + + /// + /// Does the file dialog. + /// + /// The filename. + /// The par. + /// The on accept. + /// true if XXXX, false otherwise. + public bool? DoFileDialog(string Filename, IFileDialog Par, Action? OnAccept) + { + Par.FileName = Filename; + bool? result = Par.ShowDialog(this.Parent as Window); + if (result ?? false) OnAccept?.Invoke(Par.FileName, Par); + return result; + } + + } +} diff --git a/CSharpBible/DB/MdbBrowser/Views/MainWindow.xaml b/CSharpBible/DB/MdbBrowser/Views/MainWindow.xaml new file mode 100644 index 000000000..d01441340 --- /dev/null +++ b/CSharpBible/DB/MdbBrowser/Views/MainWindow.xaml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/CSharpBible/DB/MdbBrowser/Views/MainWindow.xaml.cs b/CSharpBible/DB/MdbBrowser/Views/MainWindow.xaml.cs new file mode 100644 index 000000000..7f98ca96c --- /dev/null +++ b/CSharpBible/DB/MdbBrowser/Views/MainWindow.xaml.cs @@ -0,0 +1,15 @@ +using System.Windows; + +namespace MdbBrowser.Views +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} diff --git a/CSharpBible/DB/MdbBrowser/Views/TableView.xaml b/CSharpBible/DB/MdbBrowser/Views/TableView.xaml new file mode 100644 index 000000000..60b9322de --- /dev/null +++ b/CSharpBible/DB/MdbBrowser/Views/TableView.xaml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CSharpBible/DB/MdbBrowser/Views/TableView.xaml.cs b/CSharpBible/DB/MdbBrowser/Views/TableView.xaml.cs new file mode 100644 index 000000000..55f5d9628 --- /dev/null +++ b/CSharpBible/DB/MdbBrowser/Views/TableView.xaml.cs @@ -0,0 +1,15 @@ +using System.Windows.Controls; + +namespace MdbBrowser.Views +{ + /// + /// Interaktionslogik für TableView.xaml + /// + public partial class TableView : Page + { + public TableView() + { + InitializeComponent(); + } + } +} diff --git a/CSharpBible/DB/MdbBrowserTests/DBViewTests.cs b/CSharpBible/DB/MdbBrowserTests/DBViewTests.cs new file mode 100644 index 000000000..88f5a9c0a --- /dev/null +++ b/CSharpBible/DB/MdbBrowserTests/DBViewTests.cs @@ -0,0 +1,50 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using MdbBrowser.Views; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows; +using System.Threading.Tasks; +using System.Threading; +using System.Drawing; +using NSubstitute; +using CommonDialogs.Interfaces; + +namespace MdbBrowser.Views.Tests +{ + [TestClass()] + public class DBViewTests + { + [TestMethod()] + public void DBViewTest() + { + DBView? mw = null; + var t = new Thread(() => mw = new()); + t.SetApartmentState(ApartmentState.STA); //Set the thread to STA + t.Start(); + t.Join(); //Wait for the thread to end + Assert.IsNotNull(mw); + Assert.IsInstanceOfType(mw, typeof(DBView)); + } + + [DataTestMethod()] + [DataRow(true)] + [DataRow(false)] + [DataRow(null)] + public void DoFileDialogTest(bool? xExp) + { + DBView? mw = null; + var t = new Thread(() => mw = new()); + t.SetApartmentState(ApartmentState.STA); //Set the thread to STA + t.Start(); + t.Join(); //Wait for the thread to end + int _iCnt= 0; + IFileDialog fd = Substitute.For(); + fd.FileName.Returns("testFile"); + fd.ShowDialog(Arg.Any()).Returns(xExp); + var result = mw?.DoFileDialog("test", fd, (s,f)=>_iCnt++); + Assert.AreEqual(xExp, result); + Assert.AreEqual(xExp ==true?1:0, _iCnt); + } + } +} \ No newline at end of file diff --git a/CSharpBible/DB/MdbBrowserTests/MdbBrowserTests.csproj b/CSharpBible/DB/MdbBrowserTests/MdbBrowserTests.csproj new file mode 100644 index 000000000..b32dac0fb --- /dev/null +++ b/CSharpBible/DB/MdbBrowserTests/MdbBrowserTests.csproj @@ -0,0 +1,39 @@ + + + + net481-windows;net472-windows;net462-windows;net6.0-windows;net7.0-windows;net8.0-windows + disable + enable + + false + true + AnyCPU;x86 + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + diff --git a/CSharpBible/DB/MdbBrowserTests/TableViewTests.cs b/CSharpBible/DB/MdbBrowserTests/TableViewTests.cs new file mode 100644 index 000000000..31062ab43 --- /dev/null +++ b/CSharpBible/DB/MdbBrowserTests/TableViewTests.cs @@ -0,0 +1,27 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using MdbBrowser.Views; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; + +namespace MdbBrowser.Views.Tests +{ + [TestClass()] + public class TableViewTests + { + [TestMethod()] + public void TableViewTest() + { + TableView? mw = null; + var t = new Thread(() => mw = new()); + t.SetApartmentState(ApartmentState.STA); //Set the thread to STA + t.Start(); + t.Join(); //Wait for the thread to end + Assert.IsNotNull(mw); + Assert.IsInstanceOfType(mw, typeof(TableView)); + } + } +} \ No newline at end of file diff --git a/CSharpBible/DB/MdbBrowserTests/Views/MainWindowTests.cs b/CSharpBible/DB/MdbBrowserTests/Views/MainWindowTests.cs new file mode 100644 index 000000000..1242eb1c6 --- /dev/null +++ b/CSharpBible/DB/MdbBrowserTests/Views/MainWindowTests.cs @@ -0,0 +1,27 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using MdbBrowser.Views; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; + +namespace MdbBrowser.Views.Tests +{ + [TestClass()] + public class MainWindowTests + { + [TestMethod()] + public void MainWindowTest() + { + MainWindow? mw = null; + var t = new Thread(() => mw = new()); + t.SetApartmentState(ApartmentState.STA); //Set the thread to STA + t.Start(); + t.Join(); //Wait for the thread to end + Assert.IsNotNull(mw); + Assert.IsInstanceOfType(mw, typeof(MainWindow)); + } + } +} \ No newline at end of file diff --git a/CSharpBible/DB/OLEDBTest/OleDbTest.csproj b/CSharpBible/DB/OLEDBTest/OleDbTest.csproj new file mode 100644 index 000000000..221a07dc9 --- /dev/null +++ b/CSharpBible/DB/OLEDBTest/OleDbTest.csproj @@ -0,0 +1,19 @@ + + + + + Exe + net7.0 + OleDbTest + disable + enable + AnyCPU;x86 + + + + + + + + + diff --git a/CSharpBible/DB/OLEDBTest/Program.cs b/CSharpBible/DB/OLEDBTest/Program.cs new file mode 100644 index 000000000..e36cfb3d1 --- /dev/null +++ b/CSharpBible/DB/OLEDBTest/Program.cs @@ -0,0 +1,29 @@ +using System; +using System.Data; +using System.Data.OleDb; + +class Program +{ + static void Main(string[] args) + { + OleDbEnumerator enumerator = new OleDbEnumerator(); + DataTable table = enumerator.GetElements(); + + DisplayData(table); + + Console.WriteLine("Press any key to continue."); + Console.ReadKey(); + } + + static void DisplayData(DataTable table) + { + foreach (DataRow row in table.Rows) + { + foreach (DataColumn col in table.Columns) + { + Console.WriteLine("{0} = {1}", col.ColumnName, row[col]); + } + Console.WriteLine("=================================="); + } + } +} diff --git a/CSharpBible/DB/OLEDBTest2/OleDbTest2.csproj b/CSharpBible/DB/OLEDBTest2/OleDbTest2.csproj new file mode 100644 index 000000000..043e01d8e --- /dev/null +++ b/CSharpBible/DB/OLEDBTest2/OleDbTest2.csproj @@ -0,0 +1,19 @@ + + + + + Exe + net7.0 + OleDBTest2 + disable + enable + AnyCPU;x86 + + + + + + + + + diff --git a/CSharpBible/DB/OLEDBTest2/Program.cs b/CSharpBible/DB/OLEDBTest2/Program.cs new file mode 100644 index 000000000..c242bbb37 --- /dev/null +++ b/CSharpBible/DB/OLEDBTest2/Program.cs @@ -0,0 +1,28 @@ +using System; +using System.Data.OleDb; + +class Program +{ + static void Main(string[] args) + { + OleDbDataReader reader = OleDbEnumerator.GetRootEnumerator(); + + DisplayData(reader); + + Console.WriteLine("Press any key to continue."); + Console.ReadKey(); + } + + static void DisplayData(OleDbDataReader reader) + { + while (reader.Read()) + { + for (int i = 0; i < reader.FieldCount; i++) + { + Console.WriteLine("{0} = {1}", + reader.GetName(i), reader.GetValue(i)); + } + Console.WriteLine("=================================="); + } + } +} diff --git a/CSharpBible/DB/XSD_Data_Test/DataSets.Designer.cs b/CSharpBible/DB/XSD_Data_Test/DataSets.Designer.cs new file mode 100644 index 000000000..a534edeba --- /dev/null +++ b/CSharpBible/DB/XSD_Data_Test/DataSets.Designer.cs @@ -0,0 +1,764 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +#pragma warning disable 1591 + +namespace XSD_Data_Test { + + + /// + ///Represents a strongly typed in-memory cache of data. + /// + [global::System.Serializable()] + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")] + [global::System.Xml.Serialization.XmlRootAttribute("DataSet1")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")] + public partial class DataSet1 : global::System.Data.DataSet { + + private PersonDataTable tablePerson; + + private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public DataSet1() { + this.BeginInit(); + this.InitClass(); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + base.Tables.CollectionChanged += schemaChangedHandler; + base.Relations.CollectionChanged += schemaChangedHandler; + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected DataSet1(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context, false) { + if ((this.IsBinarySerialized(info, context) == true)) { + this.InitVars(false); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + this.Tables.CollectionChanged += schemaChangedHandler1; + this.Relations.CollectionChanged += schemaChangedHandler1; + return; + } + string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string)))); + if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { + global::System.Data.DataSet ds = new global::System.Data.DataSet(); + ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); + if ((ds.Tables["Person"] != null)) { + base.Tables.Add(new PersonDataTable(ds.Tables["Person"])); + } + this.DataSetName = ds.DataSetName; + this.Prefix = ds.Prefix; + this.Namespace = ds.Namespace; + this.Locale = ds.Locale; + this.CaseSensitive = ds.CaseSensitive; + this.EnforceConstraints = ds.EnforceConstraints; + this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add); + this.InitVars(); + } + else { + this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); + } + this.GetSerializationData(info, context); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + base.Tables.CollectionChanged += schemaChangedHandler; + this.Relations.CollectionChanged += schemaChangedHandler; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public PersonDataTable Person { + get { + return this.tablePerson; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.BrowsableAttribute(true)] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)] + public override global::System.Data.SchemaSerializationMode SchemaSerializationMode { + get { + return this._schemaSerializationMode; + } + set { + this._schemaSerializationMode = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public new global::System.Data.DataTableCollection Tables { + get { + return base.Tables; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public new global::System.Data.DataRelationCollection Relations { + get { + return base.Relations; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override void InitializeDerivedDataSet() { + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public override global::System.Data.DataSet Clone() { + DataSet1 cln = ((DataSet1)(base.Clone())); + cln.InitVars(); + cln.SchemaSerializationMode = this.SchemaSerializationMode; + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override bool ShouldSerializeTables() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override bool ShouldSerializeRelations() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) { + if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { + this.Reset(); + global::System.Data.DataSet ds = new global::System.Data.DataSet(); + ds.ReadXml(reader); + if ((ds.Tables["Person"] != null)) { + base.Tables.Add(new PersonDataTable(ds.Tables["Person"])); + } + this.DataSetName = ds.DataSetName; + this.Prefix = ds.Prefix; + this.Namespace = ds.Namespace; + this.Locale = ds.Locale; + this.CaseSensitive = ds.CaseSensitive; + this.EnforceConstraints = ds.EnforceConstraints; + this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add); + this.InitVars(); + } + else { + this.ReadXml(reader); + this.InitVars(); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() { + global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream(); + this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null)); + stream.Position = 0; + return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + internal void InitVars() { + this.InitVars(true); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + internal void InitVars(bool initTable) { + this.tablePerson = ((PersonDataTable)(base.Tables["Person"])); + if ((initTable == true)) { + if ((this.tablePerson != null)) { + this.tablePerson.InitVars(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + private void InitClass() { + this.DataSetName = "DataSet1"; + this.Prefix = ""; + this.Namespace = "http://tempuri.org/DataSet1.xsd"; + this.EnforceConstraints = true; + this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; + this.tablePerson = new PersonDataTable(); + base.Tables.Add(this.tablePerson); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + private bool ShouldSerializePerson() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { + if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) { + this.InitVars(); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + DataSet1 ds = new DataSet1(); + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny(); + any.Namespace = ds.Namespace; + sequence.Items.Add(any); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public delegate void PersonRowChangeEventHandler(object sender, PersonRowChangeEvent e); + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class PersonDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnID; + + private global::System.Data.DataColumn columnName; + + private global::System.Data.DataColumn columnBirth; + + private global::System.Data.DataColumn columnDeath; + + private global::System.Data.DataColumn columnPlace; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public PersonDataTable() { + this.TableName = "Person"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + internal PersonDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected PersonDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn IDColumn { + get { + return this.columnID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn NameColumn { + get { + return this.columnName; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn BirthColumn { + get { + return this.columnBirth; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn DeathColumn { + get { + return this.columnDeath; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn PlaceColumn { + get { + return this.columnPlace; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public PersonRow this[int index] { + get { + return ((PersonRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public event PersonRowChangeEventHandler PersonRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public event PersonRowChangeEventHandler PersonRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public event PersonRowChangeEventHandler PersonRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public event PersonRowChangeEventHandler PersonRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void AddPersonRow(PersonRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public PersonRow AddPersonRow(string ID, string Name, string Birth, string Death, string Place) { + PersonRow rowPersonRow = ((PersonRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + ID, + Name, + Birth, + Death, + Place}; + rowPersonRow.ItemArray = columnValuesArray; + this.Rows.Add(rowPersonRow); + return rowPersonRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public PersonRow FindByID(string ID) { + return ((PersonRow)(this.Rows.Find(new object[] { + ID}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public override global::System.Data.DataTable Clone() { + PersonDataTable cln = ((PersonDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new PersonDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + internal void InitVars() { + this.columnID = base.Columns["ID"]; + this.columnName = base.Columns["Name"]; + this.columnBirth = base.Columns["Birth"]; + this.columnDeath = base.Columns["Death"]; + this.columnPlace = base.Columns["Place"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + private void InitClass() { + this.columnID = new global::System.Data.DataColumn("ID", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnID); + this.columnName = new global::System.Data.DataColumn("Name", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnName); + this.columnBirth = new global::System.Data.DataColumn("Birth", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnBirth); + this.columnDeath = new global::System.Data.DataColumn("Death", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDeath); + this.columnPlace = new global::System.Data.DataColumn("Place", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPlace); + this.Constraints.Add(new global::System.Data.UniqueConstraint("PersonKey1", new global::System.Data.DataColumn[] { + this.columnID}, true)); + this.columnID.AllowDBNull = false; + this.columnID.Unique = true; + this.columnName.MaxLength = 100; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public PersonRow NewPersonRow() { + return ((PersonRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new PersonRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(PersonRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.PersonRowChanged != null)) { + this.PersonRowChanged(this, new PersonRowChangeEvent(((PersonRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.PersonRowChanging != null)) { + this.PersonRowChanging(this, new PersonRowChangeEvent(((PersonRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.PersonRowDeleted != null)) { + this.PersonRowDeleted(this, new PersonRowChangeEvent(((PersonRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.PersonRowDeleting != null)) { + this.PersonRowDeleting(this, new PersonRowChangeEvent(((PersonRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void RemovePersonRow(PersonRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + DataSet1 ds = new DataSet1(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "PersonDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class PersonRow : global::System.Data.DataRow { + + private PersonDataTable tablePerson; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + internal PersonRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tablePerson = ((PersonDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public string ID { + get { + return ((string)(this[this.tablePerson.IDColumn])); + } + set { + this[this.tablePerson.IDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public string Name { + get { + try { + return ((string)(this[this.tablePerson.NameColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Der Wert für Spalte Name in Tabelle Person ist DBNull.", e); + } + } + set { + this[this.tablePerson.NameColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public string Birth { + get { + try { + return ((string)(this[this.tablePerson.BirthColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Der Wert für Spalte Birth in Tabelle Person ist DBNull.", e); + } + } + set { + this[this.tablePerson.BirthColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public string Death { + get { + try { + return ((string)(this[this.tablePerson.DeathColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Der Wert für Spalte Death in Tabelle Person ist DBNull.", e); + } + } + set { + this[this.tablePerson.DeathColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public string Place { + get { + try { + return ((string)(this[this.tablePerson.PlaceColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Der Wert für Spalte Place in Tabelle Person ist DBNull.", e); + } + } + set { + this[this.tablePerson.PlaceColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public bool IsNameNull() { + return this.IsNull(this.tablePerson.NameColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void SetNameNull() { + this[this.tablePerson.NameColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public bool IsBirthNull() { + return this.IsNull(this.tablePerson.BirthColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void SetBirthNull() { + this[this.tablePerson.BirthColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public bool IsDeathNull() { + return this.IsNull(this.tablePerson.DeathColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void SetDeathNull() { + this[this.tablePerson.DeathColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public bool IsPlaceNull() { + return this.IsNull(this.tablePerson.PlaceColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void SetPlaceNull() { + this[this.tablePerson.PlaceColumn] = global::System.Convert.DBNull; + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public class PersonRowChangeEvent : global::System.EventArgs { + + private PersonRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public PersonRowChangeEvent(PersonRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public PersonRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } + } +} + +#pragma warning restore 1591 \ No newline at end of file diff --git a/CSharpBible/DB/XSD_Data_Test/DataSets.cs b/CSharpBible/DB/XSD_Data_Test/DataSets.cs new file mode 100644 index 000000000..9c7483bc6 --- /dev/null +++ b/CSharpBible/DB/XSD_Data_Test/DataSets.cs @@ -0,0 +1,23 @@ +namespace XSD_Data_Test +{ +} + +namespace XSD_Data_Test +{ +} + +namespace XSD_Data_Test +{ +} + +namespace XSD_Data_Test +{ +} + +namespace XSD_Data_Test +{ +} + +namespace XSD_Data_Test +{ +} \ No newline at end of file diff --git a/CSharpBible/DB/XSD_Data_Test/DataSets.xsc b/CSharpBible/DB/XSD_Data_Test/DataSets.xsc new file mode 100644 index 000000000..551fc56fb --- /dev/null +++ b/CSharpBible/DB/XSD_Data_Test/DataSets.xsc @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/CSharpBible/DB/XSD_Data_Test/DataSets.xsd b/CSharpBible/DB/XSD_Data_Test/DataSets.xsd new file mode 100644 index 000000000..088a12994 --- /dev/null +++ b/CSharpBible/DB/XSD_Data_Test/DataSets.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CSharpBible/DB/XSD_Data_Test/DataSets.xss b/CSharpBible/DB/XSD_Data_Test/DataSets.xss new file mode 100644 index 000000000..5f282702b --- /dev/null +++ b/CSharpBible/DB/XSD_Data_Test/DataSets.xss @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/CSharpBible/DB/XSD_Data_Test/Program.cs b/CSharpBible/DB/XSD_Data_Test/Program.cs new file mode 100644 index 000000000..e3b309647 --- /dev/null +++ b/CSharpBible/DB/XSD_Data_Test/Program.cs @@ -0,0 +1,12 @@ +using System; + +namespace XSD_Data_Test +{ + internal class Program + { + static void Main(string[] args) + { + Console.WriteLine("Hello, World!"); + } + } +} \ No newline at end of file diff --git a/CSharpBible/DB/XSD_Data_Test/XSD_Data_Test.csproj b/CSharpBible/DB/XSD_Data_Test/XSD_Data_Test.csproj new file mode 100644 index 000000000..b91b9c45e --- /dev/null +++ b/CSharpBible/DB/XSD_Data_Test/XSD_Data_Test.csproj @@ -0,0 +1,27 @@ + + + + Exe + net7.0 + + + + + + + + + True + True + DataSets.xsd + + + + + + MSDataSetGenerator + DataSets.Designer.cs + + + + diff --git a/CSharpBible/Data/Data.props b/CSharpBible/Data/Data.props new file mode 100644 index 000000000..7988d239f --- /dev/null +++ b/CSharpBible/Data/Data.props @@ -0,0 +1,13 @@ + + + ..\..\..\bin\$(MSBuildProjectName)\ + ..\..\..\obj\$(MSBuildProjectName)\ + 9.0 + enable + NULLABLE + disable + JC-Soft + Joe Care + Copyright © JC-Soft 2023 + + \ No newline at end of file diff --git a/CSharpBible/Data/Data_net.props b/CSharpBible/Data/Data_net.props new file mode 100644 index 000000000..e475aec21 --- /dev/null +++ b/CSharpBible/Data/Data_net.props @@ -0,0 +1,13 @@ + + + ..\..\..\bin\$(MSBuildProjectName)\ + ..\..\..\obj.net\$(MSBuildProjectName)\ + $(MSBuildProjectName.Replace(".","_").Replace("_net","")) + 9.0 + enable + disable + JC-Soft + Joe Care + Copyright © JC-Soft 2023 + + \ No newline at end of file diff --git a/CSharpBible/Data/TraceCsv2realCsv/Model/CsvModel.cs b/CSharpBible/Data/TraceCsv2realCsv/Model/CsvModel.cs new file mode 100644 index 000000000..d306e6bbf --- /dev/null +++ b/CSharpBible/Data/TraceCsv2realCsv/Model/CsvModel.cs @@ -0,0 +1,232 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using BaseLib.Helper; + +namespace TraceCsv2realCsv.Model +{ + public class CsvModel + { + #region internal Class + public class _DataRows + { + CsvModel _parent; + public int Count => _parent._data.Count; + + public int Fields => _parent._header.Count; + + public Dictionary this[int ix] + { + get + { + var val = new Dictionary(); + var row = _parent._data.ElementAt(ix); + var i = 0; + val[_parent._header[i++].name] = row.Key; + foreach (var fieldval in _parent._data.ElementAt(ix).Value) + val[_parent._header[i++].name] = fieldval; + return val; + } + } + + public _DataRows(CsvModel parent) + => _parent = parent; + } + #endregion + #region Properties + // Header + private List<(string name, Type? type)> _header = new(); + // Data + private Dictionary> _data = new(); + private List _separators = new() { ";", "\t", "," }; + const char cQuotation = '\"'; + public _DataRows Rows { get; } + #endregion + + #region Methods + public CsvModel() + { + Rows = new _DataRows(this); + } + public bool ReadCsv(Stream st) + => ReadCsv(st, _separators); + + public bool ReadCsv(Stream st, List separators) + { + using var tr = new StreamReader(st, true); + // Header + var line = tr.ReadLine(); + var seperator = _separators.FirstOrDefault(s => line.Contains(s)) ?? ","; + _header.Clear(); + var header = line.Split(new string[] { seperator }, StringSplitOptions.None).ToList(); + + // Lesen Sie die ersten fünf Zeilen der CSV-Datei und trennen Sie die Werte. + var lines = new List>(); + for (int i = 0; i < 5 && !tr.EndOfStream; i++) + { + lines.Add(SplitCSVLine(tr.ReadLine(), seperator, cQuotation)); + } + + // Bestimmen Sie den Datentyp jeder Spalte. + for (int i = 0; i < header.Count; i++) + { + _header.Add((header[i], GetColumnType(lines.Select(l => l[i]).ToList()))); + } + + foreach (var lnVals in lines) + AppendData(CastList(lnVals)); + + while (!tr.EndOfStream) + { + line = tr.ReadLine(); + var values = SplitCSVLine(line, seperator, cQuotation); + + AppendData(CastList(values)); + } + return true; + } + + public void AppendData(List values) + // _data + { + // Hier können Sie die Werte in Ihre Klasse einfügen. + var Index = values[0]; + values.RemoveAt(0); + _data.Add(Index, values); + } + + public void AppendData(object[][] values) + // _data + { + // Hier können Sie die Werte in Ihre Klasse einfügen. + foreach (object?[] o in values) + AppendData(o.ToList()); + } + public List CastList(List? values) + // Benutzt _header + { + List _List = new(); + for (int i = 0;values != null && i < Math.Min(values.Count, _header.Count); i++) + _List.Add(_header[i].type?.Get(values[i])); + return _List; + } + + public static List SplitCSVLine(string line, string seperator, char quotation = cQuotation) + { + var values = new List(); + int i = 0; + int pn; + if (string.IsNullOrEmpty(seperator)) + return new() { line }; + string value = ""; + + while (i < line.Length) + { + if (line.Substring(i).StartsWith(seperator)) + { + values.Add(value); + i += seperator.Length; + value = ""; + if (i == line.Length) + values.Add(value); + } + else if ((line[i] == quotation) + && (((pn = line.IndexOf($"{quotation}" + seperator, i)) > -1) + || (line[pn = line.Length - 1] == quotation))) + { + value = line.Substring(i, pn - i + 1); + i = pn + 1; // length of quotation + if (i == line.Length) + values.Add(value); + } + else if ((line[i] != quotation) + && (pn = line.IndexOf(seperator, i)) > -1) + { + value = line.Substring(i, pn - i); + i = pn; + } + else + { + values.Add(line.Substring(i)); + i = line.Length; + } + } + return values; + } + + public static Type GetColumnType(List values, char quotation = cQuotation) + { + // Versuchen Sie zuerst, Mit den Qutations die Strings herauszufiltern. +#if NET5_0_OR_GREATER + if (values.All(v => v.StartsWith(quotation) && v.EndsWith(quotation))) +#else + if (values.All(v => v.StartsWith(quotation.ToString()) && v.EndsWith(quotation.ToString()))) +#endif + return typeof(string); + else + // Dann versuchen Sie, den Datentyp als Ganzzahl zu bestimmen. + if (values.All(v => int.TryParse(v, out _))) + { + return typeof(int); + } + + // Versuchen Sie dann, den Datentyp als Gleitkommazahl zu bestimmen. + else if (values.All(v => double.TryParse(v, NumberStyles.Float, CultureInfo.InvariantCulture, out _))) + { + return typeof(double); + } + + // Wenn alle Werte Zeichenfolgen sind oder nicht in einen Ganzzahl- oder Gleitkommazahl-Datentyp konvertiert werden können, + // geben Sie den Datentyp als Zeichenfolge zurück. + else + return typeof(string); + } + + public void SetHeader(List lsHNames) + { + _data.Clear(); + _header.Clear(); + foreach (string s in lsHNames) + _header.Add((s, typeof(object))); + } + public void SetHeader(List<(string , Type?)> lsHeader) + { + _data.Clear(); + _header.Clear(); + _header = lsHeader; + } + + public void WriteCSV(Stream stream, char cSeparator = '\t') + { + using var tw = new StreamWriter(stream, Encoding.UTF8); + // Write Header + tw.WriteLine(string.Join($"{cSeparator}", _header.ConvertAll((l) => $"\"{l.name}\""))); + // Write Data + foreach (var l in _data) + tw.WriteLine($"{(l.Key is string sl ? $"\"{sl.Quote()}\"" : l.Key)}{cSeparator}" + string.Join($"{cSeparator}", l.Value.ConvertAll((l) => l is string sl ? $"\"{sl.Quote()}\"" : l is double d ? $"{d.ToString(CultureInfo.InvariantCulture)}" : $"{l}"))); + + } + + public void AddColumnData(string header, Dictionary? data) + { + var icolidx = _header.ConvertAll(s => s.name).IndexOf(header); + if (icolidx > 0 && data !=null) + foreach (var r in data) + if (_data.TryGetValue(r.Key, out var ls)) + ls[icolidx - 1] = r.Value; + else + { + ls = new(); + foreach (var h in _header) + if (h.name != _header[0].name) + ls.Add(0d); + ls[icolidx - 1] = r.Value; + _data.Add(r.Key, ls); + } + } + #endregion + } +} diff --git a/CSharpBible/Data/TraceCsv2realCsv/Model/TraceCSVReader.cs b/CSharpBible/Data/TraceCsv2realCsv/Model/TraceCSVReader.cs new file mode 100644 index 000000000..21d7ca11f --- /dev/null +++ b/CSharpBible/Data/TraceCsv2realCsv/Model/TraceCSVReader.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; + +namespace TraceCsv2realCsv.Model +{ + public static class TraceCSVReader + { + public static void ReadTraceCSV(this CsvModel model, Stream stream) + { + using (var reader = new StreamReader(stream)) + { + // Check Header + var line = reader.ReadLine(); + + if (line != "[key]; [value]") + throw new ArgumentException("Stream does not contain a Trace-csv"); + + List<(string header, Dictionary? data)> columns = new() {("TimeBase",null) }; + while (!reader.EndOfStream) + { + if (ReadColumn(reader, out var header,out var data)) + columns.Add((header, data)); + } + + model.SetHeader(columns.ConvertAll((s) => (s.header, (Type?)typeof(double)))); + + foreach (var s in columns) + model.AddColumnData(s.header, s.data); + } + } + + private static bool ReadColumn(StreamReader reader, out string header,out Dictionary data) + { + var xColumnEnd = false; + header = ""; + bool xDataMode = false; + data = new(); + while (!reader.EndOfStream && !xColumnEnd ) + { + int pp = reader.Peek(); + if (xDataMode && (pp != 59)) + return !string.IsNullOrEmpty(header); + var line = reader.ReadLine(); + + if (string.IsNullOrEmpty(header) && line.Contains(".Variable;")) + { + header = line.Split(';')[1].Trim(); + } + + if (!xDataMode) + xDataMode = line.TrimEnd().EndsWith(".Data;"); + else + { + var ls = line.Split(';'); + if ((ls.Length > 2) + && int.TryParse(ls[1].Trim(), out var ix) + && double.TryParse(ls[2].Trim(), System.Globalization.NumberStyles.Float, CultureInfo.InvariantCulture, out var dVal)) + data[ix] = dVal; + } + } + return !string.IsNullOrEmpty(header) && xDataMode; + } + } +} diff --git a/CSharpBible/Data/TraceCsv2realCsv/Program.cs b/CSharpBible/Data/TraceCsv2realCsv/Program.cs new file mode 100644 index 000000000..3dbbc9c23 --- /dev/null +++ b/CSharpBible/Data/TraceCsv2realCsv/Program.cs @@ -0,0 +1,23 @@ +using System.IO; +using TraceCsv2realCsv.Model; + +namespace TraceCsv2realCsv +{ + public class Program + { + private static CsvModel csv; + + static void Main(string[] args) + { + if (args.Length > 0 && File.Exists(args[0])) + { + csv = new CsvModel(); + csv.ReadTraceCSV(new FileStream(args[0], FileMode.Open)); + if (args.Length > 1 && !File.Exists(args[1])) + { + csv.WriteCSV(new FileStream(args[1], FileMode.CreateNew)); + } + } + } + } +} \ No newline at end of file diff --git a/CSharpBible/Data/TraceCsv2realCsv/TraceCsv2realCsv.csproj b/CSharpBible/Data/TraceCsv2realCsv/TraceCsv2realCsv.csproj new file mode 100644 index 000000000..c51afa54a --- /dev/null +++ b/CSharpBible/Data/TraceCsv2realCsv/TraceCsv2realCsv.csproj @@ -0,0 +1,16 @@ + + + + Exe + net462-windows;net472-windows;net48-windows;net481-windows;net6.0;net7.0;net8.0 + + + + + + + + + + + diff --git a/CSharpBible/Data/TraceCsv2realCsvTests/Model/CsvModelTests.cs b/CSharpBible/Data/TraceCsv2realCsvTests/Model/CsvModelTests.cs new file mode 100644 index 000000000..c5cf975aa --- /dev/null +++ b/CSharpBible/Data/TraceCsv2realCsvTests/Model/CsvModelTests.cs @@ -0,0 +1,137 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; +using BaseLib.Helper; + +namespace TraceCsv2realCsv.Model.Tests +{ + [TestClass()] + public class CsvModelTests + { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + CsvModel testModel; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + + [TestInitialize] + public void Init() + { + testModel = new CsvModel(); + } + + [DataTestMethod] + [DataRow(new string[] { "Name,Age,Height", "Alice,25,1.65", "Bob,30,1.80", "Charlie,35,1.75", "David,40,1.70" }, 4)] + [DataRow(new string[] { "Name,Age,Height", "Alice,25,1.65", "Bob,30,1.80", "Charlie,35,1.75", "David,40,1.70", "Joe,45,1.73", "Morton,50,1.81" }, 6)] + [DataRow(new string[] { "Name", "Alice", "Bob"}, 2)] + public void ReadCsvTest(string[] lines, int iCount) + { + // Erstellen Sie eine CSV-Datei mit Testdaten. + var csv = new StringBuilder(); + foreach (var line in lines) + csv.AppendLine(line); + + // Konvertieren Sie die CSV-Datei in einen Stream. + var stream = new MemoryStream(Encoding.UTF8.GetBytes(csv.ToString())); + + // Lesen Sie die CSV-Datei und überprüfen Sie die Ergebnisse. + testModel.ReadCsv(stream); + + Assert.AreEqual(iCount, testModel.Rows.Count); + Assert.AreEqual("Alice", testModel.Rows[0]["Name"]); + if (testModel.Rows.Fields > 1) + Assert.AreEqual(25, testModel.Rows[0]["Age"]); + if (testModel.Rows.Fields > 2) + Assert.AreEqual(1.65, testModel.Rows[0]["Height"]); + } + + [DataTestMethod] + [DataRow(new string[] { "Name", "Age", "Height" }, new object[] { + new object[]{ "Alice",25,1.65d}, + new object[] { "Bob", 30, 1.80d }, + new object[] { "Charlie", 35, 1.75d }, + new object[] { "David", 40, 1.70d } }, new string[] { "\"Name\",\"Age\",\"Height\"\r\n\"Alice\",25,1.65\r\n\"Bob\",30,1.8\r\n\"Charlie\",35,1.75\r\n\"David\",40,1.7\r\n" })] + [DataRow(new string[] {"ID", "Name", "Age", "Height" }, new object[] { + new object[]{ 1,"Alice",25,1.65d}, + new object[] { 2, "Bob", 30, 1.80d }, + new object[] { 3, "Charlie", 35, 1.75d }, + new object[] { 4, "David", 40, 1.70d } }, new string[] { "\"ID\",\"Name\",\"Age\",\"Height\"\r\n1,\"Alice\",25,1.65\r\n2,\"Bob\",30,1.8\r\n3,\"Charlie\",35,1.75\r\n4,\"David\",40,1.7\r\n" })] + public void TestWriteCSV(string[] asHNames, object[] aoData, string[] asExp) + { + // Erstellen Sie eine Liste von Zeilen. + testModel.SetHeader(asHNames.ToList()); + List laoData = new(); + foreach (var d in aoData) + if (d is object[] aoD) + laoData.Add(aoD.ToList().ConvertAll((o)=>o is decimal d?(double)d:o).ToArray()); + testModel.AppendData(laoData.ToArray()); + + // Schreiben Sie die Zeilen in eine CSV-Datei. + var stream = new MemoryStream(); + testModel.WriteCSV(stream,','); + + // Konvertieren Sie den Stream in eine Zeichenfolge und überprüfen Sie die Ergebnisse. + var stream2 = new MemoryStream(stream.ToArray()); + using var reader = new StreamReader(stream2); + var result = reader.ReadToEnd(); + + Assert.AreEqual(asExp[0], result); + } + + + [DataTestMethod()] + [DataRow(new string[] { },new TypeCode[] { },new object[] { })] + [DataRow(new string[] { "Alice" }, new TypeCode[] { TypeCode.String }, new object[] { "Alice" })] + [DataRow(new string[] { "Bob","30" }, new TypeCode[] { TypeCode.String, TypeCode.Int32 }, new object[] { "Bob",30 })] + [DataRow(new string[] { "Charlie", "35", "1.75" }, new TypeCode[] { TypeCode.String, TypeCode.Int32, TypeCode.Double }, new object[] { "Charlie", 35, 1.75 })] + public void CastListTest(string[] asData, TypeCode[] types, object[] aoData) + { + // Arrange + testModel.SetHeader(types.ToList().ConvertAll(t => (t.ToString(), t.ToType()))); + var loExp = aoData.ToList().ConvertAll(t=>t is decimal d? (double)d:t); + // Act + var rslt = testModel.CastList(asData.ToList()); + // Assert + CollectionAssert.AreEqual(loExp,rslt); + } + + [DataTestMethod] + [DataRow("Alice", ",", '\"', new string[] { "Alice" })] + [DataRow("Alice", "", '\"', new string[] { "Alice" })] + [DataRow(",0,,", ",", '\"', new string[] { "","0","","" })] + [DataRow(",,\"\",", ",", '\"', new string[] { "", "", "\"\"", "" })] + [DataRow("\"Alice\"", ",", '\"', new string[] { "\"Alice\"" })] + [DataRow("\"Alice,2,4.5", ",", '\"', new string[] { "\"Alice,2,4.5" })] + [DataRow("Alice,25,\"1,65\"", ",", '\"', new string[] { "Alice", "25", "\"1,65\"" })] + [DataRow("1; 2; 3", ";", '\"', new string[] { "1", " 2", " 3" })] + [DataRow("1-_-2-_-3-_-", "-_-", '\"', new string[] { "1", "2", "3","" })] + public void TestSplitCSVLine(string line, string separator, char quotation, string[] asExp) + { + + var result = CsvModel.SplitCSVLine(line, separator, quotation); + + Assert.AreEqual(asExp.Length, result.Count); + Assert.AreEqual(asExp[0], result[0], "0"); + if (asExp.Length>1) + Assert.AreEqual(asExp[1], result[1], "1"); + if (asExp.Length > 2) + Assert.AreEqual(asExp[2], result[2], "2"); + } + + [DataTestMethod] + [DataRow(new string[] { "Alice", "Bob", "Charlie" }, TypeCode.String,DisplayName ="Strings")] + [DataRow(new string[] { "1", "2", "3" }, TypeCode.Int32, DisplayName = "int")] + [DataRow(new string[] { "1.4", "2", "3.8" }, TypeCode.Double, DisplayName = "floats")] + [DataRow(new string[] { "1.4", "2", "Hello" }, TypeCode.String, DisplayName = "Wild => String")] + [DataRow(new string[] { "\"1.4\"", "\"2\"", "\"Hello\"" }, TypeCode.String, DisplayName = "Quoted-Strings")] + public void TestGetColumnType(string[] asVal, TypeCode tcExp) + { + var values = asVal.ToList(); + + var result = CsvModel.GetColumnType(values); + + Assert.AreEqual(tcExp, result.TC()); + } + } +} \ No newline at end of file diff --git a/CSharpBible/Data/TraceCsv2realCsvTests/TraceCsv2realCsvTests.csproj b/CSharpBible/Data/TraceCsv2realCsvTests/TraceCsv2realCsvTests.csproj new file mode 100644 index 000000000..ab6cb20ad --- /dev/null +++ b/CSharpBible/Data/TraceCsv2realCsvTests/TraceCsv2realCsvTests.csproj @@ -0,0 +1,23 @@ + + + + net462-windows;net472-windows;net48-windows;net481-windows;net6.0;net7.0;net8.0 + true + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + diff --git a/CSharpBible/DataGridEx/Visual/Form1.cs b/CSharpBible/DataGridEx/Visual/Form1.cs index 8898d996a..55f2b66cc 100644 --- a/CSharpBible/DataGridEx/Visual/Form1.cs +++ b/CSharpBible/DataGridEx/Visual/Form1.cs @@ -12,13 +12,6 @@ // // *********************************************************************** using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; namespace DataGridEx diff --git a/CSharpBible/DataGridEx/Worker/EmailConverter.cs b/CSharpBible/DataGridEx/Worker/EmailConverter.cs index b0650124c..c5d73aae8 100644 --- a/CSharpBible/DataGridEx/Worker/EmailConverter.cs +++ b/CSharpBible/DataGridEx/Worker/EmailConverter.cs @@ -12,7 +12,6 @@ // // *********************************************************************** using System; -using System.Data; namespace DataGridExWPF.Worker { diff --git a/CSharpBible/DataGridExWPF/App.xaml.cs b/CSharpBible/DataGridExWPF/App.xaml.cs index cbe05eb6f..79087b074 100644 --- a/CSharpBible/DataGridExWPF/App.xaml.cs +++ b/CSharpBible/DataGridExWPF/App.xaml.cs @@ -11,14 +11,7 @@ // // // *********************************************************************** -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Threading.Tasks; using System.Windows; -using DataGridExWPF.Visual; namespace DataGridExWPF { diff --git a/CSharpBible/DependencyInjection/CustomerRepository/CustomerRepository.csproj b/CSharpBible/DependencyInjection/CustomerRepository/CustomerRepository.csproj index a92e7e77e..6fe32c17e 100644 --- a/CSharpBible/DependencyInjection/CustomerRepository/CustomerRepository.csproj +++ b/CSharpBible/DependencyInjection/CustomerRepository/CustomerRepository.csproj @@ -1,21 +1,15 @@  - - net6.0 - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\bin\$(MSBuildProjectName) - JC-Soft - Copyright © 2022 by JC-Soft + + + net6.0;net7.0;net8.0 - - enable - enable - + + diff --git a/CSharpBible/DependencyInjection/CustomerRepository/Model/CCustomer.cs b/CSharpBible/DependencyInjection/CustomerRepository/Model/CCustomer.cs index 06de86db8..a7bb1d70e 100644 --- a/CSharpBible/DependencyInjection/CustomerRepository/Model/CCustomer.cs +++ b/CSharpBible/DependencyInjection/CustomerRepository/Model/CCustomer.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CustomerRepository.Model +namespace CustomerRepository.Model { public class CCustomer { diff --git a/CSharpBible/DependencyInjection/CustomerRepository/Model/CLog.cs b/CSharpBible/DependencyInjection/CustomerRepository/Model/CLog.cs index 2cad87072..e26ff6bb7 100644 --- a/CSharpBible/DependencyInjection/CustomerRepository/Model/CLog.cs +++ b/CSharpBible/DependencyInjection/CustomerRepository/Model/CLog.cs @@ -1,9 +1,5 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Reflection.Metadata.Ecma335; -using System.Text; -using System.Threading.Tasks; namespace CustomerRepository.Model { diff --git a/CSharpBible/DependencyInjection/CustomerRepository/Model/CLogEntry.cs b/CSharpBible/DependencyInjection/CustomerRepository/Model/CLogEntry.cs index e4d757fbd..0b243d799 100644 --- a/CSharpBible/DependencyInjection/CustomerRepository/Model/CLogEntry.cs +++ b/CSharpBible/DependencyInjection/CustomerRepository/Model/CLogEntry.cs @@ -1,8 +1,10 @@ -namespace CustomerRepository.Model +using System; + +namespace CustomerRepository.Model { public class CLogEntry { - public DateTimeOffset Time { get; set; } - public string Message { get; set; } + public DateTimeOffset Time { get; set; }= new DateTimeOffset(new DateTime(2000,1,1)); + public string Message { get; set; } = ""; } } \ No newline at end of file diff --git a/CSharpBible/DependencyInjection/CustomerRepository/Model/CSystemClock.cs b/CSharpBible/DependencyInjection/CustomerRepository/Model/CSystemClock.cs index 8254f8765..cc17e48f6 100644 --- a/CSharpBible/DependencyInjection/CustomerRepository/Model/CSystemClock.cs +++ b/CSharpBible/DependencyInjection/CustomerRepository/Model/CSystemClock.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace CustomerRepository.Model { diff --git a/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository1.cd b/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository1.cd new file mode 100644 index 000000000..ca3d8f0e0 --- /dev/null +++ b/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository1.cd @@ -0,0 +1,30 @@ + + + + + + AAAAAAAAAAAAAABAAAAAAAQAAAgAAEAAAAAAAAAAAgg= + Model\CustomerRepository1.cs + + + + + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAA= + Model\IClock.cs + + + + + + AAAAAAAAAAAAAQBAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Model\ILog.cs + + + + \ No newline at end of file diff --git a/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository1.cs b/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository1.cs index 9fbf6175b..beb4ae437 100644 --- a/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository1.cs +++ b/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository1.cs @@ -1,17 +1,19 @@ using CustomerRepository.Model; +using System; +using System.Collections.Generic; namespace CustomerRepositoryTests.Model { - /// Class CusomerRepository1. + /// Class CustomerRepository1. /// Implements the /// This Repository uses "New" /// public class CustomerRepository1 : ICustomerRepository2 { - private Dictionary _customers= new Dictionary(); + private readonly Dictionary _customers= new(); - public long Count => throw new NotImplementedException(); + public long Count => _customers.Count; public IClock Clock { get; } @@ -35,7 +37,9 @@ public CCustomer Get(Guid id) public Guid Put(CCustomer customer) { - throw new NotImplementedException(); + Guid g=Guid.NewGuid(); + _customers[g] = customer; + return g; } diff --git a/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository2.cd b/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository2.cd new file mode 100644 index 000000000..cca552948 --- /dev/null +++ b/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository2.cd @@ -0,0 +1,30 @@ + + + + + + AAAAAAAAAAAAAABAAAAAAAQAAAgAAEAAAAAAAAAAAgg= + Model\CustomerRepository2.cs + + + + + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAA= + Model\IClock.cs + + + + + + AAAAAAAAAAAAAQBAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Model\ILog.cs + + + + \ No newline at end of file diff --git a/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository2.cs b/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository2.cs index 045a584ad..50faaaf55 100644 --- a/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository2.cs +++ b/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository2.cs @@ -1,17 +1,19 @@ using CustomerRepository.Model; using CustomerRepository.Model.Factory; +using System; +using System.Collections.Generic; namespace CustomerRepositoryTests.Model { - /// Class CusomerRepository2. + /// Class CustomerRepository2. /// Implements the /// This repository uses a Factory /// public class CustomerRepository2 : ICustomerRepository2 { - private Dictionary _customers = new Dictionary(); + private readonly Dictionary _customers = new(); - public long Count => throw new NotImplementedException(); + public long Count => _customers.Count; public IClock Clock { get; } @@ -39,7 +41,9 @@ public CCustomer Get(Guid id) public Guid Put(CCustomer customer) { - throw new NotImplementedException(); + Guid g = Guid.NewGuid(); + _customers[g] = customer; + return g; } diff --git a/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository3.cd b/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository3.cd new file mode 100644 index 000000000..26fb61711 --- /dev/null +++ b/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository3.cd @@ -0,0 +1,30 @@ + + + + + + AAAAAAAAAAAAAABAAAAAAAQAAAgAAEAAAAAAAAAAAgg= + Model\CustomerRepository3.cs + + + + + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAA= + Model\IClock.cs + + + + + + AAAAAAAAAAAAAQBAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Model\ILog.cs + + + + \ No newline at end of file diff --git a/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository3.cs b/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository3.cs index b3356d0a7..d1b213252 100644 --- a/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository3.cs +++ b/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository3.cs @@ -1,21 +1,23 @@ using CustomerRepository.Model; using CustomerRepository.Model.Factory; +using System; +using System.Collections.Generic; namespace CustomerRepositoryTests.Model { - /// Class CusomerRepository3. + /// Class CustomerRepository3. /// Implements the - /// This repository uses a abtract Factory + /// This repository uses a abstract Factory /// public class CustomerRepository3 : ICustomerRepository2 { #region Properties #region private properties - private Dictionary _customers=new Dictionary(); + private readonly Dictionary _customers=new(); #endregion public IClock Clock { get; } public ILog Log { get; } - public long Count => throw new NotImplementedException(); + public long Count => _customers.Count; #endregion public CustomerRepository3(IClockFactory clockFactory,ILogFactory logFactory) @@ -24,10 +26,9 @@ public CustomerRepository3(IClockFactory clockFactory,ILogFactory logFactory) Log = logFactory.Get(); } - public CCustomer Get(Guid id) + public CCustomer? Get(Guid id) { - CCustomer result; - if(!_customers.TryGetValue(id, out result)) + if (!_customers.TryGetValue(id, out CCustomer? result)) { Log.Error(Clock.Now, "no such customer"); throw new ArgumentException("no such customer"); @@ -37,7 +38,9 @@ public CCustomer Get(Guid id) public Guid Put(CCustomer customer) { - throw new NotImplementedException(); + Guid g = Guid.NewGuid(); + _customers[g] = customer; + return g; } diff --git a/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository4.cd b/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository4.cd new file mode 100644 index 000000000..889ec46c6 --- /dev/null +++ b/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository4.cd @@ -0,0 +1,30 @@ + + + + + + AAAAAAAAAAAAAABAAAAAAAQAAAAAAEAAAAAAAAAABAg= + Model\CustomerRepository4.cs + + + + + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAA= + Model\IClock.cs + + + + + + AAAAAAAAAAAAAQBAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Model\ILog.cs + + + + \ No newline at end of file diff --git a/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository4.cs b/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository4.cs index 442d07fec..f64e0093a 100644 --- a/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository4.cs +++ b/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository4.cs @@ -1,9 +1,11 @@ using CustomerRepository.Model; using CustomerRepository.ServiceLocator; +using System; +using System.Collections.Generic; namespace CustomerRepositoryTests.Model { - /// Class CusomerRepository4. + /// Class CustomerRepository4. /// Implements the /// This repository uses a Service Locator /// @@ -11,12 +13,12 @@ public class CustomerRepository4 : ICustomerRepository { #region Properties #region private properties - private Dictionary _customers = new Dictionary(); + private readonly Dictionary _customers = new(); private IClock _Clock { get; } private ILog _Log { get; } #endregion - public long Count => throw new NotImplementedException(); + public long Count => _customers.Count; #endregion public CustomerRepository4() @@ -25,10 +27,9 @@ public CustomerRepository4() _Log = ServiceLocator.Log; } - public CCustomer Get(Guid id) + public CCustomer? Get(Guid id) { - CCustomer result; - if(!_customers.TryGetValue(id, out result)) + if (!_customers.TryGetValue(id, out CCustomer? result)) { _Log.Error(_Clock.Now, "no such customer"); throw new ArgumentException("no such customer"); @@ -38,7 +39,9 @@ public CCustomer Get(Guid id) public Guid Put(CCustomer customer) { - throw new NotImplementedException(); + Guid g = Guid.NewGuid(); + _customers[g] = customer; + return g; } diff --git a/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository5.cd b/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository5.cd new file mode 100644 index 000000000..69002ad29 --- /dev/null +++ b/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository5.cd @@ -0,0 +1,30 @@ + + + + + + AAAAAAAAAAAAAABAAAAAAAQAAAAAAEAAAAAAAAAABAg= + Model\CustomerRepository5.cs + + + + + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAA= + Model\IClock.cs + + + + + + AAAAAAAAAAAAAQBAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Model\ILog.cs + + + + \ No newline at end of file diff --git a/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository5.cs b/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository5.cs index ee6c09453..ea9a52437 100644 --- a/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository5.cs +++ b/CSharpBible/DependencyInjection/CustomerRepository/Model/CustomerRepository5.cs @@ -1,8 +1,10 @@ using CustomerRepository.Model; +using System; +using System.Collections.Generic; namespace CustomerRepositoryTests.Model { - /// Class CusomerRepository5. + /// Class CustomerRepository5. /// Implements the /// This repository uses Dependency Injection /// @@ -10,12 +12,12 @@ public class CustomerRepository5 : ICustomerRepository { #region Properties #region private properties - private Dictionary _customers = new Dictionary(); + private readonly Dictionary _customers = new(); private IClock _Clock { get; } private ILog _Log { get; } #endregion - public long Count => throw new NotImplementedException(); + public long Count => _customers.Count; #endregion #region Methods @@ -25,10 +27,9 @@ public CustomerRepository5(IClock clock,ILog log) _Log = log; } - public CCustomer Get(Guid id) + public CCustomer? Get(Guid id) { - CCustomer result; - if(!_customers.TryGetValue(id, out result)) + if (!_customers.TryGetValue(id, out CCustomer? result)) { _Log.Error(_Clock.Now, "no such customer"); throw new ArgumentException("no such customer"); @@ -38,7 +39,9 @@ public CCustomer Get(Guid id) public Guid Put(CCustomer customer) { - throw new NotImplementedException(); + Guid g = Guid.NewGuid(); + _customers[g] = customer; + return g; } #endregion diff --git a/CSharpBible/DependencyInjection/CustomerRepository/Model/Factory/CClockFactory.cs b/CSharpBible/DependencyInjection/CustomerRepository/Model/Factory/CClockFactory.cs index 0a2f87a78..7aa64aa9b 100644 --- a/CSharpBible/DependencyInjection/CustomerRepository/Model/Factory/CClockFactory.cs +++ b/CSharpBible/DependencyInjection/CustomerRepository/Model/Factory/CClockFactory.cs @@ -1,6 +1,4 @@ -using CustomerRepository.Model; - -namespace CustomerRepository.Model.Factory +namespace CustomerRepository.Model.Factory { public class CClockFactory { diff --git a/CSharpBible/DependencyInjection/CustomerRepository/Model/Factory/CLogFactory.cs b/CSharpBible/DependencyInjection/CustomerRepository/Model/Factory/CLogFactory.cs index 31f2e647d..2bbbb40d4 100644 --- a/CSharpBible/DependencyInjection/CustomerRepository/Model/Factory/CLogFactory.cs +++ b/CSharpBible/DependencyInjection/CustomerRepository/Model/Factory/CLogFactory.cs @@ -1,6 +1,4 @@ -using CustomerRepository.Model; - -namespace CustomerRepository.Model.Factory +namespace CustomerRepository.Model.Factory { public class CLogFactory : ILogFactory { diff --git a/CSharpBible/DependencyInjection/CustomerRepository/Model/Factory/IClockFactory.cs b/CSharpBible/DependencyInjection/CustomerRepository/Model/Factory/IClockFactory.cs index d00508cf5..b242c6f63 100644 --- a/CSharpBible/DependencyInjection/CustomerRepository/Model/Factory/IClockFactory.cs +++ b/CSharpBible/DependencyInjection/CustomerRepository/Model/Factory/IClockFactory.cs @@ -1,6 +1,4 @@ -using CustomerRepository.Model; - -namespace CustomerRepository.Model.Factory +namespace CustomerRepository.Model.Factory { public interface IClockFactory { diff --git a/CSharpBible/DependencyInjection/CustomerRepository/Model/Factory/ILogFactory.cs b/CSharpBible/DependencyInjection/CustomerRepository/Model/Factory/ILogFactory.cs index 8a71fb274..443d36cda 100644 --- a/CSharpBible/DependencyInjection/CustomerRepository/Model/Factory/ILogFactory.cs +++ b/CSharpBible/DependencyInjection/CustomerRepository/Model/Factory/ILogFactory.cs @@ -1,6 +1,4 @@ -using CustomerRepository.Model; - -namespace CustomerRepository.Model.Factory +namespace CustomerRepository.Model.Factory { public interface ILogFactory { diff --git a/CSharpBible/DependencyInjection/CustomerRepository/Model/IClock.cs b/CSharpBible/DependencyInjection/CustomerRepository/Model/IClock.cs index 3cc426d41..20ef29207 100644 --- a/CSharpBible/DependencyInjection/CustomerRepository/Model/IClock.cs +++ b/CSharpBible/DependencyInjection/CustomerRepository/Model/IClock.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace CustomerRepository.Model { diff --git a/CSharpBible/DependencyInjection/CustomerRepository/Model/ICustomerRepository.cs b/CSharpBible/DependencyInjection/CustomerRepository/Model/ICustomerRepository.cs index 1c0306661..511f7f8dc 100644 --- a/CSharpBible/DependencyInjection/CustomerRepository/Model/ICustomerRepository.cs +++ b/CSharpBible/DependencyInjection/CustomerRepository/Model/ICustomerRepository.cs @@ -1,8 +1,10 @@ -namespace CustomerRepository.Model +using System; + +namespace CustomerRepository.Model { public interface ICustomerRepository { - CCustomer Get(Guid id); + CCustomer? Get(Guid id); Guid Put(CCustomer customer); long Count { get;} } diff --git a/CSharpBible/DependencyInjection/CustomerRepository/Model/ILog.cs b/CSharpBible/DependencyInjection/CustomerRepository/Model/ILog.cs index be29b974d..4b3776985 100644 --- a/CSharpBible/DependencyInjection/CustomerRepository/Model/ILog.cs +++ b/CSharpBible/DependencyInjection/CustomerRepository/Model/ILog.cs @@ -1,4 +1,5 @@ -using CustomerRepository.Model; +using System; +using System.Collections.Generic; namespace CustomerRepository.Model { diff --git a/CSharpBible/DependencyInjection/CustomerRepositoryTests/CustomerRepositoryTests.csproj b/CSharpBible/DependencyInjection/CustomerRepositoryTests/CustomerRepositoryTests.csproj index 3dd0f4a39..c8a89a279 100644 --- a/CSharpBible/DependencyInjection/CustomerRepositoryTests/CustomerRepositoryTests.csproj +++ b/CSharpBible/DependencyInjection/CustomerRepositoryTests/CustomerRepositoryTests.csproj @@ -1,35 +1,31 @@ - - + + Library - net6.0 - disable - enable - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\bin\$(MSBuildProjectName) - JC-Soft - Copyright © 2023 by JC-Soft + net6.0;net7.0;net8.0 - - - - - - - - - - + + + + + + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + + + diff --git a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/AutoMocking.cs b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/AutoMocking.cs deleted file mode 100644 index c3f13925a..000000000 --- a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/AutoMocking.cs +++ /dev/null @@ -1,26 +0,0 @@ -using AutoFixture; -using AutoFixture.AutoMoq; -using CustomerRepository.Model; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; - -namespace CustomerRepositoryTests.Model -{ - [TestClass] - public class AutoMocking - { - [TestMethod] - public void RepThrowsExOnInvGet() - { - var fixture = new Fixture() - .Customize(new AutoMoqCustomization()); - - ICustomerRepository repository = - fixture.Create(); - - Assert.ThrowsException( - () => repository.Get(Guid.NewGuid()) - ); - } - } -} diff --git a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/CLogEntryTests.cs b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/CLogEntryTests.cs new file mode 100644 index 000000000..daf6de92d --- /dev/null +++ b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/CLogEntryTests.cs @@ -0,0 +1,26 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; + +namespace CustomerRepository.Model.Tests +{ + [TestClass] + public class CLogEntryTests + { + [TestMethod] + public void MessageTest() { + CLogEntry testModel = new(); + Assert.AreEqual("", testModel.Message); + testModel.Message = "123"; + Assert.AreEqual("123", testModel.Message); + } + + [TestMethod] + public void TimeTest() + { + CLogEntry testModel = new(); + Assert.AreEqual(new DateTimeOffset(new DateTime(2000, 1, 1)), testModel.Time); + testModel.Time = new DateTime(2023,5,1); + Assert.AreEqual(new DateTimeOffset(new DateTime(2023,5,1)), testModel.Time); + } + } +} diff --git a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/CStaticClock.cs b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/CStaticClock.cs index 9dd450818..7bfa0b3d1 100644 --- a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/CStaticClock.cs +++ b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/CStaticClock.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace CustomerRepository.Model { diff --git a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/CastleWindsor.cs b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/CastleWindsor.cs deleted file mode 100644 index 4aff19600..000000000 --- a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/CastleWindsor.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Castle.MicroKernel.Registration; -using Castle.Windsor; -using CustomerRepository.Model; -using FluentAssertions; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; - -namespace CustomerRepositoryTests.Model -{ - [TestClass] - public class CastleWindsor - { - [TestMethod] - public void RepThrowsExOnInvGet() - { - var container = new WindsorContainer(); - container.Register(Component.For() - .ImplementedBy()); - container.Register(Component.For() - .ImplementedBy().LifestyleSingleton()); - container.Register(Component.For() - .ImplementedBy().LifestyleTransient()); - - var log = container.Resolve(); - - ICustomerRepository repository = - container.Resolve(); - - Assert.ThrowsException( - () => repository.Get(Guid.NewGuid()) - ); - - log.Get().Should().HaveCount( 1 ); - } - } -} diff --git a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/ICustomerRepositoryTests.cs b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/ICustomerRepositoryTests.cs index 64f6ea608..9433424db 100644 --- a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/ICustomerRepositoryTests.cs +++ b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/ICustomerRepositoryTests.cs @@ -44,5 +44,28 @@ public void RepLogsTimeOnInvLogGet() { .TotalSeconds).Should().BeLessThan(1); } + [TestMethod] + public void PutTest() + { + ICustomerRepository2 repository = new CustomerRepository1(); + CCustomer customer = new(); + + + Guid g; + Assert.IsNotNull(g = repository.Put(customer)); + Assert.AreEqual(customer,repository.Get(g)); + } + + [TestMethod] + public void CountTest() + { + ICustomerRepository2 repository = new CustomerRepository1(); + Assert.AreEqual(0, repository.Count); + + CCustomer customer = new(); + + repository.Put(customer); + Assert.AreEqual(1, repository.Count); + } } } \ No newline at end of file diff --git a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/IoC_CastleWindsor.cs b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/IoC_CastleWindsor.cs new file mode 100644 index 000000000..801a7e4cc --- /dev/null +++ b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/IoC_CastleWindsor.cs @@ -0,0 +1,36 @@ +using Castle.MicroKernel.Registration; +using Castle.Windsor; +using CustomerRepository.Model; +using FluentAssertions; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; + +namespace CustomerRepositoryTests.Model +{ + [TestClass] + public class IoC_CastleWindsor + { + [TestMethod] + public void RepThrowsExOnInvGet() + { + var container = new WindsorContainer(); + container.Register(Component.For() + .ImplementedBy()); + container.Register(Component.For() + .ImplementedBy().LifestyleSingleton()); + container.Register(Component.For() + .ImplementedBy().LifestyleTransient()); + + var log = container.Resolve(); + + ICustomerRepository repository = + container.Resolve(); + + Assert.ThrowsException( + () => repository.Get(Guid.NewGuid()) + ); + + log.Get().Should().HaveCount( 1 ); + } + } +} diff --git a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/IoC_MS_Extensions.cs b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/IoC_MS_Extensions.cs new file mode 100644 index 000000000..1a326b0ae --- /dev/null +++ b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/IoC_MS_Extensions.cs @@ -0,0 +1,125 @@ +using CustomerRepository.Model; +using FluentAssertions; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.Extensions.DependencyInjection; +using System; +using System.Linq; + +namespace CustomerRepositoryTests.Model +{ + [TestClass] + public class IoC_MS_Extensions + { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + private ServiceProvider container { get; set; } +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + + [TestInitialize] + public void Init() + { + var services = new ServiceCollection(); + services.AddTransient(); + services.AddSingleton(); + services.AddTransient(); + container = services.BuildServiceProvider(); + } + + [TestMethod] + public void RepThrowsExOnInvGet() + { + var services = new ServiceCollection(); + services.AddTransient(); + services.AddSingleton(); + services.AddTransient(); + var container = services.BuildServiceProvider(); + + var log = container.GetService(); + + ICustomerRepository? repository = + container?.GetService(); + + Assert.ThrowsException( + () => repository?.Get(Guid.NewGuid()) + ); + + log?.Get().Should().HaveCount( 1 ); + } + + [TestMethod] + public void RepThrowsExOnInvGet2() + { + var log = container.GetService(); + + var repository = + container.GetService(); + + Assert.ThrowsException( + () => repository?.Get(Guid.NewGuid()) + ); + + log?.Get().Should().HaveCount(1); + } + + [TestMethod] + public void RepThrows2ExOn2InvGet2() + { + var log = container.GetService(); + + var repository = + container.GetService(); + + Assert.ThrowsException( + () => repository?.Get(Guid.NewGuid()) + ); + Assert.ThrowsException( + () => repository?.Get(Guid.NewGuid()) + ); + + log?.Get().Should().HaveCount(2); + } + + [TestMethod] + public void LogsTimeOnInvLogGet() + { + var log = container.GetService(); + var clock = container.GetService(); + + var repository = + container.GetService(); + + Assert.ThrowsException( + () => repository?.Get(Guid.NewGuid()) + ); + + log?.Get().First().Time + .Should().Be(clock?.Now); + } + + [TestMethod] + public void PutTest() + { + var repository = + container.GetRequiredService(); + CCustomer customer = new(); + + + Guid g; + Assert.IsNotNull(g = repository.Put(customer)); + Assert.AreEqual(customer, repository.Get(g)); + } + + [TestMethod] + public void CountTest() + { + var repository = + container.GetRequiredService(); + + Assert.AreEqual(0, repository.Count); + + CCustomer customer = new(); + + repository.Put(customer); + Assert.AreEqual(1, repository.Count); + } + } +} diff --git a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/IoC_Ninject.cs b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/IoC_Ninject.cs new file mode 100644 index 000000000..8a29eff19 --- /dev/null +++ b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/IoC_Ninject.cs @@ -0,0 +1,95 @@ +using CustomerRepository.Model; +using FluentAssertions; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Ninject; +using System; +using System.Linq; + +namespace CustomerRepositoryTests.Model +{ + [TestClass] + public class IoC_Ninject + { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + private StandardKernel kernel { get; set; } +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + + [TestInitialize] + public void Init() + { + kernel = new StandardKernel(); + kernel.Bind().To(); + kernel.Bind().To().InSingletonScope(); + kernel.Bind().To(); + } + + [TestMethod] + public void RepThrowsExOnInvGet() + { + var kernel = new StandardKernel(); + kernel.Bind().To(); + kernel.Bind().To().InSingletonScope(); + kernel.Bind().To(); + + var log = kernel.Get(); + + ICustomerRepository repository = + kernel.Get(); + + Assert.ThrowsException( + () => repository.Get(Guid.NewGuid()) + ); + + log.Get().Should().HaveCount( 1 ); + } + + [TestMethod] + public void RepThrowsExOnInvGet2() + { + var log = kernel.Get(); + + var repository = + kernel.Get(); + + Assert.ThrowsException( + () => repository?.Get(Guid.NewGuid()) + ); + + log?.Get().Should().HaveCount(1); + } + + [TestMethod] + public void RepThrows2ExOn2InvGet2() + { + var log = kernel.Get(); + var repository = + kernel.Get(); + + Assert.ThrowsException( + () => repository?.Get(Guid.NewGuid()) + ); + Assert.ThrowsException( + () => repository?.Get(Guid.NewGuid()) + ); + + log?.Get().Should().HaveCount(2); + } + + [TestMethod] + public void LogsTimeOnInvLogGet() + { + var log = kernel.Get(); + var clock = kernel.Get(); + + var repository = + kernel.Get(); + + Assert.ThrowsException( + () => repository?.Get(Guid.NewGuid()) + ); + + log.Get().First().Time + .Should().Be(clock.Now); + } + } +} diff --git a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/IoC_StructureMap.cs b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/IoC_StructureMap.cs new file mode 100644 index 000000000..18a8762a4 --- /dev/null +++ b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/IoC_StructureMap.cs @@ -0,0 +1,95 @@ +using CustomerRepository.Model; +using FluentAssertions; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using StructureMap; +using System; +using System.Linq; + +namespace CustomerRepositoryTests.Model +{ + [TestClass] + public class IoC_StructureMap + { + private Container container { get; set; } + + [TestInitialize] + public void Init() + { + container = new Container(x => + { + x.For().Use(); + x.For().Singleton().Use(); + x.For().Use(); + }); + } + + [TestMethod] + public void RepThrowsExOnInvGet() + { + var container = new Container(x => + { + x.For().Use(); + x.For().Singleton().Use(); + x.For().Use(); + }); + + var log = container.GetInstance(); + + ICustomerRepository repository = + container.GetInstance(); + + Assert.ThrowsException( + () => repository.Get(Guid.NewGuid()) + ); + + log.Get().Should().HaveCount( 1 ); + } + + [TestMethod] + public void RepThrowsExOnInvGet2() + { + var log = container.GetInstance(); + var repository = + container.GetInstance(); + + Assert.ThrowsException( + () => repository?.Get(Guid.NewGuid()) + ); + + log?.Get().Should().HaveCount(1); + } + + [TestMethod] + public void RepThrows2ExOn2InvGet2() + { + var log = container.GetInstance(); + var repository = + container.GetInstance(); + + Assert.ThrowsException( + () => repository?.Get(Guid.NewGuid()) + ); + Assert.ThrowsException( + () => repository?.Get(Guid.NewGuid()) + ); + + log?.Get().Should().HaveCount(2); + } + + [TestMethod] + public void LogsTimeOnInvLogGet() + { + var log = container.GetInstance(); + var clock = container.GetInstance(); + var repository = + container.GetInstance(); + + Assert.ThrowsException( + () => repository?.Get(Guid.NewGuid()) + ); + + log.Get().First().Time + .Should().Be(clock.Now); + } + } +} diff --git a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/MSDepInj.cs b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/MSDepInj.cs deleted file mode 100644 index 58bd242b9..000000000 --- a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/MSDepInj.cs +++ /dev/null @@ -1,96 +0,0 @@ -using CustomerRepository.Model; -using FluentAssertions; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Microsoft.Extensions.DependencyInjection; -using System; -using System.Linq; - -namespace CustomerRepositoryTests.Model -{ - [TestClass] - public class MSDepInj - { - private ServiceProvider container { get; set; } - - [TestInitialize] - public void Init() - { - var services = new ServiceCollection(); - services.AddTransient(); - services.AddSingleton(); - services.AddTransient(); - container = services.BuildServiceProvider(); - } - - [TestMethod] - public void RepThrowsExOnInvGet() - { - var services = new ServiceCollection(); - services.AddTransient(); - services.AddSingleton(); - services.AddTransient(); - var container = services.BuildServiceProvider(); - - var log = container.GetService(); - - ICustomerRepository repository = - container.GetService(); - - Assert.ThrowsException( - () => repository?.Get(Guid.NewGuid()) - ); - - log?.Get().Should().HaveCount( 1 ); - } - - [TestMethod] - public void RepThrowsExOnInvGet2() - { - var log = container.GetService(); - - var repository = - container.GetService(); - - Assert.ThrowsException( - () => repository?.Get(Guid.NewGuid()) - ); - - log?.Get().Should().HaveCount(1); - } - - [TestMethod] - public void RepThrows2ExOn2InvGet2() - { - var log = container.GetService(); - - var repository = - container.GetService(); - - Assert.ThrowsException( - () => repository?.Get(Guid.NewGuid()) - ); - Assert.ThrowsException( - () => repository?.Get(Guid.NewGuid()) - ); - - log?.Get().Should().HaveCount(2); - } - - [TestMethod] - public void LogsTimeOnInvLogGet() - { - var log = container.GetService(); - var clock = container.GetService(); - - var repository = - container.GetService(); - - Assert.ThrowsException( - () => repository?.Get(Guid.NewGuid()) - ); - - log.Get().First().Time - .Should().Be(clock.Now); - } - } -} diff --git a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/Mocking.cs b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/Mocking.cs deleted file mode 100644 index 714eecd01..000000000 --- a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/Mocking.cs +++ /dev/null @@ -1,73 +0,0 @@ -using CustomerRepository.Model; -using FluentAssertions; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Moq; -using System; - -namespace CustomerRepositoryTests.Model -{ - [TestClass] - public class Mocking - { - [TestMethod] - public void RepThrowsExOnInvGet() - { - var clock = new Mock(); - var log = new Mock(); - log.Setup(I => I.Error(It.IsAny(), - It.IsAny())); - - var repository = - new CustomerRepository5(clock.Object, log.Object); - - Assert.ThrowsException( - () => repository.Get(Guid.NewGuid()) - ); - - log.Verify(I => I.Error(It.IsAny(), - It.IsAny()), Times.Exactly(1)); - } - - [TestMethod] - public void RepLogsTimeOnInvGet() - { - var clock = new Mock(); - var log = new Mock(); - log.Setup(I => I.Error(It.IsAny(), - It.IsAny())); - - var referencetime = clock.Object.Now; - - var repository = - new CustomerRepository5(clock.Object, log.Object); - Assert.ThrowsException( - () => repository.Get(Guid.NewGuid()) - ); - - log.Verify(I => I.Error(It.IsAny(), - It.IsAny()), Times.Exactly(1)); - - } - - [TestMethod] - public void RepLogsOnMultibleInvGet() - { - var clock = new Mock(); - var log = new Mock(); - log.Setup(I => I.Error(It.IsAny(), - It.IsAny())); - - ICustomerRepository repository = new CustomerRepository5(clock.Object, log.Object); - // repository.Get(Guid.NewGuid()); - Assert.ThrowsException( - () => repository.Get(Guid.NewGuid()) - ); - Assert.ThrowsException( - () => repository.Get(Guid.NewGuid()) - ); - - log.Verify(I => I.Error(It.IsAny(), - It.IsAny()), Times.Exactly(2)); - } - } -} diff --git a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/Mocking_AutoFix_AutoMoq.cs b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/Mocking_AutoFix_AutoMoq.cs new file mode 100644 index 000000000..7e8200d61 --- /dev/null +++ b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/Mocking_AutoFix_AutoMoq.cs @@ -0,0 +1,26 @@ +using AutoFixture; +using AutoFixture.AutoMoq; +using CustomerRepository.Model; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; + +namespace CustomerRepositoryTests.Model +{ + [TestClass] + public class Mocking_AutoFix_AutoMoq + { + [TestMethod] + public void RepThrowsExOnInvGet() + { + var fixture = new Fixture() + .Customize(new AutoMoqCustomization()); + + ICustomerRepository repository = + fixture.Create(); + + Assert.ThrowsException( + () => repository.Get(Guid.NewGuid()) + ); + } + } +} diff --git a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/Mocking_JustMock.cs b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/Mocking_JustMock.cs new file mode 100644 index 000000000..e4a3d7d64 --- /dev/null +++ b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/Mocking_JustMock.cs @@ -0,0 +1,83 @@ +using CustomerRepository.Model; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Telerik.JustMock; +using System; + +namespace CustomerRepositoryTests.Model +{ + [TestClass] + public class Mocking_JustMock + { + [TestMethod] + public void RepThrowsExOnInvGet() + { + var clock = Mock.Create(Behavior.Strict); + var log = Mock.Create(Behavior.Strict); + Mock.Arrange(()=>log.Error(new DateTime(2023, 06, 01), "no such customer")).MustBeCalled(); + Mock.Arrange(() => clock.Now).Returns(new DateTime(2023, 06, 01)).MustBeCalled(); + var repository = + new CustomerRepository5(clock, log); + + Assert.ThrowsException( + () => repository.Get(Guid.NewGuid()) + ); + + Mock.Assert(clock); + Mock.Assert(() => clock.Now, Occurs.Exactly(1)); + + Mock.Assert(log); + Mock.Assert(()=>log.Error(new DateTime(2023, 06, 01), "no such customer"), Occurs.Exactly(1)); + } + + [TestMethod] + public void RepLogsTimeOnInvGet() + { + var clock = Mock.Create(Behavior.Strict); + var log = Mock.Create(Behavior.Strict); + Mock.Arrange(() => log.Error(new DateTime(2023, 06, 01), "no such customer")).MustBeCalled(); + Mock.Arrange(() => clock.Now).Returns(new DateTime(2023, 06, 01)).MustBeCalled(); + + var referencetime = clock.Now; + + var repository = + new CustomerRepository5(clock, log); + Assert.ThrowsException( + () => repository.Get(Guid.NewGuid()) + ); + + Mock.Assert(clock); + Mock.Assert(() => clock.Now, Occurs.Exactly(2)); + + Mock.Assert(log); + Mock.Assert(() => log.Error(referencetime, "no such customer"), Occurs.Exactly(1)); + + } + + [TestMethod] + public void RepLogsOnMultibleInvGet() + { + var clock = Mock.Create(Behavior.Strict); + var log = Mock.Create(Behavior.Strict); + Mock.Arrange(() => clock.Now).Returns(new DateTime(2023, 06, 01)).MustBeCalled(); + Mock.Arrange(() => log.Error(new DateTime(2023, 06, 01), "no such customer")).MustBeCalled(); + Mock.Arrange(() => log.Error(new DateTime(2023, 06, 02), "no such customer")).MustBeCalled(); + + ICustomerRepository repository = new CustomerRepository5(clock, log); + // repository.Get(Guid.NewGuid()); + Assert.ThrowsException( + () => repository.Get(Guid.NewGuid()) + ); + Mock.Arrange(() => clock.Now).Returns(new DateTime(2023, 06, 02)).MustBeCalled(); + Assert.ThrowsException( + () => repository.Get(Guid.NewGuid()) + ); + + Mock.Assert(clock); + Mock.Assert(() => clock.Now, Occurs.Exactly(2)); + + Mock.Assert(log); + Mock.Assert(() => log.Error(new DateTime(2023, 06, 01), "no such customer"), Occurs.Exactly(1)); + Mock.Assert(() => log.Error(new DateTime(2023, 06, 02), "no such customer"), Occurs.Exactly(1)); + } + } +} diff --git a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/Mocking_Moq.cs b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/Mocking_Moq.cs new file mode 100644 index 000000000..5ea4c3f2c --- /dev/null +++ b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/Mocking_Moq.cs @@ -0,0 +1,72 @@ +using CustomerRepository.Model; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Moq; +using System; + +namespace CustomerRepositoryTests.Model +{ + [TestClass] + public class Mocking_Moq + { + [TestMethod] + public void RepThrowsExOnInvGet() + { + var clock = new Mock(); + var log = new Mock(); + log.Setup(I => I.Error(It.IsAny(), + It.IsAny())); + + var repository = + new CustomerRepository5(clock.Object, log.Object); + + Assert.ThrowsException( + () => repository.Get(Guid.NewGuid()) + ); + + log.Verify(I => I.Error(It.IsAny(), + It.IsAny()), Times.Exactly(1)); + } + + [TestMethod] + public void RepLogsTimeOnInvGet() + { + var clock = new Mock(); + var log = new Mock(); + log.Setup(I => I.Error(It.IsAny(), + It.IsAny())); + + var referencetime = clock.Object.Now; + + var repository = + new CustomerRepository5(clock.Object, log.Object); + Assert.ThrowsException( + () => repository.Get(Guid.NewGuid()) + ); + + log.Verify(I => I.Error(It.IsAny(), + It.IsAny()), Times.Exactly(1)); + + } + + [TestMethod] + public void RepLogsOnMultibleInvGet() + { + var clock = new Mock(); + var log = new Mock(); + log.Setup(I => I.Error(It.IsAny(), + It.IsAny())); + + ICustomerRepository repository = new CustomerRepository5(clock.Object, log.Object); + // repository.Get(Guid.NewGuid()); + Assert.ThrowsException( + () => repository.Get(Guid.NewGuid()) + ); + Assert.ThrowsException( + () => repository.Get(Guid.NewGuid()) + ); + + log.Verify(I => I.Error(It.IsAny(), + It.IsAny()), Times.Exactly(2)); + } + } +} diff --git a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/Mocking_NSubst.cs b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/Mocking_NSubst.cs new file mode 100644 index 000000000..4597f3262 --- /dev/null +++ b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/Mocking_NSubst.cs @@ -0,0 +1,67 @@ +using CustomerRepository.Model; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using NSubstitute; +using System; + +namespace CustomerRepositoryTests.Model +{ + [TestClass] + public class Mocking_NSubst + { + [TestMethod] + public void RepThrowsExOnInvGet() + { + var clock = Substitute.For(); + var log = Substitute.For(); + clock.Now.Returns(new DateTime(2023,05,01)); + + var repository = + new CustomerRepository5(clock, log); + + Assert.ThrowsException( + () => repository.Get(Guid.NewGuid()) + ); + + log.Received().Error(new DateTime(2023, 05, 01), "no such customer"); + } + + [TestMethod] + public void RepLogsTimeOnInvGet() + { + var clock = Substitute.For(); + var log = Substitute.For(); + clock.Now.Returns(new DateTime(2023, 05, 02)); + + var referencetime = clock.Now; + + var repository = + new CustomerRepository5(clock, log); + Assert.ThrowsException( + () => repository.Get(Guid.NewGuid()) + ); + + log.Received().Error(new DateTime(2023, 05, 02), "no such customer"); + + } + + [TestMethod] + public void RepLogsOnMultibleInvGet() + { + var clock = Substitute.For(); + var log = Substitute.For(); + clock.Now.Returns(new DateTime(2023, 05, 03)); + + ICustomerRepository repository = new CustomerRepository5(clock, log); + // repository.Get(Guid.NewGuid()); + Assert.ThrowsException( + () => repository.Get(Guid.NewGuid()) + ); + Assert.ThrowsException( + () => repository.Get(Guid.NewGuid()) + ); + + log.Received().Error(new DateTime(2023, 05, 03), "no such customer"); + + } + } +} diff --git a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/Ninject.cs b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/Ninject.cs deleted file mode 100644 index 521fadcd5..000000000 --- a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/Ninject.cs +++ /dev/null @@ -1,93 +0,0 @@ -using CustomerRepository.Model; -using FluentAssertions; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Ninject; -using System; -using System.Linq; - -namespace CustomerRepositoryTests.Model -{ - [TestClass] - public class Ninject - { - private StandardKernel kernel { get; set; } - - [TestInitialize] - public void Init() - { - kernel = new StandardKernel(); - kernel.Bind().To(); - kernel.Bind().To().InSingletonScope(); - kernel.Bind().To(); - } - - [TestMethod] - public void RepThrowsExOnInvGet() - { - var kernel = new StandardKernel(); - kernel.Bind().To(); - kernel.Bind().To().InSingletonScope(); - kernel.Bind().To(); - - var log = kernel.Get(); - - ICustomerRepository repository = - kernel.Get(); - - Assert.ThrowsException( - () => repository.Get(Guid.NewGuid()) - ); - - log.Get().Should().HaveCount( 1 ); - } - - [TestMethod] - public void RepThrowsExOnInvGet2() - { - var log = kernel.Get(); - - var repository = - kernel.Get(); - - Assert.ThrowsException( - () => repository?.Get(Guid.NewGuid()) - ); - - log?.Get().Should().HaveCount(1); - } - - [TestMethod] - public void RepThrows2ExOn2InvGet2() - { - var log = kernel.Get(); - var repository = - kernel.Get(); - - Assert.ThrowsException( - () => repository?.Get(Guid.NewGuid()) - ); - Assert.ThrowsException( - () => repository?.Get(Guid.NewGuid()) - ); - - log?.Get().Should().HaveCount(2); - } - - [TestMethod] - public void LogsTimeOnInvLogGet() - { - var log = kernel.Get(); - var clock = kernel.Get(); - - var repository = - kernel.Get(); - - Assert.ThrowsException( - () => repository?.Get(Guid.NewGuid()) - ); - - log.Get().First().Time - .Should().Be(clock.Now); - } - } -} diff --git a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/StructureMap.cs b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/StructureMap.cs deleted file mode 100644 index 9f5a6c844..000000000 --- a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/StructureMap.cs +++ /dev/null @@ -1,95 +0,0 @@ -using CustomerRepository.Model; -using FluentAssertions; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using StructureMap; -using System; -using System.Linq; - -namespace CustomerRepositoryTests.Model -{ - [TestClass] - public class StructureMap - { - private Container container { get; set; } - - [TestInitialize] - public void Init() - { - container = new Container(x => - { - x.For().Use(); - x.For().Singleton().Use(); - x.For().Use(); - }); - } - - [TestMethod] - public void RepThrowsExOnInvGet() - { - var container = new Container(x => - { - x.For().Use(); - x.For().Singleton().Use(); - x.For().Use(); - }); - - var log = container.GetInstance(); - - ICustomerRepository repository = - container.GetInstance(); - - Assert.ThrowsException( - () => repository.Get(Guid.NewGuid()) - ); - - log.Get().Should().HaveCount( 1 ); - } - - [TestMethod] - public void RepThrowsExOnInvGet2() - { - var log = container.GetInstance(); - var repository = - container.GetInstance(); - - Assert.ThrowsException( - () => repository?.Get(Guid.NewGuid()) - ); - - log?.Get().Should().HaveCount(1); - } - - [TestMethod] - public void RepThrows2ExOn2InvGet2() - { - var log = container.GetInstance(); - var repository = - container.GetInstance(); - - Assert.ThrowsException( - () => repository?.Get(Guid.NewGuid()) - ); - Assert.ThrowsException( - () => repository?.Get(Guid.NewGuid()) - ); - - log?.Get().Should().HaveCount(2); - } - - [TestMethod] - public void LogsTimeOnInvLogGet() - { - var log = container.GetInstance(); - var clock = container.GetInstance(); - var repository = - container.GetInstance(); - - Assert.ThrowsException( - () => repository?.Get(Guid.NewGuid()) - ); - - log.Get().First().Time - .Should().Be(clock.Now); - } - } -} diff --git a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/UsingAbstractFactoryTests.cs b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/UsingAbstractFactoryTests.cs index 076f1cbae..62adafba6 100644 --- a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/UsingAbstractFactoryTests.cs +++ b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/UsingAbstractFactoryTests.cs @@ -41,7 +41,7 @@ public void RepLogsOnInvGet() } [TestMethod] - public void RepLogsOnMultibleInvGet() + public void RepLogsOnMultipleInvGet() { ILogFactory logFactory = new CLogFactory(); IClockFactory clockFactory = new CStaticClockFactory(); @@ -74,5 +74,37 @@ public void RepLogsTimeOnInvLogGet() repository.Log.Get().First().Time .Should().Be(referenceTime); } + + [TestMethod] + public void PutTest() + { + ILogFactory logFactory = new CLogFactory(); + IClockFactory clockFactory = new CStaticClockFactory(); + + ICustomerRepository2 repository = + new CustomerRepository3(clockFactory, logFactory); + CCustomer customer = new(); + + + Guid g; + Assert.IsNotNull(g = repository.Put(customer)); + Assert.AreEqual(customer, repository.Get(g)); + } + + [TestMethod] + public void CountTest() + { + ILogFactory logFactory = new CLogFactory(); + IClockFactory clockFactory = new CStaticClockFactory(); + + ICustomerRepository2 repository = + new CustomerRepository3(clockFactory, logFactory); + Assert.AreEqual(0, repository.Count); + + CCustomer customer = new(); + + repository.Put(customer); + Assert.AreEqual(1, repository.Count); + } } } diff --git a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/UsingDependencyInjection.cs b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/UsingDependencyInjection.cs index 729077315..20c123c18 100644 --- a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/UsingDependencyInjection.cs +++ b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/UsingDependencyInjection.cs @@ -38,7 +38,7 @@ public void RepLogsOnInvGet() } [TestMethod] - public void RepLogsOnMultibleInvGet() + public void RepLogsOnMultipleInvGet() { var clock = new CStaticClock(); var log = new CLog(); @@ -70,5 +70,36 @@ public void LogsTimeOnInvLogGet() log.Get().First().Time .Should().Be(clock.Now); } + + [TestMethod] + public void PutTest() + { + var clock = new CStaticClock(); + var log = new CLog(); + + ICustomerRepository repository = new CustomerRepository5(clock, log); + CCustomer customer = new(); + + + Guid g; + Assert.IsNotNull(g = repository.Put(customer)); + Assert.AreEqual(customer, repository.Get(g)); + } + + [TestMethod] + public void CountTest() + { + var clock = new CStaticClock(); + var log = new CLog(); + + ICustomerRepository repository = new CustomerRepository5(clock, log); + + Assert.AreEqual(0, repository.Count); + + CCustomer customer = new(); + + repository.Put(customer); + Assert.AreEqual(1, repository.Count); + } } } diff --git a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/UsingFactoryTests.cs b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/UsingFactoryTests.cs index 7e44ff78b..e1b225563 100644 --- a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/UsingFactoryTests.cs +++ b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/UsingFactoryTests.cs @@ -35,7 +35,7 @@ public void RepLogsOnInvGet() } [TestMethod] - public void RepLogsOnMultibleInvGet() + public void RepLogsOnMultipleInvGet() { CClockFactory.injectClock = new CStaticClock(); @@ -66,5 +66,31 @@ public void RepLogsTimeOnInvLogGet() repository.Log.Get().First().Time .Should().Be(referenceTime); } + + [TestMethod] + public void PutTest() + { + ICustomerRepository2 repository = + new CustomerRepository2(); + CCustomer customer = new(); + + + Guid g; + Assert.IsNotNull(g = repository.Put(customer)); + Assert.AreEqual(customer, repository.Get(g)); + } + + [TestMethod] + public void CountTest() + { + ICustomerRepository2 repository = + new CustomerRepository2(); + Assert.AreEqual(0, repository.Count); + + CCustomer customer = new(); + + repository.Put(customer); + Assert.AreEqual(1, repository.Count); + } } } diff --git a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/UsingServiceLocator.cs b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/UsingServiceLocator.cs index 620c22933..85672d554 100644 --- a/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/UsingServiceLocator.cs +++ b/CSharpBible/DependencyInjection/CustomerRepositoryTests/Model/UsingServiceLocator.cs @@ -40,9 +40,9 @@ public void RepLogsOnInvGet() ServiceLocator.Log.Get().Should().HaveCount(1); } - /// Repository logs on multible invalid gets. + /// Repository logs on multiple invalid gets. [TestMethod] - public void RepLogsOnMultibleInvGet() + public void RepLogsOnMultipleInvGet() { ServiceLocator.Log = new CLog(); @@ -76,5 +76,30 @@ public void LogsTimeOnInvGet() ServiceLocator.Log.Get().First().Time .Should().Be(ServiceLocator.Clock.Now); } + + [TestMethod] + public void PutTest() + { + ICustomerRepository repository = new CustomerRepository4(); + CCustomer customer = new(); + + + Guid g; + Assert.IsNotNull(g = repository.Put(customer)); + Assert.AreEqual(customer, repository.Get(g)); + } + + [TestMethod] + public void CountTest() + { + ICustomerRepository repository = new CustomerRepository4(); + + Assert.AreEqual(0, repository.Count); + + CCustomer customer = new(); + + repository.Put(customer); + Assert.AreEqual(1, repository.Count); + } } } diff --git a/CSharpBible/DependencyInjection/DependencyInjection.props b/CSharpBible/DependencyInjection/DependencyInjection.props new file mode 100644 index 000000000..7988d239f --- /dev/null +++ b/CSharpBible/DependencyInjection/DependencyInjection.props @@ -0,0 +1,13 @@ + + + ..\..\..\bin\$(MSBuildProjectName)\ + ..\..\..\obj\$(MSBuildProjectName)\ + 9.0 + enable + NULLABLE + disable + JC-Soft + Joe Care + Copyright © JC-Soft 2023 + + \ No newline at end of file diff --git a/CSharpBible/DependencyInjection/DependencyInjection.sln b/CSharpBible/DependencyInjection/DependencyInjection.sln new file mode 100644 index 000000000..d69ef2986 --- /dev/null +++ b/CSharpBible/DependencyInjection/DependencyInjection.sln @@ -0,0 +1,34 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Projektmappenelemente", "Projektmappenelemente", "{658BD492-33FF-4995-AAE7-4F6894E92F0C}" + ProjectSection(SolutionItems) = preProject + DependencyInjection.props = DependencyInjection.props + DependencyInjection_net.props = DependencyInjection_net.props + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CustomerRepository", "CustomerRepository\CustomerRepository.csproj", "{346485DA-C608-47BC-83BF-D19E0878946A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CustomerRepositoryTests", "CustomerRepositoryTests\CustomerRepositoryTests.csproj", "{32065F3A-F787-4EF3-91F6-DBF5D9A74AA0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {346485DA-C608-47BC-83BF-D19E0878946A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {346485DA-C608-47BC-83BF-D19E0878946A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {346485DA-C608-47BC-83BF-D19E0878946A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {346485DA-C608-47BC-83BF-D19E0878946A}.Release|Any CPU.Build.0 = Release|Any CPU + {32065F3A-F787-4EF3-91F6-DBF5D9A74AA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {32065F3A-F787-4EF3-91F6-DBF5D9A74AA0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {32065F3A-F787-4EF3-91F6-DBF5D9A74AA0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {32065F3A-F787-4EF3-91F6-DBF5D9A74AA0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/CSharpBible/DependencyInjection/DependencyInjection_net.props b/CSharpBible/DependencyInjection/DependencyInjection_net.props new file mode 100644 index 000000000..e7ad24a75 --- /dev/null +++ b/CSharpBible/DependencyInjection/DependencyInjection_net.props @@ -0,0 +1,13 @@ + + + ..\..\..\bin\$(MSBuildProjectName)\ + ..\..\..\obj.net\$(MSBuildProjectName)\ + $(MSBuildProjectName.Replace(".","_").Replace("_net","")) + 9.0 + enable + disable + JC-Soft + Joe Care + Copyright © JC-Soft 2023 + + \ No newline at end of file diff --git a/CSharpBible/Display_Test/Display_Test.csproj b/CSharpBible/Display_Test/Display_Test.csproj index 887d5e0e9..dae2ecd4e 100644 --- a/CSharpBible/Display_Test/Display_Test.csproj +++ b/CSharpBible/Display_Test/Display_Test.csproj @@ -1,27 +1,20 @@ - + + - net48;net472;net461 - ..\..\obj\$(MSBuildProjectName)\ - ..\..\obj\$(MSBuildProjectName)\ - ..\..\bin\$(MSBuildProjectName) + net481;net472;net462 Exe - JC-Soft - Copyright © 2022 by JC-Soft - disable - 8.0 - enable - + - - - + + + - + diff --git a/CSharpBible/Display_Test/Display_netTest.csproj b/CSharpBible/Display_Test/Display_netTest.csproj index 036cfbe69..c8126c351 100644 --- a/CSharpBible/Display_Test/Display_netTest.csproj +++ b/CSharpBible/Display_Test/Display_netTest.csproj @@ -1,26 +1,17 @@ + - net6.0 - ..\..\obj.net\$(MSBuildProjectName)\ - ..\..\obj.net\$(MSBuildProjectName)\ - ..\..\bin\$(MSBuildProjectName) + net6.0;net7.0;net8.0 Exe - JC-Soft - Copyright © 2022 by JC-Soft - - disable - enable - - - - + + + - + - diff --git a/CSharpBible/Games/Asteroids.sln b/CSharpBible/Games/Asteroids.sln new file mode 100644 index 000000000..69653bb83 --- /dev/null +++ b/CSharpBible/Games/Asteroids.sln @@ -0,0 +1,224 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Projektmappenelemente", "Projektmappenelemente", "{658BD492-33FF-4995-AAE7-4F6894E92F0C}" + ProjectSection(SolutionItems) = preProject + Games.props = Games.props + Games_net.props = Games_net.props + VectorGfx\VectorGfx.csproj = VectorGfx\VectorGfx.csproj + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_BaseLib", "..\Libraries\MVVM_BaseLib\MVVM_BaseLib.csproj", "{890CF504-3814-443B-9EE6-E8BCACF68203}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{AF041458-CF94-4D6D-BB0F-8BC50F4F099C}" + ProjectSection(SolutionItems) = preProject + ..\Libraries\Libraries_net.props = ..\Libraries\Libraries_net.props + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_BaseLibTests", "..\Libraries\MVVM_BaseLibTests\MVVM_BaseLibTests.csproj", "{66EB60F2-523D-47C8-95EA-C7E10759E239}" +EndProject +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Asteroids", "Asteroids", "{4BE42477-1420-4A81-BDFA-4C34DA898F05}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Asteroids_net", "Asteroids\Asteroids_net.csproj", "{6AA283E8-D2B2-4743-B96D-96A5DAA8F2B5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CanvasWPF_CT", "..\Graphics\CanvasWPF_CT\CanvasWPF_CT.csproj", "{F7BB8FCE-FAE8-4C35-939F-070DF91806B5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DynamicShapeWPF", "..\Graphics\DynamicShapeWPF\DynamicShapeWPF.csproj", "{3E13AE4D-D805-4D2E-B6B5-88DC174F6A2C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Graphics", "Graphics", "{79430A25-1F0B-49B9-9A68-720A422E91AB}" + ProjectSection(SolutionItems) = preProject + ..\Graphics\Graphics.props = ..\Graphics\Graphics.props + ..\Graphics\Graphics_net.props = ..\Graphics\Graphics_net.props + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_Converter_Grid2", "..\Graphics\MVVM_Converter_Grid2\MVVM_Converter_Grid2.csproj", "{F74AA722-DB1C-4CDB-B0FB-4016651C6E1C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Asteroids_Base", "Asteroids_Base\Asteroids_Base.csproj", "{15EA50ED-95FB-4195-87F6-F1D48DA8B5F1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {890CF504-3814-443B-9EE6-E8BCACF68203}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {890CF504-3814-443B-9EE6-E8BCACF68203}.Debug|Any CPU.Build.0 = Debug|Any CPU + {890CF504-3814-443B-9EE6-E8BCACF68203}.Release|Any CPU.ActiveCfg = Release|Any CPU + {890CF504-3814-443B-9EE6-E8BCACF68203}.Release|Any CPU.Build.0 = Release|Any CPU + {66EB60F2-523D-47C8-95EA-C7E10759E239}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {66EB60F2-523D-47C8-95EA-C7E10759E239}.Debug|Any CPU.Build.0 = Debug|Any CPU + {66EB60F2-523D-47C8-95EA-C7E10759E239}.Release|Any CPU.ActiveCfg = Release|Any CPU + {66EB60F2-523D-47C8-95EA-C7E10759E239}.Release|Any CPU.Build.0 = Release|Any CPU + {8AA72111-7FF0-416B-90E3-0DC9B2548156}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8AA72111-7FF0-416B-90E3-0DC9B2548156}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8AA72111-7FF0-416B-90E3-0DC9B2548156}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8AA72111-7FF0-416B-90E3-0DC9B2548156}.Release|Any CPU.Build.0 = Release|Any CPU + {772EB95A-D422-474F-A749-66434C42084A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {772EB95A-D422-474F-A749-66434C42084A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {772EB95A-D422-474F-A749-66434C42084A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {772EB95A-D422-474F-A749-66434C42084A}.Release|Any CPU.Build.0 = Release|Any CPU + {60F5A221-9007-44A2-B29E-0469D91434EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {60F5A221-9007-44A2-B29E-0469D91434EC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {60F5A221-9007-44A2-B29E-0469D91434EC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {60F5A221-9007-44A2-B29E-0469D91434EC}.Release|Any CPU.Build.0 = Release|Any CPU + {A6A861F4-DC4E-45CB-A621-E737693CB9EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A6A861F4-DC4E-45CB-A621-E737693CB9EA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A6A861F4-DC4E-45CB-A621-E737693CB9EA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A6A861F4-DC4E-45CB-A621-E737693CB9EA}.Release|Any CPU.Build.0 = Release|Any CPU + {3EDDA5EE-28AB-491E-AC2A-7C13B4A310DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3EDDA5EE-28AB-491E-AC2A-7C13B4A310DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3EDDA5EE-28AB-491E-AC2A-7C13B4A310DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3EDDA5EE-28AB-491E-AC2A-7C13B4A310DD}.Release|Any CPU.Build.0 = Release|Any CPU + {58BB1796-700F-4F0D-981A-A16BE151AD65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58BB1796-700F-4F0D-981A-A16BE151AD65}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58BB1796-700F-4F0D-981A-A16BE151AD65}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58BB1796-700F-4F0D-981A-A16BE151AD65}.Release|Any CPU.Build.0 = Release|Any CPU + {F3338CF1-8429-489F-88E7-1BC5A5F2C425}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F3338CF1-8429-489F-88E7-1BC5A5F2C425}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F3338CF1-8429-489F-88E7-1BC5A5F2C425}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F3338CF1-8429-489F-88E7-1BC5A5F2C425}.Release|Any CPU.Build.0 = Release|Any CPU + {B36AA369-AA02-446A-9028-F801DC5728E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B36AA369-AA02-446A-9028-F801DC5728E5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B36AA369-AA02-446A-9028-F801DC5728E5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B36AA369-AA02-446A-9028-F801DC5728E5}.Release|Any CPU.Build.0 = Release|Any CPU + {DBD8FF8A-4868-446B-912B-9A5A796943DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DBD8FF8A-4868-446B-912B-9A5A796943DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DBD8FF8A-4868-446B-912B-9A5A796943DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DBD8FF8A-4868-446B-912B-9A5A796943DD}.Release|Any CPU.Build.0 = Release|Any CPU + {83D18210-073D-461C-92B5-A1F62034BF90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {83D18210-073D-461C-92B5-A1F62034BF90}.Debug|Any CPU.Build.0 = Debug|Any CPU + {83D18210-073D-461C-92B5-A1F62034BF90}.Release|Any CPU.ActiveCfg = Release|Any CPU + {83D18210-073D-461C-92B5-A1F62034BF90}.Release|Any CPU.Build.0 = Release|Any CPU + {00D00117-45B0-4B30-87F0-74DBEE09898C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {00D00117-45B0-4B30-87F0-74DBEE09898C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {00D00117-45B0-4B30-87F0-74DBEE09898C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {00D00117-45B0-4B30-87F0-74DBEE09898C}.Release|Any CPU.Build.0 = Release|Any CPU + {CE756825-E693-4592-A937-635A5E11274A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CE756825-E693-4592-A937-635A5E11274A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CE756825-E693-4592-A937-635A5E11274A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CE756825-E693-4592-A937-635A5E11274A}.Release|Any CPU.Build.0 = Release|Any CPU + {A4144DF0-77E3-4370-8C46-64C56279B3DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4144DF0-77E3-4370-8C46-64C56279B3DE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4144DF0-77E3-4370-8C46-64C56279B3DE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4144DF0-77E3-4370-8C46-64C56279B3DE}.Release|Any CPU.Build.0 = Release|Any CPU + {79B65C63-EB25-4DEF-AC59-52836AAA0F24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {79B65C63-EB25-4DEF-AC59-52836AAA0F24}.Debug|Any CPU.Build.0 = Debug|Any CPU + {79B65C63-EB25-4DEF-AC59-52836AAA0F24}.Release|Any CPU.ActiveCfg = Release|Any CPU + {79B65C63-EB25-4DEF-AC59-52836AAA0F24}.Release|Any CPU.Build.0 = Release|Any CPU + {87D85880-5526-4FEF-93E9-3DCFBA0A1A4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {87D85880-5526-4FEF-93E9-3DCFBA0A1A4C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {87D85880-5526-4FEF-93E9-3DCFBA0A1A4C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {87D85880-5526-4FEF-93E9-3DCFBA0A1A4C}.Release|Any CPU.Build.0 = Release|Any CPU + {C85992D0-7713-4EA1-A4F3-3D3598FFA9E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C85992D0-7713-4EA1-A4F3-3D3598FFA9E0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C85992D0-7713-4EA1-A4F3-3D3598FFA9E0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C85992D0-7713-4EA1-A4F3-3D3598FFA9E0}.Release|Any CPU.Build.0 = Release|Any CPU + {6F8F8283-A334-47D4-A15B-94100A2C29E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6F8F8283-A334-47D4-A15B-94100A2C29E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6F8F8283-A334-47D4-A15B-94100A2C29E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6F8F8283-A334-47D4-A15B-94100A2C29E3}.Release|Any CPU.Build.0 = Release|Any CPU + {D8E3D40A-8D95-4410-AF28-A7AD24215754}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D8E3D40A-8D95-4410-AF28-A7AD24215754}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D8E3D40A-8D95-4410-AF28-A7AD24215754}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D8E3D40A-8D95-4410-AF28-A7AD24215754}.Release|Any CPU.Build.0 = Release|Any CPU + {8E1630B1-46AF-4A2B-8349-AEED39F1CFA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E1630B1-46AF-4A2B-8349-AEED39F1CFA9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E1630B1-46AF-4A2B-8349-AEED39F1CFA9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E1630B1-46AF-4A2B-8349-AEED39F1CFA9}.Release|Any CPU.Build.0 = Release|Any CPU + {167E2DAD-894E-4BE6-8936-72A8D9B7ECC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {167E2DAD-894E-4BE6-8936-72A8D9B7ECC5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {167E2DAD-894E-4BE6-8936-72A8D9B7ECC5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {167E2DAD-894E-4BE6-8936-72A8D9B7ECC5}.Release|Any CPU.Build.0 = Release|Any CPU + {E004F929-593A-4F29-B77E-FEA73C600442}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E004F929-593A-4F29-B77E-FEA73C600442}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E004F929-593A-4F29-B77E-FEA73C600442}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E004F929-593A-4F29-B77E-FEA73C600442}.Release|Any CPU.Build.0 = Release|Any CPU + {790D205A-6FB7-4159-AE15-C39BCADAFF6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {790D205A-6FB7-4159-AE15-C39BCADAFF6F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {790D205A-6FB7-4159-AE15-C39BCADAFF6F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {790D205A-6FB7-4159-AE15-C39BCADAFF6F}.Release|Any CPU.Build.0 = Release|Any CPU + {5E72ADAF-153A-4488-AAA9-CC4EF2771F16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5E72ADAF-153A-4488-AAA9-CC4EF2771F16}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5E72ADAF-153A-4488-AAA9-CC4EF2771F16}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5E72ADAF-153A-4488-AAA9-CC4EF2771F16}.Release|Any CPU.Build.0 = Release|Any CPU + {BFD71332-B8CE-4072-B933-16326850BF63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BFD71332-B8CE-4072-B933-16326850BF63}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BFD71332-B8CE-4072-B933-16326850BF63}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BFD71332-B8CE-4072-B933-16326850BF63}.Release|Any CPU.Build.0 = Release|Any CPU + {E4742BCD-D967-40A2-99C9-14351BCC9FD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E4742BCD-D967-40A2-99C9-14351BCC9FD1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E4742BCD-D967-40A2-99C9-14351BCC9FD1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E4742BCD-D967-40A2-99C9-14351BCC9FD1}.Release|Any CPU.Build.0 = Release|Any CPU + {6BDAFCB1-55B5-4CAB-A9CD-9D485151D1EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6BDAFCB1-55B5-4CAB-A9CD-9D485151D1EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6BDAFCB1-55B5-4CAB-A9CD-9D485151D1EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6BDAFCB1-55B5-4CAB-A9CD-9D485151D1EF}.Release|Any CPU.Build.0 = Release|Any CPU + {9CA57524-1297-4313-AA78-5AA8BFB7E746}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9CA57524-1297-4313-AA78-5AA8BFB7E746}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9CA57524-1297-4313-AA78-5AA8BFB7E746}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9CA57524-1297-4313-AA78-5AA8BFB7E746}.Release|Any CPU.Build.0 = Release|Any CPU + {D5CA406E-3839-4CB6-AF28-7EE2B029B912}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D5CA406E-3839-4CB6-AF28-7EE2B029B912}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D5CA406E-3839-4CB6-AF28-7EE2B029B912}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D5CA406E-3839-4CB6-AF28-7EE2B029B912}.Release|Any CPU.Build.0 = Release|Any CPU + {380B97C9-B145-49A9-92C0-47B819748BC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {380B97C9-B145-49A9-92C0-47B819748BC3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {380B97C9-B145-49A9-92C0-47B819748BC3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {380B97C9-B145-49A9-92C0-47B819748BC3}.Release|Any CPU.Build.0 = Release|Any CPU + {0E81C28B-325A-4A2F-B21F-F66DADA451EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E81C28B-325A-4A2F-B21F-F66DADA451EC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E81C28B-325A-4A2F-B21F-F66DADA451EC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E81C28B-325A-4A2F-B21F-F66DADA451EC}.Release|Any CPU.Build.0 = Release|Any CPU + {07FB5A96-DB06-442C-8570-8644898BD6C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {07FB5A96-DB06-442C-8570-8644898BD6C5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {07FB5A96-DB06-442C-8570-8644898BD6C5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {07FB5A96-DB06-442C-8570-8644898BD6C5}.Release|Any CPU.Build.0 = Release|Any CPU + {445F80F7-1EAB-462A-BD46-0DE231BD66D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {445F80F7-1EAB-462A-BD46-0DE231BD66D9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {445F80F7-1EAB-462A-BD46-0DE231BD66D9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {445F80F7-1EAB-462A-BD46-0DE231BD66D9}.Release|Any CPU.Build.0 = Release|Any CPU + {6AA283E8-D2B2-4743-B96D-96A5DAA8F2B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6AA283E8-D2B2-4743-B96D-96A5DAA8F2B5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6AA283E8-D2B2-4743-B96D-96A5DAA8F2B5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6AA283E8-D2B2-4743-B96D-96A5DAA8F2B5}.Release|Any CPU.Build.0 = Release|Any CPU + {F7BB8FCE-FAE8-4C35-939F-070DF91806B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F7BB8FCE-FAE8-4C35-939F-070DF91806B5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F7BB8FCE-FAE8-4C35-939F-070DF91806B5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F7BB8FCE-FAE8-4C35-939F-070DF91806B5}.Release|Any CPU.Build.0 = Release|Any CPU + {3E13AE4D-D805-4D2E-B6B5-88DC174F6A2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3E13AE4D-D805-4D2E-B6B5-88DC174F6A2C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3E13AE4D-D805-4D2E-B6B5-88DC174F6A2C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3E13AE4D-D805-4D2E-B6B5-88DC174F6A2C}.Release|Any CPU.Build.0 = Release|Any CPU + {F74AA722-DB1C-4CDB-B0FB-4016651C6E1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F74AA722-DB1C-4CDB-B0FB-4016651C6E1C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F74AA722-DB1C-4CDB-B0FB-4016651C6E1C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F74AA722-DB1C-4CDB-B0FB-4016651C6E1C}.Release|Any CPU.Build.0 = Release|Any CPU + {15EA50ED-95FB-4195-87F6-F1D48DA8B5F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {15EA50ED-95FB-4195-87F6-F1D48DA8B5F1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15EA50ED-95FB-4195-87F6-F1D48DA8B5F1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {15EA50ED-95FB-4195-87F6-F1D48DA8B5F1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {890CF504-3814-443B-9EE6-E8BCACF68203} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {66EB60F2-523D-47C8-95EA-C7E10759E239} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {79B65C63-EB25-4DEF-AC59-52836AAA0F24} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {87D85880-5526-4FEF-93E9-3DCFBA0A1A4C} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {C85992D0-7713-4EA1-A4F3-3D3598FFA9E0} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {6F8F8283-A334-47D4-A15B-94100A2C29E3} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {0E81C28B-325A-4A2F-B21F-F66DADA451EC} = {79430A25-1F0B-49B9-9A68-720A422E91AB} + {6AA283E8-D2B2-4743-B96D-96A5DAA8F2B5} = {4BE42477-1420-4A81-BDFA-4C34DA898F05} + {F7BB8FCE-FAE8-4C35-939F-070DF91806B5} = {79430A25-1F0B-49B9-9A68-720A422E91AB} + {3E13AE4D-D805-4D2E-B6B5-88DC174F6A2C} = {79430A25-1F0B-49B9-9A68-720A422E91AB} + {F74AA722-DB1C-4CDB-B0FB-4016651C6E1C} = {79430A25-1F0B-49B9-9A68-720A422E91AB} + {15EA50ED-95FB-4195-87F6-F1D48DA8B5F1} = {4BE42477-1420-4A81-BDFA-4C34DA898F05} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {51252E6F-E712-436A-B391-1C5243F65ABE} + EndGlobalSection +EndGlobal diff --git a/CSharpBible/Games/Asteroids/App.xaml b/CSharpBible/Games/Asteroids/App.xaml new file mode 100644 index 000000000..7f4d76d39 --- /dev/null +++ b/CSharpBible/Games/Asteroids/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/CSharpBible/Games/Asteroids/App.xaml.cs b/CSharpBible/Games/Asteroids/App.xaml.cs new file mode 100644 index 000000000..e4e74eb85 --- /dev/null +++ b/CSharpBible/Games/Asteroids/App.xaml.cs @@ -0,0 +1,14 @@ +using System.Configuration; +using System.Data; +using System.Windows; + +namespace Asteroids +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } + +} diff --git a/CSharpBible/Games/Asteroids/AssemblyInfo.cs b/CSharpBible/Games/Asteroids/AssemblyInfo.cs new file mode 100644 index 000000000..b0ec82757 --- /dev/null +++ b/CSharpBible/Games/Asteroids/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/CSharpBible/Games/Asteroids/Asteroids_net.csproj b/CSharpBible/Games/Asteroids/Asteroids_net.csproj new file mode 100644 index 000000000..b549cb479 --- /dev/null +++ b/CSharpBible/Games/Asteroids/Asteroids_net.csproj @@ -0,0 +1,27 @@ + + + + WinExe + net6.0-windows;net7.0-windows;net8.0-windows + true + + + + + + + + + + + + + + + + + + + + + diff --git a/CSharpBible/Games/Asteroids/Data/.info b/CSharpBible/Games/Asteroids/Data/.info new file mode 100644 index 000000000..5f282702b --- /dev/null +++ b/CSharpBible/Games/Asteroids/Data/.info @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/CSharpBible/Games/Asteroids/MainWindow.xaml b/CSharpBible/Games/Asteroids/MainWindow.xaml new file mode 100644 index 000000000..740ff87ea --- /dev/null +++ b/CSharpBible/Games/Asteroids/MainWindow.xaml @@ -0,0 +1,12 @@ + + + + + diff --git a/CSharpBible/Games/Asteroids/MainWindow.xaml.cs b/CSharpBible/Games/Asteroids/MainWindow.xaml.cs new file mode 100644 index 000000000..035460f45 --- /dev/null +++ b/CSharpBible/Games/Asteroids/MainWindow.xaml.cs @@ -0,0 +1,24 @@ +using System.Text; +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 Asteroids +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/CSharpBible/MVVM_Tutorial/ListBinding_net/Model/.info b/CSharpBible/Games/Asteroids/Model/.info similarity index 100% rename from CSharpBible/MVVM_Tutorial/ListBinding_net/Model/.info rename to CSharpBible/Games/Asteroids/Model/.info diff --git a/CSharpBible/Games/Asteroids/ViewModels/AsteroidsViewModel.cs b/CSharpBible/Games/Asteroids/ViewModels/AsteroidsViewModel.cs new file mode 100644 index 000000000..2e30179da --- /dev/null +++ b/CSharpBible/Games/Asteroids/ViewModels/AsteroidsViewModel.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows; +using Asteroids.Model; +using Asteroids.Model.Interfaces; +using CommunityToolkit.Mvvm.ComponentModel; +using MVVM.ViewModel; + +namespace Asteroids.ViewModels; + +public partial class AsteroidsViewModel : BaseViewModelCT +{ + [ObservableProperty] + private List screenObjs = new(); + private System.Timers.Timer? timer; + + bool IsInDesignMode => true;//App.Current==null; + + public List Bgr { get; } = new(); + + public AsteroidsViewModel() + { + if (IsInDesignMode) + { + System.Diagnostics.Debug.WriteLine("Design mode"); + ScreenObjs = new(); + var rnd = new Random(); + for (int i = 0; i < 200; i++) + Bgr.Add(new BgrStar(new Point(rnd.NextDouble() * 1600, rnd.NextDouble() * 900))); + ScreenObjs.AddRange(Bgr); + for (int i = 2; i < 8; i++) + { + for (int j = 0; j < 16; j++) + { + ScreenObjs.Add(new ScreenChar((char)(i * 16 + j), 70, new(10 + j * 50, 1000 - i * 100))); + } + } + timer = new System.Timers.Timer(80); + timer.Elapsed += Timer_Elapsed; + timer.Start(); + // Code runs in Blend --> create design time data. + } + else + { + } + } + + private void Timer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e) + { + for (int i = 0; i < 200; i++) + Bgr[i].Points[0].X = (Bgr[i].Points[0].X+1599) % 1600; + ScreenObjs.Clear(); + ScreenObjs.AddRange(Bgr); + for (int i = 2; i < 8; i++) + { + for (int j = 0; j < 16; j++) + { + ScreenObjs.Add(new ScreenChar((char)(i * 16 + j), 70, new(10 + j * 50, 1000 - i * 100))); + } + } + OnPropertyChanged(nameof(ScreenObjs)); + } +} diff --git a/CSharpBible/Games/Asteroids/Views/AsteroidsView.xaml b/CSharpBible/Games/Asteroids/Views/AsteroidsView.xaml new file mode 100644 index 000000000..1afc81639 --- /dev/null +++ b/CSharpBible/Games/Asteroids/Views/AsteroidsView.xaml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + diff --git a/CSharpBible/Games/Asteroids/Views/AsteroidsView.xaml.cs b/CSharpBible/Games/Asteroids/Views/AsteroidsView.xaml.cs new file mode 100644 index 000000000..24b251777 --- /dev/null +++ b/CSharpBible/Games/Asteroids/Views/AsteroidsView.xaml.cs @@ -0,0 +1,28 @@ +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 Asteroids.Views +{ + /// + /// Interaktionslogik für AsteroidsView.xaml + /// + public partial class AsteroidsView : Page + { + public AsteroidsView() + { + InitializeComponent(); + } + } +} diff --git a/CSharpBible/Games/Asteroids/Views/Converter/DrawScreenObjects.cs b/CSharpBible/Games/Asteroids/Views/Converter/DrawScreenObjects.cs new file mode 100644 index 000000000..9d7d3fa7e --- /dev/null +++ b/CSharpBible/Games/Asteroids/Views/Converter/DrawScreenObjects.cs @@ -0,0 +1,149 @@ +// *********************************************************************** +// Assembly : MVVM_Converter_Grid2 +// Author : Mir +// Created : 08-20-2022 +// +// Last Modified By : Mir +// Last Modified On : 08-20-2022 +// *********************************************************************** +// +// (c) by Joe Care 2022 +// +// +// *********************************************************************** +using System; +using System.Globalization; +using System.Windows.Media; +using System.Windows.Data; +using System.Windows.Shapes; +using System.Collections.ObjectModel; +using System.Windows; +using Asteroids.Model.Interfaces; +using System.Collections.Generic; +using System.Linq; + +namespace Asteroids.Views.Converter; + +/// +/// Class DrawScreenObjects. +/// Implements the +/// +/// +public class DrawScreenObjects : IValueConverter +{ + + /// + /// Gets or sets the size of the window [Pixel]. + /// + /// [Pixel] The size of the window. + public System.Windows.Size WindowSize { get; set; } = new System.Windows.Size(1600, 900); + public Rect Port { get; set; } = new System.Windows.Rect(0,0,1600, 900); + + /// + /// Converts koordinates from Real to Visual[Pixel]. + /// + /// The value. + /// The vis minimum. + /// The vis maximum. + /// The r minimum. + /// The r maximum. + /// System.Double + private double Real2Vis(double value, double visMin, double visMax, double rMin, double rMax) + => visMin + (value - rMin) * (visMax - visMin) / (rMax - rMin); + + /// + /// Converts koordinates from Real to Visual[Pixel]. + /// + /// The value. + /// The port. + /// System.Windows.Point + private System.Windows.Point real2VisP(Point value, Rect port) => + new System.Windows.Point(Real2Vis(value.X, 0, WindowSize.Width, port.Left, port.Right), + Real2Vis(value.Y, WindowSize.Height, 0d, port.Top, port.Bottom) ); + + /// + /// standard converter-function + /// + public Func Real2VisP; + + /// + /// Initializes a new instance of the class. + /// + public DrawScreenObjects() + { + Real2VisP = real2VisP; + } + + /// + /// Converts a value. + /// + /// The value produced by the binding source. + /// The type of the binding target property. + /// The converter parameter to use. + /// The culture to use in the converter. + /// A converted value. If the method returns , the valid null value is used. + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + switch (value) + { + case IEnumerable ds: + ObservableCollection _fwe = new ObservableCollection(); + foreach(var _itm in ds.ToList()) + { + if (_itm.xOutline) + { + _fwe.Add(CreatePolygon(_itm, Colors.Black, 3)); + } + + if (_itm.Points.Length>1) + _fwe.Add(CreatePolygon(_itm, _itm.color, 1)); + else if (_itm.Points.Length == 1) + _fwe.Add(CreateDot(_itm, _itm.color, 1)); + + } + return _fwe; + default: return new ObservableCollection(); + } + + FrameworkElement CreatePolygon(IScreenObj _itm, Color _col, double _wdt) + { + return new Polyline() + { + Points = new PointCollection(_itm.Points.Select(p => Real2VisP(p, this.Port)).ToArray()), + Stroke = new SolidColorBrush(_col), + StrokeLineJoin = PenLineJoin.Round, + StrokeThickness = _wdt, + }; + } + + FrameworkElement CreateDot(IScreenObj _itm, Color _col, double _wdt) + { + return new Polyline() + { + Points = new PointCollection() + { + Real2VisP(_itm.Points[0], this.Port), + Real2VisP(_itm.Points[0], this.Port) + new Vector(1,0), + }, + Stroke = new SolidColorBrush(_col), + StrokeLineJoin = PenLineJoin.Round, + StrokeThickness = _wdt, + }; + } + } + + + /// + /// Converts a value. + /// + /// The value that is produced by the binding target. + /// The type to convert to. + /// The converter parameter to use. + /// The culture to use in the converter. + /// A converted value. If the method returns , the valid null value is used. + /// + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } +} diff --git a/CSharpBible/Games/Asteroids_Base/Asteroids_Base.csproj b/CSharpBible/Games/Asteroids_Base/Asteroids_Base.csproj new file mode 100644 index 000000000..0e590c436 --- /dev/null +++ b/CSharpBible/Games/Asteroids_Base/Asteroids_Base.csproj @@ -0,0 +1,14 @@ + + + + net6.0-windows;net7.0-windows;net8.0-windows + true + + + + + + + + + diff --git a/CSharpBible/Games/Asteroids_Base/Model/BgrStar.cs b/CSharpBible/Games/Asteroids_Base/Model/BgrStar.cs new file mode 100644 index 000000000..d6619fc6d --- /dev/null +++ b/CSharpBible/Games/Asteroids_Base/Model/BgrStar.cs @@ -0,0 +1,23 @@ +using Asteroids.Model.Interfaces; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media; + +namespace Asteroids.Model; + +public class BgrStar(Point pos,Color? col = null) : IScreenObj +{ + public float fSize { get; set; } = 1; + + public Color color { get; set; } = col ?? Colors.Gray; + + public bool xWrap => false; + + public bool xOutline => true; + + public Point[] Points { get; } = [pos]; +} diff --git a/CSharpBible/Games/Asteroids_Base/Model/CVertex.cs b/CSharpBible/Games/Asteroids_Base/Model/CVertex.cs new file mode 100644 index 000000000..d2f802d8c --- /dev/null +++ b/CSharpBible/Games/Asteroids_Base/Model/CVertex.cs @@ -0,0 +1,9 @@ +using Asteroids.Model.Interfaces; + +namespace Asteroids.Model; + +public class CVertex(float Angle,float Length) : IVertex +{ + public float Angle { get; } = Angle; + public float Length { get; } = Length; +} \ No newline at end of file diff --git a/CSharpBible/Games/Asteroids_Base/Model/Char2Points.cs b/CSharpBible/Games/Asteroids_Base/Model/Char2Points.cs new file mode 100644 index 000000000..3c2b1057f --- /dev/null +++ b/CSharpBible/Games/Asteroids_Base/Model/Char2Points.cs @@ -0,0 +1,116 @@ +using System.Collections.Generic; +using System.Windows; + +namespace Asteroids.Model; + +static class Char2Points +{ + const double Yf = 1.0; + const double Yt = 0.85; + const double Yh = 0.4; + const double Yq = 0.15; + const double Yn = 0.0; + + public static Dictionary AFont { get; set; } = new() + { + {' ' , []}, + {'!' , [ new(0.5, Yn), new(0.625, Yq), new(0.375, Yh), new(0.375, Yt), new(0.5, Yf), new(0.625, Yt), new(0.625, Yh), new(0.375, Yq),new(0.5, Yn) ]}, + {'"' , [ new(0.25, Yf), new(0.25, Yt), new(0.75, Yf), new(0.75, 0.75) ]}, + {'#' , [ new(0.25, Yf), new(0.25, Yn), new(0.25, Yq), new(1, Yq), new(0, Yq), new(0.75, Yq), new(0.75, Yn), new(0.75, Yf),new(0.75, Yt), new(0, Yt), new(1, Yt) ]}, + {'$' , [ new(0, Yq), new(0.75, Yq), new(1, Yh), new(0, Yh), new(0.25, Yt), new(1, Yt), new(0.5, Yt), new(0.5, Yf), new(0.5, Yn) ]}, + {'%' , [ new(0.25, Yf), new(0.25, Yt), new(0, Yt), new(0, Yf), new(Yt, Yt), new(1, Yf), new(0, Yn), new(Yq, Yq), new(1, Yn), new(1, Yq), new(0.75, Yq), new(0.75, Yn) ]}, + {'&' , [ new(1, Yn), new(0.25, Yt), new(0.5, Yf), new(0.75, Yt), new(0.25, Yq), new(0.5, Yn), new(1, Yh) ]}, + {'\'' , [ new(0.25, Yf), new(0.25, 0.75) ]}, + {'(' , [ new(0.5, Yf), new(0.25, Yt), new(0.25, Yq), new(0.5, Yn) ]}, + {')' , [ new(0.5, Yf), new(0.75, Yt), new(0.75, Yq), new(0.5, Yn) ]}, + {'*' , [ new(0.25, 0.75), new(0.75, 0.75), new(0.5, Yf), new(0.5, Yn), new(0.25, Yq), new(0.75, Yq) ]}, + {'+' , [ new(0.25, Yh), new(0.75, Yh), new(0.5, Yh), new(0.5, Yt), new(0.5, Yq) ]}, + {',' , [ new(0.625, Yq), new(0.375, Yn),new(0.5, Yq),new(0.625, Yq) ]}, + {'-' , [ new(0.25, Yh), new(0.75, Yh) ]}, + {'.' , [ new(0.375, Yn), new(0.375, Yq), new(0.625, Yq), new(0.625, Yn),new(0.375, Yn), ]}, + {'/' , [ new(0, Yf), new(1, Yn) ]}, + + {'0' , [new(1, Yq), new(0.5, Yn), new(0, Yq), new(0, Yt), new(0.5, Yf), new(1,Yt),new(1,Yq),new(0,Yt)]}, + {'1' , [new(0, Yh), new(0.5, Yf), new(0.5, Yn), new(0, Yn),new(1, Yn)]}, + {'2' , [ new(0, Yt), new(0.5, Yf), new(1, Yt), new(1, Yh), new(0.5, Yq), new(0, Yn), new(1, Yn) ]}, + {'3' , [new(0, Yq), new(0.5, Yn), new(1, Yq), new(1, Yh), new(0.5, Yh), new(1, Yf), new(0, Yf)]}, + {'4' , [new(0.25, Yf), new(0, Yh), new(1, Yh), new(1, Yf), new(1, Yn)]}, + {'5' , [new(1, Yf), new(0, Yf), new(0, Yh), new(1, Yh), new(1, Yq), new(0.5, Yn), new(0, Yq)]}, + {'6' , [new(1, Yf), new(0.5, Yf), new(0, Yt), new(0, Yq), new(0.5, Yn), new(1, Yq), new(1, Yh), new(0, Yh)]}, + {'7' , [new(0, Yf), new(1, Yf), new(0, Yn), new(Yh, Yh),new(.25, Yh),new(.75, Yh)]}, + {'8' , [new(0.75, Yh), new(1, Yq), new(0.5, Yn), new(0, Yq), new(0.25, Yh), new(0.75, Yh), new(1, Yt), new(0.5, Yf), new(0, Yt),new(0.25, Yh)]}, + {'9' , [new(0, Yq), new(.5, Yn), new(1, Yq), new(1, Yt), new(0.5, Yf), new(0, Yt), new(0.25, Yh), new(0.75, Yh), new(1, Yt)]}, + {':', [new(0.625, Yh), new(0.625, Yh+Yq), new(0.375, Yh+Yq), new (0.375, Yh), new (0.625, Yh), new(0.375, Yq), new(0.625, Yq), new(0.625, Yn),new(0.375, Yn),new(0.375, Yq),]}, + {';', [new(0.625, Yh), new(0.625, Yh + Yq), new(0.375, Yh + Yq), new(0.375, Yh), new(0.625, Yh), new(0.375, Yq), new(0.25, Yn),new(0.625, Yq),new(0.375, Yq),]}, + {'<', [new (1, Yf), new (0.5, Yh), new (1, Yn)]}, + {'=', [new (1, Yh+.02), new (0, Yh+.02),new (0, Yh), new (1, Yh),new (0, Yq + .02), new (1, Yq + .02),new (1, Yq), new (0, Yq)]}, + {'>', [new (0, Yf), new (0.5, Yh), new (0, Yn)]}, + {'?', [new (0, Yt), new (0.25, Yf), new(0.75, Yf), new(1, Yt), new (0.5, Yh), new (0.5, Yq),new (0.375, Yn),new (0.625, Yn),new (0.5, Yq)]}, + {'@', [new(0.625, Yq), new(0.375, Yq), new(0.25, (Yh+Yq)*0.5), new(0.375, Yh), new(.75, Yh), new(.75, Yq), new(1, Yq), new(1, Yt), new(0.75, Yf), new(0.25, Yf), new(0, Yt), new(0, Yq), new(0.25, Yn), new(1, Yn)]}, + {'A', [new(0, Yn), new(0, Yt), new(0.5, Yf), new(1, Yt), new(1, Yn), new(1, Yh), new (0.25, Yh)]}, + {'B' , [ new(0, Yn), new(0, Yf), new(0.75, Yf), new(1, Yt), new(0.75, Yh), new(0.25, Yh), new(0.75, Yh), new(1, Yq), new(0.75, Yn), new(0, Yn) ] }, + {'C' , [ new(1, Yq), new(0.75, Yn), new(0.25, Yn), new(0, Yq), new(0, Yt), new(0.25, Yf), new(0.75, Yf), new(1, Yt) ] }, + {'D' , [ new(0, Yn), new(0, Yf), new(0.75, Yf), new(1, Yt), new(1, Yq), new(0.75, Yn), new(0, Yn) ] }, + {'E' , [ new(1, Yn), new(0, Yn), new(0, Yh), new(0.5, Yh), new(0, Yh), new(0, Yf), new(1, Yf) ] }, + {'F' , [ new(1, Yf), new(0, Yf), new(0, Yh), new(0.5, Yh), new(0, Yh), new(0, Yn)] }, + {'G' , [ new(1, Yt), new(0.75, Yf), new(0.25, Yf), new(0, Yt), new(0, Yq), new(0.25, Yn), new(1,Yn), new(1, Yh), new(0.5, Yh)] }, + {'H' , [ new(0, Yn), new(0, Yf), new(0, Yh), new(1, Yh), new(1, Yn), new(1, Yf) ]}, + {'I' , [ new(0, Yn), new(1, Yn), new(0.5, Yn), new(0.5, Yf), new(0, Yf), new(1, Yf) ]}, + {'J' , [ new(0, Yq), new(0.25, Yn), new(0.75, Yn), new(1, Yq), new(1, Yf), new(0, Yf) ]}, + {'K' , [ new(0, Yn), new(0, Yf), new(0, Yq), new(0.5, Yh), new(1, Yf), new(0.5, Yh), new(1, Yn) ]}, + {'L' , [ new(0, Yf), new(0, Yn), new(1, Yn) ]}, + {'M' , [ new(0, Yn), new(0, Yf), new(0.5, Yh), new(1, Yf), new(1, Yn) ]}, + {'N' , [ new(0, Yn), new(0, Yf), new(1, Yn), new(1, Yf) ]}, + {'O' , [ new(0, Yq), new(0, Yt), new(0.25, Yf), new(0.75, Yf), new(1, Yt), new(1, Yq), new(0.75, Yn), new(0.25, Yn), new(0, Yq) ]}, + {'P' , [ new(0, Yn), new(0, Yf), new(0.75, Yf), new(1, Yt), new(0.75, Yh), new(0.25, Yh) ]}, + {'Q' , [ new(1, Yq), new(1, Yt), new(0.75, Yf), new(0.25, Yf), new(0, Yt), new(0, Yq), new(0.25, Yn), new(1, Yn), new(0.5,Yh)]}, + {'R' , [ new(0, Yn), new(0, Yf), new(0.75, Yf), new(1, Yt), new(0.75, Yh), new(0.25, Yh), new(0.5, Yh), new(1, Yn) ]}, + {'S' , [ new(0, Yq), new(0.25, Yn), new(0.75, Yn), new(1, Yq), new(0.75, Yh), new(0.25, Yh), new(0, Yt), new(0.25, Yf), new(0.75, Yf), new(1, Yt) ]}, + {'T' , [ new(0, Yf), new(1, Yf), new(0.5, Yf), new(0.5, Yn) ]}, + {'U' , [ new(0, Yf), new(0, Yq), new(0.25, Yn), new(0.75, Yn), new(1, Yq), new(1, Yf) ]}, + {'V' , [ new(0, Yf), new(0.5, Yn), new(1, Yf) ]}, + {'W' , [ new(0, Yf), new(0.25, Yn), new(0.5, Yf), new(0.75, Yn), new(1, Yf) ]}, + {'X' , [ new(0, Yn), new(0.5, Yh), new(1, Yf), new(0.5, Yh), new(1, Yn), new(0.5, Yh), new(0, Yf) ]}, + {'Y' , [ new(0, Yf), new(0.5, Yh), new(1, Yf), new(0.5, Yh), new(0.5, Yn) ]}, + {'Z' , [ new(0, Yf), new(1, Yf), new(0, Yn), new(1, Yn) ]}, + {'[' , [ new(1, Yf), new(0.25, Yf), new(.25, Yn), new(1, Yn) ]}, + {'\\' , [ new(0, Yf), new(1, Yn) ]}, + {']' , [ new(0, Yf), new(0.75, Yf), new(0.75, Yn), new(0, Yn)]}, + {'^' , [ new(0.25, Yt), new(0.5, Yf), new(.75, Yt) ]}, + {'_' , [ new(0, -Yq), new(1, -Yq) ]}, + {'`' , [ new(0.5, Yf), new(0.75, Yt), new(0.75, Yf), new(0.5, Yf) ]}, + {'a' , [ new(0.75, Yn), new(0.25, Yn), new(0, Yq), new(0.25, Yh), new(1, Yh), new(1, Yn) ]}, + {'b' , [ new(0, Yf), new(0, Yn), new(0.75, Yn), new(1, Yq), new(0.75, Yh), new(0.25, Yh) ]}, + {'c' , [ new(1, Yh), new(0.25, Yh), new(0, Yq), new(0.25, Yn), new(1, Yn) ]}, + {'d' , [ new(1, Yf), new(1, Yn), new(0.25, Yn), new(0, Yq), new(0.25, Yh), new(.75, Yh) ]}, + {'e' , [ new(0.25, Yq), new(1, Yq), new(0.75, Yh), new(0.25, Yh), new(0, Yq), new(0.25, Yn), new(1, Yn) ]}, + {'f' , [ new(1, Yf), new(0.75, Yf), new(0.5, Yt), new(0.5, Yn), new(0.5, Yh), new(0, Yh), new(1, Yh) ]}, + {'g' , [ new(0.75, Yn), new(0.25, Yn), new(0, Yq), new(0.25, Yh), new(1, Yh), new(1, Yn), new(0.75, -Yq), new(0, -Yq) ]}, + {'h' , [ new(0, Yf), new(0, Yn), new(0, Yh), new(0.75, Yh), new(1, Yq), new(1, Yn) ]}, + {'i' , [ new(0.5, Yt), new(0.375, Yf), new(0.625, Yf), new(0.5, Yh), new(0, Yh), new(0.5, Yh), new(0.5, Yn), new(0, Yn), new(1, Yn) ]}, + {'j' , [ new(0.5, Yt), new(0.375, Yf), new(0.625, Yf), new(0.5, Yh), new(0, Yh), new(1, Yh), new(1, Yn), new(0.75, -Yq), new(0, -Yq) ]}, + {'k' , [ new(0, Yf), new(0, Yn), new(0.5, Yq), new(1, Yh), new(0.5, Yq), new(1, Yn) ]}, + {'l' , [ new(0, Yf), new(0.5, Yf), new(0.5, Yn), new(0, Yn), new(1, Yn) ]}, + {'m' , [ new(0, Yn), new(0, Yh), new(.25, Yh), new(0.5, Yq), new(0.5, Yn), new(0.5, Yh), new(.75, Yh), new(1, Yq), new(1, Yn) ]}, + {'n' , [ new(0, Yn), new(0, Yh), new(.75, Yh), new(1, Yq), new(1, Yn) ]}, + {'o' , [ new(0, Yq), new(0.25, Yn), new(0.75, Yn), new(1, Yq), new(.75, Yh), new(.25, Yh), new(0, Yq), new(0.25, Yn), new(0, Yq) ]}, + {'p' , [ new(0.25, Yn), new(0.75, Yn), new(1, Yq), new(0.75, Yh), new(0, Yh), new(0, -Yq)]}, + {'q' , [ new(0.75, Yn), new(0.25, Yn), new(0, Yq), new(0.25, Yh), new(1, Yh), new(1, -Yq)]}, + {'r' , [ new(0, Yh), new(0, Yn), new(0, Yq), new(1, Yh)]}, + {'s' , [ new(0, Yn), new(0.75, Yn), new(1, Yq), new(0, Yq), new(0.25, Yh),new(1, Yh) ]}, + {'t' , [ new(1, Yn), new(0.75, Yn), new(0.5, Yq), new(0.5, Yf), new(0.5, Yh), new(0, Yh), new(1, Yh) ]}, + {'u' , [ new(0, Yh), new(0, Yq), new(0.25, Yn), new(1, Yn), new(1, Yh) ]}, + {'v' , [ new(0, Yh), new(0.5, Yn), new(1, Yh) ]}, + {'w' , [ new(0, Yh), new(0.25, Yn), new(0.5, Yq), new(0.75, Yn), new(1, Yh) ]}, + {'x' , [ new(0, Yn), new(1, Yh), new(0.5, Yq), new(1, Yn), new(0, Yh) ]}, + {'y' , [ new(0, Yh), new(0.5, Yn), new(1, Yh), new(0.5, Yn), new(0, -Yq) ]}, + {'z' , [ new(0, Yh), new(1, Yh), new(0, Yn), new(1, Yn) ]}, + {'{' , [ new(0.75, Yf), new(0.5,0.5*(Yt+Yf)), new(0.5, 0.5 * (Yh + Yt)), new(0.25, Yh), new(0.5, 0.5*(Yq+Yh)), new(0.5, 0.5 * (Yq + Yn)), new(0.75, Yn) ]}, + {'|' , [ new(0.5, Yf), new(0.5, Yn), new(0.5, Yf), new(0.5, Yn) ]}, + {'}' , [ new(0.25, Yf), new(0.5,0.5*(Yt+Yf)), new(0.5, 0.5 * (Yh + Yt)), new(0.75, Yh), new(0.5, 0.5*(Yq+Yh)), new(0.5, 0.5 * (Yq + Yn)), new(0.25, Yn) ]}, + {'~' , [ new(0.25, Yt), new(0.375, Yf), new(0.625, Yt), new(0.75, Yf) ]} + + }; + + public static Point[] GetPoints(char ch) => AFont.TryGetValue(ch, out var pts) ? pts : []; +} \ No newline at end of file diff --git a/CSharpBible/Games/Asteroids_Base/Model/Game.cs b/CSharpBible/Games/Asteroids_Base/Model/Game.cs new file mode 100644 index 000000000..765141326 --- /dev/null +++ b/CSharpBible/Games/Asteroids_Base/Model/Game.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using Asteroids.Model.Interfaces; + +namespace Asteroids.Model; + +[DebuggerDisplay($"{{{nameof(GetDebuggerDisplay)}(),nq}}")] +public class Game: IGame +{ + public Game() + { + } + + public Point ScreenFactor => throw new NotImplementedException(); + + public Rect Screen => throw new NotImplementedException(); + + private string GetDebuggerDisplay() + { + return ToString()??""; + } +} diff --git a/CSharpBible/Games/Asteroids_Base/Model/Interfaces/IGame.cs b/CSharpBible/Games/Asteroids_Base/Model/Interfaces/IGame.cs new file mode 100644 index 000000000..a8afafe30 --- /dev/null +++ b/CSharpBible/Games/Asteroids_Base/Model/Interfaces/IGame.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; + +namespace Asteroids.Model.Interfaces; + +public interface IGame +{ + Point ScreenFactor { get; } + Rect Screen { get; } +} diff --git a/CSharpBible/Games/Asteroids_Base/Model/Interfaces/IScreenObj.cs b/CSharpBible/Games/Asteroids_Base/Model/Interfaces/IScreenObj.cs new file mode 100644 index 000000000..b97af828f --- /dev/null +++ b/CSharpBible/Games/Asteroids_Base/Model/Interfaces/IScreenObj.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media; + +namespace Asteroids.Model.Interfaces; + +public interface IScreenObj +{ + float fSize { get; } + Color color { get; } + bool xWrap { get; } + bool xOutline { get; } + Point[] Points { get; } +} diff --git a/CSharpBible/Games/Asteroids_Base/Model/Interfaces/ISpaceObj.cs b/CSharpBible/Games/Asteroids_Base/Model/Interfaces/ISpaceObj.cs new file mode 100644 index 000000000..85046a7e6 --- /dev/null +++ b/CSharpBible/Games/Asteroids_Base/Model/Interfaces/ISpaceObj.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using System.Windows; + +namespace Asteroids.Model.Interfaces; + +public interface ISpaceObj : IScreenObj +{ + bool ShowPos { get; set; } + Point Position { get; } + Point Speed { get; } + float Turned { get; } + float TurnSpeed { get; } + IVertex[] Edges { get; } + Point[] DataPoints { get; } + void ProcessPoints(); + void Draw(); + void Update(); +} +// Path: Asteroids/Model/Interfaces/IScreenObj.cs + diff --git a/CSharpBible/Games/Asteroids_Base/Model/Interfaces/IVertex.cs b/CSharpBible/Games/Asteroids_Base/Model/Interfaces/IVertex.cs new file mode 100644 index 000000000..466777e5f --- /dev/null +++ b/CSharpBible/Games/Asteroids_Base/Model/Interfaces/IVertex.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Asteroids.Model.Interfaces; + +public interface IVertex +{ + float Angle { get; } + float Length { get; } +} diff --git a/CSharpBible/Games/Asteroids_Base/Model/Player.cs b/CSharpBible/Games/Asteroids_Base/Model/Player.cs new file mode 100644 index 000000000..bed9c536b --- /dev/null +++ b/CSharpBible/Games/Asteroids_Base/Model/Player.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Asteroids.Model +{ + internal class Player + { + } +} diff --git a/CSharpBible/Games/Asteroids_Base/Model/ScreenChar.cs b/CSharpBible/Games/Asteroids_Base/Model/ScreenChar.cs new file mode 100644 index 000000000..36b5582fa --- /dev/null +++ b/CSharpBible/Games/Asteroids_Base/Model/ScreenChar.cs @@ -0,0 +1,23 @@ +using Asteroids.Model.Interfaces; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media; + +namespace Asteroids.Model; + +public class ScreenChar(char ch, float size, Point pos,Color? col = null) : IScreenObj +{ + public float fSize { get; set; } = size; + + public Color color { get; set; } = col ?? Colors.White; + + public bool xWrap => false; + + public bool xOutline => true; + + public Point[] Points { get; } = Char2Points.GetPoints(ch).Select((p)=> new Point(p.X*size*0.6+pos.X,p.Y*size+pos.Y)).ToArray(); +} diff --git a/CSharpBible/Games/Asteroids_Base/Model/SpaceObj.cs b/CSharpBible/Games/Asteroids_Base/Model/SpaceObj.cs new file mode 100644 index 000000000..21ab936f2 --- /dev/null +++ b/CSharpBible/Games/Asteroids_Base/Model/SpaceObj.cs @@ -0,0 +1,77 @@ +using Asteroids.Model.Interfaces; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media; + +namespace Asteroids.Model; + +public class SpaceObj : ISpaceObj +{ + private IGame _Game; + public bool ShowPos { get; set; } + + public Point Position { get; private set; } + + public Point Speed { get; protected set; } + + public float Turned { get; protected set; } + + public float TurnSpeed { get; protected set; } + + public IVertex[] Edges { get; private set; } + + public Point[] DataPoints { get; private set; } + + public float fSize { get; private set; } + + public Color color { get; private set; } + + public Point[] Points { get; private set; } + + public bool xWrap { get; set; } + + public bool xOutline { get; protected set; } + + public void Draw() + { + throw new NotImplementedException(); + } + + public SpaceObj(IGame game, Point position, Point speed, float turned, float turnSpeed, + IVertex[] edges, float fSize, Color color) + { + _Game = game; + Position = position; + Speed = speed; + Turned = turned; + TurnSpeed = turnSpeed; + Edges = edges; + this.fSize = fSize; + this.color = color; + ProcessPoints(); + } + + public void ProcessPoints() + { + var tmpx = fSize * _Game.ScreenFactor.X; + var tmpy = fSize * _Game.ScreenFactor.Y; + var tp = new List(); + foreach(var edge in Edges) + { + var tmp = (edge.Angle + Turned); + tp.Add(new Point((Position.X * _Game.Screen.Width) + (Math.Sin(tmp) * edge.Length * tmpx), + (Position.X * _Game.Screen.Height) - (Math.Cos(tmp) * edge.Length * tmpy))); + } + Points = tp.ToArray(); + } + + public void Update() + { + throw new NotImplementedException(); + } +} diff --git a/CSharpBible/Games/Asteroids_Base/Model/Types/PointHelper.cs b/CSharpBible/Games/Asteroids_Base/Model/Types/PointHelper.cs new file mode 100644 index 000000000..342f45681 --- /dev/null +++ b/CSharpBible/Games/Asteroids_Base/Model/Types/PointHelper.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; + +namespace Asteroids.Model.Types; + +public static class PointHelper +{ + public static double dLength(this Point p) + =>Math.Sqrt(Math.Pow(p.X, 2) + Math.Pow(p.Y, 2)); + + public static double dAngle(this Point p) + => Math.Atan2(p.Y, p.X); + public static double Distance(Point p1, Point p2) + { + return Math.Sqrt(Math.Pow(p2.X - p1.X, 2) + Math.Pow(p2.Y - p1.Y, 2)); + } +} diff --git a/CSharpBible/Games/CreateCards/CreateCards.csproj b/CSharpBible/Games/CreateCards/CreateCards.csproj new file mode 100644 index 000000000..7e80e6ee4 --- /dev/null +++ b/CSharpBible/Games/CreateCards/CreateCards.csproj @@ -0,0 +1,14 @@ + + + + Exe + net6.0;net7.0;net8.0 + + + + + + + + + diff --git a/CSharpBible/Games/CreateCards/Model/Card.cs b/CSharpBible/Games/CreateCards/Model/Card.cs new file mode 100644 index 000000000..47f853d43 --- /dev/null +++ b/CSharpBible/Games/CreateCards/Model/Card.cs @@ -0,0 +1,125 @@ +using System.Collections.Generic; +using System.Drawing.Drawing2D; +using System.Drawing; + +namespace CreateCards.Model +{ + public enum CardValues + { + Ace, _2, _3, _4, _5, _6, _7, _8, _9, _10, Jack, Queen, King + } + + public class Card + { + public static Dictionary DrawDef = new() { + { CardValues.Ace ,new("A",0.8){ + PntSuits=new[]{new PointF(0.5f,0.5f) } } }, + { CardValues._2 ,new("2"){ + PntSuits=new[]{new PointF(0.5f,0.3f), new PointF(0.5f, 0.7f) } } }, + { CardValues._3 ,new("3"){ + PntSuits=new[]{new PointF(0.7f,0.3f), new PointF(0.3f, 0.7f), new PointF(0.5f, 0.5f) } } }, + { CardValues._4 ,new("4"){ + PntSuits=new[]{ new PointF(0.3f, 0.3f), new PointF(0.7f, 0.7f), new PointF(0.3f, 0.7f), new PointF(0.7f, 0.3f) } } }, + { CardValues._5 ,new("5"){ + PntSuits=new[]{ new PointF(0.3f, 0.3f), new PointF(0.7f, 0.7f), new PointF(0.3f, 0.7f), new PointF(0.7f, 0.3f), + new PointF(0.5f, 0.5f) } } }, + { CardValues._6 ,new("6"){ + PntSuits=new[]{ new PointF(0.3f, 0.3f), new PointF(0.7f, 0.7f), new PointF(0.3f, 0.7f), new PointF(0.7f, 0.3f), + new PointF(0.3f, 0.5f), new PointF(0.7f, 0.5f) } } }, + { CardValues._7 ,new("7"){ + PntSuits=new[]{ new PointF(0.3f, 0.25f), new PointF(0.7f, 0.75f), new PointF(0.3f, 0.75f), new PointF(0.7f, 0.25f), + new PointF(0.3f, 0.5f), new PointF(0.7f, 0.5f), new PointF(0.5f, 0.375f) } } }, + { CardValues._8 ,new("8"){ + PntSuits=new[]{ new PointF(0.3f, 0.25f), new PointF(0.7f, 0.75f), new PointF(0.3f, 0.75f), new PointF(0.7f, 0.25f), + new PointF(0.3f, 0.5f), new PointF(0.7f, 0.5f), new PointF(0.5f, 0.375f), new PointF(0.5f, 0.625f) } } }, + { CardValues._9 ,new("9"){ + PntSuits=new[]{ new PointF(0.3f, 0.25f), new PointF(0.7f, 0.75f), new PointF(0.3f, 0.75f), new PointF(0.7f, 0.25f), + new PointF(0.3f, 0.5f), new PointF(0.7f, 0.5f), new PointF(0.5f, 0.25f), new PointF(0.5f, 0.75f), new PointF(0.5f, 0.5f) } } }, + { CardValues._10 ,new("10"){ + PntSuits=new[]{ new PointF(0.3f, 0.25f), new PointF(0.7f, 0.75f), new PointF(0.3f, 0.75f), new PointF(0.7f, 0.25f), + new PointF(0.3f, 0.375f), new PointF(0.7f, 0.375f), new PointF(0.3f, 0.625f), new PointF(0.7f, 0.625f), + new PointF(0.5f, 0.3125f),new PointF(0.5f, 0.6825f) } } }, + { CardValues.Jack ,new("J"){ + PntSuits=new[]{ new PointF(0.7f, 0.25f), new PointF(0.7f, 0.35f), new PointF(0.7f, 0.45f), new PointF(0.7f, 0.55f),new PointF(0.7f, 0.65f), + new PointF(0.6f, 0.75f),new PointF(0.5f, 0.75f),new PointF(0.4f, 0.75f), new PointF(0.3f, 0.65f) } } }, + { CardValues.Queen ,new("Q"){ + PntSuits=new[]{ new PointF(0.3f, 0.35f), new PointF(0.3f, 0.45f), new PointF(0.3f, 0.55f),new PointF(0.3f, 0.65f), + new PointF(0.7f, 0.35f), new PointF(0.7f, 0.45f), new PointF(0.7f, 0.55f), new PointF(0.7f, 0.75f), + new PointF(0.4f, 0.3f), new PointF(0.5f, 0.25f),new PointF(0.6f, 0.3f), + new PointF(0.4f, 0.7f), new PointF(0.5f, 0.75f),new PointF(0.6f, 0.65f), + new PointF(0.5f, 0.55f) } } }, + { CardValues.King ,new("K"){ + PntSuits=new[]{ new PointF(0.3f, 0.25f), new PointF(0.3f, 0.35f), new PointF(0.3f, 0.45f), new PointF(0.3f, 0.55f),new PointF(0.3f, 0.75f), + new PointF(0.3f, 0.65f), new PointF(0.4f, 0.55f), new PointF(0.5f, 0.45f), new PointF(0.6f, 0.35f), new PointF(0.7f, 0.25f), + new PointF(0.566667f, 0.55f), new PointF(0.63333f, 0.65f), new PointF(0.7f, 0.75f) } } }, + }; + public string Suit { get; set; } + public CardValues Value { get; set; } + public Color Color { get; set; } + + public Card(string suit, CardValues value, Color color) + { + Suit = suit; + Value = value; + Color = color; + } + + public Bitmap GetCard(int width, int height) + { + Bitmap cardBitmap = new Bitmap(width, height); + Graphics g = Graphics.FromImage(cardBitmap); + + DrawCard(width, height, g); + + return cardBitmap; + } + + public void DrawCard(int width, int height, Graphics g) + { + g.SmoothingMode = SmoothingMode.AntiAlias; + // Draw card background + Rectangle rect = new Rectangle(width / 200, width / 200, width - 1 - width / 200, height - 1 - width / 200); + g.FillRectangle(Brushes.Transparent, rect); + GraphicsPath path = RoundedRectangle(rect, width / 8); + g.FillPath(new SolidBrush(Color.White), path); + g.DrawPath(new Pen(Color.Black, width / 100), path); + + if (DrawDef.TryGetValue(Value, out var drawDef)) + { + foreach (var pnt in drawDef.PntVals) + DrawText(rect, drawDef.PrintValue, drawDef.ValSize, pnt, g); + foreach (var pnt in drawDef.PntSVals) + DrawText(rect, Suit, drawDef.ValSize, pnt, g); + foreach (var pnt in drawDef.PntSuits) + DrawText(rect, Suit, drawDef.SuitSize, pnt, g); + + } + + void DrawText(Rectangle rect, string sP, double fSize, PointF fpOffs, Graphics g) + { + int width = rect.Width; + RectangleF rect2 = rect; + rect2.Offset(new PointF((fpOffs.X - 0.5f) * rect2.Width, (fpOffs.Y - 0.5f) * rect2.Height)); + StringFormat format = new StringFormat(); + format.Alignment = StringAlignment.Center; + format.LineAlignment = StringAlignment.Center; + Font font = new Font("Times New Roman", (float)(width * fSize)); + g.DrawString(sP, font, new SolidBrush(Color), rect2, format); + } + } + + private GraphicsPath RoundedRectangle(Rectangle r, int d) + { + GraphicsPath path = new GraphicsPath(); + + path.AddArc(r.X, r.Y, d, d, 180, 90); + path.AddArc(r.X + r.Width - d, r.Y, d, d, 270, 90); + path.AddArc(r.X + r.Width - d, r.Y + r.Height - d, d, d, 0, 90); + path.AddArc(r.X, r.Y + r.Height - d, d, d, 90, 90); + path.CloseFigure(); + + return path; + } + } + +} diff --git a/CSharpBible/Games/CreateCards/Model/CardDrawDef.cs b/CSharpBible/Games/CreateCards/Model/CardDrawDef.cs new file mode 100644 index 000000000..d1ed02f54 --- /dev/null +++ b/CSharpBible/Games/CreateCards/Model/CardDrawDef.cs @@ -0,0 +1,19 @@ +using System.Drawing; + +namespace CreateCards.Model +{ + public class CardDrawDef + { + const float hOffs= 0.075f; + const float vOffs = 0.07f; + public string PrintValue; + public double ValSize=0.1d; + public double SuitSize; + public PointF[] PntVals = new[] { new PointF(hOffs, vOffs), new PointF(hOffs, 1f-vOffs), new PointF(1f-hOffs, vOffs), new PointF(1f-hOffs, 1f- vOffs) }; + public PointF[] PntSVals = new[] { new PointF(hOffs, vOffs*2), new PointF(hOffs, 1f - vOffs*2), new PointF(1f-hOffs, vOffs*2), new PointF(1f-hOffs, 1f - vOffs*2) }; + public PointF[] PntSuits = { }; + public CardDrawDef(string _pv,double _ss=0.2d) { + PrintValue = _pv; SuitSize = _ss; + } + } +} \ No newline at end of file diff --git a/CSharpBible/Games/CreateCards/Program.cs b/CSharpBible/Games/CreateCards/Program.cs new file mode 100644 index 000000000..f72d24d90 --- /dev/null +++ b/CSharpBible/Games/CreateCards/Program.cs @@ -0,0 +1,41 @@ +using System; +using System.Drawing; +using System.Drawing.Imaging; +using System.IO; +using CreateCards.Model; +using CreateCards.Utilities; + +public static class Program +{ + public static Action Run { get; set; } = DoRun; + + public static void Main(string[] args) + => Run(args); + + private static void DoRun(string[] args) + { + foreach (string suit in new[] { "♣", "♠", "♥", "♦" }) + foreach (CardValues value in Enum.GetValues(typeof(CardValues))) + { + Card card = new Card(suit, value, suit is "♣" or "♠" ? Color.Black : Color.Red); + Bitmap cardImage = card.GetCard(400, 600); + cardImage.Save(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures), $"card_{suit}{value.ToString().Trim('_')}.png")); + } + foreach (string suit in new[] { "♣", "♠", "♥", "♦" }) + foreach (CardValues value in Enum.GetValues(typeof(CardValues))) + { + Card card = new Card(suit, value, suit is "♣" or "♠" ? Color.Black : Color.Red); + using MemoryStream ms = new(); + Graphics g = ms.GraphicsWriter(); + card.DrawCard(400, 600, g); + g.Dispose(); + ms.Position = 0L; + var mf = new Metafile(ms); + // mf.DrawToScreen(); + ms.Position = 0L; + var fs = new FileStream(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures), $"card_{suit}{value.ToString().Trim('_')}.emf"), FileMode.OpenOrCreate); + ms.CopyTo(fs); + fs.Dispose(); + } + } +} \ No newline at end of file diff --git a/CSharpBible/Games/CreateCards/Utilities/GraphicUtils.cs b/CSharpBible/Games/CreateCards/Utilities/GraphicUtils.cs new file mode 100644 index 000000000..d35e21499 --- /dev/null +++ b/CSharpBible/Games/CreateCards/Utilities/GraphicUtils.cs @@ -0,0 +1,39 @@ +using System; +using System.Drawing.Imaging; +using System.Drawing; +using System.IO; +using System.Runtime.InteropServices; + +namespace CreateCards.Utilities +{ + public static class GraphicUtils + { + [DllImport("User32.dll")] + static extern IntPtr GetDC(IntPtr hwnd); + + public static Graphics GraphicsWriter(this Stream metaStream) + { + var bm = new Bitmap(50, 50); + bm.SetResolution(96, 96); + Graphics grfx = Graphics.FromImage(bm); + IntPtr ipHdc = grfx.GetHdc(); + var mf = new Metafile(metaStream, ipHdc); + grfx.ReleaseHdc(ipHdc); + grfx.Dispose(); + + var result = Graphics.FromImage(mf); + result.Flush(); + return result; + } + + public static void DrawToScreen(this Image ig, Rectangle? r = null) + { + using (Graphics g = Graphics.FromHdc(GetDC(IntPtr.Zero))) + { + if (r == null) + r = new Rectangle(0, 0, ig.Width, ig.Height); + g.DrawImage(ig, (Rectangle)r); + } + } + } +} diff --git a/CSharpBible/Games/CsEpiphany/App.xaml b/CSharpBible/Games/CsEpiphany/App.xaml new file mode 100644 index 000000000..032a8a4b1 --- /dev/null +++ b/CSharpBible/Games/CsEpiphany/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/CSharpBible/Games/CsEpiphany/App.xaml.cs b/CSharpBible/Games/CsEpiphany/App.xaml.cs new file mode 100644 index 000000000..7fb663c74 --- /dev/null +++ b/CSharpBible/Games/CsEpiphany/App.xaml.cs @@ -0,0 +1,17 @@ +using System.Configuration; +using System.Data; +using System.Windows; + +namespace CsEpiphany; + +/// +/// Interaction logic for App.xaml +/// +public partial class App : Application +{ + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + + } +} diff --git a/CSharpBible/Games/CsEpiphany/AssemblyInfo.cs b/CSharpBible/Games/CsEpiphany/AssemblyInfo.cs new file mode 100644 index 000000000..b0ec82757 --- /dev/null +++ b/CSharpBible/Games/CsEpiphany/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/CSharpBible/Games/CsEpiphany/CsEpiphany.csproj b/CSharpBible/Games/CsEpiphany/CsEpiphany.csproj new file mode 100644 index 000000000..631d4b527 --- /dev/null +++ b/CSharpBible/Games/CsEpiphany/CsEpiphany.csproj @@ -0,0 +1,41 @@ + + + + WinExe + net8.0-windows + enable + disable + true + + + + + + + + + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + diff --git a/CSharpBible/Games/CsEpiphany/MainWindow.xaml b/CSharpBible/Games/CsEpiphany/MainWindow.xaml new file mode 100644 index 000000000..479bb4f62 --- /dev/null +++ b/CSharpBible/Games/CsEpiphany/MainWindow.xaml @@ -0,0 +1,12 @@ + + + + + diff --git a/CSharpBible/Games/CsEpiphany/MainWindow.xaml.cs b/CSharpBible/Games/CsEpiphany/MainWindow.xaml.cs new file mode 100644 index 000000000..eca0b50c1 --- /dev/null +++ b/CSharpBible/Games/CsEpiphany/MainWindow.xaml.cs @@ -0,0 +1,24 @@ +using System.Text; +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 CsEpiphany +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/CSharpBible/Games/CsEpiphany/Model/Entity.cs b/CSharpBible/Games/CsEpiphany/Model/Entity.cs new file mode 100644 index 000000000..bc6a1352a --- /dev/null +++ b/CSharpBible/Games/CsEpiphany/Model/Entity.cs @@ -0,0 +1,121 @@ +using CsEpiphany.Model.Interfaces; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection.Metadata; +using System.Security.Policy; +using System.Text; +using System.Threading.Tasks; + +namespace CsEpiphany.Model; + +public abstract class Entity : IEntity +{ + // private decl. + private void m_set_position_x(int x) { } + + private void m_set_position_y(int y) { } + + protected bool m_just_checked; + + protected Entity_Handle m_id; + + protected Entity_Type m_type; + + protected int m_position_x; + + protected int m_position_y; + protected int m_speed; + + protected Sprite m_sprite; + + + //True if an entity exists - not used + protected bool m_exists; + + protected Level current_level; + + + public Entity(); + + public Entity_Handle get_id() => m_id; + + public void set_id(Entity_Handle handle) => m_id = handle; + + public int get_position_x() => m_position_x; + + public int get_position_y() => m_position_y; + + public Entity_Type get_type() => m_type; + + public Sprite get_sprite() => m_sprite; + + public void set_speed(int speed) => m_speed = speed; + + public void set_checked(bool check) => m_just_checked = check; + + public void set_type(Entity_Type type) => m_type = type; + + //moving function: calls the correct move_() function + public void move(Direction direction) + { + switch (direction) + { + case Direction.UP: + move_up(); + break; + case Direction.DOWN: + move_down(); + break; + case Direction.RIGHT: + move_right(); + break; + case Direction.LEFT: + move_left(); + break; + default: + break; + } + } + + public bool set_position(int x, int y) + { + (m_position_x, m_position_y) = (x, y); + return true; + } + + public bool set_initial_position(int x, int y) { + (m_position_x, m_position_y) = (x, y); + return true; + } + + // Moving functions - one for every direction + public void move_up() => m_position_y -= m_speed; + + public void move_down() => m_position_y += m_speed; + + public void move_right() => m_position_x += m_speed; + + public void move_left() => m_position_x -= m_speed; + + public bool exists() { return m_exists; } + + public void kill() { } + + // Virtual functions + + // this function need to be overloaded in the derivative classes. + //It is called by Game::move_all() for every existing object + //and generally it contains some checks and calling to moving_functions + public abstract void check_and_do(); + // virtual bool pass_on_me(Direction d=STOP)=0; + public abstract bool player_pressing_up(Entity_Handle down_entity); + public abstract bool player_pressing_left(Entity_Handle right_entity); + public abstract bool player_pressing_right(Entity_Handle left_entity); + public abstract bool player_pressing_down(Entity_Handle up_entity); + public abstract bool hit_from_up(Entity_Handle ntt); + public abstract bool explode(); + public abstract bool roll_on_me(); + + ~Entity() { } +} diff --git a/CSharpBible/Games/CsEpiphany/Model/Entity_Handle.cs b/CSharpBible/Games/CsEpiphany/Model/Entity_Handle.cs new file mode 100644 index 000000000..30beb0798 --- /dev/null +++ b/CSharpBible/Games/CsEpiphany/Model/Entity_Handle.cs @@ -0,0 +1,6 @@ +namespace CsEpiphany.Model +{ + public class Entity_Handle + { + } +} \ No newline at end of file diff --git a/CSharpBible/Games/CsEpiphany/Model/Entity_Type.cs b/CSharpBible/Games/CsEpiphany/Model/Entity_Type.cs new file mode 100644 index 000000000..0d195c37d --- /dev/null +++ b/CSharpBible/Games/CsEpiphany/Model/Entity_Type.cs @@ -0,0 +1,6 @@ +namespace CsEpiphany.Model +{ + public class Entity_Type + { + } +} \ No newline at end of file diff --git a/CSharpBible/Games/CsEpiphany/Model/EpiConfig.cs b/CSharpBible/Games/CsEpiphany/Model/EpiConfig.cs new file mode 100644 index 000000000..3d8bdce24 --- /dev/null +++ b/CSharpBible/Games/CsEpiphany/Model/EpiConfig.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CsEpiphany.Model.Interfaces; + +namespace CsEpiphany.Model; + +// Singleton class to store game configuration +public class EpiConfig : IEpiConfig +{ + private int m_screen_size_x=640; + private int m_screen_size_y=480; + private int m_score_size_y=32; + // int m_sprite_size; + private int m_map_size_x=32; + private int m_map_size_y=32; + static private int m_max_anim_drawn=8; + // int m_max_anim; + private int m_moving_step= Sprite.size / m_max_anim_drawn; + private int m_msec_per_frame= 140 / m_max_anim_drawn; + private int m_volume_sound=8; + private int m_volume_music=8; + private int m_last_level=0; + + public void set_default_values() { + //size in pixels + m_screen_size_x = 640; + m_screen_size_y = 480; + m_score_size_y = 32; + + + //size in cells + m_map_size_x = 32; + m_map_size_y = 32; + + //it must be a multiple of 2 + m_max_anim_drawn = 8; + + + + m_moving_step = Sprite.size / m_max_anim_drawn; + + //m_msec_per_frame=176/m_max_anim_drawn; + //m_msec_per_frame=150/m_max_anim_drawn; + //m_msec_per_frame=240/m_max_anim_drawn; + m_msec_per_frame = 140 / m_max_anim_drawn; + + m_volume_sound = 8; + + m_volume_music = 8; + + m_last_level = 0; + } + public int get_screen_size_x()=> m_screen_size_x; + public int get_screen_size_y()=> m_screen_size_y; + public int get_score_size_y()=> m_score_size_y; + + // int get_sprite_size(); + + public int get_map_size_x()=> m_map_size_x; + public int get_map_size_y()=> m_map_size_y; + public int get_max_anim_drawn()=> m_max_anim_drawn; + + // int get_max_anim(); + public int get_moving_step()=> m_moving_step; + public int get_msec_per_frame()=> m_msec_per_frame; + public int get_volume_sound(); + public int get_volume_music(); + public int get_last_level(); + public void set_last_level(int level); + public void set_volume_sound(int volume); + public void set_volume_music(int volume); + public void read_values_from_file(char* filename); + public void save_values_to_file(char* filename); + public void refresh_game_window_parameters(); + + // begin Singleton stuff + + private static EpiConfig? _instance; + + protected EpiConfig() { + refresh_game_window_parameters(); + } + + public static EpiConfig Instance=> _instance ??= new EpiConfig(); + + +} diff --git a/CSharpBible/Games/CsEpiphany/Model/Interfaces/IEntity.cs b/CSharpBible/Games/CsEpiphany/Model/Interfaces/IEntity.cs new file mode 100644 index 000000000..ba3775b20 --- /dev/null +++ b/CSharpBible/Games/CsEpiphany/Model/Interfaces/IEntity.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CsEpiphany.Model.Interfaces; + +public interface IEntity +{ + int get_position_x(); + void set_id(Entity_Handle handle); +} diff --git a/CSharpBible/Games/CsEpiphany/Model/Interfaces/IEpiConfig.cs b/CSharpBible/Games/CsEpiphany/Model/Interfaces/IEpiConfig.cs new file mode 100644 index 000000000..a9b0d6b4b --- /dev/null +++ b/CSharpBible/Games/CsEpiphany/Model/Interfaces/IEpiConfig.cs @@ -0,0 +1,5 @@ +namespace CsEpiphany.Model.Interfaces; + +public interface IEpiConfig +{ +} \ No newline at end of file diff --git a/CSharpBible/Games/CsEpiphany/Model/Level.cs b/CSharpBible/Games/CsEpiphany/Model/Level.cs new file mode 100644 index 000000000..976bb4cfe --- /dev/null +++ b/CSharpBible/Games/CsEpiphany/Model/Level.cs @@ -0,0 +1,6 @@ +namespace CsEpiphany.Model +{ + public class Level + { + } +} \ No newline at end of file diff --git a/CSharpBible/Games/CsEpiphany/Model/Sprite.cs b/CSharpBible/Games/CsEpiphany/Model/Sprite.cs new file mode 100644 index 000000000..1a0ab013b --- /dev/null +++ b/CSharpBible/Games/CsEpiphany/Model/Sprite.cs @@ -0,0 +1,6 @@ +namespace CsEpiphany.Model; + +public class Sprite +{ + public static int size; +} \ No newline at end of file diff --git a/CSharpBible/Games/CsEpiphany/Properties/Resources.Designer.cs b/CSharpBible/Games/CsEpiphany/Properties/Resources.Designer.cs new file mode 100644 index 000000000..7f8505870 --- /dev/null +++ b/CSharpBible/Games/CsEpiphany/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 CsEpiphany.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("CsEpiphany.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/Games/CsEpiphany/Properties/Resources.resx b/CSharpBible/Games/CsEpiphany/Properties/Resources.resx new file mode 100644 index 000000000..4fdb1b6af --- /dev/null +++ b/CSharpBible/Games/CsEpiphany/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 + + \ No newline at end of file diff --git a/CSharpBible/Games/CsEpiphany/Properties/Settings.Designer.cs b/CSharpBible/Games/CsEpiphany/Properties/Settings.Designer.cs new file mode 100644 index 000000000..95cb98f24 --- /dev/null +++ b/CSharpBible/Games/CsEpiphany/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 CsEpiphany.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.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/Games/CsEpiphany/Properties/Settings.settings b/CSharpBible/Games/CsEpiphany/Properties/Settings.settings new file mode 100644 index 000000000..049245f40 --- /dev/null +++ b/CSharpBible/Games/CsEpiphany/Properties/Settings.settings @@ -0,0 +1,6 @@ + + + + + + diff --git a/CSharpBible/Games/Game_Base/Game_Base.csproj b/CSharpBible/Games/Game_Base/Game_Base.csproj index a30cb0b90..5a691f8ae 100644 --- a/CSharpBible/Games/Game_Base/Game_Base.csproj +++ b/CSharpBible/Games/Game_Base/Game_Base.csproj @@ -1,24 +1,17 @@ - - - Library - net48;net472;net461 - disable - 8.0 - enable - ..\..\..\obj\$(MSBuildProjectName)\ - ..\..\..\obj\$(MSBuildProjectName)\ - ..\..\..\bin\$(MSBuildProjectName) - JC-Soft - Copyright © 2022 by JC-Soft - - - - - - + + + + Library + net481;net48;net472;net462 + + + + + + - - - + + + diff --git a/CSharpBible/Games/Game_Base/Game_Base_net.csproj b/CSharpBible/Games/Game_Base/Game_Base_net.csproj index 70efcdc2e..39bad5247 100644 --- a/CSharpBible/Games/Game_Base/Game_Base_net.csproj +++ b/CSharpBible/Games/Game_Base/Game_Base_net.csproj @@ -1,21 +1,14 @@ - - Library - net6.0 - disable - enable - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\bin\$(MSBuildProjectName) - JC-Soft - Copyright © 2022 by JC-Soft - - - + + + Library + net6.0;net7.0;net8.0 + + + - - - - + + + diff --git a/CSharpBible/Games/Game_Base/Model/Field.cs b/CSharpBible/Games/Game_Base/Model/Field.cs index aea93867e..616fd624f 100644 --- a/CSharpBible/Games/Game_Base/Model/Field.cs +++ b/CSharpBible/Games/Game_Base/Model/Field.cs @@ -35,14 +35,14 @@ namespace Game_Base.Model /// /// /// - public class Field : IPlacedObject, IParentedObject, IHasChildren + public class Field : IPlacedObject, IParentedObject, IHasChildrenwhere T : class { #region Properties /// /// The items /// /// - private List _items = new List(); + private List _items = new(); /// /// The place /// @@ -73,7 +73,7 @@ public class Field : IPlacedObject, IParentedObject, IHasChildren /// Gets or sets the items. /// /// The items. - public List Items { get => _items; set => Property.SetProperty(ref _items, value, NtfyListChange); } + public List Items { get => _items; set => value.SetProperty(ref _items, NtfyListChange); } /// /// Occurs when [data change event]. /// @@ -96,7 +96,7 @@ public class Field : IPlacedObject, IParentedObject, IHasChildren /// /// The value. /// The name. - public void SetPlace(Point value, [CallerMemberName] string Name = "") => Property.SetProperty(ref _place, value, NtfyPlaceChange, Name); + public void SetPlace(Point value, [CallerMemberName] string Name = "") => value.SetProperty(ref _place, NtfyPlaceChange, Name); /// /// Gets the old place. /// @@ -151,7 +151,8 @@ public bool RemoveItem(T value) /// /// The value. /// The caller member. - public void SetParent(object? value, [CallerMemberName] string CallerMember = "") => Property.SetProperty(ref _parent, value, NtfyParentChange, CallerMember); + public void SetParent(object? value, [CallerMemberName] string CallerMember = "") + => value.SetProperty(ref _parent, NtfyParentChange, CallerMember); /// /// Gets the parent. /// @@ -191,6 +192,30 @@ public Field(Point place, object? parent=null) /// A that represents this instance. public override string ToString() => $"{nameof(Field)}({GetPlace()},I:{Items?.Count})"; + /// + /// Notifies the child change. + /// + /// The child object. + /// The old value. + /// The new value. + /// The property. + public void NotifyChildChange(T childObject, object oldVal, object newVal, [CallerMemberName] string prop = "") + { + if (newVal is Point np && oldVal is Point op) + { + if (childObject is IParentedObject co) + { +#if NET6_0_OR_GREATER + if (co.Parent != this && co.Parent is IHasChildren ophc) +#else + if (co.GetParent() != this && co.GetParent() is IHasChildren ophc) +#endif + ophc.RemoveItem(childObject); + } + AddItem(childObject); + } + } + #region Private Methods /// /// Notfies the change of place. @@ -221,7 +246,8 @@ private void NtfyPlaceChange(string arg1, Point arg2, Point arg3) /// The arg2. /// The arg3. /// - private void NtfyListChange(string arg1, List arg2, List arg3) => DataChangeEvent?.Invoke(this, (arg1, arg2, arg3)); + private void NtfyListChange(string arg1, List arg2, List arg3) + => DataChangeEvent?.Invoke(this, (arg1, arg2, arg3)); /// /// Ntfies the parent change. @@ -241,29 +267,6 @@ private void NtfyParentChange(string arg1, object? arg2, object? arg3) DataChangeEvent?.Invoke(this, (arg1, arg2, arg3)); } - /// - /// Notifies the child change. - /// - /// The child object. - /// The old value. - /// The new value. - /// The property. - public void NotifyChildChange(T childObject, object oldVal, object newVal, [CallerMemberName] string prop = "") - { - if (newVal is Point np && oldVal is Point op) - { - if (childObject is IParentedObject co) - { -#if NET6_0_OR_GREATER - if (co.Parent != this && co.Parent is IHasChildren ophc) -#else - if (co.GetParent() != this && co.GetParent() is IHasChildren ophc) -#endif - ophc.RemoveItem(childObject); - } - AddItem(childObject); - } - } #endregion #endregion } diff --git a/CSharpBible/Games/Game_Base/Model/Playfield2D.cs b/CSharpBible/Games/Game_Base/Model/Playfield2D.cs index d2a5c9b0c..cfb38fba6 100644 --- a/CSharpBible/Games/Game_Base/Model/Playfield2D.cs +++ b/CSharpBible/Games/Game_Base/Model/Playfield2D.cs @@ -39,7 +39,7 @@ public class Playfield2D: IHasChildren where T : class /// The pf data /// /// - private Dictionary _pfData = new Dictionary(); + private readonly Dictionary _pfData = new Dictionary(); /// /// The pf rect /// @@ -56,7 +56,7 @@ public class Playfield2D: IHasChildren where T : class /// Gets or sets the size of the pf. /// /// The size of the pf. - public Size PfSize { get => _pfRect.Size; set => Property.SetProperty(ref _pfSize, value, PfResize); } + public Size PfSize { get => _pfRect.Size; set => value.SetProperty(ref _pfSize, PfResize); } /// /// Gets the rect. /// @@ -70,7 +70,7 @@ public class Playfield2D: IHasChildren where T : class /// /// Occurs when [on data changed]. /// - public event EventHandler<(string prop,object? oldVal,object? newVal)> OnDataChanged; + public event EventHandler<(string prop,object? oldVal,object? newVal)>? OnDataChanged; /// /// Gets or sets the default size. @@ -85,11 +85,11 @@ public class Playfield2D: IHasChildren where T : class /// System.Nullable<T>. public T? this[Point P] { - get => _pfData.ContainsKey(P) ? _pfData[P] : default; set + get => _pfData.TryGetValue(P,out var t) ? t : default; set { if (IsInside(P)) { - if (EqualityComparer.Default.Equals(this[P], value)) return; + if (EqualityComparer.Default.Equals(this[P], value)) return; if (value is IPlacedObject plo) { #if NET6_0_OR_GREATER @@ -99,7 +99,7 @@ public T? this[Point P] #endif plo.OnPlaceChange += ChildPlaceChanged; } - if (value is IParentedObject && EqualityComparer.Default.Equals(this[P], value)) return; + if (value is IParentedObject && EqualityComparer.Default.Equals(this[P], value)) return; if (value != null) { _pfData[P] = value; @@ -181,9 +181,9 @@ public bool AddItem(T value) bool result = false; if (value is IPlacedObject po #if NET6_0_OR_GREATER - && !EqualityComparer.Default.Equals(this[po.Place], value)) + && !EqualityComparer.Default.Equals(this[po.Place], value)) #else - && !EqualityComparer.Default.Equals(this[po.GetPlace()], value)) + && !EqualityComparer.Default.Equals(this[po.GetPlace()], value)) #endif { #if NET6_0_OR_GREATER @@ -261,7 +261,7 @@ private void ChildPlaceChanged(object? sender, (Point oP, Point nP) e) { if (sender is T tObj) { - if (EqualityComparer.Default.Equals(this[e.oP], tObj)) + if (EqualityComparer.Default.Equals(this[e.oP], tObj)) _pfData.Remove(e.oP); if (this[e.nP] == null) _pfData.Add(e.nP, tObj); diff --git a/CSharpBible/Games/Game_BaseTests/Game_BaseTests.csproj b/CSharpBible/Games/Game_BaseTests/Game_BaseTests.csproj index 95b324854..e348e74d7 100644 --- a/CSharpBible/Games/Game_BaseTests/Game_BaseTests.csproj +++ b/CSharpBible/Games/Game_BaseTests/Game_BaseTests.csproj @@ -1,33 +1,22 @@ - - - Library - net48;net472;net461 - disable - 8.0 - enable - ..\..\..\obj\$(MSBuildProjectName)\ - ..\..\..\obj\$(MSBuildProjectName)\ - ..\..\..\bin\$(MSBuildProjectName) - JC-Soft - Copyright © 2022 by JC-Soft - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - + + + + Library + net481;net48;net472;net462 + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + diff --git a/CSharpBible/Games/Game_BaseTests/Game_Base_netTests.csproj b/CSharpBible/Games/Game_BaseTests/Game_Base_netTests.csproj index 941e17dc0..cf30f016a 100644 --- a/CSharpBible/Games/Game_BaseTests/Game_Base_netTests.csproj +++ b/CSharpBible/Games/Game_BaseTests/Game_Base_netTests.csproj @@ -1,29 +1,23 @@ - - - Library - net6.0 - disable - enable - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\bin\$(MSBuildProjectName) - JC-Soft - Copyright © 2022 by JC-Soft - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - + + + + Library + net6.0;net7.0;net8.0 + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + - - - + + + diff --git a/CSharpBible/Games/Game_BaseTests/Model/FieldTests.cs b/CSharpBible/Games/Game_BaseTests/Model/FieldTests.cs index 35c4095e7..771b92b3c 100644 --- a/CSharpBible/Games/Game_BaseTests/Model/FieldTests.cs +++ b/CSharpBible/Games/Game_BaseTests/Model/FieldTests.cs @@ -18,10 +18,7 @@ using System; using System.Collections.Generic; using System.Drawing; -using System.Linq; using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; /// /// The Tests namespace. @@ -106,8 +103,9 @@ public void SetParent(object? value, [CallerMemberName] string CallerMember = "" /// /// The value. /// The name. - public void SetPlace(Point value, [CallerMemberName] string Name = "") => Property.SetProperty(ref _place, value, - (s, o, n) => { _oldplace = o;OnPlaceChange?.Invoke(this, (o, n)); logOperation?.Invoke("Place changed", this, o, n, s); }, Name); + public void SetPlace(Point value, [CallerMemberName] string Name = "") + => value.SetProperty(ref _place, + (s, o, n) => { _oldplace = o;OnPlaceChange?.Invoke(this, ((Point)o, (Point)n)); logOperation?.Invoke("Place changed", this, o, n, s); }, Name); /// /// Gets the old place. /// @@ -231,8 +229,8 @@ public bool RemoveItem(Field value) /// /// The value. /// The name. - public void SetPlace(Point value, [CallerMemberName] string Name = "") => Property.SetProperty(ref _place, value, - (s, o, n) => { _oldplace = o; OnPlaceChange?.Invoke(this, (n, o)); logOperation?.Invoke("Place changed", this, o, n, s); }, Name); + public void SetPlace(Point value, [CallerMemberName] string Name = "") => value.SetProperty(ref _place, + (s, o, n) => { _oldplace = o; OnPlaceChange?.Invoke(this, ((Point)n, (Point)o)); logOperation?.Invoke("Place changed", this, o, n, s); }, Name); /// /// Returns a that represents this instance. @@ -277,7 +275,9 @@ public class FieldTests /// The test field /// /// +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwgen Sie die Deklaration als Nullable. private Field testField; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwgen Sie die Deklaration als Nullable. /// /// The result data /// @@ -563,7 +563,7 @@ public void SetParentTest(string name, string sData, int[] p, string[] sExpResul [DataRow("0,-1", "Apple;Pear", new int[] { 0, -1 })] [DataRow("-1,0", "Pear;Apple", new int[] { -1, 0 })] [DataRow("-5,-5", "Apple;Pear;Cherry", new int[] { -5, -5 })] - [DataRow("-6,-7", "Apple;Pear;Cherry;Rasberry;Strewberry;Cranberry;Bird", new int[] { -6, -7 })] + [DataRow("-6,-7", "Apple;Pear;Cherry;Raspberry;Strawberry;Cranberry;Bird", new int[] { -6, -7 })] public void GetParentTest(string name, string sData, int[] p) { Point pp = Point.Empty; @@ -573,6 +573,23 @@ public void GetParentTest(string name, string sData, int[] p) Assert.AreEqual(pp, _field.GetPlace()); } + [TestMethod] + public void ParentTest() + { + Assert.IsNull(testField.Parent); + testField.Parent = this; + Assert.IsNotNull(testField.Parent); + Assert.AreEqual(this,testField.Parent); + } + + [TestMethod] + public void GetItemsTest() + { + foreach (var i in testField.Items); + Assert.Fail(); + Assert.AreEqual(this, testField.Parent); + } + #region Private Methods /// /// Generates the dummy data. diff --git a/CSharpBible/Games/Games.props b/CSharpBible/Games/Games.props new file mode 100644 index 000000000..8335ac071 --- /dev/null +++ b/CSharpBible/Games/Games.props @@ -0,0 +1,14 @@ + + + ..\.. + ..\..\..\bin\$(MSBuildProjectName)\ + ..\..\..\obj\$(MSBuildProjectName)\ + 12.0 + enable + NULLABLE + disable + JC-Soft + Joe Care + Copyright © JC-Soft 2024 + + \ No newline at end of file diff --git a/CSharpBible/Games/Games.sln b/CSharpBible/Games/Games.sln new file mode 100644 index 000000000..002553f2a --- /dev/null +++ b/CSharpBible/Games/Games.sln @@ -0,0 +1,287 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Projektmappenelemente", "Projektmappenelemente", "{658BD492-33FF-4995-AAE7-4F6894E92F0C}" + ProjectSection(SolutionItems) = preProject + Games.props = Games.props + Games_net.props = Games_net.props + VectorGfx\VectorGfx.csproj = VectorGfx\VectorGfx.csproj + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_BaseLib", "..\Libraries\MVVM_BaseLib\MVVM_BaseLib.csproj", "{890CF504-3814-443B-9EE6-E8BCACF68203}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{AF041458-CF94-4D6D-BB0F-8BC50F4F099C}" + ProjectSection(SolutionItems) = preProject + ..\Libraries\Libraries_net.props = ..\Libraries\Libraries_net.props + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_BaseLibTests", "..\Libraries\MVVM_BaseLibTests\MVVM_BaseLibTests.csproj", "{66EB60F2-523D-47C8-95EA-C7E10759E239}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Snake_Base", "Snake_Base\Snake_Base.csproj", "{8AA72111-7FF0-416B-90E3-0DC9B2548156}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Snake_Base_net", "Snake_Base\Snake_Base_net.csproj", "{772EB95A-D422-474F-A749-66434C42084A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sokoban_Base", "Sokoban_Base\Sokoban_Base.csproj", "{60F5A221-9007-44A2-B29E-0469D91434EC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sokoban_Base_win", "Sokoban_Base\Sokoban_Base_win.csproj", "{A6A861F4-DC4E-45CB-A621-E737693CB9EA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sokoban", "Sokoban\Sokoban.csproj", "{3EDDA5EE-28AB-491E-AC2A-7C13B4A310DD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Snake_Console", "Snake_Console\Snake_Console.csproj", "{58BB1796-700F-4F0D-981A-A16BE151AD65}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Game_Base", "Game_Base\Game_Base.csproj", "{F3338CF1-8429-489F-88E7-1BC5A5F2C425}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Game_Base_net", "Game_Base\Game_Base_net.csproj", "{B36AA369-AA02-446A-9028-F801DC5728E5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Game_Base_netTests", "Game_BaseTests\Game_Base_netTests.csproj", "{DBD8FF8A-4868-446B-912B-9A5A796943DD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Game_BaseTests", "Game_BaseTests\Game_BaseTests.csproj", "{83D18210-073D-461C-92B5-A1F62034BF90}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CreateCards", "CreateCards\CreateCards.csproj", "{00D00117-45B0-4B30-87F0-74DBEE09898C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleDisplay_win", "..\ConsoleDisplay\ConsoleDisplay_win.csproj", "{CE756825-E693-4592-A937-635A5E11274A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleDisplay_net", "..\ConsoleDisplay\ConsoleDisplay_net.csproj", "{A4144DF0-77E3-4370-8C46-64C56279B3DE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaseLib", "..\Libraries\BaseLib\BaseLib.csproj", "{79B65C63-EB25-4DEF-AC59-52836AAA0F24}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaseLib_net", "..\Libraries\BaseLib\BaseLib_net.csproj", "{87D85880-5526-4FEF-93E9-3DCFBA0A1A4C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaseLib_netTests", "..\Libraries\BaseLibTests\BaseLib_netTests.csproj", "{C85992D0-7713-4EA1-A4F3-3D3598FFA9E0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaseLibTests", "..\Libraries\BaseLibTests\BaseLibTests.csproj", "{6F8F8283-A334-47D4-A15B-94100A2C29E3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleDisplay", "..\ConsoleDisplay\ConsoleDisplay.csproj", "{D8E3D40A-8D95-4410-AF28-A7AD24215754}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Snake_Base_netTests", "Snake_BaseTests\Snake_Base_netTests.csproj", "{8E1630B1-46AF-4A2B-8349-AEED39F1CFA9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sokoban_BaseTests", "Sokoban_BaseTests\Sokoban_BaseTests.csproj", "{167E2DAD-894E-4BE6-8936-72A8D9B7ECC5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tetris_Base", "Tetris_Base\Tetris_Base.csproj", "{E004F929-593A-4F29-B77E-FEA73C600442}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tetris_BaseTests", "Tetris_BaseTests\Tetris_BaseTests.csproj", "{790D205A-6FB7-4159-AE15-C39BCADAFF6F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Werner_Flaschbier_Base", "Werner_Flaschbier\Werner_Flaschbier_Base.csproj", "{5E72ADAF-153A-4488-AAA9-CC4EF2771F16}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Werner_Flaschbier_Base_win", "Werner_Flaschbier\Werner_Flaschbier_Base_win.csproj", "{BFD71332-B8CE-4072-B933-16326850BF63}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Werner_Flaschbier_BaseTests", "Werner_Flaschbier_BaseTests\Werner_Flaschbier_BaseTests.csproj", "{E4742BCD-D967-40A2-99C9-14351BCC9FD1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestConsole", "..\TestConsole\TestConsole.csproj", "{6BDAFCB1-55B5-4CAB-A9CD-9D485151D1EF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestConsole_net", "..\TestConsole\TestConsole_net.csproj", "{9CA57524-1297-4313-AA78-5AA8BFB7E746}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Werner_Flaschbier_Console", "Werner_Flaschbier\Werner_Flaschbier_Console.csproj", "{D5CA406E-3839-4CB6-AF28-7EE2B029B912}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VectorGfx", "VectorGfx\VectorGfx.csproj", "{380B97C9-B145-49A9-92C0-47B819748BC3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CanvasWPF2_ItemTemplateSelector", "..\Graphics\CanvasWPF2_ItemTemplateSelector\CanvasWPF2_ItemTemplateSelector.csproj", "{0E81C28B-325A-4A2F-B21F-F66DADA451EC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VectorGfx2", "VectorGfx2\VectorGfx2.csproj", "{07FB5A96-DB06-442C-8570-8644898BD6C5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CsEpiphany", "CsEpiphany\CsEpiphany.csproj", "{445F80F7-1EAB-462A-BD46-0DE231BD66D9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Asteroids", "Asteroids", "{4BE42477-1420-4A81-BDFA-4C34DA898F05}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Asteroids_net", "Asteroids\Asteroids_net.csproj", "{6AA283E8-D2B2-4743-B96D-96A5DAA8F2B5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CanvasWPF_CT", "..\Graphics\CanvasWPF_CT\CanvasWPF_CT.csproj", "{F7BB8FCE-FAE8-4C35-939F-070DF91806B5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DynamicShapeWPF", "..\Graphics\DynamicShapeWPF\DynamicShapeWPF.csproj", "{3E13AE4D-D805-4D2E-B6B5-88DC174F6A2C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Graphics", "Graphics", "{79430A25-1F0B-49B9-9A68-720A422E91AB}" + ProjectSection(SolutionItems) = preProject + ..\Graphics\Graphics.props = ..\Graphics\Graphics.props + ..\Graphics\Graphics_net.props = ..\Graphics\Graphics_net.props + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVM_Converter_Grid2", "..\Graphics\MVVM_Converter_Grid2\MVVM_Converter_Grid2.csproj", "{F74AA722-DB1C-4CDB-B0FB-4016651C6E1C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Asteroids_Base", "Asteroids_Base\Asteroids_Base.csproj", "{15EA50ED-95FB-4195-87F6-F1D48DA8B5F1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {890CF504-3814-443B-9EE6-E8BCACF68203}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {890CF504-3814-443B-9EE6-E8BCACF68203}.Debug|Any CPU.Build.0 = Debug|Any CPU + {890CF504-3814-443B-9EE6-E8BCACF68203}.Release|Any CPU.ActiveCfg = Release|Any CPU + {890CF504-3814-443B-9EE6-E8BCACF68203}.Release|Any CPU.Build.0 = Release|Any CPU + {66EB60F2-523D-47C8-95EA-C7E10759E239}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {66EB60F2-523D-47C8-95EA-C7E10759E239}.Debug|Any CPU.Build.0 = Debug|Any CPU + {66EB60F2-523D-47C8-95EA-C7E10759E239}.Release|Any CPU.ActiveCfg = Release|Any CPU + {66EB60F2-523D-47C8-95EA-C7E10759E239}.Release|Any CPU.Build.0 = Release|Any CPU + {8AA72111-7FF0-416B-90E3-0DC9B2548156}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8AA72111-7FF0-416B-90E3-0DC9B2548156}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8AA72111-7FF0-416B-90E3-0DC9B2548156}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8AA72111-7FF0-416B-90E3-0DC9B2548156}.Release|Any CPU.Build.0 = Release|Any CPU + {772EB95A-D422-474F-A749-66434C42084A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {772EB95A-D422-474F-A749-66434C42084A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {772EB95A-D422-474F-A749-66434C42084A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {772EB95A-D422-474F-A749-66434C42084A}.Release|Any CPU.Build.0 = Release|Any CPU + {60F5A221-9007-44A2-B29E-0469D91434EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {60F5A221-9007-44A2-B29E-0469D91434EC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {60F5A221-9007-44A2-B29E-0469D91434EC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {60F5A221-9007-44A2-B29E-0469D91434EC}.Release|Any CPU.Build.0 = Release|Any CPU + {A6A861F4-DC4E-45CB-A621-E737693CB9EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A6A861F4-DC4E-45CB-A621-E737693CB9EA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A6A861F4-DC4E-45CB-A621-E737693CB9EA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A6A861F4-DC4E-45CB-A621-E737693CB9EA}.Release|Any CPU.Build.0 = Release|Any CPU + {3EDDA5EE-28AB-491E-AC2A-7C13B4A310DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3EDDA5EE-28AB-491E-AC2A-7C13B4A310DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3EDDA5EE-28AB-491E-AC2A-7C13B4A310DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3EDDA5EE-28AB-491E-AC2A-7C13B4A310DD}.Release|Any CPU.Build.0 = Release|Any CPU + {58BB1796-700F-4F0D-981A-A16BE151AD65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58BB1796-700F-4F0D-981A-A16BE151AD65}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58BB1796-700F-4F0D-981A-A16BE151AD65}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58BB1796-700F-4F0D-981A-A16BE151AD65}.Release|Any CPU.Build.0 = Release|Any CPU + {F3338CF1-8429-489F-88E7-1BC5A5F2C425}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F3338CF1-8429-489F-88E7-1BC5A5F2C425}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F3338CF1-8429-489F-88E7-1BC5A5F2C425}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F3338CF1-8429-489F-88E7-1BC5A5F2C425}.Release|Any CPU.Build.0 = Release|Any CPU + {B36AA369-AA02-446A-9028-F801DC5728E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B36AA369-AA02-446A-9028-F801DC5728E5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B36AA369-AA02-446A-9028-F801DC5728E5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B36AA369-AA02-446A-9028-F801DC5728E5}.Release|Any CPU.Build.0 = Release|Any CPU + {DBD8FF8A-4868-446B-912B-9A5A796943DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DBD8FF8A-4868-446B-912B-9A5A796943DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DBD8FF8A-4868-446B-912B-9A5A796943DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DBD8FF8A-4868-446B-912B-9A5A796943DD}.Release|Any CPU.Build.0 = Release|Any CPU + {83D18210-073D-461C-92B5-A1F62034BF90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {83D18210-073D-461C-92B5-A1F62034BF90}.Debug|Any CPU.Build.0 = Debug|Any CPU + {83D18210-073D-461C-92B5-A1F62034BF90}.Release|Any CPU.ActiveCfg = Release|Any CPU + {83D18210-073D-461C-92B5-A1F62034BF90}.Release|Any CPU.Build.0 = Release|Any CPU + {00D00117-45B0-4B30-87F0-74DBEE09898C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {00D00117-45B0-4B30-87F0-74DBEE09898C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {00D00117-45B0-4B30-87F0-74DBEE09898C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {00D00117-45B0-4B30-87F0-74DBEE09898C}.Release|Any CPU.Build.0 = Release|Any CPU + {CE756825-E693-4592-A937-635A5E11274A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CE756825-E693-4592-A937-635A5E11274A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CE756825-E693-4592-A937-635A5E11274A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CE756825-E693-4592-A937-635A5E11274A}.Release|Any CPU.Build.0 = Release|Any CPU + {A4144DF0-77E3-4370-8C46-64C56279B3DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4144DF0-77E3-4370-8C46-64C56279B3DE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4144DF0-77E3-4370-8C46-64C56279B3DE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4144DF0-77E3-4370-8C46-64C56279B3DE}.Release|Any CPU.Build.0 = Release|Any CPU + {79B65C63-EB25-4DEF-AC59-52836AAA0F24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {79B65C63-EB25-4DEF-AC59-52836AAA0F24}.Debug|Any CPU.Build.0 = Debug|Any CPU + {79B65C63-EB25-4DEF-AC59-52836AAA0F24}.Release|Any CPU.ActiveCfg = Release|Any CPU + {79B65C63-EB25-4DEF-AC59-52836AAA0F24}.Release|Any CPU.Build.0 = Release|Any CPU + {87D85880-5526-4FEF-93E9-3DCFBA0A1A4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {87D85880-5526-4FEF-93E9-3DCFBA0A1A4C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {87D85880-5526-4FEF-93E9-3DCFBA0A1A4C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {87D85880-5526-4FEF-93E9-3DCFBA0A1A4C}.Release|Any CPU.Build.0 = Release|Any CPU + {C85992D0-7713-4EA1-A4F3-3D3598FFA9E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C85992D0-7713-4EA1-A4F3-3D3598FFA9E0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C85992D0-7713-4EA1-A4F3-3D3598FFA9E0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C85992D0-7713-4EA1-A4F3-3D3598FFA9E0}.Release|Any CPU.Build.0 = Release|Any CPU + {6F8F8283-A334-47D4-A15B-94100A2C29E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6F8F8283-A334-47D4-A15B-94100A2C29E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6F8F8283-A334-47D4-A15B-94100A2C29E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6F8F8283-A334-47D4-A15B-94100A2C29E3}.Release|Any CPU.Build.0 = Release|Any CPU + {D8E3D40A-8D95-4410-AF28-A7AD24215754}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D8E3D40A-8D95-4410-AF28-A7AD24215754}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D8E3D40A-8D95-4410-AF28-A7AD24215754}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D8E3D40A-8D95-4410-AF28-A7AD24215754}.Release|Any CPU.Build.0 = Release|Any CPU + {8E1630B1-46AF-4A2B-8349-AEED39F1CFA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E1630B1-46AF-4A2B-8349-AEED39F1CFA9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E1630B1-46AF-4A2B-8349-AEED39F1CFA9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E1630B1-46AF-4A2B-8349-AEED39F1CFA9}.Release|Any CPU.Build.0 = Release|Any CPU + {167E2DAD-894E-4BE6-8936-72A8D9B7ECC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {167E2DAD-894E-4BE6-8936-72A8D9B7ECC5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {167E2DAD-894E-4BE6-8936-72A8D9B7ECC5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {167E2DAD-894E-4BE6-8936-72A8D9B7ECC5}.Release|Any CPU.Build.0 = Release|Any CPU + {E004F929-593A-4F29-B77E-FEA73C600442}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E004F929-593A-4F29-B77E-FEA73C600442}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E004F929-593A-4F29-B77E-FEA73C600442}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E004F929-593A-4F29-B77E-FEA73C600442}.Release|Any CPU.Build.0 = Release|Any CPU + {790D205A-6FB7-4159-AE15-C39BCADAFF6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {790D205A-6FB7-4159-AE15-C39BCADAFF6F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {790D205A-6FB7-4159-AE15-C39BCADAFF6F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {790D205A-6FB7-4159-AE15-C39BCADAFF6F}.Release|Any CPU.Build.0 = Release|Any CPU + {5E72ADAF-153A-4488-AAA9-CC4EF2771F16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5E72ADAF-153A-4488-AAA9-CC4EF2771F16}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5E72ADAF-153A-4488-AAA9-CC4EF2771F16}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5E72ADAF-153A-4488-AAA9-CC4EF2771F16}.Release|Any CPU.Build.0 = Release|Any CPU + {BFD71332-B8CE-4072-B933-16326850BF63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BFD71332-B8CE-4072-B933-16326850BF63}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BFD71332-B8CE-4072-B933-16326850BF63}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BFD71332-B8CE-4072-B933-16326850BF63}.Release|Any CPU.Build.0 = Release|Any CPU + {E4742BCD-D967-40A2-99C9-14351BCC9FD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E4742BCD-D967-40A2-99C9-14351BCC9FD1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E4742BCD-D967-40A2-99C9-14351BCC9FD1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E4742BCD-D967-40A2-99C9-14351BCC9FD1}.Release|Any CPU.Build.0 = Release|Any CPU + {6BDAFCB1-55B5-4CAB-A9CD-9D485151D1EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6BDAFCB1-55B5-4CAB-A9CD-9D485151D1EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6BDAFCB1-55B5-4CAB-A9CD-9D485151D1EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6BDAFCB1-55B5-4CAB-A9CD-9D485151D1EF}.Release|Any CPU.Build.0 = Release|Any CPU + {9CA57524-1297-4313-AA78-5AA8BFB7E746}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9CA57524-1297-4313-AA78-5AA8BFB7E746}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9CA57524-1297-4313-AA78-5AA8BFB7E746}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9CA57524-1297-4313-AA78-5AA8BFB7E746}.Release|Any CPU.Build.0 = Release|Any CPU + {D5CA406E-3839-4CB6-AF28-7EE2B029B912}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D5CA406E-3839-4CB6-AF28-7EE2B029B912}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D5CA406E-3839-4CB6-AF28-7EE2B029B912}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D5CA406E-3839-4CB6-AF28-7EE2B029B912}.Release|Any CPU.Build.0 = Release|Any CPU + {380B97C9-B145-49A9-92C0-47B819748BC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {380B97C9-B145-49A9-92C0-47B819748BC3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {380B97C9-B145-49A9-92C0-47B819748BC3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {380B97C9-B145-49A9-92C0-47B819748BC3}.Release|Any CPU.Build.0 = Release|Any CPU + {0E81C28B-325A-4A2F-B21F-F66DADA451EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E81C28B-325A-4A2F-B21F-F66DADA451EC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E81C28B-325A-4A2F-B21F-F66DADA451EC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E81C28B-325A-4A2F-B21F-F66DADA451EC}.Release|Any CPU.Build.0 = Release|Any CPU + {07FB5A96-DB06-442C-8570-8644898BD6C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {07FB5A96-DB06-442C-8570-8644898BD6C5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {07FB5A96-DB06-442C-8570-8644898BD6C5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {07FB5A96-DB06-442C-8570-8644898BD6C5}.Release|Any CPU.Build.0 = Release|Any CPU + {445F80F7-1EAB-462A-BD46-0DE231BD66D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {445F80F7-1EAB-462A-BD46-0DE231BD66D9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {445F80F7-1EAB-462A-BD46-0DE231BD66D9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {445F80F7-1EAB-462A-BD46-0DE231BD66D9}.Release|Any CPU.Build.0 = Release|Any CPU + {6AA283E8-D2B2-4743-B96D-96A5DAA8F2B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6AA283E8-D2B2-4743-B96D-96A5DAA8F2B5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6AA283E8-D2B2-4743-B96D-96A5DAA8F2B5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6AA283E8-D2B2-4743-B96D-96A5DAA8F2B5}.Release|Any CPU.Build.0 = Release|Any CPU + {F7BB8FCE-FAE8-4C35-939F-070DF91806B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F7BB8FCE-FAE8-4C35-939F-070DF91806B5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F7BB8FCE-FAE8-4C35-939F-070DF91806B5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F7BB8FCE-FAE8-4C35-939F-070DF91806B5}.Release|Any CPU.Build.0 = Release|Any CPU + {3E13AE4D-D805-4D2E-B6B5-88DC174F6A2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3E13AE4D-D805-4D2E-B6B5-88DC174F6A2C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3E13AE4D-D805-4D2E-B6B5-88DC174F6A2C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3E13AE4D-D805-4D2E-B6B5-88DC174F6A2C}.Release|Any CPU.Build.0 = Release|Any CPU + {F74AA722-DB1C-4CDB-B0FB-4016651C6E1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F74AA722-DB1C-4CDB-B0FB-4016651C6E1C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F74AA722-DB1C-4CDB-B0FB-4016651C6E1C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F74AA722-DB1C-4CDB-B0FB-4016651C6E1C}.Release|Any CPU.Build.0 = Release|Any CPU + {15EA50ED-95FB-4195-87F6-F1D48DA8B5F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {15EA50ED-95FB-4195-87F6-F1D48DA8B5F1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15EA50ED-95FB-4195-87F6-F1D48DA8B5F1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {15EA50ED-95FB-4195-87F6-F1D48DA8B5F1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {890CF504-3814-443B-9EE6-E8BCACF68203} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {66EB60F2-523D-47C8-95EA-C7E10759E239} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {79B65C63-EB25-4DEF-AC59-52836AAA0F24} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {87D85880-5526-4FEF-93E9-3DCFBA0A1A4C} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {C85992D0-7713-4EA1-A4F3-3D3598FFA9E0} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {6F8F8283-A334-47D4-A15B-94100A2C29E3} = {AF041458-CF94-4D6D-BB0F-8BC50F4F099C} + {0E81C28B-325A-4A2F-B21F-F66DADA451EC} = {79430A25-1F0B-49B9-9A68-720A422E91AB} + {6AA283E8-D2B2-4743-B96D-96A5DAA8F2B5} = {4BE42477-1420-4A81-BDFA-4C34DA898F05} + {F7BB8FCE-FAE8-4C35-939F-070DF91806B5} = {79430A25-1F0B-49B9-9A68-720A422E91AB} + {3E13AE4D-D805-4D2E-B6B5-88DC174F6A2C} = {79430A25-1F0B-49B9-9A68-720A422E91AB} + {F74AA722-DB1C-4CDB-B0FB-4016651C6E1C} = {79430A25-1F0B-49B9-9A68-720A422E91AB} + {15EA50ED-95FB-4195-87F6-F1D48DA8B5F1} = {4BE42477-1420-4A81-BDFA-4C34DA898F05} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {51252E6F-E712-436A-B391-1C5243F65ABE} + EndGlobalSection +EndGlobal diff --git a/CSharpBible/Games/Games_net.props b/CSharpBible/Games/Games_net.props new file mode 100644 index 000000000..6eab27d40 --- /dev/null +++ b/CSharpBible/Games/Games_net.props @@ -0,0 +1,14 @@ + + + ..\.. + ..\..\..\bin\$(MSBuildProjectName)\ + ..\..\..\obj.net\$(MSBuildProjectName)\ + $(MSBuildProjectName.Replace(".","_").Replace("_net","")) + 12.0 + enable + disable + JC-Soft + Joe Care + Copyright © JC-Soft 2024 + + \ No newline at end of file diff --git a/CSharpBible/Games/MVVM_TiledDisplay_net/App.xaml.cs b/CSharpBible/Games/MVVM_TiledDisplay_net/App.xaml.cs index f660b9158..056f985fa 100644 --- a/CSharpBible/Games/MVVM_TiledDisplay_net/App.xaml.cs +++ b/CSharpBible/Games/MVVM_TiledDisplay_net/App.xaml.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Threading.Tasks; -using System.Windows; +using System.Windows; namespace MVVM_TiledDisplay { diff --git a/CSharpBible/Games/MVVM_TiledDisplay_net/MVVM_TiledDisplay_net.csproj b/CSharpBible/Games/MVVM_TiledDisplay_net/MVVM_TiledDisplay_net.csproj index 4ddb356d8..14ad9931c 100644 --- a/CSharpBible/Games/MVVM_TiledDisplay_net/MVVM_TiledDisplay_net.csproj +++ b/CSharpBible/Games/MVVM_TiledDisplay_net/MVVM_TiledDisplay_net.csproj @@ -1,33 +1,27 @@  - - - WinExe - net6.0-windows - enable - true - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\bin\$(MSBuildProjectName) - JC-Soft - Copyright © 2022 by JC-Soft - - - - - $(MSBuildProjectName.Replace(" ", "_").Replace("_net","") ) - $(MSBuildProjectName) - - - - - - - - - - - - - + + + WinExe + net6.0-windows;net7.0-windows;net8.0-windows + true + + + + + $(MSBuildProjectName.Replace(" ", "_").Replace("_net","") ) + $(MSBuildProjectName) + + + + + + + + + + + + + diff --git a/CSharpBible/Games/MVVM_TiledDisplay_net/MainWindow.xaml.cs b/CSharpBible/Games/MVVM_TiledDisplay_net/MainWindow.xaml.cs index c87517d2e..d1ef11f05 100644 --- a/CSharpBible/Games/MVVM_TiledDisplay_net/MainWindow.xaml.cs +++ b/CSharpBible/Games/MVVM_TiledDisplay_net/MainWindow.xaml.cs @@ -1,17 +1,4 @@ -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; +using System.Windows; namespace MVVM_TiledDisplay { diff --git a/CSharpBible/Games/MVVM_TiledDisplay_net/View/Converter/PositionConverter.cs b/CSharpBible/Games/MVVM_TiledDisplay_net/View/Converter/PositionConverter.cs index 6f7f37244..103be3bfb 100644 --- a/CSharpBible/Games/MVVM_TiledDisplay_net/View/Converter/PositionConverter.cs +++ b/CSharpBible/Games/MVVM_TiledDisplay_net/View/Converter/PositionConverter.cs @@ -1,10 +1,6 @@ using System; -using System.Collections.Generic; using System.ComponentModel; using System.Globalization; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows; using System.Windows.Data; diff --git a/CSharpBible/Games/MVVM_TiledDisplay_net/View/MainView.xaml.cs b/CSharpBible/Games/MVVM_TiledDisplay_net/View/MainView.xaml.cs index 3427d6dc5..a94e4ba6e 100644 --- a/CSharpBible/Games/MVVM_TiledDisplay_net/View/MainView.xaml.cs +++ b/CSharpBible/Games/MVVM_TiledDisplay_net/View/MainView.xaml.cs @@ -1,17 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; +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_TiledDisplay.View { diff --git a/CSharpBible/Games/MVVM_TiledDisplay_net/View/TileView.xaml.cs b/CSharpBible/Games/MVVM_TiledDisplay_net/View/TileView.xaml.cs index 3f8cc77ea..2a7231a31 100644 --- a/CSharpBible/Games/MVVM_TiledDisplay_net/View/TileView.xaml.cs +++ b/CSharpBible/Games/MVVM_TiledDisplay_net/View/TileView.xaml.cs @@ -1,19 +1,8 @@ using MVVM_TiledDisplay.View.Converter; using MVVM_TiledDisplay.ViewModel; 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_TiledDisplay.View { @@ -30,11 +19,12 @@ public TileView() InitializeComponent(); this.SizeChanged += (object sender, SizeChangedEventArgs evt) => { - (this.Resources["positionConverter"] as PositionConverter).WindowSize = evt.NewSize; + if (this.Resources["positionConverter"] is PositionConverter pc) + pc.WindowSize = evt.NewSize; }; } - private void Storyboard_Completed(object sender, EventArgs e) => (this.DataContext as TileViewViewModel).Storyboard_Completed(sender, e); + private void Storyboard_Completed(object sender, EventArgs e) => (this.DataContext as TileViewViewModel)?.Storyboard_Completed(sender, e); } } diff --git a/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModel/MainWindowViewModel.cs b/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModel/MainWindowViewModel.cs deleted file mode 100644 index 3187b1645..000000000 --- a/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModel/MainWindowViewModel.cs +++ /dev/null @@ -1,20 +0,0 @@ -using MVVM.ViewModel; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace MVVM_TiledDisplay.ViewModel -{ - /// Class MainWindowViewMode. - /// Implements the - /// - /// - /// - public class MainWindowViewModel : BaseViewModel - { - - } - -} diff --git a/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModel/TileData.cs b/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModel/TileData.cs deleted file mode 100644 index 46987484d..000000000 --- a/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModel/TileData.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Drawing; - -namespace MVVM_TiledDisplay.ViewModel -{ - /// - /// Struct TileData - /// - public struct TileData - { - /// - /// The index - /// - public int Idx; - /// - /// The position - /// - public PointF position; - /// - /// The destination - /// - public Point destination; - /// - /// The tile type - /// - public int tileType; - } -} diff --git a/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModel/MainViewViewModel.cs b/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModels/MainViewViewModel.cs similarity index 86% rename from CSharpBible/Games/MVVM_TiledDisplay_net/ViewModel/MainViewViewModel.cs rename to CSharpBible/Games/MVVM_TiledDisplay_net/ViewModels/MainViewViewModel.cs index 2f48ec0d7..fdcacc6a8 100644 --- a/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModel/MainViewViewModel.cs +++ b/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModels/MainViewViewModel.cs @@ -1,40 +1,36 @@ -using MVVM.ViewModel; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace MVVM_TiledDisplay.ViewModel -{ - /// - /// Class MainViewViewModel. - /// Implements the - /// - /// - public class MainViewViewModel : BaseViewModel - { - #region Properties - public DelegateCommand cmdButton { get; set; } - public event EventHandler SetFrame = default; - #endregion - - #region Methods - public MainViewViewModel() - { - cmdButton = new DelegateCommand(DoCmdButton, CanDoCmdButton); - } - - private bool CanDoCmdButton(object obj) - { - return true; - } - - private void DoCmdButton(object obj) - { - if (obj is string s) - SetFrame?.Invoke(this, s); - } - #endregion - } -} +using MVVM.ViewModel; +using System; + +namespace MVVM_TiledDisplay.ViewModel +{ + /// + /// Class MainViewViewModel. + /// Implements the + /// + /// + public class MainViewViewModel : BaseViewModel + { + #region Properties + public DelegateCommand cmdButton { get; set; } + public event EventHandler SetFrame = default; + #endregion + + #region Methods + public MainViewViewModel() + { + cmdButton = new DelegateCommand(DoCmdButton, CanDoCmdButton); + } + + private bool CanDoCmdButton(object obj) + { + return true; + } + + private void DoCmdButton(object obj) + { + if (obj is string s) + SetFrame?.Invoke(this, s); + } + #endregion + } +} diff --git a/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModels/MainWindowViewModel.cs b/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModels/MainWindowViewModel.cs new file mode 100644 index 000000000..3f70585a0 --- /dev/null +++ b/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModels/MainWindowViewModel.cs @@ -0,0 +1,15 @@ +using MVVM.ViewModel; + +namespace MVVM_TiledDisplay.ViewModel +{ + /// Class MainWindowViewMode. + /// Implements the + /// + /// + /// + public class MainWindowViewModel : BaseViewModel + { + + } + +} diff --git a/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModel/TileBehavior.cs b/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModels/TileBehavior.cs similarity index 96% rename from CSharpBible/Games/MVVM_TiledDisplay_net/ViewModel/TileBehavior.cs rename to CSharpBible/Games/MVVM_TiledDisplay_net/ViewModels/TileBehavior.cs index 85fd783b1..3b032cbce 100644 --- a/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModel/TileBehavior.cs +++ b/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModels/TileBehavior.cs @@ -1,36 +1,36 @@ -using System.Windows; -using Microsoft.Xaml.Behaviors; - - -namespace MVVM_TiledDisplay.ViewModel -{ - /// - /// Class TileBehavior. - /// Implements the - /// - /// - public class TileBehavior : Behavior - { - - /// - /// 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) => - { - }; - - AssociatedObject.MouseMove += (s, e) => - { - }; - - AssociatedObject.MouseLeftButtonUp += (s, e) => - { - }; - } - } -} +using System.Windows; +using Microsoft.Xaml.Behaviors; + + +namespace MVVM_TiledDisplay.ViewModel +{ + /// + /// Class TileBehavior. + /// Implements the + /// + /// + public class TileBehavior : Behavior + { + + /// + /// 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) => + { + }; + + AssociatedObject.MouseMove += (s, e) => + { + }; + + AssociatedObject.MouseLeftButtonUp += (s, e) => + { + }; + } + } +} diff --git a/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModels/TileData.cs b/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModels/TileData.cs new file mode 100644 index 000000000..7a6007a61 --- /dev/null +++ b/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModels/TileData.cs @@ -0,0 +1,27 @@ +using System.Drawing; + +namespace MVVM_TiledDisplay.ViewModel +{ + /// + /// Struct TileData + /// + public struct TileData + { + /// + /// The index + /// + public int Idx; + /// + /// The position + /// + public PointF position; + /// + /// The destination + /// + public Point destination; + /// + /// The tile type + /// + public int tileType; + } +} diff --git a/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModel/TileViewViewModel.cs b/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModels/TileViewViewModel.cs similarity index 91% rename from CSharpBible/Games/MVVM_TiledDisplay_net/ViewModel/TileViewViewModel.cs rename to CSharpBible/Games/MVVM_TiledDisplay_net/ViewModels/TileViewViewModel.cs index b0e4f437f..edee1e785 100644 --- a/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModel/TileViewViewModel.cs +++ b/CSharpBible/Games/MVVM_TiledDisplay_net/ViewModels/TileViewViewModel.cs @@ -1,56 +1,52 @@ -using MVVM.ViewModel; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace MVVM_TiledDisplay.ViewModel -{ - /// - /// Class TileViewViewModel. - /// Implements the - /// - /// - public class TileViewViewModel : BaseViewModel - { - #region Properties - private TileData[] _tiles=new TileData[0]; - /// - /// Gets or sets the tiles. - /// - /// The tiles. - public TileData[] Tiles { get => _tiles; set => SetProperty(ref _tiles, value); } - #endregion - - #region Methods - /// - /// Initializes a new instance of the class. - /// - public TileViewViewModel() - { - var _tiles = new TileData[20]; - for (int i = 0; i < 20; i++) - { - _tiles[i].Idx = i; - _tiles[i].position = - _tiles[i].destination = new System.Drawing.Point((i % 5) * 3, (i / 5) * 3); - _tiles[i].tileType = i % 9; - } - Tiles = _tiles; -// Model.Model.PropertyChanged += ModelPropertyChanged; - } - - /// - /// Handles the Completed event of the Storyboard control. - /// - /// The source of the event. - /// The instance containing the event data. - internal void Storyboard_Completed(object sender, EventArgs e) - { - - } - - #endregion - } -} +using MVVM.ViewModel; +using System; + +namespace MVVM_TiledDisplay.ViewModel +{ + /// + /// Class TileViewViewModel. + /// Implements the + /// + /// + public class TileViewViewModel : BaseViewModel + { + #region Properties + private TileData[] _tiles=new TileData[0]; + /// + /// Gets or sets the tiles. + /// + /// The tiles. + public TileData[] Tiles { get => _tiles; set => SetProperty(ref _tiles, value); } + #endregion + + #region Methods + /// + /// Initializes a new instance of the class. + /// + public TileViewViewModel() + { + var _tiles = new TileData[20]; + for (int i = 0; i < 20; i++) + { + _tiles[i].Idx = i; + _tiles[i].position = + _tiles[i].destination = new System.Drawing.Point((i % 5) * 3, (i / 5) * 3); + _tiles[i].tileType = i % 9; + } + Tiles = _tiles; +// Model.Model.PropertyChanged += ModelPropertyChanged; + } + + /// + /// Handles the Completed event of the Storyboard control. + /// + /// The source of the event. + /// The instance containing the event data. + internal void Storyboard_Completed(object sender, EventArgs e) + { + + } + + #endregion + } +} diff --git a/CSharpBible/Games/ReadMe.md b/CSharpBible/Games/ReadMe.md index 91fe1141c..461f9c8ae 100644 --- a/CSharpBible/Games/ReadMe.md +++ b/CSharpBible/Games/ReadMe.md @@ -13,3 +13,6 @@ Stack all blocks together, full lines will be removed.
## Werner Flaschbier Bring Werner(player) to the Flaschbier(destination) and avoid enemies, and falling stones
+ +## Snake +Eat all the apples, but don't eat yourself
diff --git a/CSharpBible/Games/Resources/Cards.PNG b/CSharpBible/Games/Resources/Cards.PNG new file mode 100644 index 000000000..017112c39 Binary files /dev/null and b/CSharpBible/Games/Resources/Cards.PNG differ diff --git a/CSharpBible/Games/Snake_Base/Model/Apple.cs b/CSharpBible/Games/Snake_Base/Model/Apple.cs index 79ad383c7..969e7486e 100644 --- a/CSharpBible/Games/Snake_Base/Model/Apple.cs +++ b/CSharpBible/Games/Snake_Base/Model/Apple.cs @@ -11,12 +11,7 @@ // // // *********************************************************************** -using System; -using System.Collections.Generic; using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; /// /// The Model namespace. diff --git a/CSharpBible/Games/Snake_Base/Model/Playfield2D.cs b/CSharpBible/Games/Snake_Base/Model/Playfield2D.cs index 25c41f775..1188f91d0 100644 --- a/CSharpBible/Games/Snake_Base/Model/Playfield2D.cs +++ b/CSharpBible/Games/Snake_Base/Model/Playfield2D.cs @@ -38,7 +38,7 @@ public class Playfield2D: IHasChildren where T : class /// The pf data /// /// - private Dictionary _pfData = new Dictionary(); + private readonly Dictionary _pfData = new Dictionary(); /// /// The pf rect /// @@ -55,7 +55,7 @@ public class Playfield2D: IHasChildren where T : class /// Gets or sets the size of the pf. ///
/// The size of the pf. - public Size PfSize { get => _pfRect.Size; set => Property.SetProperty(ref _pfSize, value, PfResize); } + public Size PfSize { get => _pfRect.Size; set => value.SetProperty(ref _pfSize, PfResize); } /// /// Gets the rect. /// @@ -69,7 +69,7 @@ public class Playfield2D: IHasChildren where T : class /// /// Occurs when [on data changed]. /// - public event EventHandler<(string prop,object? oldVal,object? newVal)> OnDataChanged; + public event EventHandler<(string prop,object? oldVal,object? newVal)>? OnDataChanged; /// /// Gets or sets the default size. @@ -88,7 +88,7 @@ public T? this[Point P] { if (IsInside(P)) { - if (EqualityComparer.Default.Equals(this[P], value)) return; + if (EqualityComparer.Default.Equals(this[P], value)) return; if (value is IPlacedObject plo) { #if NET6_0_OR_GREATER @@ -98,7 +98,7 @@ public T? this[Point P] #endif plo.OnPlaceChange += ChildPlaceChanged; } - if (value is IParentedObject && EqualityComparer.Default.Equals(this[P], value)) return; + if (value is IParentedObject && EqualityComparer.Default.Equals(this[P], value)) return; if (value != null) { _pfData[P] = value; @@ -180,9 +180,9 @@ public bool AddItem(T value) bool result = false; if (value is IPlacedObject po #if NET6_0_OR_GREATER - && !EqualityComparer.Default.Equals(this[po.Place], value)) + && !EqualityComparer.Default.Equals(this[po.Place], value)) #else - && !EqualityComparer.Default.Equals(this[po.GetPlace()], value)) + && !EqualityComparer.Default.Equals(this[po.GetPlace()], value)) #endif { #if NET6_0_OR_GREATER @@ -202,7 +202,7 @@ public bool AddItem(T value) /// /// The value. /// true if XXXX, false otherwise. - public bool RemoveItem(T value) + public bool RemoveItem(T? value) { if (value is IPlacedObject plo) { @@ -260,7 +260,7 @@ private void ChildPlaceChanged(object? sender, (Point oP, Point nP) e) { if (sender is T tObj) { - if (EqualityComparer.Default.Equals(this[e.oP], tObj)) + if (EqualityComparer.Default.Equals(this[e.oP], tObj)) _pfData.Remove(e.oP); if (this[e.nP] == null) _pfData.Add(e.nP, tObj); diff --git a/CSharpBible/Games/Snake_Base/Model/Snake.cs b/CSharpBible/Games/Snake_Base/Model/Snake.cs index 66786c15d..704790619 100644 --- a/CSharpBible/Games/Snake_Base/Model/Snake.cs +++ b/CSharpBible/Games/Snake_Base/Model/Snake.cs @@ -11,7 +11,7 @@ // // // *********************************************************************** -using Baselib.Model; +using BaseLib.Model; using BaseLib.Helper; using BaseLib.Interfaces; using System; @@ -52,7 +52,7 @@ public class SnakeBodyPart : SnakeGameObject, IParentedObject /// /// The value. /// The caller member. - public void SetParent(Snake? value, [CallerMemberName] string CallerMember = "") => Property.SetProperty(ref _snParent, value, null, CallerMember); + public void SetParent(Snake? value, [CallerMemberName] string CallerMember = "") => value.SetProperty(ref _snParent, null, CallerMember); /// /// Gets or sets the next part. diff --git a/CSharpBible/Games/Snake_Base/Model/SnakeGameObject.cs b/CSharpBible/Games/Snake_Base/Model/SnakeGameObject.cs index c38514819..b14417dd7 100644 --- a/CSharpBible/Games/Snake_Base/Model/SnakeGameObject.cs +++ b/CSharpBible/Games/Snake_Base/Model/SnakeGameObject.cs @@ -121,7 +121,7 @@ public SnakeGameObject(Point place, Playfield2D? parent=null) { /// /// The value. /// The name. - public virtual void SetPlace(Point value, [CallerMemberName] string Name = "") => Property.SetProperty(ref _place, value,NtfyPlaceChange,Name); + public virtual void SetPlace(Point value, [CallerMemberName] string Name = "") => value.SetProperty(ref _place, NtfyPlaceChange, Name); /// /// Gets the parent. @@ -134,7 +134,7 @@ public SnakeGameObject(Point place, Playfield2D? parent=null) { /// The value. /// The caller member. public virtual void SetParent(Playfield2D? value, [CallerMemberName] string CallerMember = "") => - Property.SetProperty(ref _pfParent, value, NtfyParentChange, CallerMember); + value.SetProperty(ref _pfParent, NtfyParentChange, CallerMember); #endregion /// diff --git a/CSharpBible/Games/Snake_Base/Snake_Base.csproj b/CSharpBible/Games/Snake_Base/Snake_Base.csproj index 1a327106f..50b421e08 100644 --- a/CSharpBible/Games/Snake_Base/Snake_Base.csproj +++ b/CSharpBible/Games/Snake_Base/Snake_Base.csproj @@ -1,15 +1,8 @@  - + + Library - net48;net472;net461 - disable - 8.0 - enable - ..\..\..\obj\$(MSBuildProjectName)\ - ..\..\..\obj\$(MSBuildProjectName)\ - ..\..\..\bin\$(MSBuildProjectName) - JC-Soft - Copyright © 2022 by JC-Soft + net481;net48;net472;net462 @@ -18,7 +11,7 @@ - + diff --git a/CSharpBible/Games/Snake_Base/Snake_Base_net.csproj b/CSharpBible/Games/Snake_Base/Snake_Base_net.csproj index 01562178b..73a3152f3 100644 --- a/CSharpBible/Games/Snake_Base/Snake_Base_net.csproj +++ b/CSharpBible/Games/Snake_Base/Snake_Base_net.csproj @@ -1,24 +1,17 @@  - - Library - net6.0 - disable - enable - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\bin\$(MSBuildProjectName) - JC-Soft - Copyright © 2022 by JC-Soft - - - - - - - - - - - - + + + Library + net6.0;net7.0;net8.0 + + + + + + + + + + + diff --git a/CSharpBible/Games/Snake_Base/ViewModel/Game.cs b/CSharpBible/Games/Snake_Base/ViewModel/Game.cs deleted file mode 100644 index aee0de94a..000000000 --- a/CSharpBible/Games/Snake_Base/ViewModel/Game.cs +++ /dev/null @@ -1,217 +0,0 @@ -// *********************************************************************** -// Assembly : Snake_Base -// Author : Mir -// Created : 08-25-2022 -// -// Last Modified By : Mir -// Last Modified On : 09-09-2022 -// *********************************************************************** -// -// Copyright (c) JC-Soft. All rights reserved. -// -// -// *********************************************************************** -using Snake_Base.Model; -using System; -using System.Drawing; - -/// -/// The ViewModel namespace. -/// -/// -namespace Snake_Base.ViewModel -{ - /// - /// Class Game. - /// - public class Game - { - #region Properties - #region private Properties - /// - /// The random - /// - /// - private static Random? _rnd; - #endregion - /// - /// Gets or sets the playfield. - /// - /// The playfield. - public Playfield2D Playfield { get; set; } = new Playfield2D(); - /// - /// Gets or sets the snake. - /// - /// The snake. - public Snake Snake { get; set; } - /// - /// The get next random - /// - public Func GetNextRnd = (i) => (_rnd ?? (_rnd = new Random())).Next(i); - public int Level; - public Action visUpdate; - public Action visFullRedraw; - private Direction sDir; - private bool _userQuit = false; - private bool xHalfStep; - public static readonly object MaxLives; - - /// - /// Gets the with the specified p. - /// - /// The p. - /// Tiles. - public Tiles this[Point p] => GetTile(p); - - /// - /// Gets a value indicating whether this instance is running. - /// - /// true if this instance is running; otherwise, false. - public bool IsRunning => Snake.alive && !_userQuit; - - public object Score { get; set; } - public object Lives { get; set; } - public Size size { get => new Size(Playfield.PfSize.Width+2,Playfield.PfSize.Height+2); } - #endregion - - #region Methods - /// - /// Initializes a new instance of the class. - /// - public Game() - { - _rnd = new Random(); - Playfield.PfSize = new Size(20, 20); - Playfield.OnDataChanged += PfDataChange; - SnakeGameObject.DefaultParent = Playfield; - Snake = new Snake(new Point(10,10)); - Snake.OnSnakeEatsApple += OnSnakeEatsApple; - } - - private void OnSnakeEatsApple(object? sender, EventArgs e) - { - NewApple(); - } - - private void NewApple() - { - // Getplace for apple - Point p; - // Get Random Startplace - var w = Playfield.PfSize.Width; - var sp = _rnd.Next(Playfield.PfSize.Height * w); - while (Playfield[p=new Point(sp % w,sp / w)]!=null) - sp++; - // - var a=new Apple(p, Playfield); - a.ResetOldPlace(); - } - - /// - /// Pfs the data change. - /// - /// The sender. - /// The e. - /// - /// - private void PfDataChange(object? sender, (string prop, object? oldVal, object? newVal) e) - { - // throw new NotImplementedException(); - } - - /// - /// Games the step. - /// - /// System.Int32. - public int GameStep() - { - xHalfStep = !xHalfStep; - if (xHalfStep) - { - foreach (var i in Playfield.Items) - i.ResetOldPlace(); - Snake.SnakeMove(sDir); - } - visUpdate?.Invoke(this, xHalfStep); - return 150; - } - - /// - /// Gets the tile. - /// - /// The p. - /// Tiles. - public Tiles GetTile(Point p) - { - Tiles result = Tiles.Empty; - var field = Playfield[p]; - switch(field) - { - case Apple a: result = Tiles.Apple; break; - case SnakeHead sh: - { - var np = Point.Subtract(sh.Place, (Size)sh.NextPart?.Place); - switch ((np.X, np.Y)) - { - case (1, 0): result = Tiles.SnakeHead_E; break; - case (-1, 0): result = Tiles.SnakeHead_W; break; - case (0, 1): result = Tiles.SnakeHead_S; break; - case (0, -1): result = Tiles.SnakeHead_N; break; - } - break; - } - case SnakeTail st: { - var np = Point.Subtract(st.Place, (Size)st.PrevPart?.Place); - switch ((np.X, np.Y)) - { - case (1, 0): result = Tiles.SnakeTail_W; break; - case (-1, 0): result = Tiles.SnakeTail_E; break; - case (0, 1): result = Tiles.SnakeTail_N; break; - case (0, -1): result = Tiles.SnakeTail_S; break; - } - break; } - case SnakeBodyPart sb: { - var nx = Point.Subtract(sb.Place, (Size)sb.NextPart?.Place); - var np = Point.Subtract(sb.Place, (Size)sb.PrevPart?.Place); - switch ((np.X+nx.X, np.Y+nx.Y)) - { - case (0, 0) when nx.Y==0: result = Tiles.SnakeBody_WE; break; - case (0, 0) when nx.X == 0: result = Tiles.SnakeBody_NS; break; - case (1, 1): result = Tiles.SnakeBody_NE; break; - case (-1, 1): result = Tiles.SnakeBody_NW; break; - case (-1, -1): result = Tiles.SnakeBody_SW; break; - case (1, -1): result = Tiles.SnakeBody_SE; break; - } - break; - } - default: - if (Playfield.IsInside(p)) - result = Tiles.Empty; - else - result = Tiles.Wall; - break; - } - return result; - } - - public Point OldPos(Point arg) - { - return Playfield[arg]?.OldPlace ?? arg; - } - - public void HandleUserAct(UserAction action) { - if (action <= UserAction.GoEast) - sDir = (Direction)action; - else if (action <= UserAction.Quit) - _userQuit = true; - } - - public void Setup(int v) - { - NewApple(); - //throw new NotImplementedException(); - } - - #endregion - } -} diff --git a/CSharpBible/Games/Snake_Base/ViewModel/Tiles.cs b/CSharpBible/Games/Snake_Base/ViewModel/Tiles.cs deleted file mode 100644 index 63a2a4e15..000000000 --- a/CSharpBible/Games/Snake_Base/ViewModel/Tiles.cs +++ /dev/null @@ -1,97 +0,0 @@ -// *********************************************************************** -// Assembly : Snake_Base -// Author : Mir -// Created : 08-26-2022 -// -// Last Modified By : Mir -// Last Modified On : 09-09-2022 -// *********************************************************************** -// -// Copyright (c) JC-Soft. All rights reserved. -// -// -// *********************************************************************** -using Snake_Base.Model; - -/// -/// The ViewModel namespace. -/// -/// -namespace Snake_Base.ViewModel -{ - /// - /// Enum Tiles - /// - public enum Tiles - { - /// - /// The empty field - /// - Empty, //0 - /// - /// The wall - /// - Wall, //1 - /// - /// The apple - /// - Apple, //2 - /// - /// The snake head north - /// - SnakeHead_N,//3 - /// - /// The snake tail north - /// - SnakeTail_N,//4 - /// - /// The snake body north-south - /// - SnakeBody_NS,//5 - /// - /// The snake head west - /// - SnakeHead_W, - /// - /// The snake head south - /// - SnakeHead_S, - /// - /// The snake head east - /// - SnakeHead_E, - /// - /// The snake tail west - /// - SnakeTail_W, - /// - /// The snake tail south - /// - SnakeTail_S, - /// - /// The snake tail east - /// - SnakeTail_E, - /// - /// The snake body north-west - /// - SnakeBody_NW, - /// - /// The snake body south-west - /// - SnakeBody_SW, - /// - /// The snake body south-east - /// - SnakeBody_SE, - /// - /// The snake body north-east - /// - SnakeBody_NE, - /// - /// The snake body west-east - /// - SnakeBody_WE, - }; - -} diff --git a/CSharpBible/Games/Snake_Base/ViewModel/UserAction.cs b/CSharpBible/Games/Snake_Base/ViewModel/UserAction.cs deleted file mode 100644 index c15be06e5..000000000 --- a/CSharpBible/Games/Snake_Base/ViewModel/UserAction.cs +++ /dev/null @@ -1,76 +0,0 @@ -// *********************************************************************** -// Assembly : Werner_Flaschbier_Base -// Author : Mir -// Created : 08-06-2022 -// -// Last Modified By : Mir -// Last Modified On : 09-09-2022 -// *********************************************************************** -// -// Copyright (c) JC-Soft. All rights reserved. -// -// -// *********************************************************************** -using Snake_Base.Model; - -namespace Snake_Base.ViewModel -{ - - /// - /// Enum UserAction - /// - public enum UserAction - { - /// - /// The go up - /// - GoNorth = Direction.North, - /// - /// The go west - /// - GoWest = Direction.West, - /// - /// The go down - /// - GoSouth = Direction.South, - /// - /// The go east - /// - GoEast = Direction.East, - /// - /// The quit - /// - Quit, - /// - /// The help - /// - Help, - /// - /// The restart - /// - Restart, - /// - /// The nop - /// - Nop - } - - /// - /// Enum GameSound - /// - public enum GameSound - { - /// - /// The no sound - /// - NoSound, - /// - /// The deep boom - /// - DeepBoom, - /// - /// The tick - /// - Tick - } -} diff --git a/CSharpBible/Games/Snake_Base/ViewModels/Game.cs b/CSharpBible/Games/Snake_Base/ViewModels/Game.cs new file mode 100644 index 000000000..5b9c00c17 --- /dev/null +++ b/CSharpBible/Games/Snake_Base/ViewModels/Game.cs @@ -0,0 +1,218 @@ +// *********************************************************************** +// Assembly : Snake_Base +// Author : Mir +// Created : 08-25-2022 +// +// Last Modified By : Mir +// Last Modified On : 09-09-2022 +// *********************************************************************** +// +// Copyright (c) JC-Soft. All rights reserved. +// +// +// *********************************************************************** +using Snake_Base.Model; +using System; +using System.Drawing; + +/// +/// The ViewModel namespace. +/// +/// +namespace Snake_Base.ViewModel +{ + /// + /// Class Game. + /// + public class Game + { + #region Properties + #region private Properties + /// + /// The random + /// + /// + private static Random? _rnd; + #endregion + /// + /// Gets or sets the playfield. + /// + /// The playfield. + public Playfield2D Playfield { get; set; } = new Playfield2D(); + /// + /// Gets or sets the snake. + /// + /// The snake. + public Snake Snake { get; set; } + /// + /// The get next random + /// + public Func GetNextRnd = (i) => (_rnd ??= new Random()).Next(i); + public int Level; + public Action? visUpdate; + public Action? visFullRedraw; + private Direction sDir; + private bool _userQuit = false; + private bool xHalfStep; + public static readonly object? MaxLives; + + /// + /// Gets the with the specified p. + /// + /// The p. + /// Tiles. + public Tiles this[Point p] => GetTile(p); + + /// + /// Gets a value indicating whether this instance is running. + /// + /// true if this instance is running; otherwise, false. + public bool IsRunning => Snake.alive && !_userQuit; + + public object? Score { get; set; } + public object? Lives { get; set; } + public Size size { get => new Size(Playfield.PfSize.Width+2,Playfield.PfSize.Height+2); } + #endregion + + #region Methods + /// + /// Initializes a new instance of the class. + /// + public Game() + { + _rnd = new Random(); + Playfield.PfSize = new Size(20, 20); + Playfield.OnDataChanged += PfDataChange; + SnakeGameObject.DefaultParent = Playfield; + Snake = new Snake(new Point(10,10)); + Snake.OnSnakeEatsApple += OnSnakeEatsApple; + } + + private void OnSnakeEatsApple(object? sender, EventArgs e) + { + NewApple(); + } + + private void NewApple() + { + // Getplace for apple + Point p; + // Get Random Startplace + var w = Playfield.PfSize.Width; + var sp = _rnd?.Next(Playfield.PfSize.Height * w)??0; + while (Playfield[p=new Point(sp % w,sp / w)]!=null) + sp++; + // + var a=new Apple(p, Playfield); + a.ResetOldPlace(); + } + + /// + /// Pfs the data change. + /// + /// The sender. + /// The e. + /// + /// + private void PfDataChange(object? sender, (string prop, object? oldVal, object? newVal) e) + { + // throw new NotImplementedException(); + } + + /// + /// Games the step. + /// + /// System.Int32. + public int GameStep() + { + xHalfStep = !xHalfStep; + if (xHalfStep) + { + foreach (var i in Playfield.Items) + i.ResetOldPlace(); + Snake.SnakeMove(sDir); + } + visUpdate?.Invoke(this, xHalfStep); + return 150; + } + + /// + /// Gets the tile. + /// + /// The p. + /// Tiles. + public Tiles GetTile(Point p) + { + Tiles result = Tiles.Empty; + var field = Playfield[p]; + switch(field) + { + case Apple: + result = Tiles.Apple; break; + case SnakeHead sh: + { + var np = Point.Subtract(sh.Place, (Size?)sh.NextPart?.Place??Size.Empty); + switch ((np.X, np.Y)) + { + case (1, 0): result = Tiles.SnakeHead_E; break; + case (-1, 0): result = Tiles.SnakeHead_W; break; + case (0, 1): result = Tiles.SnakeHead_S; break; + case (0, -1): result = Tiles.SnakeHead_N; break; + } + break; + } + case SnakeTail st: { + var np = Point.Subtract(st.Place, (Size?)st.PrevPart?.Place??Size.Empty); + switch ((np.X, np.Y)) + { + case (1, 0): result = Tiles.SnakeTail_W; break; + case (-1, 0): result = Tiles.SnakeTail_E; break; + case (0, 1): result = Tiles.SnakeTail_N; break; + case (0, -1): result = Tiles.SnakeTail_S; break; + } + break; } + case SnakeBodyPart sb: { + var nx = Point.Subtract(sb.Place, (Size?)sb.NextPart?.Place ?? Size.Empty); + var np = Point.Subtract(sb.Place, (Size?)sb.PrevPart?.Place ?? Size.Empty); + switch ((np.X+nx.X, np.Y+nx.Y)) + { + case (0, 0) when nx.Y==0: result = Tiles.SnakeBody_WE; break; + case (0, 0) when nx.X == 0: result = Tiles.SnakeBody_NS; break; + case (1, 1): result = Tiles.SnakeBody_NE; break; + case (-1, 1): result = Tiles.SnakeBody_NW; break; + case (-1, -1): result = Tiles.SnakeBody_SW; break; + case (1, -1): result = Tiles.SnakeBody_SE; break; + } + break; + } + default: + if (Playfield.IsInside(p)) + result = Tiles.Empty; + else + result = Tiles.Wall; + break; + } + return result; + } + + public Point OldPos(Point arg) + { + return Playfield[arg]?.OldPlace ?? arg; + } + + public void HandleUserAct(UserAction action) { + if (action <= UserAction.GoEast) + sDir = (Direction)action; + else if (action <= UserAction.Quit) + _userQuit = true; + } + + public void Setup(int v) + { + NewApple(); + //throw new NotImplementedException(); + } + + #endregion + } +} diff --git a/CSharpBible/Games/Snake_Base/ViewModels/Tiles.cs b/CSharpBible/Games/Snake_Base/ViewModels/Tiles.cs new file mode 100644 index 000000000..373f6a0db --- /dev/null +++ b/CSharpBible/Games/Snake_Base/ViewModels/Tiles.cs @@ -0,0 +1,95 @@ +// *********************************************************************** +// Assembly : Snake_Base +// Author : Mir +// Created : 08-26-2022 +// +// Last Modified By : Mir +// Last Modified On : 09-09-2022 +// *********************************************************************** +// +// Copyright (c) JC-Soft. All rights reserved. +// +// +// *********************************************************************** +/// +/// The ViewModel namespace. +/// +/// +namespace Snake_Base.ViewModel +{ + /// + /// Enum Tiles + /// + public enum Tiles + { + /// + /// The empty field + /// + Empty, //0 + /// + /// The wall + /// + Wall, //1 + /// + /// The apple + /// + Apple, //2 + /// + /// The snake head north + /// + SnakeHead_N,//3 + /// + /// The snake tail north + /// + SnakeTail_N,//4 + /// + /// The snake body north-south + /// + SnakeBody_NS,//5 + /// + /// The snake head west + /// + SnakeHead_W, + /// + /// The snake head south + /// + SnakeHead_S, + /// + /// The snake head east + /// + SnakeHead_E, + /// + /// The snake tail west + /// + SnakeTail_W, + /// + /// The snake tail south + /// + SnakeTail_S, + /// + /// The snake tail east + /// + SnakeTail_E, + /// + /// The snake body north-west + /// + SnakeBody_NW, + /// + /// The snake body south-west + /// + SnakeBody_SW, + /// + /// The snake body south-east + /// + SnakeBody_SE, + /// + /// The snake body north-east + /// + SnakeBody_NE, + /// + /// The snake body west-east + /// + SnakeBody_WE, + }; + +} diff --git a/CSharpBible/Games/Snake_Base/ViewModels/UserAction.cs b/CSharpBible/Games/Snake_Base/ViewModels/UserAction.cs new file mode 100644 index 000000000..174b14b0f --- /dev/null +++ b/CSharpBible/Games/Snake_Base/ViewModels/UserAction.cs @@ -0,0 +1,76 @@ +// *********************************************************************** +// Assembly : Werner_Flaschbier_Base +// Author : Mir +// Created : 08-06-2022 +// +// Last Modified By : Mir +// Last Modified On : 09-09-2022 +// *********************************************************************** +// +// Copyright (c) JC-Soft. All rights reserved. +// +// +// *********************************************************************** +using Snake_Base.Model; + +namespace Snake_Base.ViewModel +{ + + /// + /// Enum UserAction + /// + public enum UserAction + { + /// + /// The go up + /// + GoNorth = Direction.North, + /// + /// The go west + /// + GoWest = Direction.West, + /// + /// The go down + /// + GoSouth = Direction.South, + /// + /// The go east + /// + GoEast = Direction.East, + /// + /// The quit + /// + Quit, + /// + /// The help + /// + Help, + /// + /// The restart + /// + Restart, + /// + /// The nop + /// + Nop + } + + /// + /// Enum GameSound + /// + public enum GameSound + { + /// + /// The no sound + /// + NoSound, + /// + /// The deep boom + /// + DeepBoom, + /// + /// The tick + /// + Tick + } +} diff --git a/CSharpBible/Games/Snake_BaseTests/Model/AppleTests.cs b/CSharpBible/Games/Snake_BaseTests/Model/AppleTests.cs index a40b66b3e..905a8cfa8 100644 --- a/CSharpBible/Games/Snake_BaseTests/Model/AppleTests.cs +++ b/CSharpBible/Games/Snake_BaseTests/Model/AppleTests.cs @@ -49,11 +49,7 @@ public class AppleTests /// /// private readonly string cExpResult2 = "DataChange: Snake_Base.Model.Playfield2D`1[Snake_Base.Model.SnakeGameObject]\to:\tn:Snake_Base.Model.Apple\tp:Items\r\n"; - /// - /// The c exp result3 - /// - /// - private readonly string cExpResult3 =""; + /// /// The c exp result4 /// @@ -90,7 +86,7 @@ public void AppleTest2() { Point pp = Point.Empty; var _testApple = new Apple(pp=new Point(1,2),plf); - Assert.AreEqual(_testApple, plf[pp]); + Assert.AreEqual(_testApple, plf?[pp]); Assert.AreEqual(cExpResult2, ResultData); } @@ -102,9 +98,9 @@ public void AppleTest1() { Point pp = Point.Empty; var _testApple = new Apple(pp = new Point(2, 1)); - Assert.AreEqual(null, plf[pp]); + Assert.AreEqual(null, plf?[pp]); _testApple.Parent = plf; - Assert.AreEqual(_testApple, plf[pp]); + Assert.AreEqual(_testApple, plf?[pp]); Assert.AreEqual(cExpResult1, ResultData); } @@ -117,9 +113,9 @@ public void AppleTest0() Point pp = new Point(2, 0); var _testApple = new Apple(); _testApple.Place = pp; - Assert.AreEqual(null, plf[pp]); + Assert.AreEqual(null, plf?[pp]); _testApple.Parent = plf; - Assert.AreEqual(_testApple, plf[pp]); + Assert.AreEqual(_testApple, plf?[pp]); Assert.AreEqual(cExpResult0, ResultData); } @@ -132,7 +128,7 @@ public void AppleTest4() Apple.DefaultParent = plf; Point pp = Point.Empty; var _testApple = new Apple(pp = new Point(1, 2)); - Assert.AreEqual(_testApple, plf[pp]); + Assert.AreEqual(_testApple, plf?[pp]); Assert.AreEqual(cExpResult4, ResultData); } @@ -145,12 +141,12 @@ public void AppleMoveTest() Apple.DefaultParent = plf; Point pp = Point.Empty; var _testApple = new Apple(pp = new Point(1, 2)); - Assert.AreEqual(_testApple, plf[pp]); + Assert.AreEqual(_testApple, plf?[pp]); Point pp1 = new Point(2, 0); - Assert.AreEqual(null, plf[pp1]); + Assert.AreEqual(null, plf?[pp1]); _testApple.Place = pp1; - Assert.AreEqual(_testApple, plf[pp1]); - Assert.AreEqual(null, plf[pp]); + Assert.AreEqual(_testApple, plf?[pp1]); + Assert.AreEqual(null, plf?[pp]); Assert.AreEqual(cExpResultMove, ResultData); } diff --git a/CSharpBible/Games/Snake_BaseTests/Model/Playfield2DTests.cs b/CSharpBible/Games/Snake_BaseTests/Model/Playfield2DTests.cs index e460016be..6732f4ef4 100644 --- a/CSharpBible/Games/Snake_BaseTests/Model/Playfield2DTests.cs +++ b/CSharpBible/Games/Snake_BaseTests/Model/Playfield2DTests.cs @@ -35,13 +35,13 @@ public class Playfield2DTests /// /// private string ResultData = ""; - private Apple oApple; - private SnakeHead oSHead; - private SnakeBodyPart oSBody1; - private SnakeBodyPart oSBody2; - private SnakeTail oSTail; - private TestItem oTest1; - private TestItem oTest2; + private Apple? _oApple; + private SnakeHead? _oSHead; + private SnakeBodyPart? _oSBody1; + private SnakeBodyPart? _oSBody2; + private SnakeTail? _oSTail; + private TestItem? _oTest1; + private TestItem? _oTest2; /// /// Gets the test playfield. @@ -86,13 +86,13 @@ private void LogOperation(string sOperation, TestItem sender, object? oldVal, ob private void CreateTestData() { - oApple=new Apple(new Point(2, 2), testPlayfield); - oSHead = new SnakeHead(new Point(2, 1),null ,testPlayfield); - oSBody1 = new SnakeBodyPart(new Point(1, 1), null, testPlayfield); - oSBody2 = new SnakeBodyPart(new Point(1, 2), null, testPlayfield); - oSTail = new SnakeTail(new Point(0, 2), null, testPlayfield); - (oTest1 =new TestItem() { _place = new Point(3, 2) }).SetParent(testPlayfield); - (oTest2 =new TestItem() { _place = new Point(3, 1) }).SetParent(testPlayfield); + _oApple=new Apple(new Point(2, 2), testPlayfield); + _oSHead = new SnakeHead(new Point(2, 1),null ,testPlayfield); + _oSBody1 = new SnakeBodyPart(new Point(1, 1), null, testPlayfield); + _oSBody2 = new SnakeBodyPart(new Point(1, 2), null, testPlayfield); + _oSTail = new SnakeTail(new Point(0, 2), null, testPlayfield); + (_oTest1 =new TestItem() { _place = new Point(3, 2) }).SetParent(testPlayfield); + (_oTest2 =new TestItem() { _place = new Point(3, 1) }).SetParent(testPlayfield); } /// @@ -122,7 +122,7 @@ public void AddItemTest1(string sName,int[] p, string tind, string[] sExp) { Type? t = Assembly.GetAssembly(typeof(Playfield2D))?.GetType(tind); t ??= Assembly.GetAssembly(typeof(TestItem))?.GetType(tind); - var _testItem = Activator.CreateInstance(t); + var _testItem = Activator.CreateInstance(t!); (_testItem as IPlacedObject)?.SetPlace(new Point(p[0], p[1])); if (_testItem is IParentedObject i) i.SetParent(testPlayfield); else @@ -146,7 +146,7 @@ public void AddItemTest2(string sName, int[] p, string tind, string[] sExp) { Type? t = Assembly.GetAssembly(typeof(Playfield2D))?.GetType(tind); t ??= Assembly.GetAssembly(typeof(TestItem))?.GetType(tind); - var _testItem = Activator.CreateInstance(t); + var _testItem = Activator.CreateInstance(t!); if (_testItem is IParentedObject i) i.SetParent(testPlayfield); else (_testItem as SnakeGameObject)?.SetParent(testPlayfield); @@ -163,9 +163,9 @@ public void AddItemTest2(string sName, int[] p, string tind, string[] sExp) public void RemoveItemTest() { CreateTestData(); - Assert.AreEqual(true,testPlayfield!.RemoveItem(oApple)); + Assert.AreEqual(true,testPlayfield!.RemoveItem(_oApple)); Assert.AreEqual(null, testPlayfield[new Point(2,2)]); - Assert.AreEqual(false, testPlayfield.RemoveItem(oApple)); + Assert.AreEqual(false, testPlayfield.RemoveItem(_oApple)); } @@ -190,7 +190,7 @@ public void RemoveItemTest() public void GetItemsTest(string name, int[] p, string sExpClass) { CreateTestData(); - Assert.AreEqual(sExpClass, testPlayfield[new Point(p[0], p[1])]?.ToString()??""); + Assert.AreEqual(sExpClass, testPlayfield?[new Point(p[0], p[1])]?.ToString()??""); } /// diff --git a/CSharpBible/Games/Snake_BaseTests/Model/SnakeTests.cs b/CSharpBible/Games/Snake_BaseTests/Model/SnakeTests.cs index d97ab3ff1..9e8a4575b 100644 --- a/CSharpBible/Games/Snake_BaseTests/Model/SnakeTests.cs +++ b/CSharpBible/Games/Snake_BaseTests/Model/SnakeTests.cs @@ -12,13 +12,9 @@ // // *********************************************************************** using Microsoft.VisualStudio.TestTools.UnitTesting; -using Snake_Base.Model; using System; -using System.Collections.Generic; using System.Drawing; using System.Linq; -using System.Text; -using System.Threading.Tasks; /// /// The Tests namespace. diff --git a/CSharpBible/Games/Snake_BaseTests/Snake_Base_netTests.csproj b/CSharpBible/Games/Snake_BaseTests/Snake_Base_netTests.csproj index bcd9f08d3..14dd3bd5a 100644 --- a/CSharpBible/Games/Snake_BaseTests/Snake_Base_netTests.csproj +++ b/CSharpBible/Games/Snake_BaseTests/Snake_Base_netTests.csproj @@ -1,36 +1,29 @@ - - net6.0 - disable - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\bin\$(MSBuildProjectName)\ - enable - false - JC-Soft - Copyright © 2022 by JC-Soft - - - - - - - - + + + net6.0;net7.0;net8.0 + + + + + + + + - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + - - - - + + + + diff --git a/CSharpBible/Games/Snake_BaseTests/ViewModel/GameTests.cs b/CSharpBible/Games/Snake_BaseTests/ViewModels/GameTests.cs similarity index 87% rename from CSharpBible/Games/Snake_BaseTests/ViewModel/GameTests.cs rename to CSharpBible/Games/Snake_BaseTests/ViewModels/GameTests.cs index 203e14ff7..4cc9fcf62 100644 --- a/CSharpBible/Games/Snake_BaseTests/ViewModel/GameTests.cs +++ b/CSharpBible/Games/Snake_BaseTests/ViewModels/GameTests.cs @@ -1,59 +1,53 @@ -// *********************************************************************** -// Assembly : Snake_BaseTests -// Author : Mir -// Created : 10-22-2022 -// -// Last Modified By : Mir -// Last Modified On : 10-22-2022 -// *********************************************************************** -// -// Copyright (c) JC-Soft. All rights reserved. -// -// -// *********************************************************************** -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Snake_Base.ViewModel; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -/// -/// The Tests namespace. -/// -/// -namespace Snake_Base.ViewModel.Tests -{ - /// - /// Defines test class GameTests. - /// - /// - [TestClass()] - public class GameTests - { - /// - /// Defines the test method GameTest. - /// - /// - [TestMethod()] - [TestProperty("Author", "J.C.")] - [TestCategory("Class")] - public void GameTest() - { - Assert.Fail(); - } - - /// - /// Defines the test method GameStepTest. - /// - /// - [TestMethod()] - [TestProperty("Author", "J.C.")] - [TestCategory("Methode")] - public void GameStepTest() - { - Assert.Fail(); - } - } +// *********************************************************************** +// Assembly : Snake_BaseTests +// Author : Mir +// Created : 10-22-2022 +// +// Last Modified By : Mir +// Last Modified On : 10-22-2022 +// *********************************************************************** +// +// Copyright (c) JC-Soft. All rights reserved. +// +// +// *********************************************************************** +using Microsoft.VisualStudio.TestTools.UnitTesting; + +/// +/// The Tests namespace. +/// +/// +namespace Snake_Base.ViewModel.Tests +{ + /// + /// Defines test class GameTests. + /// + /// + [TestClass()] + public class GameTests + { + /// + /// Defines the test method GameTest. + /// + /// + [TestMethod()] + [TestProperty("Author", "J.C.")] + [TestCategory("Class")] + public void GameTest() + { + Assert.Fail(); + } + + /// + /// Defines the test method GameStepTest. + /// + /// + [TestMethod()] + [TestProperty("Author", "J.C.")] + [TestCategory("Methode")] + public void GameStepTest() + { + Assert.Fail(); + } + } } \ No newline at end of file diff --git a/CSharpBible/Games/Snake_Console/Snake_Console.csproj b/CSharpBible/Games/Snake_Console/Snake_Console.csproj index a420ea10c..0b99a3c85 100644 --- a/CSharpBible/Games/Snake_Console/Snake_Console.csproj +++ b/CSharpBible/Games/Snake_Console/Snake_Console.csproj @@ -1,21 +1,14 @@ - - Exe - net48;net472;net461 - disable - 8.0 - enable - ..\..\..\obj\$(MSBuildProjectName)\ - ..\..\..\obj\$(MSBuildProjectName)\ - ..\..\..\bin\$(MSBuildProjectName) - JC-Soft - Copyright © 2022 by JC-Soft - - - - - - - + + + Exe + net481;net48;net472;net462 + + + + + + + diff --git a/CSharpBible/Games/Snake_Console/Snake_Console_net.csproj b/CSharpBible/Games/Snake_Console/Snake_Console_net.csproj index 3802eafc7..9d225a4ec 100644 --- a/CSharpBible/Games/Snake_Console/Snake_Console_net.csproj +++ b/CSharpBible/Games/Snake_Console/Snake_Console_net.csproj @@ -1,14 +1,8 @@ + Exe - net6.0 - enable - enable - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\bin\$(MSBuildProjectName) - JC-Soft - Copyright © 2022 by JC-Soft + net6.0;net7.0;net8.0 diff --git a/CSharpBible/Games/Sokoban/Program.cs b/CSharpBible/Games/Sokoban/Program.cs new file mode 100644 index 000000000..50c14164c --- /dev/null +++ b/CSharpBible/Games/Sokoban/Program.cs @@ -0,0 +1,70 @@ +// *********************************************************************** +// Assembly : Sokoban +// Author : Mir +// Created : 07-09-2022 +// +// Last Modified By : Mir +// Last Modified On : 09-09-2022 +// *********************************************************************** +// +// Copyright © JC-Soft 2022 +// +// +// *********************************************************************** +using Sokoban_Base.Model; +using Sokoban_Base.View; +using Sokoban_Base.ViewModel; + +namespace Sokoban +{ + /// + /// Class Program. + /// + public class Program + { + /// + /// Defines the entry point of the application. + /// + /// The arguments. + public static void Main(string[] args) + { + Init(); + Run(); + Cleanup(); + } + + /// + /// Cleanups this instance. + /// + public static void Cleanup() + { + Game.Cleanup(); + } + + /// + /// Runs this instance. + /// + public static void Run() + { + UserAction? direction = null; + while (direction!=UserAction.Quit && LabDefs.SLevels.Length > Game.level) + { + direction = Game.Run(); + } + + } + + /// + /// Initializes this instance. + /// + public static void Init() + { + Game.Init(); + Game.visSetMessage = (s) => Visuals.Message = s; + Game.visShow = Visuals.Show; + Game.visUpdate = Visuals.Update; + Game.visGetUserAction = Visuals.WaitforUser; + } + + } +} diff --git a/CSharpBible/Games/Sokoban/ReadMe.md b/CSharpBible/Games/Sokoban/ReadMe.md new file mode 100644 index 000000000..bc0e80206 --- /dev/null +++ b/CSharpBible/Games/Sokoban/ReadMe.md @@ -0,0 +1,54 @@ +# ++Sokoban Base++ + + ##### ### ### + ### ### ### ## ### ##### ##### ##### + ### ### ## ### ## ### ## ### ## ### ## ### ## + ### ### ## ##### ### ## ### ## ### ## ### ## + ##### ### ### ## ### ##### ##### ### ## + +## ++Description++ + +This project implements a basic Sokoban-engine (incl. a simple UI) +Sokoban is the game where the player has to move stones/boxes to a given destination. +the stones/boxes can only be moved by pusching. + +--- +## Outline + +The Engine is divided mostly into 3 Parts: +* the Model (containing the basic engine-clases) +* the ViewModel (containing the game-logic) +* the View (containing the UI) +* Resources ( containing the InfoText & the other UI-strings) + +--- +## Model + +In the model-part there are defined several classes and enumerations +* Direction +* FieldDef +* LabDef +* Field + * Wall + * Floor + * ... +* PlayObject + * Player + * Stone +* Playfield + +There is also a class-diagram showing the dependency and inheritence of these classes + +--- +## ViewModel + +The viewmodel ist the interface between the model and the UI. It also contains classes and enumerations: +* Tiledef +* UserAction +* Game + +There is also a class-diagram showing the dependency and inheritence of these classes + +## View + + diff --git a/CSharpBible/Games/Sokoban/Sokoban.csproj b/CSharpBible/Games/Sokoban/Sokoban.csproj new file mode 100644 index 000000000..e900f0166 --- /dev/null +++ b/CSharpBible/Games/Sokoban/Sokoban.csproj @@ -0,0 +1,26 @@ + + + + Exe + net462;net472;net48;net481;net6.0;net7.0;net8.0 + + + + + + + + + + + + + + + + + + + + + diff --git a/CSharpBible/Games/Sokoban_Base/AssemblyInfo.cs b/CSharpBible/Games/Sokoban_Base/AssemblyInfo.cs index 8996ae4e6..30f678039 100644 --- a/CSharpBible/Games/Sokoban_Base/AssemblyInfo.cs +++ b/CSharpBible/Games/Sokoban_Base/AssemblyInfo.cs @@ -12,7 +12,6 @@ // // *********************************************************************** using System.Runtime.InteropServices; -using System.Reflection; // In Projekten im SDK-Stil wie dem vorliegenden, bei dem verschiedene Assemblyattribute // üblicherweise in dieser Datei definiert wurden, werden diese Attribute jetzt während diff --git a/CSharpBible/Games/Sokoban_Base/Model/Field.cs b/CSharpBible/Games/Sokoban_Base/Model/Field.cs index 3bf9e168f..c006c296f 100644 --- a/CSharpBible/Games/Sokoban_Base/Model/Field.cs +++ b/CSharpBible/Games/Sokoban_Base/Model/Field.cs @@ -11,6 +11,7 @@ // // // *********************************************************************** +using System; using System.Drawing; namespace Sokoban_Base.Model @@ -36,15 +37,11 @@ public abstract class Field /// The item. public PlayObject? Item { get=>_item; set =>SetItem(value); } -#if NET5_0_OR_GREATER - public Playfield? Parent { get; private set; } -#else /// /// Gets the parent. /// /// The parent. - public Playfield Parent { get; private set; } -#endif + public Playfield? Parent { get; private set; } /// /// Gets the field definition. /// @@ -62,16 +59,12 @@ public abstract class Field /// The value. protected abstract void SetItem(PlayObject? value); -#if NET6_0_OR_GREATER - public Field(Point position, Playfield? parentPlayObject ) -#else /// /// Initializes a new instance of the class. /// /// The position. /// The parent play object. - public Field(Point position, Playfield parentPlayObject ) -#endif + public Field(Point position, Playfield? parentPlayObject ) { Position = position; Parent = parentPlayObject; @@ -85,16 +78,12 @@ public Field(Point position, Playfield parentPlayObject ) /// public class Wall : Field { -#if NET6_0_OR_GREATER - public Wall(Point position, Playfield? parentPlayObject) : base(position, parentPlayObject) -#else /// /// Initializes a new instance of the class. /// /// The position. /// The parent play object. - public Wall(Point position, Playfield parentPlayObject) : base(position, parentPlayObject) -#endif + public Wall(Point position, Playfield? parentPlayObject) : base(position, parentPlayObject) { } @@ -123,16 +112,12 @@ protected override void SetItem(PlayObject? value) /// public class Floor: Field { -#if NET6_0_OR_GREATER - public Floor(Point position, Playfield? parentPlayObject) : base(position, parentPlayObject) -#else /// /// Initializes a new instance of the class. /// /// The position. /// The parent play object. - public Floor(Point position, Playfield parentPlayObject) : base(position, parentPlayObject) -#endif + public Floor(Point position, Playfield? parentPlayObject) : base(position, parentPlayObject) { } @@ -143,8 +128,8 @@ public Floor(Point position, Playfield parentPlayObject) : base(position, parent /// Illegal Item protected override FieldDef GetFieldDef() => Item switch { - Stone s => FieldDef.Stone, - Player s => FieldDef.Player, + Stone => FieldDef.Stone, + Player => FieldDef.Player, { } => throw new ArgumentException("Illegal Item"), null => FieldDef.Floor }; diff --git a/CSharpBible/Games/Sokoban_Base/Model/FieldDef.cs b/CSharpBible/Games/Sokoban_Base/Model/FieldDef.cs index 45b9fb05d..5433e0c1a 100644 --- a/CSharpBible/Games/Sokoban_Base/Model/FieldDef.cs +++ b/CSharpBible/Games/Sokoban_Base/Model/FieldDef.cs @@ -11,11 +11,7 @@ // // // *********************************************************************** -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Sokoban_Base.Model { diff --git a/CSharpBible/Games/Sokoban_Base/Model/LabDefs.cs b/CSharpBible/Games/Sokoban_Base/Model/LabDefs.cs index 160fcbb96..3ae6ba53b 100644 --- a/CSharpBible/Games/Sokoban_Base/Model/LabDefs.cs +++ b/CSharpBible/Games/Sokoban_Base/Model/LabDefs.cs @@ -12,11 +12,7 @@ // // *********************************************************************** using System; -using System.Collections.Generic; using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Sokoban_Base.Model { @@ -1352,14 +1348,14 @@ public static class LabDefs /// /// The level. /// System.ValueTuple<FieldDef[], Size>. - public static (FieldDef[],Size) GetLevel(int level) + public static (FieldDef[], Size) GetLevel(int level) { Size s = new Size(); s.Height = SLevels[level].Length; foreach (var line in SLevels[level]) - s.Width = Math.Max(s.Width, line.Length); - FieldDef[] fields = new FieldDef[s.Height*s.Width]; - + s.Width = Math.Max(s.Width, line.Length); + FieldDef[] fields = new FieldDef[s.Height * s.Width]; + for (var lnr = 0; lnr < s.Height; lnr++) for (int x = 0; x < SLevels[level][lnr].Length; x++) fields[lnr * s.Width + x] = FieldDefs.SDef[SLevels[level][lnr][x]]; diff --git a/CSharpBible/Games/Sokoban_Base/Model/PlayObject.cs b/CSharpBible/Games/Sokoban_Base/Model/PlayObject.cs index e3db389d1..4f3ec441c 100644 --- a/CSharpBible/Games/Sokoban_Base/Model/PlayObject.cs +++ b/CSharpBible/Games/Sokoban_Base/Model/PlayObject.cs @@ -11,12 +11,7 @@ // // // *********************************************************************** -using System; -using System.Collections.Generic; using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Sokoban_Base.Model { diff --git a/CSharpBible/Games/Sokoban_Base/Model/Player.cs b/CSharpBible/Games/Sokoban_Base/Model/Player.cs index 572aa7ced..aaf5d2e02 100644 --- a/CSharpBible/Games/Sokoban_Base/Model/Player.cs +++ b/CSharpBible/Games/Sokoban_Base/Model/Player.cs @@ -13,10 +13,6 @@ // *********************************************************************** using System; using System.Collections.Generic; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Sokoban_Base.Model { diff --git a/CSharpBible/Games/Sokoban_Base/Model/Playfield.cs b/CSharpBible/Games/Sokoban_Base/Model/Playfield.cs index 492dbcd64..9b5d35c17 100644 --- a/CSharpBible/Games/Sokoban_Base/Model/Playfield.cs +++ b/CSharpBible/Games/Sokoban_Base/Model/Playfield.cs @@ -11,6 +11,8 @@ // // // *********************************************************************** +using System; +using System.Collections.Generic; using System.Drawing; namespace Sokoban_Base.Model @@ -88,11 +90,11 @@ public FieldDef VField(Point p,List moves) /// /// The stones /// - public List Stones=new List { }; + public List Stones=new() { }; /// /// The fields /// - private List _fields = new List { }; + private List _fields = new() { }; /// /// The player /// @@ -102,12 +104,12 @@ public FieldDef VField(Point p,List moves) /// Gets the stones in dest. /// /// The stones in dest. - public int StonesInDest { get => Stones.FindAll((s) => s.field is Destination).Count(); } + public int StonesInDest { get => Stones.FindAll((s) => s.field is Destination).Count; } /// /// Gets a value indicating whether [game solved]. /// /// true if [game solved]; otherwise, false. - public bool GameSolved { get => Stones.Count()==StonesInDest; } + public bool GameSolved { get => Stones.Count==StonesInDest; } /// /// Setups the specified sf definition. diff --git a/CSharpBible/Games/Sokoban_Base/Program.cs b/CSharpBible/Games/Sokoban_Base/Program.cs deleted file mode 100644 index 796c4166f..000000000 --- a/CSharpBible/Games/Sokoban_Base/Program.cs +++ /dev/null @@ -1,70 +0,0 @@ -// *********************************************************************** -// Assembly : Sokoban_Base -// Author : Mir -// Created : 07-09-2022 -// -// Last Modified By : Mir -// Last Modified On : 09-09-2022 -// *********************************************************************** -// -// Copyright © JC-Soft 2022 -// -// -// *********************************************************************** -using Sokoban_Base.Model; -using Sokoban_Base.View; -using Sokoban_Base.ViewModel; - -namespace Sokoban_Base -{ - /// - /// Class Program. - /// - public class Program - { - /// - /// Defines the entry point of the application. - /// - /// The arguments. - public static void Main(string[] args) - { - Init(); - Run(); - Cleanup(); - } - - /// - /// Cleanups this instance. - /// - public static void Cleanup() - { - Game.Cleanup(); - } - - /// - /// Runs this instance. - /// - public static void Run() - { - UserAction? direction = null; - while (direction!=UserAction.Quit && LabDefs.SLevels.Length > Game.level) - { - direction = Game.Run(); - } - - } - - /// - /// Initializes this instance. - /// - public static void Init() - { - Game.Init(); - Game.visSetMessage = (s) => Visuals.Message = s; - Game.visShow = Visuals.Show; - Game.visUpdate = Visuals.Update; - Game.visGetUserAction = Visuals.WaitforUser; - } - - } -} \ No newline at end of file diff --git a/CSharpBible/Games/Sokoban_Base/Properties/Resource1.de.resx.bak b/CSharpBible/Games/Sokoban_Base/Properties/Resource1.de.resx.bak deleted file mode 100644 index a81149092..000000000 --- a/CSharpBible/Games/Sokoban_Base/Properties/Resource1.de.resx.bak +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - Cannot move to direction {0} - - - , (<Enter>) to continue ... - - - You left the game ! - - - You solved the puzzle - - - - ..\Resources\InfoText.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - - OK - - - Possible moves: - - - Level will be restarted ... - - - Please select an action : (Q)uit - - - {0} stones are in target-area - - - ..\Version.svn;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - \ No newline at end of file diff --git a/CSharpBible/Games/Sokoban_Base/Sokoban_Base.csproj b/CSharpBible/Games/Sokoban_Base/Sokoban_Base.csproj index cea00591d..267210d2b 100644 --- a/CSharpBible/Games/Sokoban_Base/Sokoban_Base.csproj +++ b/CSharpBible/Games/Sokoban_Base/Sokoban_Base.csproj @@ -1,74 +1,61 @@ - - - net6.0 - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\bin\$(MSBuildProjectName) - Exe - - - - - enable - enable - - Sokoban_Base.Program - false - false - false - 1.0.* - JC-Soft - Joe Care - Copyright © JC-Soft 2022 - Sokoban 1.0 Base - - - - - - - - - - - - - - - - - - - - - True - True - Resource1.resx - - - True - True - Resource1.resx - - - - - - ResXFileCodeGenerator - Resource1.Designer.cs - - - - - - - - - - - - - - + + + + Library + net462;net472;net48;net481;net6.0;net7.0;net8.0 + + + + + + + + + + + + + + + + + + + + + + + True + True + Resource1.resx + + + True + True + Resource1.resx + + + + + + ResXFileCodeGenerator + Resource1.Designer.cs + + + + + + + + + + + + + + + + + diff --git a/CSharpBible/Games/Sokoban_Base/Sokoban_Base_win.csproj b/CSharpBible/Games/Sokoban_Base/Sokoban_Base_win.csproj new file mode 100644 index 000000000..111efdc3b --- /dev/null +++ b/CSharpBible/Games/Sokoban_Base/Sokoban_Base_win.csproj @@ -0,0 +1,62 @@ + + + + Library + net462-windows;net472-windows;net48-windows;net481-windows + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resource1.resx + + + True + True + Resource1.resx + + + + + + ResXFileCodeGenerator + Resource1.Designer.cs + + + + + + + + + + + + diff --git a/CSharpBible/Games/Sokoban_Base/View/Visuals.cs b/CSharpBible/Games/Sokoban_Base/View/Visuals.cs index f772d7274..9aceb09fb 100644 --- a/CSharpBible/Games/Sokoban_Base/View/Visuals.cs +++ b/CSharpBible/Games/Sokoban_Base/View/Visuals.cs @@ -15,7 +15,10 @@ using Sokoban_Base.Model; using Sokoban_Base.Properties; using Sokoban_Base.ViewModel; +using System; +using System.Collections.Generic; using System.Drawing; +using System.Threading; namespace Sokoban_Base.View { @@ -78,7 +81,7 @@ static Visuals() public static void Show(UserAction? uAction=null) { myConsole.Clear(); - if (OperatingSystem.IsWindows()) + if (!myConsole.IsOutputRedirected) myConsole.WindowHeight = Math.Min(myConsole.LargestWindowHeight, 40); if (uAction == UserAction.Help) diff --git a/CSharpBible/Games/Sokoban_Base/View/VisualsDef.cs b/CSharpBible/Games/Sokoban_Base/View/VisualsDef.cs index f385055d5..415e31cac 100644 --- a/CSharpBible/Games/Sokoban_Base/View/VisualsDef.cs +++ b/CSharpBible/Games/Sokoban_Base/View/VisualsDef.cs @@ -12,6 +12,7 @@ // // *********************************************************************** using Sokoban_Base.ViewModel; +using System; namespace Sokoban_Base.View { /// diff --git a/CSharpBible/Games/Sokoban_Base/ViewModel/Game.cs b/CSharpBible/Games/Sokoban_Base/ViewModel/Game.cs deleted file mode 100644 index 904406e50..000000000 --- a/CSharpBible/Games/Sokoban_Base/ViewModel/Game.cs +++ /dev/null @@ -1,197 +0,0 @@ -// *********************************************************************** -// Assembly : Sokoban_Base -// Author : Mir -// Created : 08-04-2022 -// -// Last Modified By : Mir -// Last Modified On : 09-09-2022 -// *********************************************************************** -// -// Copyright JC-Soft 2022 -// -// -// *********************************************************************** -using Sokoban_Base.Model; -using Sokoban_Base.Properties; -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Sokoban_Base.ViewModel -{ - /// - /// Class Game. - /// - public static class Game { - /// - /// The vis show - /// - private static Action? _visShow; - /// - /// The vis update - /// - public static Action? visUpdate; - /// - /// The vis get user action - /// - public static Func? visGetUserAction; - /// - /// The vis set message - /// - public static Action? visSetMessage; - - /// - /// Gets or sets the vis show. - /// - /// The vis show. - public static Action? visShow { get => _visShow; set => _visShow = value; } - - /// - /// The u action - /// - private static UserAction? uAction = null; - - /// - /// The playfield - /// - public static Playfield playfield = new Playfield(); - - /// - /// Gets the player. - /// - /// The player. - public static Player? player=>playfield.player; - /// - /// Gets the size of the pf. - /// - /// The size of the pf. - public static Size PFSize=>playfield.fieldSize; - /// - /// Gets the stones in dest. - /// - /// The stones in dest. - public static int StonesInDest =>playfield.StonesInDest; - /// - /// Gets the stones. - /// - /// The stones. - public static IEnumerable Stones => playfield.Stones; - /// - /// Gets a value indicating whether [game solved]. - /// - /// true if [game solved]; otherwise, false. - public static bool GameSolved =>playfield.GameSolved; - - /// - /// Gets the level. - /// - /// The level. - public static int level { get; private set; } - - /// - /// Initializes this instance. - /// - public static void Init() { - level = 0; - } - - /// - /// Runs this instance. - /// - /// System.Nullable<UserAction>. - public static UserAction? Run() { - playfield.Setup(LabDefs.SLevels[level]); - - visShow?.Invoke(uAction); - - while (uAction != UserAction.Quit && !playfield.GameSolved && uAction != UserAction.Restart) { - - uAction = visGetUserAction?.Invoke(uAction); - if (uAction != null && (int?)uAction < typeof(Direction).GetEnumValues().Length) - if (!playfield.player?.Go((Direction)uAction) ?? false) { - visSetMessage?.Invoke(string.Format(Resource1.CannotMoveMsg, (Direction)uAction)); - } - else { visSetMessage?.Invoke(string.Format(Resource1.OK, (Direction)uAction)); } - if (uAction == UserAction.Help) { - visShow?.Invoke(uAction); - uAction = visGetUserAction?.Invoke(uAction); - visShow?.Invoke(uAction); - } - else - visUpdate?.Invoke(); - } - if (playfield.GameSolved) - visSetMessage?.Invoke(string.Format(Resource1.GameSuccess, "")); - else if (uAction == UserAction.Quit) - visSetMessage?.Invoke(string.Format(Resource1.EndMessage, "")); - else if (uAction == UserAction.Restart) - visSetMessage?.Invoke(string.Format(Resource1.RestartMessage, "")); - - visShow?.Invoke(uAction); - - if (uAction != UserAction.Restart) - level++; - if (uAction != UserAction.Quit) - uAction = visGetUserAction?.Invoke(uAction); - return uAction; - } - - /// - /// Cleanups this instance. - /// - public static void Cleanup() { - playfield.Clear(); - } - - /// - /// Gets the tile. - /// - /// The p. - /// TileDef. - static public TileDef GetTile(Point p) - { - TileDef result = TileDef.Empty; - var f = playfield[p]?.fieldDef; - if (f <= FieldDef.StoneInDest && f != FieldDef.Wall && f != FieldDef.Player) - result = (TileDef)f; - else if (f == FieldDef.Player && playfield[p].Item is Player pl) - { - result = (pl.LastDir) switch - { - Direction.East => TileDef.Player_E, - Direction.South => TileDef.Player_S, - Direction.West => TileDef.Player_W, - _ => TileDef.Player - }; - } - else if (f == FieldDef.Wall) - { - int w = 0; - result = TileDef.Wall; - w += ((playfield[Offsets.DirOffset(Direction.North, p)] is Wall) ? 1 : 0); - w += ((playfield[Offsets.DirOffset(Direction.West, p)] is Wall) ? 2 : 0); - w += ((playfield[Offsets.DirOffset(Direction.South, p)] is Wall) ? 4 : 0); - w += ((playfield[Offsets.DirOffset(Direction.East, p)] is Wall) ? 8 : 0); - if (w > 0) - result = (TileDef)(w - 1 + (int)TileDef.Wall_N); - } - return result; - } - - /// - /// Gets the old position. - /// - /// The p. - /// Point. - internal static Point GetOldPos(Point p) - { - Point result = new(p.X,p.Y); - if (playfield[p] is Floor f && f.Item !=null) - result = f.Item.OldPosition; - return result; - } - } -} diff --git a/CSharpBible/Games/Sokoban_Base/ViewModel/UserAction.cs b/CSharpBible/Games/Sokoban_Base/ViewModel/UserAction.cs deleted file mode 100644 index 93388a106..000000000 --- a/CSharpBible/Games/Sokoban_Base/ViewModel/UserAction.cs +++ /dev/null @@ -1,53 +0,0 @@ -// *********************************************************************** -// Assembly : Sokoban_Base -// Author : Mir -// Created : 07-24-2022 -// -// Last Modified By : Mir -// Last Modified On : 09-09-2022 -// *********************************************************************** -// -// Copyright © JC-Soft 2022 -// -// -// *********************************************************************** -using Sokoban_Base.Model; - -namespace Sokoban_Base.ViewModel -{ - - /// - /// Enum UserAction - /// - public enum UserAction - { - /// - /// The go north - /// - GoNorth = Direction.North, - /// - /// The none - /// - GoWest = Direction.West, - /// - /// The move left - /// - GoSouth = Direction.South, - /// - /// The move right - /// - GoEast = Direction.East, - /// - /// The move down - /// - Quit, - /// - /// The rotate left - /// - Help, - /// - /// The rotate right - /// - Restart - } -} diff --git a/CSharpBible/Games/Sokoban_Base/ViewModels/Game.cs b/CSharpBible/Games/Sokoban_Base/ViewModels/Game.cs new file mode 100644 index 000000000..48baa6e3f --- /dev/null +++ b/CSharpBible/Games/Sokoban_Base/ViewModels/Game.cs @@ -0,0 +1,194 @@ +// *********************************************************************** +// Assembly : Sokoban_Base +// Author : Mir +// Created : 08-04-2022 +// +// Last Modified By : Mir +// Last Modified On : 09-09-2022 +// *********************************************************************** +// +// Copyright JC-Soft 2022 +// +// +// *********************************************************************** +using Sokoban_Base.Model; +using Sokoban_Base.Properties; +using System; +using System.Collections.Generic; +using System.Drawing; + +namespace Sokoban_Base.ViewModel +{ + /// + /// Class Game. + /// + public static class Game { + /// + /// The vis show + /// + private static Action? _visShow; + /// + /// The vis update + /// + public static Action? visUpdate; + /// + /// The vis get user action + /// + public static Func? visGetUserAction; + /// + /// The vis set message + /// + public static Action? visSetMessage; + + /// + /// Gets or sets the vis show. + /// + /// The vis show. + public static Action? visShow { get => _visShow; set => _visShow = value; } + + /// + /// The u action + /// + private static UserAction? uAction = null; + + /// + /// The playfield + /// + public static Playfield playfield = new Playfield(); + + /// + /// Gets the player. + /// + /// The player. + public static Player? player=>playfield.player; + /// + /// Gets the size of the pf. + /// + /// The size of the pf. + public static Size PFSize=>playfield.fieldSize; + /// + /// Gets the stones in dest. + /// + /// The stones in dest. + public static int StonesInDest =>playfield.StonesInDest; + /// + /// Gets the stones. + /// + /// The stones. + public static IEnumerable Stones => playfield.Stones; + /// + /// Gets a value indicating whether [game solved]. + /// + /// true if [game solved]; otherwise, false. + public static bool GameSolved =>playfield.GameSolved; + + /// + /// Gets the level. + /// + /// The level. + public static int level { get; private set; } + + /// + /// Initializes this instance. + /// + public static void Init() { + level = 0; + } + + /// + /// Runs this instance. + /// + /// System.Nullable<UserAction>. + public static UserAction? Run() { + playfield.Setup(LabDefs.SLevels[level]); + + visShow?.Invoke(uAction); + + while (uAction != UserAction.Quit && !playfield.GameSolved && uAction != UserAction.Restart) { + + uAction = visGetUserAction?.Invoke(uAction); + if (uAction != null && (int?)uAction < typeof(Direction).GetEnumValues().Length) + if (!playfield.player?.Go((Direction)uAction) ?? false) { + visSetMessage?.Invoke(string.Format(Resource1.CannotMoveMsg, (Direction)uAction)); + } + else { visSetMessage?.Invoke(string.Format(Resource1.OK, (Direction)uAction)); } + if (uAction == UserAction.Help) { + visShow?.Invoke(uAction); + uAction = visGetUserAction?.Invoke(uAction); + visShow?.Invoke(uAction); + } + else + visUpdate?.Invoke(); + } + if (playfield.GameSolved) + visSetMessage?.Invoke(string.Format(Resource1.GameSuccess, "")); + else if (uAction == UserAction.Quit) + visSetMessage?.Invoke(string.Format(Resource1.EndMessage, "")); + else if (uAction == UserAction.Restart) + visSetMessage?.Invoke(string.Format(Resource1.RestartMessage, "")); + + visShow?.Invoke(uAction); + + if (uAction != UserAction.Restart) + level++; + if (uAction != UserAction.Quit) + uAction = visGetUserAction?.Invoke(uAction); + return uAction; + } + + /// + /// Cleanups this instance. + /// + public static void Cleanup() { + playfield.Clear(); + } + + /// + /// Gets the tile. + /// + /// The p. + /// TileDef. + static public TileDef GetTile(Point p) + { + TileDef result = TileDef.Empty; + var f = playfield[p]?.fieldDef; + if (f <= FieldDef.StoneInDest && f != FieldDef.Wall && f != FieldDef.Player) + result = (TileDef)f; + else if (f == FieldDef.Player && playfield[p]?.Item is Player pl) + { + result = (pl.LastDir) switch + { + Direction.East => TileDef.Player_E, + Direction.South => TileDef.Player_S, + Direction.West => TileDef.Player_W, + _ => TileDef.Player + }; + } + else if (f == FieldDef.Wall) + { + int w = 0; + result = TileDef.Wall; + w += ((playfield[Offsets.DirOffset(Direction.North, p)] is Wall) ? 1 : 0); + w += ((playfield[Offsets.DirOffset(Direction.West, p)] is Wall) ? 2 : 0); + w += ((playfield[Offsets.DirOffset(Direction.South, p)] is Wall) ? 4 : 0); + w += ((playfield[Offsets.DirOffset(Direction.East, p)] is Wall) ? 8 : 0); + if (w > 0) + result = (TileDef)(w - 1 + (int)TileDef.Wall_N); + } + return result; + } + + /// + /// Gets the old position. + /// + /// The p. + /// Point. + internal static Point GetOldPos(Point p) + { + Point result = new(p.X,p.Y); + if (playfield[p] is Floor f && f.Item !=null) + result = f.Item.OldPosition; + return result; + } + } +} diff --git a/CSharpBible/Games/Sokoban_Base/ViewModel/TileDef.cs b/CSharpBible/Games/Sokoban_Base/ViewModels/TileDef.cs similarity index 96% rename from CSharpBible/Games/Sokoban_Base/ViewModel/TileDef.cs rename to CSharpBible/Games/Sokoban_Base/ViewModels/TileDef.cs index ff82d90f2..6f898eb42 100644 --- a/CSharpBible/Games/Sokoban_Base/ViewModel/TileDef.cs +++ b/CSharpBible/Games/Sokoban_Base/ViewModels/TileDef.cs @@ -1,145 +1,145 @@ -// *********************************************************************** -// Assembly : Sokoban_Base -// Author : Mir -// Created : 08-04-2022 -// -// Last Modified By : Mir -// Last Modified On : 09-09-2022 -// *********************************************************************** -// -// Copyright JC-Soft 2022 -// -// -// *********************************************************************** -using Sokoban_Base.Model; - -namespace Sokoban_Base.ViewModel -{ - /// - /// Enum TileDef - /// - public enum TileDef - { - /// - /// The empty - /// - Empty = FieldDef.Empty, - /// - /// The wall - /// - Wall = FieldDef.Wall, - /// - /// The floor - /// - Floor = FieldDef.Floor, - /// - /// The destination - /// - Destination = FieldDef.Destination, - /// - /// The player - /// - Player = FieldDef.Player, - /// - /// The player over dest - /// - PlayerOverDest = FieldDef.PlayerOverDest, - /// - /// The stone - /// - Stone = FieldDef.Stone, - /// - /// The stone in dest - /// - StoneInDest = FieldDef.StoneInDest, - /// - /// The floor marked - /// - Floor_Marked, - /// - /// The wall n - /// - Wall_N, - /// - /// The wall w - /// - Wall_W, - /// - /// The wall nw - /// - Wall_NW, - /// - /// The wall s - /// - Wall_S, - /// - /// The wall ns - /// - Wall_NS, - /// - /// The wall ws - /// - Wall_WS, - /// - /// The wall NWS - /// - Wall_NWS, - /// - /// The wall e - /// - Wall_E, - /// - /// The wall ne - /// - Wall_NE, - /// - /// The wall we - /// - Wall_WE, - /// - /// The wall nwe - /// - Wall_NWE, - /// - /// The wall se - /// - Wall_SE, - /// - /// The wall nse - /// - Wall_NSE, - /// - /// The wall wse - /// - Wall_WSE, - /// - /// The wall nwse - /// - Wall_NWSE, - /// - /// The player w - /// - Player_W, - /// - /// The player over dest w - /// - PlayerOverDest_W, - /// - /// The player s - /// - Player_S, - /// - /// The player over dest s - /// - PlayerOverDest_S, - /// - /// The player e - /// - Player_E, - /// - /// The player over dest e - /// - PlayerOverDest_E - - }; -} +// *********************************************************************** +// Assembly : Sokoban_Base +// Author : Mir +// Created : 08-04-2022 +// +// Last Modified By : Mir +// Last Modified On : 09-09-2022 +// *********************************************************************** +// +// Copyright JC-Soft 2022 +// +// +// *********************************************************************** +using Sokoban_Base.Model; + +namespace Sokoban_Base.ViewModel +{ + /// + /// Enum TileDef + /// + public enum TileDef + { + /// + /// The empty + /// + Empty = FieldDef.Empty, + /// + /// The wall + /// + Wall = FieldDef.Wall, + /// + /// The floor + /// + Floor = FieldDef.Floor, + /// + /// The destination + /// + Destination = FieldDef.Destination, + /// + /// The player + /// + Player = FieldDef.Player, + /// + /// The player over dest + /// + PlayerOverDest = FieldDef.PlayerOverDest, + /// + /// The stone + /// + Stone = FieldDef.Stone, + /// + /// The stone in dest + /// + StoneInDest = FieldDef.StoneInDest, + /// + /// The floor marked + /// + Floor_Marked, + /// + /// The wall n + /// + Wall_N, + /// + /// The wall w + /// + Wall_W, + /// + /// The wall nw + /// + Wall_NW, + /// + /// The wall s + /// + Wall_S, + /// + /// The wall ns + /// + Wall_NS, + /// + /// The wall ws + /// + Wall_WS, + /// + /// The wall NWS + /// + Wall_NWS, + /// + /// The wall e + /// + Wall_E, + /// + /// The wall ne + /// + Wall_NE, + /// + /// The wall we + /// + Wall_WE, + /// + /// The wall nwe + /// + Wall_NWE, + /// + /// The wall se + /// + Wall_SE, + /// + /// The wall nse + /// + Wall_NSE, + /// + /// The wall wse + /// + Wall_WSE, + /// + /// The wall nwse + /// + Wall_NWSE, + /// + /// The player w + /// + Player_W, + /// + /// The player over dest w + /// + PlayerOverDest_W, + /// + /// The player s + /// + Player_S, + /// + /// The player over dest s + /// + PlayerOverDest_S, + /// + /// The player e + /// + Player_E, + /// + /// The player over dest e + /// + PlayerOverDest_E + + }; +} diff --git a/CSharpBible/Games/Sokoban_Base/ViewModels/UserAction.cs b/CSharpBible/Games/Sokoban_Base/ViewModels/UserAction.cs new file mode 100644 index 000000000..f5b2c52c4 --- /dev/null +++ b/CSharpBible/Games/Sokoban_Base/ViewModels/UserAction.cs @@ -0,0 +1,53 @@ +// *********************************************************************** +// Assembly : Sokoban_Base +// Author : Mir +// Created : 07-24-2022 +// +// Last Modified By : Mir +// Last Modified On : 09-09-2022 +// *********************************************************************** +// +// Copyright © JC-Soft 2022 +// +// +// *********************************************************************** +using Sokoban_Base.Model; + +namespace Sokoban_Base.ViewModel +{ + + /// + /// Enum UserAction + /// + public enum UserAction + { + /// + /// The go north + /// + GoNorth = Direction.North, + /// + /// The none + /// + GoWest = Direction.West, + /// + /// The move left + /// + GoSouth = Direction.South, + /// + /// The move right + /// + GoEast = Direction.East, + /// + /// The move down + /// + Quit, + /// + /// The rotate left + /// + Help, + /// + /// The rotate right + /// + Restart + } +} diff --git a/CSharpBible/Games/Sokoban_Base/ViewModel/ViewModel.cd b/CSharpBible/Games/Sokoban_Base/ViewModels/ViewModel.cd similarity index 97% rename from CSharpBible/Games/Sokoban_Base/ViewModel/ViewModel.cd rename to CSharpBible/Games/Sokoban_Base/ViewModels/ViewModel.cd index db7834eb3..73eb2df66 100644 --- a/CSharpBible/Games/Sokoban_Base/ViewModel/ViewModel.cd +++ b/CSharpBible/Games/Sokoban_Base/ViewModels/ViewModel.cd @@ -1,36 +1,36 @@ - - - - - - AAAAAQAAAAAACAAgAAAAAAAAIAEAAAAAAAACAEAAABI= - ViewModel\Game.cs - - - - - - - - - - AACAAAAACAABkAgACACAAAAQAAAAAAABEgAAgABAAAA= - Model\Playfield.cs - - - - - - JAASAAAAAAgAAAgAAAIAAAAAAAAAAASEmAAAAQAAEQA= - ViewModel\TileDef.cs - - - - - - EQAAAAgAAAAIAAAAAAAAAAAAAAABAAAAAAAAAAAAARA= - ViewModel\UserAction.cs - - - + + + + + + AAAAAQAAAAAACAAgAAAAAAAAIAEAAAAAAAACAEAAABI= + ViewModel\Game.cs + + + + + + + + + + AACAAAAACAABkAgACACAAAAQAAAAAAABEgAAgABAAAA= + Model\Playfield.cs + + + + + + JAASAAAAAAgAAAgAAAIAAAAAAAAAAASEmAAAAQAAEQA= + ViewModel\TileDef.cs + + + + + + EQAAAAgAAAAIAAAAAAAAAAAAAAABAAAAAAAAAAAAARA= + ViewModel\UserAction.cs + + + \ No newline at end of file diff --git a/CSharpBible/Games/Sokoban_BaseTests/Model/DestinationTests.cs b/CSharpBible/Games/Sokoban_BaseTests/Model/DestinationTests.cs new file mode 100644 index 000000000..006c7a193 --- /dev/null +++ b/CSharpBible/Games/Sokoban_BaseTests/Model/DestinationTests.cs @@ -0,0 +1,56 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Drawing; + +namespace Sokoban_Base.Model.Tests +{ + [TestClass()] + public class DestinationTests + { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + Destination testItem; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + [TestInitialize()] + public void Init() + { + testItem = new Destination(new Point(3, 4), null); + } + + [TestMethod()] + public void SetupTest() + { + Assert.IsNotNull(testItem); + Assert.IsInstanceOfType(testItem, typeof(Field)); + Assert.IsInstanceOfType(testItem, typeof(Floor)); + Assert.IsInstanceOfType(testItem, typeof(Destination)); + Assert.AreEqual(new Point(3, 4), testItem.Position); + Assert.IsNull(testItem.Item); + Assert.IsNull(testItem.Parent); + } + + /// + /// Defines the test method WallTest. + /// + [DataTestMethod()] + [DataRow(null, FieldDef.Destination)] + [DataRow(FieldDef.Player, FieldDef.PlayerOverDest)] + [DataRow(FieldDef.Stone, FieldDef.StoneInDest)] + public void GetFieldDefTest(FieldDef? item, FieldDef? fdExp) + { + switch (item) + { + case FieldDef.Stone: testItem.Item = new Stone(null); break; + case FieldDef.Player: testItem.Item = new Player(null); break; + default: break; + } + Assert.AreEqual(fdExp, testItem.fieldDef); + } + + [TestMethod] + public void GetFieldDef2Test() + { + testItem.Item = new Key(null); + Assert.ThrowsException(() => testItem.fieldDef); + } + } +} \ No newline at end of file diff --git a/CSharpBible/Games/Sokoban_BaseTests/Model/FloorTests.cs b/CSharpBible/Games/Sokoban_BaseTests/Model/FloorTests.cs new file mode 100644 index 000000000..96ff885c8 --- /dev/null +++ b/CSharpBible/Games/Sokoban_BaseTests/Model/FloorTests.cs @@ -0,0 +1,103 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Drawing; + +namespace Sokoban_Base.Model.Tests +{ + class Key : PlayObject + { + public Key(Field? aField) : base(aField) + { + } + + public override bool TestMove(Direction dir) + { + return false; + } + + public override bool TryMove(Direction dir) + { + return false; + } + } + + [TestClass()] + public class FloorTests + { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + Floor testItem; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + [TestInitialize()] + public void Init() + { + testItem = new Floor(new Point(2, 1), null); + } + + [TestMethod()] + public void SetupTest() + { + Assert.IsNotNull(testItem); + Assert.IsInstanceOfType(testItem, typeof(Field)); + Assert.IsInstanceOfType(testItem, typeof(Floor)); + Assert.AreEqual(new Point(2, 1), testItem.Position); + Assert.IsNull(testItem.Item); + Assert.IsNull(testItem.Parent); + } + + /// + /// Defines the test method WallTest. + /// + [DataTestMethod()] + [DataRow(null,FieldDef.Floor)] + [DataRow(FieldDef.Player, FieldDef.Player)] + [DataRow(FieldDef.Stone, FieldDef.Stone)] + public void GetFieldDefTest(FieldDef? item, FieldDef? fdExp) + { + switch (item) { + case FieldDef.Stone: testItem.Item = new Stone(null); break; + case FieldDef.Player: testItem.Item = new Player(null); break; + default:break; + } + Assert.AreEqual(fdExp, testItem.fieldDef); + } + + [TestMethod] + public void GetFieldDef2Test() + { + testItem.Item= new Key(null); + Assert.ThrowsException(()=> testItem.fieldDef); + } + + /// + /// Defines the test method WallTest. + /// + [DataTestMethod()] + [DataRow(null, null,FieldDef.Floor)] + [DataRow(null,FieldDef.Player, FieldDef.Player)] + [DataRow(null, FieldDef.Stone, FieldDef.Stone)] + [DataRow(FieldDef.Stone, FieldDef.Player, FieldDef.Stone)] + [DataRow(FieldDef.Empty,FieldDef.Stone, FieldDef.Stone)] + public void SetItemTest(FieldDef? item1, FieldDef? item2, FieldDef fdExp) + { + DoSetItem(item1); + if (item1 != FieldDef.Stone) + new Floor(Point.Empty,null).Item= testItem.Item ; + DoSetItem(item2); + Assert.AreEqual(fdExp, testItem.fieldDef); + + void DoSetItem(FieldDef? item) + { + switch (item) + { + case FieldDef.Stone: testItem.Item = new Stone(null); break; + case FieldDef.Player: testItem.Item = new Player(null); break; + case FieldDef.Empty: testItem.Item = new Key(null); break; + default: break; + } + } + } + + + + } +} \ No newline at end of file diff --git a/CSharpBible/Games/Sokoban_BaseTests/Model/LabDefsTests.cs b/CSharpBible/Games/Sokoban_BaseTests/Model/LabDefsTests.cs new file mode 100644 index 000000000..151ba743f --- /dev/null +++ b/CSharpBible/Games/Sokoban_BaseTests/Model/LabDefsTests.cs @@ -0,0 +1,25 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Drawing; + +namespace Sokoban_Base.Model.Tests +{ + [TestClass()] + public class LabDefsTests + { + [TestMethod()] + public void GetLevelTest() + { + (var fd, var s) = LabDefs.GetLevel(1); + Assert.AreEqual(new Size(14,10),s); + Assert.AreEqual(140, fd.Length); + Assert.AreEqual(FieldDef.Wall, fd[0]); + } + + [TestMethod()] + public void CountTest() + { + Assert.AreEqual(90,LabDefs.Count); + } + + } +} \ No newline at end of file diff --git a/CSharpBible/Games/Sokoban_BaseTests/Model/OffsetsTests.cs b/CSharpBible/Games/Sokoban_BaseTests/Model/OffsetsTests.cs index 4ee254be0..bf0c562b8 100644 --- a/CSharpBible/Games/Sokoban_BaseTests/Model/OffsetsTests.cs +++ b/CSharpBible/Games/Sokoban_BaseTests/Model/OffsetsTests.cs @@ -1,11 +1,5 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -using Sokoban_Base.Model; -using System; -using System.Collections.Generic; using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Sokoban_Base.Model.Tests { diff --git a/CSharpBible/Games/Sokoban_BaseTests/Model/PlayObjectTests.cs b/CSharpBible/Games/Sokoban_BaseTests/Model/PlayObjectTests.cs new file mode 100644 index 000000000..d4001cf35 --- /dev/null +++ b/CSharpBible/Games/Sokoban_BaseTests/Model/PlayObjectTests.cs @@ -0,0 +1,54 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Drawing; + +namespace Sokoban_Base.Model.Tests +{ + [TestClass()] + public class PlayObjectTests + { + Key testItem; + Floor? field1; + [TestInitialize] + public void Init() + { + testItem = new Key( null); + field1 = new Floor(new Point(2,1),null); + } + + [TestMethod()] + public void SetupTest() + { + Assert.IsNotNull(testItem); + Assert.IsInstanceOfType(testItem, typeof(PlayObject)); + Assert.IsInstanceOfType(testItem, typeof(Key)); + Assert.AreEqual(new Point(0, 0), testItem.Position); + Assert.AreEqual(new Point(0, 0), testItem.OldPosition); + Assert.IsNull(testItem.field); + } + + [TestMethod()] + public void TestMoveTest() + { + Assert.AreEqual(false,testItem.TestMove(Direction.North)); + } + + [TestMethod()] + public void TryMoveTest() + { + Assert.AreEqual(false, testItem.TestMove(Direction.North)); + } + + [TestMethod()] + public void Position() + { + field1!.Item = testItem; + Assert.AreEqual(new Point(2, 1), testItem.Position); + Assert.AreEqual(new Point(0, 0), testItem.OldPosition); + field1!.Item = null; + Assert.AreEqual(new Point(0, 0), testItem.Position); + Assert.AreEqual(new Point(2, 1), testItem.OldPosition); + + } + + } +} \ No newline at end of file diff --git a/CSharpBible/Games/Sokoban_BaseTests/Model/PlayerTests.cs b/CSharpBible/Games/Sokoban_BaseTests/Model/PlayerTests.cs new file mode 100644 index 000000000..37a2c7b4d --- /dev/null +++ b/CSharpBible/Games/Sokoban_BaseTests/Model/PlayerTests.cs @@ -0,0 +1,121 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Drawing; +using System.Linq; +using static BaseLib.Helper.TestHelper; + +namespace Sokoban_Base.Model.Tests +{ + [TestClass()] + public class PlayerTests + { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + Player testItem; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + Playfield pf = new Playfield(); + + [TestInitialize] + public void Init() + { + pf.Setup(new string[] { "###", ".$ ","$ " }); + testItem = new(null); + } + + [TestMethod()] + public void SetupTest() + { + Assert.IsNotNull(testItem); + Assert.IsNotNull(pf); + } + + + [DataTestMethod()] + [DataRow(0, 0, Direction.South, false)] + [DataRow(1, 0, Direction.South, false)] + [DataRow(0, 1, Direction.North, false)] + [DataRow(0, 1, Direction.South, false)] + [DataRow(0, 1, Direction.East, true)] + [DataRow(1, 2, Direction.North, false)] + [DataRow(1, 2, Direction.West, false)] + [DataRow(1, 2, Direction.East, true)] + public void TestMoveTest(int x, int y, Direction d, bool xExp) + { + if (y > 0 && pf[new Point(x, y)] is Field f) + f.Item = testItem; + else if (x > 0) + new Floor(Point.Empty, null).Item = testItem; + Assert.AreEqual(xExp, testItem.TestMove(d)); + } + + [DataTestMethod()] + [DataRow(0, 0, Direction.South, false)] + [DataRow(1, 0, Direction.South, false)] + [DataRow(0, 1, Direction.North, false)] + [DataRow(0, 1, Direction.South, false)] + [DataRow(0, 1, Direction.East, true)] + [DataRow(1, 2, Direction.North, false)] + [DataRow(1, 2, Direction.West, false)] + [DataRow(1, 2, Direction.East, true)] + public void TestMove2Test(int x, int y, Direction d, bool xExp) + { + pf[new Point(0, 2)]!.Item = null; + pf[new Point(0, 2)]!.Item = new Key(null); + if (y > 0 && pf[new Point(x, y)] is Field f) + f.Item = testItem; + else if (x > 0) + new Floor(Point.Empty, null).Item = testItem; + Assert.AreEqual(xExp, testItem.TestMove(d)); + } + + [TestMethod()] + [DataRow(0, 0, Direction.South, false)] + [DataRow(1, 0, Direction.South, false)] + [DataRow(0, 1, Direction.North, false)] + [DataRow(0, 1, Direction.South, false)] + [DataRow(0, 1, Direction.East, true)] + [DataRow(1, 2, Direction.North, false)] + [DataRow(1, 2, Direction.West, false)] + [DataRow(1, 2, Direction.East, true)] + public void TryMoveTest(int x, int y, Direction d, bool xExp) + { + if (y > 0&& pf[new Point(x, y)] is Field f) + f.Item = testItem; + else if (x > 0) + new Floor(Point.Empty, null).Item = testItem; + Assert.AreEqual(xExp, testItem.TryMove(d)); + } + + [TestMethod()] + [DataRow(0, 0, Direction.South, false)] + [DataRow(1, 0, Direction.South, false)] + [DataRow(0, 1, null, false)] + [DataRow(0, 1, Direction.North, false)] + [DataRow(0, 1, Direction.South, false)] + [DataRow(0, 1, Direction.East, true)] + [DataRow(1, 2, Direction.North, false)] + [DataRow(1, 2, Direction.West, false)] + [DataRow(1, 2, Direction.East, true)] + public void GoTest(int x, int y, Direction? d, bool xExp) + { + if (y > 0 && pf[new Point(x, y)] is Field f) + f.Item = testItem; + else if (x > 0) + new Floor(Point.Empty, null).Item = testItem; + Assert.AreEqual(xExp, testItem.Go(d)); + } + [TestMethod()] + [DataRow(0, 0,new Direction[] { })] + [DataRow(1, 0, new Direction[] { })] + [DataRow(0, 1, new Direction[] { Direction.East })] + [DataRow(1, 2, new Direction[] { Direction.East })] + [DataRow(2, 2, new Direction[] { Direction.North,Direction.West })] + [DataRow(2, 1, new Direction[] { Direction.West,Direction.South })] + public void MovableDirTest(int x, int y, Direction[] d) + { + if (y > 0 && pf[new Point(x, y)] is Field f) + f.Item = testItem; + else if (x > 0) + new Floor(Point.Empty, null).Item = testItem; + AssertAreEqual(d, testItem.MoveableDirs().ToArray()); + } + } +} \ No newline at end of file diff --git a/CSharpBible/Games/Sokoban_BaseTests/Model/StoneTests.cs b/CSharpBible/Games/Sokoban_BaseTests/Model/StoneTests.cs new file mode 100644 index 000000000..cc9bb43f5 --- /dev/null +++ b/CSharpBible/Games/Sokoban_BaseTests/Model/StoneTests.cs @@ -0,0 +1,65 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Drawing; + +namespace Sokoban_Base.Model.Tests +{ + [TestClass()] + public class StoneTests + { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + Stone testItem; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + Playfield pf = new Playfield(); + + [TestInitialize] + public void Init() + { + pf.Setup(new string[] {"###",". $" }); + testItem = new Stone(null); + } + + [TestMethod()] + public void SetupTest() + { + Assert.IsNotNull(testItem); + Assert.IsNotNull(pf); + } + + + [DataTestMethod()] + [DataRow(0, 0, Direction.South, false)] + [DataRow(1, 0, Direction.South, false)] + [DataRow(0, 1, Direction.North,false)] + [DataRow(0, 1, Direction.South, false)] + [DataRow(0, 1, Direction.East, true)] + [DataRow(1, 1, Direction.North, false)] + [DataRow(1, 1, Direction.West, true)] + [DataRow(1, 1, Direction.East, false)] + public void TestMoveTest(int x,int y,Direction d,bool xExp) + { + if (y>0) + pf[new Point(x,y)].Item = testItem; + else if (x > 0) + new Floor(Point.Empty,null).Item = testItem; + Assert.AreEqual(xExp,testItem.TestMove(d)); + } + + [TestMethod()] + [DataRow(0, 0, Direction.South, false)] + [DataRow(1, 0, Direction.South, false)] + [DataRow(0, 1, Direction.North, false)] + [DataRow(0, 1, Direction.South, false)] + [DataRow(0, 1, Direction.East, true)] + [DataRow(1, 1, Direction.North, false)] + [DataRow(1, 1, Direction.West, true)] + [DataRow(1, 1, Direction.East, false)] + public void TryMoveTest(int x, int y, Direction d, bool xExp) + { + if (y > 0) + pf[new Point(x, y)].Item = testItem; + else if (x>0) + new Floor(Point.Empty,null).Item = testItem; + Assert.AreEqual(xExp, testItem.TryMove(d)); + } + } +} \ No newline at end of file diff --git a/CSharpBible/Games/Sokoban_BaseTests/Model/WallTests.cs b/CSharpBible/Games/Sokoban_BaseTests/Model/WallTests.cs index 2f5ddef79..74f52aba8 100644 --- a/CSharpBible/Games/Sokoban_BaseTests/Model/WallTests.cs +++ b/CSharpBible/Games/Sokoban_BaseTests/Model/WallTests.cs @@ -1,11 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -using Sokoban_Base.Model; using System; -using System.Collections.Generic; using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Sokoban_Base.Model.Tests { @@ -15,6 +10,15 @@ namespace Sokoban_Base.Model.Tests [TestClass()] public class WallTests { +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + Wall testItem; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + [TestInitialize()] + public void Init() + { + testItem = new Wall(new Point(2, 2), null); + } + /// /// Defines the test method WallTest. /// @@ -27,5 +31,14 @@ public void WallTest() w.Item = null; Assert.ThrowsException(()=>w.Item = new Stone(null)); } + + /// + /// Defines the test method WallTest. + /// + [TestMethod()] + public void GetFieldDefTest() + { + Assert.AreEqual(FieldDef.Wall, testItem.fieldDef); + } } } \ No newline at end of file diff --git a/CSharpBible/Games/Sokoban_BaseTests/Sokoban_BaseTests.csproj b/CSharpBible/Games/Sokoban_BaseTests/Sokoban_BaseTests.csproj index 08a10ecab..f41d92d6b 100644 --- a/CSharpBible/Games/Sokoban_BaseTests/Sokoban_BaseTests.csproj +++ b/CSharpBible/Games/Sokoban_BaseTests/Sokoban_BaseTests.csproj @@ -1,18 +1,12 @@ - - - net6.0 - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\bin\$(MSBuildProjectName)\ + + + + Library + net462;net472;net48;net481;net6.0;net7.0;net8.0 - - disable - enable - - false - + @@ -20,10 +14,10 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -31,6 +25,8 @@ + + diff --git a/CSharpBible/Games/Sudoku_Base/Models/.info b/CSharpBible/Games/Sudoku_Base/Models/.info new file mode 100644 index 000000000..730842865 --- /dev/null +++ b/CSharpBible/Games/Sudoku_Base/Models/.info @@ -0,0 +1,2 @@ +Folder for models + diff --git a/CSharpBible/Games/Sudoku_Base/Models/Interfaces/.info b/CSharpBible/Games/Sudoku_Base/Models/Interfaces/.info new file mode 100644 index 000000000..6b1ace621 --- /dev/null +++ b/CSharpBible/Games/Sudoku_Base/Models/Interfaces/.info @@ -0,0 +1,2 @@ +Folder for model-interfaces + diff --git a/CSharpBible/Games/Sudoku_Base/Models/Interfaces/ISudokuField.cs b/CSharpBible/Games/Sudoku_Base/Models/Interfaces/ISudokuField.cs new file mode 100644 index 000000000..fa8aa4584 --- /dev/null +++ b/CSharpBible/Games/Sudoku_Base/Models/Interfaces/ISudokuField.cs @@ -0,0 +1,76 @@ +// *********************************************************************** +// Assembly : Sudoku_Base +// Author : Mir +// Created : 06-17-2024 +// +// Last Modified By : Mir +// Last Modified On : 06-17-2024 +// *********************************************************************** +// +// Copyright © JC-Soft 2024 +// +// +// *********************************************************************** +using BaseLib.Interfaces; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.IO; + +/// +/// The Interfaces namespace. +/// +namespace Sudoku_Base.Models.Interfaces; + +/// +/// Interface ISudokuField +/// Extends the +/// +/// +public interface ISudokuField : INotifyPropertyChanged, INotifyPropertyChanging, IPersistence +{ + /// + /// Gets the position. + /// + /// The position. + Point Position { get; } + /// + /// Gets or sets the value. + /// + /// The value. + int? Value { get; set; } + /// + /// Gets or sets a value indicating whether this instance is predefined. + /// + /// true if this instance is predefined; otherwise, false. + bool IsPredefined { get; set; } + + /// + /// Gets the list of possible values. + /// + /// The possible values. + IList PossibleValues { get; } + + /// + /// Adds the possible value to the list. + /// + /// The value. + void AddPossibleValue(int value); + /// + /// Removes the possible value from the list. + /// + /// The value. + void RemovePossibleValue(int value); + + /// + /// Writes to stream. + /// + /// The stream. + void WriteToStream(Stream stream); + /// + /// Reads from stream. + /// + /// The stream. + void ReadFromStream(Stream stream); + void Clear(); +} diff --git a/CSharpBible/Games/Sudoku_Base/Models/Interfaces/ISudokuModel.cs b/CSharpBible/Games/Sudoku_Base/Models/Interfaces/ISudokuModel.cs new file mode 100644 index 000000000..4dac35fe4 --- /dev/null +++ b/CSharpBible/Games/Sudoku_Base/Models/Interfaces/ISudokuModel.cs @@ -0,0 +1,51 @@ +// *********************************************************************** +// Assembly : MVVM_41_Sudoku +// Author : Mir +// Created : 05-19-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-19-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using CommunityToolkit.Mvvm.Input; +using System.Collections.Generic; +using System.ComponentModel; +using System.IO; +using BaseLib.Interfaces; +using System.Windows.Media; +using System.Windows; + +/// +/// The Models namespace. +/// +/// +namespace Sudoku_Base.Models.Interfaces +{ + /// + /// Interface ISudokuModel + /// + /// + public interface ISudokuModel : INotifyPropertyChanged, IPersistence + { + IReadOnlyList Fields { get; } + + IReadOnlyList Values { get; } + ISudokuField this[int row, int col] { get; } + void Clear(); + + IRelayCommand UndoCommand { get; } + IRelayCommand RedoCommand { get; } + int UndoIndex { get; } + int RedoIndex { get; } + + bool WriteToStream(Stream stream,bool xInclState); + bool ReadFromStream(Stream stream); + bool ValuesFromStream(Stream stream); + bool ValuesToStream(Stream stream); + void DrawSudoku(string title, object data, DrawingContext context, Rect rect); + } +} diff --git a/CSharpBible/Games/Sudoku_Base/Models/Interfaces/IUndoInformation.cs b/CSharpBible/Games/Sudoku_Base/Models/Interfaces/IUndoInformation.cs new file mode 100644 index 000000000..4f1f598d8 --- /dev/null +++ b/CSharpBible/Games/Sudoku_Base/Models/Interfaces/IUndoInformation.cs @@ -0,0 +1,28 @@ +// *********************************************************************** +// Assembly : MVVM_41_Sudoku +// Author : Mir +// Created : 05-19-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-19-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using System; +using System.Collections.Generic; + +namespace Sudoku_Base.Models.Interfaces; + +public interface IUndoInformation +{ + WeakReference Field { get; } + IList<(object? ov,object? nv)> list { get; } + + void Redo(); + void Undo(); + + void TryUpdateNewValue(object newValue); +} \ No newline at end of file diff --git a/CSharpBible/Games/Sudoku_Base/Models/SudokuField.cs b/CSharpBible/Games/Sudoku_Base/Models/SudokuField.cs new file mode 100644 index 000000000..5cc490395 --- /dev/null +++ b/CSharpBible/Games/Sudoku_Base/Models/SudokuField.cs @@ -0,0 +1,136 @@ +// *********************************************************************** +// Assembly : Sudoku_Base +// Author : Mir +// Created : 05-19-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-19-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using BaseLib.Interfaces; +using CommunityToolkit.Mvvm.ComponentModel; +using Sudoku_Base.Models.Interfaces; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Drawing; +using System.IO; +using BaseLib.Helper; +namespace Sudoku_Base.Models; + +public partial class SudokuField : ObservableObject, ISudokuField +{ + [ObservableProperty] + private Point _position; + + [ObservableProperty] + private int? _value; + + [ObservableProperty] + private bool _IsPredefined; + + [ObservableProperty] + private ObservableCollection _possibleValues = new(); + IList ISudokuField.PossibleValues => PossibleValues; + + public static IEnumerable<(string, Type)> PropTypes => [ + (nameof(Position),typeof(Point)), + (nameof(Value), typeof(int)), + (nameof(IsPredefined),typeof(bool)), + ("Dummy", typeof(byte)), + (nameof(PossibleValues),typeof(IEnumerable)) + ]; + + IEnumerable<(string, Type)> IPersistence.PropTypes => PropTypes; + + public SudokuField() + { + } + + public SudokuField(Point position, int? value, bool isPredefined, int[] pValues) + { + Position = position; + Value = value; + IsPredefined = isPredefined; + foreach (var pValue in pValues) + PossibleValues.Add(pValue); + } + + public void AddPossibleValue(int value) + { + if (!PossibleValues.Contains(value)) + { + PossibleValues.Add(value); + OnPropertyChanged(nameof(PossibleValues)); + } + } + + public void RemovePossibleValue(int value) + { + if (PossibleValues.Contains(value)) + { + PossibleValues.Remove(value); + OnPropertyChanged(nameof(PossibleValues)); + } + } + public void ReadFromStream(Stream stream) + { + + ReadFromEnumerable(stream.StreamToEnumerable( PropTypes)); + } + + public void WriteToStream(Stream stream) + { + stream.EnumerateToStream(EnumerateProp()); + } + + public void Clear() + { + Value = null; + IsPredefined = false; + PossibleValues.Clear(); + } + + public IEnumerable<(string, object)> EnumerateProp() + { + yield return (nameof(Position), Position); + yield return (nameof(Value), Value ?? -1); + yield return (nameof(IsPredefined), IsPredefined); + yield return ("Dummy", (byte)0); + yield return (nameof(PossibleValues), PossibleValues); + } + + public bool ReadFromEnumerable(IEnumerable<(string, object)> enumerable) + { + foreach ((string prop, object value) pv in enumerable) + { + switch (pv) + { + case (nameof(Position),Point p): + Position = p; + break; + case (nameof(Value),int i): + Value = i != -1 ? i : null; + break; + case (nameof(IsPredefined),bool x): + IsPredefined = x; + break; + case (nameof(PossibleValues), IEnumerable ei): + PossibleValues.Clear(); + foreach (var value in ei) + { + PossibleValues.Add(value.Value); + } + break; + default: // Unbekannte Werte werden ignoriert + break; + } + } + return true; + } + +} \ No newline at end of file diff --git a/CSharpBible/Games/Sudoku_Base/Models/SudokuModel.cs b/CSharpBible/Games/Sudoku_Base/Models/SudokuModel.cs new file mode 100644 index 000000000..80d651854 --- /dev/null +++ b/CSharpBible/Games/Sudoku_Base/Models/SudokuModel.cs @@ -0,0 +1,285 @@ +// *********************************************************************** +// Assembly : Sudoku_Base +// Author : Mir +// Created : 05-19-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-19-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2024 +// +// +// *********************************************************************** +using BaseLib.Interfaces; +using CommunityToolkit.Mvvm.ComponentModel; +using CommunityToolkit.Mvvm.Input; +using Sudoku_Base.Models.Interfaces; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.IO; +using System.Linq; +using System.Timers; +using BaseLib.Helper; +using System.Windows.Media; +using System.Globalization; +using System.Windows; + +/// +/// The Models namespace. +/// +/// +namespace Sudoku_Base.Models; + +/// +/// Class SudokuModel. +/// Implements the +/// Implements the +/// +/// +/// +/// +public partial class SudokuModel : ObservableObject, ISudokuModel +{ + private const string csApplStart = "Application startet"; +#if !NET5_0_OR_GREATER + private const string csApplEnded = "Application ended"; +#endif + private const string cValueFkt = "Value("; + #region Properties + /// + /// The timer + /// + /// + private readonly Timer _timer; + private readonly ISysTime _systime; + private readonly ILog _log; + + private bool _selfInflChange = false; + private IList undoInformation = new List(); + + [ObservableProperty] + [NotifyCanExecuteChangedFor(nameof(UndoCommand))] + [NotifyCanExecuteChangedFor(nameof(RedoCommand))] + [NotifyPropertyChangedFor(nameof(RedoIndex))] + private int _undoIndex = -1; + + private Dictionary Fields = new(); + + IReadOnlyList ISudokuModel.Fields => Fields.Values.ToList(); + IReadOnlyList ISudokuModel.Values => Fields.Values.Select(f=>f.Value).ToList(); + public ISudokuField this[int row, int col] => Fields[new(row, col)]; + + public int RedoIndex => undoInformation.Count - UndoIndex - 1; + + public static IEnumerable<(string, Type)> PropTypes => [ + (nameof(Fields),typeof(IEnumerable)) + ]; + + IEnumerable<(string, Type)> IPersistence.PropTypes => PropTypes; + #endregion + + #region Methods + /// + /// Initializes a new instance of the class. + /// + /// + public SudokuModel(ISysTime sysTime, ILog log) + { + _systime = sysTime; + _log = log; + _log.Log(csApplStart); + _timer = new(250d); + // _timer.Elapsed += (s, e) => OnPropertyChanged(nameof(Now)); + _timer.Start(); + for (int row = 0; row < 9; row++) + { + for (int col = 0; col < 9; col++) + { + var field = new SudokuField(new System.Drawing.Point(row, col), null, false, Array.Empty()); + Fields.Add(field.Position, field); + field.PropertyChanging += FieldPropChanging; + field.PropertyChanged += FieldPropChanged; + } + } + } + +#if !NET5_0_OR_GREATER + /// + /// Finalizes an instance of the class. + /// + ~SudokuModel() + { + _timer.Stop(); + _log.Log(csApplEnded); + return; + } +#endif + bool CanUndo() => UndoIndex >= 0 && UndoIndex < undoInformation.Count; + + bool CanRedo() => UndoIndex < undoInformation.Count - 1 && UndoIndex >= -1; + + [RelayCommand(CanExecute = nameof(CanUndo))] + private void Undo() + { + if (UndoIndex >= 0) + _selfInflChange = true; + try + { + undoInformation[UndoIndex--].Undo(); + } + finally + { + _selfInflChange = false; + } + } + + [RelayCommand(CanExecute = nameof(CanRedo))] + private void Redo() + { + if (UndoIndex < undoInformation.Count - 1) + _selfInflChange = true; + try + { + undoInformation[++UndoIndex].Redo(); + } + finally + { + _selfInflChange = false; + } + } + + public void Clear() + { + foreach (var field in Fields.Values) + { + field.Clear(); + } + ClearUndoList(); + } + + public bool ReadFromStream(Stream stream) + { + if (stream == null) return false; + return ReadFromEnumerable(stream.StreamToEnumerable(PropTypes)); ; + } + + public bool ValuesFromStream(Stream stream) + { + if (stream == null) return false; + return ReadFromEnumerable(stream.StreamToEnumerable(Fields.Select(pt=>($"{cValueFkt}{pt.Key.X},{pt.Key.Y})", typeof(byte))))); + } + + private void FieldPropChanging(object? sender, PropertyChangingEventArgs e) + { + if (_selfInflChange) { return; } + while (UndoIndex < undoInformation.Count - 1) + { + undoInformation.RemoveAt(undoInformation.Count - 1); + } + undoInformation.Add(new UndoInformation(sender as ISudokuField, [(sender?.GetProp(e.PropertyName ?? ""), null)])); + UndoIndex++; + } + + private void FieldPropChanged(object? sender, PropertyChangedEventArgs e) + { + if (_selfInflChange) { return; } + if (undoInformation[UndoIndex].Field.TryGetTarget(out var target) & target == sender) + { + undoInformation[UndoIndex].TryUpdateNewValue(sender?.GetProp(e.PropertyName ?? "")); + } + } + + public bool WriteToStream(Stream stream, bool xInclState) + { + if (stream == null) return false; + stream.EnumerateToStream(EnumerateProp()); + return true; + } + + public bool ValuesToStream(Stream stream) + { + if (stream == null) return false; + stream.EnumerateToStream(EnumerateValues()); + return true; + } + + private void ClearUndoList() + { + undoInformation.Clear(); + UndoIndex = -1; + } + + public IEnumerable<(string, object)> EnumerateProp() + { + yield return (nameof(Fields), Fields.Values); + } + + public IEnumerable<(string, object)> EnumerateValues() + { + foreach (var pt in Fields) + yield return ($"{cValueFkt}{pt.Key.X},{pt.Key.Y})", (byte)(pt.Value.Value ?? 0)); + } + + public bool ReadFromEnumerable(IEnumerable<(string, object)> enumerable) + { + foreach (var pt in enumerable) + switch (pt) + { + case (nameof(Fields), IEnumerable fields): + + Fields.Clear(); + foreach (ISudokuField field in fields) + { + Fields.Add(field.Position, field); + field.PropertyChanging += FieldPropChanging; + field.PropertyChanged += FieldPropChanged; + } + break; + case (string s, byte value) when s.StartsWith(cValueFkt): + var sfield = Fields.FirstOrDefault(pt => s == $"{cValueFkt}{pt.Key.X},{pt.Key.Y})").Value; + if (sfield != null) + { + sfield.Clear(); + sfield.Value = value != 0 ? value : null; + sfield.IsPredefined = value != 0; + } + break; + + } + ClearUndoList(); + return true; + } + + public void DrawSudoku(string title, object data, DrawingContext dc, Rect r) + { + if (data is not IReadOnlyList sudoku) + { + return; + } + var typeface = new Typeface("Arial"); + var formattedText = new FormattedText(title, CultureInfo.CurrentCulture, FlowDirection.LeftToRight, typeface, r.Width / 18.0, Brushes.Black, 1.0); + dc.DrawText(formattedText, r.TopLeft); + + // Draw the grid + var thinPen = new Pen(Brushes.DarkGray, 0.5); + var normalPen = new Pen(Brushes.Black, 1.0); + for (int i = 0; i <= 9; i++) + { + dc.DrawLine(i % 3 == 0 ? normalPen : thinPen, new Point(r.Left + i * r.Width / 9.0, (r.Height - r.Width) * 0.5), new Point(r.Left + i * r.Width / 9.0, (r.Height + r.Width) * 0.5)); + dc.DrawLine(i % 3 == 0 ? normalPen : thinPen, new Point(r.Left, (r.Height - r.Width) * 0.5 + i * r.Width / 9.0), new Point(r.Left + r.Width, (r.Height - r.Width) * 0.5 + i * r.Width / 9.0)); + } + + // Draw the numbers + for (int i = 0; i < 9; i++) + for (int j = 0; j < 9; j++) + if (sudoku[i + j * 9] is int iV) + { + formattedText = new FormattedText(iV.ToString() ?? "", System.Globalization.CultureInfo.CurrentCulture, FlowDirection.LeftToRight, typeface, r.Width / 9.5, Brushes.Black, 1.0); + dc.DrawText(formattedText, new Point(r.Left + (i + 0.25) * r.Width / 9.0, (r.Height - r.Width) * 0.5 + j * r.Width / 9.0)); + } + } + + #endregion +} diff --git a/CSharpBible/Games/Sudoku_Base/Models/UndoInformation.cs b/CSharpBible/Games/Sudoku_Base/Models/UndoInformation.cs new file mode 100644 index 000000000..4528b60ea --- /dev/null +++ b/CSharpBible/Games/Sudoku_Base/Models/UndoInformation.cs @@ -0,0 +1,99 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Sudoku_Base.Models.Interfaces; + +namespace Sudoku_Base.Models; + +public class UndoInformation : IUndoInformation +{ + public WeakReference Field { get; } + public IList<(object? ov, object? nv)> list { get; } + + public UndoInformation(ISudokuField field, IList<(object? ov, object? nv)> list) + { + Field = new WeakReference(field); + this.list = list; + } + + public void Redo() + { + foreach (var (ov, nv) in list) + { + var xf = Field.TryGetTarget(out var f); + if (ov is bool b && nv is bool b2 && xf && f!.IsPredefined == b) + { + f.IsPredefined = b2; + } + else if (ov is int i && xf && f!.Value == i || ov == null && xf) + { + f.Value = nv as int?; + } + else if (nv is IList li && xf) + { + f.PossibleValues.Clear(); + foreach (var l in li) + { + f.PossibleValues.Add(l); + } + } + } + } + + public void Undo() + { + foreach (var (ov, nv) in list) + { + var xf = Field.TryGetTarget(out var f); + if (nv is bool b && ov is bool b2 && xf && f!.IsPredefined == b) + { + f.IsPredefined = b2; + } + else if (nv is int i && xf && f!.Value == i || nv == null && xf) + { + f.Value = ov as int?; + } + else if (ov is IList li && xf) + { + f.PossibleValues.Clear(); + foreach (var l in li) + { + f.PossibleValues.Add(l); + } + } + } + } + + public void TryUpdateNewValue(object newValue) + { + int i2; + switch (newValue) + { + case bool b: + var le = list.FirstOrDefault(l => l.ov is bool); + if ((i2 = list.IndexOf(le)) >= 0) + { + list[i2] = (le.ov, b); + } + break; + case int i: + case null: + var le2 = list.FirstOrDefault(l => l.ov is int?); + if ((i2 = list.IndexOf(le2)) >= 0) + { + list[i2] = (le2.ov, newValue); + } + + break; + case IEnumerable li: + var le3 = list.FirstOrDefault(l => l.ov is IEnumerable); + if ((i2 = list.IndexOf(le3)) >= 0) + { + list[i2] = (le3.ov, newValue); + } + break; + default: + break; + } + } +} diff --git a/CSharpBible/Games/Sudoku_Base/Sudoku_Base.csproj b/CSharpBible/Games/Sudoku_Base/Sudoku_Base.csproj new file mode 100644 index 000000000..34ea0274f --- /dev/null +++ b/CSharpBible/Games/Sudoku_Base/Sudoku_Base.csproj @@ -0,0 +1,17 @@ + + + + Library + net481-windows;net48-windows;net472-windows;net462-windows;net6.0-windows;net7.0-windows;net8.0-windows;net9.0-windows + enable + + + + + + + + + + + diff --git a/CSharpBible/Games/Sudoku_BaseTests/Models/SudokuFieldTests.cs b/CSharpBible/Games/Sudoku_BaseTests/Models/SudokuFieldTests.cs new file mode 100644 index 000000000..2ed145cd0 --- /dev/null +++ b/CSharpBible/Games/Sudoku_BaseTests/Models/SudokuFieldTests.cs @@ -0,0 +1,136 @@ +using System.Collections.Generic; +using System.Linq; +using MVVM.ViewModel; +using System.Drawing; +using System.Diagnostics; +using static BaseLib.Helper.TestHelper; +using Sudoku_Base.Models.Interfaces; + +namespace Sudoku_Base.Models.Tests +{ + [TestClass()] + public class SudokuFieldTests : BaseTestViewModel + { + public static IEnumerable SudokuFieldTestData => [ + [new byte[] { 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00 }, + new SudokuField(new Point(3, 5), null, false, [1, 3, 7])], + [new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 }, + new SudokuField(new Point(0, 0), 5, true, [])], + [new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 }, + new SudokuField(new Point(0, 0), 5, true, [0, 1, 2])], + [new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00 }, + new SudokuField(new Point(0, 0), null, false, [1, 2, 5, 7, 8, 9])] + ]; + + [TestMethod()] + public void SetUpTest() + { + Assert.IsNotNull(testModel); + Assert.IsInstanceOfType(testModel, typeof(SudokuField)); + Assert.AreEqual(null, testModel.Value); + Assert.AreEqual(false, testModel.IsPredefined); + Assert.AreEqual(0, testModel.PossibleValues.Count); + } + + [DataTestMethod()] + [DataRow(new int[] { 1, 2, 3, 4, 5 }, 5)] + [DataRow(new int[] { 1 }, 1)] + [DataRow(new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }, 9)] + [DataRow(new int[] { 1, 1, 3, 3, 5, 5 }, 3)] + + public void AddPossibleValueTest(int[] aiAct, int iCnt) + { + foreach (var iAct in aiAct) + { + testModel.AddPossibleValue(iAct); + Assert.IsTrue(testModel.PossibleValues.Contains(iAct)); + } + Assert.AreEqual(iCnt, testModel.PossibleValues.Count); + } + + [DataTestMethod()] + [DataRow(new int[] { 1, 2, 3, 4, 5 }, 1)] + [DataRow(new int[] { 1, 2, 3, 4, 5 }, 3)] + [DataRow(new int[] { 1, 2, 3, 4, 5 }, 5)] + [DataRow(new int[] { 1, 2, 3, 4, 5 }, 0)] + [DataRow(new int[] { 1 }, 1)] + [DataRow(new int[] { 1 }, 0)] + [DataRow(new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }, 2)] + [DataRow(new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }, 4)] + [DataRow(new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }, 6)] + [DataRow(new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }, 10)] + [DataRow(new int[] { 1, 1, 3, 3, 5, 5 }, 3)] + [DataRow(new int[] { 1, 1, 3, 3, 5, 5 }, 1)] + [DataRow(new int[] { 1, 1, 3, 3, 5, 5 }, 2)] + public void RemovePossibleValueTest(int[] aiAct, int iAct) + { + // Arrange + foreach (var iAct2 in aiAct) + testModel.AddPossibleValue(iAct2); + // Act + testModel.RemovePossibleValue(iAct); + // Assert + Assert.IsFalse(testModel.PossibleValues.Contains(iAct)); + } + + [TestMethod()] + [DynamicData(nameof(SudokuFieldTestData))] + public void ReadFromStreamTest(byte[] bytes, SudokuField field) + { + // Arrange + var stream = new System.IO.MemoryStream(bytes); + // Act + testModel.ReadFromStream(stream); + // Assert + AssertAreEqual(field, testModel, []); + } + + [DataTestMethod()] + [DynamicData(nameof(SudokuFieldTestData))] + public void WriteToStreamTest(byte[] bytes, SudokuField field) + { + // Arrange + var stream = new System.IO.MemoryStream(); + // Act + field.WriteToStream(stream); + // Assert + Debug.WriteLine(string.Join(",", stream.ToArray().Select(b => $"0x{b:X2}"))); + CollectionAssert.AreEqual(bytes, stream.ToArray()); + } + + [DataTestMethod()] + [DataRow(new[] { 3, 5 }, null, false, new[] { 1, 3, 7 })] + [DataRow(new[] { 0, 0 }, 5, true, new int[] { })] + [DataRow(new[] { 0, 0 }, 5, true, new int[] { 0, 1, 2 })] + [DataRow(new[] { 0, 0 }, null, false, new int[] { 1, 2, 5, 7, 8, 9 })] + + public void SudokuFieldTest(int[] aiPos, int? value, bool isPredefined, int[] pValues) + { + // Act + var field = new SudokuField(new Point(aiPos[0], aiPos[1]), value, isPredefined, pValues); + // Assert + Assert.AreEqual(new Point(aiPos[0], aiPos[1]), field.Position); + Assert.AreEqual(value, field.Value); + Assert.AreEqual(isPredefined, field.IsPredefined); + CollectionAssert.AreEqual(pValues, field.PossibleValues); + CollectionAssert.AreEqual(pValues.ToList(), (field as ISudokuField).PossibleValues.ToList()); + } + + [TestMethod()] + [DataRow(new[] { 3, 5 }, null, false, new[] { 1, 3, 7 })] + [DataRow(new[] { 0, 0 }, 5, true, new int[] { })] + [DataRow(new[] { 0, 0 }, 5, true, new int[] { 0, 1, 2 })] + [DataRow(new[] { 0, 0 }, null, false, new int[] { 1, 2, 5, 7, 8, 9 })] + public void ClearTest(int[] aiPos, int? value, bool isPredefined, int[] pValues) + { + // Arrange + var field = new SudokuField(new Point(aiPos[0], aiPos[1]), value, isPredefined, pValues); + // Act + field.Clear(); + // Assert + Assert.AreEqual(null,field.Value); + Assert.AreEqual(false, field.IsPredefined); + Assert.AreEqual(0, field.PossibleValues.Count); + } + } +} \ No newline at end of file diff --git a/CSharpBible/Games/Sudoku_BaseTests/Models/SudokuModelTests.cs b/CSharpBible/Games/Sudoku_BaseTests/Models/SudokuModelTests.cs new file mode 100644 index 000000000..7ce4590ef --- /dev/null +++ b/CSharpBible/Games/Sudoku_BaseTests/Models/SudokuModelTests.cs @@ -0,0 +1,207 @@ +// *********************************************************************** +// Assembly : MVVM_41_SudokuTests +// Author : Mir +// Created : 05-19-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-19-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using CommunityToolkit.Mvvm.ComponentModel; +using BaseLib.Interfaces; +using MVVM.ViewModel; +using NSubstitute; +using System.ComponentModel; +using System.Diagnostics; +using System.Linq; +using System.Collections.Generic; +using System.Drawing; +using Sudoku_Base.Models.Interfaces; +using System.IO; + +/// +/// The Tests namespace. +/// +/// +namespace Sudoku_Base.Models.Tests +{ + /// + /// Defines test class SudokuModelTests. + /// Implements the + /// + /// + /// + [TestClass()] + public class SudokuModelTests : BaseTestViewModel + { + public static IEnumerable SudokuModelTestData => [ + [new byte[] { 0x51,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x02,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x02,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x02,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x02,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x02,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x03,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x03,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x03,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x03,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x07,0x00,0x00,0x00, + 0x03,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x03,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x03,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x04,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x05,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x05,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x05,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x05,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x05,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x05,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x05,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x05,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x06,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x06,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x06,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x06,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x06,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x06,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x06,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x06,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x07,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x07,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x07,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x07,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x07,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x07,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x07,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x07,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x08,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x08,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x08,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x08,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x08,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x08,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, 0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00 }, + new[] {new SudokuField(new Point(3, 5), null, false, [1, 3, 7]) ,new SudokuField(new Point(5, 3), 3, false, []),new SudokuField(new Point(0, 0), 1, true, []) }], + [new byte[] { 0x51,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00 }, + new[] {new SudokuField(new Point(0, 0), 5, true, [])}], + [new byte[] { 0x51,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x01,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00 }, + new[] {new SudokuField(new Point(0, 0), 5, true, [0, 1, 2])}], + [new byte[] { 0x51,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x06,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00 }, + new[] {new SudokuField(new Point(0, 0), null, false, [1, 2, 5, 7, 8, 9])}] + ]; + +#pragma warning disable CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + /// + /// The test model + /// + /// + SudokuModel testModel; + ISysTime _sysTime; + ILog _log; +#pragma warning restore CS8618 // Ein Non-Nullable-Feld muss beim Beenden des Konstruktors einen Wert ungleich NULL enthalten. Erwägen Sie die Deklaration als Nullable. + + /// + /// Initializes this instance. + /// + [TestInitialize] + public void Init() + { + _sysTime = Substitute.For(); + _log = Substitute.For(); + testModel = new(_sysTime,_log); + testModel.PropertyChanged += OnVMPropertyChanged; + if (testModel is INotifyPropertyChanging npchgn) + npchgn.PropertyChanging += OnVMPropertyChanging; + ClearLog(); + } + + /// + /// Defines the test method SetupTest. + /// + [TestMethod()] + public void SetupTest() + { + Assert.IsNotNull(testModel); + Assert.IsInstanceOfType(testModel, typeof(SudokuModel)); + Assert.IsInstanceOfType(testModel, typeof(ObservableObject)); + Assert.IsInstanceOfType(testModel, typeof(INotifyPropertyChanged)); + } + + [DataTestMethod()] + [DynamicData(nameof(SudokuModelTestData))] + public void WriteToStreamTest(byte[] bytes, SudokuField[] fields) + { + // Arrange + var stream = new System.IO.MemoryStream(); + foreach (var field in fields) + { + testModel[field.Position.X, field.Position.Y].Value = field.Value; + testModel[field.Position.X, field.Position.Y].IsPredefined = field.IsPredefined; + testModel[field.Position.X, field.Position.Y].PossibleValues.Clear(); + foreach (var item in field.PossibleValues) + { + testModel[field.Position.X, field.Position.Y].PossibleValues.Add(item); + } + } + // Act + testModel.WriteToStream(stream,false); + // Assert + Debug.WriteLine(string.Join(",", stream.ToArray().Select(b => $"0x{b:X2}"))); + CollectionAssert.AreEqual(bytes, stream.ToArray()); + } + + [DataTestMethod()] + [DynamicData(nameof(SudokuModelTestData))] + public void ReadFromStreamTest(byte[] bytes, SudokuField[] fields) + { + // Arrange + var stream = new System.IO.MemoryStream(bytes); + // Act + testModel.ReadFromStream(stream); + // Assert + foreach (var field in fields) + { + Assert.AreEqual(field.Value, testModel[field.Position.X, field.Position.Y].Value); + Assert.AreEqual(field.IsPredefined, testModel[field.Position.X, field.Position.Y].IsPredefined ); + CollectionAssert.AreEqual(field.PossibleValues, testModel[field.Position.X, field.Position.Y].PossibleValues.ToList(),$"Field({field.Position}).PossibleValues"); + + } + } + + [DataTestMethod()] + [DataRow(".\\Resources\\123.sudoku", new[] { 0,0,1, 0,1,-1, 0,2,-1, 0,3,-1, 0,4,9, 0,5,2, 0,6,-1, 0,7,-1, 0,8,-1, + 1,0,-1, 1,1,9, 1,2,5, 1,3,-1, 1,4,-1, 1,5,-1, 1,6,-1, 1,7,-1, 1,8,3, + 2,0,3, 2,1,-1, 2,2,8, 2,3,1, 2,4,-1, 2,5,-1, 2,6,2, 2,7,-1, 2,8,-1, + 3,0,-1, 3,1,1, 3,2,-1, 3,3,7, 3,4,-1, 3,5,-1, 3,6,-1, 3,7,9, 3,8,-1, + 4,0,-1, 4,1,3, 4,2,-1, 4,3,-1, 4,4,-1, 4,5,-1, 4,6,-1, 4,7,8, 4,8,4, + 5,0,6, 5,1,-1, 5,2,-1, 5,3,4, 5,4,1, 5,5,-1, 5,6,3, 5,7,-1, 5,8,-1, + 6,0,-1, 6,1,-1, 6,2,-1, 6,3,-1, 6,4,2, 6,5,8, 6,6,4, 6,7,-1, 6,8,-1, + 7,0,-1, 7,1,-1, 7,2,-1, 7,3,-1, 7,4,4, 7,5,-1, 7,6,-1, 7,7,3, 7,8,-1, + 8,0,-1, 8,1,4, 8,2,6, 8,3,-1, 8,4,-1, 8,5,-1, 8,6,8, 8,7,7, 8,8,2 })] // Orginal Sudoku-File + public void ReadValuesTest(string filename, int[] aiExp) + { + // Arrange + Assert.IsTrue(File.Exists(filename)); + var stream = new FileStream(filename, FileMode.Open,FileAccess.Read); + // Act + testModel.ValuesFromStream(stream); + // Assert + try + { + foreach (var pt in aiExp + .Select((v, i) => (i % 3 == 0) ? (new Point(aiExp[i], aiExp[i + 1]), (aiExp[i + 2] == -1) ? null : aiExp[i + 2]) : null) + .Where(i => i != null)) + { + Assert.AreEqual(pt.Value.Item2, testModel[pt.Value.Item1.X, pt.Value.Item1.Y].Value, $"Field({pt.Value.Item1}).Value"); + } + } + catch + { + Debug.WriteLine(string.Join(", ", (testModel as ISudokuModel).Fields.Select((pt, i) => $"{(i % 9 == 0 ? "\r\n" : "")}{pt.Position.X},{pt.Position.Y},{pt.Value ?? -1}"))); + throw; + } + } + + + } +} diff --git a/CSharpBible/Games/Sudoku_BaseTests/Models/UndoInformationTests.cs b/CSharpBible/Games/Sudoku_BaseTests/Models/UndoInformationTests.cs new file mode 100644 index 000000000..22709a635 --- /dev/null +++ b/CSharpBible/Games/Sudoku_BaseTests/Models/UndoInformationTests.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using static BaseLib.Helper.TestHelper; + +namespace Sudoku_Base.Models.Tests; + +[TestClass()] +public class UndoInformationTests +{ + [DataTestMethod()] + [DataRow(new int[] { 1, 2 }, 5, true, new int[] { 1, 2, 3, 4, 5 }, null)] + [DataRow(new int[] { 1, 2 }, 5, true, new int[] { 1, 2, 3, 4, 5 }, true)] + [DataRow(new int[] { 1, 2 }, 5, true, new int[] { 1, 2, 3, 4, 5 }, new[] {3,5,7 })] + + public void UndoInformationTest(int[] aiPos, int? value, bool isPredefined, int[] pValues,object ov) + { + // Arrange + var field = new SudokuField(new System.Drawing.Point(aiPos[0], aiPos[1]), value, isPredefined, pValues); + // Act + var testModel = new UndoInformation(field, [(ov, null)]); + // Assert + Assert.IsNotNull(testModel); + Assert.IsTrue(testModel.Field.TryGetTarget(out var f2)); + AssertAreEqual(field, f2, []); + Assert.AreEqual(1, testModel.list.Count); + Assert.AreEqual((ov, null), testModel.list[0]); + } + + [TestMethod()] + [DataRow(new int[] { 1, 2 }, 5, true, new int[] { 1, 2, 3, 4, 5 }, 5, null, true)] + [DataRow(new int[] { 1, 2 }, 5, true, new int[] { 1, 2, 3, 4, 5 }, null, 5, false)] + [DataRow(new int[] { 1, 2 }, null, true, new int[] { 1, 2, 3, 4, 5 }, 5, null, false)] + [DataRow(new int[] { 1, 2 }, null, true, new int[] { 1, 2, 3, 4, 5 }, null, 5, true)] + [DataRow(new int[] { 1, 2 }, 5, true, new int[] { 1, 2, 3, 4, 5 }, true, false, true)] + [DataRow(new int[] { 1, 2 }, 5, false, new int[] { 1, 2, 3, 4, 5 }, true, false, false)] + [DataRow(new int[] { 1, 2 }, 5, true, new int[] { 1, 2, 3, 4, 5 }, new[] { 5 }, new[] { 3, 7 }, true)] + public void RedoTest(int[] aiPos, int? value, bool isPredefined, int[] pValues, object ov, object nv, bool xExp) + { + // Arrange + var field = new SudokuField(new System.Drawing.Point(aiPos[0], aiPos[1]), value, isPredefined, pValues); + var testModel = new UndoInformation(field, [(ov, null)]); + testModel.TryUpdateNewValue(nv); + // Act + testModel.Redo(); + // Assert + switch (nv, xExp) + { + case (int i, true): + case (null, true): + Assert.AreEqual(nv, field.Value); + break; + case (bool b, true): + Assert.AreEqual(b, field.IsPredefined); + break; + case (IEnumerable li, true): + Assert.IsTrue(field.PossibleValues.SequenceEqual(li)); + break; + case (int i, false): + case (null, false): + Assert.AreEqual(value, field.Value); + break; + case (bool b, false): + Assert.AreEqual(isPredefined, field.IsPredefined); + break; + case (IEnumerable li, false): + Assert.IsTrue(field.PossibleValues.SequenceEqual(pValues)); + break; + default: + Assert.Fail(); + break; + } + } + + [TestMethod()] + [DataRow(new int[] { 1, 2 }, 5, true, new int[] { 1, 2, 3, 4, 5 }, 5, null,false)] + [DataRow(new int[] { 1, 2 }, 5, true, new int[] { 1, 2, 3, 4, 5 }, null, 5,true)] + [DataRow(new int[] { 1, 2 }, null, true, new int[] { 1, 2, 3, 4, 5 }, 5, null,true)] + [DataRow(new int[] { 1, 2 }, null, true, new int[] { 1, 2, 3, 4, 5 }, null, 5,false)] + [DataRow(new int[] { 1, 2 }, 5, true, new int[] { 1, 2, 3, 4, 5 }, true, false,false)] + [DataRow(new int[] { 1, 2 }, 5, false, new int[] { 1, 2, 3, 4, 5 }, true, false,true)] + [DataRow(new int[] { 1, 2 }, 5, true, new int[] { 1, 2, 3, 4, 5 }, new[] { 5 }, new[] { 3, 7 },true)] + public void UndoTest(int[] aiPos, int? value, bool isPredefined, int[] pValues, object ov, object nv,bool xExp) + { + // Arrange + var field = new SudokuField(new System.Drawing.Point(aiPos[0], aiPos[1]), value, isPredefined, pValues); + var testModel = new UndoInformation(field, [(ov, null)]); + testModel.TryUpdateNewValue(nv); + // Act + testModel.Undo(); + // Assert + switch (ov,xExp) + { + case (int i,true): + case (null,true): + Assert.AreEqual(ov, field.Value); + break; + case (bool b,true): + Assert.AreEqual(b, field.IsPredefined); + break; + case (IEnumerable li,true): + Assert.IsTrue(field.PossibleValues.SequenceEqual(li)); + break; + case (int i, false): + case (null, false): + Assert.AreEqual(value, field.Value); + break; + case (bool b, false): + Assert.AreEqual(isPredefined, field.IsPredefined); + break; + case (IEnumerable li, false): + Assert.IsTrue(field.PossibleValues.SequenceEqual(pValues)); + break; + default: + Assert.Fail(); + break; + } + } + + [DataTestMethod()] + [DataRow(new int[] { 1, 2 }, 5, true, new int[] { 1, 2, 3, 4, 5 }, 5,null)] + [DataRow(new int[] { 1, 2 }, 5, true, new int[] { 1, 2, 3, 4, 5 }, null,5)] + [DataRow(new int[] { 1, 2 }, 5, true, new int[] { 1, 2, 3, 4, 5 }, true,false)] + [DataRow(new int[] { 1, 2 }, 5, true, new int[] { 1, 2, 3, 4, 5 }, new[] { 5 },new[] { 3, 7 })] + [DataRow(new int[] { 1, 2 }, 5, true, new int[] { 1, 2, 3, 4, 5 }, null ,"Hello")] + + public void TryUpdateNewValueTest(int[] aiPos, int? value, bool isPredefined, int[] pValues, object ov,object nv) + { + // Arrange + var field = new SudokuField(new System.Drawing.Point(aiPos[0], aiPos[1]), value, isPredefined, pValues); + var testModel = new UndoInformation(field, [(ov, null)]); + // Act + testModel.TryUpdateNewValue(nv); + // Assert + Assert.AreEqual(1, testModel.list.Count); + Assert.AreEqual((ov, nv is string?null:nv), testModel.list[0]); + } +} \ No newline at end of file diff --git a/CSharpBible/Games/Sudoku_BaseTests/Resources/123.sudoku b/CSharpBible/Games/Sudoku_BaseTests/Resources/123.sudoku new file mode 100644 index 000000000..9531ccb66 Binary files /dev/null and b/CSharpBible/Games/Sudoku_BaseTests/Resources/123.sudoku differ diff --git a/CSharpBible/Games/Sudoku_BaseTests/Sudoku_BaseTests.csproj b/CSharpBible/Games/Sudoku_BaseTests/Sudoku_BaseTests.csproj new file mode 100644 index 000000000..e6eb1452f --- /dev/null +++ b/CSharpBible/Games/Sudoku_BaseTests/Sudoku_BaseTests.csproj @@ -0,0 +1,35 @@ + + + + net481-windows;net48-windows;net472-windows;net462-windows;net6.0-windows;net7.0-windows;net8.0-windows;net9.0-windows + true + false + AnyCPU;x86 + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + + diff --git a/CSharpBible/Games/Tetris_Base/Model/BlockAngle.cs b/CSharpBible/Games/Tetris_Base/Model/BlockAngle.cs index 54fbe03a6..ea08cf1c7 100644 --- a/CSharpBible/Games/Tetris_Base/Model/BlockAngle.cs +++ b/CSharpBible/Games/Tetris_Base/Model/BlockAngle.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Tetris_Base.Model +namespace Tetris_Base.Model { /// /// Enum BlockAngle diff --git a/CSharpBible/Games/Tetris_Base/Model/BlockType.cs b/CSharpBible/Games/Tetris_Base/Model/BlockType.cs index ecd4c90e8..a4cd775a5 100644 --- a/CSharpBible/Games/Tetris_Base/Model/BlockType.cs +++ b/CSharpBible/Games/Tetris_Base/Model/BlockType.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Tetris_Base.Model +namespace Tetris_Base.Model { /// /// Enum BlockType diff --git a/CSharpBible/Games/Tetris_Base/Model/Defines.cs b/CSharpBible/Games/Tetris_Base/Model/Defines.cs index 9e69fafb7..7911d4576 100644 --- a/CSharpBible/Games/Tetris_Base/Model/Defines.cs +++ b/CSharpBible/Games/Tetris_Base/Model/Defines.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Tetris_Base.Model { diff --git a/CSharpBible/Games/Tetris_Base/Model/Game.cs b/CSharpBible/Games/Tetris_Base/Model/Game.cs index 8832ec52e..8de1988f7 100644 --- a/CSharpBible/Games/Tetris_Base/Model/Game.cs +++ b/CSharpBible/Games/Tetris_Base/Model/Game.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Tetris_Base.Model { diff --git a/CSharpBible/Games/Tetris_Base/Model/PlayField.cs b/CSharpBible/Games/Tetris_Base/Model/PlayField.cs index 3623a6131..14e723609 100644 --- a/CSharpBible/Games/Tetris_Base/Model/PlayField.cs +++ b/CSharpBible/Games/Tetris_Base/Model/PlayField.cs @@ -1,8 +1,5 @@ using System; -using System.Collections.Generic; using System.Drawing; -using System.Linq; -using System.Text; namespace Tetris_Base.Model { diff --git a/CSharpBible/Games/Tetris_Base/Model/PlayGround.cs b/CSharpBible/Games/Tetris_Base/Model/PlayGround.cs index d061cc659..7e0e98a4b 100644 --- a/CSharpBible/Games/Tetris_Base/Model/PlayGround.cs +++ b/CSharpBible/Games/Tetris_Base/Model/PlayGround.cs @@ -1,8 +1,5 @@ using System; -using System.Collections.Generic; using System.Drawing; -using System.Linq; -using System.Text; namespace Tetris_Base.Model { diff --git a/CSharpBible/Games/Tetris_Base/Tetris_Base.csproj b/CSharpBible/Games/Tetris_Base/Tetris_Base.csproj index d97098629..8fb3a98a3 100644 --- a/CSharpBible/Games/Tetris_Base/Tetris_Base.csproj +++ b/CSharpBible/Games/Tetris_Base/Tetris_Base.csproj @@ -1,9 +1,7 @@ + - net6.0 - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\bin\$(MSBuildProjectName) + net6.0;net7.0;net8.0 Exe @@ -17,9 +15,6 @@ false false 1.0.* - JC-Soft - Joe Care - Copyright © JC-Soft 2022 Tetris 1.0 Base diff --git a/CSharpBible/Games/Tetris_BaseTests/Helper/PropertyClassTests.cs b/CSharpBible/Games/Tetris_BaseTests/Helper/PropertyClassTests.cs index 9c5f9b276..ad2ba4f84 100644 --- a/CSharpBible/Games/Tetris_BaseTests/Helper/PropertyClassTests.cs +++ b/CSharpBible/Games/Tetris_BaseTests/Helper/PropertyClassTests.cs @@ -1,16 +1,11 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tetris_Base.Helper; -namespace Tetris_Base.Helper.Tests { - /// - /// Defines test class PropertyClassTests. - /// - [TestClass()] +namespace Tetris_Base.Helper.Tests +{ + /// + /// Defines test class PropertyClassTests. + /// + [TestClass()] public class PropertyClassTests { /// /// Sets the property test. diff --git a/CSharpBible/Games/Tetris_BaseTests/Model/BlockTests.cs b/CSharpBible/Games/Tetris_BaseTests/Model/BlockTests.cs index 40fb035a9..fe1987e4b 100644 --- a/CSharpBible/Games/Tetris_BaseTests/Model/BlockTests.cs +++ b/CSharpBible/Games/Tetris_BaseTests/Model/BlockTests.cs @@ -1,12 +1,10 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -using Tetris_Base.Model; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using ConsoleDisplay.View; using TestConsole; +using System.Drawing; +using System.Threading; +using System.Windows.Forms; namespace Tetris_Base.Model.Tests { diff --git a/CSharpBible/Games/Tetris_BaseTests/Tetris_BaseTests.csproj b/CSharpBible/Games/Tetris_BaseTests/Tetris_BaseTests.csproj index 287cf4df7..8f2cca4bd 100644 --- a/CSharpBible/Games/Tetris_BaseTests/Tetris_BaseTests.csproj +++ b/CSharpBible/Games/Tetris_BaseTests/Tetris_BaseTests.csproj @@ -1,12 +1,9 @@ - + + - net6.0-windows - enable + net6.0-windows;net7.0-windows;net8.0-windows enable true - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\bin\$(MSBuildProjectName) false @@ -18,10 +15,10 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/CSharpBible/Games/Tetris_BaseTests/View/DisplayTests.cs b/CSharpBible/Games/Tetris_BaseTests/View/DisplayTests.cs index ae08ce723..39a99ba01 100644 --- a/CSharpBible/Games/Tetris_BaseTests/View/DisplayTests.cs +++ b/CSharpBible/Games/Tetris_BaseTests/View/DisplayTests.cs @@ -1,12 +1,8 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -using Tetris_Base.View; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ConsoleDisplay.View; using TestConsole; +using System.Windows.Forms; +using System.Threading; namespace ConsoleDisplay.View.Tests { diff --git a/CSharpBible/Games/VectorGfx/App.xaml b/CSharpBible/Games/VectorGfx/App.xaml new file mode 100644 index 000000000..4e09d700c --- /dev/null +++ b/CSharpBible/Games/VectorGfx/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/CSharpBible/Games/VectorGfx/App.xaml.cs b/CSharpBible/Games/VectorGfx/App.xaml.cs new file mode 100644 index 000000000..bec11570d --- /dev/null +++ b/CSharpBible/Games/VectorGfx/App.xaml.cs @@ -0,0 +1,14 @@ +using System.Configuration; +using System.Data; +using System.Windows; + +namespace VectorGfx +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } + +} diff --git a/CSharpBible/Games/VectorGfx/AssemblyInfo.cs b/CSharpBible/Games/VectorGfx/AssemblyInfo.cs new file mode 100644 index 000000000..b0ec82757 --- /dev/null +++ b/CSharpBible/Games/VectorGfx/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/CSharpBible/Games/VectorGfx/ClassDiagram1.cd b/CSharpBible/Games/VectorGfx/ClassDiagram1.cd new file mode 100644 index 000000000..81ca9613d --- /dev/null +++ b/CSharpBible/Games/VectorGfx/ClassDiagram1.cd @@ -0,0 +1,25 @@ + + + + + + AAQgEAAAACAABwgAAAAAAAAAAAAAAAACIAAAAAgAAAQ= + Model\Interfaces\IGame.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + IGameObject.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + IVfxGameObject.cs + + + + \ No newline at end of file diff --git a/CSharpBible/Games/VectorGfx/MainWindow.xaml b/CSharpBible/Games/VectorGfx/MainWindow.xaml new file mode 100644 index 000000000..889f0199f --- /dev/null +++ b/CSharpBible/Games/VectorGfx/MainWindow.xaml @@ -0,0 +1,12 @@ + + + + + diff --git a/CSharpBible/Games/VectorGfx/MainWindow.xaml.cs b/CSharpBible/Games/VectorGfx/MainWindow.xaml.cs new file mode 100644 index 000000000..0bb5d66ae --- /dev/null +++ b/CSharpBible/Games/VectorGfx/MainWindow.xaml.cs @@ -0,0 +1,24 @@ +using System.Text; +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 VectorGfx +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/CSharpBible/Games/VectorGfx/Models/Character.cs b/CSharpBible/Games/VectorGfx/Models/Character.cs new file mode 100644 index 000000000..397b739d5 --- /dev/null +++ b/CSharpBible/Games/VectorGfx/Models/Character.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using VectorGfx.Models.Interfaces; + +namespace VectorGfx.Models; + +public class Character : ICharacter +{ + +} diff --git a/CSharpBible/Games/VectorGfx/Models/Interfaces/ICharacter.cs b/CSharpBible/Games/VectorGfx/Models/Interfaces/ICharacter.cs new file mode 100644 index 000000000..eea23a223 --- /dev/null +++ b/CSharpBible/Games/VectorGfx/Models/Interfaces/ICharacter.cs @@ -0,0 +1,6 @@ +namespace VectorGfx.Models.Interfaces +{ + internal interface ICharacter + { + } +} \ No newline at end of file diff --git a/CSharpBible/Games/VectorGfx/Models/Interfaces/IGame.cs b/CSharpBible/Games/VectorGfx/Models/Interfaces/IGame.cs new file mode 100644 index 000000000..ed5800dd4 --- /dev/null +++ b/CSharpBible/Games/VectorGfx/Models/Interfaces/IGame.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace VectorGfx.Models.Interfaces; + +public interface IGame +{ + int Score { get; set; } + int Lives { get; set; } + + public void Start(); + public void Stop(); + public void Pause(); + public void Resume(); + public void Reset(); + public void Update(); + public void Draw(); + public void LoadContent(); + public void UnloadContent(); + public void Initialize(); + public void Dispose(); +} diff --git a/CSharpBible/Games/VectorGfx/Models/Interfaces/IGameObject.cs b/CSharpBible/Games/VectorGfx/Models/Interfaces/IGameObject.cs new file mode 100644 index 000000000..1dd2fab21 --- /dev/null +++ b/CSharpBible/Games/VectorGfx/Models/Interfaces/IGameObject.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace VectorGfx.Models.Interfaces; + +public interface IGameObject : ITypedObject +{ + int Idx { get; set; } +} diff --git a/CSharpBible/Games/VectorGfx/Models/Interfaces/IHasPoint.cs b/CSharpBible/Games/VectorGfx/Models/Interfaces/IHasPoint.cs new file mode 100644 index 000000000..f77f371ae --- /dev/null +++ b/CSharpBible/Games/VectorGfx/Models/Interfaces/IHasPoint.cs @@ -0,0 +1,11 @@ +using CommunityToolkit.Mvvm.Input; +using System.Windows; + +namespace VectorGfx.Models.Interfaces; + +public interface IHasPoint +{ + Point P { get; set; } + + IRelayCommand MouseHover { get; set; } +} \ No newline at end of file diff --git a/CSharpBible/Games/VectorGfx/Models/Interfaces/IPositionedObject.cs b/CSharpBible/Games/VectorGfx/Models/Interfaces/IPositionedObject.cs new file mode 100644 index 000000000..824ac9646 --- /dev/null +++ b/CSharpBible/Games/VectorGfx/Models/Interfaces/IPositionedObject.cs @@ -0,0 +1,10 @@ +namespace VectorGfx.Models.Interfaces; + +public interface IPositionedObject : IHasPoint +{ + int Z { get; set; } + int ZRot { get; set; } + + int X { get; set; } + int Y { get; set; } +} \ No newline at end of file diff --git a/CSharpBible/Games/VectorGfx/Models/Interfaces/ITypedObject.cs b/CSharpBible/Games/VectorGfx/Models/Interfaces/ITypedObject.cs new file mode 100644 index 000000000..a0e3fc9e2 --- /dev/null +++ b/CSharpBible/Games/VectorGfx/Models/Interfaces/ITypedObject.cs @@ -0,0 +1,7 @@ +namespace VectorGfx.Models.Interfaces +{ + public interface ITypedObject + { + int IType { get; set; } + } +} \ No newline at end of file diff --git a/CSharpBible/Games/VectorGfx/Models/Interfaces/IVfxGameObject.cs b/CSharpBible/Games/VectorGfx/Models/Interfaces/IVfxGameObject.cs new file mode 100644 index 000000000..4b1b3763c --- /dev/null +++ b/CSharpBible/Games/VectorGfx/Models/Interfaces/IVfxGameObject.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using VectorGfx.Models.Interfaces; + +namespace VectorGfx.Models.Interfaces +{ + public interface IVfxGameObject: IGameObject + { + public PointF Position { get; set; } + public PointF Destination { get; set; } + public float Rotation { get; set; } + + public bool CollisionTest(IVfxGameObject other); + } +} \ No newline at end of file diff --git a/CSharpBible/Games/VectorGfx/VectorGfx.csproj b/CSharpBible/Games/VectorGfx/VectorGfx.csproj new file mode 100644 index 000000000..1bf8e9209 --- /dev/null +++ b/CSharpBible/Games/VectorGfx/VectorGfx.csproj @@ -0,0 +1,32 @@ + + + + WinExe + net6.0-windows;net7.0-windows;net8.0-windows + true + + + + + $(MSBuildProjectName.Replace(" ", "_").Replace("_net","") ) + $(MSBuildProjectName) + + + + + + + + + + + + + + + + + + + + diff --git a/CSharpBible/Games/VectorGfx/ViewModels/IVisualObject.cs b/CSharpBible/Games/VectorGfx/ViewModels/IVisualObject.cs new file mode 100644 index 000000000..8df6019b4 --- /dev/null +++ b/CSharpBible/Games/VectorGfx/ViewModels/IVisualObject.cs @@ -0,0 +1,7 @@ +using VectorGfx.Models.Interfaces; + +namespace VectorGfx.ViewModels; + +public interface IVisualObject : IGameObject, IPositionedObject +{ +} \ No newline at end of file diff --git a/CSharpBible/Games/VectorGfx/ViewModels/ItemBehavior.cs b/CSharpBible/Games/VectorGfx/ViewModels/ItemBehavior.cs new file mode 100644 index 000000000..8bc04ffe8 --- /dev/null +++ b/CSharpBible/Games/VectorGfx/ViewModels/ItemBehavior.cs @@ -0,0 +1,61 @@ +using Microsoft.Xaml.Behaviors; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using VectorGfx.Models.Interfaces; + +namespace VectorGfx.ViewModels; + +/// +/// Class ItemBehavior. +/// Implements the +/// +/// +public class ItemBehavior : Behavior +{ + private bool mouseDown; + 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 IHasPoint)?.P ?? 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 IHasPoint); + if (c != null) + c.P = elementPosition; + (AssociatedObject.DataContext as IHasPoint)?.MouseHover?.Execute(AssociatedObject.DataContext); + }; + + AssociatedObject.MouseLeftButtonUp += (s, e) => + { + mouseDown = false; + AssociatedObject.ReleaseMouseCapture(); + }; + + AssociatedObject.MouseEnter += (s, e) => + { + (AssociatedObject.DataContext as IHasPoint)?.MouseHover?.Execute(AssociatedObject.DataContext); + }; + } +} \ No newline at end of file diff --git a/CSharpBible/Games/VectorGfx/ViewModels/VfxDisplayViewModel.cs b/CSharpBible/Games/VectorGfx/ViewModels/VfxDisplayViewModel.cs new file mode 100644 index 000000000..30cec77ae --- /dev/null +++ b/CSharpBible/Games/VectorGfx/ViewModels/VfxDisplayViewModel.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using CommunityToolkit.Mvvm.ComponentModel; +using MVVM.ViewModel; +using System.Timers; +using System.Windows; +using CommunityToolkit.Mvvm.Input; + +namespace VectorGfx.ViewModels; + +public partial class VfxDisplayViewModel : BaseViewModelCT +{ + [ObservableProperty] + private List _visObjects; + + [ObservableProperty] + private string _dataText; + + private Timer timer; + + private double dTime; + public VfxDisplayViewModel() + { + VisObjects = new() + { + new VisualObject() {Idx=0, IType=0, P= new Point (50, 50), MouseHover=MouseHoverCommand }, + new VisualObject() {Idx=3, IType=1, P=new Point (90, 50), MouseHover=MouseHoverCommand }, + new VisualObject() {Idx=2, IType=2, P=new Point (130, 50), MouseHover=MouseHoverCommand }, + new VisualObject() {Idx = 1, IType=3, P=new Point (170, 50), MouseHover=MouseHoverCommand }, + }; + dTime = 0; + timer = new Timer(40); + timer.Elapsed += Update; + timer.Start(); + } + + private void Update(object? sender, ElapsedEventArgs e) + { + dTime += 0.04; + var _l = VisObjects.ToList(); + foreach (var vo in _l) + { + vo.ZRot = (int)((dTime + Math.Sin((dTime + vo.Idx) * 1.5)) * 50); + var _zz = vo.Z; + vo.Z = (int)(10 + Math.Sin((dTime * 3 + vo.Idx * 2) * 40 / 180 * Math.PI) * 9); + vo.X = (int)(vo.P.X - vo.Z / 2); + vo.Y = (int)(vo.P.Y - vo.Z / 2); + } + + _l.Sort((x, y) => x.Z == y.Z ? 0 : x.Z < y.Z ? -1 : 1); + + //VisObjects = _l; + OnPropertyChanged(nameof(VisObjects)); + + } + + [RelayCommand] + private void MouseHover(IVisualObject vo) + { + if (vo is IVisualObject obj) + DataText = $"{GetNameOfType(obj.IType)} at {obj.P}"; + } + + private static string GetNameOfType(int iType) + => iType switch { 0 => "Rectangle", 1 => "Circle", 2 => "Hexagon", 3 => "Torus", _ => "Shape" }; + +} diff --git a/CSharpBible/Games/VectorGfx/ViewModels/VisualObject.cs b/CSharpBible/Games/VectorGfx/ViewModels/VisualObject.cs new file mode 100644 index 000000000..0cce4a22e --- /dev/null +++ b/CSharpBible/Games/VectorGfx/ViewModels/VisualObject.cs @@ -0,0 +1,31 @@ +using CommunityToolkit.Mvvm.ComponentModel; +using CommunityToolkit.Mvvm.Input; +using MVVM.ViewModel; +using System.Windows; + +namespace VectorGfx.ViewModels; + +public partial class VisualObject : NotificationObjectCT, IVisualObject +{ + public VisualObject() + { + } + + public int Idx { get ; set ; } + + [ObservableProperty] + private int _iType; + + [ObservableProperty] + private Point _p; + [ObservableProperty] + private int _z; + [ObservableProperty] + private int _zRot; + [ObservableProperty] + private int _x; + [ObservableProperty] + private int _y; + + public IRelayCommand MouseHover { get; set; } +} \ No newline at end of file diff --git a/CSharpBible/Games/VectorGfx/Views/DataSelector/RessourceSelector.cs b/CSharpBible/Games/VectorGfx/Views/DataSelector/RessourceSelector.cs new file mode 100644 index 000000000..e92e25be8 --- /dev/null +++ b/CSharpBible/Games/VectorGfx/Views/DataSelector/RessourceSelector.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using VectorGfx.Models.Interfaces; + +namespace VectorGfx.Views.DataSelector; + +/// +/// Class KeyString. +/// +public class KeyString +{ + /// + /// Gets or sets the key. + /// + /// The key. + public string Key { get; set; } = ""; +} + +/// +/// Class RessourceSelector. +/// Implements the +/// +/// +public class RessourceSelector : DataTemplateSelector +{ + /// + /// Gets or sets the item keys. + /// + /// The item keys. + public List ItemKeys { get; set; } = new List(); + /// + /// When overridden in a derived class, returns a based on custom logic. + /// + /// The data object for which to select the template. + /// The data-bound object. + /// Returns a or . The default value is . + public override DataTemplate? SelectTemplate(object item, DependencyObject container) + { + if (container is FrameworkElement element && item is ITypedObject op && op.IType < ItemKeys.Count) + { + return element.FindResource(ItemKeys[op.IType].Key) as DataTemplate; + } + else return null; + } +} \ No newline at end of file diff --git a/CSharpBible/Games/VectorGfx/Views/VfxDisplay.xaml b/CSharpBible/Games/VectorGfx/Views/VfxDisplay.xaml new file mode 100644 index 000000000..86b140799 --- /dev/null +++ b/CSharpBible/Games/VectorGfx/Views/VfxDisplay.xaml @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CSharpBible/Games/VectorGfx/Views/VfxDisplay.xaml.cs b/CSharpBible/Games/VectorGfx/Views/VfxDisplay.xaml.cs new file mode 100644 index 000000000..ed9c2297a --- /dev/null +++ b/CSharpBible/Games/VectorGfx/Views/VfxDisplay.xaml.cs @@ -0,0 +1,28 @@ +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 VectorGfx.Views +{ + /// + /// Interaktionslogik für VfxDisplay.xaml + /// + public partial class VfxDisplay : Page + { + public VfxDisplay() + { + InitializeComponent(); + } + } +} diff --git a/CSharpBible/Games/VectorGfx2/App.xaml b/CSharpBible/Games/VectorGfx2/App.xaml new file mode 100644 index 000000000..15c38576a --- /dev/null +++ b/CSharpBible/Games/VectorGfx2/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/CSharpBible/Games/VectorGfx2/App.xaml.cs b/CSharpBible/Games/VectorGfx2/App.xaml.cs new file mode 100644 index 000000000..b6b7bd53e --- /dev/null +++ b/CSharpBible/Games/VectorGfx2/App.xaml.cs @@ -0,0 +1,14 @@ +using System.Configuration; +using System.Data; +using System.Windows; + +namespace VectorGfx2 +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } + +} diff --git a/CSharpBible/Games/VectorGfx2/AssemblyInfo.cs b/CSharpBible/Games/VectorGfx2/AssemblyInfo.cs new file mode 100644 index 000000000..a8dc727fe --- /dev/null +++ b/CSharpBible/Games/VectorGfx2/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/CSharpBible/Games/VectorGfx2/ClassDiagram1.cd b/CSharpBible/Games/VectorGfx2/ClassDiagram1.cd new file mode 100644 index 000000000..d6773823b --- /dev/null +++ b/CSharpBible/Games/VectorGfx2/ClassDiagram1.cd @@ -0,0 +1,25 @@ + + + + + + AAQgEAAAACAABwgAAAAAAAAAAAAAAAACIAAAAAgAAAQ= + Model\Interfaces\IGame.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + IGameObject.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + IVfxGameObject.cs + + + + diff --git a/CSharpBible/Games/VectorGfx2/MainWindow.xaml b/CSharpBible/Games/VectorGfx2/MainWindow.xaml new file mode 100644 index 000000000..ad60d03e0 --- /dev/null +++ b/CSharpBible/Games/VectorGfx2/MainWindow.xaml @@ -0,0 +1,12 @@ + + + + + diff --git a/CSharpBible/Games/VectorGfx2/MainWindow.xaml.cs b/CSharpBible/Games/VectorGfx2/MainWindow.xaml.cs new file mode 100644 index 000000000..a07f71a01 --- /dev/null +++ b/CSharpBible/Games/VectorGfx2/MainWindow.xaml.cs @@ -0,0 +1,24 @@ +using System.Text; +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 VectorGfx2 +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} diff --git a/CSharpBible/Games/VectorGfx2/Models/Character.cs b/CSharpBible/Games/VectorGfx2/Models/Character.cs new file mode 100644 index 000000000..f5cb1bc8f --- /dev/null +++ b/CSharpBible/Games/VectorGfx2/Models/Character.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using VectorGfx2.Models.Interfaces; + +namespace VectorGfx2.Models; + +public class Character : ICharacter +{ + +} diff --git a/CSharpBible/Games/VectorGfx2/Models/Interfaces/ICharacter.cs b/CSharpBible/Games/VectorGfx2/Models/Interfaces/ICharacter.cs new file mode 100644 index 000000000..c65ec4b23 --- /dev/null +++ b/CSharpBible/Games/VectorGfx2/Models/Interfaces/ICharacter.cs @@ -0,0 +1,6 @@ +namespace VectorGfx2.Models.Interfaces +{ + internal interface ICharacter + { + } +} diff --git a/CSharpBible/Games/VectorGfx2/Models/Interfaces/IGame.cs b/CSharpBible/Games/VectorGfx2/Models/Interfaces/IGame.cs new file mode 100644 index 000000000..f3b6c73ec --- /dev/null +++ b/CSharpBible/Games/VectorGfx2/Models/Interfaces/IGame.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace VectorGfx2.Models.Interfaces; + +public interface IGame +{ + int Score { get; set; } + int Lives { get; set; } + + public void Start(); + public void Stop(); + public void Pause(); + public void Resume(); + public void Reset(); + public void Update(); + public void Draw(); + public void LoadContent(); + public void UnloadContent(); + public void Initialize(); + public void Dispose(); +} diff --git a/CSharpBible/Games/VectorGfx2/Models/Interfaces/IGameObject.cs b/CSharpBible/Games/VectorGfx2/Models/Interfaces/IGameObject.cs new file mode 100644 index 000000000..00b3bd561 --- /dev/null +++ b/CSharpBible/Games/VectorGfx2/Models/Interfaces/IGameObject.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace VectorGfx2.Models.Interfaces; + +public interface IGameObject : ITypedObject +{ + int Idx { get; set; } +} diff --git a/CSharpBible/Games/VectorGfx2/Models/Interfaces/IHasPoint.cs b/CSharpBible/Games/VectorGfx2/Models/Interfaces/IHasPoint.cs new file mode 100644 index 000000000..d2368be16 --- /dev/null +++ b/CSharpBible/Games/VectorGfx2/Models/Interfaces/IHasPoint.cs @@ -0,0 +1,11 @@ +using CommunityToolkit.Mvvm.Input; +using System.Windows; + +namespace VectorGfx2.Models.Interfaces; + +public interface IHasPoint +{ + Point P { get; set; } + + IRelayCommand MouseHover { get; set; } +} diff --git a/CSharpBible/Games/VectorGfx2/Models/Interfaces/IPositionedObject2.cs b/CSharpBible/Games/VectorGfx2/Models/Interfaces/IPositionedObject2.cs new file mode 100644 index 000000000..c3d38f7eb --- /dev/null +++ b/CSharpBible/Games/VectorGfx2/Models/Interfaces/IPositionedObject2.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; +using System.Windows; + +namespace VectorGfx2.Models.Interfaces; + +public interface IPositionedObject2 : IHasPoint +{ + int ZRot { get; set; } + + int X { get; set; } + int Y { get; set; } + List Pnts { get; set; } +} diff --git a/CSharpBible/Games/VectorGfx2/Models/Interfaces/ITypedObject.cs b/CSharpBible/Games/VectorGfx2/Models/Interfaces/ITypedObject.cs new file mode 100644 index 000000000..9a6fbfd77 --- /dev/null +++ b/CSharpBible/Games/VectorGfx2/Models/Interfaces/ITypedObject.cs @@ -0,0 +1,7 @@ +namespace VectorGfx2.Models.Interfaces +{ + public interface ITypedObject + { + int IType { get; set; } + } +} diff --git a/CSharpBible/Games/VectorGfx2/Models/Interfaces/IVfxGameObject.cs b/CSharpBible/Games/VectorGfx2/Models/Interfaces/IVfxGameObject.cs new file mode 100644 index 000000000..bc470b88a --- /dev/null +++ b/CSharpBible/Games/VectorGfx2/Models/Interfaces/IVfxGameObject.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using VectorGfx2.Models.Interfaces; + +namespace VectorGfx2.Models.Interfaces +{ + public interface IVfxGameObject: IGameObject + { + public PointF Position { get; set; } + public PointF Destination { get; set; } + public float Rotation { get; set; } + + public bool CollisionTest(IVfxGameObject other); + } +} diff --git a/CSharpBible/Games/VectorGfx2/VectorGfx2.csproj b/CSharpBible/Games/VectorGfx2/VectorGfx2.csproj new file mode 100644 index 000000000..1bf8e9209 --- /dev/null +++ b/CSharpBible/Games/VectorGfx2/VectorGfx2.csproj @@ -0,0 +1,32 @@ + + + + WinExe + net6.0-windows;net7.0-windows;net8.0-windows + true + + + + + $(MSBuildProjectName.Replace(" ", "_").Replace("_net","") ) + $(MSBuildProjectName) + + + + + + + + + + + + + + + + + + + + diff --git a/CSharpBible/Games/VectorGfx2/ViewModels/IVisualObject2.cs b/CSharpBible/Games/VectorGfx2/ViewModels/IVisualObject2.cs new file mode 100644 index 000000000..197c635cd --- /dev/null +++ b/CSharpBible/Games/VectorGfx2/ViewModels/IVisualObject2.cs @@ -0,0 +1,7 @@ +using VectorGfx2.Models.Interfaces; + +namespace VectorGfx2.ViewModels; + +public interface IVisualObject2 : IGameObject, IPositionedObject2 +{ +} diff --git a/CSharpBible/Games/VectorGfx2/ViewModels/ItemBehavior.cs b/CSharpBible/Games/VectorGfx2/ViewModels/ItemBehavior.cs new file mode 100644 index 000000000..a09336845 --- /dev/null +++ b/CSharpBible/Games/VectorGfx2/ViewModels/ItemBehavior.cs @@ -0,0 +1,61 @@ +using Microsoft.Xaml.Behaviors; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using VectorGfx2.Models.Interfaces; + +namespace VectorGfx2.ViewModels; + +/// +/// Class ItemBehavior. +/// Implements the +/// +/// +public class ItemBehavior : Behavior +{ + private bool mouseDown; + 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 IHasPoint)?.P ?? 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 IHasPoint); + if (c != null) + c.P = elementPosition; + (AssociatedObject.DataContext as IHasPoint)?.MouseHover?.Execute(AssociatedObject.DataContext); + }; + + AssociatedObject.MouseLeftButtonUp += (s, e) => + { + mouseDown = false; + AssociatedObject.ReleaseMouseCapture(); + }; + + AssociatedObject.MouseEnter += (s, e) => + { + (AssociatedObject.DataContext as IHasPoint)?.MouseHover?.Execute(AssociatedObject.DataContext); + }; + } +} diff --git a/CSharpBible/Games/VectorGfx2/ViewModels/VfxDisplayViewModel.cs b/CSharpBible/Games/VectorGfx2/ViewModels/VfxDisplayViewModel.cs new file mode 100644 index 000000000..d704529ca --- /dev/null +++ b/CSharpBible/Games/VectorGfx2/ViewModels/VfxDisplayViewModel.cs @@ -0,0 +1,102 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System; +using System.Threading.Tasks; +using CommunityToolkit.Mvvm.ComponentModel; +using MVVM.ViewModel; +using System.Timers; +using System.Windows; +using CommunityToolkit.Mvvm.Input; +using System.Collections.ObjectModel; +using System.Windows.Media; + +namespace VectorGfx2.ViewModels; + +public partial class VfxDisplayViewModel : BaseViewModelCT +{ + [ObservableProperty] + private List _visObjects; + + [ObservableProperty] + private string _dataText; + + private Timer timer; + + private double dTime; + + [ObservableProperty] + PointCollection _pnts2 = new(); + public VfxDisplayViewModel() + { + VisObjects = new() + { + new VisualObject2() {Idx=0, IType=0, P= new Point (50, 50), MouseHover=MouseHoverCommand, + Pnts=[new(-10,-10), new(10, -10), new(10, 10), new(-10, 10)] }, + + new VisualObject2() {Idx=1, IType=1, P=new Point (60, 50), MouseHover=MouseHoverCommand, + Pnts=[new(-10,-10), new(10, -10), new(0, 10)]}, + new VisualObject2() {Idx=2, IType=2, P=new Point (80, 50), MouseHover=MouseHoverCommand, + Pnts=[new(-5,-10), new(5, -10), new(10, 0), new(5, 10), new(-5, 10), new(-10, 0)] }, + new VisualObject2() {Idx = 3, IType=3, P=new Point (150, 50), MouseHover=MouseHoverCommand, + Pnts=[new(-5,-10), new(5, -10), new(10, 0), new(0, 10), new(-10, 0)]}, + new VisualObject2() {Idx = 4, IType=4, P=new Point (250, 50), MouseHover=MouseHoverCommand, + Pnts=[new(-5,-10), new(5, -10), new(10, 0), new(0, 10), new(-10, 0)]}, + new VisualObject2() {Idx = 5, IType=5, P=new Point (300, 50), MouseHover=MouseHoverCommand, + Pnts=[new(-5,-10), new(5, -10), new(10, 0), new(0, 10), new(-10, 0)]}, + new VisualObject2() {Idx = 6, IType=6, P=new Point (340, 50), MouseHover=MouseHoverCommand, + Pnts=[new(-5,-10), new(5, -10), new(10, 0), new(0, 10), new(-10, 0)]}, + new VisualObject2() {Idx = 7, IType=7, P=new Point (380, 50), MouseHover=MouseHoverCommand, + Pnts=[new(-5,-10), new(5, -10), new(10, 0), new(0, 10), new(-10, 0)]}, + }; + dTime = 0; + timer = new Timer(40); + timer.Elapsed += Update; + timer.Start(); + var rnd = new Random(); + for (int i = 0; i < 12; i++) + { + var r = rnd.NextDouble(); + System.Diagnostics.Debug.WriteLine($""); + } + } + + private void Update(object? sender, ElapsedEventArgs e) + { + dTime += 0.04; + var _l = VisObjects.ToList(); + foreach (var vo in _l) + { + vo.ZRot = (int)((dTime + Math.Sin((dTime + vo.Idx) * 1.5)) * 50); + vo.X = (int)vo.P.X; + vo.Y = (int)vo.P.Y; + } + + Pnts2.Clear(); + + Pnts2.Add(new Point(10 + Math.Sin(dTime) * 10, 10 + Math.Cos(dTime) * 10)); + Pnts2.Add(new Point(10 + Math.Sin(dTime+1) * 10, 10 + Math.Cos(dTime+1) * 10)); + Pnts2.Add(new Point(10 + Math.Sin(dTime+2) * 10, 10 + Math.Cos(dTime+2) * 10)); + + + //VisObjects = _l; + OnPropertyChanged(nameof(VisObjects)); + OnPropertyChanged(nameof(Pnts2)); + + } + + [RelayCommand] + private void MouseHover(IVisualObject2 vo) + { + if (vo is IVisualObject2 obj) + DataText = $"{GetNameOfType(obj.IType)} at {obj.P}"; + } + + private static string GetNameOfType(int iType) + => iType switch { + 0 => "Dot", 1 => "Shot", 2 => "Ship", 3 => "Big Asteroid", + 4 => "Medium Asteroid", 5 => "Small Asteroid", 6 => "Tiny Asteroid", + _ => "Character" }; + +} diff --git a/CSharpBible/Games/VectorGfx2/ViewModels/VisualObject2.cs b/CSharpBible/Games/VectorGfx2/ViewModels/VisualObject2.cs new file mode 100644 index 000000000..92ae41aa5 --- /dev/null +++ b/CSharpBible/Games/VectorGfx2/ViewModels/VisualObject2.cs @@ -0,0 +1,33 @@ +using CommunityToolkit.Mvvm.ComponentModel; +using CommunityToolkit.Mvvm.Input; +using MVVM.ViewModel; +using System.Collections.Generic; +using System.Windows; +using VectorGfx2.Models.Interfaces; + +namespace VectorGfx2.ViewModels; + +public partial class VisualObject2 : NotificationObjectCT, IVisualObject2 +{ + public VisualObject2() + { + } + + public int Idx { get; set; } + + [ObservableProperty] + private int _iType; + + [ObservableProperty] + private Point _p; + [ObservableProperty] + private int _zRot; + [ObservableProperty] + private int _x; + [ObservableProperty] + private int _y; + [ObservableProperty] + private List _pnts; + + public IRelayCommand MouseHover { get; set; } +} diff --git a/CSharpBible/Games/VectorGfx2/Views/DataSelector/RessourceSelector.cs b/CSharpBible/Games/VectorGfx2/Views/DataSelector/RessourceSelector.cs new file mode 100644 index 000000000..f1ffc3d3a --- /dev/null +++ b/CSharpBible/Games/VectorGfx2/Views/DataSelector/RessourceSelector.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using VectorGfx2.Models.Interfaces; + +namespace VectorGfx2.Views.DataSelector; + +/// +/// Class KeyString. +/// +public class KeyString +{ + /// + /// Gets or sets the key. + /// + /// The key. + public string Key { get; set; } = ""; +} + +/// +/// Class RessourceSelector. +/// Implements the +/// +/// +public class RessourceSelector : DataTemplateSelector +{ + /// + /// Gets or sets the item keys. + /// + /// The item keys. + public List ItemKeys { get; set; } = new List(); + /// + /// When overridden in a derived class, returns a based on custom logic. + /// + /// The data object for which to select the template. + /// The data-bound object. + /// Returns a or . The default value is . + public override DataTemplate? SelectTemplate(object item, DependencyObject container) + { + if (container is FrameworkElement element && item is ITypedObject op && op.IType < ItemKeys.Count) + { + return element.FindResource(ItemKeys[op.IType].Key) as DataTemplate; + } + else return null; + } +} diff --git a/CSharpBible/Games/VectorGfx2/Views/Vfx2Display.xaml b/CSharpBible/Games/VectorGfx2/Views/Vfx2Display.xaml new file mode 100644 index 000000000..dc6402d8d --- /dev/null +++ b/CSharpBible/Games/VectorGfx2/Views/Vfx2Display.xaml @@ -0,0 +1,328 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CSharpBible/Games/VectorGfx2/Views/Vfx2Display.xaml.cs b/CSharpBible/Games/VectorGfx2/Views/Vfx2Display.xaml.cs new file mode 100644 index 000000000..b2dda1fee --- /dev/null +++ b/CSharpBible/Games/VectorGfx2/Views/Vfx2Display.xaml.cs @@ -0,0 +1,28 @@ +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 VectorGfx2.Views +{ + /// + /// Interaktionslogik für Vfx2Display.xaml + /// + public partial class Vfx2Display : Page + { + public Vfx2Display() + { + InitializeComponent(); + } + } +} diff --git a/CSharpBible/Games/Werner_Flaschbier/Model/Dirt.cs b/CSharpBible/Games/Werner_Flaschbier/Model/Dirt.cs index 45c4ce0c8..9eca95a0c 100644 --- a/CSharpBible/Games/Werner_Flaschbier/Model/Dirt.cs +++ b/CSharpBible/Games/Werner_Flaschbier/Model/Dirt.cs @@ -11,12 +11,6 @@ // // // *********************************************************************** -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - namespace Werner_Flaschbier_Base.Model { /// diff --git a/CSharpBible/Games/Werner_Flaschbier/Model/Field.cs b/CSharpBible/Games/Werner_Flaschbier/Model/Field.cs index a120c0fcd..3be4d7d1e 100644 --- a/CSharpBible/Games/Werner_Flaschbier/Model/Field.cs +++ b/CSharpBible/Games/Werner_Flaschbier/Model/Field.cs @@ -11,6 +11,7 @@ // // // *********************************************************************** +using System; using System.Drawing; namespace Werner_Flaschbier_Base.Model diff --git a/CSharpBible/Games/Werner_Flaschbier/Model/FieldDef.cs b/CSharpBible/Games/Werner_Flaschbier/Model/FieldDef.cs index 16441f72c..e98c079df 100644 --- a/CSharpBible/Games/Werner_Flaschbier/Model/FieldDef.cs +++ b/CSharpBible/Games/Werner_Flaschbier/Model/FieldDef.cs @@ -11,6 +11,8 @@ // // // *********************************************************************** +using System.Collections.Generic; + namespace Werner_Flaschbier_Base.Model { /// diff --git a/CSharpBible/Games/Werner_Flaschbier/Model/LevelDefs.cs b/CSharpBible/Games/Werner_Flaschbier/Model/LevelDefs.cs index d38fb85d7..10e7f6780 100644 --- a/CSharpBible/Games/Werner_Flaschbier/Model/LevelDefs.cs +++ b/CSharpBible/Games/Werner_Flaschbier/Model/LevelDefs.cs @@ -11,8 +11,6 @@ // // // *********************************************************************** -using System.Drawing; - namespace Werner_Flaschbier_Base.Model { /// diff --git a/CSharpBible/Games/Werner_Flaschbier/Model/Player.cs b/CSharpBible/Games/Werner_Flaschbier/Model/Player.cs index 49f2da826..44877304c 100644 --- a/CSharpBible/Games/Werner_Flaschbier/Model/Player.cs +++ b/CSharpBible/Games/Werner_Flaschbier/Model/Player.cs @@ -11,6 +11,9 @@ // // // *********************************************************************** +using System; +using System.Collections.Generic; + namespace Werner_Flaschbier_Base.Model { /// diff --git a/CSharpBible/Games/Werner_Flaschbier/Model/Playfield.cs b/CSharpBible/Games/Werner_Flaschbier/Model/Playfield.cs index 965e0b9e8..f5b6f1239 100644 --- a/CSharpBible/Games/Werner_Flaschbier/Model/Playfield.cs +++ b/CSharpBible/Games/Werner_Flaschbier/Model/Playfield.cs @@ -11,6 +11,8 @@ // // // *********************************************************************** +using System; +using System.Collections.Generic; using System.Drawing; namespace Werner_Flaschbier_Base.Model diff --git a/CSharpBible/Games/Werner_Flaschbier/Model/Space.cs b/CSharpBible/Games/Werner_Flaschbier/Model/Space.cs index 4e013493c..0af052c6b 100644 --- a/CSharpBible/Games/Werner_Flaschbier/Model/Space.cs +++ b/CSharpBible/Games/Werner_Flaschbier/Model/Space.cs @@ -11,6 +11,7 @@ // // // *********************************************************************** +using System; using System.Drawing; namespace Werner_Flaschbier_Base.Model @@ -22,23 +23,19 @@ namespace Werner_Flaschbier_Base.Model /// public class Space: Field { -#if NET6_0_OR_GREATER /// /// Initializes a new instance of the class. /// /// The position. /// The parent play object. public Space(Point position, Playfield? parentPlayObject) : base(position, parentPlayObject) -#else - public Floor(Point position, Playfield parentPlayObject) : base(position, parentPlayObject) -#endif { } /// /// Gets or sets the old item. /// /// The old item. - public PlayObject OldItem { get; set; } + public PlayObject? OldItem { get; set; } /// /// Gets the field definition. @@ -46,10 +43,10 @@ public Floor(Point position, Playfield parentPlayObject) : base(position, parent /// FieldDef. protected override FieldDef GetFieldDef() => Item switch { - Stone s => FieldDef.Stone, - Player p => FieldDef.Player, - Enemy e => FieldDef.Enemy, - Dirt d => FieldDef.Dirt, + Stone => FieldDef.Stone, + Player => FieldDef.Player, + Enemy => FieldDef.Enemy, + Dirt => FieldDef.Dirt, { } => throw new ArgumentException("Illegal Item"), null => FieldDef.Empty }; diff --git a/CSharpBible/Games/Werner_Flaschbier/Model/Wall.cs b/CSharpBible/Games/Werner_Flaschbier/Model/Wall.cs index 773c74554..97ccd1a0b 100644 --- a/CSharpBible/Games/Werner_Flaschbier/Model/Wall.cs +++ b/CSharpBible/Games/Werner_Flaschbier/Model/Wall.cs @@ -11,6 +11,7 @@ // // // *********************************************************************** +using System; using System.Drawing; namespace Werner_Flaschbier_Base.Model diff --git a/CSharpBible/Games/Werner_Flaschbier/Program.cs b/CSharpBible/Games/Werner_Flaschbier/Program.cs index 5cb27d8f4..b3cc762a1 100644 --- a/CSharpBible/Games/Werner_Flaschbier/Program.cs +++ b/CSharpBible/Games/Werner_Flaschbier/Program.cs @@ -12,6 +12,7 @@ // // *********************************************************************** +using System.Threading; using Werner_Flaschbier_Base.View; using Werner_Flaschbier_Base.ViewModel; diff --git a/CSharpBible/Games/Werner_Flaschbier/Ressource/Resource1.Designer.cs b/CSharpBible/Games/Werner_Flaschbier/Ressource/Resource1.Designer.cs index 931b10e2d..977f69a35 100644 --- a/CSharpBible/Games/Werner_Flaschbier/Ressource/Resource1.Designer.cs +++ b/CSharpBible/Games/Werner_Flaschbier/Ressource/Resource1.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace Werner_Flaschbier_Base.Ressource { +namespace Werner_Flaschbier_Base_win.Ressource { using System; @@ -39,7 +39,7 @@ internal Resource1() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Werner_Flaschbier_Base.Ressource.Resource1", typeof(Resource1).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Werner_Flaschbier_Base_win.Ressource.Resource1", typeof(Resource1).Assembly); resourceMan = temp; } return resourceMan; diff --git a/CSharpBible/Games/Werner_Flaschbier/View/VTileDef.cs b/CSharpBible/Games/Werner_Flaschbier/View/VTileDef.cs index 6d831301c..da4e529b6 100644 --- a/CSharpBible/Games/Werner_Flaschbier/View/VTileDef.cs +++ b/CSharpBible/Games/Werner_Flaschbier/View/VTileDef.cs @@ -12,17 +12,14 @@ // // *********************************************************************** using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Werner_Flaschbier_Base.ViewModel; -namespace Werner_Flaschbier_Base.View { - /// - /// Struct FullColor - /// - public struct FullColor +namespace Werner_Flaschbier_Base.View +{ + /// + /// Struct FullColor + /// + public struct FullColor { /// /// The fore ground diff --git a/CSharpBible/Games/Werner_Flaschbier/View/Visual.cs b/CSharpBible/Games/Werner_Flaschbier/View/Visual.cs index ba69c923b..228c2a8cb 100644 --- a/CSharpBible/Games/Werner_Flaschbier/View/Visual.cs +++ b/CSharpBible/Games/Werner_Flaschbier/View/Visual.cs @@ -15,16 +15,14 @@ using System; using System.Collections.Generic; using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Werner_Flaschbier_Base.ViewModel; -namespace Werner_Flaschbier_Base.View { - /// - /// Class Visual. - /// - public static class Visual { +namespace Werner_Flaschbier_Base.View +{ + /// + /// Class Visual. + /// + public static class Visual { #region Properties /// diff --git a/CSharpBible/Games/Werner_Flaschbier/ViewModel/Game.cs b/CSharpBible/Games/Werner_Flaschbier/ViewModel/Game.cs deleted file mode 100644 index 8aeeece74..000000000 --- a/CSharpBible/Games/Werner_Flaschbier/ViewModel/Game.cs +++ /dev/null @@ -1,273 +0,0 @@ -// *********************************************************************** -// Assembly : Werner_Flaschbier_Base -// Author : Mir -// Created : 08-02-2022 -// -// Last Modified By : Mir -// Last Modified On : 09-09-2022 -// *********************************************************************** -// -// Copyright (c) JC-Soft. All rights reserved. -// -// -// *********************************************************************** -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Werner_Flaschbier_Base.Model; - -namespace Werner_Flaschbier_Base.ViewModel -{ - /// - /// Class Game. - /// - public class Game - { - #region Properties - /// - /// Gets the size. - /// - /// The size. - public Size size => playfield.size; - - /// - /// Gets the lives. - /// - /// The lives. - public int Lives { get; private set; } - /// - /// Gets the time left. - /// - /// The time left. - public float TimeLeft { get; private set; } - /// - /// Gets a value indicating whether this instance is running. - /// - /// true if this instance is running; otherwise, false. - public bool isRunning { get => !_userQuit && (Lives > 0); } - - /// - /// Occurs when [vis update]. - /// - public event EventHandler? visUpdate; - /// - /// Occurs when [vis full redraw]. - /// - public event EventHandler? visFullRedraw; - /// - /// Occurs when [vis show help]. - /// - public event EventHandler? visShowHelp; - - /// - /// Gets the with the specified p. - /// - /// The p. - /// Tiles. - public Tiles this[Point p]=>GetTile(p); - /// - /// The level - /// - public int level=0; - /// - /// The maximum lives - /// - public const int MaxLives = 10; - /// - /// Gets or sets the score. - /// - /// The score. - public int Score { get; set; } = 0; - - #region private Properties - /// - /// The playfield - /// - private Playfield playfield = new(); - /// - /// The half step - /// - private bool halfStep=false; - /// - /// The act dir - /// - private Direction? actDir; - /// - /// The next dir - /// - private Direction? nextDir; - /// - /// The next dir2 - /// - private Direction? nextDir2; - /// - /// The user quit - /// - private bool _userQuit=false; - #endregion - #endregion - - #region Methods - /// - /// Gets the tile. - /// - /// The p. - /// Tiles. - public Tiles GetTile(Point p) - { - Tiles result = Tiles.Empty; - var field = playfield[p]; - switch (field?.fieldDef){ - case FieldDef.Enemy: - result = Tiles.Enemy_Up; - if (field?.Item is Enemy e) - result = (Tiles)((int)result+(int)(e.direction)); - break; - case FieldDef.Wall: - int w = 0; - result = Tiles.Wall; - for (var d= (Direction)0;(int)d<4;d++) - w += ((playfield[Offsets.DirOffset(d, p)] is Wall) ? 1<<(int)d : 0); - if (w > 0) - result = (Tiles)(w - 1 + (int)Tiles.Wall_U); - break; - case FieldDef.Player: - if ((field.Item is Player plr) && (plr.IsAlive)) - result = Tiles.Player; - else - result = Tiles.PlayerDead; - break; - case FieldDef.Stone: - if ((field.Item is Stone stn) && (stn.Position==stn.OldPosition)) - result = Tiles.Stone; - else - result = Tiles.StoneMoving; - break; - default: result = (Tiles?)field?.fieldDef ?? Tiles.Empty; - break; - } - return result; - } - - /// - /// Olds the position. - /// - /// The p. - /// Point. - public Point OldPos(Point p) - { - var field = playfield[p]; - if (field is Space s && s.Item != null) - return s.Item.OldPosition; - else - return p; - } - - /// - /// Initializes a new instance of the class. - /// - public Game() - { - Setup(); - Lives = MaxLives; - } - - /// - /// Setups the specified new level. - /// - /// The new level. - public void Setup(int? newLevel=null) - { - level = newLevel ?? level; - playfield.Setup(LevelDefs.GetLevel(level)); - TimeLeft = 99f; - visFullRedraw?.Invoke(this,new EventArgs()); - } - - /// - /// Handles the user action. - /// - /// The action. - public void HandleUserAction(UserAction action) - { - switch (action) - { - case UserAction.Quit: - _userQuit = true; - break; - case UserAction.Help: - visShowHelp?.Invoke(this, new EventArgs()); - break; - case UserAction.Restart: - Lives--; - if (Lives > 0) Setup(); - break; - case UserAction.Nop: - break; - case UserAction.NextLvl: - Setup(level + 1); - break; - case UserAction.PrevLvl: - Setup(Math.Max(level - 1,0)); - break; - default: - if ((int)action < typeof(Direction).GetEnumValues().Length) - { - if (actDir == null) actDir = (Direction)action; - else if (nextDir == null) nextDir = (Direction)action; - else if (nextDir2 == null) nextDir2 = (Direction)action; - else { actDir = nextDir;nextDir = nextDir2; nextDir2=(Direction)action; } - } - break; - } - if (!playfield.player?.IsAlive??false && Lives>0) - { - Lives--; - if (Lives>0) Setup(); - } - if (playfield.player?.field is Destination) - { - Score += (int)TimeLeft; - Setup(level + 1); - } - } - - /// - /// Games the step. - /// - /// System.Int32. - public int GameStep() - { - halfStep = !halfStep; - if (TimeLeft > 0.1) - TimeLeft -= 0.06f; - else if (playfield.player!=null) - playfield.player.IsAlive = false; - if (halfStep) - { - foreach (PlayObject po in playfield.ActiveObjects) - po.Handled = false; - foreach (Space sp in playfield.Spaces) - sp.OldItem = sp.Item; - playfield.player?.TryMove(actDir); - actDir = nextDir; - nextDir = nextDir2; - nextDir2 = null; - foreach (PlayObject po in playfield.ActiveObjects) - if (!po.Handled) - { - if (po is not Player) - po.TryMove(); - } - } - - visUpdate?.Invoke(this, halfStep); - - return 60; - } - #endregion - } -} diff --git a/CSharpBible/Games/Werner_Flaschbier/ViewModel/Tiles.cs b/CSharpBible/Games/Werner_Flaschbier/ViewModel/Tiles.cs deleted file mode 100644 index 8df6a8cca..000000000 --- a/CSharpBible/Games/Werner_Flaschbier/ViewModel/Tiles.cs +++ /dev/null @@ -1,137 +0,0 @@ -// *********************************************************************** -// Assembly : Werner_Flaschbier_Base -// Author : Mir -// Created : 08-02-2022 -// -// Last Modified By : Mir -// Last Modified On : 09-09-2022 -// *********************************************************************** -// -// Copyright (c) JC-Soft. All rights reserved. -// -// -// *********************************************************************** -using Werner_Flaschbier_Base.Model; - -namespace Werner_Flaschbier_Base.ViewModel -{ - /// - /// Enum Tiles - /// - public enum Tiles - { - /// - /// The empty - /// - Empty = FieldDef.Empty, - /// - /// The dirt - /// - Dirt = FieldDef.Dirt, - /// - /// The wall - /// - Wall = FieldDef.Wall, - /// - /// The destination - /// - Destination = FieldDef.Destination, - /// - /// The player - /// - Player = FieldDef.Player, - /// - /// The stone - /// - Stone = FieldDef.Stone, - /// - /// The enemy up - /// - Enemy_Up = FieldDef.Enemy, - /// - /// The enemy right - /// - Enemy_Right = 7, - /// - /// The enemy DWN - /// - Enemy_Dwn = 8, - /// - /// The enemy left - /// - Enemy_Left = 9, - /// - /// The stone moving - /// - StoneMoving = 10, - /// - /// The player dead - /// - PlayerDead = 11, - /// - /// The dummy - /// - Dummy = 12, - /// - /// The wall u - /// - Wall_U, - /// - /// The wall w - /// - Wall_W, - /// - /// The wall uw - /// - Wall_UW, - /// - /// The wall d - /// - Wall_D, - /// - /// The wall ud - /// - Wall_UD, - /// - /// The wall wd - /// - Wall_WD, - /// - /// The wall uwd - /// - Wall_UWD, - /// - /// The wall e - /// - Wall_E, - /// - /// The wall ue - /// - Wall_UE, - /// - /// The wall we - /// - Wall_WE, - /// - /// The wall uwe - /// - Wall_UWE, - /// - /// The wall de - /// - Wall_DE, - /// - /// The wall ude - /// - Wall_UDE, - /// - /// The wall wde - /// - Wall_WDE, - /// - /// The wall uwde - /// - Wall_UWDE - }; - -} diff --git a/CSharpBible/Games/Werner_Flaschbier/ViewModel/UserAction.cs b/CSharpBible/Games/Werner_Flaschbier/ViewModel/UserAction.cs deleted file mode 100644 index 539fcd7e5..000000000 --- a/CSharpBible/Games/Werner_Flaschbier/ViewModel/UserAction.cs +++ /dev/null @@ -1,84 +0,0 @@ -// *********************************************************************** -// Assembly : Werner_Flaschbier_Base -// Author : Mir -// Created : 08-06-2022 -// -// Last Modified By : Mir -// Last Modified On : 09-09-2022 -// *********************************************************************** -// -// Copyright (c) JC-Soft. All rights reserved. -// -// -// *********************************************************************** -using Werner_Flaschbier_Base.Model; - -namespace Werner_Flaschbier_Base.ViewModel -{ - - /// - /// Enum UserAction - /// - public enum UserAction - { - /// - /// The go up - /// - GoUp = Direction.Up, - /// - /// The go west - /// - GoWest = Direction.West, - /// - /// The go down - /// - GoDown = Direction.Down, - /// - /// The go east - /// - GoEast = Direction.East, - /// - /// The quit - /// - Quit, - /// - /// The help - /// - Help, - /// - /// The restart - /// - Restart, - /// - /// The nop - /// - Nop, - /// - /// The next level - /// - NextLvl, - /// - /// The previous level - /// - PrevLvl - } - - /// - /// Enum GameSound - /// - public enum GameSound - { - /// - /// The no sound - /// - NoSound, - /// - /// The deep boom - /// - DeepBoom, - /// - /// The tick - /// - Tick - } -} diff --git a/CSharpBible/Games/Werner_Flaschbier/ViewModels/Game.cs b/CSharpBible/Games/Werner_Flaschbier/ViewModels/Game.cs new file mode 100644 index 000000000..57ef956d8 --- /dev/null +++ b/CSharpBible/Games/Werner_Flaschbier/ViewModels/Game.cs @@ -0,0 +1,271 @@ +// *********************************************************************** +// Assembly : Werner_Flaschbier_Base +// Author : Mir +// Created : 08-02-2022 +// +// Last Modified By : Mir +// Last Modified On : 09-09-2022 +// *********************************************************************** +// +// Copyright (c) JC-Soft. All rights reserved. +// +// +// *********************************************************************** +using System; +using System.Drawing; +using Werner_Flaschbier_Base.Model; + +namespace Werner_Flaschbier_Base.ViewModel +{ + /// + /// Class Game. + /// + public class Game + { + #region Properties + /// + /// Gets the size. + /// + /// The size. + public Size size => playfield.size; + + /// + /// Gets the lives. + /// + /// The lives. + public int Lives { get; private set; } + /// + /// Gets the time left. + /// + /// The time left. + public float TimeLeft { get; private set; } + /// + /// Gets a value indicating whether this instance is running. + /// + /// true if this instance is running; otherwise, false. + public bool isRunning { get => !_userQuit && (Lives > 0); } + + /// + /// Occurs when [vis update]. + /// + public event EventHandler? visUpdate; + /// + /// Occurs when [vis full redraw]. + /// + public event EventHandler? visFullRedraw; + /// + /// Occurs when [vis show help]. + /// + public event EventHandler? visShowHelp; + + /// + /// Gets the with the specified p. + /// + /// The p. + /// Tiles. + public Tiles this[Point p]=>GetTile(p); + /// + /// The level + /// + public int level=0; + /// + /// The maximum lives + /// + public const int MaxLives = 10; + /// + /// Gets or sets the score. + /// + /// The score. + public int Score { get; set; } = 0; + + #region private Properties + /// + /// The playfield + /// + private readonly Playfield playfield = new(); + /// + /// The half step + /// + private bool halfStep=false; + /// + /// The act dir + /// + private Direction? actDir; + /// + /// The next dir + /// + private Direction? nextDir; + /// + /// The next dir2 + /// + private Direction? nextDir2; + /// + /// The user quit + /// + private bool _userQuit=false; + #endregion + #endregion + + #region Methods + /// + /// Gets the tile. + /// + /// The p. + /// Tiles. + public Tiles GetTile(Point p) + { + var field = playfield[p]; + Tiles result; + switch (field?.fieldDef) + { + case FieldDef.Enemy: + result = Tiles.Enemy_Up; + if (field?.Item is Enemy e) + result = (Tiles)((int)result + (int)(e.direction)); + break; + case FieldDef.Wall: + int w = 0; + result = Tiles.Wall; + for (var d = (Direction)0; (int)d < 4; d++) + w += ((playfield[Offsets.DirOffset(d, p)] is Wall) ? 1 << (int)d : 0); + if (w > 0) + result = (Tiles)(w - 1 + (int)Tiles.Wall_U); + break; + case FieldDef.Player: + if ((field.Item is Player plr) && (plr.IsAlive)) + result = Tiles.Player; + else + result = Tiles.PlayerDead; + break; + case FieldDef.Stone: + if ((field.Item is Stone stn) && (stn.Position == stn.OldPosition)) + result = Tiles.Stone; + else + result = Tiles.StoneMoving; + break; + default: + result = (Tiles?)field?.fieldDef ?? Tiles.Empty; + break; + } + return result; + } + + /// + /// Olds the position. + /// + /// The p. + /// Point. + public Point OldPos(Point p) + { + var field = playfield[p]; + if (field is Space s && s.Item != null) + return s.Item.OldPosition; + else + return p; + } + + /// + /// Initializes a new instance of the class. + /// + public Game() + { + Setup(); + Lives = MaxLives; + } + + /// + /// Setups the specified new level. + /// + /// The new level. + public void Setup(int? newLevel=null) + { + level = newLevel ?? level; + playfield.Setup(LevelDefs.GetLevel(level)); + TimeLeft = 99f; + visFullRedraw?.Invoke(this,new EventArgs()); + } + + /// + /// Handles the user action. + /// + /// The action. + public void HandleUserAction(UserAction action) + { + switch (action) + { + case UserAction.Quit: + _userQuit = true; + break; + case UserAction.Help: + visShowHelp?.Invoke(this, new EventArgs()); + break; + case UserAction.Restart: + Lives--; + if (Lives > 0) Setup(); + break; + case UserAction.Nop: + break; + case UserAction.NextLvl: + Setup(level + 1); + break; + case UserAction.PrevLvl: + Setup(Math.Max(level - 1,0)); + break; + default: + if ((int)action < typeof(Direction).GetEnumValues().Length) + { + if (actDir == null) actDir = (Direction)action; + else if (nextDir == null) nextDir = (Direction)action; + else if (nextDir2 == null) nextDir2 = (Direction)action; + else { actDir = nextDir;nextDir = nextDir2; nextDir2=(Direction)action; } + } + break; + } + if (!playfield.player?.IsAlive??false && Lives>0) + { + Lives--; + if (Lives>0) Setup(); + } + if (playfield.player?.field is Destination) + { + Score += (int)TimeLeft; + Setup(level + 1); + } + } + + /// + /// Games the step. + /// + /// System.Int32. + public int GameStep() + { + halfStep = !halfStep; + if (TimeLeft > 0.1) + TimeLeft -= 0.06f; + else if (playfield.player!=null) + playfield.player.IsAlive = false; + if (halfStep) + { + foreach (PlayObject po in playfield.ActiveObjects) + po.Handled = false; + foreach (Space sp in playfield.Spaces) + sp.OldItem = sp.Item; + playfield.player?.TryMove(actDir); + actDir = nextDir; + nextDir = nextDir2; + nextDir2 = null; + foreach (PlayObject po in playfield.ActiveObjects) + if (!po.Handled) + { + if (po is not Player) + po.TryMove(); + } + } + + visUpdate?.Invoke(this, halfStep); + + return 60; + } + #endregion + } +} diff --git a/CSharpBible/Games/Werner_Flaschbier/ViewModels/Tiles.cs b/CSharpBible/Games/Werner_Flaschbier/ViewModels/Tiles.cs new file mode 100644 index 000000000..a7b9633fa --- /dev/null +++ b/CSharpBible/Games/Werner_Flaschbier/ViewModels/Tiles.cs @@ -0,0 +1,137 @@ +// *********************************************************************** +// Assembly : Werner_Flaschbier_Base +// Author : Mir +// Created : 08-02-2022 +// +// Last Modified By : Mir +// Last Modified On : 09-09-2022 +// *********************************************************************** +// +// Copyright (c) JC-Soft. All rights reserved. +// +// +// *********************************************************************** +using Werner_Flaschbier_Base.Model; + +namespace Werner_Flaschbier_Base.ViewModel +{ + /// + /// Enum Tiles + /// + public enum Tiles + { + /// + /// The empty + /// + Empty = FieldDef.Empty, + /// + /// The dirt + /// + Dirt = FieldDef.Dirt, + /// + /// The wall + /// + Wall = FieldDef.Wall, + /// + /// The destination + /// + Destination = FieldDef.Destination, + /// + /// The player + /// + Player = FieldDef.Player, + /// + /// The stone + /// + Stone = FieldDef.Stone, + /// + /// The enemy up + /// + Enemy_Up = FieldDef.Enemy, + /// + /// The enemy right + /// + Enemy_Right = 7, + /// + /// The enemy DWN + /// + Enemy_Dwn = 8, + /// + /// The enemy left + /// + Enemy_Left = 9, + /// + /// The stone moving + /// + StoneMoving = 10, + /// + /// The player dead + /// + PlayerDead = 11, + /// + /// The dummy + /// + Dummy = 12, + /// + /// The wall u + /// + Wall_U, + /// + /// The wall w + /// + Wall_W, + /// + /// The wall uw + /// + Wall_UW, + /// + /// The wall d + /// + Wall_D, + /// + /// The wall ud + /// + Wall_UD, + /// + /// The wall wd + /// + Wall_WD, + /// + /// The wall uwd + /// + Wall_UWD, + /// + /// The wall e + /// + Wall_E, + /// + /// The wall ue + /// + Wall_UE, + /// + /// The wall we + /// + Wall_WE, + /// + /// The wall uwe + /// + Wall_UWE, + /// + /// The wall de + /// + Wall_DE, + /// + /// The wall ude + /// + Wall_UDE, + /// + /// The wall wde + /// + Wall_WDE, + /// + /// The wall uwde + /// + Wall_UWDE + }; + +} diff --git a/CSharpBible/Games/Werner_Flaschbier/ViewModels/UserAction.cs b/CSharpBible/Games/Werner_Flaschbier/ViewModels/UserAction.cs new file mode 100644 index 000000000..979fdeb21 --- /dev/null +++ b/CSharpBible/Games/Werner_Flaschbier/ViewModels/UserAction.cs @@ -0,0 +1,84 @@ +// *********************************************************************** +// Assembly : Werner_Flaschbier_Base +// Author : Mir +// Created : 08-06-2022 +// +// Last Modified By : Mir +// Last Modified On : 09-09-2022 +// *********************************************************************** +// +// Copyright (c) JC-Soft. All rights reserved. +// +// +// *********************************************************************** +using Werner_Flaschbier_Base.Model; + +namespace Werner_Flaschbier_Base.ViewModel +{ + + /// + /// Enum UserAction + /// + public enum UserAction + { + /// + /// The go up + /// + GoUp = Direction.Up, + /// + /// The go west + /// + GoWest = Direction.West, + /// + /// The go down + /// + GoDown = Direction.Down, + /// + /// The go east + /// + GoEast = Direction.East, + /// + /// The quit + /// + Quit, + /// + /// The help + /// + Help, + /// + /// The restart + /// + Restart, + /// + /// The nop + /// + Nop, + /// + /// The next level + /// + NextLvl, + /// + /// The previous level + /// + PrevLvl + } + + /// + /// Enum GameSound + /// + public enum GameSound + { + /// + /// The no sound + /// + NoSound, + /// + /// The deep boom + /// + DeepBoom, + /// + /// The tick + /// + Tick + } +} diff --git a/CSharpBible/Games/Werner_Flaschbier/Werner_Flaschbier_Base.csproj b/CSharpBible/Games/Werner_Flaschbier/Werner_Flaschbier_Base.csproj index 32373526e..442a41d13 100644 --- a/CSharpBible/Games/Werner_Flaschbier/Werner_Flaschbier_Base.csproj +++ b/CSharpBible/Games/Werner_Flaschbier/Werner_Flaschbier_Base.csproj @@ -1,33 +1,31 @@ - - net6.0 - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - ..\..\..\bin\$(MSBuildProjectName) - Exe - - - - - enable - enable - - - - + + + net462;net472;net48;net481;net6.0;net7.0;net8.0 + Library + + + + + + + + + + - - True - True - Resource1.resx - + + True + True + Resource1.resx + - - ResXFileCodeGenerator - Resource1.Designer.cs - - + + ResXFileCodeGenerator + Resource1.Designer.cs + + diff --git a/CSharpBible/Games/Werner_Flaschbier/Werner_Flaschbier_Base_win.csproj b/CSharpBible/Games/Werner_Flaschbier/Werner_Flaschbier_Base_win.csproj new file mode 100644 index 000000000..ac52f4aa1 --- /dev/null +++ b/CSharpBible/Games/Werner_Flaschbier/Werner_Flaschbier_Base_win.csproj @@ -0,0 +1,31 @@ + + + + net462-windows;net472-windows;net48-windows;net481-windows + Library + + + + + + + + + + + + + + True + True + Resource1.resx + + + + + + ResXFileCodeGenerator + Resource1.Designer.cs + + + diff --git a/CSharpBible/Games/Werner_Flaschbier/Werner_Flaschbier_Console.csproj b/CSharpBible/Games/Werner_Flaschbier/Werner_Flaschbier_Console.csproj new file mode 100644 index 000000000..fd22aa398 --- /dev/null +++ b/CSharpBible/Games/Werner_Flaschbier/Werner_Flaschbier_Console.csproj @@ -0,0 +1,29 @@ + + + + net462;net472;net48;net481;net6.0;net7.0;net8.0 + Exe + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CSharpBible/Games/Werner_Flaschbier_BaseTests/View/VisualTests.cs b/CSharpBible/Games/Werner_Flaschbier_BaseTests/View/VisualTests.cs index 289d764c0..5b2f5011b 100644 --- a/CSharpBible/Games/Werner_Flaschbier_BaseTests/View/VisualTests.cs +++ b/CSharpBible/Games/Werner_Flaschbier_BaseTests/View/VisualTests.cs @@ -1,10 +1,5 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -using Werner_Flaschbier_Base.View; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Threading; using TestConsole; using Werner_Flaschbier_Base.ViewModel; diff --git a/CSharpBible/Games/Werner_Flaschbier_BaseTests/Werner_Flaschbier_BaseTests.csproj b/CSharpBible/Games/Werner_Flaschbier_BaseTests/Werner_Flaschbier_BaseTests.csproj index 191f978d1..be1f2c1e7 100644 --- a/CSharpBible/Games/Werner_Flaschbier_BaseTests/Werner_Flaschbier_BaseTests.csproj +++ b/CSharpBible/Games/Werner_Flaschbier_BaseTests/Werner_Flaschbier_BaseTests.csproj @@ -1,8 +1,8 @@  - - + + net6.0-windows - enable + disable enable ..\..\..\obj.net\$(MSBuildProjectName)\ ..\..\..\obj.net\$(MSBuildProjectName)\ @@ -14,10 +14,10 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/CSharpBible/Graphics/All_Graphics/All_Graphics_net.csproj b/CSharpBible/Graphics/All_Graphics/All_Graphics_net.csproj new file mode 100644 index 000000000..deb6f110f --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/All_Graphics_net.csproj @@ -0,0 +1,58 @@ + + + + + WinExe + net8.0-windows + true + + + + + + + + + + + + + + + + + + + + + + + + + + Resources.resx + True + True + + + True + Settings.settings + True + + + + + + Resources.Designer.cs + PublicResXFileCodeGenerator + + + + + + Settings.Designer.cs + PublicSettingsSingleFileGenerator + + + + diff --git a/CSharpBible/Graphics/All_Graphics/App.xaml b/CSharpBible/Graphics/All_Graphics/App.xaml new file mode 100644 index 000000000..072cb8d00 --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/CSharpBible/Graphics/All_Graphics/App.xaml.cs b/CSharpBible/Graphics/All_Graphics/App.xaml.cs new file mode 100644 index 000000000..892e1b406 --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/App.xaml.cs @@ -0,0 +1,14 @@ +using System.Configuration; +using System.Data; +using System.Windows; + +namespace All_Graphics +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } + +} diff --git a/CSharpBible/Graphics/All_Graphics/AssemblyInfo.cs b/CSharpBible/Graphics/All_Graphics/AssemblyInfo.cs new file mode 100644 index 000000000..b0ec82757 --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/CSharpBible/Graphics/All_Graphics/MainWindow.xaml b/CSharpBible/Graphics/All_Graphics/MainWindow.xaml new file mode 100644 index 000000000..51c018f09 --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/MainWindow.xaml @@ -0,0 +1,16 @@ + + + + + + + + diff --git a/CSharpBible/Graphics/All_Graphics/MainWindow.xaml.cs b/CSharpBible/Graphics/All_Graphics/MainWindow.xaml.cs new file mode 100644 index 000000000..a6add4c01 --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/MainWindow.xaml.cs @@ -0,0 +1,24 @@ +using System.Text; +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 All_Graphics +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/CSharpBible/Graphics/All_Graphics/Models/.info b/CSharpBible/Graphics/All_Graphics/Models/.info new file mode 100644 index 000000000..62f215ed0 --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/Models/.info @@ -0,0 +1 @@ +Folder for Models diff --git a/CSharpBible/Graphics/All_Graphics/Models/AllExampleModel.cs b/CSharpBible/Graphics/All_Graphics/Models/AllExampleModel.cs new file mode 100644 index 000000000..427450e0f --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/Models/AllExampleModel.cs @@ -0,0 +1,122 @@ +// *********************************************************************** +// Assembly : All_Graphics +// Author : Mir +// Created : 05-19-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-19-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using CommunityToolkit.Mvvm.ComponentModel; +using All_Graphics.Properties; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Timers; + +/// +/// The Models namespace. +/// +/// +namespace All_Graphics.Models +{ + /// + /// Class AllExampleModel. + /// Implements the + /// Implements the + /// + /// + /// + /// + public partial class AllExampleModel : ObservableObject, ITemplateModel + { + #region Properties + /// + /// The timer + /// + /// + private readonly Timer _timer; + /// + /// Gets or sets the get now. + /// + /// The get now. + /// + public static Func GetNow { get; set; } = () => DateTime.Now; + /// + /// Gets the now. + /// + /// The now. + /// + public DateTime Now { get => GetNow(); } + + public List Examples { get; } = [ + ("CanvasWPF", typeof(CanvasWPF.Views.CanvasWPFView), null), + ("CanvasWPF2", typeof(CanvasWPF_CT.Views.CanvasWPFView), null), + ("CanvasWPF3", typeof(CanvasWPF2_ItemTemplateSelector.Views.CanvasWPFView), null), + ("CanvasWPF4", typeof(CanvasWPF2_CTItemTemplateSelector.Views.CanvasWPFView), null), + ("DynamicShape", typeof(DynamicShapeWPF.Views.DynamicShapeView), null), + ("DrawGrid_CT", typeof(MVVM_Converter_CTDrawGrid.Views.DrawGridView), null), + ("DrawGrid2_CT", typeof(MVVM_Converter_CTDrawGrid2.Views.DrawGridView), null), + ("ImgGrid_CT", typeof(MVVM_Converter_CTImgGrid.Views.PlotFrame), null), + ("DrawGrid", typeof(MVVM_Converter_DrawGrid.Views.DrawGridView), null), + ("DrawGrid2", typeof(MVVM_Converter_DrawGrid2.Views.DrawGridView), null), + ("ImgGrid", typeof(MVVM_Converter_ImgGrid.Views.ImgGridView), null), + ("ImgGrid2", typeof(MVVM_Converter_ImgGrid2.Views.ImgGridView), null), + ("ImageHandling", typeof(MVVM_ImageHandling.Views.TemplateView), null), + ("Lines_on_Grid", typeof(MVVM_Lines_on_Grid2.View.PlotFrame), null), + ("PolyLine", typeof(Polyline.Views.PolyLineView), null), + + + + ]; + #endregion + + #region Methods + /// + /// Initializes a new instance of the class. + /// + /// + public AllExampleModel() + { + _timer = new(250d); + _timer.Elapsed += (s, e) => OnPropertyChanged(nameof(Now)); + _timer.Start(); + + foreach (var ex in Examples) + try + { + Debug.WriteLine($"{ex.Description} {ex.ExType}"); + var desc = new Dictionary(); + Type? t = ex.ExType.Assembly.GetTypes().First((t) => t.Name.EndsWith(nameof(Resources))); + if (t != null) + { + foreach (var prop in t.GetProperties()) + if (prop.PropertyType == typeof(string)) + { + Debug.WriteLine($" {prop.Name} {prop.PropertyType} "); + desc[prop.Name] = (string)prop.GetValue(null); + } + ex.Additionals = desc; + } + } + catch { } + } + +#if !NET5_0_OR_GREATER + /// + /// Finalizes an instance of the class. + /// + ~AllExampleModel() + { + _timer.Stop(); + return; + } +#endif + #endregion + } +} diff --git a/CSharpBible/Graphics/All_Graphics/Models/ExItem.cs b/CSharpBible/Graphics/All_Graphics/Models/ExItem.cs new file mode 100644 index 000000000..849304bd5 --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/Models/ExItem.cs @@ -0,0 +1,38 @@ +// *********************************************************************** +// Assembly : All_Graphics +// Author : Mir +// Created : 05-19-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-19-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using System; + +/// +/// The Models namespace. +/// +/// +namespace All_Graphics.Models +{ + public class ExItem(string Description, Type ExType, object? Additionals) + { + public string Description { get; } = Description; + public Type ExType { get; } = ExType; + public object? Additionals { get; set; } = Additionals; + + public static implicit operator ExItem((string s, Type t, object? o) value) + { + return new ExItem(value.s, value.t, value.o); + } + + public override string ToString() + { + return Description; + } + } +} diff --git a/CSharpBible/Graphics/All_Graphics/Models/ITemplateModel.cs b/CSharpBible/Graphics/All_Graphics/Models/ITemplateModel.cs new file mode 100644 index 000000000..c56760383 --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/Models/ITemplateModel.cs @@ -0,0 +1,44 @@ +// *********************************************************************** +// Assembly : All_Graphics +// Author : Mir +// Created : 05-19-2023 +// +// Last Modified By : Mir +// Last Modified On : 05-19-2023 +// *********************************************************************** +// +// Copyright © JC-Soft 2023 +// +// +// *********************************************************************** +using System; +using System.Collections.Generic; +using System.ComponentModel; + +/// +/// The Models namespace. +/// +/// +namespace All_Graphics.Models +{ + /// + /// Interface ITemplateModel + /// + /// + public interface ITemplateModel + { + /// + /// Gets the now. + /// + /// The now. + /// + DateTime Now { get; } + List Examples { get; } + + /// + /// Occurs when [property changed]. + /// + /// + event PropertyChangedEventHandler PropertyChanged; + } +} diff --git a/CSharpBible/Graphics/All_Graphics/Properties/Resources.Designer.cs b/CSharpBible/Graphics/All_Graphics/Properties/Resources.Designer.cs new file mode 100644 index 000000000..feaf4430d --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/Properties/Resources.Designer.cs @@ -0,0 +1,72 @@ +//------------------------------------------------------------------------------ +// +// 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 All_Graphics.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()] + public 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)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("All_Graphics.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)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die All Examples ähnelt. + /// + public static string Title { + get { + return ResourceManager.GetString("Title", resourceCulture); + } + } + } +} diff --git a/CSharpBible/Graphics/All_Graphics/Properties/Resources.resx b/CSharpBible/Graphics/All_Graphics/Properties/Resources.resx new file mode 100644 index 000000000..c7b8018e8 --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/Properties/Resources.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + All Examples + + \ No newline at end of file diff --git a/CSharpBible/Graphics/All_Graphics/Properties/Settings.Designer.cs b/CSharpBible/Graphics/All_Graphics/Properties/Settings.Designer.cs new file mode 100644 index 000000000..ee7aa4992 --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/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 All_Graphics.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")] + public 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/All_Graphics/Properties/Settings.settings b/CSharpBible/Graphics/All_Graphics/Properties/Settings.settings new file mode 100644 index 000000000..049245f40 --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/Properties/Settings.settings @@ -0,0 +1,6 @@ + + + + + + diff --git a/CSharpBible/Graphics/All_Graphics/ValueConverters/.info b/CSharpBible/Graphics/All_Graphics/ValueConverters/.info new file mode 100644 index 000000000..b4bc464df --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/ValueConverters/.info @@ -0,0 +1 @@ +Folder for ValueConverters diff --git a/CSharpBible/Graphics/All_Graphics/ValueConverters/DateTimeValueConverter.cs b/CSharpBible/Graphics/All_Graphics/ValueConverters/DateTimeValueConverter.cs new file mode 100644 index 000000000..95866860e --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/ValueConverters/DateTimeValueConverter.cs @@ -0,0 +1,63 @@ +// *********************************************************************** +// Assembly : All_Graphics +// Author : Mir +// Created : 07-03-2022 +// +// Last Modified By : Mir +// Last Modified On : 07-04-2022 +// *********************************************************************** +// +// Copyright (c) JC-Soft. All rights reserved. +// +// +// *********************************************************************** +using System; +using System.Globalization; +using System.Windows.Data; + +namespace All_Graphics.ValueConverters +{ + /// + /// Class CurrencyValueConverter. + /// Implements the + /// + /// + public class DateTimeValueConverter : IValueConverter + { + /// + /// Converts a value. + /// + /// The value produced by the binding source. + /// The type of the binding target property. + /// The converter parameter to use. + /// The culture to use in the converter. + /// A converted value. If the method returns , the valid null value is used. + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value is DateTime dt) + if (parameter is string spar) + return dt.ToString(spar); + else + return dt.ToString(culture); + else + return value?.ToString() ?? ""; + + } + + /// + /// Converts a value. + /// + /// The value that is produced by the binding target. + /// The type to convert to. + /// The converter parameter to use. + /// The culture to use in the converter. + /// A converted value. If the method returns , the valid null value is used. + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value is string sval && DateTime.TryParse(sval.Trim(),culture, DateTimeStyles.AssumeLocal, out var dt)) + return dt; + else + return DateTime.MinValue; + } + } +} diff --git a/CSharpBible/Graphics/All_Graphics/ValueConverters/ListItemToContentConverter.cs b/CSharpBible/Graphics/All_Graphics/ValueConverters/ListItemToContentConverter.cs new file mode 100644 index 000000000..d88e063e4 --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/ValueConverters/ListItemToContentConverter.cs @@ -0,0 +1,120 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Windows.Controls; +using System.Windows.Data; +using All_Graphics.Models; + +namespace All_Graphics.ValueConverters; + +public class ListItemToContentConverter : IValueConverter +{ + + public object? Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value == null) + return null; + if (value is ExItem lbi) + { + object? v = null; + try + { + v = Activator.CreateInstance(lbi.ExType); + } + catch (Exception ex) + { + var sMsg = ex.Message; + if (ex.InnerException != null) + { + sMsg += "\r\n" + ex.InnerException.Message; + if (ex.InnerException.InnerException != null) + { + sMsg += "\r\n" + ex.InnerException.InnerException.Message; + sMsg += "\r\n" + ex.InnerException.InnerException.StackTrace; + } + else + sMsg += "\r\n" + ex.InnerException.StackTrace; + } + else + sMsg += "\r\n" + ex.StackTrace; + return new TextBox() { Text = sMsg, IsReadOnly = true, VerticalScrollBarVisibility = ScrollBarVisibility.Visible }; + } + if (v is Page fe) + { + if (lbi.Additionals is Dictionary d) + { + var tv = new TabControl(); + string Title = lbi.Description; + string Description = lbi.Description; + if (d.TryGetValue("Title", out string? t)) + Title = t; + if (d.TryGetValue("Description", out string? dsc)) + Description = dsc; + tv.ToolTip = Description; + try + { + tv.Items.Add(new TabItem() { Header = Title, Content = new Frame() { Content = fe } }); + } + catch (Exception ex) + { + tv.Items.Add(new TabItem() { Header = Title, Content = new TextBox() { Text = ex.Message, IsReadOnly = true, VerticalScrollBarVisibility = ScrollBarVisibility.Visible } }); + } + if (d.Keys.FirstOrDefault((o) => o.EndsWith("View")) is string xaml) + { + tv.Items.Add(new TabItem() + { + Header = "Xaml", + Content = new TextBox() { Text = d[xaml], IsReadOnly = true, VerticalScrollBarVisibility = ScrollBarVisibility.Visible } + }); + } + if (d.Keys.FirstOrDefault((o) => o.EndsWith("_xaml")) is string xamlcs) + { + tv.Items.Add(new TabItem() + { + Header = "Xaml.cs", + Content = new TextBox() { Text = d[xamlcs], IsReadOnly = true, VerticalScrollBarVisibility = ScrollBarVisibility.Visible } + }); + } + if (d.Keys.FirstOrDefault((o) => o.EndsWith("ViewModel")) is string vm) + { + tv.Items.Add(new TabItem() + { + Header = "ViewModel", + Content = new TextBox() { Text = d[vm], IsReadOnly = true, VerticalScrollBarVisibility = ScrollBarVisibility.Visible } + }); + } + if (d.Keys.FirstOrDefault((o) => o.EndsWith("Model") && !o.EndsWith("ViewModel")) is string mdl) + { + tv.Items.Add(new TabItem() + { + Header = "Model", + Content = new TextBox() { Text = d[mdl], IsReadOnly = true, VerticalScrollBarVisibility = ScrollBarVisibility.Visible } + }); + } + var vcc = 0; + foreach (string vc in d.Keys.Where((o) => o.EndsWith("Converter")) ) + { + tv.Items.Add(new TabItem() + { + Header = $"ValueConverter{++vcc}", + Content = new TextBox() { Text = d[vc], IsReadOnly = true, VerticalScrollBarVisibility = ScrollBarVisibility.Visible } + }); + } + + return tv; + } + else + return new Frame() { Content = fe }; + } + else + return v; + } + return null; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } +} diff --git a/CSharpBible/Graphics/All_Graphics/ValueConverters/ToListItemConverter.cs b/CSharpBible/Graphics/All_Graphics/ValueConverters/ToListItemConverter.cs new file mode 100644 index 000000000..1c97fa72a --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/ValueConverters/ToListItemConverter.cs @@ -0,0 +1,29 @@ +using All_Graphics.Models; +using System; +using System.Globalization; +using System.Windows.Controls; +using System.Windows.Data; + +namespace All_Graphics.ValueConverters; + +public class ToListItemConverter : IValueConverter +{ + public object? Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value == null) + return null; + if (value is ExItem lbi) + { + var v = new ListBoxItem() {Content=lbi.Description, Tag=lbi.ExType }; + return v; + } + return null; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + + +} diff --git a/CSharpBible/Graphics/All_Graphics/ViewModels/.info b/CSharpBible/Graphics/All_Graphics/ViewModels/.info new file mode 100644 index 000000000..a3ed848fb --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/ViewModels/.info @@ -0,0 +1 @@ +Folder for ViewModels diff --git a/CSharpBible/Graphics/All_Graphics/ViewModels/AllExamplesViewModel.cs b/CSharpBible/Graphics/All_Graphics/ViewModels/AllExamplesViewModel.cs new file mode 100644 index 000000000..0c6b0e692 --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/ViewModels/AllExamplesViewModel.cs @@ -0,0 +1,76 @@ +// *********************************************************************** +// Assembly : All_Graphics +// Author : Mir +// Created : 08-11-2022 +// +// Last Modified By : Mir +// Last Modified On : 08-24-2022 +// *********************************************************************** +// +// Copyright © JC-Soft 2022 +// +// +// *********************************************************************** +using CommunityToolkit.Mvvm.ComponentModel; +using MVVM.ViewModel; +using All_Graphics.Models; +using System; +using System.Collections.ObjectModel; +using System.ComponentModel; + +namespace All_Graphics.ViewModels +{ + /// + /// Class BindingGroupViewModel. + /// Implements the + /// + /// + public partial class AllExamplesViewModel : BaseViewModelCT + { + #region Properties + public static Func GetModel { get; set; } = () => new AllExampleModel(); + + private readonly ITemplateModel _model; + + public DateTime Now => _model.Now; + + [ObservableProperty] + private ObservableCollection _examples = new(); + + [ObservableProperty] + string _exFilter; + #endregion + + #region Methods + /// + /// Initializes a new instance of the class. + /// + public AllExamplesViewModel():this(GetModel()) + { + } + + public AllExamplesViewModel(ITemplateModel model) + { + _model = model; + _model.PropertyChanged += OnMPropertyChanged; + + OnExFilterChanged(ExFilter); + } + + private void OnMPropertyChanged(object sender, PropertyChangedEventArgs e) + { + OnPropertyChanged(e.PropertyName); + } + + partial void OnExFilterChanged(string value) + { + Examples.Clear(); + foreach (var ex in _model.Examples) + { + if (string.IsNullOrEmpty(value) || ex.Description.Contains(value)) + Examples.Add(ex); + } + } + #endregion + } +} diff --git a/CSharpBible/Graphics/All_Graphics/ViewModels/MainWindowViewModel.cs b/CSharpBible/Graphics/All_Graphics/ViewModels/MainWindowViewModel.cs new file mode 100644 index 000000000..ccea970ef --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/ViewModels/MainWindowViewModel.cs @@ -0,0 +1,47 @@ +// *********************************************************************** +// Assembly : All_Graphics +// Author : Mir +// Created : 08-11-2022 +// +// Last Modified By : Mir +// Last Modified On : 08-24-2022 +// *********************************************************************** +// +// Copyright © JC-Soft 2022 +// +// +// *********************************************************************** +using MVVM.ViewModel; + +namespace All_Graphics.ViewModels +{ + /// + /// Class BindingGroupViewModel. + /// Implements the + /// + /// + public class MainWindowViewModel : BaseViewModelCT + { + #region Properties + #endregion + #region Methods + /// + /// Initializes a new instance of the class. + /// + public MainWindowViewModel() + { + + } + +#if !NET5_0_OR_GREATER + /// + /// Finalizes an instance of the class. + /// + ~MainWindowViewModel() + { + return; + } +#endif + #endregion + } +} diff --git a/CSharpBible/Graphics/All_Graphics/Views/.info b/CSharpBible/Graphics/All_Graphics/Views/.info new file mode 100644 index 000000000..65a00d680 --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/Views/.info @@ -0,0 +1 @@ +Folder for Views diff --git a/CSharpBible/Graphics/All_Graphics/Views/AllExamplesView.xaml b/CSharpBible/Graphics/All_Graphics/Views/AllExamplesView.xaml new file mode 100644 index 000000000..ac9f09047 --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/Views/AllExamplesView.xaml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/CSharpBible/Graphics/All_Graphics/Views/AllExamplesView.xaml.cs b/CSharpBible/Graphics/All_Graphics/Views/AllExamplesView.xaml.cs new file mode 100644 index 000000000..4ec282e7b --- /dev/null +++ b/CSharpBible/Graphics/All_Graphics/Views/AllExamplesView.xaml.cs @@ -0,0 +1,15 @@ +using System.Windows.Controls; + +namespace All_Graphics.Views +{ + /// + /// Interaktionslogik für AllExamplesView.xaml + /// + public partial class AllExamplesView : Page + { + public AllExamplesView() + { + InitializeComponent(); + } + } +} diff --git a/CSharpBible/Graphics/CanvasWPF/App.xaml b/CSharpBible/Graphics/CanvasWPF/App.xaml index 018adf308..8bde9d1ed 100644 --- a/CSharpBible/Graphics/CanvasWPF/App.xaml +++ b/CSharpBible/Graphics/CanvasWPF/App.xaml @@ -1,8 +1,8 @@ + xmlns:local="clr-namespace:CanvasWPF.Views" + StartupUri="/Views/MainWindow.xaml"> diff --git a/CSharpBible/Graphics/CanvasWPF/App.xaml.cs b/CSharpBible/Graphics/CanvasWPF/App.xaml.cs index c2bdf0265..727ca02dc 100644 --- a/CSharpBible/Graphics/CanvasWPF/App.xaml.cs +++ b/CSharpBible/Graphics/CanvasWPF/App.xaml.cs @@ -11,12 +11,6 @@ // // // *********************************************************************** -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Threading.Tasks; using System.Windows; namespace CanvasWPF diff --git a/CSharpBible/Graphics/CanvasWPF/CanvasWPF.csproj b/CSharpBible/Graphics/CanvasWPF/CanvasWPF.csproj index b7c267061..e412a8960 100644 --- a/CSharpBible/Graphics/CanvasWPF/CanvasWPF.csproj +++ b/CSharpBible/Graphics/CanvasWPF/CanvasWPF.csproj @@ -1,26 +1,18 @@ - + WinExe - net6.0-windows - ..\..\..\bin\$(MSBuildProjectName)\ - ..\..\..\obj.net\$(MSBuildProjectName)\ - enable + net472-windows;net48-windows;net481-windows;net6.0-windows;net7.0-windows;net8.0-windows true - true - $(MSBuildProjectName) CanvasWPF - false + true false false - 1.0.* - JC-Soft - Joe Care - Copyright © JC-Soft 2022 + 1.0.1.2 CanvasWPF 1.0 False Stellt dynamisch Scheiben und Quadrate dar, die dann animiert werden können. @@ -38,18 +30,24 @@ - + - - + - + - + + True + True + Resources.resx + - + - + + PublicResXFileCodeGenerator + Resources.Designer.cs + diff --git a/CSharpBible/Graphics/CanvasWPF/Models/ObservablePoint.cs b/CSharpBible/Graphics/CanvasWPF/Models/ObservablePoint.cs new file mode 100644 index 000000000..a9687bf90 --- /dev/null +++ b/CSharpBible/Graphics/CanvasWPF/Models/ObservablePoint.cs @@ -0,0 +1,96 @@ +// *********************************************************************** +// Assembly : CanvasWPF +// Author : Mir +// Created : 06-22-2022 +// +// Last Modified By : Mir +// Last Modified On : 09-09-2022 +// *********************************************************************** +// +// Copyright © JC-Soft 2022 +// +// +// *********************************************************************** +using MVVM.ViewModel; +using System.Windows; + +namespace CanvasWPF.Models +{ + /// + /// Class ObservablePoint. + /// Implements the + /// + /// + public class ObservablePoint : BaseViewModel + { + /// + /// The x + /// + private double _x; + /// + /// The y + /// + private double _y; + + /// + /// Gets or sets the dx. + /// + /// The dx. + public double Dx { get; set; } + /// + /// Gets or sets the dy. + /// + /// The dy. + public double Dy { get; set; } + + /// + /// The maximum x + /// + static public double maxX = 640; + /// + /// The maximum y + /// + static public double maxY = 400; + /// + /// Initializes a new instance of the class. + /// + public ObservablePoint() { } + /// + /// Initializes a new instance of the class. + /// + /// The x. + /// The y. + public ObservablePoint(double x, double y) { (X, Y) = (x, y); } + /// + /// Initializes a new instance of the class. + /// + /// The p. + public ObservablePoint(Point p) { (X, Y) = (p.X, p.Y); } + /// + /// Gets or sets the x. + /// + /// The x. + public double X { get => _x; set { if (value == _x) return; _x = value; RaisePropertyChanged(); } } + /// + /// Gets or sets the y. + /// + /// The y. + public double Y { get => _y; set { if (value == _y) return; _y = value; RaisePropertyChanged(); } } + + /// + /// Gets the point. + /// + /// The point. + Point point => new Point(X, Y); + + /// + /// Steps this instance. + /// + public void Step() + { + if (X + Dx * 0.1 < 0 || X + Dx > maxX) { Dx = -Dx; RaisePropertyChanged(nameof(Dx)); } + if (Y + Dy * 0.1 < 0 || Y + Dy > maxY) { Dy = -Dy; RaisePropertyChanged(nameof(Dy)); } + (X, Y) = (X + Dx * 0.1, Y + Dy * 0.1); + } + } +} diff --git a/CSharpBible/Graphics/CanvasWPF/Properties/Resources.Designer.cs b/CSharpBible/Graphics/CanvasWPF/Properties/Resources.Designer.cs new file mode 100644 index 000000000..8be073471 --- /dev/null +++ b/CSharpBible/Graphics/CanvasWPF/Properties/Resources.Designer.cs @@ -0,0 +1,120 @@ +//------------------------------------------------------------------------------ +// +// 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 CanvasWPF.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()] + public 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)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CanvasWPF.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)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die <Page x:Class="CanvasWPF.Views.CanvasWPFView" + /// xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + /// xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + /// xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + /// xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + /// xmlns:local="clr-namespace:CanvasWPF.Views" + /// xmlns:mvvm="clr-namespace:CanvasWPF.ViewModel" + /// mc:Ignorable="d" + /// d:DesignHeight="450" d:DesignWidth="800" + /// [Rest der Zeichenfolge wurde abgeschnitten]"; ähnelt. + /// + public static string CanvasWPFView { + get { + return ResourceManager.GetString("CanvasWPFView", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Graphics #01: Demonstation for the canvas in WPF ähnelt. + /// + public static string Description { + get { + return ResourceManager.GetString("Description", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die // *********************************************************************** + ///// Assembly : CanvasWPF + ///// Author : Mir + ///// Created : 07-19-2022 + ///// + ///// Last Modified By : Mir + ///// Last Modified On : 09-09-2022 + ///// *********************************************************************** + ///// <copyright file="MainWindowViewmodel.cs" company="JC-Soft"> + ///// Copyright © JC-Soft 2022 + ///// </copyright> + ///// <summary></summary> + ///// ************************************************************ [Rest der Zeichenfolge wurde abgeschnitten]"; ähnelt. + /// + public static string MainWindowViewModel { + get { + return ResourceManager.GetString("MainWindowViewModel", resourceCulture); + } + } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Canvas WPF ähnelt. + /// + public static string Title { + get { + return ResourceManager.GetString("Title", resourceCulture); + } + } + } +} diff --git a/CSharpBible/Graphics/CanvasWPF/Properties/Resources.resx b/CSharpBible/Graphics/CanvasWPF/Properties/Resources.resx new file mode 100644 index 000000000..6c09ac859 --- /dev/null +++ b/CSharpBible/Graphics/CanvasWPF/Properties/Resources.resx @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + ..\Views\CanvasWPFView.xaml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 + + + Graphics #01: Demonstation for the canvas in WPF + + + ..\ViewModel\MainWindowViewmodel.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + + Canvas WPF + + \ No newline at end of file diff --git a/CSharpBible/Graphics/CanvasWPF/View/MainWindow.xaml b/CSharpBible/Graphics/CanvasWPF/View/MainWindow.xaml deleted file mode 100644 index 701ba3ce9..000000000 --- a/CSharpBible/Graphics/CanvasWPF/View/MainWindow.xaml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - -