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 int GetHashCode() { var hashCode = -1817798551; hashCode = hashCode * -1521134295 + EqualityComparer <LineType> .Default.GetHashCode(Type); hashCode = hashCode * -1521134295 + Layer.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <Time> .Default.GetHashCode(Start); hashCode = hashCode * -1521134295 + EqualityComparer <Time> .Default.GetHashCode(End); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Style); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Actor); hashCode = hashCode * -1521134295 + MarginLeft.GetHashCode(); hashCode = hashCode * -1521134295 + MarginRight.GetHashCode(); hashCode = hashCode * -1521134295 + MarginVertical.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Effect); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Content); hashCode = hashCode * -1521134295 + Length.GetHashCode(); return(hashCode); }
protected override void RenderAttributes(XElement element, FoRenderOptions options) { if (RegionName.HasValue()) { element.Add(new XAttribute("region-name", RegionName)); } if (BackgroundRepeat.HasValue()) { element.Add(new XAttribute("background-repeat", BackgroundRepeat)); } if (BackgroundImage.HasValue()) { element.Add(new XAttribute("background-image", "url(" + BackgroundImage + ")")); } if (ColumnCount > 0) { element.Add(new XAttribute("column-count", ColumnCount)); } if (ColumnGap.HasValue()) { element.Add(new XAttribute("column-gap", ColumnGap)); } if (Extent.HasValue()) { element.Add(new XAttribute("extent", Extent)); } if (Margin.HasValue()) { element.Add(new XAttribute("margin", Margin)); } if (MarginTop.HasValue()) { element.Add(new XAttribute("margin-top", MarginTop)); } if (MarginRight.HasValue()) { element.Add(new XAttribute("margin-right", MarginRight)); } if (MarginBottom.HasValue()) { element.Add(new XAttribute("margin-bottom", MarginBottom)); } if (MarginLeft.HasValue()) { element.Add(new XAttribute("margin-left", MarginLeft)); } }
private async void StackPanel_PointerPressed(object sender, PointerRoutedEventArgs e) { //string JsonModel = " {" + // "\"PhoneOEM\": \"{0}\"," + // "\"PhoneName\": \"{1}\"," + // "\"Color\": \"{2}\"," + // "\"ColorStr\": \"{3}\"," + // "\"PhoneGlare\": \"{4}\"," + // "\"PhoneScreen\": \"{5}\"," + // "\"MarginLeft\": \"{6}\"," + // "\"MarginTop\": \"{7}\"," + // "\"MarginRight\": \"{8}\"," + // "\"MarginBottom\": \"{9}\"," + // "\"ScreenWidth\": \"{10}\"," + // "\"ScreenHeight\": \"{11}\"" + // "},"; string[] args = new string[12]; args[0] = "\n {\n \"PhoneOEM\":\"" + PhoneOEM.Text + "\",\n"; args[1] = " \"PhoneName\":\"" + PhoneName.Text + "\",\n"; args[2] = " \"Color\": \"" + Color.SelectedItem as string + "\",\n"; args[3] = " \"ColorStr\": \"" + ColorToStr(Color.SelectedItem as string) + "\",\n"; args[4] = " \"PhoneGlare\": \"" + _filepath.Replace("C:\\Users\\blue-\\Documents\\Visual Studio 2015\\Projects\\ShotWithPhone\\ShotWithPhone\\PhoneImageSources\\", "/PhoneImageSources/").Replace("screen", "glare") + "\",\n"; args[5] = " \"PhoneScreen\": \"" + _filepath.Replace("C:\\Users\\blue-\\Documents\\Visual Studio 2015\\Projects\\ShotWithPhone\\ShotWithPhone\\PhoneImageSources\\", "/PhoneImageSources/") + "\",\n"; args[6] = " \"MarginLeft\": \"" + MarginLeft.ToString() + "\",\n"; args[7] = " \"MarginTop\": \"" + MarginTop.ToString() + "\",\n"; args[8] = " \"MarginRight\": \"" + MarginRight.ToString() + "\",\n"; args[9] = " \"MarginBottom\": \"" + MarginBottom.ToString() + "\",\n"; args[10] = " \"ScreenWidth\": \"" + RecWidth.ToString() + "\",\n"; args[11] = " \"ScreenHeight\": \"" + RecHeight.ToString() + "\"\n },"; string Json = ""; foreach (string item in args) { Json += item; } DataPackage data = new DataPackage(); data.SetText(Json); Clipboard.SetContent(data); MessageDialog MD = new MessageDialog("CopyOK!"); MD.Options = MessageDialogOptions.AcceptUserInputAfterDelay; await MD.ShowAsync(); }
protected override void FillStyleAttributes(CssStyleCollection attributes, IUrlResolutionService urlResolver) { base.FillStyleAttributes(attributes, urlResolver); if (PaddingTop != Unit.Empty) { attributes.Add(HtmlTextWriterStyle.PaddingTop, PaddingTop.ToString()); } if (PaddingLeft != Unit.Empty) { attributes.Add(HtmlTextWriterStyle.PaddingLeft, PaddingLeft.ToString()); } if (PaddingRight != Unit.Empty) { attributes.Add(HtmlTextWriterStyle.PaddingRight, PaddingRight.ToString()); } if (PaddingBottom != Unit.Empty) { attributes.Add(HtmlTextWriterStyle.PaddingBottom, PaddingBottom.ToString()); } if (MarginTop != Unit.Empty) { attributes.Add(HtmlTextWriterStyle.MarginTop, MarginTop.ToString()); } if (MarginLeft != Unit.Empty) { attributes.Add(HtmlTextWriterStyle.MarginLeft, MarginLeft.ToString()); } if (MarginRight != Unit.Empty) { attributes.Add(HtmlTextWriterStyle.MarginRight, MarginRight.ToString()); } if (MarginBottom != Unit.Empty) { attributes.Add(HtmlTextWriterStyle.MarginBottom, MarginBottom.ToString()); } if (!String.IsNullOrEmpty(BackImageUrl)) { attributes.Add(HtmlTextWriterStyle.BackgroundImage, String.Format("url({0})", urlResolver.ResolveClientUrl(BackImageUrl))); } }
protected override void RenderAttributes(XElement element, FoRenderOptions options) { base.RenderAttributes(element, options); if (MasterName.IsNullOrWhiteSpace()) { throw new PropertyNotSetException(nameof(MasterName)); } element.Add(new XAttribute("master-name", MasterName)); if (PageWidth.HasValue()) { element.Add(new XAttribute("page-width", PageWidth)); } if (PageHeight.HasValue()) { element.Add(new XAttribute("page-height", PageHeight)); } if (Margin.HasValue()) { element.Add(new XAttribute("margin", Margin)); } if (MarginTop.HasValue()) { element.Add(new XAttribute("margin-top", MarginTop)); } if (MarginRight.HasValue()) { element.Add(new XAttribute("margin-right", MarginRight)); } if (MarginBottom.HasValue()) { element.Add(new XAttribute("margin-bottom", MarginBottom)); } if (MarginLeft.HasValue()) { element.Add(new XAttribute("margin-left", MarginLeft)); } }
protected override void FillStyleAttributes(CssStyleCollection attributes, IUrlResolutionService urlResolver) { base.FillStyleAttributes(attributes, urlResolver); if (PaddingTop != Unit.Empty) { attributes.Add(HtmlTextWriterStyle.PaddingTop, PaddingTop.ToString()); } if (PaddingLeft != Unit.Empty) { attributes.Add(HtmlTextWriterStyle.PaddingLeft, PaddingLeft.ToString()); } if (PaddingRight != Unit.Empty) { attributes.Add(HtmlTextWriterStyle.PaddingRight, PaddingRight.ToString()); } if (PaddingBottom != Unit.Empty) { attributes.Add(HtmlTextWriterStyle.PaddingBottom, PaddingBottom.ToString()); } if (MarginTop != Unit.Empty) { attributes.Add(HtmlTextWriterStyle.MarginTop, MarginTop.ToString()); } if (MarginLeft != Unit.Empty) { attributes.Add(HtmlTextWriterStyle.MarginLeft, MarginLeft.ToString()); } if (MarginRight != Unit.Empty) { attributes.Add(HtmlTextWriterStyle.MarginRight, MarginRight.ToString()); } if (MarginBottom != Unit.Empty) { attributes.Add(HtmlTextWriterStyle.MarginBottom, MarginBottom.ToString()); } }
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") )); }
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()); return(parameters); }
protected override void RenderAttributes(XElement element, FoRenderOptions options) { base.RenderAttributes(element, options); if (Margin.HasValue()) { element.Add(new XAttribute("margin", Margin)); } if (MarginTop.HasValue()) { element.Add(new XAttribute("margin-top", MarginTop)); } if (MarginRight.HasValue()) { element.Add(new XAttribute("margin-right", MarginRight)); } if (MarginBottom.HasValue()) { element.Add(new XAttribute("margin-bottom", MarginBottom)); } if (MarginLeft.HasValue()) { element.Add(new XAttribute("margin-left", MarginLeft)); } }
protected override void RenderAttributes(XElement element, FoRenderOptions options) { if (Src.IsNullOrWhiteSpace()) { throw new PropertyNotSetException(nameof(Src)); } element.Add(new XAttribute("src", Src)); if (Width.HasValue()) { element.Add(new XAttribute("width", Width)); } if (Height.HasValue()) { element.Add(new XAttribute("height", Height)); } if (ContentWidth.HasValue()) { element.Add(new XAttribute("content-width", ContentWidth)); } if (ContentHeight.HasValue()) { element.Add(new XAttribute("content-height", ContentHeight)); } if (Scaling != FoScaling.Unspecified) { element.Add(new XAttribute("scaling", ToKebabCase(Scaling))); } if (ScalingMethod != FoScalingMethod.Unspecified) { element.Add(new XAttribute("scaling-method", ToKebabCase(ScalingMethod))); } if (Margin.HasValue()) { element.Add(new XAttribute("margin", Margin)); } if (MarginTop.HasValue()) { element.Add(new XAttribute("margin-top", MarginTop)); } if (MarginRight.HasValue()) { element.Add(new XAttribute("margin-right", MarginRight)); } if (MarginBottom.HasValue()) { element.Add(new XAttribute("margin-bottom", MarginBottom)); } if (MarginLeft.HasValue()) { element.Add(new XAttribute("margin-left", MarginLeft)); } if (Padding.HasValue()) { element.Add(new XAttribute("padding", Padding)); } if (PaddingTop.HasValue()) { element.Add(new XAttribute("padding-top", PaddingTop)); } if (PaddingRight.HasValue()) { element.Add(new XAttribute("padding-right", PaddingRight)); } if (PaddingBottom.HasValue()) { element.Add(new XAttribute("padding-bottom", PaddingBottom)); } if (PaddingLeft.HasValue()) { element.Add(new XAttribute("padding-left", PaddingLeft)); } base.RenderAttributes(element, options); }