예제 #1
0
        private void ExecuteSaveCommand()
        {
            BoatModel model = new BoatModel
            {
                Id               = Id,
                CrewNeeded       = CrewNeeded,
                RowersNeeded     = RowersNeeded,
                CrewedSailors    = CrewedSailors,
                CrewedSeamens    = CrewedSeamens,
                CrewedMariners   = CrewedMariners,
                CrewedRowers     = CrewedRowers,
                AmountOfficers   = AmountOfficers,
                AmountNavigators = AmountNavigators,
                AmountGuards     = AmountGuards,
                Seaworthiness    = Seaworthiness,
                Defense          = Defense,
                CostSilver       = CostSilver
            };

            CrewBoatUIEventArgs newEventArgs =
                new CrewBoatUIEventArgs(
                    CrewBoatUIRoutedEvent,
                    Id,
                    "Save",
                    model
                    );

            RaiseEvent(newEventArgs);
        }
예제 #2
0
        private void ExecuteCancelCommand()
        {
            CrewBoatUIEventArgs newEventArgs =
                new CrewBoatUIEventArgs(
                    CrewBoatUIRoutedEvent,
                    Id,
                    "Cancel"
                    );

            RaiseEvent(newEventArgs);
        }