Example #1
0
        /// <summary>
        /// インスタンスのNGワードを保存します
        /// </summary>
        public async Task InstSave()
        {
            StringBuilder sb = new StringBuilder();
            int           i  = 0;

            foreach (string item in NGCollection)
            {
                string[] ids = NGCollection.GetValues(item);
                foreach (string it in ids)
                {
                    sb.Append(NGCollection.GetKey(i)).Append(":").AppendLine(it);
                }
            }
            using (FileStream fs = new FileStream(gs.OtherFolderPath + "\\ng.dat", FileMode.Create, FileAccess.ReadWrite))
            {
                StreamWriter sw = new StreamWriter(fs);
                await sw.WriteAsync(sb.ToString());

                await sw.FlushAsync();
            }
            return;
        }