public SplitView RightIsSmaller(UnitSize rightSize) { RightComponent.Width = $"calc({rightSize.ToString()} - {SplitterComponent.Width})"; LeftComponent.Width = $"calc(100% - {rightSize.ToString()})"; return(this); }
public SplitView LeftIsSmaller(UnitSize leftSize) { LeftComponent.Width = $"calc({leftSize.ToString()} - {SplitterComponent.Width})"; RightComponent.Width = $"calc(100% - {leftSize.ToString()})"; return(this); }
/// <summary> /// The ToString method returns a string representation of the USCookingVolumeMeasurement /// </summary> /// <returns>String representation of the USCookingVolumeMeasurement</returns> public override string ToString() { //add S to end of unit if more than 1 string unitString = Amount.CompareTo(1) > 0 ? UnitSize.ToString().ToLower() + "s" : UnitSize.ToString().ToLower(); return(Amount.ToString() + " " + unitString); }
private static void SetHtmlElementHeight(HTMLElement htmlElement, UnitSize height) { htmlElement.SetStyle(cssStyleDeclaration => { cssStyleDeclaration.height = height.ToString(); }); }
public SplitView(UnitSize splitterSize = null) { LeftComponent = Raw(Div(_())); SplitterComponent = Raw(Div(_("tss-splitter"))); RightComponent = Raw(Div(_())); SplitterComponent.Width = (splitterSize is object && splitterSize.Unit != Unit.Auto && splitterSize.Unit != Unit.Inherit) ? splitterSize.ToString() : "8px"; LeftComponent.Height = "100%"; SplitterComponent.Height = "100%"; RightComponent.Height = "100%"; SplitInMiddle(); InnerElement = Div(_("tss-splitview"), LeftComponent.Render(), SplitterComponent.Render(), RightComponent.Render()); }
internal static IComponent CreateGradientOverlay(IComponent component, UnitSize maxContentHeight) { var container = component.Render(); container.style.overflow = "hidden"; container.style.maxHeight = maxContentHeight.ToString(); container.style.setProperty("isolation", "isolate"); container.style.position = "relative"; //otherwise the position:absolute of the style bellow doesnt work var gradient = Div(_("card-gradient-overlay")); gradient.style.top = $"calc({maxContentHeight} - 40px)"; container.appendChild(gradient); return(Raw(container)); }
/// <inheritdoc/> public override string ModelSummary() { using (StringWriter htmlWriter = new StringWriter()) { htmlWriter.Write("\r\n<div class=\"activityentry\"><span class=\"setvalue\">"); // get amount htmlWriter.Write(LabourPerUnit.ToString() + "</span> days labour is required"); if (UnitType != LabourUnitType.Fixed) { if (UnitSize == 1) { htmlWriter.Write(" for each "); } else { htmlWriter.Write(" for every <span class=\"setvalue\">" + UnitSize.ToString("#,##0.##") + "</span>"); } htmlWriter.Write("<span class=\"setvalue\">" + UnitType2HTML() + "</span>"); if (WholeUnitBlocks) { htmlWriter.Write(" and will be supplied in blocks"); } } htmlWriter.Write("</div>"); if (MinimumPerPerson > 0) { htmlWriter.Write("\r\n<div class=\"activityentry\">Labour will not be supplied if less than <span class=\"setvalue\">" + MinimumPerPerson.ToString() + "</span> day" + ((MinimumPerPerson == 1) ? "" : "s") + " is required</div>"); } if (MaximumPerPerson > 0 && MaximumPerPerson < 30) { htmlWriter.Write("\r\n<div class=\"activityentry\">No individual can provide more than <span class=\"setvalue\">" + MaximumPerPerson.ToString() + "</span> days</div>"); } if (ApplyToAll) { htmlWriter.Write("\r\n<div class=\"activityentry\">All people matching the below criteria (first level) will perform this task. (e.g. all children)</div>"); } return(htmlWriter.ToString()); } }
public SettingForm() { InitializeComponent(); textBox1.Text = UnitSize.ToString(); textBox2.Text = EA.ToString(); }
/// <summary> /// The ToHTMLFormattedString method returns a string that includes HTML tags to better display fractions /// </summary> /// <returns>String containing HTML-formatted representation of USCookingVolumeMeasurement </returns> public override string ToHTMLFormattedString() { string unitString = Amount.CompareTo(1) > 0 ? UnitSize.ToString().ToLower() + "s" : UnitSize.ToString().ToLower(); return(Amount.ToHTMLFormattedString() + " " + unitString); }