//右键--屏蔽
        private void 屏蔽选中词语ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string txt = richTextBox1.SelectedText.Trim();

            txt = txt.Replace("'", "''"); //单引号转义
            string type = "词语";
            //添加到数据库
            string sql = "insert into blackWords values(@word,'',@type,@date)";
            List <SQLiteParameter> parameters = new List <SQLiteParameter>();

            parameters.Add(new SQLiteParameter("word", txt));
            parameters.Add(new SQLiteParameter("type", type));
            parameters.Add(new SQLiteParameter("date", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")));
            MySqlite.ExecSql(sql, parameters);

            string s = richTextBox1.Text;

            s = s.Replace(txt, "");
            richTextBox1.Text = s.TrimEnd();
            BlackWord word = new BlackWord();

            word.word    = txt;
            word.type    = type;
            word.instead = "";
            blackWords.Add(word);
        }
        /// <summary>
        /// 查询屏蔽词语
        /// </summary>
        void GetBlackWords()
        {
            blackWords = new List <BlackWord>();
            string    sql   = "select words,insteadWords,type from blackWords order by length(words) desc";
            DataTable table = MySqlite.GetData(sql);
            BlackWord word1;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                word1 = new BlackWord();
                string word    = table.Rows[i][0].ToString().Trim();
                string instead = table.Rows[i][1].ToString().Trim();
                string type    = table.Rows[i][2].ToString().Trim();
                word1.word    = word;
                word1.type    = type;
                word1.instead = instead;
                blackWords.Add(word1);
            }
        }