Esempio n. 1
0
        private void Add_ReAct(string word, string word_ra)
        {
            int    index;
            string temp;

            index = ReAct_Index(word);

            if (index >= 0)
            {
                UpDateReAct(index, word_ra.Replace("\n", null));
            }
            else
            {
                ReAct NewReAct = new ReAct(word, word_ra.Replace("\n", null));
                ReActList.Add(NewReAct);
            }

            if (msg_reader != null && msg_reader.IsAlive)
            {
                temp = "自動回覆新增 : " + word.Replace("\n", "") + " > " + word_ra.Replace("\n", "");
                //msg_queue.Enqueue("TextFormCommand!" + current_channel + "@BouyomiMessage:" + "已學習字詞\n");
                Push_A_message_to_Room(temp + "\n");
                //msg_reader.Interrupt();
            }
        }
Esempio n. 2
0
        private void Delete_ReAct(string word)
        {
            string temp;

            ReActList.RemoveAll(x => x.GetWord() == word);

            if (msg_reader != null && msg_reader.IsAlive)
            {
                temp = "刪除自動回覆 : " + word.Replace("\n", "");
                //msg_queue.Enqueue("TextFormCommand!" + current_channel + "@BouyomiMessage:" + temp + "\n");
                Push_A_message_to_Room(temp + "\n");
                //msg_reader.Interrupt();
            }
        }