Exemplo n.º 1
0
        private async Task apriWebPage(EnumAmbiente ambiente, EnumWebPage webPage)
        {
            try
            {
                if (_isTapped)
                {
                    return;
                }

                _isTapped = true;

                if (needLandscape(webPage))
                {
                    DependencyService.Get <IOrientation>().ReverseLandscape();
                }
                else
                {
                    DependencyService.Get <IOrientation>().Portrait();
                }

                await Application.Current.MainPage.Navigation.PushModalAsync(new WebViewPage(getUrl(ambiente, webPage)));

                _isTapped = false;
            }
            catch (Exception ex)
            {
                _isTapped = false;

                await Application.Current.MainPage.DisplayAlert(AppResources.Attenzione, ex.Message, AppResources.Ok);
            }
        }
Exemplo n.º 2
0
 private string getUrl(EnumAmbiente ambiente, EnumWebPage webPage)
 {
     switch (webPage)
     {
     default:
         return("http://www.google.com");
     }
 }
Exemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        public Startup(IConfiguration configuration)
        {
            Configuration = configuration;

            UseAzureAD          = Configuration.GetValue <bool>("UseAzureAD");
            UseSwagger          = Configuration.GetValue <bool>("UseSwagger");
            UseInMemoryDataBase = Configuration.GetValue <bool>("UseInMemoryDataBase");
            UseGenerateData     = Configuration.GetValue <bool>("UseGenerateData");
            UseAuthorize        = Configuration.GetValue <bool>("UseAuthorize");
            _ambiente           = Configuration.GetValue <EnumAmbiente>("Ambiente");
        }
Exemplo n.º 4
0
        public MenuViewModel(EnumAmbiente ambiente)
        {
            Titolo = getTitolo(ambiente);

            TestCommand = new Command(async() => {
                await apriWebPage(ambiente, EnumWebPage.Test);
            });

            OnAppearingCommand = new Command(() => {
                DependencyService.Get <IOrientation>().Unspecified();
            });
        }
Exemplo n.º 5
0
        private string getTitolo(EnumAmbiente ambiente)
        {
            switch (ambiente)
            {
            case EnumAmbiente.PreProd:
                return(AppResources.PreProduzione);

            case EnumAmbiente.Prod:
                return(AppResources.Produzione);

            case EnumAmbiente.Soluzione1:
                return(AppResources.Soluzione1);

            default:
                return(AppResources.AmbienteNonDefinito);
            }
        }
Exemplo n.º 6
0
 public TIdentificacaoRps(EnumAmbiente ambiente)
 {
     FAmbiente = ambiente;
 }