Esempio n. 1
0
            public void ChangeCaret(CaretStyle caretStyle)
            {
                CurrentCaretStyle = caretStyle;
                RemoveChild(Children.First(node => node is MyIElement));
                if (caretStyle != CaretStyle.None)
                {
                    switch (caretStyle)
                    {
                    case CaretStyle.Up:
                        AppendChild(new MyIElement()
                        {
                            ClassName = "fas fa-sort-up float-right", Style = { LineHeight = 1.5 }
                        });
                        break;

                    case CaretStyle.Down:
                        AppendChild(new MyIElement()
                        {
                            ClassName = "fas fa-sort-down float-right", Style = { LineHeight = 1.5 }
                        });
                        break;

                    case CaretStyle.UpDown:
                        AppendChild(new MyIElement()
                        {
                            ClassName = "fas fa-sort float-right", Style = { LineHeight = 1.5 }
                        });
                        break;

                    default:
                        throw new ArgumentOutOfRangeException(nameof(caretStyle), caretStyle, null);
                    }
                }
            }
Esempio n. 2
0
            public TableHeadEntry(string scope, string value, CaretStyle caretStyle = CaretStyle.None, StylingColor color = StylingColor.Light) : base("th")
            {
                CurrentCaretStyle = caretStyle;
                if (scope != "")
                {
                    SetAttribute("scope", scope);
                }
                if (value != "")
                {
                    Text = value;
                }

                if (caretStyle != CaretStyle.None)
                {
                    switch (caretStyle)
                    {
                    case CaretStyle.Up:
                        AppendChild(new MyIElement()
                        {
                            ClassName = "fas fa-sort-up float-right", Style = { LineHeight = 1.5 }
                        });
                        break;

                    case CaretStyle.Down:
                        AppendChild(new MyIElement()
                        {
                            ClassName = "fas fa-sort-down float-right", Style = { LineHeight = 1.5 }
                        });
                        break;

                    case CaretStyle.UpDown:
                        AppendChild(new MyIElement()
                        {
                            ClassName = "fas fa-sort float-right", Style = { LineHeight = 1.5 }
                        });
                        break;

                    default:
                        throw new ArgumentOutOfRangeException(nameof(caretStyle), caretStyle, null);
                    }
                }
                if (color != StylingColor.Light)
                {
                    ClassName = "table-" + Enum.GetName(typeof(StylingColor), color).ToLower();
                }
            }
Esempio n. 3
0
 private void ResetStyle()
 {
     Style = CaretStyle.Line;
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the TextBoxStyle class.
 /// </summary>
 protected EditBoxStyle()
 {
     this.UseCaret   = true;
     this.caretStyle = new CaretStyle();
 }
Esempio n. 5
0
		private void ResetStyle()
		{
			Style = CaretStyle.Line;
		}