Ooui-tws-port/Samples/Program.cs

67 lines
1.9 KiB
C#
Raw Normal View History

2017-06-18 23:50:22 +00:00
using System;
2018-09-02 04:56:35 +00:00
using System.Collections.Generic;
2017-06-18 23:50:22 +00:00
using Ooui;
namespace Samples
{
class Program
{
static void Main (string[] args)
{
2017-11-10 17:57:45 +00:00
Xamarin.Forms.Forms.Init ();
2017-06-19 01:42:28 +00:00
for (var i = 0; i < args.Length; i++) {
var a = args[i];
switch (args[i]) {
case "-p" when i + 1 < args.Length:
case "--port" when i + 1 < args.Length:
{
int p;
if (int.TryParse (args[i + 1], out p)) {
UI.Port = p;
}
i++;
}
break;
}
}
2018-09-02 04:56:35 +00:00
var samples = new List<ISample>
{
new EntryListViewSample(),
new ButtonSample (),
new TodoSample (),
new DrawSample (),
new FilesSample(),
new DisplayAlertSample (),
new DotMatrixClockSample(),
new EditorSample(),
new MonkeysSample(),
new BugSweeperSample(),
new RefreshListViewSample (),
new SearchBarSample(),
new SliderSample(),
new SwitchListViewSample(),
new TimePickerSample(),
new TipCalcSample(),
new WeatherAppSample(),
new XuzzleSample(),
new WebViewSample(),
new PickerSample(),
};
2017-06-18 23:50:22 +00:00
2018-09-02 04:56:35 +00:00
foreach (var sample in samples)
{
sample.Publish();
}
2019-03-21 22:01:16 +00:00
var samplePage = new SamplePicker(samples);
2018-09-02 04:56:35 +00:00
samplePage.Publish();
UI.Present (samplePage.Path);
2017-06-18 23:50:22 +00:00
Console.ReadLine ();
}
}
}