-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #299 from gui-cs/numeric-up-down-support
Numeric up down support
- Loading branch information
Showing
28 changed files
with
762 additions
and
254 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
//------------------------------------------------------------------------------ | ||
|
||
// <auto-generated> | ||
// This code was generated by: | ||
// TerminalGuiDesigner v2.0.0.0 | ||
// You can make changes to this file and they will not be overwritten when saving. | ||
// </auto-generated> | ||
// ----------------------------------------------------------------------------- | ||
namespace Showcase { | ||
using Terminal.Gui; | ||
|
||
|
||
public partial class NumericUpDown { | ||
|
||
public NumericUpDown() { | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
using System.Collections.ObjectModel; | ||
using System.Runtime.InteropServices.ComTypes; | ||
using Terminal.Gui; | ||
|
||
namespace Showcase | ||
{ | ||
internal class Program | ||
{ | ||
private static Type[] views = new[] | ||
{ | ||
typeof(NumericUpDown) | ||
|
||
}; | ||
static void Main(string[] args) | ||
{ | ||
Application.Init(); | ||
|
||
var w = new Window() | ||
{ | ||
Title = "Showcase" | ||
}; | ||
|
||
var lv = new ListView() | ||
{ | ||
Width = Dim.Fill(), | ||
Height = Dim.Fill(), | ||
}; | ||
w.Add(lv); | ||
lv.SetSource(new ObservableCollection<Type>(views)); | ||
|
||
|
||
lv.KeyDown += (_, e) => | ||
{ | ||
if (e.KeyCode == KeyCode.Enter) | ||
{ | ||
var v = (Toplevel)Activator.CreateInstance(views[lv.SelectedItem]); | ||
e.Handled = true; | ||
Application.Run(v); | ||
} | ||
}; | ||
|
||
Application.Run(w); | ||
Application.Shutdown(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Showcase | ||
|
||
This project contains only .Designer.cs files created by TerminalGuiDesigner. | ||
|
||
The purpose of the project is to ensure backwards compatibility issues are detected quickly as well as providing more structure for manual testing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Terminal.Gui" Version="2.0.0-v2-develop.2203" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Oops, something went wrong.