Пример #1
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);


            fragment = new BestellungFragment(Resource.Layout.FrgAuftrag, _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();

        }
Пример #2
0
        public override void Restore(MainActivity mainActivity)
        {
            // First assign the new mainActivity
            _mainActivity = mainActivity;

            // Then we have to get reference to the new controls
            _tvEmail = _mainActivity.FindViewById<TextView> (Resource.Id.tvEmail);
            _tvNummer = _mainActivity.FindViewById<TextView> (Resource.Id.tvNummer);
            _tvTelefon = _mainActivity.FindViewById<TextView> (Resource.Id.tvTelefon);
            _tvUmsatz = _mainActivity.FindViewById<TextView> (Resource.Id.tvUmsatz);
            _edMainName = _mainActivity.FindViewById<TextView> (Resource.Id.edMainName);
            _txtClassName = _mainActivity.FindViewById<TextView> (Resource.Id.txtClass);
            _edSearch = _mainActivity.FindViewById<EditText> (Resource.Id.edSearch);
            _list = _mainActivity.FindViewById<ListView> (Resource.Id.left_pane);
            _tblColoredLayout = _mainActivity.FindViewById<TableLayout>(Resource.Id.AM_ColoredTableLayout);

            _txtClassName.Text =_mainActivity.Resources.GetString(Resource.String.Lieferanten) + ":";
            _mainActivity.ActionBar.SelectTab(_mainActivity._tabLieferanten);

            // if there is a person selected
            // Then fill the controls
            _edMainName.Text = _person.Name;
            _tvEmail.Text = _person.Email ;
            _tvNummer.Text = _person.Nummer;
            _tvTelefon.Text = _person.Telefon;
            _tvUmsatz.Text = _person.Umsatz;

            // Fill the listview
            if (_adapter != null)
                _list.Adapter = _adapter;

            // Restore the fragment
            this._fragmentState.Restore (_mainActivity);
        }
Пример #3
0
		public void Restore(MainActivity mainActivity)
		{
			// First refresh the mainActivity
			_mainActivity = mainActivity;


			TaskFragment fragment = new TaskFragment(Resource.Layout.FrgTask, _mainActivity , this);

			_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
			_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);

			// Specific Controls
			_spinnerTask = _mainActivity.FindViewById<Spinner> (Resource.Id.spinnerTasks);
			_spinnerTyp = _mainActivity.FindViewById<Spinner>(Resource.Id.spinnerTyp);
			_spinnerArt = _mainActivity.FindViewById<Spinner>(Resource.Id.spinnerArt);
			_spinnerStatus = _mainActivity.FindViewById<Spinner> (Resource.Id.spinnerStatus);
			_spinnerMitarbeiter = _mainActivity.FindViewById<Spinner>(Resource.Id.spinnerMitarbeiter);
			_spinnerAbteilung = _mainActivity.FindViewById<Spinner>(Resource.Id.spinnerAbteilung);
			_spinnerAnsprechpartner = _mainActivity.FindViewById<Spinner> (Resource.Id.spinnerAnsprechpartner);
			_edNummer = _mainActivity.FindViewById<EditText> (Resource.Id.edNummer);
			_edDatum = _mainActivity.FindViewById<EditText> (Resource.Id.edDatum);
			_edZeit = _mainActivity.FindViewById<EditText> (Resource.Id.edZeit);
			_edAnsprechpartner = _mainActivity.FindViewById<EditText> (Resource.Id.edAnsprechpartner);
			_edStartTelefon = _mainActivity.FindViewById<EditText> (Resource.Id.edStartTelefon);
			_edDauerTelefon = _mainActivity.FindViewById<EditText> (Resource.Id.edDauerTelefon);
			_edDatumEdit = _mainActivity.FindViewById<EditText> (Resource.Id.edDatumEdit);
			_edDatumClose = _mainActivity.FindViewById<EditText> (Resource.Id.edDatumClose);
			_edText = _mainActivity.FindViewById<EditText> (Resource.Id.edText);
			_btnVoice = _mainActivity.FindViewById<ImageButton> (Resource.Id.BtnMic);                       

			// Set the status of the buttons
			// then we have to get a reference to the new controls

		}
Пример #4
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 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

        }
Пример #5
0
		public void Restore(MainActivity mainActivity)
		{
			// First assign the new mainActivity
			_mainActivity = mainActivity;

            MapFragment  =  new GoogleMapFragment(Resource.Layout.FrgMap, _mainActivity ,  _stateClass._person,this);

            _mainActivity.FragmentManager 
                .BeginTransaction()
                .SetCustomAnimations (Android.Resource.Animator.FadeIn,Android.Resource.Animator.FadeOut)
                .Replace(Resource.Id.frameContent, MapFragment)
                .AddToBackStack (null)
                .Commit();


            // Then we have to get reference to the new controls
            _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);

			// then we have to get a reference to the new controls


		}
Пример #6
0
		public void Restore(MainActivity 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 UI.ChartFragment(Resource.Layout.FrgChart, _mainActivity , this._stateClass._person,  this ,MainActivity.User);

            _mainActivity.FragmentManager 
                .BeginTransaction()
                .SetCustomAnimations (Android.Resource.Animator.FadeIn,Android.Resource.Animator.FadeOut)
                .Replace(Resource.Id.frameContent, fragment)
                .AddToBackStack (null)
                .Commit();


            return;

		}
Пример #7
0
		public void Restore(MainActivity mainActivity)
		{

			// First refresh the mainActivity
			_mainActivity = mainActivity;


			AnsprechpartnerFragment fragment = new AnsprechpartnerFragment(Resource.Layout.FrgAnsprechpartner, _mainActivity , this);

			_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
			var _btnNew = _mainActivity.FindViewById<ImageButton> (Resource.Id.btnNew);
			var _btnEdit = _mainActivity.FindViewById<ImageButton> (Resource.Id.btnEdit);
			var _btnSave = _mainActivity.FindViewById<ImageButton> (Resource.Id.btnSave);
			var _btnDelete = _mainActivity.FindViewById<ImageButton> (Resource.Id.btnDelete);
			var _btnOffline = _mainActivity.FindViewById<ImageButton> (Resource.Id.btnOffline);
			_edName = _mainActivity.FindViewById<EditText>(Resource.Id.edGeneralName);
			_edVorname = _mainActivity.FindViewById<EditText> (Resource.Id.edVorname);
			_edNummer = _mainActivity.FindViewById<EditText> (Resource.Id.edNummer);
			_edStrasse = _mainActivity.FindViewById<EditText> (Resource.Id.edStrasse);
			_edPLZ = _mainActivity.FindViewById<EditText> (Resource.Id.edPLZ);
			_edOrt = _mainActivity.FindViewById<EditText> (Resource.Id.edOrt);
            _spinnerLand = _mainActivity.FindViewById<Spinner>(Resource.Id.spinnerAnsprechpartnerLand);
			_edTelefon = _mainActivity.FindViewById<EditText> (Resource.Id.edTelefon);
			_edEmail = _mainActivity.FindViewById<EditText> (Resource.Id.edEmail);
			_edSearch = _mainActivity.FindViewById<EditText> (Resource.Id.edSearch);
            _tvEmail = _mainActivity.FindViewById<TextView>(Resource.Id.tvAnsprechpartnerEmail);
            _tvPhone = _mainActivity.FindViewById<TextView>(Resource.Id.tvAnsprechpartnerPhone);

            // Spinner einstellen
            if (_spinnerLand.Adapter != null)
            {
                if (_ansprechpartner != null)
                _spinnerLand.SetSelection(((CountryViewAdapter)_spinnerLand.Adapter).GetItemIndex(_ansprechpartner.LandNummer));

            }

			// Set the status of the buttons
			_btnNew.Enabled = true;
			_btnEdit.Enabled = true;
			_btnSave.Enabled = false;
			_btnOffline.Enabled = true;
			_btnDelete.Enabled = true;


		}
Пример #8
0
		public void Restore(MainActivity mainActivity)
		{
			// First assign the new mainActivity
			_mainActivity = mainActivity;

            // Then we have to get reference to the new controls
            _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);
            
            _edName = _mainActivity.FindViewById<EditText>(Resource.Id.edGeneralName);
			_edNummer = _mainActivity.FindViewById<EditText> (Resource.Id.edNummer);
			_edStrasse = _mainActivity.FindViewById<EditText> (Resource.Id.edStrasse);
			_edPLZ = _mainActivity.FindViewById<EditText> (Resource.Id.edPLZ);
			_edOrt = _mainActivity.FindViewById<EditText> (Resource.Id.edOrt);
            _spinnerLand = _mainActivity.FindViewById<Spinner> (Resource.Id.spinnerLand);
			_edTelefon = _mainActivity.FindViewById<EditText> (Resource.Id.edTelefon);
			_edEmail = _mainActivity.FindViewById<EditText> (Resource.Id.edEmail);
			_edSearch = _mainActivity.FindViewById<EditText> (Resource.Id.edSearch);
            _edSperrdatum = _mainActivity.FindViewById<EditText>(Resource.Id.edSperrdatum);
            _edSperrgrund = _mainActivity.FindViewById<EditText>(Resource.Id.edSperrgrund);
            _btnClearSperrDatum = _mainActivity.FindViewById<ImageButton>(Resource.Id.btnClearSperrDatum);
            _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);


			_edName.Text = _stateClass._person.Name;
			_edName.Error = null;
			_edNummer.Text = _stateClass._person.Nummer;
			_edPLZ.Error = null;
			_edStrasse.Text = _stateClass._person.Strasse;
			_edPLZ.Text = _stateClass._person.PLZ;
			_edOrt.Text = _stateClass._person.Ort;
            if (_spinnerLand.Adapter != null)
                _spinnerLand.SetSelection(((CountryViewAdapter)_spinnerLand.Adapter).GetItemIndex (_stateClass._person.LandNummer));
			_edTelefon.Text = _stateClass._person.Telefon;
			_edEmail.Text = _stateClass._person.Email;
            _edSperrdatum.Text = _stateClass._person.Sperrdatum;
            _edSperrgrund.Text = _stateClass._person.Sperrgrund;

		}
Пример #9
0
        public override void Restore(MainActivity mainActivity)
        {
            // First assign the new mainActivity
            _mainActivity = mainActivity;

            // Then we have to get reference to the new controls
            _tvEmail = _mainActivity.FindViewById<TextView> (Resource.Id.tvEmail);
            _tvNummer = _mainActivity.FindViewById<TextView> (Resource.Id.tvNummer);
            _tvTelefon = _mainActivity.FindViewById<TextView> (Resource.Id.tvTelefon);
            _tvUmsatz = _mainActivity.FindViewById<TextView> (Resource.Id.tvUmsatz);
            _edMainName = _mainActivity.FindViewById<TextView> (Resource.Id.edMainName);
            _txtClassName = _mainActivity.FindViewById<TextView> (Resource.Id.txtClass);
            _edSearch = _mainActivity.FindViewById<EditText> (Resource.Id.edSearch);
            _list = _mainActivity.FindViewById<ListView> (Resource.Id.left_pane);
            _tvFirst = _mainActivity.FindViewById<TextView>(Resource.Id.tvFirst);
            _tvSecond = _mainActivity.FindViewById<TextView>(Resource.Id.tvSecond);
            _tvThird = _mainActivity.FindViewById<TextView>(Resource.Id.tvThird);
            _tvFourth = _mainActivity.FindViewById<TextView>(Resource.Id.tvFourth);
            _tblColoredLayout = _mainActivity.FindViewById<TableLayout>(Resource.Id.AM_ColoredTableLayout);

            _txtClassName.Text =_mainActivity.Resources.GetString(Resource.String.Artikeln)+ ":";
//            _mainActivity.ActionBar.SelectTab(_mainActivity._tabArtikel);

            ResetControls();

            // if there is a artikel selected
            // Then fill the controls
            _edMainName.Text = _artikel.Bez1;
            _tvEmail.Text = _artikel.EAN ;
            _tvNummer.Text = _artikel.Nummer;
            _tvTelefon.Text = _artikel.Warengruppe;
            _tvUmsatz.Text = _artikel.Bez2;

            // Fill the listview
            if (_adapter != null)
                _list.Adapter = _adapter;
               
            // Restore the fragment
            this._fragmentState.Restore (_mainActivity);
        }