Beispiel #1
0
 private void AllDocumentsForm_Load(object sender, EventArgs e)
 {
     if (_documents == null)
     {
         _documents = Annotations.GetLruPdfs(null);
     }
     RefreshDocumentList();
     showAllAnnotationsForDocumentButton.Enabled = _documents.Count >= 0;
 }
Beispiel #2
0
        private void LoadLruList()
        {
            var pdfs = Annotations.GetLruPdfs().OrderByDescending(pdf => pdf.LastSeen).ToList();

            openLruPdfMenuItem.DropDownItems.Clear();
            foreach (var pdf in pdfs)
            {
                var fileName = Path.GetFileName(pdf.Path);
                var txt      = $"{fileName} {pdf.LastSeen}";
                var tsi      = openLruPdfMenuItem.DropDownItems.Add(txt);
                tsi.ToolTipText = pdf.Path;
                tsi.AutoToolTip = true;
                tsi.Click      += (s, e) => LoadPdf(pdf.Path);
            }

            openLruPdfMenuItem.Enabled = pdfs.Count > 0;
        }