<package >
<metadata>
<id>Crow.OpenTK</id>
- <version>0.6.0-pre1</version>
+ <version>0.6.0</version>
<title>C# Rapid Open Widget Toolkit</title>
<authors>JP Bruyere</authors>
<owners>Grand Tetras Software</owners>
- Bug fix #36
- group item templates in single file
- instantiation from code clarification
- - Only run on mono >= 5.0
- Cairo mesh patterns support.
- - Image resources sharing among controls.
+ - Image resources sharing among controls.
+ - Some small api changes (LoadInterface replaced by AddWidget overload
+ - Documentations
+ - Tooltip for GraphicObject class
</releaseNotes>
- <copyright>Copyright 2013-2017</copyright>
+ <copyright>Copyright 2013-2018</copyright>
<dependencies>
- <dependency id="OpenTK" version="3.0.0-git00041" />
+ <dependency id="OpenTK" version="2.0.0" />
</dependencies>
<tags>Crow OpenTK OpenGL Widget Interface GUI C# .Net Mono</tags>
<references>
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Release|Any CPU.Build.0 = Release|Any CPU
{74289092-9F70-4941-AFCB-DFD7BE2140B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{74289092-9F70-4941-AFCB-DFD7BE2140B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{74289092-9F70-4941-AFCB-DFD7BE2140B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{74289092-9F70-4941-AFCB-DFD7BE2140B6}.Release|Any CPU.Build.0 = Release|Any CPU
{B6D911CD-1D09-42FC-B300-9187190F2AE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B6D911CD-1D09-42FC-B300-9187190F2AE1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6D911CD-1D09-42FC-B300-9187190F2AE1}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B6D911CD-1D09-42FC-B300-9187190F2AE1}.Release|Any CPU.Build.0 = Release|Any CPU
{C2980F9B-4798-4C05-99E2-E174810F7C7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C2980F9B-4798-4C05-99E2-E174810F7C7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C2980F9B-4798-4C05-99E2-E174810F7C7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
get { return imlVE.GraphicTree; }
}
-
- public CrowMSBuild.Project CSProj {
- get {
- CrowMSBuild.Project proj = null;
- XmlSerializer serializer = new XmlSerializer(typeof(CrowMSBuild.Project));
- string path=@"/mnt/data2/devel/crow/Tests/Tests.csproj";
- using (StreamReader reader = new StreamReader (path)) {
- proj = (CrowMSBuild.Project)serializer.Deserialize (reader);
- }
- return proj;
- }
- }
-
void reloadFromSource(){
if (string.IsNullOrEmpty (imlSource)) {
reload_iTor (null);
using System.ComponentModel;
using System.Reflection;
using System.Collections.Generic;
+using System.Linq;
namespace CrowIDE
{
try {
if (!pi.PropertyType.IsAssignableFrom(value.GetType()) && pi.PropertyType != typeof(string)){
if (pi.PropertyType.IsEnum) {
- pi.SetValue (instance, value);
+ if (value is string) {
+ pi.SetValue (instance, Enum.Parse (pi.PropertyType, (string)value));
+ }else
+ pi.SetValue (instance, value);
} else {
MethodInfo me = pi.PropertyType.GetMethod
("Parse", BindingFlags.Static | BindingFlags.Public,
public string Type { get { return pi.PropertyType.IsEnum ?
"System.Enum"
: pi.PropertyType.FullName; }}
- public string[] Choices {
+ public object[] Choices {
get {
- return Enum.GetNames (pi.PropertyType);
+ return Enum.GetValues (pi.PropertyType).Cast<object>().ToArray();
}
}
<HorizontalStack Height="Fit">
<GraphicObject Width="12" Height="10"/>
<TreeView Name="List" Height="Fit"
- Template="#Crow.Templates.treeList.crow" />
+ Template="#Crow.Templates.treeList.template" />
</HorizontalStack>
</Expandable>
</ItemTemplate>
<HorizontalStack Height="Fit">
<GraphicObject Width="12" Height="10"/>
<TreeView Name="List" Height="Fit"
- Template="#Crow.Templates.treeList.crow" />
+ Template="#Crow.Templates.treeList.template" />
</HorizontalStack>
</Expandable>
MouseLeave="{Background=Transparent}" >
<Label Margin="1" Text="{Name}" Height="Fit" Width="50%"/>
<ComboBox Margin="0" Height="Stretched" Width="50%" Data="{Choices}"
- SelectedIndex="{²Value}">
+ SelectedItem="{²Value}">
<Template>
<Popper Name="popper" PopDirection="Bottom">
<Template>
<Window Template="#Crow.ToolWindow.template" Caption="Properties" MinimumSize="10,10" Width="Stretched" Height="Stretched">
<VerticalStack>
<Border Height="Fit">
- <Label TextAlignment="Left" Text="{./Instance}" Width="Stretched"/>
+ <Label TextAlignment="Left" Text="{../../../../Instance}" Width="Stretched"/>
</Border>
<Scroller Name="scroller1" Margin="1" VerticalScrolling="true"
ValueChanged="./_scroller_ValueChanged">
<!-- <HorizontalStack Height="Fit" Margin="2">
<Image Style="icon" Path="#CrowIDE.images.save.svg" MouseClick="onCommandSave"/>
</HorizontalStack>-->
- <Border Margin="1" Background="Onyx" Height="Fit">
+<!-- <Border Margin="1" Background="Onyx" Height="Fit">
<Label Width="Stretched" Margin="1" Text="{../../dv.SelectedItem}"/>
- </Border>
+ </Border>-->
<HorizontalStack>
<TreeView Name="treeview" Width="20%" Height="100%" IsRoot="true"
DataSource="{CurrentSolution}" Data="{Projects}"
<OutputType>Exe</OutputType>
<RootNamespace>Tests</RootNamespace>
<AssemblyName>Tests</AssemblyName>
- <StartupObject>Tests.BasicTests</StartupObject>
+ <StartupObject>Tests.Showcase</StartupObject>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ReleaseVersion>0.5</ReleaseVersion>
{
return c == '\t' || c == '\r' || c == '\n' || char.IsWhiteSpace (c);
}
+ public static object GetDefaultValue(this object obj)
+ {
+ Type t = obj.GetType ();
+ if (t.IsValueType)
+ return Activator.CreateInstance (t);
+
+ return null;
+ }
}
}
}
}
[XmlIgnore]public virtual object SelectedItem{
- get { return data == null ? null : _selectedIndex < 0 ? null : data[_selectedIndex]; }
+ get { return data == null ? null : _selectedIndex < 0 ? data.GetDefaultValue() : data[_selectedIndex]; }
+ set {
+ if (data == null) {
+ SelectedIndex = -1;
+ return;
+ }
+ //TODO:double check if value type will be notified to binding sys
+ if (value == SelectedItem)
+ return;
+
+ SelectedIndex = data.IndexOf (value);
+ }
}
[XmlIgnore]public bool HasItems {
get { return Items.Count > 0; }
CompilerServices.emitConvert (il, piSource.PropertyType);
+ if (!piSource.CanWrite)
+ throw new Exception ("Source member of bindind is read only:" + piSource.ToString());
+
il.Emit (OpCodes.Callvirt, piSource.GetSetMethod ());
il.MarkLabel (endMethod);