diff --git a/CRSim/Views/Windows/Dialogs/StationStopDialog.xaml b/CRSim/Views/Windows/Dialogs/StationStopDialog.xaml index 3804e4f..845f925 100644 --- a/CRSim/Views/Windows/Dialogs/StationStopDialog.xaml +++ b/CRSim/Views/Windows/Dialogs/StationStopDialog.xaml @@ -7,7 +7,7 @@ mc:Ignorable="d" Title="StationStopDialog" WindowStyle="None" FontFamily="Microsoft YaHei" - SizeToContent="WidthAndHeight" + MaxWidth="562" MinWidth="562" MaxHeight="551.77" MinHeight="551.77" WindowStartupLocation="CenterOwner"> diff --git a/CRSim/Views/Windows/Dialogs/StationStopDialog.xaml.cs b/CRSim/Views/Windows/Dialogs/StationStopDialog.xaml.cs index 337e7f8..4278e69 100644 --- a/CRSim/Views/Windows/Dialogs/StationStopDialog.xaml.cs +++ b/CRSim/Views/Windows/Dialogs/StationStopDialog.xaml.cs @@ -191,13 +191,13 @@ namespace CRSim.Views (!EndHour.IsEnabled || ValidateTime(EndHour.Text, 24)) && (!EndMinute.IsEnabled || ValidateTime(EndMinute.Text, 60)); - // 当所有条件满足时,启用 AccentButton AccentButton.IsEnabled = + (!TicketChecksCheckList.IsEnabled || TicketChecksList.Any(x => x.Checked)) && areTextBoxesFilled && !string.IsNullOrWhiteSpace(NumberTextBox.Text) && !string.IsNullOrWhiteSpace(ArrivalTextBox.Text) && !string.IsNullOrWhiteSpace(DepartureTextBox.Text) && - int.TryParse(LengthTextBox.Text,out int i) && i > 0 && + int.TryParse(LengthTextBox.Text, out int i) && i > 0 && PlatformComboBox.SelectedItem != null; }