Пример #1
0
  public void runCancelAction(int index) {
    if (index < 0 || index >= myCancelActionsList.size()) {
      return;
    }

    final CancelActionDescription description = myCancelActionsList.get(index);
    switch (description.Type) {
      case library:
        runAction(ActionCode.SHOW_LIBRARY);
        break;
      case networkLibrary:
        runAction(ActionCode.SHOW_NETWORK_LIBRARY);
        break;
      case previousBook:
        openBook(Library.Instance().getPreviousBook(), null, null);
        break;
      case returnTo:
        {
          final Bookmark b = ((BookmarkDescription) description).Bookmark;
          b.delete();
          gotoBookmark(b);
          break;
        }
      case close:
        closeWindow();
        break;
    }
  }
Пример #2
0
 @Override
 public void openFile(ZLFile file, Runnable postAction) {
   openBook(createBookForFile(file), null, postAction);
 }