예제 #1
0
 void CurrentDisplayBlock_SizeChanged(object sender, DisplayBlockSizeChangedHandlerArgs args)
 {
     CurrentLayoutBlock.SetRect(CurrentDisplayBlock.GetRect());
     LayoutBlockBindingSource.EndEdit();
     LayoutBlocksDataGridView.EndEdit();
     LayoutBlocksDataGridView.Refresh();
 }
예제 #2
0
        private void LayoutBlockBindingSource_CurrentChanged(object sender, EventArgs e)
        {
            if (PictureBox.Image == null)
            {
                return;
            }

            if (CurrentLayoutBlock != null)
            {
                CurrentDisplayBlock.SetRect(CurrentLayoutBlock.GetRect());
            }
        }
예제 #3
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());
        }