Settings
|
The SettingsSetter type exposes the following members.
Name | Description | |
---|---|---|
SettingsSetter | Initializes a new instance of the SettingsSetter class |
Name | Description | |
---|---|---|
Equals | (Inherited from Object) | |
GetHashCode | (Inherited from Object) | |
GetType | (Inherited from Object) | |
Process | Sends the settingsToSet to the destinationDevice and then returns the updated setting values. | |
ToString | (Inherited from Object) |
using System; using System.Collections.Generic; using Zebra.Sdk.Comm; using Zebra.Sdk.Printer; using Zebra.Sdk.Settings; public class SettingsSetterExample { public static void Main(string[] args) { string ipAddress = "192.168.1.100"; Dictionary<string, string> settingsToSendToThePrinter = new Dictionary<string, string> { // Pass in a null as the second parameter to retrieve the setting { "device.friendly_name", null }, // Pass in a value as the second parameter to set the setting { "comm.baud", "14400" } }; // The map containing the results to each settings command Dictionary<string, string> results = null; try { results = SettingsSetter.Process(ipAddress, settingsToSendToThePrinter); } catch (ConnectionException e) { Console.WriteLine(e.ToString()); } catch (SettingsException e) { Console.WriteLine(e.ToString()); } foreach (KeyValuePair<string, string> entry in results) { Console.WriteLine($"The setting {entry.Key} returned {entry.Value}."); } } }