Ejemplo n.º 1
0
        private void okButton_Click(object sender, EventArgs e)
        {
            Form1 form = (Form1)Owner;

            if (customRadioButton.Checked && (String.IsNullOrEmpty(customTextBox1.Text) || String.IsNullOrEmpty(customTextBox2.Text)))
            {
                WindowManager.ShowAlertBox(this, LanguageUtil.GetCurrentLanguageString("CustomTagTypeEmpty", Name));
                return;
            }

            FormatManager.TagType      type      = FormatManager.TagType.XHTML;         //Default
            FormatManager.TagExtension extension = FormatManager.TagExtension.Complete; //Default

            if (forumRadioButton.Checked)
            {
                type = FormatManager.TagType.Forum;
            }
            else if (customRadioButton.Checked)
            {
                type = FormatManager.TagType.Custom;
            }

            if (shortRadioButton.Checked)
            {
                extension = FormatManager.TagExtension.Short;
            }

            if (customRadioButton.Checked)
            {
                FormatManager.InsertTag(form, tagTextBox.Text, type, extension, customTextBox1.Text, customTextBox2.Text);
            }
            else
            {
                FormatManager.InsertTag(form, tagTextBox.Text, type, extension);
            }
        }