コード例 #1
0
        /// <summary>
        /// Removes a penalty sets on a croissant.
        /// </summary>
        private void RemovePenalty()
        {
            if (SelectedLine != null && SelectedLine.SelectedCroissant != null)
            {
                SelectedLine.RemovePenalty(SelectedLine.SelectedCroissant.Date.Value);
            }
            else
            {
                InformationMessage = "Impossible de supprimer une pénalité inexistante.";
            }

            // Check the commands: they state can change due to the added penalty.
            CheckCommands();
        }