aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-09-11 14:52:55 +0000
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-09-11 14:52:55 +0000
commitabab1746cb4389db8ccea729343a5b8f05a7e95b (patch)
tree49b9d0d49efb7934a0a76074551f5ac7b923eefe /Samples
parent7b45f28767fb66aebbdb8b126c60fef7e85dda3a (diff)
move iface update interval check to avoid 100% cpu usage, EnumValueSelector.forceRadioButton for bitfields
Diffstat (limited to 'Samples')
-rw-r--r--Samples/ShowCase/ShowCase.cs11
-rw-r--r--Samples/common/ui/Interfaces/Experimental/enumSelector.crow6
2 files changed, 12 insertions, 5 deletions
diff --git a/Samples/ShowCase/ShowCase.cs b/Samples/ShowCase/ShowCase.cs
index 66e1f43e..5aa36fa7 100644
--- a/Samples/ShowCase/ShowCase.cs
+++ b/Samples/ShowCase/ShowCase.cs
@@ -30,10 +30,11 @@ namespace ShowCase
app.SetWindowIcon ("#Crow.Icons.crow.png");
//app.Theme = @"C:\Users\Jean-Philippe\source\Crow\Themes\TestTheme";
CurrentProgramInstance = app;
+
app.Run ();
}
- }
- public Container crowContainer;
+ }
+ public Container crowContainer;
Stopwatch reloadChrono = new Stopwatch ();
@@ -45,11 +46,11 @@ namespace ShowCase
source = value;
CMDSave.CanExecute = IsDirty;
if (!reloadChrono.IsRunning)
- reloadChrono.Restart ();
+ reloadChrono.Restart ();
NotifyValueChanged (source);
NotifyValueChanged ("IsDirty", IsDirty);
}
- }
+ }
void reloadFromSource () {
hideError ();
@@ -63,7 +64,7 @@ namespace ShowCase
crowContainer.SetChild (g);
g.DataSource = this;
}
- } catch (InstantiatorException itorex) {
+ } catch (InstantiatorException itorex) {
showError (itorex);
} catch (Exception ex) {
showError (ex);
diff --git a/Samples/common/ui/Interfaces/Experimental/enumSelector.crow b/Samples/common/ui/Interfaces/Experimental/enumSelector.crow
new file mode 100644
index 00000000..90eaa9a3
--- /dev/null
+++ b/Samples/common/ui/Interfaces/Experimental/enumSelector.crow
@@ -0,0 +1,6 @@
+<Window Width="500" >
+ <VerticalStack>
+ <EnumSelector EnumValue="{²../../AllowedStates}"/>
+ <EnumSelector ForceRadioButton="true" EnumValue="{²../../CurrentState}"/>
+ </VerticalStack>
+</Window> \ No newline at end of file