private void RegisterStr(ref string Dialog, int Start, int End) { int Len = End - Start; string Prefix = string.Empty; if (FilterNames) { if (Dialog.Contains("「")) { while (!Dialog.StartsWith("「")) { Prefix += Dialog[0]; Dialog = Dialog.Substring(1, Dialog.Length - 1); } } } if (Dialog.StartsWith("/")) { while (Dialog[0] == ' ' || Dialog[0] == '/') { Prefix += Dialog[0]; Dialog = Dialog.Substring(1, Dialog.Length - 1); } } StrInfo Info = new StrInfo() { Start = Start, Len = Len, ID = StrMap.Count, Prefix = Prefix }; StrMap.Add(Info); }
public byte[] Export(string[] Strings) { string Content = this.Content; for (int i = Strings.Length - 1; i > -1; i--) { StrInfo Info = (from I in StrMap where I.ID == i select I).Single(); string Str = Escape(Info.Prefix + Strings[i]); Content = ReplaceRange(Info.Start, Info.Len, Content, Str); } return(Editor.Export(Content)); }