Exemplo n.º 1
0
 public ChatBox(WindowManager _WM, State _parentState, int _X, int _Y, int _SizeX, int _SizeY)
     : base(_WM, _parentState, _X, _Y, _SizeX, _SizeY, "Chat Box", BorderType.None)
 {
     ParentState = _parentState;
     OutComing = new DystopiaUI.Widgets.TextBox(_WM, 5, _SizeY-28-(1*25), 100, 1, true);
     InComing = new DystopiaUI.Widgets.TextBox(_WM, 5, 0, _SizeX-10, 6, true);
     SendButton = new DystopiaUI.Widgets.TextButton(_WM, "Send", _SizeX - 10 - 40, _SizeY -28-50, 100, 100, new EventHandler(SendMessage));
     AddWidget(OutComing);
     AddWidget(InComing);
     AddWidget(SendButton);
 }
Exemplo n.º 2
0
 private static Border CreateBorder(Widgets.TextBox textBox)
 {
     return(new Border
     {
         Padding = new Thickness(textBox.PaddingX, textBox.PaddingY, textBox.PaddingX, textBox.PaddingY),
         HorizontalAlignment = textBox.HorizontalAlignment.ToXaml(),
         VerticalAlignment = textBox.VerticalAlignment.ToXaml(),
         Background = new SolidColorBrush(textBox.BackColor.ToXaml()),
         CornerRadius = new CornerRadius(textBox.CornerRadius),
         Child = new TextBlock
         {
             Text = textBox.Text,
             Foreground = new SolidColorBrush(textBox.TextColor.ToXaml())
         }
     });
 }