コード例 #1
0
        private void TakeAircraftButton_OnClick(object sender, RoutedEventArgs e)
        {
            var id = AircraftIdInput.Text;

            if (string.IsNullOrEmpty(id) || station.CheckOnAircraftOnStation(id) || !station.CheckFreeSlots(out _))
            {
                return;
            }
            var isTakeSuccess = station.TryTakeAircraft(id);

            AppendConsoleNewLine(isTakeSuccess
                                ? $"Принят самолёт {id}"
                                : $"Не удалось принять самолёт {id}!!!");
        }