re-introduce (simplified) dark theme

ask confirmation message before permanently deleting entries (when no recycle bin is present)
This commit is contained in:
Philipp Crocoll
2015-12-22 05:42:02 +01:00
parent 169994eb06
commit c048399c63
31 changed files with 343 additions and 109 deletions

View File

@@ -43,7 +43,7 @@ namespace keepass2android
}
}
protected override UiStringKey QuestionsResourceId
protected override UiStringKey QuestionRecycleResourceId
{
get
{
@@ -51,6 +51,14 @@ namespace keepass2android
}
}
protected override UiStringKey QuestionNoRecycleResourceId
{
get
{
return UiStringKey.AskDeletePermanentlyEntryNoRecycle;
}
}
protected override void PerformDelete(List<PwGroup> touchedGroups, List<PwGroup> permanentlyDeletedGroups)
{
DoDeleteEntry(_entry, touchedGroups);

View File

@@ -61,14 +61,19 @@ namespace keepass2android
}
}
protected override UiStringKey QuestionsResourceId
protected override UiStringKey QuestionRecycleResourceId
{
get
{
return UiStringKey.AskDeletePermanentlyGroup;
}
}
protected override UiStringKey QuestionNoRecycleResourceId
{
get { return UiStringKey.AskDeletePermanentlyGroupNoRecycle; }
}
protected override void PerformDelete(List<PwGroup> touchedGroups, List<PwGroup> permanentlyDeletedGroups)
{
DoDeleteGroup(_group, touchedGroups, permanentlyDeletedGroups);

View File

@@ -50,11 +50,16 @@ namespace keepass2android
get { return _canRecycle; }
}
protected override UiStringKey QuestionsResourceId
protected override UiStringKey QuestionRecycleResourceId
{
get { return UiStringKey.AskDeletePermanentlyItems; }
}
protected override UiStringKey QuestionNoRecycleResourceId
{
get { return UiStringKey.AskDeletePermanentlyItemsNoRecycle; }
}
protected override void PerformDelete(List<PwGroup> touchedGroups, List<PwGroup> permanentlyDeletedGroups)
{
foreach (var g in _elementsToDelete.OfType<PwGroup>())

View File

@@ -107,17 +107,23 @@ namespace keepass2android
else { System.Diagnostics.Debug.Assert(pgRecycleBin.Uuid.Equals(Db.KpDatabase.RecycleBinUuid)); }
}
protected abstract UiStringKey QuestionsResourceId
protected abstract UiStringKey QuestionRecycleResourceId
{
get;
}
protected abstract UiStringKey QuestionNoRecycleResourceId
{
get;
}
public void Start()
{
if (CanRecycle)
{
App.AskYesNoCancel(UiStringKey.AskDeletePermanently_title,
QuestionsResourceId,
QuestionRecycleResourceId,
(dlgSender, dlgEvt) =>
{
DeletePermanently = true;
@@ -138,11 +144,22 @@ namespace keepass2android
}
else
{
ProgressTask pt = new ProgressTask(App, Ctx, this);
pt.Run();
App.AskYesNoCancel(UiStringKey.AskDeletePermanently_title,
QuestionNoRecycleResourceId,
(dlgSender, dlgEvt) =>
{
ProgressTask pt = new ProgressTask(App, Ctx, this);
pt.Run();
},
null,
(dlgSender, dlgEvt) => { },
Ctx);
}
}
protected void DoDeleteEntry(PwEntry pe, List<PwGroup> touchedGroups)
{
PwDatabase pd = Db.KpDatabase;