private void ButtonGetCurrentServiceCenter_Click(object sender, RoutedEventArgs e) { try { ServiceCenterAddress address = new ServiceCenterAddress(); DeviceAddress da = address.Status; TextBoxServiceCenter.Text = da.Number; } catch (Exception ex) { } }
private void ButtonSetServiceCenter_Click(object sender, RoutedEventArgs e) { try { ServiceCenterAddress address = new ServiceCenterAddress(); SCAddressType type = new SCAddressType(); if (TextBoxServiceCenter.Text.StartsWith("+")) { type = SCAddressType.International; } else { type = SCAddressType.Other; } DeviceAddress da = new DeviceAddress(TextBoxServiceCenter.Text, type); address.AddressAndType = da; } catch (Exception ex) { } }