aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2020-06-02 14:22:07 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2020-06-02 14:22:07 +0200
commitd24de9fd3ec73108802816e8d894ae25984df8ac (patch)
treef0be437e17ed6eb8cf4fa674cffdc8e16df921db /Samples
parent1297957606b5753bcf4ed39ee7968d008f873171 (diff)
add style as parameter to widget ctor
Diffstat (limited to 'Samples')
-rw-r--r--Samples/BasicTests/BasicTests.cs2
-rw-r--r--Samples/Directory.Build.props3
-rw-r--r--Samples/HelloWorld/ui/helloworld.crow2
-rw-r--r--Samples/common/samples.style2
-rw-r--r--Samples/common/ui/Interfaces/Divers/all.crow24
-rw-r--r--Samples/common/ui/Interfaces/TemplatedControl/testSpinner.crow16
6 files changed, 41 insertions, 8 deletions
diff --git a/Samples/BasicTests/BasicTests.cs b/Samples/BasicTests/BasicTests.cs
index 1a9340d5..e32b6080 100644
--- a/Samples/BasicTests/BasicTests.cs
+++ b/Samples/BasicTests/BasicTests.cs
@@ -37,7 +37,7 @@ namespace tests
//testFiles = new string [] { @"Interfaces/TemplatedGroup/3.crow" };
//testFiles = new string [] { @"Interfaces/Divers/testShape.crow" };
//testFiles = new string [] { @"Interfaces/TemplatedControl/testEnumSelector.crow" };
- testFiles = new string [] { @"Interfaces/TemplatedControl/testSpinner.crow" };
+ testFiles = new string [] { @"Interfaces/Divers/all.crow" };
//testFiles = new string [] { @"Interfaces/Divers/colorPicker2.crow" };
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/GraphicObject", "*.crow")).ToArray ();
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Container", "*.crow")).ToArray ();
diff --git a/Samples/Directory.Build.props b/Samples/Directory.Build.props
index d2f140e7..1a85bb22 100644
--- a/Samples/Directory.Build.props
+++ b/Samples/Directory.Build.props
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
- <TargetFrameworks>netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks>net472</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootDirectory>$(MSBuildThisFileDirectory)</RootDirectory>
@@ -16,7 +16,6 @@
<SamplesDir>$(SolutionDir)Samples\</SamplesDir>
</PropertyGroup>
-
<ItemGroup>
<PackageReference Include="DllMapCore" Version="0.1.0" Condition="'$(TargetFramework)'=='netcoreapp3.1'" />
<ProjectReference Include="$(SolutionDir)Crow\Crow.csproj" />
diff --git a/Samples/HelloWorld/ui/helloworld.crow b/Samples/HelloWorld/ui/helloworld.crow
index 73ccdffd..b3facb0e 100644
--- a/Samples/HelloWorld/ui/helloworld.crow
+++ b/Samples/HelloWorld/ui/helloworld.crow
@@ -1,2 +1,2 @@
<?xml version="1.0"?>
-<Label Text="Hello world"/> \ No newline at end of file
+<Label Text="Hello world -|${TestCst}|-"/> \ No newline at end of file
diff --git a/Samples/common/samples.style b/Samples/common/samples.style
index ff956325..9c382e6a 100644
--- a/Samples/common/samples.style
+++ b/Samples/common/samples.style
@@ -1,3 +1,5 @@
+TestCst = "This is a constant test.";
+
FpsLabel {
Width = "30";
Font = "droid, 10";
diff --git a/Samples/common/ui/Interfaces/Divers/all.crow b/Samples/common/ui/Interfaces/Divers/all.crow
new file mode 100644
index 00000000..e553e023
--- /dev/null
+++ b/Samples/common/ui/Interfaces/Divers/all.crow
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<VerticalStack Name="TopContainer" Margin="100" Background="DarkGrey" Spacing="10">
+ <VerticalStack Width="200" Height="Fit" Spacing="5">
+ <Label/>
+ <TextBox />
+ <Button />
+ <CheckBox />
+ <RadioButton/>
+ <Spinner/>
+ <Slider />
+ <Popper />
+ <Expandable />
+ </VerticalStack>
+
+ <Widget Width="200" Height="20" Background="Teal"/>
+ <Widget Width="200" Height="20" Background="SeaGreen"/>
+ <Widget Width="200" Height="20" Background="MediumSeaGreen"/>
+ <Widget Width="200" Height="20" Background="DarkSlateGrey"/>
+ <Widget Width="200" Height="20" Background="RoyalBlue"/>
+ <Widget Width="200" Height="20" Background="SteelBlue"/>
+ <Widget Width="200" Height="20" Background="CornflowerBlue"/>
+ <Widget Width="200" Height="20" Background="Brown"/>
+ <Widget Width="200" Height="20" Background="FireBrick"/>
+</VerticalStack> \ No newline at end of file
diff --git a/Samples/common/ui/Interfaces/TemplatedControl/testSpinner.crow b/Samples/common/ui/Interfaces/TemplatedControl/testSpinner.crow
index 89cd472e..f0271855 100644
--- a/Samples/common/ui/Interfaces/TemplatedControl/testSpinner.crow
+++ b/Samples/common/ui/Interfaces/TemplatedControl/testSpinner.crow
@@ -1,12 +1,20 @@
<?xml version="1.0"?>
-<VerticalStack Name="TopContainer" Width="400" Height="Fit"
- Margin="20" Background="DarkGrey">
+<VerticalStack Name="TopContainer" Margin="100" Background="DarkGrey" Spacing="10">
<Spinner/>
<Spinner Width="Fit"/>
<Spinner Width="120"/>
- <HorizontalStack Fit="true" Margin="5" Background="SkyBlue">
+ <HorizontalStack Fit="true" Margin="5" Background="DarkSlateGrey">
<Spinner Name="sp1" Value="5" ValueChanged="onSpinnerValueChange"/>
- <Spinner Value="5" Width="60"/>
+ <Spinner Value="5" Width="80"/>
<Spinner Value="5"/>
</HorizontalStack>
+ <Widget Width="200" Height="20" Background="Teal"/>
+ <Widget Width="200" Height="20" Background="SeaGreen"/>
+ <Widget Width="200" Height="20" Background="MediumSeaGreen"/>
+ <Widget Width="200" Height="20" Background="DarkSlateGrey"/>
+ <Widget Width="200" Height="20" Background="RoyalBlue"/>
+ <Widget Width="200" Height="20" Background="SteelBlue"/>
+ <Widget Width="200" Height="20" Background="CornflowerBlue"/>
+ <Widget Width="200" Height="20" Background="Brown"/>
+ <Widget Width="200" Height="20" Background="FireBrick"/>
</VerticalStack> \ No newline at end of file