Exemple #1
0
        void ExecuteTripCommandMethod()
        {
            //do not execute not fully created trips
            if (!Trip.IsCreated)
            {
                return;
            }

            //another trip in execution
            if (IoC.ExecuteTripViewModel.IsExecuting && IoC.ExecuteTripViewModel.Trip != Trip)
            {
                return;
            }

            //trip date does not match current date
            if (Trip.Date.Date.CompareTo(DateTime.UtcNow.Date) != 0)
            {
                return;
            }

            //show trip execution frame; need to do this BEFORE trip gets set
            FrameHistory.OpenFrame(IoC.ExecuteTripViewModel);

            //not already executing a trip...
            if (!IoC.ExecuteTripViewModel.IsExecuting)
            {
                //set trip to be executed
                IoC.ExecuteTripViewModel.Trip = Trip;
            }
        }
Exemple #2
0
 void ViewTripCommandMethod()
 {
     IoC.ViewTripViewModel.Trip = Trip;
     FrameHistory.OpenFrame(IoC.ViewTripViewModel);
 }