AtelierElieScripter.Dialogue.DialogueControl.TextboxTransTextTextChanged C# (CSharp) Method

TextboxTransTextTextChanged() private method

Update data on changing text in Translation textbox
private TextboxTransTextTextChanged ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        void TextboxTransTextTextChanged(object sender, EventArgs e)
        {
            if (listviewMainBlocks.SelectedIndices.Count > 0 && listviewTextBlocks.SelectedIndices.Count > 0)
            {
                DialogueEntry entry = GetCurrentDialogueEntry();

                entry.EngText = textboxTransText.Text.Replace(Environment.NewLine, "\\n");

                // Update Listviews
                listviewTextBlocks.SelectedItems[0].SubItems[2].Text = entry.EngText.Replace("\\n", " ");

                // Update Main Listview
                UpdateMainChoiceRow(Int32.Parse(listviewMainBlocks.SelectedItems[0].SubItems[0].Text),
                                    listviewMainBlocks.SelectedItems[0].Index);

                panelTransText.Invalidate();
            }
        }