<EmbeddedResource Include="Images\Icons\buttonB.svg" />
<EmbeddedResource Include="Images\Icons\checkbox.svg" />
<EmbeddedResource Include="Images\Icons\radiobutton.svg" />
- <EmbeddedResource Include="Templates\RadioButton.goml" />
- <EmbeddedResource Include="Templates\Slider.goml" />
- <EmbeddedResource Include="Templates\Spinner.goml" />
<EmbeddedResource Include="Templates\Spinner %28copier%29.goml" />
<EmbeddedResource Include="Templates\ItemTemplate.goml" />
- <EmbeddedResource Include="Templates\Expandable.goml" />
<EmbeddedResource Include="Images\Icons\expandable.svg" />
<EmbeddedResource Include="Templates\Checkbox2.goml" />
- <EmbeddedResource Include="Templates\Popper.goml" />
- <EmbeddedResource Include="Templates\Window.goml" />
<EmbeddedResource Include="Images\Icons\tetra.png" />
<EmbeddedResource Include="Images\Icons\exit.svg" />
<EmbeddedResource Include="Templates\AnalogMeter0.goml" />
<EmbeddedResource Include="Images\Icons\member.svg" />
<EmbeddedResource Include="Images\Icons\exit2.svg" />
<EmbeddedResource Include="Images\button.svg" />
- <EmbeddedResource Include="Templates\MessageBox.goml" />
<EmbeddedResource Include="Images\Icons\iconInfo.svg" />
- <EmbeddedResource Include="Templates\FileDialog.goml" />
<EmbeddedResource Include="Templates\tmpDirItem.goml" />
<EmbeddedResource Include="Templates\ScrollingListBox.goml" />
<EmbeddedResource Include="Templates\imgItemTemplate.goml" />
<EmbeddedResource Include="Images\Icons\Cursors\hand" />
<EmbeddedResource Include="Images\Icons\Cursors\help" />
<EmbeddedResource Include="Images\Icons\Cursors\move" />
- <EmbeddedResource Include="Templates\CheckBox.goml" />
- <EmbeddedResource Include="Templates\ComboBox.goml" />
- <EmbeddedResource Include="Templates\GroupBox.goml" />
- <EmbeddedResource Include="Templates\ListBox.goml" />
- <EmbeddedResource Include="Templates\ScrollBar.goml" />
- <EmbeddedResource Include="Templates\Button.crow" />
<EmbeddedResource Include="Templates\ArrowButTemplate.crow" />
<EmbeddedResource Include="Images\crow0.svg" />
- <EmbeddedResource Include="Templates\TreeView.crow" />
- <EmbeddedResource Include="Templates\TabItem.crow" />
<EmbeddedResource Include="Templates\Dummy.goml" />
<EmbeddedResource Include="Images\Icons\crow.png" />
<EmbeddedResource Include="Images\Icons\crow.svg" />
<EmbeddedResource Include="Default.style" />
<EmbeddedResource Include="Images\Icons\folder.svg" />
<EmbeddedResource Include="Images\Icons\file.svg" />
- <EmbeddedResource Include="Templates\DirectoryView.crow" />
+ <EmbeddedResource Include="Templates\Button.template">
+ <LogicalName>Crow.Button.template</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Templates\CheckBox.template">
+ <LogicalName>Crow.CheckBox.template</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Templates\ComboBox.template">
+ <LogicalName>Crow.ComboBox.template</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Templates\Expandable.template">
+ <LogicalName>Crow.Expandable.template</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Templates\DirectoryView.template">
+ <LogicalName>Crow.DirectoryView.template</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Templates\FileDialog.template">
+ <LogicalName>Crow.FileDialog.template</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Templates\GroupBox.template">
+ <LogicalName>Crow.GroupBox.template</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Templates\ListBox.template">
+ <LogicalName>Crow.ListBox.template</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Templates\MessageBox.template">
+ <LogicalName>Crow.MessageBox.template</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Templates\Popper.template">
+ <LogicalName>Crow.Popper.template</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Templates\RadioButton.template">
+ <LogicalName>Crow.RadioButton.template</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Templates\ScrollBar.template">
+ <LogicalName>Crow.ScrollBar.template</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Templates\Slider.template">
+ <LogicalName>Crow.Slider.template</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Templates\Spinner.template">
+ <LogicalName>Crow.Spinner.template</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Templates\TabItem.template">
+ <LogicalName>Crow.TabItem.template</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Templates\TreeView.template">
+ <LogicalName>Crow.TreeView.template</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Templates\Window.template">
+ <LogicalName>Crow.Window.template</LogicalName>
+ </EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="README.md" />
+++ /dev/null
-<?xml version="1.0"?>
-<Border Background="{./Background}" MinimumSize="50,20" Height="{./HeightPolicy}" Width="{./WidthPolicy}"
- Foreground="Transparent" CornerRadius="{../CornerRadius}" BorderWidth="1"
- MouseEnter="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black;caption.Foreground=White}"
- MouseLeave="{Foreground=Transparent;caption.Foreground=LightGray}"
- MouseDown="{Foreground=vgradient|0:Black|0.05:Gray|0.85:Gray|1:White}"
- MouseUp="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"
- >
-<!-- <Image Height="0" Width="0" Margin="0" Path="{./Image}" SvgSub="{./SvgSub}"/>-->
- <Label Font="{./Font}" Name="caption" Margin="3" Foreground="LightGray" Text="{./Caption}"/>
-</Border>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<Border Background="{./Background}" MinimumSize="50,20" Height="{./HeightPolicy}" Width="{./WidthPolicy}"
+ Foreground="Transparent" CornerRadius="{../CornerRadius}" BorderWidth="1"
+ MouseEnter="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black;caption.Foreground=White}"
+ MouseLeave="{Foreground=Transparent;caption.Foreground=LightGray}"
+ MouseDown="{Foreground=vgradient|0:Black|0.05:Gray|0.85:Gray|1:White}"
+ MouseUp="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"
+ >
+<!-- <Image Height="0" Width="0" Margin="0" Path="{./Image}" SvgSub="{./SvgSub}"/>-->
+ <Label Font="{./Font}" Name="caption" Margin="3" Foreground="LightGray" Text="{./Caption}"/>
+</Border>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0"?>
-<HorizontalStack Style="Control" Background="{./Background}" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
- <Image Style="Icon" Path="#Crow.Images.Icons.checkbox.svg"
- SvgSub="{./IsChecked}"/>
- <Label Font="{./Font}" Text="{./Caption}" Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
-</HorizontalStack>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<HorizontalStack Style="Control" Background="{./Background}" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+ <Image Style="Icon" Path="#Crow.Images.Icons.checkbox.svg"
+ SvgSub="{./IsChecked}"/>
+ <Label Font="{./Font}" Text="{./Caption}" Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
+</HorizontalStack>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0"?>
-<Popper Name="popper" PopDirection="Bottom" Height="{../HeightPolicy}" Width="{../WidthPolicy}">
- <Template>
- <Border CornerRadius="0" Foreground="LightGray" Height="{../../HeightPolicy}" Width="{../../WidthPolicy}">
- <HorizontalStack Margin="0
- " Spacing="1" Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}">
- <TextBox MinimumSize="80,10" Margin="1" Foreground="Black" Background="White"
- Text="{../../../../SelectedItem}"
- Height="{../../../../HeightPolicy}" Width="{../../../../WidthPolicy}"/>
- <Button Width="14" Height="14" Focusable="false"
- Template="#Crow.Templates.ArrowButTemplate.crow">
- <Image Margin="0" Path="#Crow.Images.Icons.updown.svg" SvgSub="down"/>
- </Button>
- </HorizontalStack>
- </Border>
- </Template>
- <Border Background="DimGray" BorderWidth="1" Margin="1"
- MinimumSize="{../../MinimumPopupSize}" Fit="true">
- <Scroller Name="scroller1" Margin="2" VerticalScrolling="true"
- MaximumSize="0,200"
- Height="{../HeightPolicy}" Width="{../WidthPolicy}"
- HorizontalAlignment="Left"
- ValueChanged="../../../_scroller_ValueChanged">
- <VerticalStack LayoutChanged="../../../../_list_LayoutChanged"
- Height="Fit" Width="{../../WidthPolicy}" Name="List" Margin="0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"/>
- </Scroller>
- </Border>
-</Popper>
--- /dev/null
+<?xml version="1.0"?>
+<Popper Name="popper" PopDirection="Bottom" Height="{../HeightPolicy}" Width="{../WidthPolicy}">
+ <Template>
+ <Border CornerRadius="0" Foreground="LightGray" Height="{../../HeightPolicy}" Width="{../../WidthPolicy}">
+ <HorizontalStack Margin="0
+ " Spacing="1" Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}">
+ <TextBox MinimumSize="80,10" Margin="1" Foreground="Black" Background="White"
+ Text="{../../../../SelectedItem}"
+ Height="{../../../../HeightPolicy}" Width="{../../../../WidthPolicy}"/>
+ <Button Width="14" Height="14" Focusable="false"
+ Template="#Crow.Templates.ArrowButTemplate.crow">
+ <Image Margin="0" Path="#Crow.Images.Icons.updown.svg" SvgSub="down"/>
+ </Button>
+ </HorizontalStack>
+ </Border>
+ </Template>
+ <Border Background="DimGray" BorderWidth="1" Margin="1"
+ MinimumSize="{../../MinimumPopupSize}" Fit="true">
+ <Scroller Name="scroller1" Margin="2" VerticalScrolling="true"
+ MaximumSize="0,200"
+ Height="{../HeightPolicy}" Width="{../WidthPolicy}"
+ HorizontalAlignment="Left"
+ ValueChanged="../../../_scroller_ValueChanged">
+ <VerticalStack LayoutChanged="../../../../_list_LayoutChanged"
+ Height="Fit" Width="{../../WidthPolicy}" Name="List" Margin="0"
+ HorizontalAlignment="Left"
+ VerticalAlignment="Top"/>
+ </Scroller>
+ </Border>
+</Popper>
+++ /dev/null
-<?xml version="1.0"?>
-<TreeView IsRoot="true" Name="treeView" Data="{./CurrentDirectory}"
- SelectedItemChanged="./onSelectedItemChanged">
- <ItemTemplate DataType="System.IO.FileInfo">
- <HorizontalStack Focusable="true" Height="Fit" Width="Stretched" Background="{../Background}" >
- <Image Margin="2" Width="14" Height="14"
- Path="#Crow.Images.Icons.file.svg"/>
- <Label Text="{Name}" Width="Stretched"
- MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}"
- MouseLeave="{Background=Transparent}"/>
- </HorizontalStack>
- </ItemTemplate>
- <ItemTemplate DataType="System.IO.DirectoryInfo" Data="GetFileSystemInfos">
- <Expandable Caption="{Name}" >
- <Template>
- <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
- <HorizontalStack Spacing="1" Height="Fit" Width="{./WidthPolicy}"
- MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}"
- MouseLeave="{Background=Transparent}">
- <Image Margin="2" Width="12" Height="12"
- Visible="{./HasContent}"
- Path="{./Image}"
- SvgSub="{./IsExpanded}"/>
- <Image Margin="2" Width="14" Height="14"
- Path="#Crow.Images.Icons.folder.svg"/>
- <Label Text="{./Caption}" Width="{./WidthPolicy}"/>
- </HorizontalStack>
- <Container Name="Content" Visible="false"
- Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
- </VerticalStack>
- </Template>
- <HorizontalStack Height="Fit" Width="{./WidthPolicy}">
- <GraphicObject Width="12" Height="10"/>
- <TreeView Name="List" Height="Fit" Width="{./WidthPolicy}"
- Template="#Tests.Interfaces.treeList.crow" />
- </HorizontalStack>
- </Expandable>
- </ItemTemplate>
-</TreeView>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<TreeView IsRoot="true" Name="treeView" Data="{./CurrentDirectory}"
+ SelectedItemChanged="./onSelectedItemChanged">
+ <ItemTemplate DataType="System.IO.FileInfo">
+ <HorizontalStack Focusable="true" Height="Fit" Width="Stretched" Background="{../Background}" >
+ <Image Margin="2" Width="14" Height="14"
+ Path="#Crow.Images.Icons.file.svg"/>
+ <Label Text="{Name}" Width="Stretched"
+ MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}"
+ MouseLeave="{Background=Transparent}"/>
+ </HorizontalStack>
+ </ItemTemplate>
+ <ItemTemplate DataType="System.IO.DirectoryInfo" Data="GetFileSystemInfos">
+ <Expandable Caption="{Name}" >
+ <Template>
+ <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+ <HorizontalStack Spacing="1" Height="Fit" Width="{./WidthPolicy}"
+ MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}"
+ MouseLeave="{Background=Transparent}">
+ <Image Margin="2" Width="12" Height="12"
+ Visible="{./HasContent}"
+ Path="{./Image}"
+ SvgSub="{./IsExpanded}"/>
+ <Image Margin="2" Width="14" Height="14"
+ Path="#Crow.Images.Icons.folder.svg"/>
+ <Label Text="{./Caption}" Width="{./WidthPolicy}"/>
+ </HorizontalStack>
+ <Container Name="Content" Visible="false"
+ Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
+ </VerticalStack>
+ </Template>
+ <HorizontalStack Height="Fit" Width="{./WidthPolicy}">
+ <GraphicObject Width="12" Height="10"/>
+ <TreeView Name="List" Height="Fit" Width="{./WidthPolicy}"
+ Template="#Tests.Interfaces.treeList.crow" />
+ </HorizontalStack>
+ </Expandable>
+ </ItemTemplate>
+</TreeView>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0"?>
-<Border BorderWidth="1" Foreground="{./Foreground}" Background="{./Background}"
- Height="{./HeightPolicy}" Width="{./WidthPolicy}">
- <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
- <HorizontalStack Spacing="1" Height="-1" Width="{./WidthPolicy}">
- <Image Style="Icon" Margin="2"
- Visible="{./HasContent}"
- Path="{./Image}"
- SvgSub="{./IsExpanded}"/>
- <Label Text="{./Caption}" Width="{./WidthPolicy}"/>
- </HorizontalStack>
- <Container Name="Content" Visible="false"
- Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
- </VerticalStack>
-</Border>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<Border BorderWidth="1" Foreground="{./Foreground}" Background="{./Background}"
+ Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+ <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+ <HorizontalStack Spacing="1" Height="-1" Width="{./WidthPolicy}">
+ <Image Style="Icon" Margin="2"
+ Visible="{./HasContent}"
+ Path="{./Image}"
+ SvgSub="{./IsExpanded}"/>
+ <Label Text="{./Caption}" Width="{./WidthPolicy}"/>
+ </HorizontalStack>
+ <Container Name="Content" Visible="false"
+ Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
+ </VerticalStack>
+</Border>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0"?>
-<Window Caption="OpenFile" Height="300" Width="500">
- <VerticalStack Margin="5">
- <TextBox Margin="1" Width="0" Height="-1" Text="{CurrentPath}"/>
- <HorizontalStack >
- <ListBox Data="{Directories}" Width="-1" Height="0"
- Background="0.5,0.5,0.5,0.5"
- SelectedItemChanged="OnSelectedItemChanged"
- Template="#Crow.Templates.ScrollingListBox.goml"
- ItemTemplate="#Crow.Templates.tmpDirItem.goml" >
- </ListBox>
- <ListBox Data="{Files}" Width="0" Height="0"
- Background="0.5,0.5,0.5,0.5"
- SelectedItemChanged="onFileListItemChanged"
- Template="#Crow.Templates.ScrollingListBox.goml"
- ItemTemplate="#Crow.Templates.imgItemTemplate.goml">
- </ListBox>
- </HorizontalStack>
- <HorizontalStack Fit="true" HorizontalAlignment="Right">
- <Button Caption="Ok" MouseClick="onFileSelect"/>
- <Button Caption="Cancel"/>
- </HorizontalStack>
- </VerticalStack>
-</Window>
--- /dev/null
+<?xml version="1.0"?>
+<Window Caption="OpenFile" Height="300" Width="500">
+ <VerticalStack Margin="5">
+ <TextBox Margin="1" Width="0" Height="-1" Text="{CurrentPath}"/>
+ <HorizontalStack >
+ <ListBox Data="{Directories}" Width="-1" Height="0"
+ Background="0.5,0.5,0.5,0.5"
+ SelectedItemChanged="OnSelectedItemChanged"
+ Template="#Crow.Templates.ScrollingListBox.goml"
+ ItemTemplate="#Crow.Templates.tmpDirItem.goml" >
+ </ListBox>
+ <ListBox Data="{Files}" Width="0" Height="0"
+ Background="0.5,0.5,0.5,0.5"
+ SelectedItemChanged="onFileListItemChanged"
+ Template="#Crow.Templates.ScrollingListBox.goml"
+ ItemTemplate="#Crow.Templates.imgItemTemplate.goml">
+ </ListBox>
+ </HorizontalStack>
+ <HorizontalStack Fit="true" HorizontalAlignment="Right">
+ <Button Caption="Ok" MouseClick="onFileSelect"/>
+ <Button Caption="Cancel"/>
+ </HorizontalStack>
+ </VerticalStack>
+</Window>
+++ /dev/null
-<?xml version="1.0"?>
-<Container Background="{./Background}" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
- <Group Height="{./HeightPolicy}" Width="{./WidthPolicy}">
- <Border CornerRadius="5" BorderWidth="1" Margin="6" Foreground="{./Foreground}"
- Height="{./HeightPolicy}" Width="{./WidthPolicy}">
- <Container Name="Content" Margin="10" MinimumSize="70,10"
- Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}"/>
- </Border>
- <Label Text="{./Caption}" VerticalAlignment="Top" Left="15"
- Background="Clear" Margin="1"/>
- </Group>
-</Container>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<Container Background="{./Background}" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+ <Group Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+ <Border CornerRadius="5" BorderWidth="1" Margin="6" Foreground="{./Foreground}"
+ Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+ <Container Name="Content" Margin="10" MinimumSize="70,10"
+ Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}"/>
+ </Border>
+ <Label Text="{./Caption}" VerticalAlignment="Top" Left="15"
+ Background="Clear" Margin="1"/>
+ </Group>
+</Container>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0"?>
-<Border BorderWidth="1" Margin="1" MinimumSize="10,10" Height="{./HeightPolicy}" Width="{./WidthPolicy}" >
- <Scroller Name="scroller1" Margin="1" VerticalScrolling="true"
- Height="{./HeightPolicy}" Width="{./WidthPolicy}"
- ValueChanged="./_scroller_ValueChanged">
- <VerticalStack LayoutChanged="./_list_LayoutChanged"
- Height="Fit" Width="{./WidthPolicy}" Name="List" Margin="0" VerticalAlignment="Top"/>
- </Scroller>
-</Border>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<Border BorderWidth="1" Margin="1" MinimumSize="10,10" Height="{./HeightPolicy}" Width="{./WidthPolicy}" >
+ <Scroller Name="scroller1" Margin="1" VerticalScrolling="true"
+ Height="{./HeightPolicy}" Width="{./WidthPolicy}"
+ ValueChanged="./_scroller_ValueChanged">
+ <VerticalStack LayoutChanged="./_list_LayoutChanged"
+ Height="Fit" Width="{./WidthPolicy}" Name="List" Margin="0" VerticalAlignment="Top"/>
+ </Scroller>
+</Border>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0"?>
-<Border Height="{./HeightPolicy}" Width="{./WidthPolicy}" CornerRadius="0"
- MouseEnter="./onBorderMouseEnter"
- MouseLeave="./onBorderMouseLeave">
- <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}" Background="{./Background}">
- <Border BorderWidth="0" Foreground="White" Width="{./WidthPolicy}" Height="Fit"
- Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9">
- <HorizontalStack Name="hs" Margin="2" Spacing="1" Width="{./WidthPolicy}" Height="Fit" >
- <GraphicObject Width="5" Height="5"/>
- <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
- <Label Foreground="White" Width="{./WidthPolicy}" Margin="1" TextAlignment="Center" Text="{./Title}" />
- <Border CornerRadius="6" BorderWidth="1" Foreground="Transparent" Height="12" Width="12"
- MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
- <Image Focusable="true" Name="Image" Path="#Crow.Images.Icons.exit2.svg"
- MouseClick="./butQuitPress"/>
- </Border>
- <GraphicObject Width="5" Height="5"/>
- </HorizontalStack>
- </Border>
- <HorizontalStack Margin="5" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
- <Image Name="Image" Width="20%" Height="20" Path="#Crow.Images.Icons.iconInfo.svg" />
- <Label Margin="5" Font="serif, 10" Height="{./HeightPolicy}" Width="80%" Text="{./Message}"
- TextAlignment="Left"
- Multiline="true" />
- </HorizontalStack>
- <HorizontalStack Margin="1" Spacing="0" Height="Fit" Width="60%" HorizontalAlignment="Right">
- <Button Width="50%" Caption="Ok" MouseClick="./onOkButtonClick" />
- <Button Width="50%" Caption="Cancel" MouseClick="./onCancelButtonClick" />
- </HorizontalStack>
- </VerticalStack>
-</Border>
--- /dev/null
+<?xml version="1.0"?>
+<Border Height="{./HeightPolicy}" Width="{./WidthPolicy}" CornerRadius="0"
+ MouseEnter="./onBorderMouseEnter"
+ MouseLeave="./onBorderMouseLeave">
+ <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}" Background="{./Background}">
+ <Border BorderWidth="0" Foreground="White" Width="{./WidthPolicy}" Height="Fit"
+ Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9">
+ <HorizontalStack Name="hs" Margin="2" Spacing="1" Width="{./WidthPolicy}" Height="Fit" >
+ <GraphicObject Width="5" Height="5"/>
+ <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
+ <Label Foreground="White" Width="{./WidthPolicy}" Margin="1" TextAlignment="Center" Text="{./Title}" />
+ <Border CornerRadius="6" BorderWidth="1" Foreground="Transparent" Height="12" Width="12"
+ MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
+ <Image Focusable="true" Name="Image" Path="#Crow.Images.Icons.exit2.svg"
+ MouseClick="./butQuitPress"/>
+ </Border>
+ <GraphicObject Width="5" Height="5"/>
+ </HorizontalStack>
+ </Border>
+ <HorizontalStack Margin="5" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+ <Image Name="Image" Width="20%" Height="20" Path="#Crow.Images.Icons.iconInfo.svg" />
+ <Label Margin="5" Font="serif, 10" Height="{./HeightPolicy}" Width="80%" Text="{./Message}"
+ TextAlignment="Left"
+ Multiline="true" />
+ </HorizontalStack>
+ <HorizontalStack Margin="1" Spacing="0" Height="Fit" Width="60%" HorizontalAlignment="Right">
+ <Button Width="50%" Caption="Ok" MouseClick="./onOkButtonClick" />
+ <Button Width="50%" Caption="Cancel" MouseClick="./onCancelButtonClick" />
+ </HorizontalStack>
+ </VerticalStack>
+</Border>
+++ /dev/null
-<?xml version="1.0"?>
-<Border Background="{./Background}" BorderWidth="1" Foreground="{./Foreground}" Height="Fit" Width="{./WidthPolicy}">
- <HorizontalStack Spacing="1" Height="Fit" Width="{./WidthPolicy}">
- <Image Style="Icon" Margin="2"
- Path="#Crow.Images.Icons.expandable.svg" SvgSub="{./IsPopped}"/>
- <Label Text="{./Caption}" Width="{./WidthPolicy}"/>
- </HorizontalStack>
-</Border>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<Border Background="{./Background}" BorderWidth="1" Foreground="{./Foreground}" Height="Fit" Width="{./WidthPolicy}">
+ <HorizontalStack Spacing="1" Height="Fit" Width="{./WidthPolicy}">
+ <Image Style="Icon" Margin="2"
+ Path="#Crow.Images.Icons.expandable.svg" SvgSub="{./IsPopped}"/>
+ <Label Text="{./Caption}" Width="{./WidthPolicy}"/>
+ </HorizontalStack>
+</Border>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0"?>
-<HorizontalStack Style="Control" Background="{./Background}" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
- <Image Style="Icon" Path="#Crow.Images.Icons.radiobutton.svg"
- SvgSub="{./IsChecked}"/>
- <Label Text="{./Caption}" Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
-</HorizontalStack>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<HorizontalStack Style="Control" Background="{./Background}" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+ <Image Style="Icon" Path="#Crow.Images.Icons.radiobutton.svg"
+ SvgSub="{./IsChecked}"/>
+ <Label Text="{./Caption}" Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
+</HorizontalStack>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0"?>
-<Border BorderWidth="1" Foreground="LightGray" Width="{./WidthPolicy}" Height="{./HeightPolicy}">
- <GenericStack Orientation="{./Orientation}" Spacing="0"
- Width="{./WidthPolicy}" Height="{./HeightPolicy}">
- <Button MouseRepeat="true" Width="12" Height="12" MouseClick="./onScrollBack"
- Template="#Crow.Templates.ArrowButTemplate.crow">
- <Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="up"/>
- </Button>
- <Slider Name="Slider"
- Orientation="{./Orientation}"
- Value="{./Value}"
- Maximum="{./Maximum}"
- LargeIncrement="{./LargeIncrement}"
- SmallIncrement="{./SmallIncrement}"
- Background="hgradient|0:DimGray|0.1:Gray|0.95:Gray|1:White"
- Width="{./WidthPolicy}" Height="{./HeightPolicy}"
- ValueChanged="./onSliderValueChange"/>
- <Button MouseRepeat="true" Width="12" Height="12" MouseClick="./onScrollForth"
- Template="#Crow.Templates.ArrowButTemplate.crow">
- <Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="down"/>
- </Button>
- </GenericStack>
-</Border>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<Border BorderWidth="1" Foreground="LightGray" Width="{./WidthPolicy}" Height="{./HeightPolicy}">
+ <GenericStack Orientation="{./Orientation}" Spacing="0"
+ Width="{./WidthPolicy}" Height="{./HeightPolicy}">
+ <Button MouseRepeat="true" Width="12" Height="12" MouseClick="./onScrollBack"
+ Template="#Crow.Templates.ArrowButTemplate.crow">
+ <Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="up"/>
+ </Button>
+ <Slider Name="Slider"
+ Orientation="{./Orientation}"
+ Value="{./Value}"
+ Maximum="{./Maximum}"
+ LargeIncrement="{./LargeIncrement}"
+ SmallIncrement="{./SmallIncrement}"
+ Background="hgradient|0:DimGray|0.1:Gray|0.95:Gray|1:White"
+ Width="{./WidthPolicy}" Height="{./HeightPolicy}"
+ ValueChanged="./onSliderValueChange"/>
+ <Button MouseRepeat="true" Width="12" Height="12" MouseClick="./onScrollForth"
+ Template="#Crow.Templates.ArrowButTemplate.crow">
+ <Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="down"/>
+ </Button>
+ </GenericStack>
+</Border>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0"?>
--- /dev/null
+<?xml version="1.0"?>
+++ /dev/null
-<?xml version="1.0"?>
-<HorizontalStack MinimumSize="40,10" Name="hstack" Margin="0" Spacing="0"
- Height="{./HeightPolicy}" Width="{./WidthPolicy}">
- <Border BorderWidth="1" Height="{./HeightPolicy}" Width="80%" Background="White"
- Foreground="DimGray" Margin="0">
- <Label Foreground="DimGray" Height="{../../../HeightPolicy}" Width="Stretched"
- Text="{../../../Value}" TextAlignment="Right" Margin="0"/>
- </Border>
- <VerticalStack MinimumSize="8,10" Width="20%" Height="Stretched" Spacing="0" Margin="0" Background="Red">
- <Button MouseRepeat="true" Width="Stretched" Height="50%" Margin="0" MouseClick="./onUp"
- Template="#Crow.Templates.ArrowButTemplate.crow">
- <Image Path="#Crow.Images.Icons.updown.svg" SvgSub="up" Margin="0"/>
- </Button>
- <Button MouseRepeat="true" Width="Stretched" Height="50%" Margin="0" MouseClick="./onDown"
- Template="#Crow.Templates.ArrowButTemplate.crow">
- <Image Path="#Crow.Images.Icons.updown.svg" SvgSub="down" Margin="0"/>
- </Button>
- </VerticalStack>
-</HorizontalStack>
--- /dev/null
+<?xml version="1.0"?>
+<HorizontalStack MinimumSize="40,10" Name="hstack" Margin="0" Spacing="0"
+ Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+ <Border BorderWidth="1" Height="{./HeightPolicy}" Width="80%" Background="White"
+ Foreground="DimGray" Margin="0">
+ <Label Foreground="DimGray" Height="{../../../HeightPolicy}" Width="Stretched"
+ Text="{../../../Value}" TextAlignment="Right" Margin="0"/>
+ </Border>
+ <VerticalStack MinimumSize="8,10" Width="20%" Height="Stretched" Spacing="0" Margin="0" Background="Red">
+ <Button MouseRepeat="true" Width="Stretched" Height="50%" Margin="0" MouseClick="./onUp"
+ Template="#Crow.Templates.ArrowButTemplate.crow">
+ <Image Path="#Crow.Images.Icons.updown.svg" SvgSub="up" Margin="0"/>
+ </Button>
+ <Button MouseRepeat="true" Width="Stretched" Height="50%" Margin="0" MouseClick="./onDown"
+ Template="#Crow.Templates.ArrowButTemplate.crow">
+ <Image Path="#Crow.Images.Icons.updown.svg" SvgSub="down" Margin="0"/>
+ </Button>
+ </VerticalStack>
+</HorizontalStack>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" ?>
-<GenericStack Orientation="Vertical" Spacing="0"
- Width="{./WidthPolicy}" Height="{./HeightPolicy}"
- Background="Onyx"
- MouseEnter="{caption.Foreground=White}"
- MouseLeave="{caption.Foreground=Gray}">
- <HorizontalStack Margin="2" Left="{./TabOffset}"
- Name="TabTitle"
- HorizontalAlignment="Left"
- Height="{../../../TabThickness}"
- Width="Fit">
- <Label Name="caption" Text="{./Caption}" Foreground="Gray"/>
- <Border CornerRadius="5" BorderWidth="1" Foreground="Transparent" Height="12" Width="12"
- MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
- <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
- MouseClick="../../../../butCloseTabClick"/>
- </Border>
- </HorizontalStack>
- <Container
- Name="Content" Width="{./WidthPolicy}" Height="{./HeightPolicy}"/>
-</GenericStack>
-
--- /dev/null
+<?xml version="1.0"?>
+<GenericStack Orientation="Vertical" Spacing="0"
+ Width="{./WidthPolicy}" Height="{./HeightPolicy}"
+ Background="Onyx"
+ MouseEnter="{caption.Foreground=White}"
+ MouseLeave="{caption.Foreground=Gray}">
+ <HorizontalStack Margin="2" Left="{./TabOffset}"
+ Name="TabTitle"
+ HorizontalAlignment="Left"
+ Height="{../../../TabThickness}"
+ Width="Fit">
+ <Label Name="caption" Text="{./Caption}" Foreground="Gray"/>
+ <Border CornerRadius="5" BorderWidth="1" Foreground="Transparent" Height="12" Width="12"
+ MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
+ <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
+ MouseClick="../../../../butCloseTabClick"/>
+ </Border>
+ </HorizontalStack>
+ <Container
+ Name="Content" Width="{./WidthPolicy}" Height="{./HeightPolicy}"/>
+</GenericStack>
+
+++ /dev/null
-<HorizontalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
- <Scroller Name="scroller1" Margin="1" VerticalScrolling="true"
- Background="{./Background}"
- Height="{./HeightPolicy}" Width="{./WidthPolicy}"
- ScrollY="{../scrollbar1.Value}"
- ValueChanged="./_scroller_ValueChanged">
- <VerticalStack LayoutChanged="./_list_LayoutChanged"
- Height="Fit" Width="{./WidthPolicy}" Name="List" Margin="0" VerticalAlignment="Top"/>
- </Scroller>
- <ScrollBar
- Name="scrollbar1"
- Value="{../scroller1.ScrollY}"
- Maximum="{../scroller1.MaximumScroll}"
- Width="14" Orientation="Vertical"/>
-</HorizontalStack>
--- /dev/null
+<?xml version="1.0"?>
+<HorizontalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+ <Scroller Name="scroller1" Margin="1" VerticalScrolling="true"
+ Background="{./Background}"
+ Height="{./HeightPolicy}" Width="{./WidthPolicy}"
+ ScrollY="{../scrollbar1.Value}"
+ ValueChanged="./_scroller_ValueChanged">
+ <VerticalStack LayoutChanged="./_list_LayoutChanged"
+ Height="Fit" Width="{./WidthPolicy}" Name="List" Margin="0" VerticalAlignment="Top"/>
+ </Scroller>
+ <ScrollBar
+ Name="scrollbar1"
+ Value="{../scroller1.ScrollY}"
+ Maximum="{../scroller1.MaximumScroll}"
+ Width="14" Orientation="Vertical"/>
+</HorizontalStack>
+++ /dev/null
-<?xml version="1.0"?>
-<Border BorderWidth="1" Foreground="White" CornerRadius="20" Height="{./HeightPolicy}" Width="{./WidthPolicy}"
- MouseEnter="./onBorderMouseEnter"
- MouseLeave="./onBorderMouseLeave">
- <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
- <Border Name="TitleBar" BorderWidth="1" Foreground="White" Width="{./WidthPolicy}" Height="Fit"
- Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9">
- <HorizontalStack Name="hs" Margin="1" Spacing="1" Width="{./WidthPolicy}" Height="Fit">
- <GraphicObject Width="5"/>
- <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
- <Label Foreground="White" Width="{./WidthPolicy}" Margin="1" TextAlignment="Center" Text="{./Title}" />
- <Border CornerRadius="6" BorderWidth="1" Foreground="Transparent" Height="12" Width="12"
- MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
- <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
- MouseClick="./butQuitPress"/>
- </Border>
- <GraphicObject Width="5"/>
- </HorizontalStack>
- </Border>
- <Container Name="Content" MinimumSize="50,50" Height="{./HeightPolicy}" Width="{./WidthPolicy}" Background="0.5,0.5,0.5,0.5"/>
- </VerticalStack>
-</Border>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<Border BorderWidth="1" Foreground="White" CornerRadius="20" Height="{./HeightPolicy}" Width="{./WidthPolicy}"
+ MouseEnter="./onBorderMouseEnter"
+ MouseLeave="./onBorderMouseLeave">
+ <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+ <Border Name="TitleBar" BorderWidth="1" Foreground="White" Width="{./WidthPolicy}" Height="Fit"
+ Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9">
+ <HorizontalStack Name="hs" Margin="1" Spacing="1" Width="{./WidthPolicy}" Height="Fit">
+ <GraphicObject Width="5"/>
+ <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
+ <Label Foreground="White" Width="{./WidthPolicy}" Margin="1" TextAlignment="Center" Text="{./Title}" />
+ <Border CornerRadius="6" BorderWidth="1" Foreground="Transparent" Height="12" Width="12"
+ MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
+ <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
+ MouseClick="./butQuitPress"/>
+ </Border>
+ <GraphicObject Width="5"/>
+ </HorizontalStack>
+ </Border>
+ <Container Name="Content" MinimumSize="50,50" Height="{./HeightPolicy}" Width="{./WidthPolicy}" Background="0.5,0.5,0.5,0.5"/>
+ </VerticalStack>
+</Border>
\ No newline at end of file
void interfaceThread()
{
- Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
-
CrowInterface.Quit += Quit;
CrowInterface.MouseCursorChanged += CrowInterface_MouseCursorChanged;
while (CrowInterface.ClientRectangle.Size.Width == 0)
namespace Crow
{
- [DefaultTemplate("#Crow.Templates.AnalogMeter0.goml")]
public class AnalogMeter : NumericControl
{
#region CTOR
namespace Crow
{
- [DefaultTemplate("#Crow.Templates.Button.crow")]
public class Button : TemplatedContainer
{
string caption;
}
#endregion
- [XmlAttributeAttribute()][DefaultValue("Button")]
+ [XmlAttributeAttribute][DefaultValue("Button")]
public string Caption {
get { return caption; }
set {
NotifyValueChanged ("Caption", caption);
}
}
- [XmlAttributeAttribute()][DefaultValue("#Crow.Images.button.svg")]
+ [XmlAttributeAttribute][DefaultValue("#Crow.Images.button.svg")]
public string Image {
get { return image; }
set {
NotifyValueChanged ("Image", image);
}
}
- [XmlAttributeAttribute()][DefaultValue(false)]
+ [XmlAttributeAttribute][DefaultValue(false)]
public bool IsPressed
{
get { return isPressed; }
namespace Crow
{
- [DefaultTemplate("#Crow.Templates.CheckBox.goml")]
public class CheckBox : TemplatedControl
{
string caption;
namespace Crow
{
- [DefaultTemplate("#Crow.Templates.ComboBox.goml")]
public class ComboBox : ListBox
{
#region CTOR
namespace Crow
{
- [DefaultTemplate("#Crow.Templates.DirectoryView.crow")]
public class DirectoryView : TemplatedControl
{
#region CTOR
namespace Crow
{
- [DefaultTemplate("#Crow.Templates.Dummy.goml")]
public class DummyTemplate : TemplatedControl
{
public DummyTemplate () : base()
namespace Crow
{
- [DefaultTemplate("#Crow.Templates.Expandable.goml")]
public class Expandable : TemplatedContainer
{
#region CTOR
namespace Crow
{
- [DefaultTemplate("#Crow.Templates.GroupBox.goml")]
public class GroupBox : TemplatedContainer
{
string caption;
namespace Crow
{
- [DefaultTemplate("#Crow.Templates.ListBox.goml")]
public class ListBox : TemplatedControl
{
#region CTOR
namespace Crow
{
- [DefaultTemplate("#Crow.Templates.MessageBox.goml")]
public class MessageBox : Window
{
public MessageBox ():base(){}
namespace Crow
{
- [DefaultTemplate("#Crow.Templates.Popper.goml")]
public class Popper : TemplatedContainer
{
#region CTOR
namespace Crow
{
- [DefaultTemplate("#Crow.Templates.RadioButton.goml")]
public class RadioButton : TemplatedControl
{
string caption;
namespace Crow
{
- [DefaultTemplate("#Crow.Templates.ScrollBar.goml")]
public class ScrollBar : NumericControl
{
Orientation _orientation;
namespace Crow
{
- [DefaultTemplate("#Crow.Templates.Spinner.goml")]
public class Spinner : NumericControl
{
#region CTOR
namespace Crow
{
- [DefaultTemplate("#Crow.Templates.TabItem.crow")]
public class TabItem : TemplatedContainer
{
#region Private fields
namespace Crow
{
- [AttributeUsage(AttributeTargets.Class)]
- public class TemplateAttribute : Attribute
- {
- public string Path = "";
- public TemplateAttribute(string path)
- {
- Path = path;
- }
- }
-
- [AttributeUsage(AttributeTargets.Class)]
- public class DefaultTemplate : TemplateAttribute
- {
- public DefaultTemplate(string path) : base(path){}
- }
- [AttributeUsage(AttributeTargets.Class)]
- public class DefaultItemTemplate : TemplateAttribute
- {
- public DefaultItemTemplate(string path) : base(path){}
- }
-
public abstract class TemplatedControl : PrivateContainer, IXmlSerializable
{
#region CTOR
protected virtual void loadTemplate(GraphicObject template = null)
{
if (template == null) {
- DefaultTemplate dt = (DefaultTemplate)this.GetType ().GetCustomAttributes (typeof(DefaultTemplate), true).FirstOrDefault();
- this.SetChild (Interface.Load (dt.Path));
+ if (!Interface.DefaultTemplates.ContainsKey (this.GetType ().FullName))
+ throw new Exception (string.Format ("No default template found for '{0}'", this.GetType ().FullName));
+ this.SetChild (Interface.Load (Interface.DefaultTemplates[this.GetType ().FullName]));
}else
this.SetChild (template);
{
//treeview expect expandable child (or not)
//if their are expandable, some functions and events are added
- [DefaultTemplate("#Crow.Templates.TreeView.crow")]
public class TreeView : ListBox
{
GraphicObject selectedItemContainer = null;
namespace Crow
{
- [DefaultTemplate("#Crow.Templates.Window.goml")]
public class Window : TemplatedContainer
{
enum Direction
}
if (!inlineTemplate) {
+ reader.il.Emit (OpCodes.Ldloc_0);//Load this templateControl ref
if (string.IsNullOrEmpty (templatePath)) {
- DefaultTemplate dt = (DefaultTemplate)crowType.GetCustomAttributes (typeof(DefaultTemplate), true).FirstOrDefault ();
- if (dt!=null)
- templatePath = dt.Path;
- }
-
- if (!string.IsNullOrEmpty (templatePath)) {
- reader.il.Emit (OpCodes.Ldloc_0);//Load this templateControl ref
-
+ reader.il.Emit (OpCodes.Ldnull);//default template loading
+ }else{
reader.il.Emit (OpCodes.Ldstr, templatePath); //Load template path string
reader.il.Emit (OpCodes.Callvirt,//call Interface.Load(path)
- typeof(Interface).GetMethod ("Load", BindingFlags.Static | BindingFlags.Public));
- reader.il.Emit (OpCodes.Callvirt,//add child
- crowType.GetMethod ("loadTemplate", BindingFlags.Instance | BindingFlags.NonPublic));
+ typeof(Interface).GetMethod ("Load", BindingFlags.Static | BindingFlags.Public));
}
+ reader.il.Emit (OpCodes.Callvirt,//load template
+ crowType.GetMethod ("loadTemplate", BindingFlags.Instance | BindingFlags.NonPublic));
}
foreach (string[] iTempId in itemTemplateIds) {
reader.il.Emit (OpCodes.Ldloc_0);//load TempControl ref
{
#region CTOR
static Interface(){
- LoadCursors ();
- LoadStyling ();
+ loadCursors ();
+ loadStyling ();
+ findAvailableTemplates ();
FontRenderingOptions = new FontOptions ();
FontRenderingOptions.Antialias = Antialias.Subpixel;
public static Dictionary<String, LoaderInvoker> DefaultValuesLoader = new Dictionary<string, LoaderInvoker>();
public static Dictionary<string, Style> Styling;
/// <summary> parse all styling data's and build global Styling Dictionary </summary>
- static void LoadStyling() {
- System.Globalization.CultureInfo savedCulture = Thread.CurrentThread.CurrentCulture;
- Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
-
+ static void loadStyling() {
Styling = new Dictionary<string, Style> ();
//fetch styling info in this order, if member styling is alreadey referenced in previous
//assembly, it's ignored.
loadStylingFromAssembly (Assembly.GetEntryAssembly ());
loadStylingFromAssembly (Assembly.GetExecutingAssembly ());
-
- Thread.CurrentThread.CurrentCulture = savedCulture;
}
/// <summary> Search for .style resources in assembly </summary>
static void loadStylingFromAssembly (Assembly assembly) {
.Dispose ();
}
}
- static void LoadCursors(){
+ static void loadCursors(){
//Load cursors
XCursor.Cross = XCursorFile.Load("#Crow.Images.Icons.Cursors.cross").Cursors[0];
XCursor.Default = XCursorFile.Load("#Crow.Images.Icons.Cursors.arrow").Cursors[0];
}
#endregion
+ #region Templates
+ public static Dictionary<String, string> DefaultTemplates = new Dictionary<string, string>();
+ static void findAvailableTemplates(){
+ searchTemplatesIn (Assembly.GetEntryAssembly ());
+ searchTemplatesIn (Assembly.GetExecutingAssembly ());
+ }
+ static void searchTemplatesIn(Assembly assembly){
+ foreach (string resId in assembly
+ .GetManifestResourceNames ()
+ .Where (r => r.EndsWith (".template", StringComparison.OrdinalIgnoreCase))) {
+ string clsName = resId.Substring (0, resId.Length - 9);
+ if (DefaultTemplates.ContainsKey (clsName))
+ continue;
+ DefaultTemplates[clsName] = "#" + resId;
+ }
+ }
+ #endregion
#region Load/Save
public static Stream GetStreamFromPath (string path)
}
public static GraphicObject Load (string path)
{
- System.Globalization.CultureInfo savedCulture = Thread.CurrentThread.CurrentCulture;
- Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
-
try {
return GetInstantiator (path).CreateInstance ();
} catch (Exception ex) {
throw new Exception ("Error loading <" + path + ">:", ex);
}
-
- Thread.CurrentThread.CurrentCulture = savedCulture;
}
/// <summary>
/// fetch it from cache or create it