Esempio n. 1
0
        private void gridSizeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            GridOptionsDialog dialog = new GridOptionsDialog();

            if (CurrentImage != null)
            {
                dialog.MaxWidth  = CurrentImage.Width;
                dialog.MaxHeight = CurrentImage.Height;

                dialog.GridWidth            = CurrentImage.GridWidth;
                dialog.GridHeight           = CurrentImage.GridHeight;
                dialog.GridHorizontalOffset = CurrentImage.GridHorizontalOffset;
                dialog.GridVerticalOffset   = CurrentImage.GridVerticalOffset;
                dialog.GridColour           = CurrentImage.GridColour;
            }
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                CurrentImage.GridWidth            = dialog.GridWidth;
                CurrentImage.GridHeight           = dialog.GridHeight;
                CurrentImage.GridHorizontalOffset = dialog.GridHorizontalOffset;
                CurrentImage.GridVerticalOffset   = dialog.GridVerticalOffset;
                CurrentImage.GridColour           = dialog.GridColour;
            }
        }
Esempio n. 2
0
        private void gridSizeToolStripMenuItem_Click( object sender, EventArgs e )
        {
            GridOptionsDialog dialog = new GridOptionsDialog();
            if ( CurrentImage != null )
            {
                dialog.MaxWidth = CurrentImage.Width;
                dialog.MaxHeight = CurrentImage.Height;

                dialog.GridWidth = CurrentImage.GridWidth;
                dialog.GridHeight = CurrentImage.GridHeight;
                dialog.GridHorizontalOffset = CurrentImage.GridHorizontalOffset;
                dialog.GridVerticalOffset = CurrentImage.GridVerticalOffset;
                dialog.GridColour = CurrentImage.GridColour;
            }
            if ( dialog.ShowDialog() == DialogResult.OK )
            {
                CurrentImage.GridWidth = dialog.GridWidth;
                CurrentImage.GridHeight = dialog.GridHeight;
                CurrentImage.GridHorizontalOffset = dialog.GridHorizontalOffset;
                CurrentImage.GridVerticalOffset = dialog.GridVerticalOffset;
                CurrentImage.GridColour = dialog.GridColour;
            }
        }