Пример #1
0
        /// <summary>
        /// Determines whether the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:System.Object"/>.
        /// </summary>
        /// <param name="obj">The <see cref="T:System.Object"/> to compare with the current <see cref="T:System.Object"/>.</param>
        /// <returns>
        /// true if the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:System.Object"/>; otherwise, false.
        /// </returns>
        /// <exception cref="T:System.NullReferenceException">The <paramref name="obj"/> parameter is null.</exception>
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            DesignParameters compared = (DesignParameters)obj;

            return(this.BarsBackColor == compared.BarsBackColor &&
                   this.FormBackColor == compared.FormBackColor);
        }
Пример #2
0
        /// <summary>
        /// Displays a message box with the specified text and parameters.
        /// </summary>
        /// <param name="text">The text.</param>
        /// <param name="checkBoxState">The final value of the "Do not show this dialog again" checkbox.</param>
        /// <param name="title">The title.</param>
        /// <param name="helpFile">The help file.</param>
        /// <param name="helpTopic">The help topic.</param>
        /// <param name="initialization">The initialization.</param>
        /// <param name="buttons">The buttons.</param>
        /// <param name="icon">The icon.</param>
        /// <param name="customIcon">The custom icon.</param>
        /// <param name="defaultButton">The default button.</param>
        /// <param name="customButtons">The custom buttons.</param>
        /// <param name="buttonsLayout">The buttons layout.</param>
        /// <param name="autoSizeMode">The auto size mode.</param>
        /// <param name="position">The position.</param>
        /// <param name="showHelpButton">if set to <c>true</c> shows help button.</param>
        /// <param name="helpNavigator">The help navigator.</param>
        /// <param name="showDoNotShowAgainCheckBox">if set to <c>true</c> shows the do not show again check box.</param>
        /// <param name="style">The style.</param>
        /// <param name="autoClose">The auto close configuration.</param>
        /// <param name="design">The design.</param>
        /// <param name="titleStyle">The title style.</param>
        /// <param name="titleIcon">The title icon.</param>
        /// <param name="legacyButtons">The legacy buttons.</param>
        /// <param name="legacyIcon">The legacy icon.</param>
        /// <param name="legacyDefaultButton">The legacy default button.</param>
        /// <param name="behavior">The behavior.</param>
        /// <param name="callback">The callback.</param>
        /// <param name="opacity">The opacity.</param>
        /// <param name="parentWindow">The parent <see cref="KryptonForm">window.</see></param>
        /// <param name="parent">The parent form.</param>
        /// <param name="order">The z-order</param>
        /// <param name="sound">The sound configuration</param>
        /// <returns>
        /// One of the <see cref="InformationBoxResult"/> values.
        /// </returns>
        public static InformationBoxResult Show(string text,
                                                out CheckState checkBoxState,
                                                string title     = "",
                                                string helpFile  = "",
                                                string helpTopic = "",
                                                InformationBoxInitialization initialization = InformationBoxInitialization.FromScopeAndParameters,
                                                InformationBoxButtons buttons = InformationBoxButtons.OK,
                                                InformationBoxIcon icon       = InformationBoxIcon.None,
                                                Icon customIcon = null,
                                                InformationBoxDefaultButton defaultButton = InformationBoxDefaultButton.Button1,
                                                string[] customButtons = null,
                                                InformationBoxButtonsLayout buttonsLayout = InformationBoxButtonsLayout.GroupMiddle,
                                                InformationBoxAutoSizeMode autoSizeMode   = InformationBoxAutoSizeMode.None,
                                                InformationBoxPosition position           = InformationBoxPosition.CenterOnParent,
                                                bool showHelpButton         = false,
                                                HelpNavigator helpNavigator = HelpNavigator.TableOfContents,
                                                InformationBoxCheckBox showDoNotShowAgainCheckBox = 0,
                                                InformationBoxStyle style                   = InformationBoxStyle.Standard,
                                                AutoCloseParameters autoClose               = null,
                                                DesignParameters design                     = null,
                                                InformationBoxTitleIconStyle titleStyle     = InformationBoxTitleIconStyle.None,
                                                InformationBoxTitleIcon titleIcon           = null,
                                                MessageBoxButtons?legacyButtons             = null,
                                                MessageBoxIcon?legacyIcon                   = null,
                                                MessageBoxDefaultButton?legacyDefaultButton = null,
                                                InformationBoxBehavior behavior             = InformationBoxBehavior.Modal,
                                                AsyncResultCallback callback                = null,
                                                InformationBoxOpacity opacity               = InformationBoxOpacity.NoFade,
                                                KryptonForm parentWindow                    = null,
                                                Form parent = null,
                                                InformationBoxOrder order = InformationBoxOrder.Default,
                                                InformationBoxSound sound = InformationBoxSound.Default)
        {
            var parameters = new object[] { title, helpFile, helpTopic, initialization, buttons, icon, customIcon, defaultButton,
                                            customButtons, buttonsLayout, autoSizeMode, position, showHelpButton, helpNavigator, showDoNotShowAgainCheckBox,
                                            style, autoClose, design, titleStyle, titleIcon, legacyButtons, legacyIcon, legacyDefaultButton, behavior, callback, opacity, parentWindow, parent, order, sound };

            return(new KryptonInformationBoxWindow(text, parameters).Show(out checkBoxState));
        }