static void Main(string[] args) { Restc2mAPI r = new Restc2mAPI("username", "password", Restc2mAPI.liveMode.Stage); r.statusChanged += r_statusChanged; r.jobStatusCheck += r_jobStatusCheck; r.addressList.Clear(); //Not needed just good habit to clear before you add any addresses Restc2mAPI.addressItem x; x = new Restc2mAPI.addressItem("John", "Smith", "TestOrg", "1234 Test Street", "Ste 335", "", "Oak Brook", "IL", "60523", ""); r.addressList.Add(x); x = new Restc2mAPI.addressItem("John", "Smith2", "TestOrg", "1234 Test Street", "Ste 335", "", "Oak Brook", "IL", "60523", ""); r.addressList.Add(x); r.runComplete(@"C:\c2m\test.pdf", r.createXMLFromAddressList(), "Letter 8.5 x 11", "Address on Separate Page", "Next Day", "#10 Double Window", "Black and White", "White 24#", "Printing Both sides"); Console.ReadLine(); }
static void Main(string[] args) { Restc2mAPI r = new Restc2mAPI("username", "password", Restc2mAPI.liveMode.Stage); List <List <KeyValuePair <String, String> > > addressList = new List <List <KeyValuePair <String, String> > >(); List <KeyValuePair <String, String> > customAddressItem = new List <KeyValuePair <String, String> >(); customAddressItem.Add(new KeyValuePair <String, String>("name", "John"));; customAddressItem.Add(new KeyValuePair <String, String>("Address1", "1234 Test Street")); customAddressItem.Add(new KeyValuePair <String, String>("Address2", "Ste 335")); customAddressItem.Add(new KeyValuePair <String, String>("city", "Oak Brook")); customAddressItem.Add(new KeyValuePair <String, String>("StAtE", "IL")); customAddressItem.Add(new KeyValuePair <String, String>("Zip", "60523")); addressList.Add(customAddressItem); customAddressItem = new List <KeyValuePair <String, String> >(); customAddressItem.Add(new KeyValuePair <String, String>("name", "John2")); customAddressItem.Add(new KeyValuePair <String, String>("Address1", "1234 Test Street")); customAddressItem.Add(new KeyValuePair <String, String>("Address2", "Ste 335")); customAddressItem.Add(new KeyValuePair <String, String>("city", "Oak Brook")); customAddressItem.Add(new KeyValuePair <String, String>("StAtE", "IL")); customAddressItem.Add(new KeyValuePair <String, String>("Zip", "60523")); addressList.Add(customAddressItem); r.runComplete(@"C:\c2m\test.pdf", r.createXMLFromCustomList(addressList, 12345), "Letter 8.5 x 11", "Address on Separate Page", "Next Day", "#10 Double Window", "Black and White", "White 24#", "Printing Both sides"); Console.ReadLine(); }