diff --git a/Windows/SettingsWindow.cs b/Windows/SettingsWindow.cs index 79997f9..6691e26 100644 --- a/Windows/SettingsWindow.cs +++ b/Windows/SettingsWindow.cs @@ -620,7 +620,7 @@ private void checkSendChatbox_CheckedChanged(object? sender, EventArgs e) { private void linkEditChatbox_Click(object sender, LinkLabelLinkClickedEventArgs e) { string template = Settings.Get.OSCMessageInfoTemplate.Template; - EditResult edit = EditWindow.Show(template, LANG.S("SETTINGS.OSCSENDCHATBOX.TITLE") ?? "Chatbox Message Template", this, handleNewLine: true, insertKeyTemplate: true); + EditResult edit = EditWindow.Show(template, LANG.S("SETTINGS.OSCSENDCHATBOX.TITLE") ?? "Chatbox Message Template", this, handleNewLine: false, insertKeyTemplate: true); if (edit.Accept) { Settings.Get.OSCMessageInfoTemplate.Template = string.IsNullOrEmpty(edit.Text) ? Settings.Default.OSCMessageInfoTemplate.Template : edit.Text; Settings.Export(); @@ -631,7 +631,7 @@ private void linkEditChatbox_Click(object sender, LinkLabelLinkClickedEventArgs private void linkAutoNoteEdit_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { string template = Settings.Get.RoundNoteTemplate.Template; - EditResult edit = EditWindow.Show(template, LANG.S("SETTINGS.SAVEROUNDNOTE.TITLE") ?? "Automatic Note Template", this, handleNewLine: true, insertKeyTemplate: true); + EditResult edit = EditWindow.Show(template, LANG.S("SETTINGS.SAVEROUNDNOTE.TITLE") ?? "Automatic Note Template", this, handleNewLine: false, insertKeyTemplate: true); if (edit.Accept) { Settings.Get.RoundNoteTemplate.Template = string.IsNullOrEmpty(edit.Text) ? Settings.Default.RoundNoteTemplate.Template : edit.Text; Settings.Export(); diff --git a/Windows/StatsWindow.cs b/Windows/StatsWindow.cs index df5e34d..54507f7 100644 --- a/Windows/StatsWindow.cs +++ b/Windows/StatsWindow.cs @@ -220,26 +220,9 @@ private void StatsWindow_ResizeEnd(object sender, EventArgs e) { Refresh(); } - /* - public static string NormalizeLabelText(string text) { - for (int i = 0; i < text.Length; i++) { - if (i > 0 && char.IsUpper(text[i])) { - string a = text.Substring(0, i); - Console.WriteLine(a); - text = a + ' ' + text.Substring(i); - i++; - } else if (i == 0 && !char.IsUpper(text[i])) { - text = char.ToUpperInvariant(text[i]) + text.Substring(1); - } - } - - return text; - } - */ - internal static void UpdateChatboxContent() { if (IsRoundActive || !MainWindow.Started || !ToNLogContext.CanSendChatbox || string.IsNullOrEmpty(Settings.Get.OSCMessageInfoTemplate.Template)) return; - string template = TemplateManager.ReplaceTemplate(Settings.Get.OSCMessageInfoTemplate.Template); + string template = TemplateManager.ReplaceTemplate(Settings.Get.OSCMessageInfoTemplate.Template).Replace("\\n", "\n"); LilOSC.SetChatboxMessage(template); }