Skip to content

Commit

Permalink
fix: the conditions to change startEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ONLOX committed Mar 31, 2024
1 parent c10c617 commit a18d4d4
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions installer/ViewModel/LaunchViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public string? IP
ipChanged = false;
else
ipChanged = true;
startEnabled = !ipChanged
StartEnabled = !ipChanged
&& !portChanged
&& !teamIDChanged
&& !playerIDChanged
Expand Down Expand Up @@ -134,7 +134,7 @@ public string? TeamID
teamIDChanged = false;
else
teamIDChanged = true;
startEnabled = !ipChanged
StartEnabled = !ipChanged
&& !portChanged
&& !teamIDChanged
&& !playerIDChanged
Expand All @@ -155,7 +155,7 @@ public string? PlayerID
playerIDChanged = false;
else
playerIDChanged = true;
startEnabled = !ipChanged
StartEnabled = !ipChanged
&& !portChanged
&& !teamIDChanged
&& !playerIDChanged
Expand All @@ -176,7 +176,7 @@ public string? SweeperType
sweeperTypeChanged = false;
else
sweeperTypeChanged = true;
startEnabled = !ipChanged
StartEnabled = !ipChanged
&& !portChanged
&& !teamIDChanged
&& !playerIDChanged
Expand All @@ -197,7 +197,7 @@ public string? PlaybackFile
playbackFileChanged = false;
else
playbackFileChanged = true;
startEnabled = !ipChanged
StartEnabled = !ipChanged
&& !portChanged
&& !teamIDChanged
&& !playerIDChanged
Expand All @@ -218,7 +218,7 @@ public string? PlaybackSpeed
playbackSpeedChanged = false;
else
playbackSpeedChanged = true;
startEnabled = !ipChanged
StartEnabled = !ipChanged
&& !portChanged
&& !teamIDChanged
&& !playerIDChanged
Expand All @@ -243,6 +243,16 @@ public bool CppSelect
else
languageChanged = false;
}
if (!cppSelect && !PySelect)
languageChanged = true;
StartEnabled = !ipChanged
&& !portChanged
&& !teamIDChanged
&& !playerIDChanged
&& !sweeperTypeChanged
&& !playbackFileChanged
&& !playbackSpeedChanged
&& !languageChanged;
OnPropertyChanged();
}
}
Expand All @@ -260,6 +270,16 @@ public bool PySelect
else
languageChanged = false;
}
if (!cppSelect && !PySelect)
languageChanged = true;
StartEnabled = !ipChanged
&& !portChanged
&& !teamIDChanged
&& !playerIDChanged
&& !sweeperTypeChanged
&& !playbackFileChanged
&& !playbackSpeedChanged
&& !languageChanged;
OnPropertyChanged();
}
}
Expand Down

0 comments on commit a18d4d4

Please sign in to comment.