private void EventScriptFormCategorySelectForm_Load(object sender, EventArgs e) { this.EscapeList = new List <TextEscape>(); string[] lines = File.ReadAllLines(U.ConfigDataFilename("text_escape_")); for (int i = 0; i < lines.Length; i++) { string line = lines[i]; if (U.IsComment(line) || U.OtherLangLine(line)) { continue; } line = U.ClipComment(line); if (line == "") { continue; } string[] sp = line.Split('\t'); if (sp.Length < 3) { continue; } TextEscape te = new TextEscape(); te.Code = sp[0]; te.Info = sp[1]; te.Category = sp[2]; if (!IsDetail) {//詳細テキストじゃないと、移動とロードを出さない. if (IsDetailOnly(te.Category)) { continue; } } this.EscapeList.Add(te); } this.CategoryDic = U.LoadTSVResourcePair((U.ConfigDataFilename("text_category_"))); this.CategoryListBox.BeginUpdate(); this.CategoryListBox.Items.Clear(); foreach (var pair in CategoryDic) { if (!IsDetail) {//詳細テキストじゃないと、移動とロードを出さない. if (IsDetailOnly(pair.Value)) { continue; } } this.CategoryListBox.Items.Add(pair.Key); } this.CategoryListBox.EndUpdate(); CategoryListBox.SelectedIndex = 0; this.ToolTip = InputFormRef.GetToolTip <TextScriptFormCategorySelectForm>(); }
void LoadTextEscapeList() { this.EscapeList = new List <TextEscape>(); string[] lines = File.ReadAllLines(U.ConfigDataFilename("text_escape_")); for (int i = 0; i < lines.Length; i++) { string line = lines[i]; if (U.IsComment(line) || U.OtherLangLine(line)) { continue; } line = U.ClipComment(line); if (line == "") { continue; } string[] sp = line.Split('\t'); if (sp.Length < 3) { continue; } TextEscape te = new TextEscape(); te.Code = sp[0]; te.Info = sp[1]; te.Category = sp[2]; if (!IsDetail) {//詳細テキストじゃないと、移動とロードを出さない. if (IsDetailOnly(te.Category)) { continue; } } this.EscapeList.Add(te); } //自動改行 if (PatchUtil.SearchAutoNewLinePatch() == PatchUtil.AutoNewLine_enum.AutoNewLine) { { TextEscape te = new TextEscape(); te.Code = "@0080@0090"; te.Info = R._("AutoNewLine Conversation Text[ConversationText]"); te.Category = ""; this.EscapeList.Add(te); } { TextEscape te = new TextEscape(); te.Code = "@0080@0091"; te.Info = R._("AutoNewLine Battle Text[BattleText]"); te.Category = ""; this.EscapeList.Add(te); } } }
bool UpdateSelected() { string text = this.ListBox.Text; if (text.Length <= 0) { return(false); } foreach (TextEscape script in this.EscapeList) { if (makeCommandComboText(script) == text) { this.Script = script; return(true); } } return(false); }
void LoadTextEscapeList() { this.EscapeList = new List <TextEscape>(); string[] lines = File.ReadAllLines(U.ConfigDataFilename("text_escape_")); for (int i = 0; i < lines.Length; i++) { string line = lines[i]; if (U.IsComment(line) || U.OtherLangLine(line)) { continue; } line = U.ClipComment(line); if (line == "") { continue; } string[] sp = line.Split('\t'); if (sp.Length < 3) { continue; } TextEscape te = new TextEscape(); te.Code = sp[0]; te.Info = sp[1]; te.Category = sp[2]; if (!IsDetail) {//詳細テキストじゃないと、移動とロードを出さない. if (IsDetailOnly(te.Category)) { continue; } } this.EscapeList.Add(te); } //パッチで追加される新しいエスケープシーケンス Program.TextEscape.MargeExstraEscapeList(this.EscapeList); }
string makeCommandComboText(TextEscape script) { return(script.Info + "//" + script.Code); }