Example #1
0
        /// <summary>
        /// 添加关键词
        /// </summary>
        private void Button_Add_Click(object sender, EventArgs e)
        {
            string[] Kyewords = TextBox_keyword.Text.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);//字符串分割
            BLL.XMLS xml      = new BLL.XMLS();
            string   value    = xml.UpdateXmlKyewords(Url, Kyewords) ? "更新成功~" : "更新失败~";

            MessageBox.Show(value);
            ChuShiHua();
            TextBox_keyword.Text = string.Empty;
        }
Example #2
0
        /// <summary>
        /// 提交按钮被点击
        /// </summary>
        private void Button_Add_Click(object sender, EventArgs e)
        {
            if (TextBox_url.Text.Trim().Length < 1)
            {
                MessageBox.Show("链接格式错误~", "警告");
                return;
            }

            BLL.XMLS xml   = new BLL.XMLS();
            string   value = xml.AddXmlUrl(TextBox_url.Text.Trim()) ? "添加成功~" : "添加失败,请您检查是否已经存在同类型的值~";

            MessageBox.Show(value, "温馨提示");
            ChuShiHua();
            TextBox_url.Text = string.Empty;
        }