Change GoDot to Godot (#37)

* Changing GoDot to Godot
This commit is contained in:
Pando
2022-09-06 00:35:01 +07:00
committed by GitHub
parent dfdea8a757
commit cbce433a5b
3 changed files with 24 additions and 24 deletions

View File

@@ -89,13 +89,13 @@ namespace GodotAddinVS.Commands {
var config = settingsManager.GetWritableSettingsStore(SettingsScope.UserSettings);
var ofd = new OpenFileDialog {
Filter = @"GoDot executable (.exe)|*.exe"
Filter = @"Godot executable (.exe)|*.exe"
};
var result = ofd.ShowDialog(null);
if (result != DialogResult.OK) return;
config.SetString("External Tools", "GoDotExecutable", ofd.FileName);
config.SetString("External Tools", "GoDotPath", Path.GetDirectoryName(ofd.FileName));
config.SetString("External Tools", "GodotExecutable", ofd.FileName);
config.SetString("External Tools", "GodotPath", Path.GetDirectoryName(ofd.FileName));
}
}
}

View File

@@ -87,8 +87,8 @@ namespace GodotAddinVS.Commands {
private void Execute(object sender, EventArgs e) {
ThreadHelper.ThrowIfNotOnUIThread();
string goDotPath;
string goDotExecutable;
string godotPath;
string godotExecutable;
var settingsManager = new ShellSettingsManager(package);
var config = settingsManager.GetWritableSettingsStore(SettingsScope.UserSettings);
@@ -97,36 +97,36 @@ namespace GodotAddinVS.Commands {
config.CreateCollection("External Tools");
}
if (!config.PropertyExists("External Tools", "GoDotExecutable")) {
if (!config.PropertyExists("External Tools", "GodotExecutable")) {
var ofd = new OpenFileDialog {
Filter = @"GoDot executable (.exe)|*.exe"
Filter = @"Godot executable (.exe)|*.exe"
};
var result = ofd.ShowDialog(null);
if (result == DialogResult.OK) {
goDotExecutable = ofd.FileName;
goDotPath = Path.GetDirectoryName(goDotExecutable);
godotExecutable = ofd.FileName;
godotPath = Path.GetDirectoryName(godotExecutable);
config.SetString("External Tools", "GoDotExecutable", goDotExecutable);
config.SetString("External Tools", "GoDotPath", goDotPath);
config.SetString("External Tools", "GodotExecutable", godotExecutable);
config.SetString("External Tools", "GodotPath", godotPath);
} else return;
} else {
goDotPath = config.GetString("External Tools", "GoDotPath");
goDotExecutable = config.GetString("External Tools", "GoDotExecutable");
godotPath = config.GetString("External Tools", "GodotPath");
godotExecutable = config.GetString("External Tools", "GodotExecutable");
}
if (string.IsNullOrEmpty(goDotExecutable)) {
MessageBox.Show("GoDot", "GoDot path not set");
if (string.IsNullOrEmpty(godotExecutable)) {
MessageBox.Show("Godot", "Godot path not set");
return;
}
if (!File.Exists(goDotExecutable)) {
MessageBox.Show("GoDot", @$"GoDot does not exist at {goDotExecutable}");
if (!File.Exists(godotExecutable)) {
MessageBox.Show("Godot", @$"Godot does not exist at {godotExecutable}");
return;
}
Process.Start(goDotExecutable);
Process.Start(godotExecutable);
}
}
}

View File

@@ -90,21 +90,21 @@
<Extern href="vsshlids.h" />
<Commands package="guidGodotPackage">
<Menus>
<Menu guid="guidGodotPackageCmdSet" id="GoDotExtMenu" priority="0x0100" type="Menu">
<Menu guid="guidGodotPackageCmdSet" id="GodotExtMenu" priority="0x0100" type="Menu">
<Parent guid="guidSHLMainMenu" id="IDG_VS_MM_TOOLSADDINS" />
<Strings>
<ButtonText>GoDot</ButtonText>
<ButtonText>Godot</ButtonText>
</Strings>
</Menu>
</Menus>
<Groups>
<Group guid="guidGodotPackageCmdSet" id="MyMenuGroup" priority="0x0600">
<Parent guid="guidGodotPackageCmdSet" id="GoDotExtMenu" />
<Parent guid="guidGodotPackageCmdSet" id="GodotExtMenu" />
</Group>
<Group guid="guidGodotPackageCmdSet1" id="MyMenuGroup" priority="0x0600">
<Parent guid="guidGodotPackageCmdSet" id="GoDotExtMenu" />
<Parent guid="guidGodotPackageCmdSet" id="GodotExtMenu" />
</Group>
</Groups>
@@ -114,7 +114,7 @@
<Button guid="guidGodotPackageCmdSet" id="cmdidCommandRunGodot" priority="0x0100" type="Button">
<Parent guid="guidGodotPackageCmdSet" id="MyMenuGroup" />
<Strings>
<ButtonText>Launch GoDot</ButtonText>
<ButtonText>Launch Godot</ButtonText>
</Strings>
</Button>
@@ -127,4 +127,4 @@
</Buttons>
</Commands>
</CommandTable>
</CommandTable>