]> O.S.I.I.S - jp/crow.git/commitdiff
listbox time loading tests
authorjpbruyere <jp.bruyere@hotmail.com>
Sun, 13 Sep 2015 13:07:06 +0000 (15:07 +0200)
committerjpbruyere <jp.bruyere@hotmail.com>
Sun, 13 Sep 2015 13:07:06 +0000 (15:07 +0200)
Tests/GOLIBTest_Listbox.cs
Tests/Interfaces/test_Listbox.goml
Tests/Tests.csproj

index f3064dd14f046e480c123a97a97510bbbf6cfd91..607b2f0593452439ab397a8b5413aabbc630f0a6 100644 (file)
@@ -13,6 +13,8 @@ using System.Diagnostics;
 using go;\r
 using System.Threading;\r
 using System.Collections.Generic;\r
+using System.IO;\r
+using System.Linq;\r
 \r
 \r
 namespace test\r
@@ -62,18 +64,7 @@ namespace test
 //                             new ClsItem("string 2"),\r
 //                             new ClsItem("string 3")\r
 //                     });\r
-               public List<string> TestList = new List<string>(new string[] \r
-                       {\r
-                               "string 1",\r
-                               "string 2",\r
-//                             "string 3",\r
-//                             "string 4",\r
-//                             "string 5",\r
-//                             "string 6",\r
-//                             "string 7",\r
-//                             "string 8",\r
-                               "string 9"\r
-                       });             \r
+               public List<string> TestList;\r
 //             string[] TestList = new string[] \r
 //                     {\r
 //                             "string 1",\r
@@ -84,6 +75,8 @@ namespace test
                protected override void OnLoad (EventArgs e)\r
                {\r
                        base.OnLoad (e);\r
+\r
+                       TestList = Directory.GetFileSystemEntries("/mnt/data/MagicCardDataBase/", "*.txt",SearchOption.AllDirectories).ToList();\r
                        LoadInterface("Interfaces/test_Listbox.goml");\r
 \r
 //                     TestList [1].Field = "test string";\r
index 2263793a5e084ab134c56b8f8bbc3ce07a637069..600a03171a4acce44e76c274094c0931d77964eb 100755 (executable)
@@ -1,3 +1,18 @@
 <?xml version="1.0"?>\r
-<ListBox Data="{TestList}">\r
+<!--<ListBox Data="{TestList}" Focusable="true"/>-->\r
+<ListBox Data="{TestList}" Background="0,5;0,5;0,5;0,5"\r
+                        HorizontalAlignment="Left">\r
+       <Template>\r
+               <Border BorderWidth="1" Margin="1" MinimumSize="0;100" >\r
+                       <HorizontalStack>\r
+                               <Scroller  Name="scroller1" Margin="1" VerticalScrolling="true" \r
+                                                       ScrollY="{../scrollbar1.Scroll}">\r
+                                       <VerticalStack Height="-1" Name="List" Margin="0" VerticalAlignment="Top"/>\r
+                               </Scroller>\r
+                               <Scrollbar Name="scrollbar1" Scroll="{../scroller1.ScrollY}" MaximumScroll="{../scroller1.MaximumScroll}"\r
+                                       Orientation="Vertical" Width="10" />\r
+                       </HorizontalStack>\r
+               </Border>\r
+       </Template>\r
 </ListBox>\r
+\r
index ce66600476013365de0b3bcf0e984bccf7795b29..db5b7b472ce46e6d38f67af08a4475d3f1bf3552 100644 (file)
@@ -8,7 +8,7 @@
     <OutputType>Exe</OutputType>
     <RootNamespace>Tests</RootNamespace>
     <AssemblyName>Tests</AssemblyName>
-    <StartupObject>test.GOLIBTest_4</StartupObject>
+    <StartupObject>test.GOLIBTest_Listbox</StartupObject>
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
     <OutputPath>..\bin\$(configuration)</OutputPath>
     <IntermediateOutputPath>obj\$(configuration)</IntermediateOutputPath>