Ejemplo n.º 1
0
        private void ExecuteSaveCommand()
        {
            BoatModel boatModel = new BoatModel()
            {
                Length                 = Length,
                Amount                 = Amount,
                Width                  = BoatWidth,
                Depth                  = Depth,
                Crew                   = Crew,
                Rower                  = Rower,
                Cargo                  = Cargo,
                CostNowSilver          = CostNowSilver,
                CostWhenFinishedSilver = CostWhenFinishedSilver,
                CostNowBase            = CostNowBase,
                CostNowWood            = CostNowWood,
                BoatType               = BoatType,
                Seaworthiness          = Seaworthiness,
                BuildTimeInDays        = BuildTimeInDays,
                BuildTimeInDaysAll     = BuildTimeInDaysAll,
                NextFinishedDays       = BuildTimeInDays
            };

            BuildingBoatUIEventArgs newEventArgs =
                new BuildingBoatUIEventArgs(
                    BuildingBoatUIRoutedEvent,
                    "Save",
                    boatModel
                    );

            RaiseEvent(newEventArgs);

            ResetBoat();
        }
Ejemplo n.º 2
0
        private void ExecuteCancelCommand()
        {
            BuildingBoatUIEventArgs newEventArgs =
                new BuildingBoatUIEventArgs(
                    BuildingBoatUIRoutedEvent,
                    "Cancel"
                    );

            RaiseEvent(newEventArgs);

            ResetBoat();
        }