private async void AddClientAction() { MetroDialogSettings settings = AppearanceManager.MetroDialog; settings.AffirmativeButtonText = Application.Current.Resources["String_Button_Add"] as string; settings.NegativeButtonText = Application.Current.Resources["String_Button_Cancel"] as string; settings.DefaultButtonFocus = MessageDialogResult.Affirmative; string hostname = await dialogCoordinator.ShowInputAsync(this, Application.Current.Resources["String_Header_AddClient"] as string, Application.Current.Resources["String_EnterHostnameForClient"] as string, settings); if (string.IsNullOrEmpty(hostname)) { return; } WakeOnLANClientInfo client = new WakeOnLANClientInfo { Hostname = hostname.ToUpper(), MACAddress = MACAddressHelper.GetDefaultFormat(MACAddress), Broadcast = Broadcast, Port = Port }; WakeOnLANClientManager.AddClient(client); }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (value == null) { return(string.Empty); } return(MACAddressHelper.GetDefaultFormat((PhysicalAddress)value)); }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (!(value is PhysicalAddress physicalAddress)) { return(string.Empty); } string macAddress = physicalAddress.ToString(); return(string.IsNullOrEmpty(macAddress) ? string.Empty : MACAddressHelper.GetDefaultFormat(macAddress)); }
private void CopySelectedMACAddressAction() { Clipboard.SetText(MACAddressHelper.GetDefaultFormat(SelectedARPTableInfo.MACAddress.ToString())); }
private void CopySelectedMACAddressAction() { Clipboard.SetText(MACAddressHelper.GetDefaultFormat(SelectedIPScanResult.MACAddress.ToString())); }