protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Create your application here SetContentView(Resource.Layout.ConfigForm); var btnBackConfigForm = FindViewById <Button>(Resource.Id.btnBackConfigForm); btnBackConfigForm.Click += delegate { Finish(); }; GetConfigList(); var lvEmail = FindViewById <ListView>(Resource.Id.lvEmailList); lvEmail.ItemClick += (sender, e) => { ConfigAdapter ConfigList = ((ConfigAdapter)lvEmail.Adapter); ConfigObject item = ConfigList[e.Position]; var actEmalReader = new Intent(this, typeof(EmailReaderActivity)); actEmalReader.PutExtra("ConfigName", item.Name); actEmalReader.PutExtra("ConfigValue", item.Value); actEmalReader.PutExtra("ConfigType", item.Type); actEmalReader.SetFlags(ActivityFlags.ReorderToFront); StartActivity(actEmalReader); }; }
private void GetConfigList() { DBManagerHelper dbmgr = new DBManagerHelper(this); DatabaseUpdates tblConfigList = new DatabaseUpdates(); var eListAdapt = new ConfigAdapter(this, tblConfigList.GetConfigList()); eListAdapt.NotifyDataSetChanged(); var lvConfigList = FindViewById <ListView>(Resource.Id.lvConfigList); lvConfigList.Adapter = eListAdapt; }