public override void StartInGroupActivity(GroupBaseActivity groupBaseActivity) { base.StartInGroupActivity(groupBaseActivity); if (GroupIsFound(groupBaseActivity)) // Group has been found: display toaster and stop here { if (ToastEnable) { String toastMessage = groupBaseActivity.GetString(Resource.String.NavigationToGroupCompleted_message, new Java.Lang.Object[] { FullGroupName }); Toast.MakeText(groupBaseActivity, toastMessage, ToastLength.Long).Show(); } groupBaseActivity.StartTask(TaskToBeLaunchedAfterNavigation); return; } else if ((groupBaseActivity.FullGroupId != null) && _fullGroupIds.Contains(groupBaseActivity.FullGroupId.FullId)) // Need to down up in groups tree // Get next Group Uuid { var linkedListNode = _fullGroupIds.Find(groupBaseActivity.FullGroupId.FullId); if (linkedListNode != null) { //Note: Resharper says there is a possible NullRefException. //This is not the case because it was checked above if we're already there or not. String nextGroupFullId = linkedListNode.Next.Value; ElementAndDatabaseId fullId = new ElementAndDatabaseId(nextGroupFullId); PwUuid nextGroupPwUuid = new PwUuid(MemUtil.HexStringToByteArray(fullId.ElementIdString)); // Create Group Activity PwGroup nextGroup = App.Kp2a.GetDatabase(fullId.DatabaseId).GroupsById[nextGroupPwUuid]; GroupActivity.Launch(groupBaseActivity, nextGroup, this, new ActivityLaunchModeRequestCode(0)); } return; } else // Need to go up in groups tree { ElementAndDatabaseId fullId = new ElementAndDatabaseId(_fullGroupIds.Last.Value); var targetDb = App.Kp2a.GetDatabase(fullId.DatabaseId); if (App.Kp2a.CurrentDb != targetDb) { App.Kp2a.CurrentDb = targetDb; GroupActivity.Launch(groupBaseActivity, targetDb.Root, this, new ActivityLaunchModeForward()); } else { SetActivityResult(groupBaseActivity, KeePass.ExitNormal); } groupBaseActivity.Finish(); } }
public override void StartInGroupActivity(GroupBaseActivity groupBaseActivity) { base.StartInGroupActivity(groupBaseActivity); if (GroupIsFound(groupBaseActivity)) // Group has been found: display toaster and stop here { if (ToastEnable) { String toastMessage = groupBaseActivity.GetString(Resource.String.NavigationToGroupCompleted_message, new Java.Lang.Object[] { FullGroupName }); Toast.MakeText(groupBaseActivity, toastMessage, ToastLength.Long).Show(); } groupBaseActivity.StartTask(TaskToBeLaunchedAfterNavigation); return; } else if (_groupUuid.Contains(groupBaseActivity.UuidGroup)) // Need to go up in groups tree // Get next Group Uuid { var linkedListNode = _groupUuid.Find(groupBaseActivity.UuidGroup); if (linkedListNode != null) { //Note: Resharper says there is a possible NullRefException. //This is not the case because it was checked above if we're already there or not. String nextGroupUuid = linkedListNode.Next.Value; PwUuid nextGroupPwUuid = new PwUuid(MemUtil.HexStringToByteArray(nextGroupUuid)); // Create Group Activity PwGroup nextGroup = App.Kp2a.GetDb().Groups [nextGroupPwUuid]; GroupActivity.Launch(groupBaseActivity, nextGroup, this); } return; } else // Need to go down in groups tree { SetActivityResult(groupBaseActivity, KeePass.ExitNormal); groupBaseActivity.Finish(); } }
public override void StartInGroupActivity(GroupBaseActivity groupBaseActivity) { base.StartInGroupActivity(groupBaseActivity); if (GroupIsFound(groupBaseActivity) ){ // Group has been found: display toaster and stop here if (ToastEnable) { String toastMessage = groupBaseActivity.GetString (Resource.String.NavigationToGroupCompleted_message, new Java.Lang.Object[] { FullGroupName}); Toast.MakeText (groupBaseActivity, toastMessage, ToastLength.Long).Show (); } groupBaseActivity.StartTask (TaskToBeLaunchedAfterNavigation); return; } else if (_groupUuid.Contains(groupBaseActivity.UuidGroup)) { // Need to go up in groups tree // Get next Group Uuid var linkedListNode = _groupUuid.Find(groupBaseActivity.UuidGroup); if (linkedListNode != null) { //Note: Resharper says there is a possible NullRefException. //This is not the case because it was checked above if we're already there or not. String nextGroupUuid = linkedListNode.Next.Value; PwUuid nextGroupPwUuid = new PwUuid (MemUtil.HexStringToByteArray (nextGroupUuid)); // Create Group Activity PwGroup nextGroup = App.Kp2a.GetDb ().Groups [nextGroupPwUuid]; GroupActivity.Launch (groupBaseActivity, nextGroup, this); } return; } else { // Need to go down in groups tree SetActivityResult(groupBaseActivity, KeePass.ExitNormal); groupBaseActivity.Finish(); } }