/// <summary> /// Chart 설정 또는 변량에 대해 XML로 생성합니다. /// </summary> /// <param name="writer"></param> public override void GenerateXmlAttributes(XmlWriter writer) { base.GenerateXmlAttributes(writer); if (HeaderText.IsNotWhiteSpace()) { writer.WriteAttributeString("HeaderText", HeaderText); } if (PositionInGrid.HasValue) { writer.WriteAttributeString("PositionInGrid", PositionInGrid.Value.ToString()); } if (Width.IsNotWhiteSpace()) { writer.WriteAttributeString("Width", Width); } if (_headerAttr != null) { _headerAttr.GenerateXmlAttributes(writer); } if (_itemAttr != null) { _itemAttr.GenerateXmlAttributes(writer); } }
public override int GetHashCode() { if (String.IsNullOrEmpty(HeaderText)) { return(Content.GetHashCode() + Category.GetHashCode()); } return(HeaderText.GetHashCode() + Category.GetHashCode()); }
public override int GetHashCode() { unchecked { return(((HeaderText != null ? HeaderText.GetHashCode() : 0) * 397) ^ (Tooltip != null ? Tooltip.GetHashCode() : 0)); } }
private async void OnCurrentStateChanged(object sender, VisualStateChangedEventArgs e) { ViewModel.CurrentState = e.NewState.Name; await HeaderText.StartCompositionFadeSlideAnimationAsync(1, 0, TranslationAxis.X, 0, 24, 150, null, null, EasingFunctionNames.Linear); await HeaderText.StartCompositionFadeSlideAnimationAsync(0, 1, TranslationAxis.X, 24, 0, 150, null, null, EasingFunctionNames.Linear); }
public TablePageTemplate(string format, double headerLineX, double headerLineY, double uttermostPositionByY, HeaderText headerText) { Format = format; HeaderLineX = headerLineX; HeaderLineY = headerLineY; UttermostPositionByY = uttermostPositionByY; HeaderText = headerText; }
/// <summary> /// Called when a page becomes the active page in a frame. /// </summary> /// <param name="e">An object that contains the event data.</param> protected override void OnNavigatedTo(NavigationEventArgs e) { if (null == e) { throw new ArgumentNullException("e"); } base.OnNavigatedTo(e); // Restore Value if returning to application (to avoid inconsistent state) if (State.ContainsKey(StateKey_Value)) { State.Remove(StateKey_Value); // Back out from picker page for consistency with behavior of core pickers in this scenario if (NavigationService.CanGoBack) { NavigationService.GoBack(); return; } } // Automatically uppercase the text for the header. if (null != HeaderText) { HeaderTitle.Text = HeaderText.ToUpper(CultureInfo.CurrentCulture); } Picker.DataContext = Items; Picker.SelectionMode = SelectionMode; if (null != FullModeItemTemplate) { Picker.ItemTemplate = FullModeItemTemplate; } if (SelectionMode == SelectionMode.Single) { ApplicationBar.IsVisible = false; Picker.SelectedItem = SelectedItem; } else { ApplicationBar.IsVisible = true; Picker.ItemContainerStyle = (Style)Resources["ListBoxItemCheckedStyle"]; foreach (object item in Items) { if (null != SelectedItems && SelectedItems.Contains(item)) { Picker.SelectedItems.Add(item); } } } }
public override int GetHashCode() { var hashCode = Cause.GetHashCode(); hashCode = (hashCode * 397) ^ Effect.GetHashCode(); hashCode = (hashCode * 397) ^ HeaderText.GetHashCode(); hashCode = (hashCode * 397) ^ DescriptionText.GetHashCode(); hashCode = (hashCode * 397) ^ Url.GetHashCode(); return(hashCode); }
private static void PrintHeader(string key) { HeaderText headerText = new HeaderText(); var text = headerText.GetHeader(key); string[] lines = text.Split(';'); foreach (string line in lines) { Console.WriteLine(line); } }
public override int GetHashCode() { unchecked { int hashCode = base.GetHashCode(); hashCode = (hashCode * 397) ^ (HeaderText != null ? HeaderText.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ItemTemplate != null ? ItemTemplate.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Items != null ? Items.GetHashCode() : 0); return(hashCode); } }
private void CreateHeaderText() { StringBuilder builder = new StringBuilder($"Analyse des Zeitraumes {AnalyzingParameter.StartDate:d} bis {AnalyzingParameter.EndDate:d}. ("); foreach (ExtendedCommitment commitment in AnalyzingParameter.Commitments) { builder.Append(commitment.Commitment.PeFund.FundName + ", "); } HeaderText = builder.ToString(); HeaderText = HeaderText.Substring(0, HeaderText.Length - 2); HeaderText = HeaderText + ")"; }
IControl Header() { return(Layout .StackFromLeft( ElementIcon().CenterVertically(), Spacer.Small, Label.Create(HeaderText.AsText(), HeaderTextFont, color: HeaderTextColor) .CenterVertically(), Spacer.Small, ExpandCollapseButton()) .WithPadding(left: Indentation) .WithHeight(Height)); }
public async void SetHeadertext(string pageName) { await HeaderAnimationSemaphore.WaitAsync(); if (ViewModel.HeaderText?.Equals(pageName.ToUpper()) != true) { await HeaderText.StartCompositionFadeSlideAnimationAsync(1, 0, TranslationAxis.X, 0, 24, 150, null, null, EasingFunctionNames.Linear); ViewModel.HeaderText = pageName.ToUpper(); await HeaderText.StartCompositionFadeSlideAnimationAsync(0, 1, TranslationAxis.X, 24, 0, 150, null, null, EasingFunctionNames.Linear); } HeaderAnimationSemaphore.Release(); }
internal void WriteHeader(TextWriter textWriter) { if (!string.IsNullOrEmpty(HeaderText)) { if (HeaderText.EndsWith(NewLineForWrite)) { textWriter.Write(HeaderText); } else { textWriter.WriteLine(HeaderText); } } }
void ReleaseDesignerOutlets() { if (Image != null) { Image.Dispose(); Image = null; } if (HeaderText != null) { HeaderText.Dispose(); HeaderText = null; } if (FooterText != null) { FooterText.Dispose(); FooterText = null; } if (ButtonDetails != null) { ButtonDetails.Dispose(); ButtonDetails = null; } if (ButtonCancel != null) { ButtonCancel.Dispose(); ButtonCancel = null; } if (ButtonSend != null) { ButtonSend.Dispose(); ButtonSend = null; } if (Details != null) { Details.Dispose(); Details = null; } if (ScrollView != null) { ScrollView.Dispose(); ScrollView = null; } }
public HeaderContainer(string headerText = "Header") { AddInternal(header = new HeaderText { Text = headerText, }); AddInternal(flowContainer = new FillFlowContainer { Margin = new MarginPadding { Top = header.Font.Size, Left = 30 }, AutoSizeAxes = Axes.Both, Direction = FillDirection.Vertical, }); }
/// <summary> /// 속성들을 Xml Attribute로 생성합니다. /// </summary> /// <param name="writer">Attribute를 쓸 Writer</param> public override void GenerateXmlAttributes(System.Xml.XmlWriter writer) { base.GenerateXmlAttributes(writer); if (HeaderText.IsNotWhiteSpace()) { writer.WriteAttributeString("HeaderText", HeaderText); } if (PositionInGrid.HasValue) { writer.WriteAttributeString("PositionInGrid", PositionInGrid.Value.ToString()); } if (Width.IsNotWhiteSpace()) { writer.WriteAttributeString("Width", Width); } if (_headerAttr != null) { _headerAttr.GenerateXmlAttributes(writer); } if (BgColor.HasValue) { writer.WriteAttributeString("BgColor", BgColor.Value.ToHexString()); } if (BgAlpha.HasValue) { writer.WriteAttributeString("BgAlpha", BgAlpha.Value.ToString()); } if (Label.IsNotWhiteSpace()) { writer.WriteAttributeString("Label", Label); } if (Align.HasValue) { writer.WriteAttributeString("Align", Align.Value.ToString().ToLower()); } if (VAlign.HasValue) { writer.WriteAttributeString("VAlign", VAlign.Value.ToString().ToLower()); } if (_fontAttr != null) { _fontAttr.GenerateXmlAttributes(writer); } }
internal void Draw() { // Get the start position of the notification var pos = Position; // Draw the textures if (Header != null) { Header.Color = Color.FromArgb(AlphaLevel, Content.Color); Header.Draw(pos + Handle.Texture.Header.Position ?? Vector2.Zero, Handle.Texture.Header.SourceRectangle); } if (Content != null) { Content.Color = Color.FromArgb(AlphaLevel, Content.Color); Content.Draw(pos + Handle.Texture.Content.Position ?? Vector2.Zero, Handle.Texture.Content.SourceRectangle, null, null, new Vector2(1, ContentScale)); } if (Footer != null) { Footer.Color = Color.FromArgb(AlphaLevel, Footer.Color); if (ContentScale > 1) { int extraHeight; if (Handle.Texture.Footer.SourceRectangle.HasValue) { extraHeight = Height - Handle.Texture.Footer.SourceRectangle.Value.Height; } else { extraHeight = Height - Footer.Texture.GetLevelDescription(0).Height; } Footer.Draw(pos + new Vector2(0, extraHeight), Handle.Texture.Footer.SourceRectangle); } else { Footer.Draw(pos + Handle.Texture.Footer.Position ?? Vector2.Zero, Handle.Texture.Footer.SourceRectangle); } } // Draw the text HeaderText.Draw(Handle.HeaderText, Color.FromArgb(AlphaLevel, HeaderText.Color), new Rectangle((int)(pos.X + Width - HeaderText.Width - TextOuterPadding.X), (int)(pos.Y + TextOuterPadding.Y), (int)HeaderText.Size.X, (int)HeaderText.Size.Y)); ContentText.Draw(Handle.ContentText, Color.FromArgb(AlphaLevel, ContentText.Color), new Rectangle((int)(pos.X + Width - ContentText.Width - TextOuterPadding.X), (int)(pos.Y + TextOuterPadding.Y + HeaderText.Size.Y + HeaderToContentSpace), (int)ContentText.Size.X, (int)ContentText.Size.Y)); }
protected virtual void PrepareHeaderText() { if (HeaderText == null) { return; } HeaderText.CssClass = RoundPanel.GetHeaderTextCssClassName(); RoundPanel.GetHeaderStyle().AssignToControl(HeaderText, AttributesRange.Font); HeaderText.Add( RenderUtils.CreateLiteralControl( RoundPanel.HtmlEncode(RoundPanel.HeaderText) ) ); }
protected Dictionary <string, int> MapFields() { var fieldMappings = new Dictionary <string, int>(); var drd = new DropDownList(); foreach (GridViewRow grdRow in gv_Fields.Rows) { var i = Int32.Parse(grdRow.RowIndex.ToString()); var fieldText = gv_Fields.Rows[i].Cells[0].Text; drd = (DropDownList)(gv_Fields.Rows[i].Cells[1].FindControl("DropDownList1")); if ((!fieldMappings.ContainsKey(fieldText)) && (!drd.SelectedItem.Text.Equals("_ignore_"))) { var drdValue = Convert.ToInt32(HeaderText.SingleOrDefault(x => x.Value == drd.SelectedItem.Text).Key); fieldMappings.Add(fieldText, drdValue); } } return(fieldMappings); }
public HeaderContainer(string headerText = "") { AddInternal(header = new HeaderText { Text = headerText, }); AddInternal(flowContainer = new FillFlowContainer { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, RelativeSizeAxes = Axes.X, Size = new Vector2(1f, 0f), AutoSizeAxes = Axes.Y, Direction = FillDirection.Vertical, }); }
public void ToStream(XmlWriter s, Managers.TagManager tag, TI.Definition owner) { s.WriteStartElement("entry"); int type_index = TypeIndex.Value; if (type_index >= 0) { var types = (owner as multiplayer_object_type_list_group).TypeList; s.WriteAttributeString("typeIndex", type_index.ToString()); s.WriteAttributeString("typeName", types[type_index].Name.ToString()); } if (!DescriptionText.Handle.IsNull) { s.WriteAttributeString("desc", DescriptionText.ToString()); } if (!HeaderText.Handle.IsNull) { s.WriteAttributeString("header", HeaderText.ToString()); } if (!HelpText.Handle.IsNull) { s.WriteAttributeString("help", HelpText.ToString()); } if (!Icon.Handle.IsNull) { s.WriteAttributeString("icon", Icon.ToString()); } #if false if (Unknown10.Value > 0) { s.WriteAttributeString("unk10", Unknown10.ToString()); } if (Unknown14.Value > 0) { s.WriteAttributeString("unk14", Unknown14.ToString()); } #endif s.WriteEndElement(); }
public MainMenuPage(UiHelper helper) { _restartPage = new RestartPage(helper, this); var labelHeader = new HeaderText("Главное меню"); var label2 = new TextView("-------------------"); var label = new TextView("Тут написано что-то умное!"); var list = new ListView( new string[] { "Управлние стримом", "Что-нибудь еще" } ); var button = new SimpleButton("\u2B07", async(reaction) => { list.Index++; await UpdateView(); }); var button2 = new SimpleButton("\u2B06", async(reaction) => { list.Index--; await UpdateView(); }); var button3 = new SimpleButton("\uD83C\uDD97", async(reaction) => { if (list._index == 0) { await helper.ClosePage(this); await helper.DisplayPage(_restartPage, Root.Channel); } }); AddElement(label); AddElement(label2); AddElement(list); AddElement(button2); AddElement(button); AddElement(button3); AddElement(labelHeader); }
public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append(HeaderText.ToUpper()); sb.AppendLine(); sb.Append(NavigationText.ToUpper()); sb.AppendLine(); //sb.Append("OUTCOME ID"); //sb.AppendLine(); //sb.Append(Outcome.ToString()); if (SubSteps.Any()) { sb.Append("CHILD STEP COUNT"); sb.AppendLine(); sb.Append(SubSteps.Count.ToString()); } return(sb.ToString()); }
public YesNoDialog(string title, string text, Func <Task> yesAction, Func <Task> noAction, UiHelper helper, UiPage parent) { var labelHeader = new HeaderText(title); var label = new TextView(text); var yesButton = new SimpleButton("\u2705", async(reaction) => { await yesAction(); await helper.SwitchPage(this, parent); }); var noButton = new SimpleButton("\u274E", async(reaction) => { await noAction(); await helper.SwitchPage(this, parent); }); AddElement(labelHeader); AddElement(label); AddElement(yesButton); AddElement(noButton); }
void ReleaseDesignerOutlets() { if (CancelButton != null) { CancelButton.Dispose(); CancelButton = null; } if (CompletedLabel != null) { CompletedLabel.Dispose(); CompletedLabel = null; } if (ActionsButton != null) { ActionsButton.Dispose(); ActionsButton = null; } if (ConfirmButton != null) { ConfirmButton.Dispose(); ConfirmButton = null; } if (ContentText != null) { ContentText.Dispose(); ContentText = null; } if (HeaderText != null) { HeaderText.Dispose(); HeaderText = null; } }
public static string Output(HeaderText headerText) { string temp = ""; if (headerText.Przedmiot != null && headerText.Semester != null && headerText.ocena != null) { temp = headerText.Semester + "/" + headerText.Przedmiot + "/" + headerText.ocena; } else { if (headerText.Semester != null && headerText.Przedmiot != null) { temp = headerText.Semester + "/" + headerText.Przedmiot; } else { if (headerText.Semester != null) { temp = headerText.Semester; } else { return(default);
protected internal override void ShowMenu() { Console.Clear(); // calculating left positioning for menu header int leftPosition = (HeaderPos.LeftCentered) ? (Console.WindowWidth / 2) - (HeaderText.Max(x => x.Length) / 2) : HeaderPos.LeftSpacing; int topPosition = (HeaderPos.TopCentered) ? (Console.WindowHeight / 2) - (((HeaderPos.TopPadding > 0) ? HeaderText.Count * 2 * HeaderPos.TopPadding : HeaderText.Count + ((EntriesPos.TopPadding > 0) ? Children.Count * 2 * EntriesPos.TopPadding : Children.Count)) / 2) : Console.CursorTop + HeaderPos.TopSpacing; Console.SetCursorPosition(leftPosition, topPosition); foreach (string line in HeaderText) { Console.WriteLine(line); Console.SetCursorPosition(leftPosition, Console.CursorTop + HeaderPos.TopPadding); } // calculating left positioning for menu entries int totalLeft = Children.Select(x => x.GetEntryString().Length).ToList().Max(x => x); leftPosition = (EntriesPos.LeftCentered) ? (Console.WindowWidth / 2) - (totalLeft / 2) : EntriesPos.LeftSpacing; Console.SetCursorPosition(leftPosition, Console.CursorTop + EntriesPos.TopSpacing); foreach (var child in Children) { Console.WriteLine(child.GetEntryString()); Console.SetCursorPosition(leftPosition, Console.CursorTop + EntriesPos.TopPadding); } }
protected internal override void ShowMenu() { Console.Clear(); // calculating left positioning for menu header int leftPosition = (HeaderPos.LeftCentered) ? (Console.WindowWidth / 2) - (HeaderText.Max(x => x.Length) / 2) : HeaderPos.LeftSpacing; int topPosition = (HeaderPos.TopCentered) ? (Console.WindowHeight / 2) - (((HeaderPos.TopPadding > 0) ? HeaderText.Count * 2 * HeaderPos.TopPadding : HeaderText.Count + ((EntriesPos.TopSpacing > 0) ? EntriesPos.TopSpacing + 1 : 1)) / 2) : Console.CursorTop + HeaderPos.TopSpacing; Console.SetCursorPosition(leftPosition, topPosition); foreach (string line in HeaderText) { Console.WriteLine(line); Console.SetCursorPosition(leftPosition, Console.CursorTop + HeaderPos.TopPadding); } // calculating left positioning for menu entries int totalEntriesLeftSpace = Children.Select(x => x.GetEntryString().Length + EntriesPos.LeftPadding) .ToList().Sum(x => x) - EntriesPos.LeftPadding; topPosition = Console.CursorTop + EntriesPos.TopSpacing; leftPosition = (EntriesPos.LeftCentered) ? (Console.WindowWidth / 2) - (totalEntriesLeftSpace / 2) : EntriesPos.LeftSpacing; foreach (var entry in Children) { Console.SetCursorPosition(leftPosition, topPosition); Console.WriteLine(entry.GetEntryString()); leftPosition += MarkerSymbol.Length + entry.EntryTitle.Length + EntriesPos.LeftPadding; } }
public bool IsDisplayed() { return(HeaderText.WaitRetry(_driver).Text.Contains("Users") && HeaderText.Displayed); }
public void Dispose() { HeaderText?.Dispose(); FooterText?.Dispose(); MenuItems?.Dispose(); }
private void ParseText(DataReader reader, int ActualSize, int block) { //Initial values var sb = new StringBuilder(); bool istext = false; bool isbytes = false; bool Header = true; SplitHeader = ""; Byte bytes; Texto = ""; for (int i = 0; i < ActualSize; i++) { bytes = reader.ReadByte(); if (istext) { switch (bytes) { case 0x01: Texto += sb.Append($"{{{bytes:X2}") + "}"; bytes = reader.ReadByte(); if (bytes == 0x81 || bytes == 0x82 || bytes == 0x83) { isbytes = false; } reader.Stream.Position = reader.Stream.Position - 1; break; case 0x02: isbytes = true; Texto += sb.Append($"{{{bytes:X2}") + "}"; break; case 0x03: istext = false; Texto += "[END]"; break; case 0x81: if (!isbytes) { Texto += NormalizeText(reader); i++; } else { Texto += sb.Append($"{{{bytes:X2}") + "}"; } break; case 0x82: if (!isbytes) { Texto += NormalizeText(reader); i++; } else { Texto += sb.Append($"{{{bytes:X2}") + "}"; } break; case 0x83: if (!isbytes) { Texto += NormalizeText(reader); i++; } else { Texto += sb.Append($"{{{bytes:X2}") + "}"; } break; default: Texto += sb.Append($"{{{bytes:X2}") + "}"; break; } } else { switch (bytes) { case 0x01: bytes = reader.ReadByte(); if (bytes >= 0x81 && bytes <= 0x83) { istext = true; isbytes = false; Header = false; Texto += "[START]"; reader.Stream.Position = reader.Stream.Position - 1; } else { if (Header) { SplitHeader += "{" + "01" + "}"; } else { Texto += "{" + "01" + "}"; } reader.Stream.Position = reader.Stream.Position - 1; } break; default: if (Header) { SplitHeader += sb.Append($"{{{bytes:X2}") + "}"; } else { Texto += sb.Append($"{{{bytes:X2}") + "}"; } break; } } sb = sb.Clear(); } if (Texto == "") { HeaderText.Add("NULL"); Text.Add(SplitHeader); } else { HeaderText.Add(SplitHeader); Text.Add(Texto); } }