Example #1
0
        public void UpdateMylistDescription(string mylist_id, string text, InputOutputOption iooption)
        {
            msgout_.Write("マイリストの説明の更新を開始します。\r\n");
            string[] line = IJStringUtil.SplitWithCRLF(iooption.GetRawText());

            List <string> add_list         = new List <string>();
            List <string> description_list = new List <string>();

            for (int i = 0; i < line.Length; ++i)
            {
                string[] s_array = line[i].Split('\t');
                add_list.Add(s_array[0]);
                description_list.Add(NicoUtil.GetReplacedString(text, s_array).Replace("\\n", "\r\n"));
            }
            niconico_network_.UpdateMylistDescription(mylist_id, add_list, description_list, OnUpdateMylistDescriptionEvent);
            msgout_.Write("マイリストの説明の更新を終了します。\r\n");
        }
Example #2
0
        public void PreviewMylistDescription(string text, string rank_file_path)
        {
            string[] line = IJStringUtil.SplitWithCRLF(IJFile.Read(rank_file_path));

            List <string> add_list         = new List <string>();
            List <string> description_list = new List <string>();

            for (int i = 0; i < line.Length; ++i)
            {
                string[] s_array = line[i].Split('\t');
                add_list.Add(s_array[0]);
                description_list.Add(NicoUtil.GetReplacedString(text, s_array));
            }
            StringBuilder buff = new StringBuilder();

            for (int i = 0; i < add_list.Count; ++i)
            {
                buff.Append(add_list[i]);
                buff.Append("\r\n---------\r\n");
                buff.Append(description_list[i]);
                buff.Append("\r\n--------------------------------------------------------\r\n");
            }
            msgout_.Write(buff.ToString());
        }