async public Task BtnAngebotFragmentClickAsync() { // Get all Auftraege _anfragen = await BusinessLayer.Anfrage.GetAnfragenAsync ( _stateClass._person.ID,Utilities.GetCurrentLanguage(_mainActivity ),MainActivity.User ); // Run the AuftragFragment // AnfrageFragment controls also the list.click event fragment = new UI.AnfrageFragment(Resource.Layout.FrgAngebot, _mainActivity , this._stateClass._person, this ,MainActivity.User, permission); _mainActivity.FragmentManager .BeginTransaction() .SetCustomAnimations (Android.Resource.Animator.FadeIn,Android.Resource.Animator.FadeOut) .Replace(Resource.Id.frameContent, fragment) .AddToBackStack (null) .Commit(); // Configure the buttons if (MainActivity.User.NetworkStatus == DataAccessLayer.NetworkState.Disconnected) ConfigureButtons(false, false, false, false, false); else ConfigureButtons(permission.Create, false, false, false, permission.UpDownload); return; }
public void Restore(MainActivity mainActivity) { // First refresh the mainActivity _mainActivity = mainActivity; _btnNew = _mainActivity.FindViewById<ImageButton>(Resource.Id.btnNew); _btnEdit = _mainActivity.FindViewById<ImageButton>(Resource.Id.btnEdit); _btnSave = _mainActivity.FindViewById<ImageButton>(Resource.Id.btnSave); _btnDelete = _mainActivity.FindViewById<ImageButton>(Resource.Id.btnDelete); _btnOffline = _mainActivity.FindViewById<ImageButton>(Resource.Id.btnOffline); // Run the ChartFragment fragment = new AnfrageFragment(Resource.Layout.FrgAngebot, _mainActivity , this._stateClass._person, this ,MainActivity.User, permission); _mainActivity.FragmentManager .BeginTransaction() .SetCustomAnimations (Android.Resource.Animator.FadeIn,Android.Resource.Animator.FadeOut) .Replace(Resource.Id.frameContent, fragment) .AddToBackStack (null) .Commit(); // Then we have to get reference to the new controls // Set the status of the buttons // then we have to get a reference to the new controls }