aboutsummaryrefslogtreecommitdiffstatsci
path: root/Tests/BasicTests.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-02-15 14:58:36 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-02-15 14:58:36 +0100
commitc1b29a565bdbf37fd88d268588710ce8f4f84d5b (patch)
tree37ec254f01bb8d2bad971c137fa787ca76a194d1 /Tests/BasicTests.cs
parent0efa7446134489edd303b349ae1220f1c4228e9a (diff)
CrowIDE WIP, context commands, tooltips, PointIsIn(ref point), configuration no longer static.
also: - remove default null value for datasource - dschange sender changed in group and privateContainer - try closing menuItem, should debug - Contains search also template in TemplatedContainer - change in nodeAddress: expresion starting with '/' means current node - MouseEventArgs CTOR with one source button - RemoveWidget trigger check HoverWidget - Orientation binding in Menu template
Diffstat (limited to 'Tests/BasicTests.cs')
-rw-r--r--Tests/BasicTests.cs27
1 files changed, 25 insertions, 2 deletions
diff --git a/Tests/BasicTests.cs b/Tests/BasicTests.cs
index a33470b0..9327a112 100644
--- a/Tests/BasicTests.cs
+++ b/Tests/BasicTests.cs
@@ -47,6 +47,7 @@ namespace Tests
string[] testFiles;
#region Test values for Binding
+ public List<Crow.Command> Commands;
public int intValue = 500;
DirectoryInfo curDir = new DirectoryInfo (Path.GetDirectoryName(Assembly.GetEntryAssembly().Location));
//DirectoryInfo curDir = new DirectoryInfo (@"/mnt/data/Images");
@@ -135,17 +136,40 @@ namespace Tests
void OnLoadList (object sender, MouseButtonEventArgs e) => TestList = Color.ColorDic.Values.ToList();
+ void command1(){
+ Console.WriteLine("command1 triggered");
+ }
+ void command2(){
+ Console.WriteLine("command2 triggered");
+ }
+ void command3(){
+ Console.WriteLine("command3 triggered");
+ }
+ void command4(){
+ Console.WriteLine("command4 triggered");
+ }
+
protected override void OnLoad (EventArgs e)
{
base.OnLoad (e);
+ Commands = new List<Crow.Command> (new Crow.Command[] {
+ new Crow.Command(new Action(() => command1())) { Caption = "command1"},
+ new Crow.Command(new Action(() => command2())) { Caption = "command2"},
+ new Crow.Command(new Action(() => command3())) { Caption = "command3"},
+ new Crow.Command(new Action(() => command4())) { Caption = "command4"},
+ });
+
this.KeyDown += KeyboardKeyDown1;
//testFiles = new string [] { @"Interfaces/Unsorted/testFileDialog.crow" };
//testFiles = new string [] { @"Interfaces/Divers/colorPicker.crow" };
//testFiles = new string [] { @"Interfaces/Divers/welcome.crow" };
//testFiles = new string [] { @"Interfaces/TemplatedContainer/testTabView.crow" };
- testFiles = new string [] { @"Interfaces/TemplatedControl/testSpinner.crow" };
+ //testFiles = new string [] { @"Interfaces/TemplatedControl/testSpinner.crow" };
+ //testFiles = new string [] { @"Interfaces/GraphicObject/testCtxMenu.crow" };
+ testFiles = new string [] { @"Interfaces/TemplatedControl/testItemTemplateTag.crow" };
+ testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Divers", "*.crow")).ToArray ();
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/GraphicObject", "*.crow")).ToArray ();
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Container", "*.crow")).ToArray ();
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Group", "*.crow")).ToArray ();
@@ -155,7 +179,6 @@ namespace Tests
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/TemplatedGroup", "*.crow")).ToArray ();
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Splitter", "*.crow")).ToArray ();
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Wrapper", "*.crow")).ToArray ();
- testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Divers", "*.crow")).ToArray ();
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Unsorted", "*.crow")).ToArray ();
Load(testFiles[idx]).DataSource = this;