Ejemplo n.º 1
0
		protected override void OnCreate (Bundle savedInstanceState)
		{
			base.OnCreate (savedInstanceState);
			SetContentView(Resource.Layout.Anomalie);

			id = Intent.GetStringExtra ("ID");
			i = int.Parse(id);

			type = Intent.GetStringExtra ("TYPE");

			DBRepository dbr = new DBRepository ();
			data = dbr.GetPositionsData (i);

			Spinner spinner = FindViewById<Spinner> (Resource.Id.spinnerAnomalie);
			EdittxtRem = FindViewById<EditText>(Resource.Id.edittext);
			_imageView = FindViewById<ImageView>(Resource.Id.imageView1);

			Button buttonvalider = FindViewById<Button>(Resource.Id.valider);

			if (IsThereAnAppToTakePictures ())
			{
				CreateDirectoryForPictures ();
				Button buttonphoto = FindViewById<Button>(Resource.Id.openCamera);
				_imageView = FindViewById<ImageView>(Resource.Id.imageView1);
				buttonphoto.Click += TakeAPicture;
			}

			buttonvalider.Click += delegate {
				Buttonvalider_Click();
			};
			;

			spinner.ItemSelected += new EventHandler<AdapterView.ItemSelectedEventArgs> (spinner_ItemSelected);
			ArrayAdapter adapter;
			if (type == "RAM") {
				adapter = ArrayAdapter.CreateFromResource (this, Resource.Array.anomalieramasselist, Android.Resource.Layout.SimpleSpinnerItem);
			} else {
				adapter = ArrayAdapter.CreateFromResource (this, Resource.Array.anomalielivraisonlist, Android.Resource.Layout.SimpleSpinnerItem);
			}

			adapter.SetDropDownViewResource (Android.Resource.Layout.SimpleSpinnerDropDownItem);
			spinner.Adapter = adapter;

			//REMISE  à null de la valeur photo
		}
Ejemplo n.º 2
0
		protected override void OnCreate (Bundle savedInstanceState)
		{
			base.OnCreate (savedInstanceState);

			id = Intent.GetStringExtra ("ID");
			i = int.Parse(id);

			type = Intent.GetStringExtra ("TYPE");
			if (type == "RAM") {
				tyValide = "RAMCFM";
			} else {				
				tyValide = "LIVCFM";
			}
			DBRepository dbr = new DBRepository ();
			data = dbr.GetPositionsData (i);
			idprev = dbr.GetidPrev (i);
			idnext = dbr.GetidNext (i);

			SetContentView(Resource.Layout.DetailPosition);
			_gestureDetector = new GestureDetector(this);

			//AFFICHE DATA
			codelivraison = FindViewById<TextView>(Resource.Id.codelivraison);
			commande = FindViewById<TextView>(Resource.Id.commande);
			infolivraison = FindViewById<TextView>(Resource.Id.infolivraison);
			title = FindViewById<TextView>(Resource.Id.title);
			infosupp = FindViewById<TextView>(Resource.Id.infosupp);
			infoclient = FindViewById<TextView>(Resource.Id.infoclient);
			client = FindViewById<TextView>(Resource.Id.client);
			anomaliet = FindViewById<TextView> (Resource.Id.anomaliet);
			anomalie = FindViewById<TextView> (Resource.Id.infoanomalie);
			destfinal = FindViewById<TextView> (Resource.Id.destfinal);
			_imageView = FindViewById<ImageView> (Resource.Id._imageView);
			btnvalide = FindViewById<Button> (Resource.Id.valide);

			Button btnanomalie = FindViewById <Button> (Resource.Id.anomalie);



			btnvalide.Click += Btnvalide_Click;
			btnanomalie.Click += Btnanomalie_Click;

		}