Exemple #1
0
        // To test: enter incorrect data into cells with a data validation rule applied.
        public PortableDialogResult ShowDataValidationDialog(string message, string title, DataValidationErrorStyle errorStyle)
        {
            string customMessage = myMessage + message;

            if (errorStyle == DataValidationErrorStyle.Stop)
            {
                MessageBoxResult result = DXMessageBox.Show(customMessage, title, MessageBoxButton.OKCancel, MessageBoxImage.Stop);
                return(result == MessageBoxResult.OK ? PortableDialogResult.No : (PortableDialogResult)result);
            }
            if (errorStyle == DataValidationErrorStyle.Warning)
            {
                return((PortableDialogResult)DXMessageBox.Show(customMessage, title, MessageBoxButton.YesNoCancel, MessageBoxImage.Warning));
            }
            return((PortableDialogResult)DXMessageBox.Show(customMessage, title, MessageBoxButton.OKCancel, MessageBoxImage.Information));
        }
Exemple #2
0
        // To test: enter incorrect data into a cell with a data validation rule applied.
        public PortableDialogResult ShowDataValidationDialog(string message, string title, DataValidationErrorStyle errorStyle)
        {
            string            mymessage = "Der eingegebene Wert ist ungültig.\n\n" + message;
            MessageBoxButtons buttons;
            MessageBoxIcon    icon;

            if (errorStyle == DataValidationErrorStyle.Stop)
            {
                buttons = MessageBoxButtons.RetryCancel;
                icon    = MessageBoxIcon.Error;
            }
            else if (errorStyle == DataValidationErrorStyle.Warning)
            {
                buttons = MessageBoxButtons.YesNoCancel;
                icon    = MessageBoxIcon.Warning;
            }
            else
            {
                buttons = MessageBoxButtons.OKCancel;
                icon    = MessageBoxIcon.Information;
            }
            return((PortableDialogResult)XtraMessageBox.Show(lookAndFeel, control, mymessage, title, buttons, icon));
        }