private void Button_Click(object sender, RoutedEventArgs e) { List <string> list = getSelectedCompsMacs(); foreach (string mac in list) { try { MACAddress.SendWOLPacket(mac); } catch (Exception Error) { MessageBox.Show( string.Format("Error:\n\n{0}", Error.Message), "Error"); } } }
private void Button_Click(object sender, RoutedEventArgs e) { var list = GetSelectedCompsMacs(); var cList = getSelectedClients(); foreach (var mac in list) { try { MACAddress.SendWOLPacket(mac); } catch (Exception Error) { MessageBox.Show( string.Format("Error:\n\n{0}", Error.Message), "Error"); } } if (service.MSMQConfig.MSMQ) { service.TransferLabClientService(cList, true); } }