Finish basic settings
This commit is contained in:
parent
d0674235ff
commit
6a18961c94
@ -13,9 +13,9 @@ public class Remapper
|
|||||||
|
|
||||||
public delegate void OnCompleteHandler(object sender, EventArgs e);
|
public delegate void OnCompleteHandler(object sender, EventArgs e);
|
||||||
|
|
||||||
public event OnCompleteHandler OnComplete;
|
public event OnCompleteHandler? OnComplete;
|
||||||
|
|
||||||
private static Stopwatch Stopwatch = new();
|
private static readonly Stopwatch Stopwatch = new();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Start the remapping process
|
/// Start the remapping process
|
||||||
|
@ -14,6 +14,7 @@ public partial class AssemblyToolGUI : Form
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
PopulateDomainUpDowns();
|
PopulateDomainUpDowns();
|
||||||
|
RefreshSettingsPage();
|
||||||
|
|
||||||
Remapper.OnComplete += ReloadTreeView;
|
Remapper.OnComplete += ReloadTreeView;
|
||||||
ReloadTreeView(this, EventArgs.Empty);
|
ReloadTreeView(this, EventArgs.Empty);
|
||||||
|
@ -2,8 +2,27 @@
|
|||||||
|
|
||||||
namespace AssemblyRemapperGUI;
|
namespace AssemblyRemapperGUI;
|
||||||
|
|
||||||
|
using static DataProvider;
|
||||||
|
|
||||||
public partial class AssemblyToolGUI
|
public partial class AssemblyToolGUI
|
||||||
{
|
{
|
||||||
|
private void RefreshSettingsPage()
|
||||||
|
{
|
||||||
|
AssemblyPathTextBox.Text = Settings.AppSettings.AssemblyPath;
|
||||||
|
OutputPathTextBox.Text = Settings.AppSettings.OutputPath;
|
||||||
|
MappingPathTextBox.Text = Settings.AppSettings.MappingPath;
|
||||||
|
|
||||||
|
DebugLoggingCheckbox.Checked = Settings.AppSettings.Debug;
|
||||||
|
SilentModeCheckbox.Checked = Settings.AppSettings.SilentMode;
|
||||||
|
RenameFieldsCheckbox.Checked = Settings.AppSettings.RenameFields;
|
||||||
|
RenamePropertiesCheckbox.Checked = Settings.AppSettings.RenameProperties;
|
||||||
|
PublicizeCheckbox.Checked = Settings.AppSettings.Publicize;
|
||||||
|
UnsealCheckbox.Checked = Settings.AppSettings.Unseal;
|
||||||
|
|
||||||
|
MaxMatchCountUpDown.Value = Settings.Remapper.MaxMatchCount;
|
||||||
|
AutoMapperRequiredMatchesUpDown.Value = Settings.AutoMapper.RequiredMatches;
|
||||||
|
}
|
||||||
|
|
||||||
#region SETTINGS_BUTTONS
|
#region SETTINGS_BUTTONS
|
||||||
|
|
||||||
private void PickAssemblyPathButton_Click(object sender, EventArgs e)
|
private void PickAssemblyPathButton_Click(object sender, EventArgs e)
|
||||||
@ -17,8 +36,8 @@ public partial class AssemblyToolGUI
|
|||||||
|
|
||||||
if (fDialog.ShowDialog() == DialogResult.OK)
|
if (fDialog.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
DataProvider.Settings.AppSettings.AssemblyPath = fDialog.FileName;
|
Settings.AppSettings.AssemblyPath = fDialog.FileName;
|
||||||
DataProvider.LoadAssemblyDefinition();
|
LoadAssemblyDefinition();
|
||||||
AssemblyPathTextBox.Text = fDialog.FileName;
|
AssemblyPathTextBox.Text = fDialog.FileName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -32,7 +51,7 @@ public partial class AssemblyToolGUI
|
|||||||
|
|
||||||
if (fDialog.ShowDialog() == DialogResult.OK)
|
if (fDialog.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
DataProvider.Settings.AppSettings.OutputPath = fDialog.SelectedPath;
|
Settings.AppSettings.OutputPath = fDialog.SelectedPath;
|
||||||
OutputPathTextBox.Text = fDialog.SelectedPath;
|
OutputPathTextBox.Text = fDialog.SelectedPath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -48,7 +67,7 @@ public partial class AssemblyToolGUI
|
|||||||
|
|
||||||
if (fDialog.ShowDialog() == DialogResult.OK)
|
if (fDialog.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
DataProvider.LoadMappingFile(fDialog.FileName);
|
LoadMappingFile(fDialog.FileName);
|
||||||
MappingPathTextBox.Text = fDialog.FileName;
|
MappingPathTextBox.Text = fDialog.FileName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -59,38 +78,38 @@ public partial class AssemblyToolGUI
|
|||||||
|
|
||||||
private void DebugLoggingCheckbox_CheckedChanged(object sender, EventArgs e)
|
private void DebugLoggingCheckbox_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
DataProvider.Settings.AppSettings.Debug = DebugLoggingCheckbox.Checked;
|
Settings.AppSettings.Debug = DebugLoggingCheckbox.Checked;
|
||||||
DataProvider.SaveAppSettings();
|
SaveAppSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SilentModeCheckbox_CheckedChanged(object sender, EventArgs e)
|
private void SilentModeCheckbox_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
DataProvider.Settings.AppSettings.SilentMode = SilentModeCheckbox.Checked;
|
Settings.AppSettings.SilentMode = SilentModeCheckbox.Checked;
|
||||||
DataProvider.SaveAppSettings();
|
SaveAppSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RenameFieldsCheckbox_CheckedChanged(object sender, EventArgs e)
|
private void RenameFieldsCheckbox_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
DataProvider.Settings.AppSettings.RenameFields = RenameFieldsCheckbox.Checked;
|
Settings.AppSettings.RenameFields = RenameFieldsCheckbox.Checked;
|
||||||
DataProvider.SaveAppSettings();
|
SaveAppSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RenamePropertiesCheckbox_CheckedChanged(object sender, EventArgs e)
|
private void RenamePropertiesCheckbox_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
DataProvider.Settings.AppSettings.RenameProperties = RenamePropertiesCheckbox.Checked;
|
Settings.AppSettings.RenameProperties = RenamePropertiesCheckbox.Checked;
|
||||||
DataProvider.SaveAppSettings();
|
SaveAppSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PublicizeCheckbox_CheckedChanged(object sender, EventArgs e)
|
private void PublicizeCheckbox_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
DataProvider.Settings.AppSettings.Publicize = PublicizeCheckbox.Checked;
|
Settings.AppSettings.Publicize = PublicizeCheckbox.Checked;
|
||||||
DataProvider.SaveAppSettings();
|
SaveAppSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UnsealCheckbox_CheckedChanged(object sender, EventArgs e)
|
private void UnsealCheckbox_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
DataProvider.Settings.AppSettings.Unseal = UnsealCheckbox.Checked;
|
Settings.AppSettings.Unseal = UnsealCheckbox.Checked;
|
||||||
DataProvider.SaveAppSettings();
|
SaveAppSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion CHECKBOXES
|
#endregion CHECKBOXES
|
||||||
@ -99,14 +118,14 @@ public partial class AssemblyToolGUI
|
|||||||
|
|
||||||
private void MaxMatchCountUpDown_ValueChanged(object sender, EventArgs e)
|
private void MaxMatchCountUpDown_ValueChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
DataProvider.Settings.Remapper.MaxMatchCount = (int)MaxMatchCountUpDown.Value;
|
Settings.Remapper.MaxMatchCount = (int)MaxMatchCountUpDown.Value;
|
||||||
DataProvider.SaveAppSettings();
|
SaveAppSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AutoMapperRequiredMatchesUpDown_ValueChanged(object sender, EventArgs e)
|
private void AutoMapperRequiredMatchesUpDown_ValueChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
DataProvider.Settings.AutoMapper.RequiredMatches = (int)AutoMapperRequiredMatchesUpDown.Value;
|
Settings.AutoMapper.RequiredMatches = (int)AutoMapperRequiredMatchesUpDown.Value;
|
||||||
DataProvider.SaveAppSettings();
|
SaveAppSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion UPDOWNS
|
#endregion UPDOWNS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user