Пример #1
0
        public static void Initialize(this GenericInputDialog gid, Delay d)
        {
            List<DialogQuestion> questions = new List<DialogQuestion>();

            questions.Add(new DialogQuestion("base", "Base value", typeof(double), d.Value));
            questions.Add(new DialogQuestion("dev", "Deviation", typeof(double), d.ValueModifier));

            gid.Initialize("Delay", questions);
        }
Пример #2
0
        public static Command Edit(this GenericInputDialog gid, Delay d)
        {
            gid.Initialize(d);

            if (gid.ShowDialog() == DialogResult.OK)
            {
                d.Value = (double)gid.Results["base"];
                d.ValueModifier = (double)gid.Results["dev"];
            }

            return d;
        }