Resolve "Component: Translation" #73

Merged
thorsten merged 23 commits from 12-component-translation into main 2022-09-21 20:53:39 +00:00
Showing only changes of commit d521aca2f7 - Show all commits

View File

@ -10,6 +10,7 @@ public sealed partial class Translation : UserControl
private readonly Timer saveTimer;
private int currentTranslationId = -1;
private bool isLoading = false;
public Translation()
{
@ -40,13 +41,20 @@ public sealed partial class Translation : UserControl
public void Configure(DataModel.Database.Translation translation)
{
this.isLoading = true;
this.currentTranslationId = translation.Id;
this.textBox.Multiline = translation.TextElement.IsMultiLine;
this.textBox.Text = translation.Text;
this.isLoading = false;
}
private async void textBox_TextChanged(object sender, EventArgs e)
{
if(this.isLoading)
return;
if(this.saveTimer.Enabled)
this.saveTimer.Stop();