예제 #1
0
    private bool Save()
    {
        if (StylesheetHelper.UniqueStylesheetName(nameTextBox.Text, _initialNameValue))
        {
            if (ValidXslt(xslTextBox.Text))
            {
                if (_textChanged)
                {
                    DialogResult = DialogResult.OK;
                }
                else
                {
                    DialogResult = DialogResult.Cancel;
                }

                _textChanged = false;
                return(true);
            }
        }
        else
        {
            nameTextBox.Focus();
        }

        return(false);
    }
예제 #2
0
    private void CheckValues()
    {
        if (_checkValue == GenericHelper.CheckValue.Integer)
        {
            _success = CheckIntegerValue();

            if (_success)
            {
                _newIntegerValue = Convert.ToInt32(newValueTextBox.Text);
            }
        }
        else if (_checkValue == GenericHelper.CheckValue.TaskName)
        {
            _success = TaskHelper.UniqueTaskName(newValueTextBox.Text, _initialNameValue);

            if (_success)
            {
                _newStringValue = newValueTextBox.Text;
            }
        }
        else if (_checkValue == GenericHelper.CheckValue.StylesheetName)
        {
            _success = StylesheetHelper.UniqueStylesheetName(newValueTextBox.Text, _initialNameValue);

            if (_success)
            {
                _newStringValue = newValueTextBox.Text;
            }
        }
    }