aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/common/src/SampleBase.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-09-14 07:50:25 +0000
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-09-14 07:50:25 +0000
commitdf943f924dafb874f0052e88539c59197b37964f (patch)
tree87ac165fd192069f18374b3f40d36eaa67d948aa /Samples/common/src/SampleBase.cs
parent98a55f7afba6fa0ab79b46bb1048aab8c7987bd5 (diff)
ToggleCommand creation
Diffstat (limited to 'Samples/common/src/SampleBase.cs')
-rw-r--r--Samples/common/src/SampleBase.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Samples/common/src/SampleBase.cs b/Samples/common/src/SampleBase.cs
index fa6d1cde..1c516bfa 100644
--- a/Samples/common/src/SampleBase.cs
+++ b/Samples/common/src/SampleBase.cs
@@ -70,6 +70,8 @@ namespace Samples
new Command("File command three", (sender) => showMsgBox (sender))
);
public Command SingleCommand => new Command("Single command 1", (sender) => showMsgBox (sender), "#Icons.gavel.svg");
+ public ToggleCommand CMDToggleBoolVal => new ToggleCommand ("Toggle", this, "BoolVal", "#Icons.gavel.svg", true);
+ public ToggleCommand CMDToggleBoolValField => new ToggleCommand ("ToggleField", this, "boolVal", "#Icons.gavel.svg", true);
void initCommands()
{
@@ -291,7 +293,7 @@ namespace Samples
NotifyValueChanged(testString);
}
- }
+ }
string prop1;
public string TestList3SelProp1
{
@@ -337,7 +339,7 @@ namespace Samples
string curSources = "";
- bool boolVal = true;
+ public bool boolVal = true;
public string CurSources
{
get => curSources;
@@ -356,6 +358,7 @@ namespace Samples
return;
boolVal = value;
NotifyValueChanged(boolVal);
+ Console.WriteLine ($"boolVal => {value}");
}
}
public Color AllWidgetBackground {