Ejemplo n.º 1
0
        public ARChooser()
            : base("Clear user-selected ARs...", "Select AR...")
        {
            base.Getter = delegate
            {
                decimal result;
                if (NumberChooser.ShowDialog(
                        "Enter your AR:", "Custom AR", 3,
                        0.1M, 10M, (Value ?? Dar.ITU16x9PAL).ar, out result) == DialogResult.OK)
                {
                    return(new Dar(result));
                }
                else
                {
                    return(null);
                }
            };

            HasLater = true;

            if (MainForm.Instance != null)  // Form designer fix
            {
                CustomDARs = MainForm.Instance.Settings.CustomDARs;
            }
        }
Ejemplo n.º 2
0
        public static DialogResult ShowDialog(string message, string title, 
            int decimals, decimal min, decimal max,
            decimal defaultNum, out decimal number)
        {
            NumberChooser n = new NumberChooser();
            n.Text = title;
            n.label1.Text = message;
            n.numericUpDown1.DecimalPlaces = decimals;
            n.numericUpDown1.Minimum = min;
            n.numericUpDown1.Maximum = max;
            n.numericUpDown1.Value = defaultNum;

            DialogResult r = n.ShowDialog();
            number = n.numericUpDown1.Value;
            return r;
        }
Ejemplo n.º 3
0
        public static DialogResult ShowDialog(string message, string title,
                                              int decimals, decimal min, decimal max,
                                              decimal defaultNum, out decimal number)
        {
            NumberChooser n = new NumberChooser();

            n.Text        = title;
            n.label1.Text = message;
            n.numericUpDown1.DecimalPlaces = decimals;
            n.numericUpDown1.Minimum       = min;
            n.numericUpDown1.Maximum       = max;
            n.numericUpDown1.Value         = defaultNum;

            DialogResult r = n.ShowDialog();

            number = n.numericUpDown1.Value;
            return(r);
        }
Ejemplo n.º 4
0
 public FPSChooser()
     : base("Clear user-selected framerates...", "Select framerate...")
 {
     base.Getter = delegate
     {
         decimal result;
         if (NumberChooser.ShowDialog(
                 "Enter your framerate:", "Custom framerate", 3,
                 1M, 1000M, Value ?? 25M, out result) == DialogResult.OK)
         {
             return(new FPS(result));
         }
         else
         {
             return(null);
         }
     };
     StandardItems = Framerates;
 }
Ejemplo n.º 5
0
        public ARChooser()
            : base("Clear user-selected ARs...", "Select AR...")
        {
            base.Getter = delegate
            {
                decimal result;
                if (NumberChooser.ShowDialog(
                        "Enter your AR:", "Custom AR", 3,
                        0.1M, 10M, (Value ?? Dar.ITU16x9PAL).ar, out result) == DialogResult.OK)
                {
                    return(new Named <Dar>(new Dar(result).ToString(), new Dar(result)));
                }
                else
                {
                    return(null);
                }
            };

            HasLater = true;
        }