Beispiel #1
0
        /// <summary>
        /// Create deep copy of current instance.
        /// </summary>
        /// <returns>Deep copy.</returns>
        public DisplaySettings Copy()
        {
            var result = new DisplaySettings();

            result.Copy(this);
            return(result);
        }
Beispiel #2
0
        public static DialogResult ShowDialog(DisplaySettings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException("settings");
            }

            using (var form = new DisplayOptionsForm(settings.Copy()))
            {
                var dialogResult = form.ShowDialog();
                if (dialogResult == DialogResult.OK)
                {
                    settings.Copy(form._settings);
                }

                return(dialogResult);
            }
        }