Ejemplo n.º 1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            editText1      = FindViewById <EditText>(Resource.Id.editText1);
            editText2      = FindViewById <EditText>(Resource.Id.editText2);
            profil         = FindViewById <Button>(Resource.Id.profil);
            button3        = FindViewById <Button>(Resource.Id.button3);
            buttonregister = FindViewById <Button>(Resource.Id.buttonregister);
            textView3      = FindViewById <TextView>(Resource.Id.textView3);
            textView4      = FindViewById <TextView>(Resource.Id.textView4);
            textView5      = FindViewById <TextView>(Resource.Id.textView5);
            textView6      = FindViewById <TextView>(Resource.Id.textView6);
            string var1 = FindViewById <EditText>(Resource.Id.editText1).Text;
            string var2 = FindViewById <EditText>(Resource.Id.editText2).Text;

            button3.Click        += button3_Click;
            buttonregister.Click += Button_Click;
            profil.Click         += Button_Click;

            session = new UserSessionManagement(Application.Context);
        }
Ejemplo n.º 2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Profil);

            pseudo  = FindViewById <EditText>(Resource.Id.pseudo);
            email   = FindViewById <EditText>(Resource.Id.email);
            age     = FindViewById <EditText>(Resource.Id.age);
            city    = FindViewById <EditText>(Resource.Id.city);
            sport   = FindViewById <EditText>(Resource.Id.sport);
            valider = FindViewById <Button>(Resource.Id.valider);
            accueil = FindViewById <Button>(Resource.Id.Accueil);

            valider.Click += Valider_Click;

            accueil.Click += Accueil_Click;

            session = new UserSessionManagement(Application.Context);

            if (session.checkLogin())
            {
                Finish();
            }

            Dictionary <string, string> user = session.getUserDetails();

            string name     = user[UserSessionManagement.KEY_NAME];
            string password = user[UserSessionManagement.KEY_PASSWORD];


            MySqlConnection con = new MySqlConnection("Server=cl1-sql22.phpnet.org;Port=3306;database=yzi38822; User Id=yzi38822;Password=M0kTZX33pyO6;");

            if (con.State == ConnectionState.Closed)
            {
                con.Open();
            }

            string query = "SELECT * FROM members WHERE user = '******'";

            MySqlDataReader reader = new MySqlCommand(query, con).ExecuteReader();

            if (reader.Read())
            {
                pseudo.Text = (reader["user"].ToString());
                email.Text  = (reader["mail"].ToString());
                // age.Text = (reader["birthday"].ToString());
                sport.Text = (reader["sport"].ToString());
                city.Text  = (reader["city"].ToString());
                reader.Close();
            }
            else
            {
                sport.Text = "Erreur";
                reader.Close();
            }
        }
Ejemplo n.º 3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            session     = new UserSessionManagement(Application.Context);
            age         = FindViewById <EditText>(Resource.Id.age);
            ville       = FindViewById <EditText>(Resource.Id.ville);
            Enregistrer = FindViewById <Button>(Resource.Id.enregistrer);

            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.ThirdRegister);

            Enregistrer.Click += Enregister_Click;
        }
Ejemplo n.º 4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.SecondRegister);

            mail             = FindViewById <EditText>(Resource.Id.mail);
            mailconfirmation = FindViewById <EditText>(Resource.Id.mailconfirmation);

            TextView1 = FindViewById <TextView>(Resource.Id.TextView1);

            next    = FindViewById <Button>(Resource.Id.next);
            session = new UserSessionManagement(Application.Context);

            next.Click += Next_Click;
        }
Ejemplo n.º 5
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Accueil);
            evenement   = FindViewById <Button>(Resource.Id.evenement);
            button1     = FindViewById <Button>(Resource.Id.button1);
            deconnexion = FindViewById <Button>(Resource.Id.deconnexion);
            btn_map     = FindViewById <Button>(Resource.Id.map_btn);

            session = new UserSessionManagement(Application.Context);

            btn_map.Click     += map_btn_Click;
            evenement.Click   += Evenement_Click;
            button1.Click     += Button1_Click;
            deconnexion.Click += Deconnexion_Click;
        }
Ejemplo n.º 6
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Register);

            user                 = FindViewById <EditText>(Resource.Id.user);
            password             = FindViewById <EditText>(Resource.Id.password);
            register             = FindViewById <Button>(Resource.Id.register);
            buttonconnexion      = FindViewById <Button>(Resource.Id.buttonconnexion);
            result               = FindViewById <TextView>(Resource.Id.result);
            passwordconfirmation = FindViewById <EditText>(Resource.Id.passwordconfirmation);

            session = new UserSessionManagement(Application.Context);

            register.Click        += register_Click;
            buttonconnexion.Click += buttonconnexion_Click;
        }
Ejemplo n.º 7
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Home);
            session = new UserSessionManagement(Application.Context);

            button1   = FindViewById <Button>(Resource.Id.connect);
            textview1 = FindViewById <TextView>(Resource.Id.TextView1);
            textview2 = FindViewById <TextView>(Resource.Id.textView2);

            button1.Click += Button1_Click;


            if (session.checkLogin())
            {
                Finish();
            }

            Dictionary <string, string> user = session.getUserDetails();

            string name  = user[UserSessionManagement.KEY_NAME];
            string email = user[UserSessionManagement.KEY_EMAIL];

            MySqlConnection con = new MySqlConnection("Server=cl1-sql22.phpnet.org;Port=3306;database=yzi38822; User Id=yzi38822;Password=M0kTZX33pyO6;");

            if (con.State == ConnectionState.Closed)
            {
                con.Open();
            }

            string query = "SELECT user,password FROM members WHERE user = '******'";

            MySqlDataReader reader = new MySqlCommand(query, con).ExecuteReader();

            if (reader.Read())
            {
                new AlertDialog.Builder(this)
                .SetMessage("Bienvenue " + (reader["user"].ToString()))
                .Show();
                StartActivity(typeof(Profil));
            }
            else
            {
                reader.Close();
            }
        }