예제 #1
0
        public override void CompleteOnCreateEntryActivity(EntryActivity activity)
        {
            Context ctx = activity;

            if (ctx == null)
            {
                ctx = Application.Context;
            }

            if (ShowUserNotifications)
            {
                //show the notifications
                activity.StartNotificationsService(CloseAfterCreate);
            }
            else
            {
                //to avoid getting into inconsistent state (LastOpenedEntry and Notifications): clear notifications:
                CopyToClipboardService.CancelNotifications(activity);
            }
            if (CloseAfterCreate)
            {
                //close
                activity.CloseAfterTaskComplete();
            }
        }
예제 #2
0
파일: AppTask.cs 프로젝트: 77rusa/README
        public override void CompleteOnCreateEntryActivity(EntryActivity activity)
        {
            Context ctx = activity;

            if (ctx == null)
            {
                ctx = Application.Context;
            }

            if ((ShowUserNotifications == ShowUserNotificationsMode.Always) ||
                ((ShowUserNotifications == ShowUserNotificationsMode.WhenTotp) && new Kp2aTotp().TryGetAdapter(new PwEntryOutput(activity.Entry, App.Kp2a.CurrentDb)) != null))
            {
                //show the notifications
                activity.StartNotificationsService(ActivateKeyboard);
            }
            else
            {
                //to avoid getting into inconsistent state (LastOpenedEntry and Notifications): clear notifications:
                CopyToClipboardService.CancelNotifications(activity);
            }
            if (CloseAfterCreate)
            {
                //close
                activity.CloseAfterTaskComplete();
            }
        }
예제 #3
0
 public override void CompleteOnCreateEntryActivity(EntryActivity activity)
 {
     if (App.Kp2a.LastOpenedEntry != null)
     {
         App.Kp2a.LastOpenedEntry.SearchUrl = UrlToSearchFor;
     }
     base.CompleteOnCreateEntryActivity(activity);
 }
예제 #4
0
 public override void AfterAddNewEntry(EntryEditActivity entryEditActivity, PwEntry newEntry)
 {
     EntryActivity.Launch(entryEditActivity, newEntry, -1,
                          new SelectEntryTask {
         ShowUserNotifications = this.ShowUserNotifications
     },
                          ActivityFlags.ForwardResult);
     //no need to call Finish here, that's done in EntryEditActivity ("closeOrShowError")
 }
예제 #5
0
            public bool OnSuggestionClick(int position)
            {
                var cursor = _suggestionsAdapter.Cursor;

                cursor.MoveToPosition(position);
                string entryIdAsHexString = cursor.GetString(cursor.GetColumnIndexOrThrow(SearchManager.SuggestColumnIntentDataId));

                EntryActivity.Launch(_activity, App.Kp2a.GetDb().Entries[new PwUuid(MemUtil.HexStringToByteArray(entryIdAsHexString))], -1, _activity.AppTask);
                return(true);
            }
예제 #6
0
 public PluginPopupMenuItem(EntryActivity activity, string pluginPackage, string fieldId, string popupItemId, string displayText, int iconId, Bundle bundleExtra)
 {
     _activity = activity;
     _pluginPackage = pluginPackage;
     _fieldId = fieldId;
     _popupItemId = popupItemId;
     _displayText = displayText;
     _iconId = iconId;
     _bundleExtra = bundleExtra;
 }
예제 #7
0
 public PluginPopupMenuItem(EntryActivity activity, string pluginPackage, string fieldId, string popupItemId, string displayText, int iconId, Bundle bundleExtra)
 {
     _activity      = activity;
     _pluginPackage = pluginPackage;
     _fieldId       = fieldId;
     _popupItemId   = popupItemId;
     _displayText   = displayText;
     _iconId        = iconId;
     _bundleExtra   = bundleExtra;
 }
예제 #8
0
        public override void CompleteOnCreateEntryActivity(EntryActivity activity)
        {
            //if the database is readonly (or no URL exists), don't offer to modify the URL
            if ((App.Kp2a.GetDb().CanWrite == false) || (String.IsNullOrEmpty(UrlToSearchFor)))
            {
                base.CompleteOnCreateEntryActivity(activity);
                return;
            }


            AskAddUrlThenCompleteCreate(activity, UrlToSearchFor);
        }
예제 #9
0
파일: AppTask.cs 프로젝트: 77rusa/README
        public override void CompleteOnCreateEntryActivity(EntryActivity activity)
        {
            if (App.Kp2a.LastOpenedEntry != null)
            {
                App.Kp2a.LastOpenedEntry.SearchUrl = UrlToSearchFor;
            }


            //if the database is readonly (or no URL exists), don't offer to modify the URL
            if ((App.Kp2a.CurrentDb.CanWrite == false) || (String.IsNullOrEmpty(UrlToSearchFor) || keepass2android.ShareUrlResults.GetSearchResultsForUrl(UrlToSearchFor).Entries.Any(e => e == activity.Entry)))
            {
                base.CompleteOnCreateEntryActivity(activity);
                return;
            }

            AskAddUrlThenCompleteCreate(activity, UrlToSearchFor);
        }
예제 #10
0
        /// <summary>
        /// brings up a dialog asking the user whether he wants to add the given URL to the entry for automatic finding
        /// </summary>
        public void AskAddUrlThenCompleteCreate(EntryActivity activity, string url)
        {
            AlertDialog.Builder builder = new AlertDialog.Builder(activity);
            builder.SetTitle(activity.GetString(Resource.String.AddUrlToEntryDialog_title));

            builder.SetMessage(activity.GetString(Resource.String.AddUrlToEntryDialog_text, new Java.Lang.Object[] { url }));

            builder.SetPositiveButton(activity.GetString(Resource.String.yes), (dlgSender, dlgEvt) =>
            {
                activity.AddUrlToEntry(url, () => base.CompleteOnCreateEntryActivity(activity));
            });

            builder.SetNegativeButton(activity.GetString(Resource.String.no), (dlgSender, dlgEvt) =>
            {
                base.CompleteOnCreateEntryActivity(activity);
            });

            Dialog dialog = builder.Create();

            dialog.Show();
        }
예제 #11
0
 public virtual void CompleteOnCreateEntryActivity(EntryActivity activity)
 {
     activity.StartNotificationsService(false);
 }
 public WriteBinaryToFilePopupItem(string key, EntryActivity activity)
 {
     _key      = key;
     _activity = activity;
 }
예제 #13
0
 public ExportBinaryProcessManager(int requestCode, EntryActivity activity, Bundle savedInstanceState) : base(requestCode, activity)
 {
     _binaryToSave = savedInstanceState.GetString("BinaryToSave", null);
 }
예제 #14
0
 public GotoUrlMenuItem(EntryActivity ctx, string urlFieldKey)
 {
     UrlFieldKey = urlFieldKey;
     _ctx        = ctx;
 }
 public ToggleVisibilityPopupMenuItem(EntryActivity activity, TextView valueView)
 {
     _activity  = activity;
     _valueView = valueView;
 }
예제 #16
0
파일: AppTask.cs 프로젝트: pythe/wristpass
        /// <summary>
        /// brings up a dialog asking the user whether he wants to add the given URL to the entry for automatic finding
        /// </summary>
        public void AskAddUrlThenCompleteCreate(EntryActivity activity, string url)
        {
            AlertDialog.Builder builder = new AlertDialog.Builder(activity);
            builder.SetTitle(activity.GetString(Resource.String.AddUrlToEntryDialog_title));

            builder.SetMessage(activity.GetString(Resource.String.AddUrlToEntryDialog_text, new Java.Lang.Object[] { url }));

            builder.SetPositiveButton(activity.GetString(Resource.String.yes), (dlgSender, dlgEvt) =>
            {
                activity.AddUrlToEntry(url, () => base.CompleteOnCreateEntryActivity(activity));
            });

            builder.SetNegativeButton(activity.GetString(Resource.String.no), (dlgSender, dlgEvt) =>
            {
                base.CompleteOnCreateEntryActivity(activity);
            });

            Dialog dialog = builder.Create();
            dialog.Show();
        }
예제 #17
0
 public PluginFieldReceiver(EntryActivity activity)
 {
     _activity = activity;
 }
예제 #18
0
 public virtual void LaunchActivityForEntry(PwEntry pwEntry, int pos)
 {
     EntryActivity.Launch(this, pwEntry, pos, AppTask);
 }
예제 #19
0
 public OpenBinaryPopupItem(string key, EntryActivity entryActivity)
 {
     _key = key;
     _entryActivity = entryActivity;
 }
예제 #20
0
 public ToggleVisibilityPopupMenuItem(EntryActivity activity)
 {
     _activity = activity;
 }
예제 #21
0
 public PluginFieldReceiver(EntryActivity activity)
 {
     _activity = activity;
 }
예제 #22
0
파일: AppTask.cs 프로젝트: pythe/wristpass
 public virtual void CompleteOnCreateEntryActivity(EntryActivity activity)
 {
     activity.StartNotificationsService(false);
 }
예제 #23
0
파일: AppTask.cs 프로젝트: pythe/wristpass
 public override void CompleteOnCreateEntryActivity(EntryActivity activity)
 {
     if (ShowUserNotifications)
     {
         //show the notifications
         activity.StartNotificationsService(CloseAfterCreate);
     }
     else
     {
         //to avoid getting into inconsistent state (LastOpenedEntry and Notifications): clear notifications:
         CopyToClipboardService.CancelNotifications(activity);
     }
     if (CloseAfterCreate)
     {
         //close
         activity.CloseAfterTaskComplete();
     }
 }
예제 #24
0
파일: AppTask.cs 프로젝트: pythe/wristpass
        public override void CompleteOnCreateEntryActivity(EntryActivity activity)
        {
            //if the database is readonly (or no URL exists), don't offer to modify the URL
            if ((App.Kp2a.GetDb().CanWrite == false) || (String.IsNullOrEmpty(UrlToSearchFor)))
            {
                base.CompleteOnCreateEntryActivity(activity);
                return;
            }

            AskAddUrlThenCompleteCreate(activity, UrlToSearchFor);
        }
예제 #25
0
 public override void CompleteOnCreateEntryActivity(EntryActivity activity)
 {
     App.Kp2a.GetDb().LastOpenedEntry.SearchUrl = UrlToSearchFor;
     base.CompleteOnCreateEntryActivity(activity);
 }
예제 #26
0
 public PluginActionReceiver(EntryActivity activity)
 {
     _activity = activity;
 }
예제 #27
0
 public OpenBinaryPopupItem(string key, EntryActivity entryActivity)
 {
     _key           = key;
     _entryActivity = entryActivity;
 }
예제 #28
0
파일: AppTask.cs 프로젝트: pythe/wristpass
 public override void CompleteOnCreateEntryActivity(EntryActivity activity)
 {
     //if the user selects an entry before creating the new one, we're not closing the app
     base.CompleteOnCreateEntryActivity(activity);
 }
예제 #29
0
 public override void CompleteOnCreateEntryActivity(EntryActivity activity)
 {
     //if the user selects an entry before creating the new one, we're not closing the app
     base.CompleteOnCreateEntryActivity(activity);
 }
 public ToggleVisibilityPopupMenuItem(EntryActivity activity)
 {
     _activity = activity;
 }
예제 #31
0
 public PluginActionReceiver(EntryActivity activity)
 {
     _activity = activity;
 }
예제 #32
0
 public GotoUrlMenuItem(EntryActivity ctx)
 {
     _ctx = ctx;
 }
예제 #33
0
 public WriteBinaryToFilePopupItem(string key, EntryActivity activity)
 {
     _key = key;
     _activity = activity;
 }
예제 #34
0
 public GotoUrlMenuItem(EntryActivity ctx)
 {
     _ctx = ctx;
 }