protected override void CheckChanged(bool isChecked)
        {
            Size clientSize = _form.GetClientSize();

            using (CustomSizeDialog customSizeDialog = new CustomSizeDialog(clientSize))
            {
                if (customSizeDialog.ShowDialog() == DialogResult.OK)
                {
                    Size clientSize2 = SizeHelper.FromString(customSizeDialog.WidthText, customSizeDialog.HeightText);
                    _form.SetClientSize(clientSize2);
                }
            }
        }
Ejemplo n.º 2
0
        private void CustomSizeClick(object sender, EventArgs e)
        {
            Button button = sender as Button;
            Size   size   = SizeHelper.Parse(button.Text);

            using (CustomSizeDialog customSizeDialog = new CustomSizeDialog(size))
            {
                if (customSizeDialog.ShowDialog() == DialogResult.OK)
                {
                    button.Text = customSizeDialog.WidthText + SizeHelper.Separator + customSizeDialog.HeightText;
                    _thumbnailPixelsRadio.Checked = true;
                }
            }
        }
Ejemplo n.º 3
0
        private void CustomSizeClick(object sender, EventArgs e)
        {
            Button      button      = sender as Button;
            RadioButton radioButton = button.Parent.GetNextControl(button, forward: false) as RadioButton;

            radioButton.Checked = true;
            Size size = SizeHelper.Parse(button.Text);

            using (CustomSizeDialog customSizeDialog = new CustomSizeDialog(size))
            {
                if (customSizeDialog.ShowDialog() == DialogResult.OK)
                {
                    button.Text = customSizeDialog.WidthText + SizeHelper.Separator + customSizeDialog.HeightText;
                }
            }
        }