From b3ec5a0be624f865cc918e34d99737d75461199c Mon Sep 17 00:00:00 2001 From: "Frank A. Krueger" Date: Thu, 16 Nov 2017 00:03:44 -0600 Subject: [PATCH] Remove old button sample --- Samples/Program.cs | 3 +- Samples/XamarinFormsSample.cs | 55 ----------------------------------- 2 files changed, 1 insertion(+), 57 deletions(-) delete mode 100644 Samples/XamarinFormsSample.cs diff --git a/Samples/Program.cs b/Samples/Program.cs index dd017c4..ee406c6 100644 --- a/Samples/Program.cs +++ b/Samples/Program.cs @@ -29,9 +29,8 @@ namespace Samples new TodoSample ().Publish (); new DrawSample ().Publish (); new FilesSample ().Publish (); - new XamarinFormsSample ().Publish (); - UI.Present ("/xamarin-forms"); + UI.Present ("/todo"); Console.ReadLine (); } diff --git a/Samples/XamarinFormsSample.cs b/Samples/XamarinFormsSample.cs deleted file mode 100644 index 0adccdf..0000000 --- a/Samples/XamarinFormsSample.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System; -using Xamarin.Forms; -using Ooui.Forms; - -namespace Samples -{ - public class XamarinFormsSample : ISample - { - public string Title => "Xamarin.Forms Button Counter"; - - Page MakePage () - { - var countLabel = new Label { - Text = "0", - BackgroundColor = Color.Gold, - HorizontalOptions = LayoutOptions.Center, - }; - var countButton = new Button { - Text = "Increase", - HorizontalOptions = LayoutOptions.FillAndExpand, - }; - countButton.Clicked += (sender, e) => { - var v = int.Parse (countLabel.Text); - countLabel.Text = (v + 1).ToString (); - }; - return new ContentPage { - Content = new StackLayout { - BackgroundColor = Color.Khaki, - Children = { - new Label { - Text = "Hello World!", - FontSize = 32, - HorizontalOptions = LayoutOptions.Center, - }, - countLabel, - countButton, - }, - }, - }; - } - - public void Publish () - { - var page = MakePage (); - page.Publish ("/xamarin-forms-shared"); - - Ooui.UI.Publish ("/xamarin-forms", () => MakePage ().GetOouiElement ()); - } - - public Ooui.Element CreateElement () - { - return MakePage ().GetOouiElement (); - } - } -}