Some initial automapper work

This commit is contained in:
Cj 2024-06-15 16:21:12 -04:00
parent 2d49d5c9a8
commit 5a3df6593b
17 changed files with 575 additions and 191 deletions

95
.gitignore vendored
View File

@ -29,7 +29,6 @@ x86/
bld/ bld/
[Bb]in/ [Bb]in/
[Oo]bj/ [Oo]bj/
[Oo]ut/
[Ll]og/ [Ll]og/
[Ll]ogs/ [Ll]ogs/
@ -63,6 +62,9 @@ project.lock.json
project.fragment.lock.json project.fragment.lock.json
artifacts/ artifacts/
# Tye
.tye/
# ASP.NET Scaffolding # ASP.NET Scaffolding
ScaffoldingReadMe.txt ScaffoldingReadMe.txt
@ -360,4 +362,93 @@ MigrationBackup/
.ionide/ .ionide/
# Fody - auto-generated XML schema # Fody - auto-generated XML schema
FodyWeavers.xsd FodyWeavers.xsd
##
## Visual studio for Mac
##
# globs
Makefile.in
*.userprefs
*.usertasks
config.make
config.status
aclocal.m4
install-sh
autom4te.cache/
*.tar.gz
tarballs/
test-results/
# Mac bundle stuff
*.dmg
*.app
# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
# JetBrains Rider
.idea/
*.sln.iml
##
## Visual Studio Code
##
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

6
Directory.Build.props Normal file
View File

@ -0,0 +1,6 @@
<Project>
<PropertyGroup>
<Nullable>enable</Nullable>
<AvaloniaVersion>11.0.2</AvaloniaVersion>
</PropertyGroup>
</Project>

View File

@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.9.34728.123 VisualStudioVersion = 17.9.34728.123
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReCodeItConsole", "RecodeItConsole\ReCodeItConsole.csproj", "{2DFEF08F-6136-44F6-BF0D-93A2E9F9270C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReCodeItGUI", "RecodeItGUI\ReCodeItGUI.csproj", "{7C4A62CE-8072-454F-9D95-6CB4D837F485}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReCodeItGUI", "RecodeItGUI\ReCodeItGUI.csproj", "{7C4A62CE-8072-454F-9D95-6CB4D837F485}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReCodeItLib", "RecodeItLib\ReCodeItLib.csproj", "{FDA58DB6-E114-4FE0-AAF1-C3DEE44AEF99}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReCodeItLib", "RecodeItLib\ReCodeItLib.csproj", "{FDA58DB6-E114-4FE0-AAF1-C3DEE44AEF99}"
@ -15,10 +13,6 @@ Global
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2DFEF08F-6136-44F6-BF0D-93A2E9F9270C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2DFEF08F-6136-44F6-BF0D-93A2E9F9270C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2DFEF08F-6136-44F6-BF0D-93A2E9F9270C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2DFEF08F-6136-44F6-BF0D-93A2E9F9270C}.Release|Any CPU.Build.0 = Release|Any CPU
{7C4A62CE-8072-454F-9D95-6CB4D837F485}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7C4A62CE-8072-454F-9D95-6CB4D837F485}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7C4A62CE-8072-454F-9D95-6CB4D837F485}.Debug|Any CPU.Build.0 = Debug|Any CPU {7C4A62CE-8072-454F-9D95-6CB4D837F485}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C4A62CE-8072-454F-9D95-6CB4D837F485}.Release|Any CPU.ActiveCfg = Release|Any CPU {7C4A62CE-8072-454F-9D95-6CB4D837F485}.Release|Any CPU.ActiveCfg = Release|Any CPU

View File

@ -1,53 +0,0 @@
using ReCodeIt.Utils;
namespace ReCodeIt.Commands
{
internal class CommandProcessor
{
public CommandProcessor()
{ }
public void CommandLoop()
{
ShowStartText();
while (true)
{
var input = Console.ReadLine();
ProcessCommand(input);
}
}
private void ProcessCommand(string command)
{
if (command == "remap" || command == "Remap")
{
var remapper = new ReMapper.ReCodeItRemapper();
Logger.ClearLog();
Console.Clear();
ShowStartText();
DataProvider.LoadMappingFile();
DataProvider.LoadAssemblyDefinition();
remapper.InitializeRemap();
}
if (command == "clear")
{
Console.Clear();
ShowStartText();
}
}
private void ShowStartText()
{
Logger.Log($"-----------------------------------------------------------------", ConsoleColor.Green);
Logger.Log($"Cj's Assembly Tool", ConsoleColor.Green);
Logger.Log($"Version 0.1.0", ConsoleColor.Green);
Logger.Log($"Available Commands: `remap` `clear`", ConsoleColor.Green);
Logger.Log($"-----------------------------------------------------------------", ConsoleColor.Green);
}
}
}

View File

@ -1,2 +0,0 @@
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");

View File

@ -1,14 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\RecodeItLib\ReCodeItLib.csproj" />
</ItemGroup>
</Project>

View File

@ -28,8 +28,6 @@ partial class ReCodeItForm
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
components = new System.ComponentModel.Container();
bindingSource1 = new BindingSource(components);
TabPageRemapper = new TabPage(); TabPageRemapper = new TabPage();
RemapTreeView = new TreeView(); RemapTreeView = new TreeView();
groupBox1 = new GroupBox(); groupBox1 = new GroupBox();
@ -102,13 +100,19 @@ partial class ReCodeItForm
MethodCountEnabled = new CheckBox(); MethodCountEnabled = new CheckBox();
IsSealedUpDown = new DomainUpDown(); IsSealedUpDown = new DomainUpDown();
TabControlMain = new TabControl(); TabControlMain = new TabControl();
tabPage5 = new TabPage(); AutoMapperTab = new TabPage();
label2 = new Label();
AutoMapperRequiredMatchesUpDown = new NumericUpDown();
treeView1 = new TreeView();
AutoMapperExcludeTextField = new TextBox();
AutoMapperExcludeRemoveButton = new Button();
AutoMapperExcludeAddButton = new Button();
AutoMapperExcludeBox = new ListBox();
SettingsTab = new TabPage();
groupBox3 = new GroupBox(); groupBox3 = new GroupBox();
label1 = new Label(); label1 = new Label();
MaxMatchCountUpDown = new NumericUpDown(); MaxMatchCountUpDown = new NumericUpDown();
groupBox4 = new GroupBox(); groupBox4 = new GroupBox();
label2 = new Label();
AutoMapperRequiredMatchesUpDown = new NumericUpDown();
groupBox2 = new GroupBox(); groupBox2 = new GroupBox();
MappingChooseButton = new Button(); MappingChooseButton = new Button();
UnsealCheckbox = new CheckBox(); UnsealCheckbox = new CheckBox();
@ -122,10 +126,7 @@ partial class ReCodeItForm
AssemblyPathTextBox = new TextBox(); AssemblyPathTextBox = new TextBox();
SilentModeCheckbox = new CheckBox(); SilentModeCheckbox = new CheckBox();
DebugLoggingCheckbox = new CheckBox(); DebugLoggingCheckbox = new CheckBox();
colorDialog1 = new ColorDialog(); RunAutoRemapButton = new Button();
openFileDialog1 = new OpenFileDialog();
fileSystemWatcher1 = new FileSystemWatcher();
((System.ComponentModel.ISupportInitialize)bindingSource1).BeginInit();
TabPageRemapper.SuspendLayout(); TabPageRemapper.SuspendLayout();
groupBox1.SuspendLayout(); groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)ConstuctorCountUpDown).BeginInit(); ((System.ComponentModel.ISupportInitialize)ConstuctorCountUpDown).BeginInit();
@ -139,13 +140,12 @@ partial class ReCodeItForm
((System.ComponentModel.ISupportInitialize)MethodCountUpDown).BeginInit(); ((System.ComponentModel.ISupportInitialize)MethodCountUpDown).BeginInit();
((System.ComponentModel.ISupportInitialize)NestedTypeCountUpDown).BeginInit(); ((System.ComponentModel.ISupportInitialize)NestedTypeCountUpDown).BeginInit();
TabControlMain.SuspendLayout(); TabControlMain.SuspendLayout();
tabPage5.SuspendLayout(); AutoMapperTab.SuspendLayout();
((System.ComponentModel.ISupportInitialize)AutoMapperRequiredMatchesUpDown).BeginInit();
SettingsTab.SuspendLayout();
groupBox3.SuspendLayout(); groupBox3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)MaxMatchCountUpDown).BeginInit(); ((System.ComponentModel.ISupportInitialize)MaxMatchCountUpDown).BeginInit();
groupBox4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)AutoMapperRequiredMatchesUpDown).BeginInit();
groupBox2.SuspendLayout(); groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)fileSystemWatcher1).BeginInit();
SuspendLayout(); SuspendLayout();
// //
// TabPageRemapper // TabPageRemapper
@ -162,6 +162,7 @@ partial class ReCodeItForm
// //
// RemapTreeView // RemapTreeView
// //
RemapTreeView.BackColor = Color.Gray;
RemapTreeView.Location = new Point(781, 20); RemapTreeView.Location = new Point(781, 20);
RemapTreeView.Name = "RemapTreeView"; RemapTreeView.Name = "RemapTreeView";
RemapTreeView.Size = new Size(487, 890); RemapTreeView.Size = new Size(487, 890);
@ -210,16 +211,18 @@ partial class ReCodeItForm
// //
// EditRemapButton // EditRemapButton
// //
EditRemapButton.BackColor = SystemColors.ButtonShadow;
EditRemapButton.Location = new Point(580, 145); EditRemapButton.Location = new Point(580, 145);
EditRemapButton.Name = "EditRemapButton"; EditRemapButton.Name = "EditRemapButton";
EditRemapButton.Size = new Size(168, 34); EditRemapButton.Size = new Size(168, 34);
EditRemapButton.TabIndex = 21; EditRemapButton.TabIndex = 21;
EditRemapButton.Text = "Edit Remap"; EditRemapButton.Text = "Edit Remap";
EditRemapButton.UseVisualStyleBackColor = true; EditRemapButton.UseVisualStyleBackColor = false;
EditRemapButton.Click += EditRemapButton_Click; EditRemapButton.Click += EditRemapButton_Click;
// //
// ConstuctorCountUpDown // ConstuctorCountUpDown
// //
ConstuctorCountUpDown.BackColor = SystemColors.ScrollBar;
ConstuctorCountUpDown.Location = new Point(224, 178); ConstuctorCountUpDown.Location = new Point(224, 178);
ConstuctorCountUpDown.Name = "ConstuctorCountUpDown"; ConstuctorCountUpDown.Name = "ConstuctorCountUpDown";
ConstuctorCountUpDown.Size = new Size(55, 31); ConstuctorCountUpDown.Size = new Size(55, 31);
@ -237,32 +240,35 @@ partial class ReCodeItForm
// //
// LoadMappingFileButton // LoadMappingFileButton
// //
LoadMappingFileButton.BackColor = SystemColors.ButtonShadow;
LoadMappingFileButton.Location = new Point(601, 489); LoadMappingFileButton.Location = new Point(601, 489);
LoadMappingFileButton.Name = "LoadMappingFileButton"; LoadMappingFileButton.Name = "LoadMappingFileButton";
LoadMappingFileButton.Size = new Size(168, 34); LoadMappingFileButton.Size = new Size(168, 34);
LoadMappingFileButton.TabIndex = 18; LoadMappingFileButton.TabIndex = 18;
LoadMappingFileButton.Text = "Load Mapping File"; LoadMappingFileButton.Text = "Load Mapping File";
LoadMappingFileButton.UseVisualStyleBackColor = true; LoadMappingFileButton.UseVisualStyleBackColor = false;
LoadMappingFileButton.Click += LoadMappingFileButton_Click; LoadMappingFileButton.Click += LoadMappingFileButton_Click;
// //
// SaveMappingFileButton // SaveMappingFileButton
// //
SaveMappingFileButton.BackColor = SystemColors.ButtonShadow;
SaveMappingFileButton.Location = new Point(427, 489); SaveMappingFileButton.Location = new Point(427, 489);
SaveMappingFileButton.Name = "SaveMappingFileButton"; SaveMappingFileButton.Name = "SaveMappingFileButton";
SaveMappingFileButton.Size = new Size(168, 34); SaveMappingFileButton.Size = new Size(168, 34);
SaveMappingFileButton.TabIndex = 17; SaveMappingFileButton.TabIndex = 17;
SaveMappingFileButton.Text = "Save Mapping File"; SaveMappingFileButton.Text = "Save Mapping File";
SaveMappingFileButton.UseVisualStyleBackColor = true; SaveMappingFileButton.UseVisualStyleBackColor = false;
SaveMappingFileButton.Click += SaveMappingFileButton_Click; SaveMappingFileButton.Click += SaveMappingFileButton_Click;
// //
// RunRemapButton // RunRemapButton
// //
RunRemapButton.BackColor = SystemColors.ButtonShadow;
RunRemapButton.Location = new Point(580, 185); RunRemapButton.Location = new Point(580, 185);
RunRemapButton.Name = "RunRemapButton"; RunRemapButton.Name = "RunRemapButton";
RunRemapButton.Size = new Size(168, 34); RunRemapButton.Size = new Size(168, 34);
RunRemapButton.TabIndex = 16; RunRemapButton.TabIndex = 16;
RunRemapButton.Text = "Run Remap"; RunRemapButton.Text = "Run Remap";
RunRemapButton.UseVisualStyleBackColor = true; RunRemapButton.UseVisualStyleBackColor = false;
RunRemapButton.Click += RunRemapButton_Click; RunRemapButton.Click += RunRemapButton_Click;
// //
// Inclusions // Inclusions
@ -298,6 +304,7 @@ partial class ReCodeItForm
// //
// ExcludeMethodTextBox // ExcludeMethodTextBox
// //
ExcludeMethodTextBox.BackColor = SystemColors.ScrollBar;
ExcludeMethodTextBox.Location = new Point(381, 6); ExcludeMethodTextBox.Location = new Point(381, 6);
ExcludeMethodTextBox.Name = "ExcludeMethodTextBox"; ExcludeMethodTextBox.Name = "ExcludeMethodTextBox";
ExcludeMethodTextBox.PlaceholderText = "Exclude Methods"; ExcludeMethodTextBox.PlaceholderText = "Exclude Methods";
@ -306,6 +313,7 @@ partial class ReCodeItForm
// //
// IncludeMethodTextBox // IncludeMethodTextBox
// //
IncludeMethodTextBox.BackColor = SystemColors.ScrollBar;
IncludeMethodTextBox.Location = new Point(6, 6); IncludeMethodTextBox.Location = new Point(6, 6);
IncludeMethodTextBox.Name = "IncludeMethodTextBox"; IncludeMethodTextBox.Name = "IncludeMethodTextBox";
IncludeMethodTextBox.PlaceholderText = "Include Methods"; IncludeMethodTextBox.PlaceholderText = "Include Methods";
@ -354,6 +362,7 @@ partial class ReCodeItForm
// //
// MethodExcludeBox // MethodExcludeBox
// //
MethodExcludeBox.BackColor = Color.Gray;
MethodExcludeBox.FormattingEnabled = true; MethodExcludeBox.FormattingEnabled = true;
MethodExcludeBox.ItemHeight = 25; MethodExcludeBox.ItemHeight = 25;
MethodExcludeBox.Location = new Point(381, 43); MethodExcludeBox.Location = new Point(381, 43);
@ -363,6 +372,7 @@ partial class ReCodeItForm
// //
// MethodIncludeBox // MethodIncludeBox
// //
MethodIncludeBox.BackColor = Color.Gray;
MethodIncludeBox.FormattingEnabled = true; MethodIncludeBox.FormattingEnabled = true;
MethodIncludeBox.ItemHeight = 25; MethodIncludeBox.ItemHeight = 25;
MethodIncludeBox.Location = new Point(6, 43); MethodIncludeBox.Location = new Point(6, 43);
@ -390,6 +400,7 @@ partial class ReCodeItForm
// //
// FieldsExcludeTextInput // FieldsExcludeTextInput
// //
FieldsExcludeTextInput.BackColor = SystemColors.ScrollBar;
FieldsExcludeTextInput.Location = new Point(381, 6); FieldsExcludeTextInput.Location = new Point(381, 6);
FieldsExcludeTextInput.Name = "FieldsExcludeTextInput"; FieldsExcludeTextInput.Name = "FieldsExcludeTextInput";
FieldsExcludeTextInput.PlaceholderText = "Exclude Fields"; FieldsExcludeTextInput.PlaceholderText = "Exclude Fields";
@ -398,6 +409,7 @@ partial class ReCodeItForm
// //
// FieldsIncludeTextInput // FieldsIncludeTextInput
// //
FieldsIncludeTextInput.BackColor = SystemColors.ScrollBar;
FieldsIncludeTextInput.Location = new Point(6, 6); FieldsIncludeTextInput.Location = new Point(6, 6);
FieldsIncludeTextInput.Name = "FieldsIncludeTextInput"; FieldsIncludeTextInput.Name = "FieldsIncludeTextInput";
FieldsIncludeTextInput.PlaceholderText = "Include Fields"; FieldsIncludeTextInput.PlaceholderText = "Include Fields";
@ -406,46 +418,51 @@ partial class ReCodeItForm
// //
// FieldExcludeRemoveButton // FieldExcludeRemoveButton
// //
FieldExcludeRemoveButton.BackColor = SystemColors.ButtonShadow;
FieldExcludeRemoveButton.Location = new Point(622, 278); FieldExcludeRemoveButton.Location = new Point(622, 278);
FieldExcludeRemoveButton.Name = "FieldExcludeRemoveButton"; FieldExcludeRemoveButton.Name = "FieldExcludeRemoveButton";
FieldExcludeRemoveButton.Size = new Size(112, 34); FieldExcludeRemoveButton.Size = new Size(112, 34);
FieldExcludeRemoveButton.TabIndex = 25; FieldExcludeRemoveButton.TabIndex = 25;
FieldExcludeRemoveButton.Text = "Remove"; FieldExcludeRemoveButton.Text = "Remove";
FieldExcludeRemoveButton.UseVisualStyleBackColor = true; FieldExcludeRemoveButton.UseVisualStyleBackColor = false;
FieldExcludeRemoveButton.Click += FieldExcludeRemoveButton_Click; FieldExcludeRemoveButton.Click += FieldExcludeRemoveButton_Click;
// //
// FieldExcludeAddButton // FieldExcludeAddButton
// //
FieldExcludeAddButton.BackColor = SystemColors.ButtonShadow;
FieldExcludeAddButton.Location = new Point(381, 278); FieldExcludeAddButton.Location = new Point(381, 278);
FieldExcludeAddButton.Name = "FieldExcludeAddButton"; FieldExcludeAddButton.Name = "FieldExcludeAddButton";
FieldExcludeAddButton.Size = new Size(112, 34); FieldExcludeAddButton.Size = new Size(112, 34);
FieldExcludeAddButton.TabIndex = 24; FieldExcludeAddButton.TabIndex = 24;
FieldExcludeAddButton.Text = "Add"; FieldExcludeAddButton.Text = "Add";
FieldExcludeAddButton.UseVisualStyleBackColor = true; FieldExcludeAddButton.UseVisualStyleBackColor = false;
FieldExcludeAddButton.Click += FieldExcludeAddButton_Click; FieldExcludeAddButton.Click += FieldExcludeAddButton_Click;
// //
// FieldIncludeRemoveButton // FieldIncludeRemoveButton
// //
FieldIncludeRemoveButton.BackColor = SystemColors.ButtonShadow;
FieldIncludeRemoveButton.Location = new Point(247, 278); FieldIncludeRemoveButton.Location = new Point(247, 278);
FieldIncludeRemoveButton.Name = "FieldIncludeRemoveButton"; FieldIncludeRemoveButton.Name = "FieldIncludeRemoveButton";
FieldIncludeRemoveButton.Size = new Size(112, 34); FieldIncludeRemoveButton.Size = new Size(112, 34);
FieldIncludeRemoveButton.TabIndex = 23; FieldIncludeRemoveButton.TabIndex = 23;
FieldIncludeRemoveButton.Text = "Remove"; FieldIncludeRemoveButton.Text = "Remove";
FieldIncludeRemoveButton.UseVisualStyleBackColor = true; FieldIncludeRemoveButton.UseVisualStyleBackColor = false;
FieldIncludeRemoveButton.Click += FieldIncludeRemoveButton_Click; FieldIncludeRemoveButton.Click += FieldIncludeRemoveButton_Click;
// //
// FIeldIncludeAddButton // FIeldIncludeAddButton
// //
FIeldIncludeAddButton.BackColor = SystemColors.ButtonShadow;
FIeldIncludeAddButton.Location = new Point(6, 278); FIeldIncludeAddButton.Location = new Point(6, 278);
FIeldIncludeAddButton.Name = "FIeldIncludeAddButton"; FIeldIncludeAddButton.Name = "FIeldIncludeAddButton";
FIeldIncludeAddButton.Size = new Size(112, 34); FIeldIncludeAddButton.Size = new Size(112, 34);
FIeldIncludeAddButton.TabIndex = 22; FIeldIncludeAddButton.TabIndex = 22;
FIeldIncludeAddButton.Text = "Add"; FIeldIncludeAddButton.Text = "Add";
FIeldIncludeAddButton.UseVisualStyleBackColor = true; FIeldIncludeAddButton.UseVisualStyleBackColor = false;
FIeldIncludeAddButton.Click += FIeldIncludeAddButton_Click; FIeldIncludeAddButton.Click += FIeldIncludeAddButton_Click;
// //
// FieldExcludeBox // FieldExcludeBox
// //
FieldExcludeBox.BackColor = Color.Gray;
FieldExcludeBox.FormattingEnabled = true; FieldExcludeBox.FormattingEnabled = true;
FieldExcludeBox.ItemHeight = 25; FieldExcludeBox.ItemHeight = 25;
FieldExcludeBox.Location = new Point(382, 43); FieldExcludeBox.Location = new Point(382, 43);
@ -455,6 +472,7 @@ partial class ReCodeItForm
// //
// FieldIncludeBox // FieldIncludeBox
// //
FieldIncludeBox.BackColor = Color.Gray;
FieldIncludeBox.FormattingEnabled = true; FieldIncludeBox.FormattingEnabled = true;
FieldIncludeBox.ItemHeight = 25; FieldIncludeBox.ItemHeight = 25;
FieldIncludeBox.Location = new Point(6, 43); FieldIncludeBox.Location = new Point(6, 43);
@ -482,6 +500,7 @@ partial class ReCodeItForm
// //
// PropertiesExcludeTextField // PropertiesExcludeTextField
// //
PropertiesExcludeTextField.BackColor = SystemColors.ScrollBar;
PropertiesExcludeTextField.Location = new Point(381, 6); PropertiesExcludeTextField.Location = new Point(381, 6);
PropertiesExcludeTextField.Name = "PropertiesExcludeTextField"; PropertiesExcludeTextField.Name = "PropertiesExcludeTextField";
PropertiesExcludeTextField.PlaceholderText = "Exclude Properties"; PropertiesExcludeTextField.PlaceholderText = "Exclude Properties";
@ -490,6 +509,7 @@ partial class ReCodeItForm
// //
// PropertiesIncludeTextField // PropertiesIncludeTextField
// //
PropertiesIncludeTextField.BackColor = SystemColors.ScrollBar;
PropertiesIncludeTextField.Location = new Point(6, 6); PropertiesIncludeTextField.Location = new Point(6, 6);
PropertiesIncludeTextField.Name = "PropertiesIncludeTextField"; PropertiesIncludeTextField.Name = "PropertiesIncludeTextField";
PropertiesIncludeTextField.PlaceholderText = "Include Properties"; PropertiesIncludeTextField.PlaceholderText = "Include Properties";
@ -498,46 +518,51 @@ partial class ReCodeItForm
// //
// PropertiesExcludeRemoveButton // PropertiesExcludeRemoveButton
// //
PropertiesExcludeRemoveButton.BackColor = SystemColors.ButtonShadow;
PropertiesExcludeRemoveButton.Location = new Point(622, 278); PropertiesExcludeRemoveButton.Location = new Point(622, 278);
PropertiesExcludeRemoveButton.Name = "PropertiesExcludeRemoveButton"; PropertiesExcludeRemoveButton.Name = "PropertiesExcludeRemoveButton";
PropertiesExcludeRemoveButton.Size = new Size(112, 34); PropertiesExcludeRemoveButton.Size = new Size(112, 34);
PropertiesExcludeRemoveButton.TabIndex = 25; PropertiesExcludeRemoveButton.TabIndex = 25;
PropertiesExcludeRemoveButton.Text = "Remove"; PropertiesExcludeRemoveButton.Text = "Remove";
PropertiesExcludeRemoveButton.UseVisualStyleBackColor = true; PropertiesExcludeRemoveButton.UseVisualStyleBackColor = false;
PropertiesExcludeRemoveButton.Click += PropertiesExcludeRemoveButton_Click; PropertiesExcludeRemoveButton.Click += PropertiesExcludeRemoveButton_Click;
// //
// PropertiesExcludeAddButton // PropertiesExcludeAddButton
// //
PropertiesExcludeAddButton.BackColor = SystemColors.ButtonShadow;
PropertiesExcludeAddButton.Location = new Point(381, 278); PropertiesExcludeAddButton.Location = new Point(381, 278);
PropertiesExcludeAddButton.Name = "PropertiesExcludeAddButton"; PropertiesExcludeAddButton.Name = "PropertiesExcludeAddButton";
PropertiesExcludeAddButton.Size = new Size(112, 34); PropertiesExcludeAddButton.Size = new Size(112, 34);
PropertiesExcludeAddButton.TabIndex = 24; PropertiesExcludeAddButton.TabIndex = 24;
PropertiesExcludeAddButton.Text = "Add"; PropertiesExcludeAddButton.Text = "Add";
PropertiesExcludeAddButton.UseVisualStyleBackColor = true; PropertiesExcludeAddButton.UseVisualStyleBackColor = false;
PropertiesExcludeAddButton.Click += PropertiesExcludeAddButton_Click; PropertiesExcludeAddButton.Click += PropertiesExcludeAddButton_Click;
// //
// PropertiesIncludeRemoveButton // PropertiesIncludeRemoveButton
// //
PropertiesIncludeRemoveButton.BackColor = SystemColors.ButtonShadow;
PropertiesIncludeRemoveButton.Location = new Point(247, 278); PropertiesIncludeRemoveButton.Location = new Point(247, 278);
PropertiesIncludeRemoveButton.Name = "PropertiesIncludeRemoveButton"; PropertiesIncludeRemoveButton.Name = "PropertiesIncludeRemoveButton";
PropertiesIncludeRemoveButton.Size = new Size(112, 34); PropertiesIncludeRemoveButton.Size = new Size(112, 34);
PropertiesIncludeRemoveButton.TabIndex = 23; PropertiesIncludeRemoveButton.TabIndex = 23;
PropertiesIncludeRemoveButton.Text = "Remove"; PropertiesIncludeRemoveButton.Text = "Remove";
PropertiesIncludeRemoveButton.UseVisualStyleBackColor = true; PropertiesIncludeRemoveButton.UseVisualStyleBackColor = false;
PropertiesIncludeRemoveButton.Click += PropertiesIncludeRemoveButton_Click; PropertiesIncludeRemoveButton.Click += PropertiesIncludeRemoveButton_Click;
// //
// PropertiesIncludeAddButton // PropertiesIncludeAddButton
// //
PropertiesIncludeAddButton.BackColor = SystemColors.ButtonShadow;
PropertiesIncludeAddButton.Location = new Point(6, 278); PropertiesIncludeAddButton.Location = new Point(6, 278);
PropertiesIncludeAddButton.Name = "PropertiesIncludeAddButton"; PropertiesIncludeAddButton.Name = "PropertiesIncludeAddButton";
PropertiesIncludeAddButton.Size = new Size(112, 34); PropertiesIncludeAddButton.Size = new Size(112, 34);
PropertiesIncludeAddButton.TabIndex = 22; PropertiesIncludeAddButton.TabIndex = 22;
PropertiesIncludeAddButton.Text = "Add"; PropertiesIncludeAddButton.Text = "Add";
PropertiesIncludeAddButton.UseVisualStyleBackColor = true; PropertiesIncludeAddButton.UseVisualStyleBackColor = false;
PropertiesIncludeAddButton.Click += PropertiesIncludeAddButton_Click; PropertiesIncludeAddButton.Click += PropertiesIncludeAddButton_Click;
// //
// PropertiesExcludeBox // PropertiesExcludeBox
// //
PropertiesExcludeBox.BackColor = Color.Gray;
PropertiesExcludeBox.FormattingEnabled = true; PropertiesExcludeBox.FormattingEnabled = true;
PropertiesExcludeBox.ItemHeight = 25; PropertiesExcludeBox.ItemHeight = 25;
PropertiesExcludeBox.Location = new Point(381, 43); PropertiesExcludeBox.Location = new Point(381, 43);
@ -547,6 +572,7 @@ partial class ReCodeItForm
// //
// PropertiesIncludeBox // PropertiesIncludeBox
// //
PropertiesIncludeBox.BackColor = Color.Gray;
PropertiesIncludeBox.FormattingEnabled = true; PropertiesIncludeBox.FormattingEnabled = true;
PropertiesIncludeBox.ItemHeight = 25; PropertiesIncludeBox.ItemHeight = 25;
PropertiesIncludeBox.Location = new Point(6, 43); PropertiesIncludeBox.Location = new Point(6, 43);
@ -574,6 +600,7 @@ partial class ReCodeItForm
// //
// NestedTypesExcludeTextField // NestedTypesExcludeTextField
// //
NestedTypesExcludeTextField.BackColor = SystemColors.ScrollBar;
NestedTypesExcludeTextField.Location = new Point(381, 6); NestedTypesExcludeTextField.Location = new Point(381, 6);
NestedTypesExcludeTextField.Name = "NestedTypesExcludeTextField"; NestedTypesExcludeTextField.Name = "NestedTypesExcludeTextField";
NestedTypesExcludeTextField.PlaceholderText = "Exclude Nested Types"; NestedTypesExcludeTextField.PlaceholderText = "Exclude Nested Types";
@ -582,6 +609,7 @@ partial class ReCodeItForm
// //
// NestedTypesIncludeTextField // NestedTypesIncludeTextField
// //
NestedTypesIncludeTextField.BackColor = SystemColors.ScrollBar;
NestedTypesIncludeTextField.Location = new Point(6, 6); NestedTypesIncludeTextField.Location = new Point(6, 6);
NestedTypesIncludeTextField.Name = "NestedTypesIncludeTextField"; NestedTypesIncludeTextField.Name = "NestedTypesIncludeTextField";
NestedTypesIncludeTextField.PlaceholderText = "Include Nested Types"; NestedTypesIncludeTextField.PlaceholderText = "Include Nested Types";
@ -590,46 +618,51 @@ partial class ReCodeItForm
// //
// NestedTypesExcludeRemoveButton // NestedTypesExcludeRemoveButton
// //
NestedTypesExcludeRemoveButton.BackColor = SystemColors.ButtonShadow;
NestedTypesExcludeRemoveButton.Location = new Point(622, 278); NestedTypesExcludeRemoveButton.Location = new Point(622, 278);
NestedTypesExcludeRemoveButton.Name = "NestedTypesExcludeRemoveButton"; NestedTypesExcludeRemoveButton.Name = "NestedTypesExcludeRemoveButton";
NestedTypesExcludeRemoveButton.Size = new Size(112, 34); NestedTypesExcludeRemoveButton.Size = new Size(112, 34);
NestedTypesExcludeRemoveButton.TabIndex = 25; NestedTypesExcludeRemoveButton.TabIndex = 25;
NestedTypesExcludeRemoveButton.Text = "Remove"; NestedTypesExcludeRemoveButton.Text = "Remove";
NestedTypesExcludeRemoveButton.UseVisualStyleBackColor = true; NestedTypesExcludeRemoveButton.UseVisualStyleBackColor = false;
NestedTypesExcludeRemoveButton.Click += NestedTypesExcludeRemoveButton_Click; NestedTypesExcludeRemoveButton.Click += NestedTypesExcludeRemoveButton_Click;
// //
// NestedTypesExlcudeAddButton // NestedTypesExlcudeAddButton
// //
NestedTypesExlcudeAddButton.BackColor = SystemColors.ButtonShadow;
NestedTypesExlcudeAddButton.Location = new Point(381, 278); NestedTypesExlcudeAddButton.Location = new Point(381, 278);
NestedTypesExlcudeAddButton.Name = "NestedTypesExlcudeAddButton"; NestedTypesExlcudeAddButton.Name = "NestedTypesExlcudeAddButton";
NestedTypesExlcudeAddButton.Size = new Size(112, 34); NestedTypesExlcudeAddButton.Size = new Size(112, 34);
NestedTypesExlcudeAddButton.TabIndex = 24; NestedTypesExlcudeAddButton.TabIndex = 24;
NestedTypesExlcudeAddButton.Text = "Add"; NestedTypesExlcudeAddButton.Text = "Add";
NestedTypesExlcudeAddButton.UseVisualStyleBackColor = true; NestedTypesExlcudeAddButton.UseVisualStyleBackColor = false;
NestedTypesExlcudeAddButton.Click += NestedTypesExlcudeAddButton_Click; NestedTypesExlcudeAddButton.Click += NestedTypesExlcudeAddButton_Click;
// //
// NestedTypesRemoveButton // NestedTypesRemoveButton
// //
NestedTypesRemoveButton.BackColor = SystemColors.ButtonShadow;
NestedTypesRemoveButton.Location = new Point(247, 278); NestedTypesRemoveButton.Location = new Point(247, 278);
NestedTypesRemoveButton.Name = "NestedTypesRemoveButton"; NestedTypesRemoveButton.Name = "NestedTypesRemoveButton";
NestedTypesRemoveButton.Size = new Size(112, 34); NestedTypesRemoveButton.Size = new Size(112, 34);
NestedTypesRemoveButton.TabIndex = 23; NestedTypesRemoveButton.TabIndex = 23;
NestedTypesRemoveButton.Text = "Remove"; NestedTypesRemoveButton.Text = "Remove";
NestedTypesRemoveButton.UseVisualStyleBackColor = true; NestedTypesRemoveButton.UseVisualStyleBackColor = false;
NestedTypesRemoveButton.Click += NestedTypesRemoveButton_Click; NestedTypesRemoveButton.Click += NestedTypesRemoveButton_Click;
// //
// NestedTypesAddButton // NestedTypesAddButton
// //
NestedTypesAddButton.BackColor = SystemColors.ButtonShadow;
NestedTypesAddButton.Location = new Point(6, 278); NestedTypesAddButton.Location = new Point(6, 278);
NestedTypesAddButton.Name = "NestedTypesAddButton"; NestedTypesAddButton.Name = "NestedTypesAddButton";
NestedTypesAddButton.Size = new Size(112, 34); NestedTypesAddButton.Size = new Size(112, 34);
NestedTypesAddButton.TabIndex = 22; NestedTypesAddButton.TabIndex = 22;
NestedTypesAddButton.Text = "Add"; NestedTypesAddButton.Text = "Add";
NestedTypesAddButton.UseVisualStyleBackColor = true; NestedTypesAddButton.UseVisualStyleBackColor = false;
NestedTypesAddButton.Click += NestedTypesAddButton_Click; NestedTypesAddButton.Click += NestedTypesAddButton_Click;
// //
// NestedTypesExcludeBox // NestedTypesExcludeBox
// //
NestedTypesExcludeBox.BackColor = Color.Gray;
NestedTypesExcludeBox.FormattingEnabled = true; NestedTypesExcludeBox.FormattingEnabled = true;
NestedTypesExcludeBox.ItemHeight = 25; NestedTypesExcludeBox.ItemHeight = 25;
NestedTypesExcludeBox.Location = new Point(381, 43); NestedTypesExcludeBox.Location = new Point(381, 43);
@ -639,6 +672,7 @@ partial class ReCodeItForm
// //
// NestedTypesIncludeBox // NestedTypesIncludeBox
// //
NestedTypesIncludeBox.BackColor = Color.Gray;
NestedTypesIncludeBox.FormattingEnabled = true; NestedTypesIncludeBox.FormattingEnabled = true;
NestedTypesIncludeBox.ItemHeight = 25; NestedTypesIncludeBox.ItemHeight = 25;
NestedTypesIncludeBox.Location = new Point(6, 43); NestedTypesIncludeBox.Location = new Point(6, 43);
@ -648,6 +682,7 @@ partial class ReCodeItForm
// //
// NewTypeName // NewTypeName
// //
NewTypeName.BackColor = SystemColors.ScrollBar;
NewTypeName.Location = new Point(10, 30); NewTypeName.Location = new Point(10, 30);
NewTypeName.Name = "NewTypeName"; NewTypeName.Name = "NewTypeName";
NewTypeName.PlaceholderText = "New Type Name"; NewTypeName.PlaceholderText = "New Type Name";
@ -676,6 +711,7 @@ partial class ReCodeItForm
// //
// IsInterfaceUpDown // IsInterfaceUpDown
// //
IsInterfaceUpDown.BackColor = SystemColors.ScrollBar;
IsInterfaceUpDown.Location = new Point(10, 183); IsInterfaceUpDown.Location = new Point(10, 183);
IsInterfaceUpDown.Name = "IsInterfaceUpDown"; IsInterfaceUpDown.Name = "IsInterfaceUpDown";
IsInterfaceUpDown.Size = new Size(208, 31); IsInterfaceUpDown.Size = new Size(208, 31);
@ -695,6 +731,7 @@ partial class ReCodeItForm
// //
// PropertyCountUpDown // PropertyCountUpDown
// //
PropertyCountUpDown.BackColor = SystemColors.ScrollBar;
PropertyCountUpDown.Location = new Point(224, 291); PropertyCountUpDown.Location = new Point(224, 291);
PropertyCountUpDown.Name = "PropertyCountUpDown"; PropertyCountUpDown.Name = "PropertyCountUpDown";
PropertyCountUpDown.Size = new Size(55, 31); PropertyCountUpDown.Size = new Size(55, 31);
@ -702,16 +739,18 @@ partial class ReCodeItForm
// //
// RemoveRemapButton // RemoveRemapButton
// //
RemoveRemapButton.BackColor = SystemColors.ButtonShadow;
RemoveRemapButton.Location = new Point(580, 105); RemoveRemapButton.Location = new Point(580, 105);
RemoveRemapButton.Name = "RemoveRemapButton"; RemoveRemapButton.Name = "RemoveRemapButton";
RemoveRemapButton.Size = new Size(168, 34); RemoveRemapButton.Size = new Size(168, 34);
RemoveRemapButton.TabIndex = 2; RemoveRemapButton.TabIndex = 2;
RemoveRemapButton.Text = "Remove Remap"; RemoveRemapButton.Text = "Remove Remap";
RemoveRemapButton.UseVisualStyleBackColor = true; RemoveRemapButton.UseVisualStyleBackColor = false;
RemoveRemapButton.Click += RemoveRemapButton_Click; RemoveRemapButton.Click += RemoveRemapButton_Click;
// //
// FieldCountUpDown // FieldCountUpDown
// //
FieldCountUpDown.BackColor = SystemColors.ScrollBar;
FieldCountUpDown.Location = new Point(224, 253); FieldCountUpDown.Location = new Point(224, 253);
FieldCountUpDown.Name = "FieldCountUpDown"; FieldCountUpDown.Name = "FieldCountUpDown";
FieldCountUpDown.Size = new Size(55, 31); FieldCountUpDown.Size = new Size(55, 31);
@ -719,6 +758,7 @@ partial class ReCodeItForm
// //
// IsPublicUpDown // IsPublicUpDown
// //
IsPublicUpDown.BackColor = SystemColors.ScrollBar;
IsPublicUpDown.Location = new Point(10, 107); IsPublicUpDown.Location = new Point(10, 107);
IsPublicUpDown.Name = "IsPublicUpDown"; IsPublicUpDown.Name = "IsPublicUpDown";
IsPublicUpDown.Size = new Size(208, 31); IsPublicUpDown.Size = new Size(208, 31);
@ -738,6 +778,7 @@ partial class ReCodeItForm
// //
// NestedTypeParentName // NestedTypeParentName
// //
NestedTypeParentName.BackColor = SystemColors.ScrollBar;
NestedTypeParentName.Location = new Point(224, 106); NestedTypeParentName.Location = new Point(224, 106);
NestedTypeParentName.Name = "NestedTypeParentName"; NestedTypeParentName.Name = "NestedTypeParentName";
NestedTypeParentName.PlaceholderText = "Nested Type Parent Name"; NestedTypeParentName.PlaceholderText = "Nested Type Parent Name";
@ -746,6 +787,7 @@ partial class ReCodeItForm
// //
// MethodCountUpDown // MethodCountUpDown
// //
MethodCountUpDown.BackColor = SystemColors.ScrollBar;
MethodCountUpDown.Location = new Point(224, 215); MethodCountUpDown.Location = new Point(224, 215);
MethodCountUpDown.Name = "MethodCountUpDown"; MethodCountUpDown.Name = "MethodCountUpDown";
MethodCountUpDown.Size = new Size(55, 31); MethodCountUpDown.Size = new Size(55, 31);
@ -753,6 +795,7 @@ partial class ReCodeItForm
// //
// IsAbstractUpDown // IsAbstractUpDown
// //
IsAbstractUpDown.BackColor = SystemColors.ScrollBar;
IsAbstractUpDown.Location = new Point(10, 144); IsAbstractUpDown.Location = new Point(10, 144);
IsAbstractUpDown.Name = "IsAbstractUpDown"; IsAbstractUpDown.Name = "IsAbstractUpDown";
IsAbstractUpDown.Size = new Size(208, 31); IsAbstractUpDown.Size = new Size(208, 31);
@ -762,6 +805,7 @@ partial class ReCodeItForm
// //
// BaseClassIncludeTextFIeld // BaseClassIncludeTextFIeld
// //
BaseClassIncludeTextFIeld.BackColor = SystemColors.ScrollBar;
BaseClassIncludeTextFIeld.Location = new Point(224, 67); BaseClassIncludeTextFIeld.Location = new Point(224, 67);
BaseClassIncludeTextFIeld.Name = "BaseClassIncludeTextFIeld"; BaseClassIncludeTextFIeld.Name = "BaseClassIncludeTextFIeld";
BaseClassIncludeTextFIeld.PlaceholderText = "Include Base Class"; BaseClassIncludeTextFIeld.PlaceholderText = "Include Base Class";
@ -770,6 +814,7 @@ partial class ReCodeItForm
// //
// OriginalTypeName // OriginalTypeName
// //
OriginalTypeName.BackColor = SystemColors.ScrollBar;
OriginalTypeName.Location = new Point(224, 30); OriginalTypeName.Location = new Point(224, 30);
OriginalTypeName.Name = "OriginalTypeName"; OriginalTypeName.Name = "OriginalTypeName";
OriginalTypeName.PlaceholderText = "Original Type Name"; OriginalTypeName.PlaceholderText = "Original Type Name";
@ -778,6 +823,7 @@ partial class ReCodeItForm
// //
// HasGenericParametersUpDown // HasGenericParametersUpDown
// //
HasGenericParametersUpDown.BackColor = SystemColors.ScrollBar;
HasGenericParametersUpDown.Location = new Point(10, 366); HasGenericParametersUpDown.Location = new Point(10, 366);
HasGenericParametersUpDown.Name = "HasGenericParametersUpDown"; HasGenericParametersUpDown.Name = "HasGenericParametersUpDown";
HasGenericParametersUpDown.Size = new Size(208, 31); HasGenericParametersUpDown.Size = new Size(208, 31);
@ -787,6 +833,7 @@ partial class ReCodeItForm
// //
// IsEnumUpDown // IsEnumUpDown
// //
IsEnumUpDown.BackColor = SystemColors.ScrollBar;
IsEnumUpDown.Location = new Point(10, 255); IsEnumUpDown.Location = new Point(10, 255);
IsEnumUpDown.Name = "IsEnumUpDown"; IsEnumUpDown.Name = "IsEnumUpDown";
IsEnumUpDown.Size = new Size(208, 31); IsEnumUpDown.Size = new Size(208, 31);
@ -796,6 +843,7 @@ partial class ReCodeItForm
// //
// NestedTypeCountUpDown // NestedTypeCountUpDown
// //
NestedTypeCountUpDown.BackColor = SystemColors.ScrollBar;
NestedTypeCountUpDown.Location = new Point(224, 329); NestedTypeCountUpDown.Location = new Point(224, 329);
NestedTypeCountUpDown.Name = "NestedTypeCountUpDown"; NestedTypeCountUpDown.Name = "NestedTypeCountUpDown";
NestedTypeCountUpDown.Size = new Size(55, 31); NestedTypeCountUpDown.Size = new Size(55, 31);
@ -803,16 +851,18 @@ partial class ReCodeItForm
// //
// SaveRemapButton // SaveRemapButton
// //
SaveRemapButton.BackColor = SystemColors.ButtonShadow;
SaveRemapButton.Location = new Point(580, 64); SaveRemapButton.Location = new Point(580, 64);
SaveRemapButton.Name = "SaveRemapButton"; SaveRemapButton.Name = "SaveRemapButton";
SaveRemapButton.Size = new Size(168, 34); SaveRemapButton.Size = new Size(168, 34);
SaveRemapButton.TabIndex = 4; SaveRemapButton.TabIndex = 4;
SaveRemapButton.Text = "Save Remap"; SaveRemapButton.Text = "Save Remap";
SaveRemapButton.UseVisualStyleBackColor = true; SaveRemapButton.UseVisualStyleBackColor = false;
SaveRemapButton.Click += AddRemapButton_Click; SaveRemapButton.Click += AddRemapButton_Click;
// //
// IsDerivedUpDown // IsDerivedUpDown
// //
IsDerivedUpDown.BackColor = SystemColors.ScrollBar;
IsDerivedUpDown.Location = new Point(10, 329); IsDerivedUpDown.Location = new Point(10, 329);
IsDerivedUpDown.Name = "IsDerivedUpDown"; IsDerivedUpDown.Name = "IsDerivedUpDown";
IsDerivedUpDown.Size = new Size(208, 31); IsDerivedUpDown.Size = new Size(208, 31);
@ -822,6 +872,7 @@ partial class ReCodeItForm
// //
// IsNestedUpDown // IsNestedUpDown
// //
IsNestedUpDown.BackColor = SystemColors.ScrollBar;
IsNestedUpDown.Location = new Point(10, 68); IsNestedUpDown.Location = new Point(10, 68);
IsNestedUpDown.Name = "IsNestedUpDown"; IsNestedUpDown.Name = "IsNestedUpDown";
IsNestedUpDown.Size = new Size(208, 31); IsNestedUpDown.Size = new Size(208, 31);
@ -831,6 +882,7 @@ partial class ReCodeItForm
// //
// HasAttributeUpDown // HasAttributeUpDown
// //
HasAttributeUpDown.BackColor = SystemColors.ScrollBar;
HasAttributeUpDown.Location = new Point(10, 292); HasAttributeUpDown.Location = new Point(10, 292);
HasAttributeUpDown.Name = "HasAttributeUpDown"; HasAttributeUpDown.Name = "HasAttributeUpDown";
HasAttributeUpDown.Size = new Size(208, 31); HasAttributeUpDown.Size = new Size(208, 31);
@ -840,6 +892,7 @@ partial class ReCodeItForm
// //
// BaseClassExcludeTextField // BaseClassExcludeTextField
// //
BaseClassExcludeTextField.BackColor = SystemColors.ScrollBar;
BaseClassExcludeTextField.Location = new Point(224, 145); BaseClassExcludeTextField.Location = new Point(224, 145);
BaseClassExcludeTextField.Name = "BaseClassExcludeTextField"; BaseClassExcludeTextField.Name = "BaseClassExcludeTextField";
BaseClassExcludeTextField.PlaceholderText = "Exclude Base Class"; BaseClassExcludeTextField.PlaceholderText = "Exclude Base Class";
@ -858,6 +911,7 @@ partial class ReCodeItForm
// //
// IsSealedUpDown // IsSealedUpDown
// //
IsSealedUpDown.BackColor = SystemColors.ScrollBar;
IsSealedUpDown.Location = new Point(10, 218); IsSealedUpDown.Location = new Point(10, 218);
IsSealedUpDown.Name = "IsSealedUpDown"; IsSealedUpDown.Name = "IsSealedUpDown";
IsSealedUpDown.Size = new Size(208, 31); IsSealedUpDown.Size = new Size(208, 31);
@ -868,25 +922,106 @@ partial class ReCodeItForm
// TabControlMain // TabControlMain
// //
TabControlMain.Controls.Add(TabPageRemapper); TabControlMain.Controls.Add(TabPageRemapper);
TabControlMain.Controls.Add(tabPage5); TabControlMain.Controls.Add(AutoMapperTab);
TabControlMain.Controls.Add(SettingsTab);
TabControlMain.Location = new Point(-5, 1); TabControlMain.Location = new Point(-5, 1);
TabControlMain.Name = "TabControlMain"; TabControlMain.Name = "TabControlMain";
TabControlMain.SelectedIndex = 0; TabControlMain.SelectedIndex = 0;
TabControlMain.Size = new Size(1344, 991); TabControlMain.Size = new Size(1344, 991);
TabControlMain.TabIndex = 6; TabControlMain.TabIndex = 6;
// //
// tabPage5 // AutoMapperTab
// //
tabPage5.BackColor = SystemColors.ControlDarkDark; AutoMapperTab.BackColor = SystemColors.ControlDarkDark;
tabPage5.Controls.Add(groupBox3); AutoMapperTab.Controls.Add(RunAutoRemapButton);
tabPage5.Controls.Add(groupBox4); AutoMapperTab.Controls.Add(label2);
tabPage5.Controls.Add(groupBox2); AutoMapperTab.Controls.Add(AutoMapperRequiredMatchesUpDown);
tabPage5.Location = new Point(4, 34); AutoMapperTab.Controls.Add(treeView1);
tabPage5.Name = "tabPage5"; AutoMapperTab.Controls.Add(AutoMapperExcludeTextField);
tabPage5.Padding = new Padding(3); AutoMapperTab.Controls.Add(AutoMapperExcludeRemoveButton);
tabPage5.Size = new Size(1336, 953); AutoMapperTab.Controls.Add(AutoMapperExcludeAddButton);
tabPage5.TabIndex = 2; AutoMapperTab.Controls.Add(AutoMapperExcludeBox);
tabPage5.Text = "Settings"; AutoMapperTab.Location = new Point(4, 34);
AutoMapperTab.Name = "AutoMapperTab";
AutoMapperTab.Padding = new Padding(3);
AutoMapperTab.Size = new Size(1336, 953);
AutoMapperTab.TabIndex = 3;
AutoMapperTab.Text = "Auto Mapper";
//
// label2
//
label2.AutoSize = true;
label2.Location = new Point(76, 60);
label2.Name = "label2";
label2.Size = new Size(153, 25);
label2.TabIndex = 27;
label2.Text = "Required Matches";
//
// AutoMapperRequiredMatchesUpDown
//
AutoMapperRequiredMatchesUpDown.Location = new Point(13, 58);
AutoMapperRequiredMatchesUpDown.Name = "AutoMapperRequiredMatchesUpDown";
AutoMapperRequiredMatchesUpDown.Size = new Size(57, 31);
AutoMapperRequiredMatchesUpDown.TabIndex = 26;
//
// treeView1
//
treeView1.Location = new Point(918, 18);
treeView1.Name = "treeView1";
treeView1.Size = new Size(368, 901);
treeView1.TabIndex = 25;
//
// AutoMapperExcludeTextField
//
AutoMapperExcludeTextField.BackColor = SystemColors.ScrollBar;
AutoMapperExcludeTextField.Location = new Point(6, 173);
AutoMapperExcludeTextField.Name = "AutoMapperExcludeTextField";
AutoMapperExcludeTextField.PlaceholderText = "Exclude Names";
AutoMapperExcludeTextField.Size = new Size(353, 31);
AutoMapperExcludeTextField.TabIndex = 24;
//
// AutoMapperExcludeRemoveButton
//
AutoMapperExcludeRemoveButton.Location = new Point(247, 445);
AutoMapperExcludeRemoveButton.Name = "AutoMapperExcludeRemoveButton";
AutoMapperExcludeRemoveButton.Size = new Size(112, 34);
AutoMapperExcludeRemoveButton.TabIndex = 23;
AutoMapperExcludeRemoveButton.Text = "Remove";
AutoMapperExcludeRemoveButton.UseVisualStyleBackColor = true;
AutoMapperExcludeRemoveButton.Click += AutoMapperExcludeRemoveButton_Click;
//
// AutoMapperExcludeAddButton
//
AutoMapperExcludeAddButton.Location = new Point(6, 445);
AutoMapperExcludeAddButton.Name = "AutoMapperExcludeAddButton";
AutoMapperExcludeAddButton.Size = new Size(112, 34);
AutoMapperExcludeAddButton.TabIndex = 22;
AutoMapperExcludeAddButton.Text = "Add";
AutoMapperExcludeAddButton.UseVisualStyleBackColor = true;
AutoMapperExcludeAddButton.Click += AutoMapperExcludeAddButton_Click;
//
// AutoMapperExcludeBox
//
AutoMapperExcludeBox.BackColor = Color.Gray;
AutoMapperExcludeBox.FormattingEnabled = true;
AutoMapperExcludeBox.ItemHeight = 25;
AutoMapperExcludeBox.Location = new Point(6, 210);
AutoMapperExcludeBox.Name = "AutoMapperExcludeBox";
AutoMapperExcludeBox.Size = new Size(353, 229);
AutoMapperExcludeBox.TabIndex = 21;
//
// SettingsTab
//
SettingsTab.BackColor = SystemColors.ControlDarkDark;
SettingsTab.Controls.Add(groupBox3);
SettingsTab.Controls.Add(groupBox4);
SettingsTab.Controls.Add(groupBox2);
SettingsTab.Location = new Point(4, 34);
SettingsTab.Name = "SettingsTab";
SettingsTab.Padding = new Padding(3);
SettingsTab.Size = new Size(1336, 953);
SettingsTab.TabIndex = 2;
SettingsTab.Text = "Settings";
// //
// groupBox3 // groupBox3
// //
@ -920,8 +1055,6 @@ partial class ReCodeItForm
// //
// groupBox4 // groupBox4
// //
groupBox4.Controls.Add(label2);
groupBox4.Controls.Add(AutoMapperRequiredMatchesUpDown);
groupBox4.Location = new Point(729, 6); groupBox4.Location = new Point(729, 6);
groupBox4.Name = "groupBox4"; groupBox4.Name = "groupBox4";
groupBox4.Size = new Size(557, 285); groupBox4.Size = new Size(557, 285);
@ -929,23 +1062,6 @@ partial class ReCodeItForm
groupBox4.TabStop = false; groupBox4.TabStop = false;
groupBox4.Text = "Auto Mapper Settings"; groupBox4.Text = "Auto Mapper Settings";
// //
// label2
//
label2.AutoSize = true;
label2.Location = new Point(69, 37);
label2.Name = "label2";
label2.Size = new Size(153, 25);
label2.TabIndex = 6;
label2.Text = "Required Matches";
//
// AutoMapperRequiredMatchesUpDown
//
AutoMapperRequiredMatchesUpDown.Location = new Point(6, 35);
AutoMapperRequiredMatchesUpDown.Name = "AutoMapperRequiredMatchesUpDown";
AutoMapperRequiredMatchesUpDown.Size = new Size(57, 31);
AutoMapperRequiredMatchesUpDown.TabIndex = 5;
AutoMapperRequiredMatchesUpDown.ValueChanged += AutoMapperRequiredMatchesUpDown_ValueChanged;
//
// groupBox2 // groupBox2
// //
groupBox2.Controls.Add(MappingChooseButton); groupBox2.Controls.Add(MappingChooseButton);
@ -1098,14 +1214,15 @@ partial class ReCodeItForm
DebugLoggingCheckbox.UseVisualStyleBackColor = true; DebugLoggingCheckbox.UseVisualStyleBackColor = true;
DebugLoggingCheckbox.CheckedChanged += DebugLoggingCheckbox_CheckedChanged; DebugLoggingCheckbox.CheckedChanged += DebugLoggingCheckbox_CheckedChanged;
// //
// openFileDialog1 // RunAutoRemapButton
// //
openFileDialog1.FileName = "openFileDialog1"; RunAutoRemapButton.Location = new Point(6, 3);
// RunAutoRemapButton.Name = "RunAutoRemapButton";
// fileSystemWatcher1 RunAutoRemapButton.Size = new Size(168, 34);
// RunAutoRemapButton.TabIndex = 28;
fileSystemWatcher1.EnableRaisingEvents = true; RunAutoRemapButton.Text = "Run Auto Remap";
fileSystemWatcher1.SynchronizingObject = this; RunAutoRemapButton.UseVisualStyleBackColor = true;
RunAutoRemapButton.Click += RunAutoRemapButton_Click;
// //
// ReCodeItForm // ReCodeItForm
// //
@ -1117,7 +1234,6 @@ partial class ReCodeItForm
FormBorderStyle = FormBorderStyle.FixedSingle; FormBorderStyle = FormBorderStyle.FixedSingle;
Name = "ReCodeItForm"; Name = "ReCodeItForm";
Text = "ReCodeIt V0.1.0"; Text = "ReCodeIt V0.1.0";
((System.ComponentModel.ISupportInitialize)bindingSource1).EndInit();
TabPageRemapper.ResumeLayout(false); TabPageRemapper.ResumeLayout(false);
groupBox1.ResumeLayout(false); groupBox1.ResumeLayout(false);
groupBox1.PerformLayout(); groupBox1.PerformLayout();
@ -1136,21 +1252,19 @@ partial class ReCodeItForm
((System.ComponentModel.ISupportInitialize)MethodCountUpDown).EndInit(); ((System.ComponentModel.ISupportInitialize)MethodCountUpDown).EndInit();
((System.ComponentModel.ISupportInitialize)NestedTypeCountUpDown).EndInit(); ((System.ComponentModel.ISupportInitialize)NestedTypeCountUpDown).EndInit();
TabControlMain.ResumeLayout(false); TabControlMain.ResumeLayout(false);
tabPage5.ResumeLayout(false); AutoMapperTab.ResumeLayout(false);
AutoMapperTab.PerformLayout();
((System.ComponentModel.ISupportInitialize)AutoMapperRequiredMatchesUpDown).EndInit();
SettingsTab.ResumeLayout(false);
groupBox3.ResumeLayout(false); groupBox3.ResumeLayout(false);
groupBox3.PerformLayout(); groupBox3.PerformLayout();
((System.ComponentModel.ISupportInitialize)MaxMatchCountUpDown).EndInit(); ((System.ComponentModel.ISupportInitialize)MaxMatchCountUpDown).EndInit();
groupBox4.ResumeLayout(false);
groupBox4.PerformLayout();
((System.ComponentModel.ISupportInitialize)AutoMapperRequiredMatchesUpDown).EndInit();
groupBox2.ResumeLayout(false); groupBox2.ResumeLayout(false);
groupBox2.PerformLayout(); groupBox2.PerformLayout();
((System.ComponentModel.ISupportInitialize)fileSystemWatcher1).EndInit();
ResumeLayout(false); ResumeLayout(false);
} }
#endregion #endregion
private BindingSource bindingSource1;
private TabPage TabPageRemapper; private TabPage TabPageRemapper;
private GroupBox groupBox1; private GroupBox groupBox1;
private TabControl Inclusions; private TabControl Inclusions;
@ -1204,7 +1318,6 @@ partial class ReCodeItForm
private ListView RemapListView; private ListView RemapListView;
private TabControl TabControlMain; private TabControl TabControlMain;
private DomainUpDown IsPublicUpDown; private DomainUpDown IsPublicUpDown;
private ColorDialog colorDialog1;
private DomainUpDown HasGenericParametersUpDown; private DomainUpDown HasGenericParametersUpDown;
private DomainUpDown IsDerivedUpDown; private DomainUpDown IsDerivedUpDown;
private DomainUpDown HasAttributeUpDown; private DomainUpDown HasAttributeUpDown;
@ -1224,7 +1337,7 @@ partial class ReCodeItForm
private CheckBox ConstructorCountEnabled; private CheckBox ConstructorCountEnabled;
private NumericUpDown MethodCountUpDown; private NumericUpDown MethodCountUpDown;
private CheckBox MethodCountEnabled; private CheckBox MethodCountEnabled;
private TabPage tabPage5; private TabPage SettingsTab;
private GroupBox groupBox3; private GroupBox groupBox3;
private GroupBox groupBox4; private GroupBox groupBox4;
private GroupBox groupBox2; private GroupBox groupBox2;
@ -1236,15 +1349,20 @@ partial class ReCodeItForm
private TextBox MappingPathTextBox; private TextBox MappingPathTextBox;
private TextBox OutputPathTextBox; private TextBox OutputPathTextBox;
private TextBox AssemblyPathTextBox; private TextBox AssemblyPathTextBox;
private OpenFileDialog openFileDialog1;
private FileSystemWatcher fileSystemWatcher1;
private CheckBox RenamePropertiesCheckbox; private CheckBox RenamePropertiesCheckbox;
private CheckBox RenameFieldsCheckbox; private CheckBox RenameFieldsCheckbox;
private CheckBox UnsealCheckbox; private CheckBox UnsealCheckbox;
private CheckBox PublicizeCheckbox; private CheckBox PublicizeCheckbox;
private NumericUpDown MaxMatchCountUpDown; private NumericUpDown MaxMatchCountUpDown;
private NumericUpDown AutoMapperRequiredMatchesUpDown;
private Label label1; private Label label1;
private Label label2;
private Button EditRemapButton; private Button EditRemapButton;
private TabPage AutoMapperTab;
private TreeView treeView1;
private TextBox AutoMapperExcludeTextField;
private Button AutoMapperExcludeRemoveButton;
private Button AutoMapperExcludeAddButton;
private ListBox AutoMapperExcludeBox;
private Label label2;
private NumericUpDown AutoMapperRequiredMatchesUpDown;
private Button RunAutoRemapButton;
} }

View File

@ -2,12 +2,14 @@ using ReCodeIt.Enums;
using ReCodeIt.Models; using ReCodeIt.Models;
using ReCodeIt.ReMapper; using ReCodeIt.ReMapper;
using ReCodeIt.Utils; using ReCodeIt.Utils;
using ReCodeItLib.AutoMapper;
namespace ReCodeIt.GUI; namespace ReCodeIt.GUI;
public partial class ReCodeItForm : Form public partial class ReCodeItForm : Form
{ {
public static ReCodeItRemapper Remapper { get; private set; } = new(); public static ReCodeItRemapper Remapper { get; private set; } = new();
public static ReCodeItAutoMapper AutoMapper { get; private set; } = new();
private RemapModel CurrentRemap { get; set; } private RemapModel CurrentRemap { get; set; }
@ -17,7 +19,7 @@ public partial class ReCodeItForm : Form
{ {
InitializeComponent(); InitializeComponent();
PopulateDomainUpDowns(); PopulateDomainUpDowns();
RefreshSettingsPage();
RemapTreeView.NodeMouseDoubleClick += EditSelectedRemap; RemapTreeView.NodeMouseDoubleClick += EditSelectedRemap;
Remapper.OnComplete += ReloadTreeView; Remapper.OnComplete += ReloadTreeView;
@ -172,6 +174,11 @@ public partial class ReCodeItForm : Form
} }
} }
private void RunAutoMapButton_Click(object sender, EventArgs e)
{
AutoMapper.InitializeAutoMapping();
}
#endregion MAIN_BUTTONS #endregion MAIN_BUTTONS
#region LISTBOX_BUTTONS #region LISTBOX_BUTTONS
@ -304,6 +311,32 @@ public partial class ReCodeItForm : Form
} }
} }
private void AutoMapperExcludeAddButton_Click(object sender, EventArgs e)
{
if (!AutoMapperExcludeBox.Items.Contains(AutoMapperExcludeTextField.Text))
{
DataProvider.Settings.AutoMapper.TypesToIgnore.Add(AutoMapperExcludeTextField.Text);
AutoMapperExcludeBox.Items.Add(AutoMapperExcludeTextField.Text);
AutoMapperExcludeTextField.Clear();
DataProvider.SaveAppSettings();
}
}
private void AutoMapperExcludeRemoveButton_Click(object sender, EventArgs e)
{
if (AutoMapperExcludeBox.SelectedItem != null)
{
DataProvider.Settings.AutoMapper.TypesToIgnore.RemoveAt(AutoMapperExcludeBox.SelectedIndex);
AutoMapperExcludeBox.Items.Remove(AutoMapperExcludeBox.SelectedItem);
DataProvider.SaveAppSettings();
}
}
private void RunAutoRemapButton_Click(object sender, EventArgs e)
{
AutoMapper.InitializeAutoMapping();
}
#endregion LISTBOX_BUTTONS #endregion LISTBOX_BUTTONS
#endregion BUTTONS #endregion BUTTONS
@ -323,6 +356,12 @@ public partial class ReCodeItForm : Form
PublicizeCheckbox.Checked = DataProvider.Settings.AppSettings.Publicize; PublicizeCheckbox.Checked = DataProvider.Settings.AppSettings.Publicize;
UnsealCheckbox.Checked = DataProvider.Settings.AppSettings.Unseal; UnsealCheckbox.Checked = DataProvider.Settings.AppSettings.Unseal;
AutoMapperExcludeBox.Items.Clear();
foreach (var method in DataProvider.Settings.AutoMapper.TypesToIgnore)
{
AutoMapperExcludeBox.Items.Add(method);
}
MaxMatchCountUpDown.Value = DataProvider.Settings.Remapper.MaxMatchCount; MaxMatchCountUpDown.Value = DataProvider.Settings.Remapper.MaxMatchCount;
AutoMapperRequiredMatchesUpDown.Value = DataProvider.Settings.AutoMapper.RequiredMatches; AutoMapperRequiredMatchesUpDown.Value = DataProvider.Settings.AutoMapper.RequiredMatches;
} }
@ -488,7 +527,7 @@ public partial class ReCodeItForm : Form
private void EditSelectedRemap(object? sender, TreeNodeMouseClickEventArgs e) private void EditSelectedRemap(object? sender, TreeNodeMouseClickEventArgs e)
{ {
if (e?.Node.Level != 0) if (e?.Node.Level != 0 || RemapTreeView?.SelectedNode?.Index < 0 || RemapTreeView?.SelectedNode?.Index == null)
{ {
return; return;
} }

View File

@ -117,16 +117,4 @@
<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="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="colorDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>367, 17</value>
</metadata>
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>536, 17</value>
</metadata>
<metadata name="fileSystemWatcher1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>767, 17</value>
</metadata>
</root> </root>

View File

@ -9,7 +9,7 @@
</PropertyGroup> </PropertyGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent"> <Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="xcopy &quot;$(SolutionDir)Templates&quot; &quot;$(TargetDir)Data&quot; /E /I /Y" /> <Exec Command="xcopy &quot;$(SolutionDir)Templates&quot; &quot;$(TargetDir)Data&quot; /E /I /Y /D" />
</Target> </Target>
<ItemGroup> <ItemGroup>

View File

@ -0,0 +1,142 @@
using Mono.Cecil;
using ReCodeIt.Utils;
using ReCodeItLib.Utils;
namespace ReCodeItLib.AutoMapper;
public class ReCodeItAutoMapper
{
private List<MappingPair> MappingPairs { get; set; } = [];
private List<string> IgnoreNames => DataProvider.Settings.AutoMapper.TypesToIgnore;
private static readonly List<string> SystemTypeIgnoreList = new()
{
"Boolean",
"List",
"Dictionary",
"Byte",
"Int16",
"Int36",
"Func",
"Action"
};
private List<string> TokensToMatch = new()
{
"Class",
"GClass"
};
public void InitializeAutoMapping()
{
Logger.ClearLog();
Logger.Log($"Starting Auto Mapping...");
// Clear any previous pairs
MappingPairs = [];
foreach (var type in DataProvider.ModuleDefinition.Types)
{
MappingPairs.AddRange(FilterFieldNames(type));
MappingPairs.AddRange(FilterPropertyNames(type));
}
FilterTypeNames();
}
/// <summary>
/// Pair field declaring types with their names
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
private List<MappingPair> FilterFieldNames(TypeDefinition type)
{
var fieldsWithTypes = new List<MappingPair>();
// Handle nested types recursively
foreach (var nestedType in type.NestedTypes)
{
fieldsWithTypes.AddRange(FilterFieldNames(nestedType));
}
var fields = type.Fields
// we dont want names shorter than 4
.Where(f => f.FieldType.Name.Length > 3)
// Skip value types
.Where(f => !f.FieldType.IsValueType)
// We dont want fields in the system type ignore list
.Where(f => !IgnoreNames.Contains(f.FieldType.Name.TrimAfterSpecialChar()));
// Include fields from the current type
foreach (var field in fields)
{
//Logger.Log($"Collecting Field: Type: {field.FieldType.Name.TrimAfterSpecialChar()} Field Name: {field.Name}");
fieldsWithTypes.Add(new MappingPair(field.FieldType, field.Name));
}
return fieldsWithTypes;
}
/// <summary>
/// Pair field declaring types with their names
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
private List<MappingPair> FilterPropertyNames(TypeDefinition type)
{
var propertiesWithTypes = new List<MappingPair>();
// Handle nested types recursively
foreach (var nestedType in type.NestedTypes)
{
propertiesWithTypes.AddRange(FilterPropertyNames(nestedType));
}
var properties = type.Properties
// we dont want names shorter than 4
.Where(p => p.PropertyType.Name.Length > 3)
// Skip value types
.Where(p => !p.PropertyType.IsValueType)
// We dont want fields in the global ignore list
.Where(p => !IgnoreNames.Contains(p.PropertyType.Name.TrimAfterSpecialChar()));
// Include fields from the current type
foreach (var property in properties)
{
//Logger.Log($"Collecting Property: Type: {property.PropertyType.Name.TrimAfterSpecialChar()} Field Name: {property.Name}");
propertiesWithTypes.Add(new MappingPair(property.PropertyType, property.Name));
}
return propertiesWithTypes;
}
private void FilterTypeNames()
{
// Filter types to the ones we're looking for
var mappingPairs = MappingPairs
.Where(pair => TokensToMatch.Any(token => pair.Type.Name.StartsWith(token)))
// Filter out anything that has the same name as the type
.Where(pair => !TokensToMatch.Any(token => pair.Name.ToLower().StartsWith(token.ToLower())));
foreach (var pair in mappingPairs)
{
Logger.Log($"Type: {pair.Type.Name} identifier: {pair.Name}");
}
Logger.Log($"Match Count {mappingPairs.Count()}");
}
private sealed class MappingPair(TypeReference type, string name)
{
public TypeReference Type { get; set; } = type;
public string Name { get; set; } = name;
}
}

View File

@ -0,0 +1,5 @@
namespace ReCodeItLib.DeMangler;
internal class ReCodeItDeMangler
{
}

View File

@ -13,25 +13,29 @@ public class Settings
public class AppSettings public class AppSettings
{ {
public bool Debug { get; set; } = false; public bool Debug { get; set; }
public bool SilentMode { get; set; } = true; public bool SilentMode { get; set; }
public string AssemblyPath { get; set; } = string.Empty; public string AssemblyPath { get; set; }
public string OutputPath { get; set; } = string.Empty; public string OutputPath { get; set; }
public string MappingPath { get; set; } = string.Empty; public string MappingPath { get; set; }
public bool RenameFields { get; set; } = true; public bool RenameFields { get; set; }
public bool RenameProperties { get; set; } = true; public bool RenameProperties { get; set; }
public bool Publicize { get; set; } = false; public bool Publicize { get; set; }
public bool Unseal { get; set; } = false; public bool Unseal { get; set; }
} }
public class RemapperSettings public class RemapperSettings
{ {
public int MaxMatchCount { get; set; } = 5; public int MaxMatchCount { get; set; }
} }
public class AutoMapperSettings public class AutoMapperSettings
{ {
public int RequiredMatches { get; set; } = 5; public int RequiredMatches { get; set; }
public List<string> NamesToIgnore { get; set; } = []; public int MinLengthToMatch { get; set; }
public List<string> TypesToIgnore { get; set; }
public List<string> TokensToMatch { get; set; }
} }

View File

@ -14,6 +14,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="AutoMapper\" /> <Folder Include="CrossMapper\" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,6 +1,6 @@
using ReCodeIt.Models; using Mono.Cecil;
using Mono.Cecil;
using Newtonsoft.Json; using Newtonsoft.Json;
using ReCodeIt.Models;
namespace ReCodeIt.Utils; namespace ReCodeIt.Utils;
@ -50,7 +50,12 @@ public static class DataProvider
throw new FileNotFoundException($"path `{settingsPath}` does not exist..."); throw new FileNotFoundException($"path `{settingsPath}` does not exist...");
} }
var jsonText = JsonConvert.SerializeObject(Settings); JsonSerializerSettings settings = new()
{
Formatting = Formatting.Indented
};
var jsonText = JsonConvert.SerializeObject(Settings, settings);
File.WriteAllText(settingsPath, jsonText); File.WriteAllText(settingsPath, jsonText);
} }

View File

@ -0,0 +1,41 @@
using System.Text;
namespace ReCodeItLib.Utils;
internal static class StringExtentions
{
/// <summary>
/// Returns a string trimmed after any non letter character
/// </summary>
/// <param name="str"></param>
/// <returns>Trimmed string if special character found, or the original string</returns>
public static string TrimAfterSpecialChar(this string str)
{
var sb = new StringBuilder();
var trimChars = new char[] { '`', '[', ']' };
foreach (char c in str)
{
if (trimChars.Contains(c))
{
}
if (char.IsLetter(c) || char.IsDigit(c))
{
sb.Append(c);
}
else
{
return sb.ToString();
}
}
if (sb.Length > 0)
{
return sb.ToString();
}
return str;
}
}

View File

@ -15,7 +15,27 @@
}, },
"AutoMapper": { "AutoMapper": {
"RequiredMatches": 5, // Minimum number of times a member must have this name in the assembly before considering it for remapping "RequiredMatches": 5, // Minimum number of times a member must have this name in the assembly before considering it for remapping
"NamesToIgnore": [ // Any member name you want to ignore while iterating through the assembly "MinLengthToMatch": 6, // Minimum length of the field/property name in code before it will be considered for a rename
"TypesToIgnore": [ // Any member name you want to ignore while iterating through the assembly
"Boolean",
"List",
"Dictionary",
"Byte",
"Int16",
"Int32",
"Func",
"Action",
"Object",
"String",
"Vector2",
"Vector3",
"Vector4",
"Stream",
"HashSet",
"Double",
"IEnumerator"
],
"TokensToMatch": [ // The auto mapper will look for these tokens in class names and prioritize those
] ]
} }