Пример #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.SearchLayout);
            // Create your application here

            imotorCare          = new ImotorCareWebApi.ImotorCareWebApi();
            listView            = FindViewById <ListView>(Resource.Id.listViewSearch);
            progressBar         = FindViewById <ProgressBar>(Resource.Id.progressBarSearch);
            listView.ItemClick += ListEvent;
            GetMyCurrentLocation();
        }
Пример #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_main);
            Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
            SetSupportActionBar(toolbar);
            FloatingActionButton fab = FindViewById <FloatingActionButton>(Resource.Id.fab);

            fab.Click  += FabOnClick;
            seekBar     = FindViewById <SeekBar>(Resource.Id.seekbar);
            imotorCare  = new ImotorCareWebApi.ImotorCareWebApi();
            listView    = FindViewById <ListView>(Resource.Id.listView);
            progressBar = FindViewById <ProgressBar>(Resource.Id.progressBar);
            progressBar.IncrementProgressBy(10);
            listView.ItemClick += ListEvent;
            GetMyCurrentLocation();
            seekBar.ProgressChanged += seekbarAction;
        }
Пример #3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.SelectionLayout);
            // Create your application here
            imageMechan   = FindViewById <ImageView>(Resource.Id.imageMechan);
            imageBreak    = FindViewById <ImageView>(Resource.Id.imageBreak);
            specialityBox = FindViewById <EditText>(Resource.Id.specialityText);
            button        = FindViewById <Button>(Resource.Id.button);

            api = new ImotorCareWebApi.ImotorCareWebApi();

            imageMechan.Click += delegate
            {
                Intent intent = new Intent(this, typeof(MainActivity));
                intent.PutExtra("type", "mechanic");
                StartActivity(intent);
            };
            imageBreak.Click += delegate
            {
                Intent intent = new Intent(this, typeof(MainActivity));
                intent.PutExtra("type", "breakdown");
                StartActivity(intent);
            };
            button.Click += delegate
            {
                if (!string.IsNullOrEmpty(specialityBox.Text))
                {
                    FilterEvent();
                }
                else
                {
                    Android.App.AlertDialog.Builder dialog = new Android.App.AlertDialog.Builder(this);
                    Android.App.AlertDialog         alert  = dialog.Create();
                    alert.SetTitle("Input Errror");
                    alert.SetMessage("You must place a description");
                    //alert.SetIcon(Resource.Drawable.alert);
                    alert.SetButton("OK", (c, ev) => { alert.Cancel(); });
                    alert.Show();
                }
            };
        }
Пример #4
0
 protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     SetContentView(Resource.Layout.DisplayPerson);
     // Create your application here
     imageView    = FindViewById <ImageView>(Resource.Id.imgid);
     nameText     = FindViewById <TextView>(Resource.Id.name);
     garageText   = FindViewById <TextView>(Resource.Id.garagename);
     textEvent    = FindViewById <TextView>(Resource.Id.linkReview);
     mRatingscale = FindViewById <TextView>(Resource.Id.textView6);
     commentText  = FindViewById <EditText>(Resource.Id.editText2);
     button2      = FindViewById <Button>(Resource.Id.button2);
     ratingBar    = FindViewById <RatingBar>(Resource.Id.ratingBar);
     api          = new ImotorCareWebApi.ImotorCareWebApi();
     Id           = Intent.GetStringExtra("uid");
     Load(api.GetPersonelByID(Id));
     button2.Click   += RatePersonel;
     textEvent.Click += LoadReviews;
     ratingBar.Click += SetRatingText;
 }