aboutsummaryrefslogtreecommitdiffstatsci
path: root/Tests
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2015-10-21 18:55:33 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2015-10-21 18:55:33 +0200
commitf31ffd683210c50b777dce4e76d0d9912ca925a8 (patch)
treede0783b77f39de9fa7ccf04fbd8b53bb17db9905 /Tests
parent671366cd56e7d6b2a2afb0839e7fb0f895cb2df3 (diff)
file dialog
Diffstat (limited to 'Tests')
-rw-r--r--Tests/GOLIBTest_DirViewer.cs10
-rw-r--r--Tests/GOLIBTests.cs5
-rwxr-xr-xTests/Interfaces/testDirViewer.goml16
-rw-r--r--Tests/Interfaces/testFileDialog.goml3
-rwxr-xr-xTests/Interfaces/testWindow.goml1
-rw-r--r--Tests/Tests.csproj5
6 files changed, 26 insertions, 14 deletions
diff --git a/Tests/GOLIBTest_DirViewer.cs b/Tests/GOLIBTest_DirViewer.cs
index 9632e665..04ef3871 100644
--- a/Tests/GOLIBTest_DirViewer.cs
+++ b/Tests/GOLIBTest_DirViewer.cs
@@ -35,6 +35,7 @@ namespace test2
{}
public DirContainer CurDir;
+ FileDialog dialog;
protected override void OnLoad (EventArgs e)
{
@@ -42,9 +43,12 @@ namespace test2
CurDir = new DirContainer(new DirectoryInfo ("/home/jp/"));
- GraphicObject dv = Interface.Load ("Interfaces/testDirViewer.goml");
- this.AddWidget(dv);
- dv.DataSource = CurDir;
+// GraphicObject dv = Interface.Load ("Interfaces/testDirViewer.goml");
+// this.AddWidget(dv);
+// dv.DataSource = CurDir;
+ dialog = new FileDialog();
+ dialog.SearchPattern = ".png|.jpg|.jpeg|.gif|.svg";
+ dialog.Show ();
//LoadInterface("Interfaces/testTypeViewer.goml", out g);
}
diff --git a/Tests/GOLIBTests.cs b/Tests/GOLIBTests.cs
index 2c1563ed..4ceb17e0 100644
--- a/Tests/GOLIBTests.cs
+++ b/Tests/GOLIBTests.cs
@@ -140,7 +140,10 @@ namespace test
}
protected override void OnKeyDown (KeyboardKeyEventArgs e)
{
- base.OnKeyDown (e);
+ if (FocusedWidget != null) {
+ base.OnKeyDown (e);
+ return;
+ }
if (e.Key == Key.Escape) {
this.Quit ();
return;
diff --git a/Tests/Interfaces/testDirViewer.goml b/Tests/Interfaces/testDirViewer.goml
index 1c418126..1e3ebd31 100755
--- a/Tests/Interfaces/testDirViewer.goml
+++ b/Tests/Interfaces/testDirViewer.goml
@@ -8,17 +8,17 @@
Background="0,5;0,5;0,5;0,5"
SelectedItemChanged="OnSelectedItemChanged"
ItemTemplate="Interfaces/tmpDirItem.goml" >
-<!-- <Template>
- <Border Width="0" Height="0" BorderWidth="1" Margin="1" MinimumSize="0;100" >
- <HorizontalStack Width="0" Height="0">
- <Scroller Name="scroller1" Height="0" Width="0"
- Margin="10" VerticalScrolling="true" ScrollY="{../scrollbar1.Scroll}">
- <VerticalStack Width="0" Height="-1" Name="List" Margin="0" VerticalAlignment="Top"/>
+ <Template>
+ <Border BorderWidth="1" MinimumSize="20;20" Height="{../TemplatedHeight}" Width="{../TemplatedWidth}">
+ <HorizontalStack Margin="1" Height="{../../TemplatedHeight}" Width="{../../TemplatedWidth}">
+ <Scroller Name="scroller1" Height="{../../../TemplatedHeight}" Width="{../../../TemplatedWidth}"
+ Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Scroll}">
+ <VerticalStack Width="{../../../../TemplatedWidth}" Height="-1" Name="List" Margin="0" VerticalAlignment="Top"/>
</Scroller>
<Scrollbar Name="scrollbar1" Scroll="{../scroller1.ScrollY}" MaximumScroll="{../scroller1.MaximumScroll}"
- Orientation="Vertical" Width="10" />
+ Orientation="Vertical" Width="10" Height="{../../../TemplatedHeight}" />
</HorizontalStack>
</Border>
- </Template>-->
+ </Template>
</ListBox>
</VerticalStack>
diff --git a/Tests/Interfaces/testFileDialog.goml b/Tests/Interfaces/testFileDialog.goml
new file mode 100644
index 00000000..715ff2fa
--- /dev/null
+++ b/Tests/Interfaces/testFileDialog.goml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<FileDialog Width="500" Height="300"/>
+
diff --git a/Tests/Interfaces/testWindow.goml b/Tests/Interfaces/testWindow.goml
index 740cfc53..255efa69 100755
--- a/Tests/Interfaces/testWindow.goml
+++ b/Tests/Interfaces/testWindow.goml
@@ -1,5 +1,4 @@
<?xml version="1.0"?>
-<!--<Group>-->
<Window Name="window1" Left="10" Top="10" Title="Test window"
Width="250" Height="300" >
<VerticalStack Name="contentVSStack" Margin="10" Spacing="10">
diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj
index f9db1b21..e9eccb48 100644
--- a/Tests/Tests.csproj
+++ b/Tests/Tests.csproj
@@ -8,7 +8,7 @@
<OutputType>Exe</OutputType>
<RootNamespace>Tests</RootNamespace>
<AssemblyName>Tests</AssemblyName>
- <StartupObject>test.GOLIBTests</StartupObject>
+ <StartupObject>test2.GOLIBTest_DirViewer</StartupObject>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<OutputPath>..\bin\$(configuration)</OutputPath>
<IntermediateOutputPath>obj\$(configuration)</IntermediateOutputPath>
@@ -178,6 +178,9 @@
<None Include="Interfaces\testCombobox.goml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
+ <None Include="Interfaces\testFileDialog.goml">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
</ItemGroup>
<ItemGroup>
<Folder Include="Interfaces\" />