private void ChangeToCustomDateMode()
        {
            SelectedTimeImageOption = "/Images/64/W/IconDate.png";
            UnSelectedTimeImageOption = "/Images/64/W/IconTimeInterval.png";

            if (isDeparting)
                DepartureTime = string.Format(AppResources.WhereToDepartingAtText, DateTime.Now.ToString("g"));
            else
                DepartureTime = string.Format(AppResources.WhereToArrivingAtText, DateTime.Now.ToString("g"));

            departureTimeCustom = DateTime.Now;
            selectedPredefinedDepartureTime = null;
        }
        private void SetDepartureTime(DepartureTimeMessage departureTimeMessage)
        {
            switch (departureTimeMessage.Reason)
            {
                case Messages.Enums.DepartureTimeMessageReason.DateTime:
                    ChangeToCustomDateMode();

                    selectedPredefinedDepartureTime = null;

                    if (departureTimeMessage.IsDeparting)
                        DepartureTime = string.Format(AppResources.WhereToDepartingAtText, departureTimeMessage.DateTime.ToString());
                    else
                        DepartureTime = string.Format(AppResources.WhereToArrivingAtText, departureTimeMessage.DateTime.ToString());

                    departureTimeCustom = departureTimeMessage.DateTime;
                    isDeparting = departureTimeMessage.IsDeparting;

                    break;

                case Messages.Enums.DepartureTimeMessageReason.PreDefined:
                    ChangeToIntervalMode();

                    selectedPredefinedDepartureTime = departureTimeMessage.PredefinedDepartureTime;
                    isDeparting = departureTimeMessage.IsDeparting;

                    if (departureTimeMessage.IsDeparting)
                    {
                        if (departureTimeMessage.PredefinedDepartureTime.DepartureTimeInMinutes == 0)
                            DepartureTime = string.Format(AppResources.WhereToDepartingText, departureTimeMessage.PredefinedDepartureTime.DepartureTime);
                        else
                            DepartureTime = string.Format(AppResources.WhereToDepartingInText, departureTimeMessage.PredefinedDepartureTime.DepartureTime);
                    }
                    else
                    {
                        if (departureTimeMessage.PredefinedDepartureTime.DepartureTimeInMinutes == 0)
                            DepartureTime = string.Format(AppResources.WhereToArrivingText, departureTimeMessage.PredefinedDepartureTime.DepartureTime);
                        else
                            DepartureTime = string.Format(AppResources.WhereToArrivingInText, departureTimeMessage.PredefinedDepartureTime.DepartureTime);
                    }

                    departureTimeCustom = null;

                    break;
            }
            CheckDrumbleStatus();
        }
        private void ChangeToIntervalMode()
        {
            SelectedTimeImageOption = "/Images/64/W/IconTimeInterval.png";
            UnSelectedTimeImageOption = "/Images/64/W/IconDate.png";

            if (isDeparting)
                DepartureTime = string.Format(AppResources.WhereToDepartingText, AppResources.PredefinedDepartureTimeNow);
            else
                DepartureTime = string.Format(AppResources.WhereToArrivingText, AppResources.PredefinedDepartureTimeNow);

            selectedPredefinedDepartureTime = PredefinedDepartureTime.FromNow();
            departureTimeCustom = null;
        }