From: Jean-Philippe Bruyère Date: Tue, 20 Feb 2018 13:17:56 +0000 (+0100) Subject: debug threading with new TemplatedGroup arch, review examples. X-Git-Tag: v0.9.5-beta~159 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=520c769424c42841cd123e46a07b728b9f243a64;p=jp%2Fcrow.git debug threading with new TemplatedGroup arch, review examples. --- diff --git a/Crow.csproj b/Crow.csproj index f9c42c85..228f21aa 100644 --- a/Crow.csproj +++ b/Crow.csproj @@ -379,6 +379,7 @@ + Crow.DockWindow.template diff --git a/Icons/crowproj.svg b/Icons/crowproj.svg new file mode 100644 index 00000000..b0f6b860 --- /dev/null +++ b/Icons/crowproj.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Icons/project.svg b/Icons/project.svg index 1f9a1f1b..7522605c 100644 --- a/Icons/project.svg +++ b/Icons/project.svg @@ -4,6 +4,6 @@ height="64" width="64"> - + diff --git a/Microsoft.Build.cs b/Microsoft.Build.cs deleted file mode 100644 index eadbfe1e..00000000 --- a/Microsoft.Build.cs +++ /dev/null @@ -1,16 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Mono Runtime Version: 4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ - -// -//This source code was auto-generated by MonoXSD -// -namespace Schemas { - -} diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index b83b6e28..3e2b7331 100755 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -43,7 +43,7 @@ using System.Runtime.CompilerServices; // The form "{Major}.{Minor}.*" will automatically update the build and revision, // and "{Major}.{Minor}.{Build}.*" will update just the revision. -[assembly: AssemblyVersion ("0.5.*")] +[assembly: AssemblyVersion ("0.7.1.*")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/Templates/DirectoryView.template b/Templates/DirectoryView.template index 826dd3f8..2e42ae91 100755 --- a/Templates/DirectoryView.template +++ b/Templates/DirectoryView.template @@ -21,7 +21,7 @@ MouseEnter="{Foreground=DimGray}" MouseLeave="{Foreground=Transparent}"> - to toogle test files") + : base(800, 600,"test: press to toogle test files") { } int idx = 0; string[] testFiles; + public Version CrowVersion { + get { + return System.Reflection.Assembly.GetAssembly(typeof(GraphicObject)).GetName().Version; + } + } + #region Test values for Binding public List Commands; public int intValue = 500; @@ -162,31 +168,26 @@ namespace Tests 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/DragAndDrop/0.crow" }; - //testFiles = new string [] { @"Interfaces/TemplatedControl/testItemTemplateTag.crow" }; - testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/TemplatedControl", "*.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 (); testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Group", "*.crow")).ToArray (); testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Stack", "*.crow")).ToArray (); - + testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/TemplatedControl", "*.crow")).ToArray (); testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/TemplatedContainer", "*.crow")).ToArray (); 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/DragAndDrop", "*.crow")).ToArray (); - testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Unsorted", "*.crow")).ToArray (); + //testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Experimental", "*.crow")).ToArray (); Load(testFiles[idx]).DataSource = this; } void KeyboardKeyDown1 (object sender, OpenTK.Input.KeyboardKeyEventArgs e) { + try { + if (e.Key == OpenTK.Input.Key.Escape) { Quit (null, null); return; @@ -217,7 +218,6 @@ namespace Tests else return; - try { ClearInterface (); if (idx == testFiles.Length) @@ -230,7 +230,7 @@ namespace Tests GraphicObject obj = Load (testFiles[idx]); obj.DataSource = this; } catch (Exception ex) { - MessageBox.Show (CurrentInterface, MessageBox.Type.Error, ex.Message + "\n" + ex.InnerException); + MessageBox.Show (CurrentInterface, MessageBox.Type.Error, ex.Message + "\n" + ex.InnerException.Message); } } // void Tv_SelectedItemChanged (object sender, SelectionChangeEventArgs e) @@ -264,13 +264,17 @@ namespace Tests { Console.WriteLine ("button clicked:" + send.ToString()); } -// void onAddTabButClick(object sender, MouseButtonEventArgs e){ -// -// TabView tv = ifaceControl.CrowInterface.FindByName("tabview1") as TabView; -// if (tv == null) -// return; -// tv.AddChild (new TabItem () { Caption = "NewTab" }); -// } + void onAddTabButClick(object sender, MouseButtonEventArgs e){ + + TabView tv = FindByName("tabview1") as TabView; + if (tv == null) + return; + //tv.AddChild (new TabItem (CurrentInterface) { Caption = "NewTab" }); + lock (CurrentInterface.UpdateMutex) { + tv.AddChild (Crow.IML.Instantiator.CreateFromImlFragment + (@"").CreateInstance (CurrentInterface)); + } + } [STAThread] static void Main () { diff --git a/Tests/Interfaces/Divers/0.crow b/Tests/Interfaces/Divers/0.crow index 055b037e..47f36af5 100755 --- a/Tests/Interfaces/Divers/0.crow +++ b/Tests/Interfaces/Divers/0.crow @@ -148,8 +148,8 @@ - diff --git a/Tests/Interfaces/Divers/testCtxMenu.crow b/Tests/Interfaces/Divers/testCtxMenu.crow new file mode 100755 index 00000000..edffc70a --- /dev/null +++ b/Tests/Interfaces/Divers/testCtxMenu.crow @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/Tests/Interfaces/Divers/testDock.crow b/Tests/Interfaces/Divers/testDock.crow deleted file mode 100644 index 3dc9a6eb..00000000 --- a/Tests/Interfaces/Divers/testDock.crow +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/Tests/Interfaces/Divers/testFileDialog.crow b/Tests/Interfaces/Divers/testFileDialog.crow new file mode 100644 index 00000000..868baf63 --- /dev/null +++ b/Tests/Interfaces/Divers/testFileDialog.crow @@ -0,0 +1,3 @@ + + + diff --git a/Tests/Interfaces/Divers/testIMLContainer.crow b/Tests/Interfaces/Divers/testIMLContainer.crow new file mode 100644 index 00000000..2ba5f2cd --- /dev/null +++ b/Tests/Interfaces/Divers/testIMLContainer.crow @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/Tests/Interfaces/Divers/testImage.crow b/Tests/Interfaces/Divers/testImage.crow index cfa0f113..eddea8aa 100755 --- a/Tests/Interfaces/Divers/testImage.crow +++ b/Tests/Interfaces/Divers/testImage.crow @@ -2,7 +2,7 @@