Ver Mensaje Individual
  #5 (permalink)  
Antiguo 04/07/2013, 00:19
jordixip
 
Fecha de Ingreso: octubre-2009
Mensajes: 73
Antigüedad: 14 años, 7 meses
Puntos: 0
Respuesta: c# y actualizar formulario

Ahi va:

<Window x:Class="WpfApplication3.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="194" Width="404">
<Grid Height="148" Width="388">
<Button Content="Iniciar" Height="33" HorizontalAlignment="Left" Margin="193,72,0,0" Name="button1" VerticalAlignment="Top" Width="60" Click="button1_Click" />
<Label Content="xxxxx" Height="25" HorizontalAlignment="Left" Margin="13,11,0,0" Name="label1" VerticalAlignment="Top" Width="52" />
<Label Height="30" HorizontalAlignment="Left" Margin="71,8,0,0" Name="label2" VerticalAlignment="Top" Width="108" />
<Label Content="xxxxx" Height="27" HorizontalAlignment="Left" Margin="193,13,0,0" Name="label3" VerticalAlignment="Top" Width="110" />
<Label Height="27" HorizontalAlignment="Left" Margin="288,12,0,0" Name="label4" VerticalAlignment="Top" Width="91" />
<Label Height="24" HorizontalAlignment="Left" Margin="28,72,0,0" Name="label5" VerticalAlignment="Top" Width="73" />
</Grid>
</Window>

Y por otro lado:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Net.NetworkInformation;

namespace WpfApplication3
{
/// <summary>
/// Lógica de interacción para MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}

private void button1_Click(object sender, RoutedEventArgs e)
{

int numero_escaneos = 20;
int contador_escaneos = 0;



while (contador_escaneos < numero_escaneos)
{

label4.Content = contador_escaneos;


contador_escaneos++;




}



}
}
}

Gracias por tu ayuda.