diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2014-12-22 08:08:36 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2014-12-22 08:08:36 +0100 |
| commit | e8b13fbea6cab4f01af769a1246c49c588fa2f3e (patch) | |
| tree | 649f51c9c995c5f0c106ce3c60bc99fd364b1368 /Tests | |
| parent | 1753010a7b08f29f425356171f78817dc8c6e7f4 (diff) | |
CompilerServices for EventHandler statements in XML attributes
Improve code formatting
debug
Diffstat (limited to 'Tests')
| -rw-r--r-- | Tests/GOLIBTest_4.cs | 23 | ||||
| -rwxr-xr-x | Tests/Interfaces/test4.xml | 22 |
2 files changed, 28 insertions, 17 deletions
diff --git a/Tests/GOLIBTest_4.cs b/Tests/GOLIBTest_4.cs index 8dbc0c7e..f43880de 100644 --- a/Tests/GOLIBTest_4.cs +++ b/Tests/GOLIBTest_4.cs @@ -91,12 +91,21 @@ namespace test foreach (Color col in Color.ColorDic) {
HorizontalStack s = colors.addChild (new HorizontalStack ());
s.HorizontalAlignment = HorizontalAlignment.Left;
- s.addChild (new Button () {
- Bounds = new Size(32, 20),
- CornerRadius = 5,
- Background = col,
- }
- );
+ Border b = new Border () {
+ Bounds = new Size (32, 20),
+ CornerRadius = 5,
+ Background = col,
+ BorderWidth = 2,
+ BorderColor = Color.Transparent,
+ Focusable = true
+ };
+ b.MouseEnter += delegate(object sender, MouseMoveEventArgs ee) {
+ (sender as Border).BorderColor = Color.White;
+ };
+ b.MouseLeave += delegate(object sender, MouseMoveEventArgs ee) {
+ (sender as Border).BorderColor = Color.Transparent;
+ };
+ s.addChild (b);
s.addChild (
new Label (col.ToString ()){
@@ -132,7 +141,7 @@ namespace test fps = (int)RenderFrequency;
labFps.Text = fps.ToString();
- labUpdate.Text = this.updateTime.ElapsedMilliseconds.ToString();
+ labUpdate.Text = this.updateTime.ElapsedMilliseconds.ToString() + " ms";
if (frameCpt > 200) {
labFpsMin.Text = fpsMin.ToString();
labFpsMax.Text = fpsMax.ToString();
diff --git a/Tests/Interfaces/test4.xml b/Tests/Interfaces/test4.xml index 8c283b71..b015b4b1 100755 --- a/Tests/Interfaces/test4.xml +++ b/Tests/Interfaces/test4.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?>
<Group Name="MainGrp" Background="0,5;0,5;0,5;0,5" Foreground="White"
- BorderColor="White" BorderWidth="2" Margin="10" Focusable="True" Width="800" Height="500">
+ Margin="10" Focusable="True" Width="800" Height="500">
<Slider Height="10" Width="300" BorderWidth="1" Background="Transparent"
VerticalAlignment="Bottom" />
<HorizontalStack WidgetSpacing="10" Name="hs0" VerticalAlignment="Top" Background="0,5;0,5;0,5;0,5">
@@ -27,7 +27,7 @@ <Button Margin="5" BorderWidth="0" Background="Gray" Width="-1" Height="-1">
<Label FontSize="10" Text="This is a test" Margin="5" FontColor="White" Foreground="White" />
</Button>
- <TextBoxWidget TextAlignment="LeftCenter"
+ <TextBoxWidget TextAlignment="LeftCenter" Font="droid,14"
Width="300" Height="-1" Margin="2"
BorderColor="White" BorderWidth="1"
Text="editable text"/>
@@ -47,23 +47,25 @@ <Label Name="labUpdate" Text="xxxx" FontSize="16" Width="60" TextAlignment="Center" Background="DarkGreen"/>
</HorizontalStack>
<HorizontalStack>
- <Label Text="Fps:" Width = "30" FontColor="White" VerticalAlignment="Center" TextAlignment="LeftCenter"/>
- <Label Name="labFps" Text="xxxx" FontSize="16" Width = "40" FontColor="Black" TextAlignment="Center" Background="SpringGreen"/>
+ <Label Text="Fps:" Width = "30" VerticalAlignment="Center" TextAlignment="LeftCenter"/>
+ <Label Name="labFps" Text="xxxx" Font="droid bold, 14"
+ TextAlignment="Center" Background="AoEnglish"/>
</HorizontalStack>
<HorizontalStack>
- <Label Text="Min:" Width = "30" FontColor="White" />
- <Label Name="labFpsMin" Text="xxxx" FontSize="16" Width = "40" FontColor="Black" TextAlignment="Center" Background="SpringGreen"/>
+ <Label Text="Min:" Width = "30" />
+ <Label Name="labFpsMin" Text="xxxx" Font="droid bold, 14"
+ TextAlignment="Center" Background="AoEnglish"/>
</HorizontalStack>
<HorizontalStack>
- <Label Text="Max:" Width = "30" FontColor="White" />
- <Label Name="labFpsMax" Text="xxxx" FontSize="16" Width = "40" FontColor="Black" TextAlignment="Center" Background="SpringGreen"/>
+ <Label Text="Max:" Width = "30"/>
+ <Label Name="labFpsMax" Text="xxxx" Font="droid bold, 14"
+ TextAlignment="Center" Background="AoEnglish"/>
</HorizontalStack>
</VerticalStack>
<Scroller Background="DimGray" Height="350" Width="300"
Margin="5" VerticalScrolling="true">
- <VerticalStack Name="colors" BorderColor="Gray" VerticalAlignment="Top"
- Background="Transparent" BorderWidth="2" Margin="5">
+ <VerticalStack Name="colors" VerticalAlignment="Top" Margin="5">
<ProgressBar Name="pbBar2" Width="100" Height="20" Value="50"
BorderWidth="2" BorderColor="White" Foreground="BlueCrayola" Background="DarkGray"/>
</VerticalStack>
|