Exemplo n.º 1
0
        async public Task BtnAngebotFragmentClickAsync()
        {
            // Get all Auftraege
            _angebote = await BusinessLayer.Angebot.GetAngeboteAsync ( _stateClass._person.ID,Utilities.GetCurrentLanguage(_mainActivity ),MainActivity.User );

            // Run the AuftragFragment 
            // AngebotFragment controls also the list.click event 
            fragment = new UI.AngebotFragment(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;

        }
Exemplo n.º 2
0
        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 AngebotFragment(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

        }