More validation

This commit is contained in:
Cj 2024-06-19 06:49:21 -04:00
parent 13212c7c78
commit 7691c65c9f
3 changed files with 14 additions and 4 deletions

View File

@ -1103,7 +1103,6 @@ partial class ReCodeItForm
AutoMapperTab.Size = new Size(1336, 953);
AutoMapperTab.TabIndex = 3;
AutoMapperTab.Text = "Auto Mapper";
AutoMapperTab.Click += AutoMapperTab_Click;
//
// AutoMapperUnseal
//
@ -1610,7 +1609,6 @@ partial class ReCodeItForm
SettingsTab.Size = new Size(1336, 953);
SettingsTab.TabIndex = 2;
SettingsTab.Text = "Settings";
SettingsTab.Click += SettingsTab_Click;
//
// groupBox2
//

View File

@ -826,11 +826,23 @@ public partial class ReCodeItForm : Form
private void CrossPatchRemapButton_Click(object sender, EventArgs e)
{
if (CrossCompiler.ActiveProject.RemapModels.Count == 0)
{
MessageBox.Show("You cannot generate a remapped dll without creating remaps first");
return;
}
CrossCompiler.StartRemap();
}
private void CrossPatchRunButton_Click(object sender, EventArgs e)
{
if (CrossCompiler.ActiveProject.RemapModels.Count == 0)
{
MessageBox.Show("You cannot compile without having created remaps first");
return;
}
CrossCompiler.StartCrossCompile();
}

View File

@ -60,7 +60,7 @@ public static class ProjectManager
private static void CopyVisualStudioProject(CrossCompilerProjectModel proj)
{
var solutionDirPath = proj.VisualStudioSolutionPath;
var solutionDirPath = proj.VisualStudioSolutionDirectoryPath;
var solutionFiles = Directory.GetFiles(solutionDirPath, "*.sln", SearchOption.AllDirectories);
var solutionFile = string.Empty;
@ -129,7 +129,7 @@ public static class ProjectManager
public static void SaveCrossCompilerProjectModel(CrossCompilerProjectModel model)
{
var path = Path.Combine(model.VisualStudioSolutionPath, "ReCodeItProj.json");
var path = Path.Combine(model.VisualStudioSolutionDirectoryPath, "ReCodeItProj.json");
JsonSerializerSettings settings = new()
{