Exemplo n.º 1
0
 private void FileSelected(string filePath)
 {
     FileBookmarks.Clear();
     FilePath = filePath;
     ExtLib.Bookmarks.GetBookmarks(filePath).ForEach(x => FileBookmarks.Add(x));
     PageNumber = ExtLib.Bookmarks.GetLastPage(filePath);
 }
Exemplo n.º 2
0
        void ExecuteImportBookmarksCommand()
        {
            OpenFileDialog openFile = new OpenFileDialog();

            openFile.Title            = "Valitse kirjanmerkkitiedosto";
            openFile.Filter           = "Tekstitiedosto |*.txt";
            openFile.InitialDirectory = Path.GetDirectoryName(FilePath);

            if (openFile.ShowDialog() != true)
            {
                return;
            }

            List <IBookmark> imported = ExtLib.Bookmarks.ImportBookmarks(openFile.FileName, PageNumber);

            FileBookmarks.Clear();
            foreach (IBookmark import in imported)
            {
                FileBookmarks.Add(import);
            }
        }