Пример #1
0
        public static DialogResult ShowDialog(Dar defaultDar, out Dar newDar)
        {
            AspectRatioChooser n = new AspectRatioChooser();

            n.SetValues(defaultDar);
            if (defaultDar.Y < 1)
            {
                n.radioButton2.Checked = true;
            }
            else
            {
                n.radioButton1.Checked = true;
            }

            DialogResult r = n.ShowDialog();

            if (n.radioButton1.Checked)
            {
                newDar = new Dar(n.numericUpDown1.Value);
            }
            else
            {
                newDar = new Dar((ulong)n.numericUpDown2.Value, (ulong)n.numericUpDown3.Value);
            }
            return(r);
        }
Пример #2
0
        public ARChooser()
            : base("Clear user-selected ARs...", "Select AR...")
        {
            base.Getter = delegate
            {
                Dar result;
                if (AspectRatioChooser.ShowDialog(Value ?? Dar.ITU16x9PAL, out result) == DialogResult.OK)
                {
                    return(result);
                }
                else
                {
                    return(null);
                }
            };

            HasLater = true;

            if (MainForm.Instance != null)  // Form designer fix
            {
                CustomDARs = MainForm.Instance.Settings.CustomDARs;
            }
        }