<Compile Include="src\XCursor.cs" />\r
<Compile Include="src\GraphicObjects\Grid.cs" />\r
<Compile Include="src\GraphicObjects\TextRun.cs" />\r
+ <Compile Include="src\GraphicObjects\MessageBox.cs" />\r
</ItemGroup>\r
<ItemGroup>\r
<Reference Include="System" />\r
<EmbeddedResource Include="Images\Icons\Cursors\sb_h_double_arrow" />\r
<EmbeddedResource Include="Images\Icons\Cursors\sb_v_double_arrow" />\r
<EmbeddedResource Include="Images\button.svg" />\r
+ <EmbeddedResource Include="Templates\MessageBox.goml" />\r
+ <EmbeddedResource Include="Images\Icons\iconInfo.svg" />\r
</ItemGroup>\r
<ItemGroup>\r
<None Include="Images\Icons\Cursors\hand" />\r
<?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 62 62" width="620" height="620" version="1.0">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 62 62" width="62" height="62" version="1.0">
<defs>
<linearGradient id="fieldGradient" gradientUnits="userSpaceOnUse" x1="42.9863" y1="7.01270" x2="22.0144" y2="51.9871">
<stop offset="0.0" stop-color="#BCD6FE"/>
-
+<?xml version="1.0"?>
+<Border Height="-1" BorderWidth="1" BorderColor="White" CornerRadius="10" >
+ <VerticalStack Height="-1" Background="0,4;0,4;0,4;0,4">
+ <Border BorderWidth="1" BorderColor="White" Height="18" Background="0,1;0,5;1,0;0,5">
+ <HorizontalStack Name="hs" Margin="1" Spacing="1" Height="-1" >
+ <GraphicObject Width="5"/>
+ <Image Name="Image" Margin="1" Width="12" Height="12" Path="#go.Images.Icons.tetra.png"/>
+ <Label Foreground="White" Width="0" Text="{Title}" Margin="1" TextAlignment="Center" />
+ <Border CornerRadius="6" BorderWidth="1" Margin="0" BorderColor="Transparent" Height="12" Width="12"
+ MouseEnter="{BorderColor=White}" MouseLeave="{BorderColor=Transparent}">
+ <Image Focusable="true" Name="Image" Margin="0" Width="0" Height="0" Path="#go.Images.Icons.exit2.svg"
+ MouseClick="butQuitPress"/>
+ </Border>
+ <GraphicObject Width="5"/>
+ </HorizontalStack>
+ </Border>
+<!-- <Container Name="Content"/>-->
+ <HorizontalStack Spacing="10">
+ <GraphicObject Width="20"/>
+ <Image Name="Image" Width="32" Height="32"
+ Path="#go.Images.Icons.iconInfo.svg" />
+ <TextRun Font="serif, 12" Width="0" Height="80" Text="{Message}"
+ Multiline="true" WordWrap="true"/>
+ </HorizontalStack>
+ <HorizontalStack Height="-1" Margin="5">
+ <GraphicObject/>
+ <Button Text="Ok"/>
+ <Button Text="Cancel"/>
+ </HorizontalStack>
+ </VerticalStack>
+</Border>
<?xml version="1.0"?>\r
-<Border BorderWidth="1" BorderColor="White" Margin="0" CornerRadius="20">\r
- <VerticalStack Height="0" Width="0" Margin="0">\r
- <Border BorderWidth="1" BorderColor="White" Height="-1" Width="0" Background="0,1;0,5;1,0;0,5">\r
- <HorizontalStack Name="hs" Margin="1" Spacing="1" Height="-1" Width="0" Focusable="false" >\r
- <GraphicObject Width="5" Height="0"/>\r
+<Border BorderWidth="1" BorderColor="White" CornerRadius="20">\r
+ <VerticalStack Height="0">\r
+ <Border BorderWidth="1" BorderColor="White" Height="-1" Background="0,1;0,5;1,0;0,5">\r
+ <HorizontalStack Name="hs" Margin="1" Spacing="1" Height="-1" >\r
+ <GraphicObject Width="5"/>\r
<Image Name="Image" Margin="1" Width="12" Height="12" Path="#go.Images.Icons.tetra.png"/>\r
<Label Foreground="White" Width="0" Name="Title" Margin="1" TextAlignment="Center" />\r
<Border CornerRadius="6" BorderWidth="1" Margin="0" BorderColor="Transparent" Height="12" Width="12"\r
<Image Focusable="true" Name="Image" Margin="0" Width="0" Height="0" Path="#go.Images.Icons.exit2.svg"\r
MouseClick="butQuitPress"/>\r
</Border>\r
- <GraphicObject Width="5" Height="0"/>\r
+ <GraphicObject Width="5"/>\r
</HorizontalStack>\r
</Border>\r
- <Container Name="Content" Margin="0" Width="0" Height="0"/>\r
+ <Container Name="Content"/>\r
</VerticalStack>\r
</Border>
\ No newline at end of file
int frameCpt = 0;\r
int idx = 0;\r
string[] testFiles = {\r
+ "test6.goml",\r
+ "testHStack.goml",\r
+ "testMsgBox.goml",\r
"testLabel.goml",\r
"testGrid.goml",\r
"test1.goml",\r
"test2.goml",\r
"testContainer.goml",\r
"test_stack.goml",\r
- "testHStack.goml",\r
"testScrollbar.goml",\r
"testSpinner.goml",\r
"testExpandable.goml",\r
<?xml version="1.0"?>
-<!--<GraphicObject
- Width="100" Height="100"
- Top="200" Left="200"
- Margin="10" Background="Green"/>-->
-<Border CornerRadius="5" Margin="1" BorderWidth="1" Fit="True" Background="SteelBlue">
- <HorizontalStack Name="hstack" Margin="0" Spacing="5">
- <Label Name="labCpt" Text="55"/>
- <VerticalStack Spacing="1" Name="vstack">
- <Button Width="10" Height="8" MouseClick="onUp">
- <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="up"/>
- </Button>
- <Button Width="10" Height="8" MouseClick="onDown">
- <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="down"/>
- </Button>
- </VerticalStack>
- </HorizontalStack>
+<Border BorderWidth="1" BorderColor="White" CornerRadius="10" Width="500" Height="300">
+ <VerticalStack Height="0" Background="0,4;0,4;0,4;0,4">
+ <Border BorderWidth="1" BorderColor="White" Height="20" Background="0,1;0,5;1,0;0,5">
+ <HorizontalStack Name="hs" Margin="1" Spacing="1" Height="-1" >
+ <GraphicObject Width="5"/>
+ <Image Name="Image" Margin="1" Width="12" Height="12" Path="#go.Images.Icons.tetra.png"/>
+ <Label Foreground="White" Width="0" Name="Title" Margin="1" TextAlignment="Center" />
+ <Border CornerRadius="6" BorderWidth="1" Margin="0" BorderColor="Transparent" Height="12" Width="12"
+ MouseEnter="{BorderColor=White}" MouseLeave="{BorderColor=Transparent}">
+ <Image Focusable="true" Name="Image" Margin="0" Width="0" Height="0"
+ Path="#go.Images.Icons.exit2.svg"/>
+ </Border>
+ <GraphicObject Width="5"/>
+ </HorizontalStack>
+ </Border>
+<!-- <Container Name="Content"/>-->
+ <HorizontalStack Spacing="10">
+ <GraphicObject Width="30"/>
+ <Image Name="Image" Width="40" Height="40" Background="Red"
+ Path="#go.Images.Icons.iconInfo.svg" />
+ <Label Font="serif, 12" Width="0" Height="0" Text="MessageBox"
+ Multiline="true" WordWrap="true"/>
+ <GraphicObject Width="30"/>
+ </HorizontalStack>
+ <HorizontalStack Height="-1" Margin="5">
+ <GraphicObject/>
+ <Button Text="Ok"/>
+ <Button Text="Cancel"/>
+ </HorizontalStack>
+ </VerticalStack>
</Border>
\ No newline at end of file
<?xml version="1.0"?>\r
-<!--<HorizontalStack Background="Gray" Margin="1">-->\r
-<Group Background="Gray" Margin="5" Height="200" Width="300">\r
- <VerticalStack Background="Green" Margin="1">\r
- <HorizontalStack Width="0" Height="0" Margin="5" Background="Red">\r
- <Checkbox Height="-1" Width="100" Background="Blue"/>\r
- <!-- <Checkbox Height="-1" Width="-1"/>-->\r
+<Window Width="600" Height="500">\r
+<Border BorderWidth="5" Margin="10">\r
+ <VerticalStack Margin="10">\r
+ <GraphicObject Height="20" Width="50" Background="Blue"/>\r
+ <HorizontalStack Spacing="5" Margin="5" Background="Red">\r
+ <GraphicObject Height="20" Width="50" Background="Blue"/>\r
+ <GraphicObject Height="20" Width="50" Background="Blue"/>\r
+ <Image Name="Image" Width="40" Height="40" Background="Red"\r
+ Path="#go.Images.Icons.iconInfo.svg" />\r
+ <Label Font="serif, 12" Width="0" Height="0" Text="MessageBox"\r
+ Multiline="true" WordWrap="true"/>\r
+ <GraphicObject Height="20" Width="50" Background="Blue"/>\r
+ <GraphicObject Height="20" Width="50" Background="Blue"/>\r
+ <GraphicObject Height="20" Width="50" Background="Blue"/>\r
</HorizontalStack>\r
</VerticalStack>\r
-</Group>\r
-<!--</HorizontalStack>-->
\ No newline at end of file
+</Border>\r
+</Window>\r
<?xml version="1.0"?>
-<!--<GraphicObject
- Width="100" Height="100"
- Top="200" Left="200"
- Margin="10" Background="Green"/>-->
-<Border CornerRadius="5" Margin="1" BorderWidth="1" Fit="True" Background="SteelBlue">
- <HorizontalStack Name="hstack" Margin="0" Spacing="5">
- <Label Name="labCpt" Text="55"/>
- <VerticalStack Spacing="1" Name="vstack">
- <Button Width="10" Height="8" MouseClick="onUp">
- <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="up"/>
- </Button>
- <Button Width="10" Height="8" MouseClick="onDown">
- <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="down"/>
- </Button>
- </VerticalStack>
- </HorizontalStack>
-</Border>
\ No newline at end of file
+<MessageBox/>
\ No newline at end of file
<OutputType>Exe</OutputType>
<RootNamespace>Tests</RootNamespace>
<AssemblyName>Tests</AssemblyName>
- <StartupObject>test.GOLIBTest_Listbox</StartupObject>
+ <StartupObject>test.GOLIBTests</StartupObject>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<OutputPath>..\bin\$(configuration)</OutputPath>
<IntermediateOutputPath>obj\$(configuration)</IntermediateOutputPath>
<None Include="Interfaces\testGrid.goml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
+ <None Include="Interfaces\testMsgBox.goml">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="Interfaces\test6.goml">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
</ItemGroup>
<ItemGroup>
<Folder Include="Interfaces\" />
// Copyright (c) 2015 jp
//
// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
+// it under the terms of the GNU Generaltitlec License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURtitle See the
+// GNU General Putitleicense for more details.
+//titleou should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
+using System.Xml.Serialization;
+using System.ComponentModel;
namespace go
{
- public class MessageBox
+ [DefaultTemplate("#go.Templates.MessageBox.goml")]
+ public class MessageBox : Window
{
- public MessageBox ()
+ public MessageBox ():base(){}
+
+ string title;
+ string message;
+
+ [XmlAttributeAttribute][DefaultValue("Message box")]
+ public virtual string Title
+ {
+ get { return title; }
+ set {
+ if (title == value)
+ return;
+ title = value;
+ NotifyValueChanged ("Title", title);
+ }
+ }
+ [XmlAttributeAttribute][DefaultValue("Informations")]
+ public virtual string Message
+ {
+ get { return message; }
+ set {
+ if (message == value)
+ return;
+ message = value;
+ NotifyValueChanged ("Message", message);
+ }
+ }
+ #region GraphicObject overrides
+ [XmlAttributeAttribute][DefaultValue(350)]
+ public override int Width {
+ get { return base.Width; }
+ set { base.Width = value; }
+ }
+ [XmlAttributeAttribute][DefaultValue(150)]
+ public override int Height {
+ get { return base.Height; }
+ set { base.Height = value; }
+ }
+ [XmlAttributeAttribute()][DefaultValue(true)]
+ public override bool Focusable
+ {
+ get { return base.Focusable; }
+ set { base.Focusable = value; }
+ }
+ [XmlAttributeAttribute()][DefaultValue("150;80")]
+ public override Size MinimumSize
{
+ get { return base.MinimumSize; }
+ set { base.MinimumSize = value; }
}
+ #endregion
}
}