Ejemplo n.º 1
0
 public RegistroRepository(String dbPath)
 {
     dbPath = FileAccessHelper.GetLocalFilePath("swim.db3");
     conn   = new SQLiteConnection(dbPath);
     conn.CreateTable <Registro>();
     conn.CreateTable <Nadador>();
 }
Ejemplo n.º 2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Brazadas);
            documento = Intent.GetStringExtra("documento");


            string dbPath = FileAccessHelper.GetLocalFilePath("people.db3");

            registroDB = new RegistroRepository(dbPath);

            FindViewById <Button>(Resource.Id.finishButton).Click    += OnFinishClick;
            FindViewById <Button>(Resource.Id.brazadaButton).Click   += OnBrazadaClick;
            FindViewById <Button>(Resource.Id.startStopButton).Click += OnStartStopClick;
            FindViewById <Button>(Resource.Id.resetButton).Click     += OnResetClick;

            LinearLayout ll      = FindViewById <LinearLayout>(Resource.Id.ll_container_surface_view);
            Camera       _camera = SetUpCamera();

            ll.AddView(new CameraPreview(this, _camera));
            _camera.StartPreview();

            numBrazadaTV = FindViewById <TextView>(Resource.Id.numBrazadaTextView);
            txtTimer     = FindViewById <TextView>(Resource.Id.timeTextView);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

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

            string dbPath = FileAccessHelper.GetLocalFilePath("people.db3");

            registroDB = new RegistroRepository(dbPath);

            FindViewById <Button>(Resource.Id.acceptButton).Click    += OnAcceptClick;
            FindViewById <Button>(Resource.Id.cancelButton).Click    += OnCancelClick;
            FindViewById <Button>(Resource.Id.verSesionButton).Click += OnVerSesionlClick;
            FindViewById <Button>(Resource.Id.ingresarButton).Click  += OnIngresarClick;
            nombreEditText    = FindViewById <EditText>(Resource.Id.nombreEditText);
            documentoEditText = FindViewById <EditText>(Resource.Id.documentEditText);
            brazoEditText     = FindViewById <EditText>(Resource.Id.brazoEditText);
            estatutaEditText  = FindViewById <EditText>(Resource.Id.estaturaEditText);
            hombreRadioButon  = FindViewById <RadioButton>(Resource.Id.hombreRadioButton);

            if (((int)Build.VERSION.SdkInt) >= (int)BuildVersionCodes.M)
            {
                RequestAllPersmissions();
            }
            else
            {
                isCammeraPermissionEnabled = true;
            }
        }
Ejemplo n.º 4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Tabla);

            string dbPath = FileAccessHelper.GetLocalFilePath("people.db3");

            registroDB = new RegistroRepository(dbPath);

            FindViewById <Button>(Resource.Id.homeButton).Click      += OnFinishClick;
            FindViewById <Button>(Resource.Id.consultarButton).Click += OnConsultarClick;
            documentEditText  = FindViewById <EditText>(Resource.Id.documentoEditText);
            resultListView    = FindViewById <ListView>(Resource.Id.resultListView);
            documentoTextView = FindViewById <TextView>(Resource.Id.documentoTextView);
            nombreTextView    = FindViewById <TextView>(Resource.Id.nombreTextView);
            sexoTextView      = FindViewById <TextView>(Resource.Id.sexoTextView);
            estaturaTexView   = FindViewById <TextView>(Resource.Id.estaturaTextView);
            longitudTextView  = FindViewById <TextView>(Resource.Id.brazadaTextView);

            List <Nadador>  nadadores = registroDB.GetAllNadadores();
            List <Registro> registros = registroDB.GetAllRegistros();

            //var items = new List<String>();
            //foreach(var listing in nadadores){
            //    items.Add(listing.documentId + " / " + listing.nombre + " / " + listing.sexo + " / " + listing.estatura + " / " + listing.longitudBrazo);
            //}
            //var adapter =new ArrayAdapter<String>(this, Android.Resource.Layout.SimpleListItem1, items);
            //resultListView.Adapter = adapter;
        }
Ejemplo n.º 5
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Brazadas);
            documento = Intent.GetStringExtra("documento");

            string dbPath = FileAccessHelper.GetLocalFilePath("people.db3");

            registroDB = new RegistroRepository(dbPath);

            FindViewById <Button>(Resource.Id.finishButton).Click    += OnFinishClick;
            FindViewById <Button>(Resource.Id.brazadaButton).Click   += OnBrazadaClick;
            FindViewById <Button>(Resource.Id.startStopButton).Click += OnStartStopClick;
            FindViewById <Button>(Resource.Id.resetButton).Click     += OnResetClick;
            numBrazadaTV = FindViewById <TextView>(Resource.Id.numBrazadaTextView);
            txtTimer     = FindViewById <TextView>(Resource.Id.timeTextView);
        }
Ejemplo n.º 6
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

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

            string dbPath = FileAccessHelper.GetLocalFilePath("people.db3");

            registroDB = new RegistroRepository(dbPath);

            FindViewById <Button>(Resource.Id.acceptButton).Click += OnAcceptClick;
            FindViewById <Button>(Resource.Id.cancelButton).Click += OnCancelClick;
            nombreEditText    = FindViewById <EditText>(Resource.Id.nombreEditText);
            documentoEditText = FindViewById <EditText>(Resource.Id.documentEditText);
            brazoEditText     = FindViewById <EditText>(Resource.Id.brazoEditText);
            estatutaEditText  = FindViewById <EditText>(Resource.Id.estaturaEditText);
            hombreRadioButon  = FindViewById <RadioButton>(Resource.Id.hombreRadioButton);
        }
Ejemplo n.º 7
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Tabla);
            string dbPath = FileAccessHelper.GetLocalFilePath("people.db3");

            registroDB = new RegistroRepository(dbPath);
            FindViewById <Button>(Resource.Id.homeButton).Click      += OnFinishClick;
            FindViewById <Button>(Resource.Id.consultarButton).Click += OnConsultarClick;
            documentEditText = FindViewById <EditText>(Resource.Id.documentoEditText);
            //resultListView = FindViewById<ListView>(Resource.Id.resultListView);
            sfDataGrid        = FindViewById <SfDataGrid>(Resource.Id.resultDataGrid);
            documentoTextView = FindViewById <TextView>(Resource.Id.documentoTextView);
            nombreTextView    = FindViewById <TextView>(Resource.Id.nombreTextView);
            sexoTextView      = FindViewById <TextView>(Resource.Id.sexoTextView);
            estaturaTexView   = FindViewById <TextView>(Resource.Id.estaturaTextView);
            longitudTextView  = FindViewById <TextView>(Resource.Id.brazadaTextView);

            List <Nadador>  nadadores = registroDB.GetAllNadadores();
            List <Registro> registros = registroDB.GetAllRegistros();
        }