here is my code its runung but the pblm is i hav to show a message that scan finishes
how can i do that tell me
how can i chk the condition that progress bar finishes
public partial class MainWindow : Window
{
DispatcherTimer dt = new DispatcherTimer();
Stopwatch stopWatch = new Stopwatch();
string currentTime = string.Empty;
public MainWindow()
{
InitializeComponent();
dt.Tick += new EventHandler(dt_Tick);
dt.Interval = new TimeSpan(0, 0, 0, 0, 1);
}
void dt_Tick(object sender, EventArgs e)
{
if (stopWatch.IsRunning)
{
TimeSpan ts = stopWatch.Elapsed;
currentTime = ts.Seconds.ToString();
Progressbar1.Value = Convert.ToInt32(currentTime);
}
}
private void Button_Click_1(object sender, RoutedEventArgs e)
{
stopWatch.Start();
dt.Start();
}
private void Button_Click_2(object sender, RoutedEventArgs e)
{
if (stopWatch.IsRunning)
stopWatch.Stop();
}
}
}