Expose members of lib to gui

This commit is contained in:
Cj 2024-06-13 18:15:52 -04:00
parent 0ce81b6039
commit b8fd1fa2da
14 changed files with 35 additions and 32 deletions

View File

@ -1,6 +1,6 @@
namespace AssemblyRemapper.Enums; namespace AssemblyRemapper.Enums;
internal enum EFailureReason public enum EFailureReason
{ {
None, None,
IsAbstract, IsAbstract,

View File

@ -3,7 +3,7 @@
/// <summary> /// <summary>
/// Remap config /// Remap config
/// </summary> /// </summary>
internal class Settings public class Settings
{ {
public AppSettings AppSettings { get; set; } public AppSettings AppSettings { get; set; }
public RemapperSettings RemapperSettings { get; set; } public RemapperSettings RemapperSettings { get; set; }
@ -11,14 +11,14 @@ internal class Settings
public AutoMapperSettings AutoMapperSettings { get; set; } public AutoMapperSettings AutoMapperSettings { get; set; }
} }
internal class AppSettings public class AppSettings
{ {
public bool Debug { get; set; } = false; public bool Debug { get; set; } = false;
public bool SilentMode { get; set; } = true; public bool SilentMode { get; set; } = true;
public bool MatchMode { get; set; } = false; public bool MatchMode { get; set; } = false;
} }
internal class RemapperSettings public class RemapperSettings
{ {
public int MaxMatchCount { get; set; } = 5; public int MaxMatchCount { get; set; } = 5;
@ -30,7 +30,7 @@ internal class RemapperSettings
public string MappingPath { get; set; } = string.Empty; public string MappingPath { get; set; } = string.Empty;
} }
internal class AutoMapperSettings public class AutoMapperSettings
{ {
public int RequiredMatches { get; set; } = 5; public int RequiredMatches { get; set; } = 5;
public bool MatchMode { get; set; } = true; public bool MatchMode { get; set; } = true;

View File

@ -6,7 +6,7 @@ namespace AssemblyRemapper.Models;
/// <summary> /// <summary>
/// Object to store linq statements in inside of json to search and remap classes /// Object to store linq statements in inside of json to search and remap classes
/// </summary> /// </summary>
internal class RemapModel public class RemapModel
{ {
[JsonIgnore] [JsonIgnore]
public bool Succeeded { get; set; } = false; public bool Succeeded { get; set; } = false;
@ -26,7 +26,7 @@ internal class RemapModel
/// <summary> /// <summary>
/// Search filters to find types and remap them /// Search filters to find types and remap them
/// </summary> /// </summary>
internal class SearchParams public class SearchParams
{ {
#region BOOL_PARAMS #region BOOL_PARAMS

View File

@ -3,7 +3,7 @@ using Mono.Cecil;
namespace AssemblyRemapper.Models; namespace AssemblyRemapper.Models;
internal class ScoringModel public class ScoringModel
{ {
public string ProposedNewName { get; set; } public string ProposedNewName { get; set; }
public int Score { get; set; } = 0; public int Score { get; set; } = 0;

View File

@ -1,13 +0,0 @@
using AssemblyRemapper.Commands;
namespace AssemblyRemapper;
public static class Program
{
public static void Main(string[] args)
{
var cmd = new CommandProcessor();
cmd.CommandLoop();
}
}

View File

@ -2,7 +2,7 @@
namespace AssemblyRemapper.Remapper; namespace AssemblyRemapper.Remapper;
internal static class Publicizer public static class Publicizer
{ {
public static void Publicize() public static void Publicize()
{ {

View File

@ -7,7 +7,7 @@ using System.Diagnostics;
namespace AssemblyRemapper.Remapper; namespace AssemblyRemapper.Remapper;
internal class Remapper public class Remapper
{ {
private static Stopwatch Stopwatch = new(); private static Stopwatch Stopwatch = new();

View File

@ -5,7 +5,7 @@ using Mono.Collections.Generic;
namespace AssemblyRemapper.Remapper; namespace AssemblyRemapper.Remapper;
internal static class Renamer public static class Renamer
{ {
public static void RenameAll(ScoringModel score) public static void RenameAll(ScoringModel score)
{ {

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Library</OutputType>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
@ -12,9 +12,4 @@
<PackageReference Include="morelinq" Version="4.2.0" /> <PackageReference Include="morelinq" Version="4.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup> </ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="xcopy &quot;$(SolutionDir)Templates&quot; &quot;$(TargetDir)Data&quot; /E /I /Y" />
</Target>
</Project> </Project>

View File

@ -4,7 +4,7 @@ using Newtonsoft.Json;
namespace AssemblyRemapper.Utils; namespace AssemblyRemapper.Utils;
internal static class DataProvider public static class DataProvider
{ {
static DataProvider() static DataProvider()
{ {

View File

@ -1,6 +1,6 @@
namespace AssemblyRemapper.Utils; namespace AssemblyRemapper.Utils;
internal static class Logger public static class Logger
{ {
static Logger() static Logger()
{ {

View File

@ -28,18 +28,32 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
toolStrip1 = new ToolStrip();
SuspendLayout(); SuspendLayout();
// //
// toolStrip1
//
toolStrip1.ImageScalingSize = new Size(24, 24);
toolStrip1.Location = new Point(0, 0);
toolStrip1.Name = "toolStrip1";
toolStrip1.Size = new Size(1584, 25);
toolStrip1.TabIndex = 0;
toolStrip1.Text = "toolStrip1";
//
// Form1 // Form1
// //
AutoScaleDimensions = new SizeF(10F, 25F); AutoScaleDimensions = new SizeF(10F, 25F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(1584, 1027); ClientSize = new Size(1584, 1027);
Controls.Add(toolStrip1);
Name = "Form1"; Name = "Form1";
Text = "Cj's Assembly Tool V0.1.0"; Text = "Cj's Assembly Tool V0.1.0";
ResumeLayout(false); ResumeLayout(false);
PerformLayout();
} }
#endregion #endregion
private ToolStrip toolStrip1;
} }
} }

View File

@ -117,4 +117,7 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root> </root>

View File

@ -12,4 +12,8 @@
<ProjectReference Include="..\AssemblyRemapper\RemapperLib.csproj" /> <ProjectReference Include="..\AssemblyRemapper\RemapperLib.csproj" />
</ItemGroup> </ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="xcopy &quot;$(SolutionDir)Templates&quot; &quot;$(TargetDir)Data&quot; /E /I /Y" />
</Target>
</Project> </Project>