Ejemplo n.º 1
0
        private async void StartBtnNative_Click(object sender, RoutedEventArgs e)
        {
            if (planningInProgress)
            {
                MessageBox.Show(AppResources.PlanningInProgress);
                return;
            }
            if (!App.OfflinePlanningEnabled)
            {
                bool hasConnection = await CheckConnectionProcess.RunAsync();

                if (!hasConnection)
                {
                    MessageBox.Show(AppResources.PlanningNoAccess);
                    return;
                }
            }
            planningInProgress = true;
            await planning();

            planningInProgress = false;
        }
Ejemplo n.º 2
0
        public async Task PlanAsync(StopGroup sourceStop, StopGroup targetStop, DateTime pickedDateTime, PlanningTimeType planningType)
        {
            if (planningInProgress)
            {
                Services.MessageBox.Show(Services.Resources.LocalizedStringOf("PlanningInProgress"));
                return;
            }
            if (!CommonComponent.Current.OfflinePlanningEnabled)
            {
                bool hasConnection = await CheckConnectionProcess.RunAsync();

                if (!hasConnection)
                {
                    Services.MessageBox.Show(Services.Resources.LocalizedStringOf("PlanningNoAccess"));
                    return;
                }
            }
            planningInProgress = true;
            await planAsync(sourceStop, targetStop, pickedDateTime, planningType);

            planningInProgress = false;
        }
Ejemplo n.º 3
0
        private async void StartBtnNative_Click(object sender, RoutedEventArgs e)
        {
            if (planningInProgress)
            {
                new MessageDialog(App.Common.Services.Resources.LocalizedStringOf("PlanningInProgress")).ShowAsync();
                return;
            }
            if (!App.Common.OfflinePlanningEnabled)
            {
                bool hasConnection = await CheckConnectionProcess.RunAsync();

                if (!hasConnection)
                {
                    new MessageDialog(App.Common.Services.Resources.LocalizedStringOf("PlanningNoAccess")).ShowAsync();
                    return;
                }
            }
            planningInProgress = true;
            await planning();

            planningInProgress = false;
        }