private void RepopulateLibraries()
        {
            int MAX_EXPANDED_CHILD_COUNT = 1;

            // Sort the children by last accessed order
            List <WebLibraryDetail> children = new List <WebLibraryDetail>();

            children.AddRange(WebLibraryManager.Instance.WebLibraryDetails_All_IncludingDeleted);
            WebLibraryManager.Instance.SortWebLibraryDetailsByLastAccessed(children);

            // Add the children to our control
            PanelWebLibraries.Children.Clear();
            for (int i = 0; i < children.Count; ++i)
            {
                WebLibraryDetail web_library_detail = children[i];

                // Only allow the first few to be mega expanded
                bool open_cover_flow = !concise_view && i < MAX_EXPANDED_CHILD_COUNT && !web_library_detail.Deleted;

                WebLibraryDetailControl web_library_detail_control = new WebLibraryDetailControl(concise_view, open_cover_flow, OnChildWebLibrarySelected);
                web_library_detail_control.DataContext = web_library_detail;

                if (web_library_detail.Deleted)
                {
                    web_library_detail_control.Opacity = 0.5;
                }

                PanelWebLibraries.Children.Add(web_library_detail_control);
                PanelWebLibraries.Children.Add(new AugmentedSpacer());
            }
        }
Exemple #2
0
        public WebLibraryDetailControlPopup(WebLibraryDetailControl web_library_detail_control)
        {
            this.web_library_detail_control = web_library_detail_control;

            InitializeComponent();

            popup = new AugmentedPopup(this);

            MenuOpenLibrary.Click         += MenuOpenLibrary_Click;
            MenuCustomiseIcon.Click       += MenuCustomiseIcon_Click;
            MenuCustomiseBackground.Click += MenuCustomiseBackground_Click;
        }
 private static void forwardWeakEvent(WebLibraryDetailControl me, object event_sender, Library.PDFDocumentEventArgs args)
 {
     me.library_OnDocumentsChanged();
 }