Example #1
0
        private void configuracionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string  tabName    = "Configuracion";
            Boolean encontrado = false;

            foreach (TabPage page in Home.TabPages)
            {
                string name = page.Name;

                if (name == tabName)
                {
                    encontrado = true;
                    Home.SelectTab(tabName);
                }
            }
            if (encontrado == false)
            {
                TabPage tpage = new TabPage(tabName);
                tpage.Name = tabName;

                configuracion fc = new configuracion();
                fc.TopLevel        = false;
                fc.Visible         = true;
                fc.MdiParent       = this;
                fc.FormBorderStyle = FormBorderStyle.None;
                fc.Dock            = DockStyle.Fill;
                Home.TabPages.Add(tpage);
                int ultimo = (Home.TabPages.Count - 1);
                Home.TabPages[ultimo].Controls.Add(fc);
                Home.SelectTab(tabName);
            }
        }
        //private void GoBack_OnClick(object sender, RoutedEventArgs e)
        //{
        //    if (Navegacion.Frame.CanGoBack == false)
        //        Navegacion.NavegarAtras();
        //    else
        //        Navegacion.Regresar_frame();
        //}

        private void HamburgerMenuControl_OnItemInvoked(object sender, HamburgerMenuItemInvokedEventArgs e)
        {
            var menuItem = e.InvokedItem as ElementoMenu;

            if (menuItem != null && menuItem.IsNavigation)
            {
                _ESTADO       = Entrada;
                nombreVentana = menuItem.Text;
                switch (nombreVentana)
                {
                case nombresVentanas.PatioContenedores:
                    if (contenedor == null)
                    {
                        contenedor = new Patio_Contenedor(Entrada, nombresPatioContenedor.IMPORTACION);
                    }
                    Navegacion.NavegarA(contenedor);
                    break;

                case nombresVentanas.PatioFerrocarriles:
                    if (ferrocarril == null)
                    {
                        ferrocarril = new Patio_Ferrocarril(Entrada, nombresPatioFerrocarril.IMPORTACION);
                    }
                    Navegacion.NavegarA(ferrocarril);
                    break;

                case nombresVentanas.BodegaC:
                    if (bodega == null)
                    {
                        bodega = new Bodega();
                    }
                    Navegacion.NavegarA(bodega);
                    break;

                case nombresVentanas.Principal:
                    if (principal == null)
                    {
                        principal = new Principal();
                    }
                    Navegacion.NavegarA(principal);
                    break;

                case nombresVentanas.BusquedayReportes:
                    if (busquedayreportes == null)
                    {
                        busquedayreportes = new Busquedayreportes();
                    }
                    Navegacion.NavegarA(busquedayreportes);
                    break;

                case nombresVentanas.Configuracion:
                    if (config == null)
                    {
                        config = new configuracion();
                    }
                    Navegacion.NavegarA(config);
                    break;
                }
            }
        }
Example #3
0
        AdView CreateNativeAdControl()
        {
            if (adView != null)
            {
                return(adView);
            }

            // This is a string in the Resources/values/strings.xml that I added or you can modify it here. This comes from admob and contains a / in it
            config = new configuracion();

            adUnitId = config.adUnitId;

            adView          = new AdView(Forms.Context);
            adView.AdSize   = adSize;
            adView.AdUnitId = adUnitId;

            var adParams = new LinearLayout.LayoutParams(LayoutParams.WrapContent, LayoutParams.WrapContent);

            adView.LayoutParameters = adParams;

            adView.LoadAd(new AdRequest
                          .Builder()
                          .Build());
            return(adView);
        }
Example #4
0
        private void uinvbarconfig_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            _dataSistema = MetodosForm.obtenerCopy(_dataSistema);
            _dataSistema.nombreVentana = "Config";
            _dataSistema.nombreOpcion  = "Configuracion";
            _dataSistema.modoInterfaz  = 1;
            configuracion c = new configuracion(_dataSistema);

            c.MdiParent = this;
            c.Show();
        }
Example #5
0
        public App()
        {
            InitializeComponent();

            config = new configuracion();

            //MainPage = new NavigationPage(new PaginaInicio());

            MainPage = new NavigationPage(new MenuTabbed());


            OneSignal.Current.StartInit(config.IdOneSignal).EndInit();
        }
Example #6
0
        protected override void OnCreate(Bundle bundle)
        {
            config = new configuracion();

            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);



            OneSignal.Current.StartInit(config.OneSignalAndroid).EndInit();

            LocalNotificationsImplementation.NotificationIconId = Resource.Drawable.logotipoGGnotification;
            MobileAds.Initialize(ApplicationContext, config.MobileAds);
            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());
        }
Example #7
0
    void verificar_file_json()
    {
        if (!File.Exists(Application.persistentDataPath + "/conf.json"))
        {
            var conf = new configuracion(new LocalIP().SetLocalIP(), 22122, true);


            JsonSerializer serializer = new JsonSerializer();
            serializer.Converters.Add(new JavaScriptDateTimeConverter());
            serializer.NullValueHandling = NullValueHandling.Ignore;

            using (StreamWriter sw = new StreamWriter(Application.persistentDataPath + "/conf.json"))
                using (JsonWriter writer = new JsonTextWriter(sw))
                {
                    serializer.Serialize(writer, conf);
                }

            read_file_json();
        }
        else
        {
            read_file_json();
        }
    }