From 2c0905933eee657273f08734e7dcfaa40f6b4dfc Mon Sep 17 00:00:00 2001 From: Nate Bross Date: Fri, 16 Feb 2024 18:13:17 -0600 Subject: [PATCH] chore: simplify project structure (#62) --- .github/workflows/ci.yml | 2 +- .github/workflows/release-artifacts.yml | 6 +- .vscode/launch.json | 4 +- SharpFM.App/App.axaml => App.axaml | 2 +- SharpFM.App/App.axaml.cs => App.axaml.cs | 4 +- .../noun-sharp-teeth-monster-4226695.png | Bin ...noun-sharp-teeth-monster-4226695.small.png | Bin ...AvaloniaNLogSink.cs => AvaloniaNLogSink.cs | 2 +- CONTRIBUTING.md | 2 +- {SharpFM.Core => Core}/FileMakerClip.cs | 3 +- Core/FileMakerClipExtensions.cs | 139 +++++++++++++++++ Core/FileMakerField.cs | 19 +++ ...avior.cs => DocumentTextBindingBehavior.cs | 2 +- .../MainWindow.axaml => MainWindow.axaml | 6 +- ...MainWindow.axaml.cs => MainWindow.axaml.cs | 2 +- {SharpFM.App/Models => Models}/Clip.cs | 2 +- .../Models => Models}/ClipDbContext.cs | 2 +- SharpFM.App/Program.cs => Program.cs | 2 +- README.md | 2 +- SharpFM.Core/FileMakerClipExtensions.cs | 140 ------------------ SharpFM.Core/FileMakerField.cs | 23 --- SharpFM.Core/SharpFM.Core.csproj | 14 -- .../SharpFM.App.csproj => SharpFM.csproj | 2 - SharpFM.sln | 4 +- .../ClipViewModel.cs | 3 +- .../MainWindowViewModel.cs | 5 +- SharpFM.App/app.manifest => app.manifest | 2 +- SharpFM.App/nlog.config => nlog.config | 0 28 files changed, 184 insertions(+), 210 deletions(-) rename SharpFM.App/App.axaml => App.axaml (92%) rename SharpFM.App/App.axaml.cs => App.axaml.cs (93%) rename {SharpFM.App/Assets => Assets}/noun-sharp-teeth-monster-4226695.png (100%) rename {SharpFM.App/Assets => Assets}/noun-sharp-teeth-monster-4226695.small.png (100%) rename SharpFM.App/AvaloniaNLogSink.cs => AvaloniaNLogSink.cs (98%) rename {SharpFM.Core => Core}/FileMakerClip.cs (99%) create mode 100644 Core/FileMakerClipExtensions.cs create mode 100644 Core/FileMakerField.cs rename SharpFM.App/DocumentTextBindingBehavior.cs => DocumentTextBindingBehavior.cs (97%) rename SharpFM.App/MainWindow.axaml => MainWindow.axaml (95%) rename SharpFM.App/MainWindow.axaml.cs => MainWindow.axaml.cs (97%) rename {SharpFM.App/Models => Models}/Clip.cs (95%) rename {SharpFM.App/Models => Models}/ClipDbContext.cs (96%) rename SharpFM.App/Program.cs => Program.cs (97%) delete mode 100644 SharpFM.Core/FileMakerClipExtensions.cs delete mode 100644 SharpFM.Core/FileMakerField.cs delete mode 100644 SharpFM.Core/SharpFM.Core.csproj rename SharpFM.App/SharpFM.App.csproj => SharpFM.csproj (97%) rename {SharpFM.App/ViewModels => ViewModels}/ClipViewModel.cs (96%) rename {SharpFM.App/ViewModels => ViewModels}/MainWindowViewModel.cs (98%) rename SharpFM.App/app.manifest => app.manifest (92%) rename SharpFM.App/nlog.config => nlog.config (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 160dcc5..d5b3ba4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,4 +37,4 @@ jobs: run: dotnet test --no-build - name: Publish - run: dotnet publish SharpFM.App/SharpFM.App.csproj --runtime "${{ matrix.target }}" -c Debug \ No newline at end of file + run: dotnet publish SharpFM.csproj --runtime "${{ matrix.target }}" -c Debug \ No newline at end of file diff --git a/.github/workflows/release-artifacts.yml b/.github/workflows/release-artifacts.yml index 8952908..c954732 100644 --- a/.github/workflows/release-artifacts.yml +++ b/.github/workflows/release-artifacts.yml @@ -32,10 +32,10 @@ jobs: shell: bash run: | tag=$(git describe --tags --abbrev=0) - release_name="SharpFM.App-$tag-${{ matrix.target }}" + release_name="SharpFM-$tag-${{ matrix.target }}" # Build everything - dotnet publish SharpFM.App/SharpFM.App.csproj --runtime "${{ matrix.target }}" -c Release -o "$release_name" + dotnet publish SharpFM.csproj --runtime "${{ matrix.target }}" -c Release -o "$release_name" # Pack files if [ "${{ matrix.target }}" == "win-x64" ]; then @@ -51,6 +51,6 @@ jobs: - name: Publish uses: softprops/action-gh-release@v1 with: - files: "SharpFM.App*" + files: "SharpFM*" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index d8c1932..2d699e6 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,9 +9,9 @@ "type": "coreclr", "request": "launch", "preLaunchTask": "build", - "program": "${workspaceFolder}/SharpFM.App/bin/Debug/net8.0/win-x64/SharpFM.App.dll", + "program": "${workspaceFolder}/bin/Debug/net8.0/win-x64/SharpFM.dll", "args": [], - "cwd": "${workspaceFolder}/SharpFM.App", + "cwd": "${workspaceFolder}", "console": "internalConsole", "stopAtEntry": false }, diff --git a/SharpFM.App/App.axaml b/App.axaml similarity index 92% rename from SharpFM.App/App.axaml rename to App.axaml index 0787534..f6f38a2 100644 --- a/SharpFM.App/App.axaml +++ b/App.axaml @@ -1,6 +1,6 @@ diff --git a/SharpFM.App/App.axaml.cs b/App.axaml.cs similarity index 93% rename from SharpFM.App/App.axaml.cs rename to App.axaml.cs index aa4cbc6..0957eca 100644 --- a/SharpFM.App/App.axaml.cs +++ b/App.axaml.cs @@ -1,11 +1,11 @@ using Avalonia; using Avalonia.Controls.ApplicationLifetimes; using Avalonia.Markup.Xaml; -using SharpFM.App.ViewModels; +using SharpFM.ViewModels; using Microsoft.Extensions.Logging; using NLog.Extensions.Logging; -namespace SharpFM.App; +namespace SharpFM; public partial class App : Application { diff --git a/SharpFM.App/Assets/noun-sharp-teeth-monster-4226695.png b/Assets/noun-sharp-teeth-monster-4226695.png similarity index 100% rename from SharpFM.App/Assets/noun-sharp-teeth-monster-4226695.png rename to Assets/noun-sharp-teeth-monster-4226695.png diff --git a/SharpFM.App/Assets/noun-sharp-teeth-monster-4226695.small.png b/Assets/noun-sharp-teeth-monster-4226695.small.png similarity index 100% rename from SharpFM.App/Assets/noun-sharp-teeth-monster-4226695.small.png rename to Assets/noun-sharp-teeth-monster-4226695.small.png diff --git a/SharpFM.App/AvaloniaNLogSink.cs b/AvaloniaNLogSink.cs similarity index 98% rename from SharpFM.App/AvaloniaNLogSink.cs rename to AvaloniaNLogSink.cs index d394148..973ecdb 100644 --- a/SharpFM.App/AvaloniaNLogSink.cs +++ b/AvaloniaNLogSink.cs @@ -3,7 +3,7 @@ using Avalonia.Logging; using NLog; -namespace SharpFM.App; +namespace SharpFM; /// /// Avalonia Log Sink that writes to NLog Loggers. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 90a557b..8115e82 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing -Contributions are welcome! As an open source project, any help we can get fixing bugs or adding features is always appreciated. In all cases, PRs will be reviewed with an eye toward future maintainability, so things like good comments, unit test coverage, and thorough design are importat considerations. If you decide to work on a bug or feature from our issue list, please be prepared to work through design or maintenance issues in the PR. +Contributions are welcome! As an open source project, any help we can get fixing bugs or adding features is always appreciated. In all cases, PRs will be reviewed with an eye toward future maintainability, so things like good comments and thorough design are important considerations. If you decide to work on a bug or feature from our issue list, please be prepared to work through design or maintenance issues in the PR. ## Features diff --git a/SharpFM.Core/FileMakerClip.cs b/Core/FileMakerClip.cs similarity index 99% rename from SharpFM.Core/FileMakerClip.cs rename to Core/FileMakerClip.cs index fe39877..9d44012 100644 --- a/SharpFM.Core/FileMakerClip.cs +++ b/Core/FileMakerClip.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Collections.ObjectModel; using System.IO; using System.Linq; using System.Text; @@ -8,7 +7,7 @@ using System.Xml; using System.Xml.Linq; -namespace SharpFM.Core; +namespace SharpFM; public class FileMakerClip { diff --git a/Core/FileMakerClipExtensions.cs b/Core/FileMakerClipExtensions.cs new file mode 100644 index 0000000..ad4918d --- /dev/null +++ b/Core/FileMakerClipExtensions.cs @@ -0,0 +1,139 @@ +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; + +namespace SharpFM; + +public static class FileMakerClipExtensions +{ + /// + /// Create a class from scratch. + /// + public static string CreateClass(this FileMakerClip _clip, FileMakerClip? fieldProjectionLayout = null) + { + if (_clip == null) { return string.Empty; } + + var fieldProjectionList = new List(); + if (fieldProjectionLayout != null && FileMakerClip.ClipTypes.Single(ct => ct.KeyId == fieldProjectionLayout.ClipboardFormat).DisplayName == "Layout") + { + // a clip that is of type layout, only has name attribute (since the rest isn't available) + // and we only need the name to skip it down below + fieldProjectionList.AddRange(fieldProjectionLayout.Fields.Select(f => f.Name)); + } + else + { + // otherwise include all fields + fieldProjectionList.AddRange(_clip.Fields.Select(f => f.Name)); + } + + return _clip.CreateClass(fieldProjectionList); + } + + /// + /// Create a class from scratch. + /// + public static string CreateClass(this FileMakerClip _clip, IEnumerable fieldProjectionList) + { + // Create a namespace: (namespace CodeGenerationSample) + var @namespace = SyntaxFactory.NamespaceDeclaration(SyntaxFactory.ParseName("SharpFM.CodeGen")).NormalizeWhitespace(); + + // Add System using statement: (using System) + @namespace = @namespace.AddUsings(SyntaxFactory.UsingDirective(SyntaxFactory.ParseName("System"))); + @namespace = @namespace.AddUsings(SyntaxFactory.UsingDirective(SyntaxFactory.ParseName("System.Runtime.Serialization"))); + + var dataContractAttribute = SyntaxFactory.Attribute(SyntaxFactory.ParseName("DataContract")); + + // Create a class: (class [_clip.Name]) + var classDeclaration = SyntaxFactory.ClassDeclaration(_clip.Name); + + // Add the public modifier: (public class [_clip.Name]) + classDeclaration = classDeclaration.AddModifiers(SyntaxFactory.Token(SyntaxKind.PublicKeyword)); + classDeclaration = classDeclaration.AddAttributeLists(SyntaxFactory.AttributeList(SyntaxFactory.SingletonSeparatedList(dataContractAttribute))); + + // add each field from the underling _clip as a public property with the data member attribute + List fieldsToBeAddedAsProperties = new List(_clip.Fields.Count()); + // include the field projection + foreach (var field in _clip.Fields.Where(fmF => fieldProjectionList.Contains(fmF.Name))) + { + // filemaker to C# data type mapping + var propertyTypeCSharp = string.Empty; + + switch (field.DataType) + { + case "Text": + propertyTypeCSharp = "string"; + break; + case "Number": + propertyTypeCSharp = "int"; + break; + case "Binary": + propertyTypeCSharp = "byte[]"; + break; + case "Date": + propertyTypeCSharp = "DateTime"; + break; + case "Time": + propertyTypeCSharp = "TimeSpan"; + break; + case "TimeStamp": + propertyTypeCSharp = "DateTime"; + break; + default: + propertyTypeCSharp = "string"; + break; + } + + if (field.NotEmpty == false && propertyTypeCSharp != "string") + { + propertyTypeCSharp += "?"; + } + + var propertyTypeSyntax = SyntaxFactory.ParseTypeName(propertyTypeCSharp); + + var dataMemberAttribute = SyntaxFactory.Attribute(SyntaxFactory.ParseName("DataMember")); + + var propertyDeclaration = SyntaxFactory.PropertyDeclaration(propertyTypeSyntax, field.Name) + .AddModifiers(SyntaxFactory.Token(SyntaxKind.PublicKeyword)) + .AddAccessorListAccessors( + SyntaxFactory.AccessorDeclaration(SyntaxKind.GetAccessorDeclaration).WithSemicolonToken(SyntaxFactory.Token(SyntaxKind.SemicolonToken)), + SyntaxFactory.AccessorDeclaration(SyntaxKind.SetAccessorDeclaration).WithSemicolonToken(SyntaxFactory.Token(SyntaxKind.SemicolonToken))) + .NormalizeWhitespace(indentation: "", eol: " ") + .AddAttributeLists(SyntaxFactory.AttributeList(SyntaxFactory.SingletonSeparatedList(dataMemberAttribute))) + .NormalizeWhitespace(); + + fieldsToBeAddedAsProperties.Add(propertyDeclaration); + } + + // Add the field, the property and method to the class. + classDeclaration = classDeclaration.AddMembers(fieldsToBeAddedAsProperties.ToArray()); + + // Add the class to the namespace. + @namespace = @namespace.AddMembers(classDeclaration); + + // Normalize and get code as string. + var code = @namespace.NormalizeWhitespace().ToFullString().FormatAutoPropertiesOnOneLine(); + + // Output new code to the console. + return code; + } + + + /// + /// https://stackoverflow.com/a/52339795/86860 + /// + private static readonly Regex AutoPropRegex = new Regex(@"\s*\{\s*get;\s*set;\s*}\s"); + + /// + /// https://stackoverflow.com/a/52339795/86860 + /// + /// Code string to format. + /// The code string with auto properties formatted to a single line + private static string FormatAutoPropertiesOnOneLine(this string str) + { + return AutoPropRegex.Replace(str, " { get; set; }"); + } +} diff --git a/Core/FileMakerField.cs b/Core/FileMakerField.cs new file mode 100644 index 0000000..1b79c7b --- /dev/null +++ b/Core/FileMakerField.cs @@ -0,0 +1,19 @@ + +namespace SharpFM; + +public class FileMakerField +{ + public int FileMakerFieldId { get; set; } + + public string Name { get; set; } = null!; + + public string DataType { get; set; } = null!; + + public string FieldType { get; set; } = null!; + + public string? Comment { get; set; } + + public bool NotEmpty { get; set; } + + public bool Unique { get; set; } +} diff --git a/SharpFM.App/DocumentTextBindingBehavior.cs b/DocumentTextBindingBehavior.cs similarity index 97% rename from SharpFM.App/DocumentTextBindingBehavior.cs rename to DocumentTextBindingBehavior.cs index 24a2315..5464491 100644 --- a/SharpFM.App/DocumentTextBindingBehavior.cs +++ b/DocumentTextBindingBehavior.cs @@ -4,7 +4,7 @@ using AvaloniaEdit; using AvaloniaEdit.Utils; -namespace SharpFM.App.Behaviors; +namespace SharpFM.Behaviors; public class DocumentTextBindingBehavior : Behavior { diff --git a/SharpFM.App/MainWindow.axaml b/MainWindow.axaml similarity index 95% rename from SharpFM.App/MainWindow.axaml rename to MainWindow.axaml index 5bf3d80..838df7f 100644 --- a/SharpFM.App/MainWindow.axaml +++ b/MainWindow.axaml @@ -1,13 +1,13 @@  /// Clip Data Model diff --git a/SharpFM.App/Models/ClipDbContext.cs b/Models/ClipDbContext.cs similarity index 96% rename from SharpFM.App/Models/ClipDbContext.cs rename to Models/ClipDbContext.cs index 592713e..f31ddc2 100644 --- a/SharpFM.App/Models/ClipDbContext.cs +++ b/Models/ClipDbContext.cs @@ -2,7 +2,7 @@ using System; -namespace SharpFM.App.Models; +namespace SharpFM.Models; /// /// Clip Db Context diff --git a/SharpFM.App/Program.cs b/Program.cs similarity index 97% rename from SharpFM.App/Program.cs rename to Program.cs index 6c63ec9..b94ed6b 100644 --- a/SharpFM.App/Program.cs +++ b/Program.cs @@ -2,7 +2,7 @@ using NLog; using System; -namespace SharpFM.App; +namespace SharpFM; class Program { diff --git a/README.md b/README.md index 6b39bd7..324a549 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,6 @@ SharpFM has the option to persist clips between sessions by using the File menu ## App Icon -![Sharp FM](SharpFM.App/Assets/noun-sharp-teeth-monster-4226695.small.png) +![Sharp FM](SharpFM/Assets/noun-sharp-teeth-monster-4226695.small.png) sharp teeth monster by Kanyanee Watanajitkasem from [Noun Project](https://thenounproject.com/browse/icons/term/sharp-teeth-monster/) (CC BY 3.0) diff --git a/SharpFM.Core/FileMakerClipExtensions.cs b/SharpFM.Core/FileMakerClipExtensions.cs deleted file mode 100644 index ceab080..0000000 --- a/SharpFM.Core/FileMakerClipExtensions.cs +++ /dev/null @@ -1,140 +0,0 @@ -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp; -using Microsoft.CodeAnalysis.CSharp.Syntax; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text.RegularExpressions; - -namespace SharpFM.Core -{ - public static class FileMakerClipExtensions - { - /// - /// Create a class from scratch. - /// - public static string CreateClass(this FileMakerClip _clip, FileMakerClip? fieldProjectionLayout = null) - { - if (_clip == null) { return string.Empty; } - - var fieldProjectionList = new List(); - if (fieldProjectionLayout != null && FileMakerClip.ClipTypes.Single(ct => ct.KeyId == fieldProjectionLayout.ClipboardFormat).DisplayName == "Layout") - { - // a clip that is of type layout, only has name attribute (since the rest isn't available) - // and we only need the name to skip it down below - fieldProjectionList.AddRange(fieldProjectionLayout.Fields.Select(f => f.Name)); - } - else - { - // otherwise include all fields - fieldProjectionList.AddRange(_clip.Fields.Select(f => f.Name)); - } - - return _clip.CreateClass(fieldProjectionList); - } - - /// - /// Create a class from scratch. - /// - public static string CreateClass(this FileMakerClip _clip, IEnumerable fieldProjectionList) - { - // Create a namespace: (namespace CodeGenerationSample) - var @namespace = SyntaxFactory.NamespaceDeclaration(SyntaxFactory.ParseName("SharpFM.CodeGen")).NormalizeWhitespace(); - - // Add System using statement: (using System) - @namespace = @namespace.AddUsings(SyntaxFactory.UsingDirective(SyntaxFactory.ParseName("System"))); - @namespace = @namespace.AddUsings(SyntaxFactory.UsingDirective(SyntaxFactory.ParseName("System.Runtime.Serialization"))); - - var dataContractAttribute = SyntaxFactory.Attribute(SyntaxFactory.ParseName("DataContract")); - - // Create a class: (class [_clip.Name]) - var classDeclaration = SyntaxFactory.ClassDeclaration(_clip.Name); - - // Add the public modifier: (public class [_clip.Name]) - classDeclaration = classDeclaration.AddModifiers(SyntaxFactory.Token(SyntaxKind.PublicKeyword)); - classDeclaration = classDeclaration.AddAttributeLists(SyntaxFactory.AttributeList(SyntaxFactory.SingletonSeparatedList(dataContractAttribute))); - - // add each field from the underling _clip as a public property with the data member attribute - List fieldsToBeAddedAsProperties = new List(_clip.Fields.Count()); - // include the field projection - foreach (var field in _clip.Fields.Where(fmF => fieldProjectionList.Contains(fmF.Name))) - { - // filemaker to C# data type mapping - var propertyTypeCSharp = string.Empty; - - switch (field.DataType) - { - case "Text": - propertyTypeCSharp = "string"; - break; - case "Number": - propertyTypeCSharp = "int"; - break; - case "Binary": - propertyTypeCSharp = "byte[]"; - break; - case "Date": - propertyTypeCSharp = "DateTime"; - break; - case "Time": - propertyTypeCSharp = "TimeSpan"; - break; - case "TimeStamp": - propertyTypeCSharp = "DateTime"; - break; - default: - propertyTypeCSharp = "string"; - break; - } - - if (field.NotEmpty == false && propertyTypeCSharp != "string") - { - propertyTypeCSharp += "?"; - } - - var propertyTypeSyntax = SyntaxFactory.ParseTypeName(propertyTypeCSharp); - - var dataMemberAttribute = SyntaxFactory.Attribute(SyntaxFactory.ParseName("DataMember")); - - var propertyDeclaration = SyntaxFactory.PropertyDeclaration(propertyTypeSyntax, field.Name) - .AddModifiers(SyntaxFactory.Token(SyntaxKind.PublicKeyword)) - .AddAccessorListAccessors( - SyntaxFactory.AccessorDeclaration(SyntaxKind.GetAccessorDeclaration).WithSemicolonToken(SyntaxFactory.Token(SyntaxKind.SemicolonToken)), - SyntaxFactory.AccessorDeclaration(SyntaxKind.SetAccessorDeclaration).WithSemicolonToken(SyntaxFactory.Token(SyntaxKind.SemicolonToken))) - .NormalizeWhitespace(indentation: "", eol: " ") - .AddAttributeLists(SyntaxFactory.AttributeList(SyntaxFactory.SingletonSeparatedList(dataMemberAttribute))) - .NormalizeWhitespace(); - - fieldsToBeAddedAsProperties.Add(propertyDeclaration); - } - - // Add the field, the property and method to the class. - classDeclaration = classDeclaration.AddMembers(fieldsToBeAddedAsProperties.ToArray()); - - // Add the class to the namespace. - @namespace = @namespace.AddMembers(classDeclaration); - - // Normalize and get code as string. - var code = @namespace.NormalizeWhitespace().ToFullString().FormatAutoPropertiesOnOneLine(); - - // Output new code to the console. - return code; - } - - - /// - /// https://stackoverflow.com/a/52339795/86860 - /// - private static readonly Regex AutoPropRegex = new Regex(@"\s*\{\s*get;\s*set;\s*}\s"); - - /// - /// https://stackoverflow.com/a/52339795/86860 - /// - /// Code string to format. - /// The code string with auto properties formatted to a single line - private static string FormatAutoPropertiesOnOneLine(this string str) - { - return AutoPropRegex.Replace(str, " { get; set; }"); - } - } -} diff --git a/SharpFM.Core/FileMakerField.cs b/SharpFM.Core/FileMakerField.cs deleted file mode 100644 index 4297c8e..0000000 --- a/SharpFM.Core/FileMakerField.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SharpFM.Core -{ - public class FileMakerField - { - public int FileMakerFieldId { get; set; } - - public string Name { get; set; } = null!; - - public string DataType { get; set; } = null!; - - public string FieldType { get; set; } = null!; - - public string? Comment { get; set; } - - public bool NotEmpty { get; set; } - - public bool Unique { get; set; } - } -} diff --git a/SharpFM.Core/SharpFM.Core.csproj b/SharpFM.Core/SharpFM.Core.csproj deleted file mode 100644 index b856bba..0000000 --- a/SharpFM.Core/SharpFM.Core.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - net8.0 - latest - enable - - - - - - - - diff --git a/SharpFM.App/SharpFM.App.csproj b/SharpFM.csproj similarity index 97% rename from SharpFM.App/SharpFM.App.csproj rename to SharpFM.csproj index dc39f6d..71ec593 100644 --- a/SharpFM.App/SharpFM.App.csproj +++ b/SharpFM.csproj @@ -48,7 +48,5 @@ - - diff --git a/SharpFM.sln b/SharpFM.sln index 8052de7..3f344ff 100644 --- a/SharpFM.sln +++ b/SharpFM.sln @@ -3,9 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpFM.App", "SharpFM.App\SharpFM.App.csproj", "{5245F468-DAD7-478C-8E5F-518A03664F71}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpFM.Core", "SharpFM.Core\SharpFM.Core.csproj", "{9E4B6169-0E69-430A-BF6C-184A10C71F9B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpFM", "SharpFM.csproj", "{5245F468-DAD7-478C-8E5F-518A03664F71}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/SharpFM.App/ViewModels/ClipViewModel.cs b/ViewModels/ClipViewModel.cs similarity index 96% rename from SharpFM.App/ViewModels/ClipViewModel.cs rename to ViewModels/ClipViewModel.cs index 7098d7d..9f0b301 100644 --- a/SharpFM.App/ViewModels/ClipViewModel.cs +++ b/ViewModels/ClipViewModel.cs @@ -1,8 +1,7 @@ using System.ComponentModel; using System.Runtime.CompilerServices; -using SharpFM.Core; -namespace SharpFM.App.ViewModels; +namespace SharpFM.ViewModels; public partial class ClipViewModel : INotifyPropertyChanged { diff --git a/SharpFM.App/ViewModels/MainWindowViewModel.cs b/ViewModels/MainWindowViewModel.cs similarity index 98% rename from SharpFM.App/ViewModels/MainWindowViewModel.cs rename to ViewModels/MainWindowViewModel.cs index f5e4dcd..74bc674 100644 --- a/SharpFM.App/ViewModels/MainWindowViewModel.cs +++ b/ViewModels/MainWindowViewModel.cs @@ -8,10 +8,9 @@ using Avalonia.Controls.ApplicationLifetimes; using FluentAvalonia.UI.Data; using Microsoft.Extensions.Logging; -using SharpFM.App.Models; -using SharpFM.Core; +using SharpFM.Models; -namespace SharpFM.App.ViewModels; +namespace SharpFM.ViewModels; public partial class MainWindowViewModel : INotifyPropertyChanged { diff --git a/SharpFM.App/app.manifest b/app.manifest similarity index 92% rename from SharpFM.App/app.manifest rename to app.manifest index 4395fbb..a73eab8 100644 --- a/SharpFM.App/app.manifest +++ b/app.manifest @@ -3,7 +3,7 @@ - + diff --git a/SharpFM.App/nlog.config b/nlog.config similarity index 100% rename from SharpFM.App/nlog.config rename to nlog.config