]> O.S.I.I.S - jp/crow.git/commitdiff
code clean
authorjpbruyere <jp.bruyere@hotmail.com>
Sat, 30 Apr 2016 19:34:04 +0000 (21:34 +0200)
committerjpbruyere <jp.bruyere@hotmail.com>
Sat, 30 Apr 2016 19:34:04 +0000 (21:34 +0200)
GLCrow/Window.cs
Tests/GLCrow.cs
Tests/Interfaces/Divers/1.crow [deleted file]
Tests/Interfaces/Splitter/1.crow [new file with mode: 0755]
Tests/Interfaces/Splitter/3.crow [new file with mode: 0755]
Tests/Tests.csproj

index 5d4a07bb2f5e8ef941c308be69ff565391e13b3a..19bf0db5bab972e210d3565cb2a552d664203678 100644 (file)
@@ -178,7 +178,8 @@ namespace GLC
                                Environment.Exit (1);
                        }
                        Debug.WriteLine("GLFW: " + Glfw.GetVersionString ());
-                       // Create GLFW window
+                       // Create GLFW window.
+
                        Glfw.WindowHint(WindowHint.Samples, 1);
                        Glfw.WindowHint(WindowHint.ContextVersionMajor, 3 );
                        Glfw.WindowHint(WindowHint.ContextVersionMinor, 3);
@@ -317,6 +318,7 @@ namespace GLC
                                        CrowInterface.DirtyRect.Left, CrowInterface.DirtyRect.Top,
                                        CrowInterface.DirtyRect.Width, CrowInterface.DirtyRect.Height,
                                        PixelFormat.Bgra, PixelType.UnsignedByte, CrowInterface.dirtyBmp);
+                               //TODO:use pbo
                                //updatePBOs ();                
                                CrowInterface.IsDirty = false;
                        }
index 2602bd72c9dda29d51076d9fd791e1050d43eaa1..35ee72b33f0468af908b9b912109afe3baab7f92 100644 (file)
@@ -97,13 +97,15 @@ namespace Tests
 
                public override void OnLoad ()
                {
-                       testFiles = Directory.GetFiles(@"Interfaces/Expandable", "*.crow").ToArray();
-                       testFiles = Directory.GetFiles(@"Interfaces/GraphicObject", "*.crow").Concat(testFiles).ToArray();
-                       testFiles = Directory.GetFiles(@"Interfaces/Container", "*.crow").Concat (testFiles).ToArray();
-                       testFiles = Directory.GetFiles(@"Interfaces/Group", "*.crow").Concat (testFiles).ToArray();
-                       testFiles = Directory.GetFiles(@"Interfaces/Stack", "*.crow").Concat (testFiles).ToArray();
-                       testFiles = Directory.GetFiles(@"Interfaces/basicTests", "*.crow").Concat (testFiles).ToArray();
-                       testFiles = Directory.GetFiles (@"Interfaces/Divers", "*.crow").Concat (testFiles).ToArray ();
+                       testFiles = new string [0];
+                       //testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/GraphicObject", "*.crow")).ToArray ();
+                       //testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/basicTests", "*.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/Splitter", "*.crow")).ToArray ();
+                       //testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Expandable", "*.crow")).ToArray ();
+                       //testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Divers", "*.crow")).ToArray ();
 
                        //testFiles = Directory.GetFiles(@"Interfaces", "*.crow").Concat(testFiles).ToArray();
                        this.Title = testFiles [idx];
diff --git a/Tests/Interfaces/Divers/1.crow b/Tests/Interfaces/Divers/1.crow
deleted file mode 100755 (executable)
index 582944a..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0"?>
-<VerticalStack Fit="true">
-       <GraphicObject CornerRadius="5" Height="10" Width="600" Background="vgradient|0:Transparent|0,5:White|1:Transparent"/>
-       <HorizontalStack Fit="true" HorizontalAlignment="Left">
-               <Border Fit="true" CornerRadius="10" BorderWidth="1">
-                       <VerticalStack Margin="10">
-                               <CheckBox IsChecked="false" Caption="Check 1" Background="hgradient|0:LimeGreen|1:Transparent"/>
-                               <CheckBox IsChecked="false" Caption="Check 2"  Background="hgradient|0:LimeGreen|1:Transparent"/>
-                               <CheckBox IsChecked="true" Caption="Check 3"  Background="hgradient|0:LimeGreen|1:Transparent"/>
-                               <CheckBox IsChecked="false" Caption="Check 4" Background="hgradient|0:LimeGreen|1:Transparent"/>
-                       </VerticalStack>
-               </Border>
-               <Splitter/>
-               <Border Fit="true" CornerRadius="10" BorderWidth="1">
-                       <VerticalStack Margin="10">
-                               <RadioButton IsChecked="false" Caption="Choice 1" Background="hgradient|0:DarkRed|1:Transparent"/>
-                               <Splitter/>
-                               <RadioButton Width="Stretched" IsChecked="false" Caption="Choice 2"  Background="hgradient|0:DarkRed|1:Transparent"/>
-                               <RadioButton IsChecked="true" Caption="Choice 3"  Background="hgradient|0:DarkRed|1:Transparent"/>
-                               <RadioButton IsChecked="false" Caption="Choice 4" Background="hgradient|0:DarkRed|1:Transparent"/>
-                       </VerticalStack>
-               </Border>
-               <Splitter Thickness="3" />
-               <Border Fit="true" CornerRadius="10" BorderWidth="1" MaximumSize="150;150" MinimumSize="50;50">
-                       <VerticalStack Margin="10">
-                               <Label Text="label 1" Background="hgradient|0:BlueCrayola|1:Transparent"/>
-                               <Label Text="label 2" Background="hgradient|0:BlueCrayola|1:Transparent"/>
-                               <Label Text="label 3" Background="hgradient|0:BlueCrayola|1:Transparent"/>
-                               <Label Text="label 4" Width="Stretched" Background="hgradient|0:BlueCrayola|1:Transparent"/>
-                       </VerticalStack>
-               </Border>
-               <Splitter/>
-               <Border Fit="true" CornerRadius="10" BorderWidth="1">
-                       <VerticalStack Margin="10">
-                               <Button Caption="Button 1" Background="hgradient|0:Red|1:DarkRed" CornerRadius="5"/>
-                               <Button Caption="Button 2"  Background="hgradient|0:AoEnglish|1:Arsenic" CornerRadius="3"/>
-                               <Button Caption="Button 3"  Background="hgradient|0:DarkRed|1:Transparent" CornerRadius="0"/>
-                               <Button Caption="Button 4" Background="hgradient|0:DarkRed|1:Transparent" CornerRadius="8"/>
-                       </VerticalStack>
-               </Border>
-               <Splitter/>
-       </HorizontalStack>
-       <GraphicObject CornerRadius="5" Height="10" Width="600" Background="vgradient|0:Transparent|0,5:White|1:Transparent"/>
-</VerticalStack>
\ No newline at end of file
diff --git a/Tests/Interfaces/Splitter/1.crow b/Tests/Interfaces/Splitter/1.crow
new file mode 100755 (executable)
index 0000000..ca54c72
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<HorizontalStack Width="80%" Height="50%">
+       <Border Width="45%" CornerRadius="10" BorderWidth="1">
+               <VerticalStack>
+                       <VerticalStack Height="45%">
+                               <CheckBox Height="25%" IsChecked="false" Caption="Check 1" Background="hgradient|0:LimeGreen|1:Transparent"/>
+                               <CheckBox Height="25%" IsChecked="false" Caption="Check 2"  Background="hgradient|0:LimeGreen|1:Transparent"/>
+                               <CheckBox Height="25%" IsChecked="true" Caption="Check 3"  Background="hgradient|0:LimeGreen|1:Transparent"/>
+                               <CheckBox Height="25%" IsChecked="false" Caption="Check 4" Background="hgradient|0:LimeGreen|1:Transparent"/>
+                       </VerticalStack>
+                       <Splitter Thickness="3"/>
+                       <VerticalStack Height="45%">
+                               <CheckBox Height="25%" IsChecked="false" Caption="Check 1" Background="hgradient|0:LimeGreen|1:Transparent"/>
+                               <CheckBox Height="25%" IsChecked="false" Caption="Check 2"  Background="hgradient|0:LimeGreen|1:Transparent"/>
+                               <CheckBox Height="25%" IsChecked="true" Caption="Check 3"  Background="hgradient|0:LimeGreen|1:Transparent"/>
+                               <CheckBox Height="25%" IsChecked="false" Caption="Check 4" Background="hgradient|0:LimeGreen|1:Transparent"/>
+                       </VerticalStack>
+               </VerticalStack>
+       </Border>
+       <Splitter Thickness="3"/>
+       <Border Width="45%" CornerRadius="10" BorderWidth="1">
+               <VerticalStack Width="50%" Height="50%" Background="Onyx">
+                       <RadioButton IsChecked="false" Caption="Choice 1" Background="hgradient|0:DarkRed|1:Transparent"/>
+                       <RadioButton IsChecked="false" Caption="Choice 2"  Background="hgradient|0:DarkRed|1:Transparent"/>
+                       <RadioButton IsChecked="true" Caption="Choice 3"  Background="hgradient|0:DarkRed|1:Transparent"/>
+                       <RadioButton IsChecked="false" Caption="Choice 4" Background="hgradient|0:DarkRed|1:Transparent"/>
+               </VerticalStack>
+       </Border>
+       <Splitter Thickness="3"/>
+</HorizontalStack>
diff --git a/Tests/Interfaces/Splitter/3.crow b/Tests/Interfaces/Splitter/3.crow
new file mode 100755 (executable)
index 0000000..582944a
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<VerticalStack Fit="true">
+       <GraphicObject CornerRadius="5" Height="10" Width="600" Background="vgradient|0:Transparent|0,5:White|1:Transparent"/>
+       <HorizontalStack Fit="true" HorizontalAlignment="Left">
+               <Border Fit="true" CornerRadius="10" BorderWidth="1">
+                       <VerticalStack Margin="10">
+                               <CheckBox IsChecked="false" Caption="Check 1" Background="hgradient|0:LimeGreen|1:Transparent"/>
+                               <CheckBox IsChecked="false" Caption="Check 2"  Background="hgradient|0:LimeGreen|1:Transparent"/>
+                               <CheckBox IsChecked="true" Caption="Check 3"  Background="hgradient|0:LimeGreen|1:Transparent"/>
+                               <CheckBox IsChecked="false" Caption="Check 4" Background="hgradient|0:LimeGreen|1:Transparent"/>
+                       </VerticalStack>
+               </Border>
+               <Splitter/>
+               <Border Fit="true" CornerRadius="10" BorderWidth="1">
+                       <VerticalStack Margin="10">
+                               <RadioButton IsChecked="false" Caption="Choice 1" Background="hgradient|0:DarkRed|1:Transparent"/>
+                               <Splitter/>
+                               <RadioButton Width="Stretched" IsChecked="false" Caption="Choice 2"  Background="hgradient|0:DarkRed|1:Transparent"/>
+                               <RadioButton IsChecked="true" Caption="Choice 3"  Background="hgradient|0:DarkRed|1:Transparent"/>
+                               <RadioButton IsChecked="false" Caption="Choice 4" Background="hgradient|0:DarkRed|1:Transparent"/>
+                       </VerticalStack>
+               </Border>
+               <Splitter Thickness="3" />
+               <Border Fit="true" CornerRadius="10" BorderWidth="1" MaximumSize="150;150" MinimumSize="50;50">
+                       <VerticalStack Margin="10">
+                               <Label Text="label 1" Background="hgradient|0:BlueCrayola|1:Transparent"/>
+                               <Label Text="label 2" Background="hgradient|0:BlueCrayola|1:Transparent"/>
+                               <Label Text="label 3" Background="hgradient|0:BlueCrayola|1:Transparent"/>
+                               <Label Text="label 4" Width="Stretched" Background="hgradient|0:BlueCrayola|1:Transparent"/>
+                       </VerticalStack>
+               </Border>
+               <Splitter/>
+               <Border Fit="true" CornerRadius="10" BorderWidth="1">
+                       <VerticalStack Margin="10">
+                               <Button Caption="Button 1" Background="hgradient|0:Red|1:DarkRed" CornerRadius="5"/>
+                               <Button Caption="Button 2"  Background="hgradient|0:AoEnglish|1:Arsenic" CornerRadius="3"/>
+                               <Button Caption="Button 3"  Background="hgradient|0:DarkRed|1:Transparent" CornerRadius="0"/>
+                               <Button Caption="Button 4" Background="hgradient|0:DarkRed|1:Transparent" CornerRadius="8"/>
+                       </VerticalStack>
+               </Border>
+               <Splitter/>
+       </HorizontalStack>
+       <GraphicObject CornerRadius="5" Height="10" Width="600" Background="vgradient|0:Transparent|0,5:White|1:Transparent"/>
+</VerticalStack>
\ No newline at end of file
index 591df4dda16b41ae21ba871bd03e456fe77b1af1..e4f9711dee50688ec228e20a3700f5c8d8b43420 100644 (file)
     <None Include="Interfaces\Stack\4.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\1.crow">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
     <None Include="Interfaces\Divers\2.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     <None Include="Interfaces\Nouveau dossier\testTreeView.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
+    <None Include="Interfaces\Splitter\1.crow">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="Interfaces\Splitter\1 %28copier%29.crow">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
   </ItemGroup>
   <ItemGroup>
     <Folder Include="Interfaces\" />
     <Folder Include="Interfaces\Divers\" />
     <Folder Include="Interfaces\Nouveau dossier\" />
     <Folder Include="Interfaces\Expandable\" />
+    <Folder Include="Interfaces\Splitter\" />
   </ItemGroup>
   <ItemGroup>
     <EmbeddedResource Include="image\tetra.png" />