public static Paragraph Heading(this Paragraph paragraph, HeadingType headingType) { string StyleName = headingType.EnumDescription(); paragraph.StyleName = StyleName; return(paragraph); }
public async Task <List <SelectItem> > GetHeadingByType(int checklistId, HeadingType headingType) { return(await _context.Headings.Where(w => w.CheckListId == checklistId && w.HeadingType == headingType) .Select(s => new SelectItem { Id = s.Id, Text = s.Content }).ToListAsync()); }
private void RenderParagraph(string value, HeadingType headingType) { if (!String.IsNullOrWhiteSpace(value)) { _wordDocument.InsertParagraph().Heading(headingType).Append(value); } }
public static Paragraph Heading(this Paragraph paragraph, HeadingType headingType) { var description = headingType.EnumDescription(); paragraph.StyleName = description; return(paragraph); }
public Content(HeadingType heading, string subHeading, string location, string workTitle, string duration, string description) { this.heading = heading; this.subHeading = subHeading; this.location = location; this.workTitle = workTitle; this.duration = duration; this.description = description; }
} // @ public double DistanceToPosXYZ(double X, double Y, double Z) #endregion #region HeadingTo overloads /// <summary> /// Gets heading from player to NPC/PC as selected HeadingType /// </summary> /// <param name="ID">ID of NPC/PC</param> /// <param name="headingType">Heading type for the return value.</param> /// <returns>Heading to NPC with matching ID as headingType</returns> public float HeadingTo(int ID, HeadingType headingType) { if (ID > 0) { return(HeadingTo(_FFACE.NPC.PosX(ID), _FFACE.NPC.PosY(ID), _FFACE.NPC.PosZ(ID), headingType)); } else { throw new IndexOutOfRangeException("NPC ID should be greater than 0 when passing to HeadingTo"); } } // @ public float HeadingTo(short ID, HeadingType headingType)
} // @ public float HeadingTo(double X, double Z, HeadingType headingType) /// <summary> /// Gets heading from player to Position as selected HeadingType /// </summary> /// <param name="X">X coordinate of Position to get heading to.</param> /// <param name="Y">Y coordinate of Position to get heading to.</param> /// <param name="Z">Z coordinate of Position to get heading to.</param> /// <param name="headingType">Heading type for the return value.</param> /// <returns>Heading to X, Y, Z coords as headingType</returns> public float HeadingTo(double X, double Y, double Z, HeadingType headingType) { X = X - _FFACE.Player.PosX; Z = Z - _FFACE.Player.PosZ; double H = -Math.Atan2(Z, X); if (headingType == HeadingType.Degrees) { H = PosHToDegrees((float)H); } return((float)H); } // @ public float HeadingTo(double X, double Y, double Z, HeadingType headingType)
} // @ public bool FaceHeading(double X, double Y, double Z) /// <summary> /// Faces the given heading in the passed HeadingType /// </summary> /// <param name="PosH">Heading to set on player.</param> /// <param name="headingType">HeadingType indicating the type of the value.</param> /// <returns>true on success, false otherwise</returns> public bool FaceHeading(float PosH, HeadingType headingType) { if (headingType == HeadingType.Degrees) { PosH = DegreesToPosH(PosH); } if (FFACE.SetNPCPosH(_InstanceID, _FFACE.Player.ID, PosH) != 0.0f) { return(true); } return(false); } // @ public bool FaceHeading(float PosH, HeadingType headingType)
public SharePointEnvironmentSettingsForm(SharePointEnvironmentSettings environmentSettings, HeadingType headingType) { InitializeComponent(); if (headingType != HeadingType.None) { lblReviewHeading.Visible = true; if (headingType == HeadingType.NewEnvironment) lblReviewHeading.Text = "Please review the settings for this new environment"; } SharePointEnvironmentSettings = environmentSettings.GetCopy(); }
public override void Process(TagHelperContext context, TagHelperOutput output) { var tag = HeadingType.ToString().ToLower(); var cssClass = GdsEnums.GetDescriptionFromEnum(HeadingType); output.TagName = tag; output.AddClass(cssClass, HtmlEncoder.Default); if (!string.IsNullOrEmpty(Caption)) { var caption = new TagBuilder("span"); caption.MergeAttribute("class", cssClass.Replace("heading", "caption")); caption.InnerHtml.Append(Caption); output.PreContent.SetHtmlContent(caption); } output.Content.SetContent(Text); }
/// <summary> /// Добавление в отчет заголовка первого уровня /// </summary> /// <param name="sectionName">Название заголовка</param> public void AddSection(string sectionName) { //var headingTypes = Enum.GetValues(typeof(HeadingType)); HeadingType heading = HeadingType.Heading1; var text = string.Format(sectionName, heading.EnumDescription()); var paragraph = document.InsertParagraph(text); // Set the paragraph's heading type. paragraph.Heading(heading). Font("Times New Roman"). FontSize(14). Color(Color.Black). Bold(). SpacingLine(22). Kerning(14); paragraph.IndentationFirstLine = 1.5f; paragraph.Alignment = Alignment.left; document.Save(); }
private void GetHeadingsFindsHeading(HeadingType headingType) { const string html = @" <h1><a name=""h1""></a>Heading1</h1> <p>Heading 1 contents</p> <h2><a name=""h2""></a>Heading2</h2> <p>Heading 2 contents</p> <h3><a name=""h3""></a>Heading3</h3> <p>Heading 3 contents</p> <h4><a name=""h4""></a>Heading4</h4> <p>Heading 4 contents</p> <h5><a name=""h5""></a>Heading5</h5> <p>Heading 5 contents</p> <h6><a name=""h6""></a>Heading6</h6> <p>Heading 6 contents</p> " ; var headings = _tableOfContentsService.GetHeadings(html); Assert.AreEqual(1, headings.Where(x => x.HeadingType == headingType).Count(), "More than one heading of type found"); }
public void ToggleHeading(HeadingType headingType, bool useUnderlineStyleHeadings) { string text = string.Empty; switch (headingType) { case HeadingType.Heading1: text = ((useUnderlineStyleHeadings && this.SelectionLength > 0) ? MarkdownSyntax.Heading1Alternative : MarkdownSyntax.Heading1); break; case HeadingType.Heading2: text = ((useUnderlineStyleHeadings && this.SelectionLength > 0) ? MarkdownSyntax.Heading2Alternative : MarkdownSyntax.Heading2); break; case HeadingType.Heading3: text = MarkdownSyntax.Heading3; break; case HeadingType.Heading4: text = MarkdownSyntax.Heading4; break; case HeadingType.Heading5: text = MarkdownSyntax.Heading5; break; case HeadingType.Heading6: text = MarkdownSyntax.Heading6; break; } if (useUnderlineStyleHeadings && this.SelectionLength > 0 && (headingType == HeadingType.Heading1 || headingType == HeadingType.Heading2)) { this.UnderlineSelection(text); return; } this.ToggleSymmetricalMarkdownFormatting(text); }
public extern HTMLHeadingElement(HeadingType h);
private void InitializeSectionFormatting() { SectionHeading = HeadingType.Heading1; SectionText = new Formatting(); }
} // @ public float HeadingTo(Position position, HeadingType headingType) /// <summary> /// Gets heading from player to Position as selected HeadingType /// </summary> /// <param name="X">X coordinate of Position to get heading to.</param> /// <param name="Z">Z coordinate of Position to get heading to.</param> /// <param name="headingType">Heading type for the return value.</param> /// <returns>Heading to X, Z coords as headingType</returns> public float HeadingTo(double X, double Z, HeadingType headingType) { return(HeadingTo(X, 0, Z, headingType)); } // @ public float HeadingTo(double X, double Z, HeadingType headingType)
} // @ public float HeadingTo(short ID, HeadingType headingType) /// <summary> /// Gets heading from player to Position as selected HeadingType /// </summary> /// <param name="position">Position containing coordinates to get heading to.</param> /// <param name="headingType">Heading type for the return value.</param> /// <returns>Heading to position as headingType</returns> public float HeadingTo(Position position, HeadingType headingType) { return(HeadingTo(position.X, position.Y, position.Z, headingType)); } // @ public float HeadingTo(Position position, HeadingType headingType)
private void InitializeSubSectionFormatting() { SubSectionHeader = HeadingType.Heading2; SubSectionText = new Formatting(); }
/// <summary> /// Gets heading from player to Position as selected HeadingType /// </summary> /// <param name="X">X coordinate of Position to get heading to.</param> /// <param name="Y">Y coordinate of Position to get heading to.</param> /// <param name="Z">Z coordinate of Position to get heading to.</param> /// <param name="headingType">Heading type for the return value.</param> /// <returns>Heading to X, Y, Z coords as headingType</returns> public float HeadingTo(double X, double Y, double Z, HeadingType headingType) { X = X - _FFACE.Player.PosX; Z = Z - _FFACE.Player.PosZ; double H = -Math.Atan2(Z, X); if (headingType == HeadingType.Degrees) { H = PosHToDegrees((float)H); } return (float)H; }
public HeadingParser(HeadingType headingType) { _headingType = headingType; }
private void InitializeDocumentFormatting() { DocumentText = HeadingType.Heading1; }
public HeadingElement(HeadingType h) { }
public ColumnDescriptionType GetAssayColumnDescription(int AID, HeadingType Heading, int TID, [System.Xml.Serialization.XmlIgnoreAttribute()] bool TIDSpecified) { object[] results = this.Invoke("GetAssayColumnDescription", new object[] { AID, Heading, TID, TIDSpecified}); return ((ColumnDescriptionType)(results[0])); }
/// <remarks/> public void GetAssayColumnDescriptionAsync(int AID, HeadingType Heading, int TID, bool TIDSpecified) { this.GetAssayColumnDescriptionAsync(AID, Heading, TID, TIDSpecified, null); }
/// <remarks/> public void GetAssayColumnDescriptionAsync(int AID, HeadingType Heading, int TID, bool TIDSpecified, object userState) { if ((this.GetAssayColumnDescriptionOperationCompleted == null)) { this.GetAssayColumnDescriptionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetAssayColumnDescriptionOperationCompleted); } this.InvokeAsync("GetAssayColumnDescription", new object[] { AID, Heading, TID, TIDSpecified}, this.GetAssayColumnDescriptionOperationCompleted, userState); }
public Heading(HeadingType ht, params Union <string, Control, HTMLElement>[] typos) : base(new HTMLHeadingElement(ht), typos) { }
/// <summary> /// Faces the given heading in the passed HeadingType /// </summary> /// <param name="PosH">Heading to set on player.</param> /// <param name="headingType">HeadingType indicating the type of the value.</param> /// <returns>true on success, false otherwise</returns> public bool FaceHeading(float PosH, HeadingType headingType) { if (headingType == HeadingType.Degrees) PosH = DegreesToPosH(PosH); if (FFACE.SetNPCPosH(_InstanceID, _FFACE.Player.ID, PosH) != 0.0f) return true; return false; }
public HTMLHeadingElement(HeadingType h) { }
/// <summary> /// Gets heading from player to NPC/PC as selected HeadingType /// </summary> /// <param name="ID">ID of NPC/PC</param> /// <param name="headingType">Heading type for the return value.</param> /// <returns>Heading to NPC with matching ID as headingType</returns> public float HeadingTo(int ID, HeadingType headingType) { if (ID > 0) return HeadingTo(_FFACE.NPC.PosX(ID), _FFACE.NPC.PosY(ID), _FFACE.NPC.PosZ(ID), headingType); else throw new IndexOutOfRangeException("NPC ID should be greater than 0 when passing to HeadingTo"); }
public static Paragraph Heading(this Paragraph paragraph, HeadingType headingType) { string StyleName = headingType.EnumDescription(); paragraph.StyleName = StyleName; return paragraph; }
/// <summary> /// Gets heading from player to Position as selected HeadingType /// </summary> /// <param name="position">Position containing coordinates to get heading to.</param> /// <param name="headingType">Heading type for the return value.</param> /// <returns>Heading to position as headingType</returns> public float HeadingTo(Position position, HeadingType headingType) { return HeadingTo(position.X, position.Y, position.Z, headingType); }
/// <summary> /// Gets heading from player to Position as selected HeadingType /// </summary> /// <param name="X">X coordinate of Position to get heading to.</param> /// <param name="Z">Z coordinate of Position to get heading to.</param> /// <param name="headingType">Heading type for the return value.</param> /// <returns>Heading to X, Z coords as headingType</returns> public float HeadingTo(double X, double Z, HeadingType headingType) { return HeadingTo(X, 0, Z, headingType); }
private void GetHeadingsFindsHeading(HeadingType headingType) { const string html = @" <h1><a name=""h1""></a>Heading1</h1> <p>Heading 1 contents</p> <h2><a name=""h2""></a>Heading2</h2> <p>Heading 2 contents</p> <h3><a name=""h3""></a>Heading3</h3> <p>Heading 3 contents</p> <h4><a name=""h4""></a>Heading4</h4> <p>Heading 4 contents</p> <h5><a name=""h5""></a>Heading5</h5> <p>Heading 5 contents</p> <h6><a name=""h6""></a>Heading6</h6> <p>Heading 6 contents</p> "; var headings = _tableOfContentsService.GetHeadings(html); Assert.AreEqual(1, headings.Where(x => x.HeadingType == headingType).Count(), "More than one heading of type found"); }