From: jpbruyere Date: Wed, 9 Sep 2015 07:47:45 +0000 (+0200) Subject: code cleaning X-Git-Tag: 0.2~56 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=a7f82b9ad4f5bb8f740d026377987cffd7db5725;p=jp%2Fcrow.git code cleaning --- diff --git a/Images/Icons/exit2.svg b/Images/Icons/exit2.svg new file mode 100644 index 00000000..2361ba89 --- /dev/null +++ b/Images/Icons/exit2.svg @@ -0,0 +1,64 @@ + + + + + + + + + + image/svg+xml + + + + + + + + diff --git a/Tests/GOLIBTest_DirViewer.cs b/Tests/GOLIBTest_DirViewer.cs new file mode 100644 index 00000000..1980f582 --- /dev/null +++ b/Tests/GOLIBTest_DirViewer.cs @@ -0,0 +1,84 @@ +#define MONO_CAIRO_DEBUG_DISPOSE + + +using System; +using System.Runtime.InteropServices; +using OpenTK; +using OpenTK.Graphics.OpenGL; +using OpenTK.Input; + +using System.Diagnostics; + +//using GGL; +using go; +using System.Threading; +using System.Reflection; +using System.Linq; + + +namespace test +{ + class GOLIBTest_TypeViewer : OpenTKGameWindow + { + public GOLIBTest_TypeViewer () + : base(1024, 600,"test") + {} + + VerticalStack g; + TypeContainer type; + + protected override void OnLoad (EventArgs e) + { + base.OnLoad (e); + type = new TypeContainer(typeof (GraphicObject)); + + this.AddWidget(Interface.Load ("Interfaces/testTypeViewer.goml", type)); + //LoadInterface("Interfaces/testTypeViewer.goml", out g); + } + + protected override void OnRenderFrame (FrameEventArgs e) + { + GL.Clear (ClearBufferMask.ColorBufferBit); + base.OnRenderFrame (e); + SwapBuffers (); + + MemberInfo mi; + + + } + + [STAThread] + static void Main () + { + Console.WriteLine ("starting example"); + + using (GOLIBTest_TypeViewer win = new GOLIBTest_TypeViewer( )) { + win.Run (30.0); + } + } + } + public class TypeContainer + { + public Type Type; + public TypeContainer(Type _type){ + Type = _type; + } + public string Name { + get { return Type.Name; } + } + public MemberInfo[] Members { + get { + MemberInfo[] mi = Properties.Cast ().Concat (Methods.Cast ()).ToArray(); + return mi; + } + } + public MethodInfo[] Methods { + get { return Type.GetMethods (BindingFlags.Public | BindingFlags.Instance).Where (m => !m.IsSpecialName).ToArray(); } + } + public PropertyInfo[] Properties { + get { return Type.GetProperties (); } + } + + } + +} \ No newline at end of file diff --git a/Tests/Interfaces/testDirViewer.goml b/Tests/Interfaces/testDirViewer.goml new file mode 100755 index 00000000..aea7ca07 --- /dev/null +++ b/Tests/Interfaces/testDirViewer.goml @@ -0,0 +1,21 @@ + + + + + + + + + diff --git a/Tests/Interfaces/tmpDirItem.goml b/Tests/Interfaces/tmpDirItem.goml new file mode 100755 index 00000000..12a2b75a --- /dev/null +++ b/Tests/Interfaces/tmpDirItem.goml @@ -0,0 +1,9 @@ + + + + + diff --git a/src/Size.cs b/src/Size.cs index c2231576..e5d2c0f5 100755 --- a/src/Size.cs +++ b/src/Size.cs @@ -33,6 +33,7 @@ namespace go get { return _height; } set { _height = value; } } + #region operators public static implicit operator Rectangle(Size s) {