protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.activity_ticketstart); //AddToolbar(Resource.String.report_problem); _intentStartPoint = new IntentStartPointTracker().GetStartPoint(Intent); }
public static void Launch(Context context, WizardTypes wizardType, IntentStartPointTracker.IntentStartPoint startPoint, Dictionary <string, object> bundledItems = null) { Intent intent = new IntentStartPointTracker().GetIntentWithTracking(context, typeof(WizardActivity), startPoint); intent.PutExtra(WizardActivity.BundledWizardType, (int)wizardType); if (bundledItems != null) { intent.PutExtra(WizardActivity.KeyBundledItems, JsonConvert.SerializeObject(bundledItems)); } context.StartActivity(intent); }
public override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); this._startPointIntent = ActivityBase.StartPointIntent; string nationalId = string.Empty; string phone = string.Empty; if (this.Arguments != null) { this._inWizard = this.Arguments.GetBoolean(InWizardActivity, true); nationalId = this.Arguments.GetString(NationalIdKey); phone = this.Arguments.GetString(PhoneKey); } if (savedInstanceState != null) { _personRegistrationInfo = savedInstanceState.GetJsonObject <SalesApp.Core.BL.Models.People.Customer>(BundledRegistrationInfo); if (_inWizard) { _registrationSuccessfulFragment = Activity.SupportFragmentManager.GetFragment(savedInstanceState, RegistrationSuccessfulFragment) as WizardOverlayFragment; _registrationFailedFragment = Activity.SupportFragmentManager.GetFragment(savedInstanceState, RegistrationFailedFragment) as WizardOverlayFragment; //startPointIntent = savedInstanceState.GetEnum<IntentStartPointTracker.IntentStartPoint>(StartPointIntentKey); } else { _inWizard = savedInstanceState.GetBoolean(InWizardKey); } } if (!_inWizard) { if (_personRegistrationInfo == null) { _personRegistrationInfo = new SalesApp.Core.BL.Models.People.Customer(); this._personRegistrationInfo.NationalId = nationalId; this._personRegistrationInfo.Phone = phone; } } _photoWidth = Settings.Instance.CustomerPhotoWidthScale; _photoHeight = Settings.Instance.CustomerPhotoHeightScale; }
public override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); this.SetStyle(StyleNoTitle, 0); if (this.Arguments != null) { _wasSmsRegistration = this.Arguments.GetBoolean(WasRegistrationKey); _success = this.Arguments.GetBoolean(SuccessKey); _titleRes = this.Arguments.GetInt(TitleResKey); this._message = this.Arguments.GetString(MessageKey); _intentStartPoint = this.Arguments.GetString(IntentStartPointKey).ToEnumValue <IntentStartPointTracker.IntentStartPoint>(); _btnPositive = this.Arguments.GetString(BtnPositiveKey); _btnNegative = this.Arguments.GetString(BtnNegativeKey); _retries = this.Arguments.GetInt(Retries); } }
void ResolveStartPoint(Bundle savedInstanceBundle) { if (savedInstanceBundle != null) { string startPoint = savedInstanceBundle.GetString(IntentStartPointTracker.ActivityStartPoint); if (startPoint.IsBlank()) { return; } StartPointIntent = startPoint.ToEnumValue <IntentStartPointTracker.IntentStartPoint>(); } else { if (Intent.Extras != null) { ResolveStartPoint(Intent.Extras); } } }
public async void onActionSelected(int selection) { var trans = GetFragmentManager().BeginTransaction(); switch (selection) { case 0: this.Finish(); break; case 1: RefreshUi(); InitializeUi(); break; case 2: Prospect props = _originalProspect.SearchResult.CastTo <Prospect>(); SaveResponse <Prospect> saveResult = await ProspectsController.SaveAsync(props); if (saveResult.SavedModel == null || saveResult.SavedModel.Id == default(Guid)) { throw new Exception("Could not save prospect"); } break; case 3: // App trackking GoogleAnalyticService.Instance.TrackEvent(GetString(Resource.String.prospect_details), GetString(Resource.String.prospect_details), "Convert Prospect"); Dictionary <string, object> bundledItems = new Dictionary <string, object> { { FragmentBasicInfo.KeyProspectIdBundled, _originalProspect.SearchResult } }; // if we accessed prospect details from a reminder, then return to home after the conversion IntentStartPointTracker.IntentStartPoint startPoint = IntentStartPointTracker.IntentStartPoint.ProspectConversion; if (this._origin == Enums.ProspectDetailsOrigin.ProspectReminderClick) { startPoint = IntentStartPointTracker.IntentStartPoint.WelcomeScreen; } WizardLauncher.Launch ( this, WizardTypes.CustomerRegistration, startPoint, bundledItems ); Finish(); break; case 10: CreatingReminder = true; trans.Hide(_prospectDetailsMainFragment); trans.Show(_customDatePickerFragment); trans.Commit(); SetTitle(Resource.String.create_reminder); break; case 11: CreatingReminder = true; SetTitle(Resource.String.edit_reminder); trans.Hide(_prospectDetailsMainFragment); trans.Show(_customDatePickerFragment); trans.Commit(); break; } }