protected override Dictionary <string, string> GetParameters(string applicationKey, string signature, string callBackURL, string dataName, string dataValue) { Dictionary <string, string> parameters = CreateParameters(applicationKey, signature, callBackURL, dataName, dataValue); parameters.Add("background", Convert.ToInt32(IncludeBackground).ToString()); parameters.Add("pagesize", PageSize.ToString().ToUpper()); parameters.Add("orientation", Orientation.ToString()); parameters.Add("templateid", TemplateId); parameters.Add("customwatermarkid", CustomWaterMarkId); parameters.Add("includelinks", Convert.ToInt32(IncludeLinks).ToString()); parameters.Add("includeoutline", Convert.ToInt32(IncludeOutline).ToString()); parameters.Add("title", Title); parameters.Add("coverurl", CoverURL); parameters.Add("mleft", MarginLeft.ToString()); parameters.Add("mright", MarginRight.ToString()); parameters.Add("mtop", MarginTop.ToString()); parameters.Add("mbottom", MarginBottom.ToString()); parameters.Add("delay", Delay.ToString()); parameters.Add("requestmobileversion", Convert.ToInt32(RequestAs).ToString()); parameters.Add("quality", Quality.ToString()); parameters.Add("target", TargetElement); parameters.Add("hide", HideElement); parameters.Add("waitfor", WaitForElement); parameters.Add("noads", Convert.ToInt32(NoAds).ToString()); parameters.Add("post", post); parameters.Add("bwidth", BrowserWidth.ToString()); parameters.Add("width", PageWidth.ToString()); parameters.Add("height", PageHeight.ToString()); parameters.Add("tvars", templateVariables); return(parameters); }
public override string ToString() { string st = @"<DeviceInfo> <OutputFormat>{0}</OutputFormat> <PageWidth>{1}in</PageWidth> <PageHeight>{2}in</PageHeight> <MarginTop>{3}in</MarginTop> <MarginLeft>{4}in</MarginLeft> <MarginRight>{5}in</MarginRight> <MarginBottom>{6}in</MarginBottom> </DeviceInfo>"; return(string.Format(st, OutputFormat, PageWidth.ToString("F2"), PageHeight.ToString("F2"), MarginTop.ToString("F2"), MarginLeft.ToString("F2"), MarginRight.ToString("F2"), MarginBottom.ToString("F2") )); }
public override string ToString() { return(string.Format(CultureInfo.InvariantCulture, "{0}: {1},{2} ({3})", PageSize, PageWidth.ToString("#.##"), PageHeight.ToString("#.##"), PageUnit)); }