/// <summary> /// Maneja el evento que que envia la instrucción de editar un circuito /// </summary> /// <param name="sender">La fuente del evento.</param> /// <param name="e">Los argumentos de tipo <see cref="RoutedEventArgs"/> que contienen la información del evento.</param> private void btnEditCircuito_Click(object sender, RoutedEventArgs e) { string cKey; Circuito cto = GetCircuito(sender as Button, out cKey); var inp = new CircuitInput(cto); inp.ShowDialog(); if (inp.DialogResult.Value) { String ctoFormat = "Cto({0}) L {1} [m]"; foreach (var it in this.listOfCircuits.ItemsSource.OfType <CtoCompItem>().Where(x => x.CtoKey == cKey)) { it.CtoFormat = String.Format(ctoFormat, cto, cto.Longitud); } this.Refresh(); } }