aboutsummaryrefslogtreecommitdiffstatsci
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-12-07 04:32:57 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-12-07 04:32:57 +0100
commitfd3cf7597b2c3084c41993fe2043a484466c4fa9 (patch)
tree7e5ccf6829bf555eb4720a5c7593237caaa0ac5c /src
parentd8e417769988c76a7ebe9adc85c929e815583683 (diff)
debug for netcore standards 2
Diffstat (limited to 'src')
-rw-r--r--src/BmpPicture.cs6
-rw-r--r--src/Command.cs6
-rw-r--r--src/CompilerServices/CompilerServices.cs71
-rw-r--r--src/Configuration.cs1
-rw-r--r--src/GraphicObjects/Border.cs8
-rw-r--r--src/GraphicObjects/Button.cs4
-rw-r--r--src/GraphicObjects/CheckBox.cs2
-rw-r--r--src/GraphicObjects/ColorPicker.cs18
-rw-r--r--src/GraphicObjects/DirectoryView.cs8
-rw-r--r--src/GraphicObjects/Expandable.cs2
-rw-r--r--src/GraphicObjects/FileDialog.cs12
-rw-r--r--src/GraphicObjects/GenericStack.cs4
-rw-r--r--src/GraphicObjects/GraphicObject.cs12
-rw-r--r--src/GraphicObjects/Grid.cs6
-rw-r--r--src/GraphicObjects/Group.cs2
-rw-r--r--src/GraphicObjects/HueSelector.cs4
-rw-r--r--src/GraphicObjects/Image.cs12
-rw-r--r--src/GraphicObjects/Label.cs25
-rw-r--r--src/GraphicObjects/Menu.cs2
-rw-r--r--src/GraphicObjects/MenuItem.cs10
-rw-r--r--src/GraphicObjects/NumericControl.cs10
-rw-r--r--src/GraphicObjects/Popper.cs10
-rw-r--r--src/GraphicObjects/RadioButton.cs2
-rw-r--r--src/GraphicObjects/SaturationValueSelector.cs4
-rw-r--r--src/GraphicObjects/ScrollBar.cs4
-rw-r--r--src/GraphicObjects/Scroller.cs10
-rw-r--r--src/GraphicObjects/ScrollingObject.cs10
-rw-r--r--src/GraphicObjects/Shape.cs2
-rw-r--r--src/GraphicObjects/Splitter.cs2
-rw-r--r--src/GraphicObjects/TemplatedControl.cs4
-rw-r--r--src/GraphicObjects/TemplatedGroup.cs10
-rw-r--r--src/GraphicObjects/TextRun.cs12
-rw-r--r--src/GraphicObjects/TreeView.cs2
-rw-r--r--src/GraphicObjects/Trend.cs14
-rw-r--r--src/GraphicObjects/VerticalStack.cs2
-rw-r--r--src/GraphicObjects/Window.cs18
-rw-r--r--src/GraphicObjects/XmlIgnoreAttribute.cs34
-rw-r--r--src/IML/BindingMember.cs2
-rw-r--r--src/IML/IMLContext.cs6
-rw-r--r--src/IML/Reader.cs3
-rw-r--r--src/Input/MouseEventArgs.cs3
-rw-r--r--src/Instantiator.cs60
-rw-r--r--src/Interface.cs8
-rw-r--r--src/ItemTemplate.cs4
-rw-r--r--src/Mono.Cairo/Antialias.cs4
-rw-r--r--src/Mono.Cairo/Content.cs4
-rw-r--r--src/Mono.Cairo/Context.cs9
-rw-r--r--src/Mono.Cairo/Device.cs2
-rw-r--r--src/Mono.Cairo/Extend.cs4
-rw-r--r--src/Mono.Cairo/FillRule.cs4
-rw-r--r--src/Mono.Cairo/Filter.cs4
-rw-r--r--src/Mono.Cairo/FontSlant.cs4
-rw-r--r--src/Mono.Cairo/FontType.cs4
-rw-r--r--src/Mono.Cairo/FontWeight.cs4
-rw-r--r--src/Mono.Cairo/Format.cs4
-rw-r--r--src/Mono.Cairo/HintMetrics.cs4
-rw-r--r--src/Mono.Cairo/HintStyle.cs4
-rw-r--r--src/Mono.Cairo/LineCap.cs4
-rw-r--r--src/Mono.Cairo/LineJoin.cs4
-rw-r--r--src/Mono.Cairo/Matrix.cs2
-rw-r--r--src/Mono.Cairo/NativeMethods.cs8
-rw-r--r--src/Mono.Cairo/Operator.cs4
-rw-r--r--src/Mono.Cairo/PatternType.cs4
-rw-r--r--src/Mono.Cairo/Status.cs4
-rw-r--r--src/Mono.Cairo/SubpixelOrder.cs4
-rw-r--r--src/Mono.Cairo/Surface.cs3
-rw-r--r--src/Mono.Cairo/SurfaceType.cs4
-rw-r--r--src/Mono.Cairo/SvgVersion.cs4
-rw-r--r--src/Point.cs8
-rw-r--r--src/backends/xlib/X11Structs.cs13
70 files changed, 306 insertions, 266 deletions
diff --git a/src/BmpPicture.cs b/src/BmpPicture.cs
index 1c7250b8..98c2a016 100644
--- a/src/BmpPicture.cs
+++ b/src/BmpPicture.cs
@@ -64,13 +64,13 @@ namespace Crow
return;
}
using (Stream stream = Interface.StaticGetStreamFromPath (Path)) {
- loadBitmap (new System.Drawing.Bitmap (stream));
+ //loadBitmap (new System.Drawing.Bitmap (stream));
}
sharedResources [Path] = new sharedPicture (image, Dimensions);
}
//load image via System.Drawing.Bitmap, cairo load png only
- void loadBitmap (System.Drawing.Bitmap bitmap)
+ /*void loadBitmap (System.Drawing.Bitmap bitmap)
{
if (bitmap == null)
return;
@@ -88,7 +88,7 @@ namespace Crow
System.Runtime.InteropServices.Marshal.Copy (data.Scan0, image, 0, bitmapSize);
bitmap.UnlockBits (data);
- }
+ }*/
#region implemented abstract members of Fill
diff --git a/src/Command.cs b/src/Command.cs
index ba95acc9..5d5f85e4 100644
--- a/src/Command.cs
+++ b/src/Command.cs
@@ -64,7 +64,7 @@ namespace Crow
/// <summary>
/// if true, action defined in this command may be executed,
/// </summary>
- [XmlAttributeAttribute][DefaultValue(true)]
+ [DefaultValue(true)]
public virtual bool CanExecute {
get { return canExecute; }
set {
@@ -77,7 +77,7 @@ namespace Crow
/// <summary>
/// label to display in the bound control
/// </summary>
- [XmlAttributeAttribute][DefaultValue("Unamed Command")]
+ [DefaultValue("Unamed Command")]
public virtual string Caption {
get { return caption; }
set {
@@ -91,7 +91,7 @@ namespace Crow
/// <summary>
/// Icon to display in the bound control
/// </summary>
- [XmlAttributeAttribute]
+
public Picture Icon {
get { return icon; }
set {
diff --git a/src/CompilerServices/CompilerServices.cs b/src/CompilerServices/CompilerServices.cs
index 6ceff045..5112fb12 100644
--- a/src/CompilerServices/CompilerServices.cs
+++ b/src/CompilerServices/CompilerServices.cs
@@ -150,9 +150,9 @@ namespace Crow.IML
}
Type dvType = val.GetType ();
- if (dvType.IsValueType) {
+ if (dvType.IsValueType) {
if (pi.PropertyType.IsValueType) {
- if (pi.PropertyType.IsEnum) {
+ if (pi.PropertyType.IsEnum) {
if (pi.PropertyType != dvType)
throw new Exception ("Enum mismatch in default values: " + pi.PropertyType.FullName);
il.Emit (OpCodes.Ldc_I4, Convert.ToInt32 (val));
@@ -224,7 +224,7 @@ namespace Crow.IML
il.Emit (OpCodes.Ldstr, Convert.ToString (val));//TODO:implement here string format?
//load false
il.Emit (OpCodes.Ldc_I4_0);
- il.Emit (OpCodes.Callvirt, CompilerServices.miParseEnum);
+ il.Emit (OpCodes.Call, CompilerServices.miParseEnum);
if (CompilerServices.miParseEnum.ReturnType != pi.PropertyType)
il.Emit (OpCodes.Unbox_Any, pi.PropertyType);
@@ -236,13 +236,13 @@ namespace Crow.IML
throw new Exception ("no Parse method found for: " + pi.PropertyType.FullName);
il.Emit (OpCodes.Ldstr, Convert.ToString (val));//TODO:is this convert required?
- il.Emit (OpCodes.Callvirt, miParse);
+ il.Emit (OpCodes.Call, miParse);
if (miParse.ReturnType != pi.PropertyType)
il.Emit (OpCodes.Unbox_Any, pi.PropertyType);
}
}
- il.Emit (OpCodes.Callvirt, pi.GetSetMethod ());
+ il.Emit (OpCodes.Callvirt, pi.GetSetMethod ());
}
#region conversions
@@ -535,23 +535,31 @@ namespace Crow.IML
}else if (origType.IsValueType) {
if (destType != origType) {
MethodInfo miIO = getImplicitOp (origType, destType);
- if (miIO != null) {
- System.Reflection.Emit.Label emitCreateDefault = il.DefineLabel ();
- System.Reflection.Emit.Label emitContinue = il.DefineLabel ();
- LocalBuilder lbStruct = il.DeclareLocal (origType);
- il.Emit (OpCodes.Dup);
- il.Emit (OpCodes.Brfalse, emitCreateDefault);
- il.Emit (OpCodes.Unbox_Any, origType);
- il.Emit (OpCodes.Br, emitContinue);
- il.MarkLabel (emitCreateDefault);
- il.Emit (OpCodes.Pop);//pop null value
- il.Emit (OpCodes.Ldloca, lbStruct);
- il.Emit (OpCodes.Initobj, origType);
- il.Emit (OpCodes.Ldloc, lbStruct);
- il.MarkLabel (emitContinue);
- il.Emit (OpCodes.Call, miIO);
- }else
- il.Emit (OpCodes.Callvirt, CompilerServices.GetConvertMethod (destType));
+ if (miIO != null)
+ {
+ System.Reflection.Emit.Label emitCreateDefault = il.DefineLabel();
+ System.Reflection.Emit.Label emitContinue = il.DefineLabel();
+ LocalBuilder lbStruct = il.DeclareLocal(origType);
+ il.Emit(OpCodes.Dup);
+ il.Emit(OpCodes.Brfalse, emitCreateDefault);
+ il.Emit(OpCodes.Unbox_Any, origType);
+ il.Emit(OpCodes.Br, emitContinue);
+ il.MarkLabel(emitCreateDefault);
+ il.Emit(OpCodes.Pop);//pop null value
+ il.Emit(OpCodes.Ldloca, lbStruct);
+ il.Emit(OpCodes.Initobj, origType);
+ il.Emit(OpCodes.Ldloc, lbStruct);
+ il.MarkLabel(emitContinue);
+ il.Emit(OpCodes.Call, miIO);
+ }
+ else
+ {
+ MethodInfo miconv = CompilerServices.GetConvertMethod(destType);
+ if (miconv.IsStatic)
+ il.Emit(OpCodes.Call, miconv);
+ else
+ il.Emit(OpCodes.Callvirt, miconv);
+ }
}else
il.Emit (OpCodes.Unbox_Any, destType);//TODO:double check this
} else {
@@ -622,8 +630,12 @@ namespace Crow.IML
il.Emit (OpCodes.Pop);//remove null string from stack
il.Emit (OpCodes.Ldstr, "");//replace with empty string
} else if (dstType.IsPrimitive) {
- //il.Emit (OpCodes.Unbox_Any, dstType);
- il.Emit (OpCodes.Callvirt, CompilerServices.GetConvertMethod (dstType));
+ //il.Emit (OpCodes.Unbox_Any, dstType);
+ MethodInfo miconv = CompilerServices.GetConvertMethod(dstType);
+ if (miconv.IsStatic)
+ il.Emit(OpCodes.Call, miconv);
+ else
+ il.Emit(OpCodes.Callvirt, miconv);
} else if (dstType.IsValueType) {
il.Emit (OpCodes.Unbox_Any, dstType);
} else{
@@ -803,10 +815,13 @@ namespace Crow.IML
il.Emit (OpCodes.Ldstr, operandes [1].Trim ());
}
- il.Emit (OpCodes.Callvirt, lopParseMi);
- //il.Emit (OpCodes.Unbox_Any, lopPI.PropertyType);
- //emit left operand assignment
- il.Emit (OpCodes.Callvirt, lopPI.GetSetMethod());
+ if (lopParseMi.IsStatic)
+ il.Emit (OpCodes.Call, lopParseMi);
+ else
+ il.Emit(OpCodes.Callvirt, lopParseMi);
+ //il.Emit (OpCodes.Unbox_Any, lopPI.PropertyType);
+ //emit left operand assignment
+ il.Emit (OpCodes.Callvirt, lopPI.GetSetMethod());
} else {//tree parsing and propert gets
il.Emit (OpCodes.Ldarg_0); //load sender ref onto the stack, the current node
diff --git a/src/Configuration.cs b/src/Configuration.cs
index 71cae84a..b8112be4 100644
--- a/src/Configuration.cs
+++ b/src/Configuration.cs
@@ -108,6 +108,7 @@ namespace Crow
{
string configRoot =
Path.Combine(
+
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
".config");
diff --git a/src/GraphicObjects/Border.cs b/src/GraphicObjects/Border.cs
index 63f2c68f..9379c26a 100644
--- a/src/GraphicObjects/Border.cs
+++ b/src/GraphicObjects/Border.cs
@@ -62,7 +62,7 @@ namespace Crow
/// <summary>
/// use to define the colors of the 3d border
/// </summary>
- [XmlAttributeAttribute]
+
public virtual Fill RaisedColor {
get { return raisedColor; }
set {
@@ -76,7 +76,7 @@ namespace Crow
/// <summary>
/// use to define the colors of the 3d border
/// </summary>
- [XmlAttributeAttribute]
+
public virtual Fill SunkenColor {
get { return sunkenColor; }
set {
@@ -90,7 +90,7 @@ namespace Crow
/// <summary>
/// border width in pixels
/// </summary>
- [XmlAttributeAttribute()][DefaultValue(1)]
+ [DefaultValue(1)]
public virtual int BorderWidth {
get { return _borderWidth; }
set {
@@ -101,7 +101,7 @@ namespace Crow
/// <summary>
/// allow 3d border effects
/// </summary>
- [XmlAttributeAttribute][DefaultValue(BorderStyle.Normal)]
+ [DefaultValue(BorderStyle.Normal)]
public virtual BorderStyle BorderStyle {
get { return _borderStyle; }
set {
diff --git a/src/GraphicObjects/Button.cs b/src/GraphicObjects/Button.cs
index 8b60dcb9..30612512 100644
--- a/src/GraphicObjects/Button.cs
+++ b/src/GraphicObjects/Button.cs
@@ -75,7 +75,7 @@ namespace Crow
}
#endregion
- [XmlAttributeAttribute][DefaultValue("#Crow.Images.button.svg")]
+ [DefaultValue("#Crow.Images.button.svg")]
public string Image {
get { return image; }
set {
@@ -85,7 +85,7 @@ namespace Crow
NotifyValueChanged ("Image", image);
}
}
- [XmlAttributeAttribute][DefaultValue(false)]
+ [DefaultValue(false)]
public bool IsPressed
{
get { return isPressed; }
diff --git a/src/GraphicObjects/CheckBox.cs b/src/GraphicObjects/CheckBox.cs
index 646a8577..4860d604 100644
--- a/src/GraphicObjects/CheckBox.cs
+++ b/src/GraphicObjects/CheckBox.cs
@@ -45,7 +45,7 @@ namespace Crow
public event EventHandler Checked;
public event EventHandler Unchecked;
- [XmlAttributeAttribute()][DefaultValue(false)]
+ [DefaultValue(false)]
public bool IsChecked
{
get { return isChecked; }
diff --git a/src/GraphicObjects/ColorPicker.cs b/src/GraphicObjects/ColorPicker.cs
index cc955191..dd45023c 100644
--- a/src/GraphicObjects/ColorPicker.cs
+++ b/src/GraphicObjects/ColorPicker.cs
@@ -46,7 +46,7 @@ namespace Crow
Color curColor;
double h,s,v;
- [XmlAttributeAttribute()]
+
public virtual double R {
get { return Math.Round(curColor.R * div); }
set {
@@ -58,7 +58,7 @@ namespace Crow
notifyCurColorHasChanged ();
}
}
- [XmlAttributeAttribute()]
+
public virtual double G {
get { return Math.Round(curColor.G * div); }
set {
@@ -70,7 +70,7 @@ namespace Crow
hsvFromRGB ();
}
}
- [XmlAttributeAttribute()]
+
public virtual double B {
get { return Math.Round(curColor.B * div); }
set {
@@ -82,7 +82,7 @@ namespace Crow
hsvFromRGB ();
}
}
- [XmlAttributeAttribute()]
+
public virtual double A {
get { return Math.Round(curColor.A * div); }
set {
@@ -94,7 +94,7 @@ namespace Crow
hsvFromRGB ();
}
}
- [XmlAttributeAttribute()]
+
public virtual double H {
get { return Math.Round (h, 3); }
set {
@@ -105,7 +105,7 @@ namespace Crow
rgbFromHSV ();
}
}
- [XmlAttributeAttribute()]
+
public virtual double S {
get { return Math.Round (s, 2); }
set {
@@ -116,7 +116,7 @@ namespace Crow
rgbFromHSV ();
}
}
- [XmlAttributeAttribute()]
+
public virtual double V {
get { return Math.Round (v, 2); }
set {
@@ -128,7 +128,7 @@ namespace Crow
}
}
- [XmlAttributeAttribute]
+
public virtual Fill SelectedColor {
get { return new SolidColor(curColor); }
set {
@@ -145,7 +145,7 @@ namespace Crow
hsvFromRGB ();
}
}
- [XmlAttributeAttribute]
+
public virtual Color SelectedRawColor {
get { return curColor; }
set {
diff --git a/src/GraphicObjects/DirectoryView.cs b/src/GraphicObjects/DirectoryView.cs
index d530f0cb..b0217896 100644
--- a/src/GraphicObjects/DirectoryView.cs
+++ b/src/GraphicObjects/DirectoryView.cs
@@ -63,7 +63,7 @@ namespace Crow
NotifyValueChanged ("SelectedItem", _selectedItem);
}
}
- [XmlAttributeAttribute()][DefaultValue(true)]
+ [DefaultValue(true)]
public virtual bool ShowFiles {
get { return showFiles; }
set {
@@ -74,7 +74,7 @@ namespace Crow
NotifyValueChanged ("FileSystemEntries", FileSystemEntries);
}
}
- [XmlAttributeAttribute()][DefaultValue(false)]
+ [DefaultValue(false)]
public virtual bool ShowHidden {
get { return showHidden; }
set {
@@ -85,7 +85,7 @@ namespace Crow
NotifyValueChanged ("FileSystemEntries", FileSystemEntries);
}
}
- [XmlAttributeAttribute][DefaultValue("*.*")]
+ [DefaultValue("*.*")]
public virtual string FileMask {
get { return fileMask; }
set {
@@ -96,7 +96,7 @@ namespace Crow
NotifyValueChanged ("FileSystemEntries", FileSystemEntries);
}
}
- [XmlAttributeAttribute][DefaultValue("/")]
+ [DefaultValue("/")]
public virtual string CurrentDirectory {
get { return currentDirectory; }
set {
diff --git a/src/GraphicObjects/Expandable.cs b/src/GraphicObjects/Expandable.cs
index 1920a8fe..89bec196 100644
--- a/src/GraphicObjects/Expandable.cs
+++ b/src/GraphicObjects/Expandable.cs
@@ -67,7 +67,7 @@ namespace Crow
}
#region Public properties
- [XmlAttributeAttribute][DefaultValue("#Crow.Images.Icons.expandable.svg")]
+ [DefaultValue("#Crow.Images.Icons.expandable.svg")]
public string Image {
get { return image; }
set {
diff --git a/src/GraphicObjects/FileDialog.cs b/src/GraphicObjects/FileDialog.cs
index 8069b8a7..db66ae9e 100644
--- a/src/GraphicObjects/FileDialog.cs
+++ b/src/GraphicObjects/FileDialog.cs
@@ -55,7 +55,7 @@ namespace Crow
public string SelectedFileFullPath {
get { return Path.Combine (SelectedDirectory, SelectedFile); }
}
- [XmlAttributeAttribute][DefaultValue("/home")]
+ [DefaultValue("/home")]
public virtual string CurrentDirectory {
get { return curDir; }
set {
@@ -67,7 +67,7 @@ namespace Crow
}
}
- [XmlAttributeAttribute][DefaultValue("*")]
+ [DefaultValue("*")]
public virtual string SearchPattern {
get { return searchPattern; }
set {
@@ -78,7 +78,7 @@ namespace Crow
}
}
- [XmlAttributeAttribute()][DefaultValue(false)]
+ [DefaultValue(false)]
public virtual bool ShowHidden {
get { return showHidden; }
set {
@@ -88,7 +88,7 @@ namespace Crow
NotifyValueChanged ("ShowHidden", showHidden);
}
}
- [XmlAttributeAttribute()][DefaultValue(true)]
+ [DefaultValue(true)]
public virtual bool ShowFiles {
get { return showFiles; }
set {
@@ -98,7 +98,7 @@ namespace Crow
NotifyValueChanged ("ShowFiles", showFiles);
}
}
- [XmlAttributeAttribute]public string SelectedFile {
+ public string SelectedFile {
get { return _selectedFile; }
set {
if (value == _selectedFile)
@@ -107,7 +107,7 @@ namespace Crow
NotifyValueChanged ("SelectedFile", _selectedFile);
}
}
- [XmlAttributeAttribute]public string SelectedDirectory {
+ public string SelectedDirectory {
get { return _selectedDir; }
set {
if (value == _selectedDir)
diff --git a/src/GraphicObjects/GenericStack.cs b/src/GraphicObjects/GenericStack.cs
index f281311c..50c66c3e 100644
--- a/src/GraphicObjects/GenericStack.cs
+++ b/src/GraphicObjects/GenericStack.cs
@@ -48,7 +48,7 @@ namespace Crow
#endregion
#region Public Properties
- [XmlAttributeAttribute()][DefaultValue(2)]
+ [DefaultValue(2)]
public int Spacing
{
get { return _spacing; }
@@ -60,7 +60,7 @@ namespace Crow
RegisterForLayouting (LayoutingType.Sizing|LayoutingType.ArrangeChildren);
}
}
- [XmlAttributeAttribute()][DefaultValue(Orientation.Horizontal)]
+ [DefaultValue(Orientation.Horizontal)]
public virtual Orientation Orientation
{
get { return _orientation; }
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs
index ec4fa173..f90e06e0 100644
--- a/src/GraphicObjects/GraphicObject.cs
+++ b/src/GraphicObjects/GraphicObject.cs
@@ -1098,12 +1098,14 @@ namespace Crow
DynamicMethod dm = null;
ILGenerator il = null;
- dm = new DynamicMethod("dyn_loadDefValues",
+ /*dm = new DynamicMethod("dyn_loadDefValues",
MethodAttributes.Family | MethodAttributes.FamANDAssem | MethodAttributes.NewSlot,
CallingConventions.Standard,
- typeof(void),new Type[] {CompilerServices.TObject},thisType,true);
+ typeof(void),new Type[] {CompilerServices.TObject}, thisType, true);*/
- il = dm.GetILGenerator(256);
+ dm = new DynamicMethod("dyn_loadDefValues", null, new Type[] {CompilerServices.TObject}, thisType, true);
+
+ il = dm.GetILGenerator(256);
il.DeclareLocal(CompilerServices.TObject);
il.Emit(OpCodes.Nop);
//set local GraphicObject to root object passed as 1st argument
@@ -1129,9 +1131,9 @@ namespace Crow
il.Emit (OpCodes.Ldstr, trimed.Substring (1, trimed.Length - 2));
//push null as 3rd arg, currentNode, not known when instanciing
il.Emit (OpCodes.Ldnull);
- il.Emit (OpCodes.Callvirt, CompilerServices.miCompileDynEventHandler);
+ il.Emit (OpCodes.Call, CompilerServices.miCompileDynEventHandler);
il.Emit (OpCodes.Castclass, ei.EventHandlerType);
- il.Emit (OpCodes.Callvirt, ei.AddMethod);
+ il.Emit (OpCodes.Call, ei.AddMethod);
}else
Debug.WriteLine("error in styling, event not handled : " + trimed);
}
diff --git a/src/GraphicObjects/Grid.cs b/src/GraphicObjects/Grid.cs
index 4ae906a7..71e89bde 100644
--- a/src/GraphicObjects/Grid.cs
+++ b/src/GraphicObjects/Grid.cs
@@ -56,13 +56,13 @@ namespace Crow
#endregion
#region Public Properties
- [XmlAttributeAttribute()][DefaultValue(2)]
+ [DefaultValue(2)]
public int Spacing
{
get { return _spacing; }
set { _spacing = value; }
}
- [XmlAttributeAttribute()][DefaultValue(2)]
+ [DefaultValue(2)]
public virtual int ColumnCount
{
get { return _columnCount; }
@@ -76,7 +76,7 @@ namespace Crow
this.RegisterForLayouting (LayoutingType.ArrangeChildren);
}
}
- [XmlAttributeAttribute()][DefaultValue(2)]
+ [DefaultValue(2)]
public virtual int RowCount
{
get { return _rowCount; }
diff --git a/src/GraphicObjects/Group.cs b/src/GraphicObjects/Group.cs
index ece1f090..13fdcd49 100644
--- a/src/GraphicObjects/Group.cs
+++ b/src/GraphicObjects/Group.cs
@@ -84,7 +84,7 @@ namespace Crow
public virtual List<GraphicObject> Children {
get { return children; }
}
- [XmlAttributeAttribute()][DefaultValue(false)]
+ [DefaultValue(false)]
public bool MultiSelect
{
get { return _multiSelect; }
diff --git a/src/GraphicObjects/HueSelector.cs b/src/GraphicObjects/HueSelector.cs
index 67f4ec6e..d8218fee 100644
--- a/src/GraphicObjects/HueSelector.cs
+++ b/src/GraphicObjects/HueSelector.cs
@@ -44,7 +44,7 @@ namespace Crow
Orientation _orientation;
double hue;
- [XmlAttributeAttribute][DefaultValue(Orientation.Horizontal)]
+ [DefaultValue(Orientation.Horizontal)]
public virtual Orientation Orientation
{
get { return _orientation; }
@@ -56,7 +56,7 @@ namespace Crow
RegisterForGraphicUpdate ();
}
}
- [XmlAttributeAttribute()]
+
public virtual double Hue {
get { return hue; }
set {
diff --git a/src/GraphicObjects/Image.cs b/src/GraphicObjects/Image.cs
index 5960101a..21a83f90 100644
--- a/src/GraphicObjects/Image.cs
+++ b/src/GraphicObjects/Image.cs
@@ -49,7 +49,7 @@ namespace Crow
/// <summary>
/// If false, original size will be kept in any case.
/// </summary>
- [XmlAttributeAttribute][DefaultValue(true)]
+ [DefaultValue(true)]
public virtual bool Scaled {
get { return scaled; }
set {
@@ -66,7 +66,7 @@ namespace Crow
/// <summary>
/// If image is scaled, proportions will be preserved.
/// </summary>
- [XmlAttributeAttribute][DefaultValue(true)]
+ [DefaultValue(true)]
public virtual bool KeepProportions {
get { return keepProps; }
set {
@@ -83,7 +83,7 @@ namespace Crow
/// <summary>
/// Image file path, may be on disk or embedded. Accepts bitmaps or SVG drawings.
/// </summary>
- [XmlAttributeAttribute]
+
public string Path {
get { return _pic == null ? "" : _pic.Path; }
set {
@@ -108,7 +108,7 @@ namespace Crow
/// Used only for svg images, repaint only node named referenced in SvgSub.
/// If null, all the svg is rendered
/// </summary>
- [XmlAttributeAttribute]
+
public string SvgSub {
get { return _svgSub; }
set {
@@ -122,7 +122,7 @@ namespace Crow
/// Object holding the image data once loaded, may be used directely to pupulate this control without
/// specifying a path.
/// </summary>
- [XmlAttributeAttribute]
+
public Picture Picture {
get { return _pic; }
set {
@@ -137,7 +137,7 @@ namespace Crow
/// Opacity parameter for the image
/// </summary>
// TODO:could be moved in GraphicObject
- [XmlAttributeAttribute()][DefaultValue(1.0)]
+ [DefaultValue(1.0)]
public virtual double Opacity {
get { return opacity; }
set {
diff --git a/src/GraphicObjects/Label.cs b/src/GraphicObjects/Label.cs
index b3f97a2e..c8a43694 100644
--- a/src/GraphicObjects/Label.cs
+++ b/src/GraphicObjects/Label.cs
@@ -87,8 +87,7 @@ namespace Crow
protected TextExtents te;
#endregion
-
- [XmlAttributeAttribute][DefaultValue("SteelBlue")]
+ [DefaultValue("SteelBlue")]
public virtual Color SelectionBackground {
get { return selBackground; }
set {
@@ -99,7 +98,7 @@ namespace Crow
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute][DefaultValue("White")]
+ [DefaultValue("White")]
public virtual Color SelectionForeground {
get { return selForeground; }
set {
@@ -110,7 +109,7 @@ namespace Crow
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute][DefaultValue(Alignment.Left)]
+ [DefaultValue(Alignment.Left)]
public Alignment TextAlignment
{
get { return _textAlignment; }
@@ -122,7 +121,7 @@ namespace Crow
NotifyValueChanged ("TextAlignment", _textAlignment);
}
}
- [XmlAttributeAttribute][DefaultValue(false)]
+ [DefaultValue(false)]
public virtual bool HorizontalStretch {
get { return horizontalStretch; }
set {
@@ -133,7 +132,7 @@ namespace Crow
NotifyValueChanged ("HorizontalStretch", horizontalStretch);
}
}
- [XmlAttributeAttribute][DefaultValue(false)]
+ [DefaultValue(false)]
public virtual bool VerticalStretch {
get { return verticalStretch; }
set {
@@ -144,7 +143,7 @@ namespace Crow
NotifyValueChanged ("VerticalStretch", verticalStretch);
}
}
- [XmlAttributeAttribute][DefaultValue("label")]
+ [DefaultValue("label")]
public string Text
{
get {
@@ -167,7 +166,7 @@ namespace Crow
RegisterForGraphicUpdate ();
}
}
- [XmlAttributeAttribute][DefaultValue(false)]
+ [DefaultValue(false)]
public bool Selectable
{
get { return _selectable; }
@@ -182,7 +181,7 @@ namespace Crow
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute][DefaultValue(false)]
+ [DefaultValue(false)]
public bool Multiline
{
get { return _multiline; }
@@ -195,7 +194,7 @@ namespace Crow
RegisterForGraphicUpdate();
}
}
- [XmlAttributeAttribute][DefaultValue(0)]
+ [DefaultValue(0)]
public int CurrentColumn{
get { return _currentCol; }
set {
@@ -210,7 +209,7 @@ namespace Crow
NotifyValueChanged ("CurrentColumn", _currentCol);
}
}
- [XmlAttributeAttribute][DefaultValue(0)]
+ [DefaultValue(0)]
public int CurrentLine{
get { return _currentLine; }
set {
@@ -236,7 +235,7 @@ namespace Crow
/// <summary>
/// Selection begin position in char units
/// </summary>
- [XmlAttributeAttribute][DefaultValue("-1")]
+ [DefaultValue("-1")]
public Point SelBegin {
get {
return _selBegin;
@@ -249,7 +248,7 @@ namespace Crow
NotifyValueChanged ("SelectedText", SelectedText);
}
}
- [XmlAttributeAttribute][DefaultValue("-1")]
+ [DefaultValue("-1")]
public Point SelRelease {
get {
return _selRelease;
diff --git a/src/GraphicObjects/Menu.cs b/src/GraphicObjects/Menu.cs
index 0ddb8eae..73396238 100644
--- a/src/GraphicObjects/Menu.cs
+++ b/src/GraphicObjects/Menu.cs
@@ -41,7 +41,7 @@ namespace Crow
bool autoOpen = false;
#region Public properties
- [XmlAttributeAttribute][DefaultValue(Orientation.Horizontal)]
+ [DefaultValue(Orientation.Horizontal)]
public Orientation Orientation {
get { return orientation; }
set {
diff --git a/src/GraphicObjects/MenuItem.cs b/src/GraphicObjects/MenuItem.cs
index 3b25a9fe..a9e164d5 100644
--- a/src/GraphicObjects/MenuItem.cs
+++ b/src/GraphicObjects/MenuItem.cs
@@ -85,17 +85,17 @@ namespace Crow
NotifyValueChanged ("Command", command);
}
}
- [XmlAttributeAttribute]
+
public override bool IsEnabled {
get { return Command == null ? base.IsEnabled : Command.CanExecute; }
set { base.IsEnabled = value; }
}
- [XmlAttributeAttribute]
+
public override string Caption {
get { return Command == null ? base.Caption : Command.Caption; }
set { base.Caption = value; }
}
- [XmlAttributeAttribute]
+
public Picture Icon {
get { return Command == null ? icon : Command.Icon;; }
set {
@@ -106,7 +106,7 @@ namespace Crow
NotifyValueChanged ("Icon", icon);
}
}
- [XmlAttributeAttribute()][DefaultValue("Fit")]
+ [DefaultValue("Fit")]
public virtual Measure PopWidth {
get { return popWidth; }
set {
@@ -116,7 +116,7 @@ namespace Crow
NotifyValueChanged ("PopWidth", popWidth);
}
}
- [XmlAttributeAttribute()][DefaultValue("Fit")]
+ [DefaultValue("Fit")]
public virtual Measure PopHeight {
get { return popHeight; }
set {
diff --git a/src/GraphicObjects/NumericControl.cs b/src/GraphicObjects/NumericControl.cs
index f0eda90f..73083311 100644
--- a/src/GraphicObjects/NumericControl.cs
+++ b/src/GraphicObjects/NumericControl.cs
@@ -49,7 +49,7 @@ namespace Crow
#endregion
#region public properties
- [XmlAttributeAttribute][DefaultValue(2)]
+ [DefaultValue(2)]
public int Decimals
{
get { return _decimals; }
@@ -62,7 +62,7 @@ namespace Crow
RegisterForGraphicUpdate();
}
}
- [XmlAttributeAttribute][DefaultValue(0.0)]
+ [DefaultValue(0.0)]
public virtual double Minimum {
get { return minValue; }
set {
@@ -74,7 +74,7 @@ namespace Crow
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute][DefaultValue(100.0)]
+ [DefaultValue(100.0)]
public virtual double Maximum
{
get { return maxValue; }
@@ -87,7 +87,7 @@ namespace Crow
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute][DefaultValue(1.0)]
+ [DefaultValue(1.0)]
public virtual double SmallIncrement
{
get { return smallStep; }
@@ -100,7 +100,7 @@ namespace Crow
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute][DefaultValue(5.0)]
+ [DefaultValue(5.0)]
public virtual double LargeIncrement
{
get { return bigStep; }
diff --git a/src/GraphicObjects/Popper.cs b/src/GraphicObjects/Popper.cs
index 1186e8e7..89c0fa5a 100644
--- a/src/GraphicObjects/Popper.cs
+++ b/src/GraphicObjects/Popper.cs
@@ -46,7 +46,7 @@ namespace Crow
public event EventHandler Unpoped;
#region Public Properties
- [XmlAttributeAttribute()][DefaultValue("Fit")]
+ [DefaultValue("Fit")]
public virtual Measure PopWidth {
get { return popWidth; }
set {
@@ -56,7 +56,7 @@ namespace Crow
NotifyValueChanged ("PopWidth", popWidth);
}
}
- [XmlAttributeAttribute()][DefaultValue("Fit")]
+ [DefaultValue("Fit")]
public virtual Measure PopHeight {
get { return popHeight; }
set {
@@ -66,7 +66,7 @@ namespace Crow
NotifyValueChanged ("PopHeight", popHeight);
}
}
- [XmlAttributeAttribute()][DefaultValue(false)]
+ [DefaultValue(false)]
public bool IsPopped
{
get { return _isPopped; }
@@ -89,7 +89,7 @@ namespace Crow
}
}
- [XmlAttributeAttribute()][DefaultValue(true)]
+ [DefaultValue(true)]
public bool CanPop
{
get { return _canPop; }
@@ -102,7 +102,7 @@ namespace Crow
NotifyValueChanged ("CanPop", _canPop);
}
}
- [XmlAttributeAttribute()][DefaultValue(Alignment.Bottom)]
+ [DefaultValue(Alignment.Bottom)]
public virtual Alignment PopDirection {
get { return popDirection; }
set {
diff --git a/src/GraphicObjects/RadioButton.cs b/src/GraphicObjects/RadioButton.cs
index 4c553481..d18971a2 100644
--- a/src/GraphicObjects/RadioButton.cs
+++ b/src/GraphicObjects/RadioButton.cs
@@ -60,7 +60,7 @@ namespace Crow
}
#endregion
- [XmlAttributeAttribute()][DefaultValue(false)]
+ [DefaultValue(false)]
public bool IsChecked
{
get { return isChecked; }
diff --git a/src/GraphicObjects/SaturationValueSelector.cs b/src/GraphicObjects/SaturationValueSelector.cs
index 485a33d2..5a25d6a2 100644
--- a/src/GraphicObjects/SaturationValueSelector.cs
+++ b/src/GraphicObjects/SaturationValueSelector.cs
@@ -40,7 +40,7 @@ namespace Crow
double v, s;
- [XmlAttributeAttribute()]
+
public virtual double V {
get { return v; }
set {
@@ -53,7 +53,7 @@ namespace Crow
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute()]
+
public virtual double S {
get { return s; }
set {
diff --git a/src/GraphicObjects/ScrollBar.cs b/src/GraphicObjects/ScrollBar.cs
index f7f03073..8f777b64 100644
--- a/src/GraphicObjects/ScrollBar.cs
+++ b/src/GraphicObjects/ScrollBar.cs
@@ -45,7 +45,7 @@ namespace Crow
public ScrollBar(Interface iface) : base(iface) {}
#endregion
- [XmlAttributeAttribute()][DefaultValue(Orientation.Vertical)]
+ [DefaultValue(Orientation.Vertical)]
public virtual Orientation Orientation
{
get { return _orientation; }
@@ -61,7 +61,7 @@ namespace Crow
RegisterForGraphicUpdate ();
}
}
- [XmlAttributeAttribute()][DefaultValue(20)]
+ [DefaultValue(20)]
public virtual int CursorSize {
get { return _cursorSize; }
set {
diff --git a/src/GraphicObjects/Scroller.cs b/src/GraphicObjects/Scroller.cs
index 4f270725..16f6556d 100644
--- a/src/GraphicObjects/Scroller.cs
+++ b/src/GraphicObjects/Scroller.cs
@@ -53,7 +53,7 @@ namespace Crow
#region public properties
/// <summary> Horizontal Scrolling Position </summary>
- [XmlAttributeAttribute][DefaultValue(0)]
+ [DefaultValue(0)]
public virtual int ScrollX {
get { return scrollX; }
set {
@@ -76,7 +76,7 @@ namespace Crow
}
}
/// <summary> Vertical Scrolling Position </summary>
- [XmlAttributeAttribute][DefaultValue(0)]
+ [DefaultValue(0)]
public virtual int ScrollY {
get { return scrollY; }
set {
@@ -99,7 +99,7 @@ namespace Crow
}
}
/// <summary> Horizontal Scrolling maximum value </summary>
- [XmlAttributeAttribute][DefaultValue(0)]
+ [DefaultValue(0)]
public virtual int MaxScrollX {
get { return maxScrollX; }
set {
@@ -116,7 +116,7 @@ namespace Crow
}
}
/// <summary> Vertical Scrolling maximum value </summary>
- [XmlAttributeAttribute][DefaultValue(0)]
+ [DefaultValue(0)]
public virtual int MaxScrollY {
get { return maxScrollY; }
set {
@@ -133,7 +133,7 @@ namespace Crow
}
}
/// <summary> Mouse Wheel Scrolling multiplier </summary>
- [XmlAttributeAttribute][DefaultValue(50)]
+ [DefaultValue(50)]
public virtual int ScrollSpeed {
get { return scrollSpeed; }
set {
diff --git a/src/GraphicObjects/ScrollingObject.cs b/src/GraphicObjects/ScrollingObject.cs
index 855ac0e3..bc57b320 100644
--- a/src/GraphicObjects/ScrollingObject.cs
+++ b/src/GraphicObjects/ScrollingObject.cs
@@ -52,7 +52,7 @@ namespace Crow
protected bool KeyEventsOverrides = false;
/// <summary> Horizontal Scrolling Position </summary>
- [XmlAttributeAttribute][DefaultValue(0)]
+ [DefaultValue(0)]
public virtual int ScrollX {
get { return scrollX; }
set {
@@ -75,7 +75,7 @@ namespace Crow
}
}
/// <summary> Vertical Scrolling Position </summary>
- [XmlAttributeAttribute][DefaultValue(0)]
+ [DefaultValue(0)]
public virtual int ScrollY {
get { return scrollY; }
set {
@@ -98,7 +98,7 @@ namespace Crow
}
}
/// <summary> Horizontal Scrolling maximum value </summary>
- [XmlAttributeAttribute][DefaultValue(0)]
+ [DefaultValue(0)]
public virtual int MaxScrollX {
get { return maxScrollX; }
set {
@@ -115,7 +115,7 @@ namespace Crow
}
}
/// <summary> Vertical Scrolling maximum value </summary>
- [XmlAttributeAttribute][DefaultValue(0)]
+ [DefaultValue(0)]
public virtual int MaxScrollY {
get { return maxScrollY; }
set {
@@ -132,7 +132,7 @@ namespace Crow
}
}
/// <summary> Mouse Wheel Scrolling multiplier </summary>
- [XmlAttributeAttribute][DefaultValue(1)]
+ [DefaultValue(1)]
public virtual int MouseWheelSpeed {
get { return mouseWheelSpeed; }
set {
diff --git a/src/GraphicObjects/Shape.cs b/src/GraphicObjects/Shape.cs
index a4b3193e..eb52a06a 100644
--- a/src/GraphicObjects/Shape.cs
+++ b/src/GraphicObjects/Shape.cs
@@ -75,7 +75,7 @@ namespace Crow
RegisterForGraphicUpdate ();
}
}
- [XmlAttributeAttribute][DefaultValue(1.0)]
+ [DefaultValue(1.0)]
public double StokeWidth {
get { return strokeWidth; }
set {
diff --git a/src/GraphicObjects/Splitter.cs b/src/GraphicObjects/Splitter.cs
index 3a12b784..8fb7bb77 100644
--- a/src/GraphicObjects/Splitter.cs
+++ b/src/GraphicObjects/Splitter.cs
@@ -43,7 +43,7 @@ namespace Crow
int thickness;
- [XmlAttributeAttribute][DefaultValue(1)]
+ [DefaultValue(1)]
public virtual int Thickness {
get { return thickness; }
set {
diff --git a/src/GraphicObjects/TemplatedControl.cs b/src/GraphicObjects/TemplatedControl.cs
index 54991a41..a1a11b22 100644
--- a/src/GraphicObjects/TemplatedControl.cs
+++ b/src/GraphicObjects/TemplatedControl.cs
@@ -69,7 +69,7 @@ namespace Crow
/// Template path
/// </summary>
//TODO: this property should be renamed 'TemplatePath'
- [XmlAttributeAttribute][DefaultValue(null)]
+ [DefaultValue(null)]
public string Template {
get { return _template; }
set {
@@ -86,7 +86,7 @@ namespace Crow
/// <summary>
/// a caption being recurrent need in templated widget, it is declared here.
/// </summary>
- [XmlAttributeAttribute()][DefaultValue("Templated Control")]
+ [DefaultValue("Templated Control")]
public virtual string Caption {
get { return caption; }
set {
diff --git a/src/GraphicObjects/TemplatedGroup.cs b/src/GraphicObjects/TemplatedGroup.cs
index 4d236dab..dd9afb6c 100644
--- a/src/GraphicObjects/TemplatedGroup.cs
+++ b/src/GraphicObjects/TemplatedGroup.cs
@@ -97,7 +97,7 @@ namespace Crow
/// ItemTemplate enclosing tag, or several item templates each enclosed
/// in a separate tag.
/// </summary>
- [XmlAttributeAttribute]
+
public string ItemTemplate {
get { return _itemTemplate; }
set {
@@ -128,7 +128,7 @@ namespace Crow
/// Other possible values are properties of Data
/// </summary>
/// <value>The data property test.</value>
- [XmlAttributeAttribute][DefaultValue("TypeOf")]
+ [DefaultValue("TypeOf")]
public string DataTest {
get { return dataTest; }
set {
@@ -188,7 +188,7 @@ namespace Crow
[XmlIgnore]public bool HasItems {
get { return Items.Count > 0; }
}
- [XmlAttributeAttribute]public IList Data {
+ public IList Data {
get { return data; }
set {
if (value == data)
@@ -250,7 +250,7 @@ namespace Crow
loadItem (e.Element, items, dataTest);
}
- [XmlAttributeAttribute][DefaultValue("SteelBlue")]
+ [DefaultValue("SteelBlue")]
public virtual Color SelectionBackground {
get { return selBackground; }
set {
@@ -261,7 +261,7 @@ namespace Crow
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute][DefaultValue("White")]
+ [DefaultValue("White")]
public virtual Color SelectionForeground {
get { return selForeground; }
set {
diff --git a/src/GraphicObjects/TextRun.cs b/src/GraphicObjects/TextRun.cs
index 17e3b770..297ffe95 100644
--- a/src/GraphicObjects/TextRun.cs
+++ b/src/GraphicObjects/TextRun.cs
@@ -61,13 +61,13 @@ namespace Crow
#endregion
- [XmlAttributeAttribute ()]
+
[DefaultValue (Alignment.Left)]
public Alignment TextAlignment {
get { return _textAlignment; }
set { _textAlignment = value; }
}
- [XmlAttributeAttribute ()]
+
[DefaultValue (false)]
public virtual bool HorizontalStretch {
get { return horizontalStretch; }
@@ -79,7 +79,7 @@ namespace Crow
NotifyValueChanged ("HorizontalStretch", horizontalStretch);
}
}
- [XmlAttributeAttribute ()]
+
[DefaultValue (false)]
public virtual bool VerticalStretch {
get { return verticalStretch; }
@@ -91,7 +91,7 @@ namespace Crow
NotifyValueChanged ("VerticalStretch", verticalStretch);
}
}
- [XmlAttributeAttribute ()]
+
[DefaultValue ("label")]
public string Text {
get {
@@ -112,7 +112,7 @@ namespace Crow
lines = getLines;
}
}
- [XmlAttributeAttribute ()]
+
[DefaultValue (false)]
public bool Multiline {
get { return _multiline; }
@@ -121,7 +121,7 @@ namespace Crow
RegisterForGraphicUpdate ();
}
}
- [XmlAttributeAttribute ()]
+
[DefaultValue (false)]
public bool WordWrap {
get {
diff --git a/src/GraphicObjects/TreeView.cs b/src/GraphicObjects/TreeView.cs
index 12a99fb3..5a5e7144 100644
--- a/src/GraphicObjects/TreeView.cs
+++ b/src/GraphicObjects/TreeView.cs
@@ -45,7 +45,7 @@ namespace Crow
}
#endregion
- [XmlAttributeAttribute()][DefaultValue(false)]
+ [DefaultValue(false)]
public virtual bool IsRoot {
get { return isRoot; }
set {
diff --git a/src/GraphicObjects/Trend.cs b/src/GraphicObjects/Trend.cs
index 10c5422c..a2e0c838 100644
--- a/src/GraphicObjects/Trend.cs
+++ b/src/GraphicObjects/Trend.cs
@@ -60,7 +60,7 @@ namespace Crow
AddValue (value);
}
}
- [XmlAttributeAttribute()][DefaultValue(400)]
+ [DefaultValue(400)]
public virtual int NbValues {
get { return nbValues; }
set {
@@ -72,7 +72,7 @@ namespace Crow
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute()][DefaultValue(0.0)]
+ [DefaultValue(0.0)]
public virtual double Minimum {
get { return minValue; }
set {
@@ -84,7 +84,7 @@ namespace Crow
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute()][DefaultValue(100.0)]
+ [DefaultValue(100.0)]
public virtual double Maximum
{
get { return maxValue; }
@@ -97,7 +97,7 @@ namespace Crow
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute()][DefaultValue(1.0)]
+ [DefaultValue(1.0)]
public virtual double LowThreshold {
get { return lowThreshold; }
set {
@@ -108,7 +108,7 @@ namespace Crow
RegisterForGraphicUpdate ();
}
}
- [XmlAttributeAttribute()][DefaultValue(80.0)]
+ [DefaultValue(80.0)]
public virtual double HighThreshold {
get { return highThreshold; }
set {
@@ -119,7 +119,7 @@ namespace Crow
RegisterForGraphicUpdate ();
}
}
- [XmlAttributeAttribute()][DefaultValue("DarkRed")]
+ [DefaultValue("DarkRed")]
public virtual Fill LowThresholdFill {
get { return lowThresholdFill; }
set {
@@ -130,7 +130,7 @@ namespace Crow
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute()][DefaultValue("DarkGreen")]
+ [DefaultValue("DarkGreen")]
public virtual Fill HighThresholdFill {
get { return highThresholdFill; }
set {
diff --git a/src/GraphicObjects/VerticalStack.cs b/src/GraphicObjects/VerticalStack.cs
index 9650e685..cf0a251a 100644
--- a/src/GraphicObjects/VerticalStack.cs
+++ b/src/GraphicObjects/VerticalStack.cs
@@ -43,7 +43,7 @@ namespace Crow
}
#endregion
- [System.Xml.Serialization.XmlIgnore]
+ [XmlIgnore]
public override Orientation Orientation
{
get { return Orientation.Vertical; }
diff --git a/src/GraphicObjects/Window.cs b/src/GraphicObjects/Window.cs
index 56632ff3..051ecbde 100644
--- a/src/GraphicObjects/Window.cs
+++ b/src/GraphicObjects/Window.cs
@@ -84,7 +84,7 @@ namespace Crow
#endregion
#region public properties
- [XmlAttributeAttribute][DefaultValue("#Crow.Images.Icons.crow.png")]
+ [DefaultValue("#Crow.Images.Icons.crow.png")]
public string Icon {
get { return _icon; }
set {
@@ -97,7 +97,7 @@ namespace Crow
/// <summary>
/// Background of the title bar if any.
/// </summary>
- [XmlAttributeAttribute][DefaultValue("vgradient|0:Onyx|1:SteelBlue")]
+ [DefaultValue("vgradient|0:Onyx|1:SteelBlue")]
public virtual Fill TitleBarBackground {
get { return titleBarBackground; }
set {
@@ -111,7 +111,7 @@ namespace Crow
/// <summary>
/// Foreground of the title bar, usualy used for the window caption color.
/// </summary>
- [XmlAttributeAttribute][DefaultValue("White")]
+ [DefaultValue("White")]
public virtual Fill TitleBarForeground {
get { return titleBarForeground; }
set {
@@ -122,7 +122,7 @@ namespace Crow
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute][DefaultValue(true)]
+ [DefaultValue(true)]
public bool Resizable {
get {
return resizable;
@@ -134,7 +134,7 @@ namespace Crow
NotifyValueChanged ("Resizable", resizable);
}
}
- [XmlAttributeAttribute][DefaultValue(true)]
+ [DefaultValue(true)]
public bool Movable {
get {
return movable;
@@ -146,7 +146,7 @@ namespace Crow
NotifyValueChanged ("Movable", movable);
}
}
- [XmlAttributeAttribute][DefaultValue(false)]
+ [DefaultValue(false)]
public bool Modal {
get {
return modal;
@@ -158,7 +158,7 @@ namespace Crow
NotifyValueChanged ("Modal", modal);
}
}
- [XmlAttributeAttribute][DefaultValue(false)]
+ [DefaultValue(false)]
public bool IsMinimized {
get { return _minimized; }
set{
@@ -177,7 +177,7 @@ namespace Crow
[XmlIgnore]public bool IsNormal {
get { return !(IsMaximized|_minimized); }
}
- [XmlAttributeAttribute][DefaultValue(false)]
+ [DefaultValue(false)]
public bool AlwaysOnTop {
get {
return modal ? true : alwaysOnTop;
@@ -194,7 +194,7 @@ namespace Crow
NotifyValueChanged ("AlwaysOnTop", AlwaysOnTop);
}
}
-// [XmlAttributeAttribute()][DefaultValue(WindowState.Normal)]
+// [DefaultValue(WindowState.Normal)]
// public virtual WindowState State {
// get { return _state; }
// set {
diff --git a/src/GraphicObjects/XmlIgnoreAttribute.cs b/src/GraphicObjects/XmlIgnoreAttribute.cs
new file mode 100644
index 00000000..29e5bf6e
--- /dev/null
+++ b/src/GraphicObjects/XmlIgnoreAttribute.cs
@@ -0,0 +1,34 @@
+//
+// Expandable.cs
+//
+// Author:
+// Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
+//
+// Copyright (c) 2013-2017 Jean-Philippe Bruyère
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+
+namespace Crow
+{
+ public class XmlIgnoreAttribute : Attribute
+ {
+ }
+} \ No newline at end of file
diff --git a/src/IML/BindingMember.cs b/src/IML/BindingMember.cs
index 4a2b2c61..47cba5fc 100644
--- a/src/IML/BindingMember.cs
+++ b/src/IML/BindingMember.cs
@@ -133,7 +133,7 @@ namespace Crow.IML
il.Emit (OpCodes.Brfalse, nextLogicParent);
} else if (LevelsUp > 0) {//go upward in logical tree
il.Emit (OpCodes.Ldc_I4, LevelsUp);//push arg 2 of goUpLevels
- il.Emit (OpCodes.Callvirt, CompilerServices.miGoUpLevels);
+ il.Emit (OpCodes.Call, CompilerServices.miGoUpLevels);
//test if null
il.Emit (OpCodes.Dup);
il.Emit (OpCodes.Brfalse, cancel);
diff --git a/src/IML/IMLContext.cs b/src/IML/IMLContext.cs
index aa4dee2f..6042e6da 100644
--- a/src/IML/IMLContext.cs
+++ b/src/IML/IMLContext.cs
@@ -175,7 +175,7 @@ namespace Crow.IML
il.Emit(OpCodes.Ldfld, CompilerServices.fiCachedDel);
il.Emit(OpCodes.Ldc_I4, index);//load delegate index
il.Emit(OpCodes.Callvirt, CompilerServices.miGetDelegateListItem);
- il.Emit(OpCodes.Callvirt, evt.AddMethod);//call add event
+ il.Emit(OpCodes.Call, evt.AddMethod);//call add event
}
/// <summary>
/// Emits the handler method addition, done at end of parsing, Loc_0 is root node instance
@@ -204,8 +204,8 @@ namespace Crow.IML
il.Emit (OpCodes.Call, CompilerServices.miGetTypeFromHandle);
//load methodInfo (3rd arg)
il.Emit (OpCodes.Ldstr, membs[membs.Length-1]);
- il.Emit (OpCodes.Callvirt, CompilerServices.miCreateDel);
- il.Emit (OpCodes.Callvirt, bd.SourceEvent.AddMethod);//call add event
+ il.Emit (OpCodes.Call, CompilerServices.miCreateDel);
+ il.Emit (OpCodes.Call, bd.SourceEvent.AddMethod);//call add event
}
// public void emitHandlerMethodAddition(EventBinding bd){
// //fetch source instance with address for handler addition (as 1st arg of handler.add)
diff --git a/src/IML/Reader.cs b/src/IML/Reader.cs
index 7a0c8405..72440b6c 100644
--- a/src/IML/Reader.cs
+++ b/src/IML/Reader.cs
@@ -28,7 +28,7 @@ using System.Collections.Generic;
namespace Crow.IML2
{
- public class Reader : XmlTextReader
+ public class Reader : XmlReader
{
static List<Type> CrowTypes = new List<Type> ();
@@ -93,6 +93,7 @@ namespace Crow.IML2
il.Emit(OpCodes.Ret);
loader = (InstanciatorInvoker)dm.CreateDelegate (typeof(InstanciatorInvoker));
return loader;
+ XmlReader r = XmlReader.Create("test.xml");
}
protected int curDepth {
diff --git a/src/Input/MouseEventArgs.cs b/src/Input/MouseEventArgs.cs
index cf883f13..68741094 100644
--- a/src/Input/MouseEventArgs.cs
+++ b/src/Input/MouseEventArgs.cs
@@ -28,9 +28,6 @@
#endregion
using System;
-#if !MINIMAL
-using System.Drawing;
-#endif
namespace Crow
{
diff --git a/src/Instantiator.cs b/src/Instantiator.cs
index 001832b1..c59043b8 100644
--- a/src/Instantiator.cs
+++ b/src/Instantiator.cs
@@ -198,7 +198,7 @@ namespace Crow.IML
emitBindingDelegates (ctx);
- ctx.il.Emit (OpCodes.Ldloc_0);//load root obj to return
+ ctx.il.Emit (OpCodes.Ldloc_0);//load root obj to return
ctx.il.Emit(OpCodes.Ret);
reader.Read ();//close tag
@@ -437,9 +437,10 @@ namespace Crow.IML
#endif
}
}
- ctx.il.Emit (OpCodes.Ldloc_0);
- ctx.il.Emit (OpCodes.Callvirt, CompilerServices.miLoadDefaultVals);
- #endregion
+ ctx.il.Emit (OpCodes.Ldloc_0);
+ ctx.il.Emit (OpCodes.Callvirt, CompilerServices.miLoadDefaultVals);
+ #endregion
+
#region Attributes reading
if (reader.HasAttributes) {
@@ -492,7 +493,7 @@ namespace Crow.IML
/// <summary>
/// Parse child node an generate corresponding msil
/// </summary>
- void readChildren (XmlTextReader reader, IMLContext ctx, int startingIdx = 0)
+ void readChildren (XmlReader reader, IMLContext ctx, int startingIdx = 0)
{
bool endTagReached = false;
int nodeIdx = startingIdx;
@@ -622,6 +623,7 @@ namespace Crow.IML
emitRemoveOldDataSourceHandler (il, sourceEvent.Name, bindingDef.TargetMember, false);
+
//fetch method in datasource and test if it exist
il.Emit (OpCodes.Ldarg_2);//load new datasource
il.Emit (OpCodes.Ldfld, CompilerServices.fiDSCNewDS);
@@ -630,28 +632,27 @@ namespace Crow.IML
il.Emit (OpCodes.Ldfld, CompilerServices.fiDSCNewDS);
il.Emit (OpCodes.Ldstr, bindingDef.TargetMember);//load handler method name
il.Emit (OpCodes.Call, CompilerServices.miGetMethInfoWithRefx);
- il.Emit (OpCodes.Stloc_0);//save MethodInfo
- il.Emit (OpCodes.Ldloc_0);//push mi for test if null
+ il.Emit (OpCodes.Stloc_0);//save MethodInfo
+ il.Emit (OpCodes.Ldloc_0);//push mi for test if null
+ il.Emit (OpCodes.Brfalse, cancel);//cancel if null
- il.Emit (OpCodes.Brfalse, cancel);
+ il.Emit (OpCodes.Ldarg_1);//load datasource change source where the event is as 1st arg of handler.add
+ if (bindingDef.IsTemplateBinding)//fetch source instance with address
+ CompilerServices.emitGetInstance (il, bindingDef.SourceNA);
- il.Emit (OpCodes.Ldarg_1);//load datasource change source where the event is as 1st arg of handler.add
- if (bindingDef.IsTemplateBinding)//fetch source instance with address
- CompilerServices.emitGetInstance (il, bindingDef.SourceNA);
+ //load handlerType of sourceEvent to create delegate (1st arg)
+ il.Emit (OpCodes.Ldtoken, sourceEvent.EventHandlerType);
+ il.Emit (OpCodes.Call, CompilerServices.miGetTypeFromHandle);
+ il.Emit (OpCodes.Ldarg_2);//load new datasource where the method is defined
+ il.Emit (OpCodes.Ldfld, CompilerServices.fiDSCNewDS);
+ il.Emit (OpCodes.Ldloc_0);//load methodInfo (3rd arg)
- //load handlerType of sourceEvent to create delegate (1st arg)
- il.Emit (OpCodes.Ldtoken, sourceEvent.EventHandlerType);
- il.Emit (OpCodes.Call, CompilerServices.miGetTypeFromHandle);
- il.Emit (OpCodes.Ldarg_2);//load new datasource where the method is defined
- il.Emit (OpCodes.Ldfld, CompilerServices.fiDSCNewDS);
- il.Emit (OpCodes.Ldloc_0);//load methodInfo (3rd arg)
-
- il.Emit (OpCodes.Callvirt, CompilerServices.miCreateBoundDel);
- il.Emit (OpCodes.Callvirt, sourceEvent.AddMethod);//call add event
-
- System.Reflection.Emit.Label finish = il.DefineLabel ();
- il.Emit (OpCodes.Br, finish);
- il.MarkLabel (cancel);
+ il.Emit (OpCodes.Call, CompilerServices.miCreateBoundDel);
+ il.Emit (OpCodes.Call, sourceEvent.AddMethod);//call add event
+
+ System.Reflection.Emit.Label finish = il.DefineLabel ();
+ il.Emit (OpCodes.Br, finish);
+ il.MarkLabel (cancel);
#if DEBUG_BINDING
il.EmitWriteLine (string.Format ("Handler method '{0}' for '{1}' NOT FOUND in new dataSource", bindingDef.TargetMember, sourceEvent.Name));
#endif
@@ -659,6 +660,7 @@ namespace Crow.IML
#if DEBUG_BINDING
il.EmitWriteLine (string.Format ("Handler method '{0}' for '{1}' FOUND in new dataSource", bindingDef.TargetMember, sourceEvent.Name));
#endif
+
il.Emit (OpCodes.Ret);
//store dschange delegate in instatiator instance for access while instancing graphic object
@@ -717,7 +719,7 @@ namespace Crow.IML
il.Emit (OpCodes.Ldstr, bindingCase.Key);//load name to test
il.Emit (OpCodes.Ldc_I4_4);//StringComparison.Ordinal
- il.Emit (OpCodes.Callvirt, CompilerServices.stringEquals);
+ il.Emit (OpCodes.Call, CompilerServices.stringEquals);
il.Emit (OpCodes.Brfalse, nextTest);//if not equal, jump to next case
#endregion
@@ -851,7 +853,7 @@ namespace Crow.IML
il.Emit (OpCodes.Ldstr, bindingCase.Key);//load name to test
il.Emit (OpCodes.Ldc_I4_4);//StringComparison.Ordinal
- il.Emit (OpCodes.Callvirt, CompilerServices.stringEquals);
+ il.Emit (OpCodes.Call, CompilerServices.stringEquals);
il.Emit (OpCodes.Brfalse, nextTest);//if not equal, jump to next case
#endregion
@@ -928,7 +930,7 @@ namespace Crow.IML
ilPC.Emit(OpCodes.Ldfld, CompilerServices.fiTemplateBinding);
//add template bindings dynValueChanged delegate to new parent event
- ilPC.Emit(OpCodes.Callvirt, CompilerServices.eiValueChange.AddMethod);//call add event
+ ilPC.Emit(OpCodes.Call, CompilerServices.eiValueChange.AddMethod);//call add event
ilPC.MarkLabel (cancel);
ilPC.Emit (OpCodes.Ret);
@@ -972,7 +974,7 @@ namespace Crow.IML
//test if it's the expected one
il.Emit (OpCodes.Ldstr, bindingDef.TargetMember);
il.Emit (OpCodes.Ldc_I4_4);//StringComparison.Ordinal
- il.Emit (OpCodes.Callvirt, CompilerServices.stringEquals);
+ il.Emit (OpCodes.Call, CompilerServices.stringEquals);
il.Emit (OpCodes.Brfalse, endMethod);
//set destination member with valueChanged new value
//load destination ref
@@ -1149,7 +1151,7 @@ namespace Crow.IML
//test if it's the expected one
il.Emit (OpCodes.Ldstr, origMember);
il.Emit (OpCodes.Ldc_I4_4);//StringComparison.Ordinal
- il.Emit (OpCodes.Callvirt, CompilerServices.stringEquals);
+ il.Emit (OpCodes.Call, CompilerServices.stringEquals);
il.Emit (OpCodes.Brfalse, endMethod);
//set destination member with valueChanged new value
//load destination ref
diff --git a/src/Interface.cs b/src/Interface.cs
index d1d46e8a..de4df99e 100644
--- a/src/Interface.cs
+++ b/src/Interface.cs
@@ -81,9 +81,9 @@ namespace Crow
#region CTOR
static Interface(){
- if (Type.GetType ("Mono.Runtime") == null) {
+ /*if (Type.GetType ("Mono.Runtime") == null) {
throw new Exception (@"C.R.O.W. run only on Mono, download latest version at: http://www.mono-project.com/download/stable/");
- }
+ }*/
CrowConfigRoot =
System.IO.Path.Combine(
@@ -129,8 +129,8 @@ namespace Crow
Keyboard.KeyUp += Keyboard_KeyUp;
Keyboard.KeyPress += Keyboard_KeyPress;
- initTooltip ();
- initContextMenus ();
+ //initTooltip ();
+ //initContextMenus ();
running = true;
diff --git a/src/ItemTemplate.cs b/src/ItemTemplate.cs
index dda9d152..fc893718 100644
--- a/src/ItemTemplate.cs
+++ b/src/ItemTemplate.cs
@@ -222,7 +222,7 @@ namespace Crow
//dynamically and fetch
il.Emit (OpCodes.Ldstr, fetchMethodName);
- il.Emit (OpCodes.Callvirt, CompilerServices.miGetDataTypeAndFetch);
+ il.Emit (OpCodes.Call, CompilerServices.miGetDataTypeAndFetch);
}else
emitGetSubData(il, dataType);
}
@@ -259,7 +259,7 @@ namespace Crow
//dynamically and fetch
il.Emit (OpCodes.Ldstr, fetchMethodName);
- il.Emit (OpCodes.Callvirt, CompilerServices.miGetDataTypeAndFetch);
+ il.Emit (OpCodes.Call, CompilerServices.miGetDataTypeAndFetch);
}else
emitGetSubData(il, dataType);
}
diff --git a/src/Mono.Cairo/Antialias.cs b/src/Mono.Cairo/Antialias.cs
index 6c932f08..30c71c0f 100644
--- a/src/Mono.Cairo/Antialias.cs
+++ b/src/Mono.Cairo/Antialias.cs
@@ -1,4 +1,4 @@
-//
+//
// Mono.Cairo.Antialias.cs
//
// Authors:
@@ -32,7 +32,7 @@ using System;
namespace Cairo
{
- [Serializable]
+
public enum Antialias
{
Default,
diff --git a/src/Mono.Cairo/Content.cs b/src/Mono.Cairo/Content.cs
index a88d35a9..a45370ff 100644
--- a/src/Mono.Cairo/Content.cs
+++ b/src/Mono.Cairo/Content.cs
@@ -1,4 +1,4 @@
-//
+//
// Mono.Cairo.Content.cs
//
// Authors:
@@ -33,7 +33,7 @@ using System;
namespace Cairo
{
//[Flags]
- [Serializable]
+
public enum Content
{
Color = 0x1000,
diff --git a/src/Mono.Cairo/Context.cs b/src/Mono.Cairo/Context.cs
index 74c2e444..d428b42c 100644
--- a/src/Mono.Cairo/Context.cs
+++ b/src/Mono.Cairo/Context.cs
@@ -37,7 +37,6 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
-using Cairo;
using Color = Crow.Color;
namespace Cairo {
@@ -68,7 +67,9 @@ namespace Cairo {
//
int ptr_size = Marshal.SizeOf (typeof (IntPtr));
- PlatformID platform = Environment.OSVersion.Platform;
+ /*PlatformID platform = Environment.OSVersion.Platform;
+ RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
+ RuntimeInformation.OSArchitecture.HasFlag(Architecture.);
if (platform == PlatformID.Win32NT ||
platform == PlatformID.Win32S ||
platform == PlatformID.Win32Windows ||
@@ -76,10 +77,10 @@ namespace Cairo {
ptr_size == 4){
c_compiler_long_size = 4;
native_glyph_size = Marshal.SizeOf (typeof (NativeGlyph_4byte_longs));
- } else {
+ } else {*/
c_compiler_long_size = 8;
native_glyph_size = Marshal.SizeOf (typeof (Glyph));
- }
+ //}
}
public Context (Surface surface) : this (NativeMethods.cairo_create (surface.Handle), true)
diff --git a/src/Mono.Cairo/Device.cs b/src/Mono.Cairo/Device.cs
index 06715bc9..a5452f9d 100644
--- a/src/Mono.Cairo/Device.cs
+++ b/src/Mono.Cairo/Device.cs
@@ -64,7 +64,7 @@ namespace Cairo
}
public string Status {
get {
- return System.Runtime.InteropServices.Marshal.PtrToStringAuto(NativeMethods.cairo_status_to_string (NativeMethods.cairo_device_status (handle)));
+ return ""; //System.Runtime.InteropServices.Marshal.PtrToStringAuto(NativeMethods.cairo_status_to_string (NativeMethods.cairo_device_status (handle)));
}
}
public void SetThreadAware (bool value){
diff --git a/src/Mono.Cairo/Extend.cs b/src/Mono.Cairo/Extend.cs
index 0ffee3fb..1135c2ff 100644
--- a/src/Mono.Cairo/Extend.cs
+++ b/src/Mono.Cairo/Extend.cs
@@ -1,4 +1,4 @@
-//
+//
// Mono.Cairo.Extend.cs
//
// Authors:
@@ -34,7 +34,7 @@ using System;
namespace Cairo
{
- [Serializable]
+
public enum Extend
{
None,
diff --git a/src/Mono.Cairo/FillRule.cs b/src/Mono.Cairo/FillRule.cs
index 6d8c0626..24cbfba2 100644
--- a/src/Mono.Cairo/FillRule.cs
+++ b/src/Mono.Cairo/FillRule.cs
@@ -1,4 +1,4 @@
-//
+//
// Mono.Cairo.FillRule.cs
//
// Authors:
@@ -32,7 +32,7 @@ using System;
namespace Cairo
{
- [Serializable]
+
public enum FillRule
{
Winding,
diff --git a/src/Mono.Cairo/Filter.cs b/src/Mono.Cairo/Filter.cs
index d602ed7d..2355fbb3 100644
--- a/src/Mono.Cairo/Filter.cs
+++ b/src/Mono.Cairo/Filter.cs
@@ -1,4 +1,4 @@
-//
+//
// Mono.Cairo.Filter.cs
//
// Authors:
@@ -32,7 +32,7 @@ using System;
namespace Cairo
{
- [Serializable]
+
public enum Filter
{
Fast,
diff --git a/src/Mono.Cairo/FontSlant.cs b/src/Mono.Cairo/FontSlant.cs
index c4e1af78..b7a5684c 100644
--- a/src/Mono.Cairo/FontSlant.cs
+++ b/src/Mono.Cairo/FontSlant.cs
@@ -1,4 +1,4 @@
-//
+//
// Mono.Cairo.FontSlant.cs
//
// Authors:
@@ -32,7 +32,7 @@ using System;
namespace Cairo
{
- [Serializable]
+
public enum FontSlant
{
Normal,
diff --git a/src/Mono.Cairo/FontType.cs b/src/Mono.Cairo/FontType.cs
index 0c71fcb2..e9fd263a 100644
--- a/src/Mono.Cairo/FontType.cs
+++ b/src/Mono.Cairo/FontType.cs
@@ -1,4 +1,4 @@
-//
+//
// Mono.Cairo.FontType.cs
//
// Authors:
@@ -30,7 +30,7 @@ using System;
namespace Cairo {
- [Serializable]
+
public enum FontType
{
Toy,
diff --git a/src/Mono.Cairo/FontWeight.cs b/src/Mono.Cairo/FontWeight.cs
index 9d1927d8..5b781095 100644
--- a/src/Mono.Cairo/FontWeight.cs
+++ b/src/Mono.Cairo/FontWeight.cs
@@ -1,4 +1,4 @@
-//
+//
// Mono.Cairo.FontWeight.cs
//
// Authors:
@@ -32,7 +32,7 @@ using System;
namespace Cairo
{
- [Serializable]
+
public enum FontWeight
{
Normal,
diff --git a/src/Mono.Cairo/Format.cs b/src/Mono.Cairo/Format.cs
index f0bded3c..96e9a0f5 100644
--- a/src/Mono.Cairo/Format.cs
+++ b/src/Mono.Cairo/Format.cs
@@ -1,4 +1,4 @@
-//
+//
// Mono.Cairo.Format.cs
//
// Authors: Duncan Mak (duncan@ximian.com)
@@ -31,7 +31,7 @@ using System;
namespace Cairo
{
- [Serializable]
+
public enum Format
{
Argb32 = 0,
diff --git a/src/Mono.Cairo/HintMetrics.cs b/src/Mono.Cairo/HintMetrics.cs
index d4341424..3bf01d23 100644
--- a/src/Mono.Cairo/HintMetrics.cs
+++ b/src/Mono.Cairo/HintMetrics.cs
@@ -1,4 +1,4 @@
-//
+//
// Mono.Cairo.HintMetrics.cs
//
// Authors: Duncan Mak (duncan@ximian.com)
@@ -31,7 +31,7 @@ using System;
namespace Cairo
{
- [Serializable]
+
public enum HintMetrics
{
Default,
diff --git a/src/Mono.Cairo/HintStyle.cs b/src/Mono.Cairo/HintStyle.cs
index bb848206..b8cca974 100644
--- a/src/Mono.Cairo/HintStyle.cs
+++ b/src/Mono.Cairo/HintStyle.cs
@@ -1,4 +1,4 @@
-//
+//
// Mono.Cairo.HintStyle.cs
//
// Authors: Duncan Mak (duncan@ximian.com)
@@ -31,7 +31,7 @@ using System;
namespace Cairo
{
- [Serializable]
+
public enum HintStyle
{
Default,
diff --git a/src/Mono.Cairo/LineCap.cs b/src/Mono.Cairo/LineCap.cs
index 57cfdec2..46938c25 100644
--- a/src/Mono.Cairo/LineCap.cs
+++ b/src/Mono.Cairo/LineCap.cs
@@ -1,4 +1,4 @@
-//
+//
// Mono.Cairo.LineCap.cs
//
// Authors: Duncan Mak (duncan@ximian.com)
@@ -31,7 +31,7 @@ using System;
namespace Cairo
{
- [Serializable]
+
public enum LineCap
{
Butt,
diff --git a/src/Mono.Cairo/LineJoin.cs b/src/Mono.Cairo/LineJoin.cs
index 439b2a51..b5c241b0 100644
--- a/src/Mono.Cairo/LineJoin.cs
+++ b/src/Mono.Cairo/LineJoin.cs
@@ -1,4 +1,4 @@
-//
+//
// Mono.Cairo.LineJoin.cs
//
// Authors: Duncan Mak (duncan@ximian.com)
@@ -31,7 +31,7 @@ using System;
namespace Cairo
{
- [Serializable]
+
public enum LineJoin
{
Miter,
diff --git a/src/Mono.Cairo/Matrix.cs b/src/Mono.Cairo/Matrix.cs
index 83ffce49..12f0cb92 100644
--- a/src/Mono.Cairo/Matrix.cs
+++ b/src/Mono.Cairo/Matrix.cs
@@ -37,7 +37,7 @@ using System.Runtime.InteropServices;
namespace Cairo {
[StructLayout(LayoutKind.Sequential)]
- public class Matrix : ICloneable
+ public class Matrix //: ICloneable
{
public double Xx;
public double Yx;
diff --git a/src/Mono.Cairo/NativeMethods.cs b/src/Mono.Cairo/NativeMethods.cs
index 24384fe7..1bcdaa65 100644
--- a/src/Mono.Cairo/NativeMethods.cs
+++ b/src/Mono.Cairo/NativeMethods.cs
@@ -44,13 +44,13 @@ namespace Cairo
#if MONOTOUCH
const string cairo = "__Internal";
#else
- const string cairo = "libcairo-2.dll";
+ const string cairo = "cairo";
#endif
- //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
- //internal static extern void cairo_append_path (IntPtr cr, Path path);
+ //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ //internal static extern void cairo_append_path (IntPtr cr, Path path);
- [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
internal static extern void cairo_arc (IntPtr cr, double xc, double yc, double radius, double angle1, double angle2);
[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
diff --git a/src/Mono.Cairo/Operator.cs b/src/Mono.Cairo/Operator.cs
index 918132ef..f233a25f 100644
--- a/src/Mono.Cairo/Operator.cs
+++ b/src/Mono.Cairo/Operator.cs
@@ -1,4 +1,4 @@
-//
+//
// Mono.Cairo.Operator.cs
//
// Authors: Duncan Mak (duncan@ximian.com)
@@ -33,7 +33,7 @@ using System;
namespace Cairo
{
- [Serializable]
+
public enum Operator
{
Clear,
diff --git a/src/Mono.Cairo/PatternType.cs b/src/Mono.Cairo/PatternType.cs
index 8fe2d85d..f9b9523a 100644
--- a/src/Mono.Cairo/PatternType.cs
+++ b/src/Mono.Cairo/PatternType.cs
@@ -1,4 +1,4 @@
-//
+//
// Mono.Cairo.PatternType.cs
//
// Authors:
@@ -30,7 +30,7 @@ using System;
namespace Cairo {
- [Serializable]
+
public enum PatternType
{
Solid,
diff --git a/src/Mono.Cairo/Status.cs b/src/Mono.Cairo/Status.cs
index 6e5fbe01..54b2fec3 100644
--- a/src/Mono.Cairo/Status.cs
+++ b/src/Mono.Cairo/Status.cs
@@ -1,4 +1,4 @@
-//
+//
// Mono.Cairo.Status.cs
//
// Authors:
@@ -34,7 +34,7 @@ using System;
namespace Cairo
{
- [Serializable]
+
public enum Status
{
Success = 0,
diff --git a/src/Mono.Cairo/SubpixelOrder.cs b/src/Mono.Cairo/SubpixelOrder.cs
index e8ab6581..3c3a3362 100644
--- a/src/Mono.Cairo/SubpixelOrder.cs
+++ b/src/Mono.Cairo/SubpixelOrder.cs
@@ -1,4 +1,4 @@
-//
+//
// Mono.Cairo.Cairo.cs
//
// Authors:
@@ -30,7 +30,7 @@ using System;
namespace Cairo
{
- [Serializable]
+
public enum SubpixelOrder
{
Default,
diff --git a/src/Mono.Cairo/Surface.cs b/src/Mono.Cairo/Surface.cs
index e7a2a5e4..14f4a2b1 100644
--- a/src/Mono.Cairo/Surface.cs
+++ b/src/Mono.Cairo/Surface.cs
@@ -40,9 +40,6 @@ namespace Cairo {
public class Surface : IDisposable
{
- [Obsolete]
- protected static Hashtable surfaces = new Hashtable ();
-
IntPtr handle = IntPtr.Zero;
[Obsolete]
diff --git a/src/Mono.Cairo/SurfaceType.cs b/src/Mono.Cairo/SurfaceType.cs
index ae86d134..b0b659c6 100644
--- a/src/Mono.Cairo/SurfaceType.cs
+++ b/src/Mono.Cairo/SurfaceType.cs
@@ -1,4 +1,4 @@
-//
+//
// Mono.Cairo.SurfaceType.cs
//
// Authors:
@@ -30,7 +30,7 @@ using System;
namespace Cairo {
- [Serializable]
+
public enum SurfaceType
{
Image,
diff --git a/src/Mono.Cairo/SvgVersion.cs b/src/Mono.Cairo/SvgVersion.cs
index 99cee289..7f0f4620 100644
--- a/src/Mono.Cairo/SvgVersion.cs
+++ b/src/Mono.Cairo/SvgVersion.cs
@@ -1,4 +1,4 @@
-//
+//
// Mono.Cairo.SvgVersion.cs
//
// Authors:
@@ -30,7 +30,7 @@ using System;
namespace Cairo {
- [Serializable]
+
public enum SvgVersion
{
// FIXME: yuck
diff --git a/src/Point.cs b/src/Point.cs
index 6175efc7..08dd4436 100644
--- a/src/Point.cs
+++ b/src/Point.cs
@@ -66,14 +66,6 @@ namespace Crow
{
return new Cairo.PointD(p.X, p.Y);
}
- public static implicit operator System.Drawing.Point(Point p)
- {
- return new System.Drawing.Point(p.X, p.Y);
- }
- public static implicit operator Point(System.Drawing.Point p)
- {
- return new Point(p.X, p.Y);
- }
public static implicit operator Point(int i)
{
return new Point(i, i);
diff --git a/src/backends/xlib/X11Structs.cs b/src/backends/xlib/X11Structs.cs
index 7ceff5be..5e43e006 100644
--- a/src/backends/xlib/X11Structs.cs
+++ b/src/backends/xlib/X11Structs.cs
@@ -1,4 +1,4 @@
-// Permission is hereby granted, free of charge, to any person obtaining
+// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software",, to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
@@ -29,12 +29,12 @@
using System;
using System.ComponentModel;
using System.Collections;
-using System.Drawing;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading;
+using System.Reflection;
-/// X11 Version
+// X11 Version
namespace Crow.XLib {
//
// In the structures below, fields of type long are mapped to IntPtr.
@@ -1690,7 +1690,7 @@ namespace Crow.XLib {
}
[StructLayout (LayoutKind.Sequential)]
- [Serializable]
+
public class XPoint
{
public short X;
@@ -1698,12 +1698,11 @@ namespace Crow.XLib {
}
[StructLayout (LayoutKind.Sequential)]
- [Serializable]
+
public class XIMCallback
{
public IntPtr client_data;
- public XIMProc callback;
- [NonSerialized]
+ public XIMProc callback;
GCHandle gch;
public XIMCallback (IntPtr clientData, XIMProc proc)