aboutsummaryrefslogtreecommitdiffstatsci
path: root/Tests
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2016-02-08 18:35:00 +0100
committerjpbruyere <jp.bruyere@hotmail.com>2016-02-08 18:35:00 +0100
commitbddda84e7a5def83c2778665cc91cefebca88697 (patch)
tree05242c9c005b8c250d8fa8ceb587624c8c7544bf /Tests
parent3dd77aa562c73d5b2ba227f9f7ad7c3ca6456141 (diff)
Add PopDirection to Popper Class
Diffstat (limited to 'Tests')
-rw-r--r--Tests/GOLIBTests.cs15
-rwxr-xr-xTests/Interfaces/testPopper.goml38
2 files changed, 35 insertions, 18 deletions
diff --git a/Tests/GOLIBTests.cs b/Tests/GOLIBTests.cs
index f6c33394..56275a3a 100644
--- a/Tests/GOLIBTests.cs
+++ b/Tests/GOLIBTests.cs
@@ -37,6 +37,8 @@ namespace test
int frameCpt = 0;
int idx = 0;
string[] testFiles = {
+ "testPopper.goml",
+ "testTextBox.crow",
"testColorList.crow",
"0.crow",
"testExpandable.goml",
@@ -52,7 +54,6 @@ namespace test
// "testButton2.crow",
"test2WayBinding.crow",
"fps.goml",
- "testTextBox.crow",
"testImage.crow",
"test4.goml",
"2.crow",
@@ -62,15 +63,14 @@ namespace test
"testWindow3.goml",
"testWindow.goml",
"testCheckbox.goml",
- "testPopper.goml",
"testLabel.goml",
"testAll.goml",
// "testSpinner.goml",
- "testRadioButton2.goml",
+// "testRadioButton2.goml",
"testContainer.goml",
"testRadioButton.goml",
"testMsgBox.goml",
- "testMeter.goml",
+// "testMeter.goml",
};
#region FPS
@@ -116,6 +116,7 @@ namespace test
public string update = "";
public string drawing = "";
public string layouting = "";
+ public Alignment alignment = Alignment.Left;
#endregion
public int intValue = 25;
@@ -134,6 +135,12 @@ namespace test
return;
intValue = Convert.ToInt32(e.NewValue);
}
+ void change_alignment(object sender, EventArgs e){
+ RadioButton rb = sender as RadioButton;
+ if (rb == null)
+ return;
+ NotifyValueChanged ("alignment", Enum.Parse(typeof(Alignment), rb.Caption));
+ }
IList<Color> testList = null;
public IList<Color> TestList {
set{
diff --git a/Tests/Interfaces/testPopper.goml b/Tests/Interfaces/testPopper.goml
index 362972e7..2e6cb173 100755
--- a/Tests/Interfaces/testPopper.goml
+++ b/Tests/Interfaces/testPopper.goml
@@ -1,16 +1,26 @@
<?xml version="1.0"?>
-<Popper Caption="TestPopper" Width="100" Background="DimGray">
- <Border Fit="True" Background="ArmyGreen">
-<!-- <Image Fit="true" Path="#go.Images.Icons.tetra.png" Margin="10"/>-->
- <VerticalStack Fit="true" Margin="10" Background="CornflowerBlue">
- <CheckBox Name="chk1" Background="Red"/>
- <CheckBox Name="chk2" IsChecked="true"/>
- <CheckBox Name="chk3"/>
- <CheckBox Name="chk4"/>
- <HorizontalStack Fit="true" Margin="20">
- <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
- <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center" Background="AoEnglish"/>
- </HorizontalStack>
- </VerticalStack>
+<VerticalStack>
+ <Border Fit="true" Margin="10">
+ <VerticalStack Width="150" Height="-1">
+ <RadioButton Width="0" Caption="Left" IsChecked="true" Checked="change_alignment"/>
+ <RadioButton Width="0" Caption="Right" Checked="change_alignment"/>
+ <RadioButton Width="0" Caption="Top" Checked="change_alignment"/>
+ <RadioButton Width="0" Caption="Bottom" Checked="change_alignment"/>
+ </VerticalStack>
</Border>
-</Popper>
+ <Popper Caption="TestPopper" Width="100" Background="DimGray" PopDirection="{alignment}">
+ <Border Fit="True" Background="ArmyGreen">
+ <!-- <Image Fit="true" Path="#go.Images.Icons.tetra.png" Margin="10"/>-->
+ <VerticalStack Fit="true" Margin="10" Background="CornflowerBlue">
+ <CheckBox Name="chk1" Background="Red"/>
+ <CheckBox Name="chk2" IsChecked="true"/>
+ <CheckBox Name="chk3"/>
+ <CheckBox Name="chk4"/>
+ <HorizontalStack Fit="true" Margin="20">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center" Background="AoEnglish"/>
+ </HorizontalStack>
+ </VerticalStack>
+ </Border>
+ </Popper>
+</VerticalStack>