public void Update(IdiomaSubject idioma) { if (idioma.Idioma != null) { foreach (TextBox txtBox in SingletonIdioma.FindWindowChildren <TextBox>(this)) { if (txtBox.Tag != null) { Leyenda leyenda = idioma.Idioma.Leyendas.Find(delegate(Leyenda leye) { return(leye.Etiqueta.Equals((string)txtBox.Tag)); }); if (leyenda != null) { MaterialDesignThemes.Wpf.HintAssist.SetHint(txtBox, leyenda.Traduccion.TextoTraducido); } //txtBox.Text = leyenda.Traduccion.TextoTraducido; } } foreach (TextBlock textBlock in SingletonIdioma.FindWindowChildren <TextBlock>(this)) { if (textBlock.Tag != null) { Leyenda leyenda = idioma.Idioma.Leyendas.Find( delegate(Leyenda leye) { return(leye.Etiqueta.Equals((string)textBlock.Tag)); } ); if (leyenda != null) { textBlock.Text = leyenda.Traduccion.TextoTraducido; } } } foreach (Button button in SingletonIdioma.FindWindowChildren <Button>(this)) { if (button.Tag != null) { Leyenda leyenda = idioma.Idioma.Leyendas.Find( delegate(Leyenda leye) { return(leye.Etiqueta.Equals((string)button.Tag)); } ); if (leyenda != null) { button.Content = leyenda.Traduccion.TextoTraducido; } } } } }
public void Update(IdiomaSubject idioma) { if (idioma.Idioma != null) { TraducirMenu(idioma); foreach (TextBlock textBlock in SingletonIdioma.FindWindowChildren <TextBlock>(this)) { if (textBlock.Tag != null) { Leyenda leyenda = idioma.Idioma.Leyendas.Find( delegate(Leyenda leye) { return(leye.Etiqueta.Equals((string)textBlock.Tag)); } ); if (leyenda != null) { textBlock.Text = leyenda.Traduccion.TextoTraducido; } } } foreach (ComboBox comboBox in SingletonIdioma.FindWindowChildren <ComboBox>(this)) { if (comboBox.Tag != null) { Leyenda leyenda = idioma.Idioma.Leyendas.Find( delegate(Leyenda leye) { return(leye.Etiqueta.Equals((string)comboBox.Tag)); } ); if (leyenda != null) { HintAssist.SetHint(comboBox, leyenda.Traduccion.TextoTraducido); } } } Leyenda leyendaCombo = idioma.Idioma.Leyendas.Find(delegate(Leyenda leye) { return(leye.Etiqueta.Equals((string)cmbIdioma.Tag)); } ); if (leyendaCombo != null) { HintAssist.SetHint(cmbIdioma, leyendaCombo.Traduccion.TextoTraducido); } } }
public void Update(IdiomaSubject idioma) { if (idioma.Idioma != null) { foreach (TextBox txtBox in SingletonIdioma.FindWindowChildren <TextBox>(this)) { if (txtBox.Tag != null) { Leyenda leyenda = idioma.Idioma.Leyendas.Find( delegate(Leyenda leye) { return(leye.Etiqueta.Equals((string)txtBox.Tag)); } ); if (leyenda != null) { HintAssist.SetHint(txtBox, leyenda.Traduccion.TextoTraducido); } txtBox.Text = txtBox.Text; } } foreach (TextBlock textBlock in SingletonIdioma.FindWindowChildren <TextBlock>(this)) { if (textBlock.Tag != null) { Leyenda leyenda = idioma.Idioma.Leyendas.Find( delegate(Leyenda leye) { return(leye.Etiqueta.Equals((string)textBlock.Tag)); } ); if (leyenda != null) { textBlock.Text = leyenda.Traduccion.TextoTraducido; } } } foreach (ComboBox comboBox in SingletonIdioma.FindWindowChildren <ComboBox>(this)) { if (comboBox.Tag != null) { Leyenda leyenda = idioma.Idioma.Leyendas.Find( delegate(Leyenda leye) { return(leye.Etiqueta.Equals((string)comboBox.Tag)); } ); if (leyenda != null) { HintAssist.SetHint(comboBox, leyenda.Traduccion.TextoTraducido); } } } foreach (PasswordBox passwordBox in SingletonIdioma.FindWindowChildren <PasswordBox>(this)) { if (passwordBox.Tag != null) { Leyenda leyenda = idioma.Idioma.Leyendas.Find( delegate(Leyenda leye) { return(leye.Etiqueta.Equals((string)passwordBox.Tag)); } ); if (leyenda != null) { HintAssist.SetHint(passwordBox, leyenda.Traduccion.TextoTraducido); } } } foreach (Button button in SingletonIdioma.FindWindowChildren <Button>(this)) { if (button.Tag != null) { Leyenda leyenda = idioma.Idioma.Leyendas.Find( delegate(Leyenda leye) { return(leye.Etiqueta.Equals((string)button.Tag)); } ); if (leyenda != null) { button.Content = leyenda.Traduccion.TextoTraducido; } } } } }