diff options
Diffstat (limited to 'Samples')
| -rw-r--r-- | Samples/BasicTests/BasicTests.cs | 8 | ||||
| -rw-r--r-- | Samples/HelloWorld/main.cs | 20 | ||||
| -rw-r--r-- | Samples/common/samples.style | 6 | ||||
| -rw-r--r-- | Samples/common/ui/Interfaces/Divers/welcome.crow | 48 | ||||
| -rw-r--r-- | Samples/common/ui/Interfaces/Stack/StretchedInFit4.crow | 8 | ||||
| -rw-r--r-- | Samples/common/ui/Interfaces/TemplatedControl/testEnumSelector.crow | 2 |
6 files changed, 65 insertions, 27 deletions
diff --git a/Samples/BasicTests/BasicTests.cs b/Samples/BasicTests/BasicTests.cs index 11eed07e..9de4e4c1 100644 --- a/Samples/BasicTests/BasicTests.cs +++ b/Samples/BasicTests/BasicTests.cs @@ -11,6 +11,10 @@ namespace Samples { static void Main () { + DbgLogger.IncludeEvents = DbgEvtType.Widget; + DbgLogger.DiscardEvents = DbgEvtType.None; + Crow.DbgLogger.ConsoleOutput = false; + using (BasicTests app = new BasicTests ()) { app.SolidBackground = false; app.Run (); @@ -42,12 +46,12 @@ namespace Samples testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Container", "*.crow")).ToArray (); testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Group", "*.crow")).ToArray (); testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Stack", "*.crow")).ToArray (); - /*testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/TemplatedControl", "*.crow")).ToArray (); + testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/TemplatedControl", "*.crow")).ToArray (); testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/TemplatedContainer", "*.crow")).ToArray (); testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/TemplatedGroup", "*.crow")).ToArray (); testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Wrapper", "*.crow")).ToArray (); testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Divers", "*.crow")).ToArray (); - testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/DragAndDrop", "*.crow")).ToArray ();*/ + testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/DragAndDrop", "*.crow")).ToArray (); //testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Experimental", "*.crow")).ToArray (); Load (testFiles [idx]).DataSource = this; diff --git a/Samples/HelloWorld/main.cs b/Samples/HelloWorld/main.cs index e2be248e..cb5b413b 100644 --- a/Samples/HelloWorld/main.cs +++ b/Samples/HelloWorld/main.cs @@ -7,7 +7,25 @@ namespace HelloWorld class Program : SampleBase { static void Main (string[] args) { using (Interface app = new Program ()) { - app.Initialized += (sender, e) => (sender as Interface).Load ("#HelloWorld.helloworld.crow").DataSource = sender; + //app.Initialized += (sender, e) => (sender as Interface).Load ("#HelloWorld.helloworld.crow").DataSource = sender; + /*app.Initialized += (sender, e) => (sender as Interface).LoadIMLFragment (@" +<Border Background='Red' Margin='100' Fit='true' BorderWidth='10'> +<Image Path='/mnt/devel/CrowIDE/Crow/Images/screenshot3.png' Width='100' Height='100' /> +</Border> +").DataSource = sender;*/ +app.Initialized += (sender, e) => (sender as Interface).LoadIMLFragment (@" +<Container Background='Jet' Margin='10' CacheEnabled='false'> + <CheckBox Background='Blue' CacheEnabled='false'> + <Template> + <Border Background='{./Background}' Margin='5' CacheEnabled='false'> + <HorizontalStack Margin='30' CacheEnabled='true'> + <Label Background='Pink' Fit='true' CacheEnabled='false'/> + </HorizontalStack> + </Border> + </Template> + </CheckBox> +</Container> +").DataSource = sender; app.Run (); } } diff --git a/Samples/common/samples.style b/Samples/common/samples.style index 6f78b149..ee5a541a 100644 --- a/Samples/common/samples.style +++ b/Samples/common/samples.style @@ -4,14 +4,14 @@ FpsLabel { Width = "30"; Font = "droid, 10"; Margin = "0"; - TextAlignment = "Center"; + //TextAlignment = "Center"; } FpsDisp { Font = "droid bold, 10"; Width = "60"; Margin = "0"; - CornerRadius = "3"; - TextAlignment = "Center"; + //CornerRadius = "3"; + //TextAlignment = "Center"; Background = "MediumSeaGreen"; } HStackMeasure { diff --git a/Samples/common/ui/Interfaces/Divers/welcome.crow b/Samples/common/ui/Interfaces/Divers/welcome.crow index 9c7e942c..cddf8bff 100644 --- a/Samples/common/ui/Interfaces/Divers/welcome.crow +++ b/Samples/common/ui/Interfaces/Divers/welcome.crow @@ -1,19 +1,33 @@ <?xml version="1.0"?> -<Border BorderStyle="Sunken" Fit="true" Background="0.8,0.8,0.9,0.5" CornerRadius="30"> - <VerticalStack Margin="20" Spacing="10"> - <Image Path="#Crow.Icons.crow.svg" Width="64" Height="64" Background="WhiteSmoke" CornerRadius="5" Margin="5"/> -<!-- <Label Font="Times bold, 60" Text="C.R.O.W"/>--> - <HorizontalStack Fit="true" DataSource="{CrowVersion}" Spacing="0" Background="Grey" Margin="10" CornerRadius="15"> - <Label Foreground="Jet" Font="mono, 12" Text="version: "/> - <Label Foreground="Black" Font="mono, 16" Text="{Major}"/> - <Label Foreground="Black" Font="mono, 12" Text="."/> - <Label Foreground="Black" Font="mono, 16" Text="{Minor}"/> - <Label Foreground="Black" Font="mono, 12" Text="."/> - <Label Foreground="DarkBlue" Font="mono, 14" Text="{Build}" VerticalAlignment="Bottom"/> +<VerticalStack> +<ListBox Data="{PerfMeasures}" Height="Fit"> + <Template> + <VerticalStack Name="ItemsContainer" Width="90%" Spacing="2"/> + </Template> + <ItemTemplate> + <HorizontalStack Style="HStackMeasure" Width="Stretched"> + <Label Text="{Name}" Style="FpsLabel" Width="Stretched"/> + <Label Text="{current}" Style="FpsDisp" Width="25%" TextAlignment="Right" Margin="2"/> + <Label Text="{minimum}" Style="FpsDisp" Width="25%" TextAlignment="Right" Margin="2"/> + <Label Text="{maximum}" Style="FpsDisp" Width="25%" TextAlignment="Right" Margin="2"/> + <Button Width="Fit" Caption="reset" MouseClick="onResetClick"/> </HorizontalStack> - <Label Font="20" Text="Press <F2> and <F3> to cycle into the examples"/> - <Label Font="20" Text="Those are basic tests used to validate changes,"/> - <Label Foreground="Onyx" Font="20" Text="<F5> => File dialog example"/> - <Label Foreground="Onyx" Font="20" Text="<F6> => Window example"/> - </VerticalStack> -</Border>
\ No newline at end of file + </ItemTemplate> +</ListBox> +<ListBox Data="{PerfMeasures}" Height="Fit"> + <Template> + + <VerticalStack Name="ItemsContainer" Width="90%" Spacing="2"/> + + </Template> + <ItemTemplate> + <HorizontalStack Style="HStackMeasure" Width="Stretched"> + <Label Text="{Name}" Style="FpsLabel" Width="Stretched"/> + <Label Text="{current}" Style="FpsDisp" Width="25%" TextAlignment="Right" Margin="2"/> + <Label Text="{minimum}" Style="FpsDisp" Width="25%" TextAlignment="Right" Margin="2"/> + <Label Text="{maximum}" Style="FpsDisp" Width="25%" TextAlignment="Right" Margin="2"/> + <Button Width="Fit" Caption="reset" MouseClick="onResetClick"/> + </HorizontalStack> + </ItemTemplate> +</ListBox> +</VerticalStack> diff --git a/Samples/common/ui/Interfaces/Stack/StretchedInFit4.crow b/Samples/common/ui/Interfaces/Stack/StretchedInFit4.crow index 2c0b7721..7dc7be90 100644 --- a/Samples/common/ui/Interfaces/Stack/StretchedInFit4.crow +++ b/Samples/common/ui/Interfaces/Stack/StretchedInFit4.crow @@ -1,10 +1,12 @@ <?xml version="1.0"?> <Container Background="DimGrey" Margin="10" Width="Fit" Height="Fit" > - <Popper Width="Stretched" Margin="10" Background="RoyalBlue"> - <Container Width="Fit" Height="Fit" Margin="10" Background="Blue"> + <Popper Width="Stretched" Margin="0" Background="Red" + MouseEnter="{Background=Yellow}" + MouseLeave="{Background=Red}"> + <Container Width="Fit" Height="Fit" Margin="10" Background="{./Background}"> <Container Margin="10" Background="Yellow"> <Container Margin="10" Background="FireBrick"> - <CheckBox/> + </Container> </Container> </Container> diff --git a/Samples/common/ui/Interfaces/TemplatedControl/testEnumSelector.crow b/Samples/common/ui/Interfaces/TemplatedControl/testEnumSelector.crow index 63590efd..1e6e03fa 100644 --- a/Samples/common/ui/Interfaces/TemplatedControl/testEnumSelector.crow +++ b/Samples/common/ui/Interfaces/TemplatedControl/testEnumSelector.crow @@ -1,6 +1,6 @@ <?xml version="1.0"?> <VerticalStack Spacing="5" Margin="5"> - <EnumSelector Caption="Vertical Alignemnt" EnumValue="{²CurrentVAlign}" Width="200"> + <EnumSelector Caption="Vertical Alignemnt" EnumValue="{²CurrentVAlign}" Width="200" Background="Onyx"> <Template> <Popper Caption="{./Caption}" CornerRadius="{./CornerRadius}" Foreground="{./Foreground}" Background="{./Background}"> <Template> |