Esempio n. 1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.AfisareOrarView);

            string ZiuaSelect = Intent.GetStringExtra("Ziua") ?? "Data not available";

            var storage = SimpleStorage.EditGroup("DB");

            var ZiuaSe = storage.Get(ZiuaSelect);

            ObjectList = JsonConvert.DeserializeObject <List <Data2> >(ZiuaSe);

            var FirstObj = ObjectList.First();

            MatView = FindViewById <TextView>(Resource.Id.textView3);


            OraView = FindViewById <TextView>(Resource.Id.textView4);

            MatView.Text = FirstObj.Materie;

            OraView.Text = FirstObj.Ora;

            var button = FindViewById <Button>(Resource.Id.button5);

            button.Click += Button_Click;

            var button1 = FindViewById <Button>(Resource.Id.button6);

            button1.Click += Button1_Click;
        }
Esempio n. 2
0
        public ResponseModel RetriveLocalData()
        {
            ResponseModel um = new ResponseModel();

            try
            {
                var storage = SimpleStorage.EditGroup(Key);
                um.UserID   = storage.Get("UserID", null);
                um.UserName = storage.Get("UserName", null);
                um.EMAIL    = storage.Get("EmailID", null);
                um.LOCATION = storage.Get("Location", null);
                um.MESSAGE  = storage.Get("Message", null);
                um.PHONE    = Convert.ToString(storage.Get("JsonPhone", null));
                //um.LoginSessionKey = storage.Get("LoginSessionKey", null);
                //um.redirect_back_url = storage.Get("redirect_back_url", null);
                //um.IsSignup = storage.Get("IsSignup", false);
                //um.DeviceToken = storage.Get("DeviceToken", "");

                return(um);
            }
            catch (Exception)
            {
                return(um);
            }
        }
Esempio n. 3
0
 void BtnLogin_Touch()
 {
     txtEmail.Text = txtEmail.Text.Trim();
     if (Android.Util.Patterns.EmailAddress.Matcher(txtEmail.Text).Matches())
     {
         if (!string.IsNullOrEmpty(txtPassword.Text))
         {
             List <string> MiembrosId = new LoginController().MemberLogin(txtEmail.Text, txtPassword.Text);
             if (MiembrosId.Count > 0)
             {
                 localStorage = SimpleStorage.EditGroup("Login");
                 localStorage.Put("Usuario_Id", MiembrosId[0]);
                 localStorage.Put("Usuario_Tipo", MiembrosId[1]);
                 StartActivity(new Intent(this, typeof(MainActivity)));
                 Finish();
             }
             else
             {
                 Toast.MakeText(this, Resource.String.str_login_error, ToastLength.Short).Show();
             }
         }
         else
         {
             Toast.MakeText(this, Resource.String.PasswordIncorrecto, ToastLength.Short).Show();
         }
     }
     else
     {
         Toast.MakeText(this, Resource.String.FormatoCorreoError, ToastLength.Short).Show();
     }
 }
Esempio n. 4
0
        public UserModel RetriveLocalData()
        {
            UserModel um = new UserModel();

            try
            {
                var    storage = SimpleStorage.EditGroup(Key);
                string id      = storage.Get("driver_id");
                //um.driver_id = Convert.ToInt32(id);
                //um.firstname = storage.Get("firstname";
                //um.lastname = storage.Get("lastname";
                //um.email = storage.Get("email";
                //um.DOB = storage.Get("DOB";
                //um.city = storage.Get("city";
                //um.phonenumber = Convert.ToInt32(storage.Get("phonenumber");
                //um.address = storage.Get("address";
                //um.device = storage.Get("device";
                //um.vehicle = storage.Get("vehicle";
                //um.image = storage.Get("image";
                return(um);
            }
            catch (Exception ex)
            {
                return(um);
            }
        }
Esempio n. 5
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.DatosFacturacionLayout);
            SimpleStorage.SetContext(ApplicationContext);
            storage = SimpleStorage.EditGroup("Login");
            Toolbar toolbar = FindViewById <Toolbar>(Resource.Id.toolbar);

            SetActionBar(toolbar);
            ActionBar.Title = Resources.GetString(Resource.String.str_profile_my_profile);
            ActionBar.SetDisplayHomeAsUpEnabled(true);
            //ActionBar.SetHomeAsUpIndicator(Resource.Mipmap.ic_menu);

            Email        = FindViewById <EditText>(Resource.Id.txtCorreoElectronico);
            RazonSocial  = FindViewById <EditText>(Resource.Id.txtRazonSocial);
            RFC          = FindViewById <EditText>(Resource.Id.txtRFC);
            Estado       = FindViewById <EditText>(Resource.Id.txtEstado);
            Municipio    = FindViewById <EditText>(Resource.Id.txtMunicipio);
            Colonia      = FindViewById <Spinner>(Resource.Id.txtColonia);
            CodigoPostal = FindViewById <EditText>(Resource.Id.txtCodigoPostal);
            Calle        = FindViewById <EditText>(Resource.Id.txtCalle);
            NumExterior  = FindViewById <EditText>(Resource.Id.txtNumExterior);
            NumInterior  = FindViewById <EditText>(Resource.Id.txtNumInterior);

            FillData();
            CodigoPostal.TextChanged += CodigoPostal_TextChanged;
        }
Esempio n. 6
0
        protected override void OnSaveInstanceState(Bundle outState)
        {
            EditText deviceIdText    = FindViewById <EditText>(Resource.Id.textDeviceId);
            EditText accessTokenText = FindViewById <EditText>(Resource.Id.textAccessToken);

            if (Guard(accessTokenText.Text, deviceIdText.Text))
            {
                return;
            }

            outState.PutString("device_id", deviceIdText.Text);
            outState.PutString("access_token", accessTokenText.Text);
            outState.PutInt("servopos1", servoPosition1);
            outState.PutInt("servopos2", servoPosition2);

            var storage = SimpleStorage.EditGroup("Devices");

            storage.Put("device_id", deviceIdText.Text);
            storage.Put("access_token", accessTokenText.Text);
            storage.Put("servopos1", servoPosition1);
            storage.Put("servopos2", servoPosition2);

            Log.Debug(GetType().FullName, "LaunchActivity - Saving instance state");

            base.OnSaveInstanceState(outState);
        }
Esempio n. 7
0
        private void Mybutton2_Click(object sender, System.EventArgs e)
        {
            var Obj = new Data2();

            Obj.Ora     = Ora;
            Obj.Materie = Materie;



            var storage = SimpleStorage.EditGroup("DB");

            var List = storage.Get(Zi);

            if (List != null && List != "")
            {
                var ObjectList = JsonConvert.DeserializeObject <List <Data2> >(List);

                ObjectList.Add(Obj);

                var SerieList = JsonConvert.SerializeObject(ObjectList);
                storage.Put(Zi, SerieList);
            }

            else
            {
                var ObjectList = new List <Data2>();
                ObjectList.Add(Obj);
                var SerieList = JsonConvert.SerializeObject(ObjectList);
                storage.Put(Zi, SerieList);
            }
        }
Esempio n. 8
0
        public void CacheLogin(long userID, string username, string password, string firstname, string lastname, string displayname, string telpno, string email, int active)
        {
            int a = (int)userID;

            ICacheLogin data = new ICacheLogin();

            data.userID      = userID;
            data.userName    = username;
            data.Password    = password;
            data.firstName   = firstname;
            data.lastName    = lastname;
            data.displayName = displayname;
            data.telpNo      = telpno;
            data.email       = email;
            data.active      = active;

            var storage = SimpleStorage.EditGroup(KeyString.Login.GroupCode);

            storage.Put <long>(KeyString.Login.userID, userID);
            storage.Put(KeyString.Login.username, username);
            storage.Put(KeyString.Login.password, password);
            storage.Put(KeyString.Login.firstname, firstname);
            storage.Put(KeyString.Login.lastname, lastname);
            storage.Put(KeyString.Login.displayname, displayname);
            storage.Put(KeyString.Login.telpno, telpno);
            storage.Put(KeyString.Login.email, email);
            storage.Put <int>(KeyString.Login.active, active);

            storage.Put <Boolean>(KeyString.Login.isCached, true);
        }
Esempio n. 9
0
        public SearchService()
        {
            AppDelegate app = (AppDelegate)UIApplication.SharedApplication.Delegate;

            api     = app.webService;
            storage = SimpleStorage.EditGroup("SearchService");
        }
Esempio n. 10
0
        protected override void OnResume()
        {
            base.OnResume();

            // open a new storage group with name "Demo" --- this is even possible
            // in code which is shared between Android and iOS because EditGroup is
            // a property holding a delegate which creates a plattform specific
            // instance
            var storage = SimpleStorage.EditGroup("Demo");

            // loading key "app_launches" with an empty string as default value
            var appLaunches = storage.Get("app_launches", "").Split(',').ToList();

            // adding a new timestamp to list to show that SimpleStorage is working
            appLaunches.Add(DateTime.Now.ToString());

            // save the value with key "app_launches" for next application start
            storage.Put("app_launches", String.Join(",", appLaunches));

            // simple presentation of the timestamp list
            var list = FindViewById <LinearLayout>(Resource.Id.list);

            foreach (var appLaunch in appLaunches)
            {
                if (String.IsNullOrEmpty(appLaunch))
                {
                    continue;
                }
                var textView = new TextView(this);
                textView.Text     = appLaunch;
                textView.TextSize = 35;
                list.AddView(textView);
            }
        }
Esempio n. 11
0
 public MenuView(Activity context)
 {
     this.context        = context;
     localStorage        = SimpleStorage.EditGroup("Login");
     ListMenu            = new EscritorioController().GetMenuAndroid(Convert.ToInt32(localStorage.Get("Usuario_Tipo")));
     usuario_imagen_path = new ConfigurationsController().GetListConfiguraciones().Find(parametro => parametro.Parametro_Descripcion == "RUTA DE IMAGENES DE PERFILES DE USUARIOS").Parametro_Varchar_1;
 }
Esempio n. 12
0
        public static void LoadAll()
        {
            //Res.Mark("LoadAll begins");

            persistentLibrary = SimpleStorage.EditGroup(persistentLibraryName);
            formNames         = (persistentLibrary.Get <string[]>(masterIndexName) ?? new string[0]).ToList();
            foreach (string fname in new List <string>()
            {
                "Down Slash", "Left Slash", "Right Slash", "High Parry", "Left Parry", "Right Parry"
            })
            {
                if (!formNames.Contains(fname))
                {
                    formNames.Add(fname);
                }
            }

            // Clearing the default Form out - probably only necessary once, while I'm debugging, but safe to leave in regardless.
            formNames.Remove(Form.None.FormName);
            persistentLibrary.Delete(Form.None.FormName);

            LoadAllFormSFX();
            DefensiveSFX = FormSFX[defaultDefensiveSFXName];
            OffensiveSFX = FormSFX[defaultOffensiveSFXName];

            //Res.Mark("Forms SFX loaded");

            SetUpResultFunctions();
        }
Esempio n. 13
0
        public void deleteAddy(Object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(addy))
            {
                var addressData = SimpleStorage.EditGroup(addy);
                addressData.Delete("Nickname");
                addressData.Delete("IsMN");
                addressData.Delete("IsStaking");
                List <string> currentAddList = new List <string>();
                List <string> newAddList     = new List <string>();
                var           storage        = SimpleStorage.EditGroup("Addresses");
                currentAddList = storage.Get("AddressList", "").Split(',').ToList();
                foreach (string s in currentAddList)
                {
                    if (s != addy)
                    {
                        newAddList.Add(s);
                    }
                }

                string newList = "";
                foreach (string s1 in newAddList)
                {
                    newList += s1 + ",";
                }
                newList = newList.TrimEnd(',');
                storage.Delete("AddressList");
                storage.Put("AddressList", newList);
            }
        }
Esempio n. 14
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            // open a new storage group with name "Demo" --- this is even possible
            // in code which is shared between Android and iOS because EditGroup is
            // a property holding a delegate which creates a plattform specific
            // instance
            var storage = SimpleStorage.EditGroup("Demo");

            // loading key "app_launches" with an empty string as default value
            var appLaunches = storage.Get("app_launches", "").Split(',').ToList();

            // adding a new timestamp to list to show that SimpleStorage is working
            appLaunches.Add(DateTime.Now.ToString());

            // save the value with key "app_launches" for next application start
            storage.Put("app_launches", String.Join(",", appLaunches));

            // simple presentation of the timestamp list with MonoTouch.Dialog
            var section = new Section();

            section.AddAll(from l in appLaunches where !String.IsNullOrEmpty(l) select new StringElement(l));
            window.RootViewController = new DialogViewController(new RootElement("SimpleStorage Demo")
            {
                section
            });

            window.MakeKeyAndVisible();

            return(true);
        }
Esempio n. 15
0
 public HistorialesAdapter(Context context, List <string> historiales)
 {
     this.context     = context;
     this.historiales = historiales;
     storage          = SimpleStorage.EditGroup("Login");
     controller       = new SalasJuntasController();
 }
Esempio n. 16
0
 protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     SimpleStorage.SetContext(ApplicationContext);
     SetContentView(Resource.Layout.activity_splash);
     FacebookSdk.SdkInitialize(this.ApplicationContext);
     RunTimer();
 }
Esempio n. 17
0
        public void ClearRememberMe()
        {
            var storage = SimpleStorage.EditGroup("PlayFabBuddy.Auth");

            storage.Delete(_LoginRememberKey);
            storage.Delete(_PlayFabAuthTypeKey);
            storage.Delete(_PlayFabRememberMeIdKey);
        }
Esempio n. 18
0
        public ActionBuffer(NameValueCollection baseParameters, SimpleStorage storage)
        {
            this.baseParameters = $"?rec=1&apiv=1&{baseParameters}&";
            this.storage        = storage;

            inbox  = storage.Get <List <string> >("actions_inbox", new List <string>());
            outbox = storage.Get <List <string> >("actions_outbox", new List <string>());
        }
Esempio n. 19
0
        public void clearCacheAppConfig()
        {
            var storage = SimpleStorage.EditGroup(KeyString.AppConfig.GroupCode);

            storage.Put(KeyString.AppConfig.IP, "");
            storage.Put <double>(KeyString.AppConfig.searchradius, 0);
            storage.Put(KeyString.AppConfig.talktousemail, "");
        }
Esempio n. 20
0
 void Directorio(string nombre      = "", string apellido       = "", string puesto = "", string profesion = "",
                 string habilidades = "", string disponibilidad = "N/A")
 {
     SetContentView(Resource.Layout.ColaboradoresLayout);
     storage      = SimpleStorage.EditGroup("Login");
     svDirectorio = FindViewById <ScrollView>(Resource.Id.svDirectorio);
     FillDirectorioColaboradores(storage.Get("Usuario_Id"), nombre, apellido, puesto, profesion, habilidades, disponibilidad);
 }
Esempio n. 21
0
 public ReservaSalaJuntasActivity()
 {
     storage           = SimpleStorage.EditGroup("Login");
     SalasController   = new SalasJuntasController();
     usuario           = new UsuariosController().GetMemberData(storage.Get("Usuario_Id"), storage.Get("Usuario_Tipo"));
     salas_imagen_path = new ConfigurationsController().GetListConfiguraciones().Find(parametro => parametro.Parametro_Descripcion == "RUTA DE IMAGENES DE SALAS DE REUNIONES").Parametro_Varchar_1;
     imagenes          = new Dictionary <string, byte[]>();
 }
Esempio n. 22
0
 public ShoppingCartActivity()
 {
     Descuentos = new List <decimal>();
     membresias = new List <CarritoComprasDetalle>();
     productos  = new List <CarritoComprasDetalle>();
     controller = new PickerItemsController();
     Storage    = SimpleStorage.EditGroup("Login");
 }
Esempio n. 23
0
        public ICacheGps getCacheGPSEnable()
        {
            var storage = SimpleStorage.EditGroup(KeyString.GPSEnable.GroupCode);

            ICacheGps data = new ICacheGps();

            data.enable = storage.Get <string>(KeyString.GPSEnable.enable.ToString());
            return(data);
        }
Esempio n. 24
0
        public LoginService()
        {
            AppDelegate app = (AppDelegate)UIApplication.SharedApplication.Delegate;

            InitSocialLogin();
            api         = app.webService;
            storage     = SimpleStorage.EditGroup("login");
            AccessToken = storage.Get("token");
        }
Esempio n. 25
0
        public CommentsActivity()
        {
            localStorage         = SimpleStorage.EditGroup("Login");
            Usuario_Fotos_Perfil = new Dictionary <KeyValuePair <string, string>, byte[]>();
            List <ConfiguracionesModel> config = new ConfigurationsController().GetListConfiguraciones();

            usuario_imagen_path       = config.Find(parametro => parametro.Parametro_Descripcion == "RUTA DE IMAGENES DE PERFILES DE USUARIOS").Parametro_Varchar_1;
            publicaciones_imagen_path = config.Find(parametro => parametro.Parametro_Descripcion == "RUTA DE IMAGENES DE PUBLICACIONES").Parametro_Varchar_1;
        }
Esempio n. 26
0
 private Res()
 {
     SFX             = new SFX();
     Speech          = new Speech();
     Speech_Speakers = new Speech(true);
     //Speech.Init(); // Unnecessary in v3.0?? - No, but moved to Speech() ctor.
     Storage      = SimpleStorage.EditGroup("Atropos_General");
     SpecificTags = SimpleStorage.EditGroup("Atropos_SpecificTags");
     stopWatch.Start();
 }
Esempio n. 27
0
        private void Mybutton3_Click(object sender, System.EventArgs e)
        {
            var storage = SimpleStorage.EditGroup("DB");

            storage.Put("Monday", "");
            storage.Put("Tuesday", "");
            storage.Put("Wednesday", "");
            storage.Put("Thursday", "");
            storage.Put("Friday", "");
        }
Esempio n. 28
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.Main);

            // Set the App Context before SimpleStorage is used anywhere in your Android App. Otherwise
            // the EditGroup(name) delegate can not be called (eg. nullpointer exception)
            SimpleStorage.SetContext(ApplicationContext);
        }
Esempio n. 29
0
 public void clearCacheLocation()
 {
     try
     {
         var storage = SimpleStorage.EditGroup(KeyString.Location.GroupCode);
         storage.Put <double>(KeyString.Location.Lat, 0);
         storage.Put <double>(KeyString.Location.Lng, 0);
     }catch (Exception ex) {
         string msg = ex.ToString();
     }
 }
Esempio n. 30
0
        public void CacheGPSEnable(string enable)
        {
            clearCacheLocation();
            ICacheGps data = new ICacheGps();

            data.enable = enable;

            var storage = SimpleStorage.EditGroup(KeyString.GPSEnable.GroupCode);

            storage.Put <string>(KeyString.GPSEnable.enable, enable);
        }