示例#1
0
        private void LayoutBlockBindingSource_CurrentChanged(object sender, EventArgs e)
        {
            if (PictureBox.Image == null)
            {
                return;
            }

            if (CurrentLayoutBlock != null)
            {
                CurrentDisplayBlock.SetRect(CurrentLayoutBlock.GetRect());
            }
        }
示例#2
0
        private void LoadImageToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (ImageOpenFileDialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            var image = Image.FromFile(ImageOpenFileDialog.FileName);

            PictureBox.Image  = image;
            PictureBox.Width  = image.Width;
            PictureBox.Height = image.Height;

            CurrentDisplayBlock.SetRect(CurrentLayoutBlock.GetRect());
        }