From: Jean-Philippe Bruyère Date: Sun, 18 Feb 2018 19:03:36 +0000 (+0100) Subject: '/' handling to start at current node in BindingMember, test drag and drop X-Git-Tag: v0.9.5-beta~165 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=ac3e60a3c49a2a1175564fbc994d3aed47c6bfb4;p=jp%2Fcrow.git '/' handling to start at current node in BindingMember, test drag and drop --- diff --git a/Tests/BasicTests.cs b/Tests/BasicTests.cs index 3bfd16e8..8c851286 100644 --- a/Tests/BasicTests.cs +++ b/Tests/BasicTests.cs @@ -167,8 +167,9 @@ namespace Tests //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/GraphicObject/testCtxMenu.crow" }; - testFiles = new string [] { @"Interfaces/TemplatedControl/testItemTemplateTag.crow" }; + testFiles = new string [] { @"Interfaces/DragAndDrop/0.crow" }; + //testFiles = new string [] { @"Interfaces/TemplatedControl/testItemTemplateTag.crow" }; + testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/DragAndDrop", "*.crow")).ToArray (); 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 (); diff --git a/Tests/Interfaces/DragAndDrop/0.crow b/Tests/Interfaces/DragAndDrop/0.crow index 63290f9e..a9c11334 100755 --- a/Tests/Interfaces/DragAndDrop/0.crow +++ b/Tests/Interfaces/DragAndDrop/0.crow @@ -1,9 +1,19 @@ - - - - - \ No newline at end of file + + + + + + + + + + \ No newline at end of file diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index fb384de9..e5cccb5c 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -365,6 +365,9 @@ PreserveNewest + + PreserveNewest + @@ -380,6 +383,7 @@ + diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index aca7032e..ef2e0197 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -317,7 +317,8 @@ namespace Crow public event EventHandler Enabled; /// Occurs when the enabled state this object is set to false public event EventHandler Disabled; - public event EventHandler Dragged; + public event EventHandler StartDrag; + public event EventHandler EndDrag; public event EventHandler Dropped; /// Occurs when one part of the rendering slot changed public event EventHandler LayoutChanged; @@ -1100,13 +1101,14 @@ namespace Crow /// protected virtual void onStartDrag (object sender, EventArgs e){ Debug.WriteLine("DRAG => " + this.ToString()); - Dragged.Raise (this, null); + StartDrag.Raise (this, null); } /// /// Occured when dragging ends without dropping /// protected virtual void onEndDrag (object sender, EventArgs e){ IsDragged = false; + EndDrag.Raise (this, null); Debug.WriteLine("END DRAG => " + this.ToString()); } /// diff --git a/src/IML/BindingMember.cs b/src/IML/BindingMember.cs index 7aaa851c..4a2b2c61 100644 --- a/src/IML/BindingMember.cs +++ b/src/IML/BindingMember.cs @@ -97,8 +97,10 @@ namespace Crow.IML IsStringConstant = true; return; } + } else if (string.IsNullOrEmpty (splitedExp [0])) { + ptr++; } else { - if (string.IsNullOrEmpty (splitedExp [0]) || splitedExp [0] == ".") {//template root + if (splitedExp [0] == ".") {//template root LevelsUp = -1; ptr++; } else {