From f75d82053d9ac440a655860d7d815e418e8e0cf9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Mon, 1 Nov 2021 17:41:21 +0100 Subject: [PATCH] restore update and polling intervals to normal value for showcase --- Samples/ShowCase/ShowCase.cs | 23 +++++++++++++++++-- Samples/ShowCase/ui/Button.template | 4 ++-- Samples/ShowCase/ui/showcase.crow | 4 ++-- .../Experimental/updateIntervals.crow | 8 +++++++ Samples/common/ui/templates/slider.tmp | 11 +++++++++ 5 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 Samples/common/ui/Interfaces/Experimental/updateIntervals.crow create mode 100644 Samples/common/ui/templates/slider.tmp diff --git a/Samples/ShowCase/ShowCase.cs b/Samples/ShowCase/ShowCase.cs index 6774314a..7b25d718 100644 --- a/Samples/ShowCase/ShowCase.cs +++ b/Samples/ShowCase/ShowCase.cs @@ -37,8 +37,8 @@ namespace ShowCase app.SetWindowIcon ("#Crow.Icons.crow.png"); //app.Theme = @"C:\Users\Jean-Philippe\source\Crow\Themes\TestTheme"; CurrentProgramInstance = app; - Interface.UPDATE_INTERVAL = 50; - Interface.POLLING_INTERVAL = 5; + //Interface.UPDATE_INTERVAL = 50; + //Interface.POLLING_INTERVAL = 5; app.Run (); } @@ -169,5 +169,24 @@ namespace ShowCase } return base.OnKeyDown (e); } + + public int CrowUpdateInterval { + get => Crow.Interface.UPDATE_INTERVAL; + set { + if (Crow.Interface.UPDATE_INTERVAL == value) + return; + Crow.Interface.UPDATE_INTERVAL = value; + NotifyValueChanged (Crow.Interface.UPDATE_INTERVAL); + } + } + public int CrowPollingInterval { + get => Crow.Interface.POLLING_INTERVAL; + set { + if (Crow.Interface.POLLING_INTERVAL == value) + return; + Crow.Interface.POLLING_INTERVAL = value; + NotifyValueChanged (Crow.Interface.POLLING_INTERVAL); + } + } } } \ No newline at end of file diff --git a/Samples/ShowCase/ui/Button.template b/Samples/ShowCase/ui/Button.template index 9ef1001d..b05567ac 100644 --- a/Samples/ShowCase/ui/Button.template +++ b/Samples/ShowCase/ui/Button.template @@ -5,8 +5,8 @@ MouseLeave="{Foreground=Transparent};{caption.Foreground=LightGrey}" MouseDown="{Foreground=vgradient|0:Black|0.05:Grey|0.85:Grey|1:White}" MouseUp="{Foreground=vgradient|0:White|0.2:Grey|0.9:Grey|1:Black}"> - + - \ No newline at end of file diff --git a/Samples/ShowCase/ui/showcase.crow b/Samples/ShowCase/ui/showcase.crow index 692ce88e..c5b683da 100644 --- a/Samples/ShowCase/ui/showcase.crow +++ b/Samples/ShowCase/ui/showcase.crow @@ -136,13 +136,13 @@ diff --git a/Samples/common/ui/Interfaces/Experimental/updateIntervals.crow b/Samples/common/ui/Interfaces/Experimental/updateIntervals.crow new file mode 100644 index 00000000..39261a14 --- /dev/null +++ b/Samples/common/ui/Interfaces/Experimental/updateIntervals.crow @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/Samples/common/ui/templates/slider.tmp b/Samples/common/ui/templates/slider.tmp new file mode 100644 index 00000000..d60e66c5 --- /dev/null +++ b/Samples/common/ui/templates/slider.tmp @@ -0,0 +1,11 @@ + + -- 2.47.3