private void startSync_Click(object Sender, EventArgs e) { if (((MenuItem)Sender).Name == "StartSync") { se.StartSync(); } else { se.StopSync(); } }
private void sync_Click(object sender, RoutedEventArgs e) { if (((string)((System.Windows.Controls.Button)sender).Content).Equals("Start Sync")) { se.StartSync(); } else { se.StopSync(); } }