예제 #1
0
        private void openAndIncludeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string filename = SelectBookmarksFile();

            if (string.IsNullOrEmpty(filename))
            {
                return;
            }

            string password = SelectBookmarksFilePassword();

            if (string.IsNullOrEmpty(password))
            {
                return;
            }

            if (_bookmarkManager.LoadFromFileAndAppendBookmarks(filename, password))
            {
                _bookmarkManager.BookmarkDatasourceUpdated();
                MessageBox.Show("Bookmarksfile was loaded and appended to current bookmarks", "Bookmarks", MessageBoxButtons.OK, MessageBoxIcon.Information);
                ReLoadBookmarks();
                InitBookmarksDataSource();
            }
            else
            {
                MessageBox.Show("Unable to load file, incorrect password?", "Bookmarks", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }