clean up code

This commit is contained in:
Mikhail
2024-07-05 14:08:05 -04:00
parent 5036097c9d
commit d08c293cd4
31 changed files with 105 additions and 337 deletions

View File

@@ -15,6 +15,12 @@ public partial class MainView : UserControl
private void Save_Click(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
{
if (string.IsNullOrEmpty(txtGamePath.Text) || string.IsNullOrEmpty(txtLauncherPath.Text))
{
ShowWarningMsg("Game path / launcher path is empty", "Error");
return;
}
try
{
ServerSwitcher.SaveCfg(CmbServerSelection.SelectedIndex == 0, txtGamePath.Text, txtLauncherPath.Text);