Exemplo n.º 1
0
        private void addBookmarkToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (_bookmarkService.BookmarkManager == null)
            {
                MessageBox.Show(Resources.Please_unlock_bookmarks_first);
                return;
            }

            if (ImageSourceDataAvailable)
            {
                if (_fullScreen)
                {
                    Cursor.Show();
                }

                var starupPosition = new Point(Location.X, Location.Y);
                starupPosition.X += addBookmarkToolStripMenuItem.Width;
                starupPosition.Y += addBookmarkToolStripMenuItem.Height + (Height - ClientSize.Height);

                if (_imageReferenceCollection.CurrentImage != null)
                {
                    _formAddBookmark.Init(starupPosition, _imageReferenceCollection.CurrentImage);
                    _formAddBookmark.ShowDialog(this);
                    if (_fullScreen)
                    {
                        Cursor.Hide();
                    }
                }
            }
        }
Exemplo n.º 2
0
        private void menuItemBookmark_Click(object sender, EventArgs e)
        {
            var fi     = new FileInfo(_maximizedImgFilename);
            var imgRef = new ImageReferenceElement
            {
                CompletePath   = _maximizedImgFilename,
                Size           = fi.Length,
                CreationTime   = fi.CreationTime,
                LastAccessTime = fi.LastAccessTime,
                LastWriteTime  = fi.LastWriteTime,
                FileName       = fi.Name,
                Directory      = fi.DirectoryName
            };

            _formAddBookmark.Init(contextMenuFullSizeImg.Location, imgRef);
            _formAddBookmark.ShowDialog(this);
        }