Ejemplo n.º 1
0
        public void ShowDocumentList()
        {
            if (this.documentStrip.DocumentCount < 1)
            {
                return;
            }

            if (DateTime.Now < this.ignoreShowDocumentListUntil)
            {
                return;
            }

            if (this.imageListMenu.IsImageListVisible)
            {
                return;
            }

            DocumentWorkspace[] documents  = this.documentStrip.DocumentList;
            Image[]             thumbnails = this.documentStrip.DocumentThumbnails;

            ImageListMenu.Item[] items = new ImageListMenu.Item[this.documentStrip.DocumentCount];

            for (int i = 0; i < items.Length; ++i)
            {
                bool selected = (documents[i] == this.documentStrip.SelectedDocument);

                items[i] = new ImageListMenu.Item(
                    thumbnails[i],
                    documents[i].GetFriendlyName(),
                    selected);

                items[i].Tag = documents[i];
            }

            Cursor.Current = Cursors.Default;

            this.documentListButton.ForcedPushedAppearance = true;
            this.imageListMenu.ShowImageList(items);
        }
Ejemplo n.º 2
0
        public void ShowDocumentList()
        {
            if (this.documentStrip.DocumentCount < 2)
            {
                return;
            }

            if (DateTime.Now < this.ignoreShowDocumentListUntil)
            {
                return;
            }

            if (this.imageListMenu.IsImageListVisible)
            {
                return;
            }

            DocumentWorkspace[] documents = this.documentStrip.DocumentList;
            Image[] thumbnails = this.documentStrip.DocumentThumbnails;

            ImageListMenu.Item[] items = new ImageListMenu.Item[this.documentStrip.DocumentCount];

            for (int i = 0; i < items.Length; ++i)
            {
                bool selected = (documents[i] == this.documentStrip.SelectedDocument);

                items[i] = new ImageListMenu.Item(
                    thumbnails[i],
                    documents[i].GetFriendlyName(),
                    selected);

                items[i].Tag = documents[i];
            }

            Cursor.Current = Cursors.Default;

            this.documentListButton.ForcedPushedAppearance = true;
            this.imageListMenu.ShowImageList(items);
        }