/// <summary>
        ///
        /// </summary>
        private void Check()
        {
            int usedSize = textBoxName.Text.Length;

            labelNameLength.Content = string.Format(Strings.XOfYCharacters_editw, usedSize, _patch.MaxNameLength);
            labelError.Content      = EditUtils.CheckText(textBoxName.Text, _patch.MaxNameLength, EditUtils.ECheckType.Name);
            _ok = labelError.Content.Equals(string.Empty);
            buttonOk.IsEnabled = _ok;
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        private void Check()
        {
            var usedSize = textBoxName.Text.Length;

            labelNameLength.Text = string.Format('(' + Strings.XOfYCharacters_editw + ')', usedSize,
                                                 _setList.MaxNameLength);

            labelError.Content = EditUtils.CheckText(textBoxName.Text, _setList.MaxNameLength,
                                                     EditUtils.ECheckType.Name);

            buttonOk.IsEnabled = labelError.Content.Equals(string.Empty);
        }
Ejemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        private void Check()
        {
            var usedSize = textBoxName.Text.Length;

            labelNameLength.Content = string.Format(Strings.XOfYCharacters_editw, usedSize, _patch.MaxNameLength);
            labelError.Content      = EditUtils.CheckText(textBoxName.Text, _patch.MaxNameLength, EditUtils.ECheckType.Name);

            // Check set list slot description.
            if (labelError.Content.Equals(string.Empty))
            {
                // Set length.
                var usedDescriptionSize  = textBoxDescription.Text.Length;
                var maxDescriptionLength = _patch.MaxDescriptionLength;
                labelDescriptionLength.Text =
                    $"{usedDescriptionSize} of {maxDescriptionLength} characters";

                // Check description.
                labelError.Content = EditUtils.CheckText(
                    textBoxDescription.Text, _patch.MaxDescriptionLength, EditUtils.ECheckType.Description);
            }

            _ok = labelError.Content.Equals(string.Empty);
            buttonOk.IsEnabled = _ok;
        }
Ejemplo n.º 4
0
        /// <summary>
        ///
        /// </summary>
        private void Check()
        {
            int usedSize = textBoxName.Text.Length;

            labelNameLength.Text = string.Format('(' + Strings.XOfYCharacters_editw + ')', usedSize,
                                                 _patch.MaxNameLength);
            labelErrorName.Content = EditUtils.CheckText(textBoxName.Text, _patch.MaxNameLength,
                                                         EditUtils.ECheckType.Name);

            // Check set list slot description.
            // Set length.
            int usedDescriptionSize  = textBoxDescription.Text.Length;
            int maxDescriptionLength = _patch.MaxDescriptionLength;

            labelDescriptionLength.Text = string.Format('(' + Strings.XOfYCharacters_editw + ')',
                                                        usedDescriptionSize, maxDescriptionLength);

            // Check description.
            labelErrorDescription.Content = EditUtils.CheckText(
                textBoxDescription.Text, _patch.MaxDescriptionLength, EditUtils.ECheckType.Description);

            _ok = labelErrorName.Content.Equals(string.Empty) && labelErrorDescription.Content.Equals(string.Empty);
            buttonOk.IsEnabled = _ok;
        }