void CurrentDisplayBlock_SizeChanged(object sender, DisplayBlockSizeChangedHandlerArgs args) { CurrentLayoutBlock.SetRect(CurrentDisplayBlock.GetRect()); LayoutBlockBindingSource.EndEdit(); LayoutBlocksDataGridView.EndEdit(); LayoutBlocksDataGridView.Refresh(); }
private void LayoutBlockBindingSource_CurrentChanged(object sender, EventArgs e) { if (PictureBox.Image == null) { return; } if (CurrentLayoutBlock != null) { CurrentDisplayBlock.SetRect(CurrentLayoutBlock.GetRect()); } }
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()); }