예제 #1
0
        public BookmarksFilter(Configuration.ConfigBookmarksList bookmarksListSettings)
        {
            BookmarksListSettings = bookmarksListSettings;

            text    = "";
            filters = bookmarksListSettings.Filter.Filters;
        }
예제 #2
0
        public BookmarksTreeView(BookmarksFilter bookmarksFilter, BookmarksModel bookmarksModel, Configuration.ConfigBookmarksList bookmarksListSettings, WebBrowserTreeNodeToolTip webBrowserToolTip, IQueryParser queryParser, ICacheFileSystem cacheFileSystem, SearchHandler searchHandler)
        {
            InitializeComponent();

            BookmarksFilter       = bookmarksFilter;
            BookmarksModel        = bookmarksModel;
            BookmarksListSettings = bookmarksListSettings;
            WebBrowserToolTip     = webBrowserToolTip;
            QueryParser           = queryParser;
            CacheFileSystem       = cacheFileSystem;
            SearchHandler         = searchHandler;

            treeView            = new TreeViewEx();
            treeViewContextMenu = new ContextMenu();
            treeViewNodeSorter  = new BookmarksTreeViewNodeSorter();

            SuspendLayout();

            //
            //
            //
            treeViewContextMenu.Tag    = treeView;
            treeViewContextMenu.Popup += TreeViewContextMenu_Popup;

            //
            //
            //
            treeView.HideSelection = false;
            treeView.HotTracking   = true;
            treeView.Dock          = DockStyle.Fill;
            //treeView.TreeViewNodeSorter = new TreeViewNodeSorter();
            treeView.Sorted         = true;
            treeView.ContextMenu    = treeViewContextMenu;
            treeView.NodeActivated += TreeView_NodeActivated;
            treeView.NodeSelected  += TreeView_NodeSelected;
            treeView.AfterExpand   += TreeView_AfterExpand;
            treeView.AfterCollapse += TreeView_AfterCollapse;
            treeView.ItemDrag      += TreeView_ItemDrag;
            treeView.DragDrop      += TreeView_DragDrop;
            treeView.DragOver      += TreeView_DragOver;
            treeView.DragEnter     += TreeView_DragEnter;
            treeView.AllowDrop      = true;

            //
            // this
            //
            Controls.Add(treeView);

            BookmarksModel.FolderAdded  += BookmarksModel_FolderAdded;
            bookmarksFilter.TextChanged += BookmarksFilter_TextChanged;

            ResumeLayout(false);
        }
예제 #3
0
 public BookmarkFormatter(Configuration.ConfigBookmarksList bookmarkListSettings, Configuration.ConfigTagsList tagsListSettings
                          , TagsModel tagsModel
                          , IPathFormatter pathFormatter
                          , ITokenModifier[] tokenModifiers
                          )
 {
     BookmarkListSettings = bookmarkListSettings;
     TagsListSettings     = tagsListSettings;
     TagsModel            = tagsModel;
     PathFormatter        = pathFormatter;
     TokenModifiers       = tokenModifiers;
 }
예제 #4
0
        public BookmarksToolStrip(BookmarksFilter bookmarksFilter, BookmarksModel bookmarksModel, Configuration.ConfigBookmarksList bookmarksListSettings, int filterDelay)
        {
            InitializeComponent();

            BookmarksFilter       = bookmarksFilter;
            BookmarksModel        = bookmarksModel;
            BookmarksListSettings = bookmarksListSettings;

            filterTextBox            = new ToolStripSpringTextBox();
            filterButton             = new ToolStripDropDownButton();
            filterNoneButton         = new ToolStripMenuItem();
            filterAllButton          = new ToolStripMenuItem();
            filterRecentSearchButton = new ToolStripMenuItem();
            filterQuerySearchButton  = new ToolStripMenuItem();
            filterTaggedSearchButton = new ToolStripMenuItem();
            filterLibraryButton      = new ToolStripMenuItem();
            filterDetailsButton      = new ToolStripMenuItem();
            filterDownloadButton     = new ToolStripMenuItem();
            toolStrip   = new ToolStrip();
            filterTimer = new Timer();

            SuspendLayout();

            //
            // filter textbox
            //
            filterTextBox.Dock         = DockStyle.Fill;
            filterTextBox.Margin       = new Padding(0, 0, 6, 0);
            filterTextBox.TextChanged += FilterTextBox_TextChanged;

            //
            // filter button
            //
            filterButton.Text        = "&Filters";
            filterButton.AutoToolTip = false;

            filterNoneButton.Name   = "none";
            filterNoneButton.Text   = "&None";
            filterNoneButton.Click += FilterNoneButton_Click;

            filterAllButton.Name   = "all";
            filterAllButton.Text   = "&All";
            filterAllButton.Click += FilterAllButton_Click;

            filterRecentSearchButton.Name   = "recent";
            filterRecentSearchButton.Text   = "&Recent Searches";
            filterRecentSearchButton.Click += FilterRecentSearchButton_Click;

            filterQuerySearchButton.Name   = "query";
            filterQuerySearchButton.Text   = "&Query Searches";
            filterQuerySearchButton.Click += FilterQuerySearchButton_Click;

            filterTaggedSearchButton.Name   = "tagged";
            filterTaggedSearchButton.Text   = "&Tagged Searches";
            filterTaggedSearchButton.Click += FilterTaggedSearchButton_Click;

            filterLibraryButton.Name   = "library";
            filterLibraryButton.Text   = "&Library";
            filterLibraryButton.Click += FilterLibraryButton_Click;

            filterDetailsButton.Name   = "details";
            filterDetailsButton.Text   = "&Details";
            filterDetailsButton.Click += FilterDetailsButton_Click;

            filterDownloadButton.Name   = "download";
            filterDownloadButton.Text   = "&Download";
            filterDownloadButton.Click += FilterDownloadButton_Click;

            ContextMenuStrip filterContextMenuStrip = new ContextMenuStrip();

            filterContextMenuStrip.ShowCheckMargin = true;
            filterContextMenuStrip.Items.Add(filterNoneButton);
            filterContextMenuStrip.Items.Add(filterAllButton);
            filterContextMenuStrip.Items.Add(new ToolStripSeparator());
            filterContextMenuStrip.Items.Add(filterRecentSearchButton);
            filterContextMenuStrip.Items.Add(filterQuerySearchButton);
            filterContextMenuStrip.Items.Add(filterTaggedSearchButton);
            filterContextMenuStrip.Items.Add(filterLibraryButton);
            filterContextMenuStrip.Items.Add(filterDetailsButton);
            filterContextMenuStrip.Items.Add(filterDownloadButton);

            filterContextMenuStrip.Opening    += Dropdown_Opening;
            filterContextMenuStrip.RenderMode  = ToolStripRenderMode.Professional;
            filterContextMenuStrip.LayoutStyle = ToolStripLayoutStyle.VerticalStackWithOverflow;

            filterButton.DropDown = filterContextMenuStrip;

            //
            // filter timer
            //
            filterTimer.Interval = filterDelay;
            filterTimer.Tick    += FilterTimer_Tick;

            //
            // toolstrip
            //
            toolStrip.Dock        = DockStyle.Fill;
            toolStrip.CanOverflow = false;
            toolStrip.Items.Add(filterTextBox);
            toolStrip.Items.Add(filterButton);

            //
            // this
            //
            Controls.Add(toolStrip);

            bookmarksFilter.FiltersChanged += BookmarksFilter_FiltersChanged;

            ResumeLayout(false);
        }
예제 #5
0
 public BookmarkPromptUtility(BookmarksModel bookmarksModel, Configuration.ConfigBookmarksList bookmarkListSettings)
 {
     BookmarksModel       = bookmarksModel;
     BookmarkListSettings = bookmarkListSettings;
 }