Skip to content

Commit 35a3409

Browse files
author
tznind
committed
Fix date/time editor default sizes and add showcase
1 parent a510ec5 commit 35a3409

4 files changed

Lines changed: 149 additions & 1 deletion

File tree

Showcase/DateTimes.Designer.cs

Lines changed: 125 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Showcase/DateTimes.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
//------------------------------------------------------------------------------
3+
4+
// <auto-generated>
5+
// This code was generated by:
6+
// TerminalGuiDesigner v2.0.2.0
7+
// You can make changes to this file and they will not be overwritten when saving.
8+
// </auto-generated>
9+
// -----------------------------------------------------------------------------
10+
namespace Showcase {
11+
using Terminal.Gui;
12+
13+
14+
public partial class DateTimes {
15+
16+
public DateTimes() {
17+
InitializeComponent();
18+
}
19+
}
20+
}

Showcase/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ static void Main(string[] args)
1212
Type[] types = [
1313
typeof(Menus),
1414
typeof(Buttons),
15-
typeof(Checkboxes)
15+
typeof(Checkboxes),
16+
typeof(DateTimes)
1617
];
1718

1819
using (var app = Application.Create())

src/ViewFactory.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,8 @@ public static View Create( Type requestedType )
398398
{ } t when t == typeof( Button ) => Create<Button>( ),
399399
{ } t when t == typeof( Line ) => Create<Line>( ),
400400
{ } t when t == typeof( LinearRange ) => Create<LinearRange>( ),
401+
{ } t when t == typeof(DateEditor) => Create<DateEditor>(),
402+
{ } t when t == typeof(TimeEditor) => Create<TimeEditor>(),
401403
{ } t when t == typeof(Label) => Create<Label>(),
402404
{ } t when t == typeof(TextView) => Create<TextView>(),
403405
{ } t when t == typeof(ColorPicker) => Create<ColorPicker>(),

0 commit comments

Comments
 (0)