示例#1
0
        /**private bool OnFristTimer()
         * {
         *  Log.Info(TAG, "\n\n\n\nSe realizo el primer intento por " + time1 / 1000 + " segundos\n\n\n\n");
         *
         *  return true;
         * }*/

        public void DescargarValoresNecesarios()
        {
            if (UConnection.conectadoWifi() == true)
            {
                /**if (UConnection.conextadoRedInterna() == true)
                 * {*/
                if (user.Nombre != String.Empty && user.Perfil == PERFIL_DESARROLLADOR)
                {
                    downloadUsers();
                    downloadVehicles();
                    downloadCheckLists();
                }
                else if (user.Nombre != String.Empty && (user.Perfil == PERFIL_SUPERVISOR || user.Perfil == PERFIL_RESPONSABLE))
                {
                    downloadUsers();
                    downloadVehicles();
                    downloadCheckLists();
                }
                else if (user.Nombre != String.Empty && user.Perfil == PERFIL_VIGILANTE)
                {
                    bandera1  = true;
                    descarga1 = true;
                    bandera2  = true;
                    descarga2 = true;
                    downloadCheckLists();
                    downloadVehicles();
                }
                else if (user.Nombre != String.Empty && user.Perfil == PERFIL_CONDUCTOR)
                {
                    bandera1  = true;
                    descarga1 = true;
                    bandera3  = true;
                    descarga3 = true;
                    downloadVehicles();
                }
                else
                {
                    DeleteUserPreferences();
                }

                /**}
                 * else
                 * {
                 *  Log.Info(TAG, "No está conectado a " + UServices.Wifi_Name);
                 *  DataConfirmationDialog frag = DataConfirmationDialog
                 *  .NewInstance("No estas conectado a '"+ UServices.Wifi_Name +"' ¿Deseas continuar?", "Continuar", "Finalizar", this);
                 *  frag.Show(FragmentManager, "TAG: continuar fuera de la red '" + UServices.Wifi_Name + "'");
                 * }*/
            }
            else
            {
                Log.Info(TAG, "No hay conexión Wifi");
                DataConfirmationDialog frag = DataConfirmationDialog
                                              .NewInstance(CODE_DIALOG_REFRESH, "No hay conexión Wifi ¿Deseas continuar sin conexión?", "Continuar", "Finalizar", this);
                frag.Show(FragmentManager, "TAG: continuar sin Wifi");
            }
        }
示例#2
0
        public void showDialog(string message, string okText, string cancelText)
        {
            DataConfirmationDialog frag = DataConfirmationDialog.NewInstance(CODE_DIALOG_SET, message, okText, cancelText, this);

            frag.Show(FragmentManager, message);
        }
示例#3
0
        public void showDialog(int requestCode, string message, string okText, string cancelText)
        {
            DataConfirmationDialog frag = DataConfirmationDialog.NewInstance(requestCode, message, okText, cancelText, this);

            frag.Show(FragmentManager, message);
        }