diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-03-29 12:18:38 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-03-29 12:18:38 +0200 |
| commit | e5df4ae295d164042a91fb7f75cec4323d88833f (patch) | |
| tree | d4e802987cc88d581454e7368fe7501fce2df3c9 /Samples/common/SampleBase.cs | |
| parent | f0adbcc9e60ae871d667afb610c7b4718b73f292 (diff) | |
enumSelector for bitfields, CommandBase abstract class, numericControl onUp/down handler, dock window reload bug
Diffstat (limited to 'Samples/common/SampleBase.cs')
| -rw-r--r-- | Samples/common/SampleBase.cs | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Samples/common/SampleBase.cs b/Samples/common/SampleBase.cs index 71fb65f1..79e018d0 100644 --- a/Samples/common/SampleBase.cs +++ b/Samples/common/SampleBase.cs @@ -35,7 +35,10 @@ namespace Crow public Version CrowVersion => Assembly.GetAssembly (typeof (Widget)).GetName ().Version; #region Test values for Binding - public List<Command> Commands; + public CommandGroup Commands; + public CommandGroup EditCommands = new CommandGroup( + new Command("command 1", () => Console.WriteLine("command1 pressed"))); + public int intValue = 500; VerticalAlignment currentVAlign; @@ -262,14 +265,16 @@ namespace Crow } } + + #endregion protected override void OnInitialized () { - Commands = new List<Command> { - new Command(() => MessageBox.ShowModal(this, MessageBox.Type.Information, "context menu 1 clicked")) { Caption = "Action 1" }, - new Command(() => MessageBox.ShowModal(this, MessageBox.Type.Information, "context menu 2 clicked")) { Caption = "Action 2" }, - new Command(() => MessageBox.ShowModal(this, MessageBox.Type.Information, "context menu 3 clicked")) { Caption = "Action 3" } - }; + Commands = new CommandGroup ( + new Command("Action 1", () => MessageBox.ShowModal(this, MessageBox.Type.Information, "context menu 1 clicked")), + new Command("Action 2", () => MessageBox.ShowModal(this, MessageBox.Type.Information, "context menu 2 clicked")), + new Command("Action 3", () => MessageBox.ShowModal(this, MessageBox.Type.Information, "context menu 3 clicked")) + ); base.OnInitialized (); } |