- Removed Glx.cs as it is now included as part of Tao.Platforms.Xll

git-svn-id: ad71a101fa69fb252e58119732bf51384d5dbd95@1155 bb9bf1cf-960d-0410-9a3a-baeba60cf407

--- Projects/Axiom/Source/RenderSystems/OpenGL/GLX/Glx.cs
+++ Projects/Axiom/Source/RenderSystems/OpenGL/GLX/Glx.cs
@@ -1,932 +0,0 @@
-#region LGPL License
-/*
-Axiom Graphics Engine Library
-Copyright (C) 2003-2006  Axiom Project Team
-
-The overall design, and a majority of the core engine and rendering code
-contained within this library is a derivative of the open source Object Oriented
-Graphics Engine OGRE, which can be found at http://ogre.sourceforge.net.
-Many thanks to the OGRE team for maintaining such a high quality project.
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-#endregion
-
-#region SVN Version Information
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <id value="$Id$"/>
-// </file>
-#endregion SVN Version Information
-
-#region Namespace Declarations
-
-using System;
-using System.Collections.Generic;
-using System.Runtime.InteropServices;
-using System.Text;
-
-#endregion Namespace Declarations
-
-namespace Axiom.RenderSystems.OpenGL
-{
-	#region GL Types
-
-	using GLsizeiptrARB = System.IntPtr;
-	using GLintptrARB = System.IntPtr;
-	using GLhandleARB = System.Int32;
-	using GLhalfARB = System.Int16;
-	using GLhalfNV = System.Int16;
-	using GLcharARB = System.Char;
-	using GLsizei = System.Int32;
-	using GLsizeiptr = System.IntPtr;
-	using GLintptr = System.IntPtr;
-	using GLenum = System.Int32;
-	using GLboolean = System.Boolean;
-	using GLbitfield = System.Int32;
-	using GLchar = System.Char;
-	using GLbyte = System.Byte;
-	using GLubyte = System.Byte;
-	using GLshort = System.Int16;
-	using GLushort = System.Int16;
-	using GLint = System.Int32;
-	using GLuint = System.Int32;
-	using GLfloat = System.Single;
-	using GLclampf = System.Single;
-	using GLdouble = System.Double;
-	using GLclampd = System.Double;
-	using GLstring = System.String;
-	using System.Security;
-
-	#endregion GL Types
-
-	#region Class Documentation
-	/// <summary>
-	///     GLX (OpenGL XWindow Extensions) binding for .NET, implementing GLX 1.4.
-	/// </summary>
-	/// <remarks>
-	///     <para>
-	///         Binds functions and definitions in libGL.so.
-	///     </para>
-	///     <para>
-	///         The OpenGL XWindow Extensions (GLX) library contains several groups of functions that
-	///         complement the core OpenGL interface by providing integration with XWindows.
-	///     <para>
-	///         These utility functions make use of core OpenGL functions, so any OpenGL
-	///         implementation is guaranteed to support the utility functions.
-	///     </para>
-	/// </remarks>
-	#endregion Class Documentation
-	public class Glx
-	{
-
-		#region Constants and Enumerations
-
-		#region string LIBGL
-		/// <summary>
-		///		Specifies the DLL the functgions are located in.
-		/// </summary>
-		private const string _LIBGL = "libGL.so.1";
-		#endregion string LIBGL
-
-		#region CallingConvention CALLING_CONVENTION
-		/// <summary>
-		///     Specifies the calling convention.
-		/// </summary>
-		/// <remarks>
-		///     Specifies <see cref="CallingConvention.Winapi" /> for Windows and
-		///     Linux, to indicate that the default should be used.
-		/// </remarks>
-		private const CallingConvention CALLING_CONVENTION = CallingConvention.Winapi;
-		#endregion CallingConvention CALLING_CONVENTION
-
-		public const bool GLX_VERSION_1_1 = true;
-		public const bool GLX_VERSION_1_2 = true;
-		public const bool GLX_VERSION_1_3 = true;
-		public const bool GLX_VERSION_1_4 = true;
-
-		/*
-		** Visual Config Attributes (glXGetConfig, glXGetFBConfigAttrib)
-		*/
-		public const int GLX_USE_GL = 1;	/* support GLX rendering */
-		public const int GLX_BUFFER_SIZE = 2;	/* depth of the color buffer */
-		public const int GLX_LEVEL = 3;	/* level in plane stacking */
-		public const int GLX_RGBA = 4;	/* true if RGBA mode */
-		public const int GLX_DOUBLEBUFFER = 5;	/* double buffering supported */
-		public const int GLX_STEREO = 6;	/* stereo buffering supported */
-		public const int GLX_AUX_BUFFERS = 7;	/* number of aux buffers */
-		public const int GLX_RED_SIZE = 8;	/* number of red component bits */
-		public const int GLX_GREEN_SIZE = 9;	/* number of green component bits */
-		public const int GLX_BLUE_SIZE = 10;	/* number of blue component bits */
-		public const int GLX_ALPHA_SIZE = 11;	/* number of alpha component bits */
-		public const int GLX_DEPTH_SIZE = 12;	/* number of depth bits */
-		public const int GLX_STENCIL_SIZE = 13;	/* number of stencil bits */
-		public const int GLX_ACCUM_RED_SIZE = 14;	/* number of red accum bits */
-		public const int GLX_ACCUM_GREEN_SIZE = 15;	/* number of green accum bits */
-		public const int GLX_ACCUM_BLUE_SIZE = 16;	/* number of blue accum bits */
-		public const int GLX_ACCUM_ALPHA_SIZE = 17;	/* number of alpha accum bits */
-
-		/*
-		** FBConfig-specific attributes
-		*/
-		public const int GLX_X_VISUAL_TYPE = 0x22;
-		public const int GLX_CONFIG_CAVEAT = 0x20;	/* Like visual_info VISUAL_CAVEAT_EXT */
-		public const int GLX_TRANSPARENT_TYPE = 0x23;
-		public const int GLX_TRANSPARENT_INDEX_VALUE = 0x24;
-		public const int GLX_TRANSPARENT_RED_VALUE = 0x25;
-		public const int GLX_TRANSPARENT_GREEN_VALUE = 0x26;
-		public const int GLX_TRANSPARENT_BLUE_VALUE = 0x27;
-		public const int GLX_TRANSPARENT_ALPHA_VALUE = 0x28;
-		public const int GLX_DRAWABLE_TYPE = 0x8010;
-		public const int GLX_RENDER_TYPE = 0x8011;
-		public const int GLX_X_RENDERABLE = 0x8012;
-		public const int GLX_FBCONFIG_ID = 0x8013;
-		public const int GLX_MAX_PBUFFER_WIDTH = 0x8016;
-		public const int GLX_MAX_PBUFFER_HEIGHT = 0x8017;
-		public const int GLX_MAX_PBUFFER_PIXELS = 0x8018;
-		public const int GLX_VISUAL_ID = 0x800B;
-
-		/* FBConfigSGIX Attributes */
-		public const int GLX_OPTIMAL_PBUFFER_WIDTH_SGIX = 0x8019;
-		public const int GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX = 0x801A;
-
-		/*
-		** Error return values from glXGetConfig.  Success is indicated by
-		** a value of 0.
-		*/
-		public const int GLX_BAD_SCREEN = 1;	/* screen # is bad */
-		public const int GLX_BAD_ATTRIBUTE = 2;	/* attribute to get is bad */
-		public const int GLX_NO_EXTENSION = 3;	/* no glx extension on server */
-		public const int GLX_BAD_VISUAL = 4;	/* visual # not known by GLX */
-		public const int GLX_BAD_CONTEXT = 5;	/* returned only by import_context EXT? */
-		public const int GLX_BAD_VALUE = 6;	/* returned only by glXSwapIntervalSGI? */
-		public const int GLX_BAD_ENUM = 7;	/* unused? */
-
-		/* FBConfig attribute values */
-
-		/*
-		** Generic "don't care" value for glX ChooseFBConfig attributes (except
-		** GLX_LEVEL)
-		*/
-		public const int GLX_DONT_CARE = 0xFFFFFFFF;
-
-		/* GLX_RENDER_TYPE bits */
-		public const int GLX_RGBA_BIT = 0x00000001;
-		public const int GLX_COLOR_INDEX_BIT = 0x00000002;
-
-		/* GLX_DRAWABLE_TYPE bits */
-		public const int GLX_WINDOW_BIT = 0x00000001;
-		public const int GLX_PIXMAP_BIT = 0x00000002;
-		public const int GLX_PBUFFER_BIT = 0x00000004;
-
-		/* GLX_CONFIG_CAVEAT attribute values */
-		public const int GLX_NONE = 0x8000;
-		public const int GLX_SLOW_CONFIG = 0x8001;
-		public const int GLX_NON_CONFORMANT_CONFIG = 0x800D;
-
-		/* GLX_X_VISUAL_TYPE attribute values */
-		public const int GLX_TRUE_COLOR = 0x8002;
-		public const int GLX_DIRECT_COLOR = 0x8003;
-		public const int GLX_PSEUDO_COLOR = 0x8004;
-		public const int GLX_STATIC_COLOR = 0x8005;
-		public const int GLX_GRAY_SCALE = 0x8006;
-		public const int GLX_STATIC_GRAY = 0x8007;
-
-		/* GLX_TRANSPARENT_TYPE attribute values */
-		/* public const int GLX_NONE			   0x8000 */
-		public const int GLX_TRANSPARENT_RGB = 0x8008;
-		public const int GLX_TRANSPARENT_INDEX = 0x8009;
-
-		/* glXCreateGLXPbuffer attributes */
-		public const int GLX_PRESERVED_CONTENTS = 0x801B;
-		public const int GLX_LARGEST_PBUFFER = 0x801C;
-		public const int GLX_PBUFFER_HEIGHT = 0x8040;	/* New for GLX 1.3 */
-		public const int GLX_PBUFFER_WIDTH = 0x8041;	/* New for GLX 1.3 */
-
-		/* glXQueryGLXPBuffer attributes */
-		public const int GLX_WIDTH = 0x801D;
-		public const int GLX_HEIGHT = 0x801E;
-		public const int GLX_EVENT_MASK = 0x801F;
-
-		/* glXCreateNewContext render_type attribute values */
-		public const int GLX_RGBA_TYPE = 0x8014;
-		public const int GLX_COLOR_INDEX_TYPE = 0x8015;
-
-		/* glXQueryContext attributes */
-		/* public const int GLX_FBCONFIG_ID		  0x8013 */
-		/* public const int GLX_RENDER_TYPE		  0x8011 */
-		public const int GLX_SCREEN = 0x800C;
-
-		/* glXSelectEvent event mask bits */
-		public const int GLX_PBUFFER_CLOBBER_MASK = 0x08000000;
-
-		/* GLXPbufferClobberEvent event_type values */
-		public const int GLX_DAMAGED = 0x8020;
-		public const int GLX_SAVED = 0x8021;
-
-		/* GLXPbufferClobberEvent draw_type values */
-		public const int GLX_WINDOW = 0x8022;
-		public const int GLX_PBUFFER = 0x8023;
-
-		/* GLXPbufferClobberEvent buffer_mask bits */
-		public const int GLX_FRONT_LEFT_BUFFER_BIT = 0x00000001;
-		public const int GLX_FRONT_RIGHT_BUFFER_BIT = 0x00000002;
-		public const int GLX_BACK_LEFT_BUFFER_BIT = 0x00000004;
-		public const int GLX_BACK_RIGHT_BUFFER_BIT = 0x00000008;
-		public const int GLX_AUX_BUFFERS_BIT = 0x00000010;
-		public const int GLX_DEPTH_BUFFER_BIT = 0x00000020;
-		public const int GLX_STENCIL_BUFFER_BIT = 0x00000040;
-		public const int GLX_ACCUM_BUFFER_BIT = 0x00000080;
-
-		/*
-		** Extension return values from glXGetConfig.  These are also
-		** accepted as parameter values for glXChooseVisual.
-		*/
-
-		public const int GLX_X_VISUAL_TYPE_EXT = 0x22;	/* visual_info extension type */
-		public const int GLX_TRANSPARENT_TYPE_EXT = 0x23;	/* visual_info extension */
-		public const int GLX_TRANSPARENT_INDEX_VALUE_EXT = 0x24;	/* visual_info extension */
-		public const int GLX_TRANSPARENT_RED_VALUE_EXT = 0x25;	/* visual_info extension */
-		public const int GLX_TRANSPARENT_GREEN_VALUE_EXT = 0x26;	/* visual_info extension */
-		public const int GLX_TRANSPARENT_BLUE_VALUE_EXT = 0x27;	/* visual_info extension */
-		public const int GLX_TRANSPARENT_ALPHA_VALUE_EXT = 0x28;	/* visual_info extension */
-
-		/* Property values for visual_type */
-		public const int GLX_TRUE_COLOR_EXT = 0x8002;
-		public const int GLX_DIRECT_COLOR_EXT = 0x8003;
-		public const int GLX_PSEUDO_COLOR_EXT = 0x8004;
-		public const int GLX_STATIC_COLOR_EXT = 0x8005;
-		public const int GLX_GRAY_SCALE_EXT = 0x8006;
-		public const int GLX_STATIC_GRAY_EXT = 0x8007;
-
-		/* Property values for transparent pixel */
-		public const int GLX_NONE_EXT = 0x8000;
-		public const int GLX_TRANSPARENT_RGB_EXT = 0x8008;
-		public const int GLX_TRANSPARENT_INDEX_EXT = 0x8009;
-
-		/* Property values for visual_rating */
-		public const int GLX_VISUAL_CAVEAT_EXT = 0x20;  /* visual_rating extension type */
-		public const int GLX_SLOW_VISUAL_EXT = 0x8001;
-		public const int GLX_NON_CONFORMANT_VISUAL_EXT = 0x800D;
-
-		/* Property values for swap method (GLX_OML_swap_method) */
-		public const int GLX_SWAP_METHOD_OML = 0x8060;
-		public const int GLX_SWAP_EXCHANGE_OML = 0x8061;
-		public const int GLX_SWAP_COPY_OML = 0x8062;
-		public const int GLX_SWAP_UNDEFINED_OML = 0x8063;
-
-		/* Property values for multi-sampling */
-		public const int GLX_VISUAL_SELECT_GROUP_SGIX = 0x8028;	/* visuals grouped by select priority */
-
-		/*
-		** Names for attributes to glXGetClientString.
-		*/
-		public const int GLX_VENDOR = 0x1;
-		public const int GLX_VERSION = 0x2;
-		public const int GLX_EXTENSIONS = 0x3;
-
-		/*
-		** Names for attributes to glXQueryContextInfoEXT.
-		*/
-		public const int GLX_SHARE_CONTEXT_EXT = 0x800A;	/* id of share context */
-		public const int GLX_VISUAL_ID_EXT = 0x800B;	/* id of context's visual */
-		public const int GLX_SCREEN_EXT = 0x800C;	/* screen number */
-
-		/*
-		 * GLX 1.4 and later:
-		 */
-		public const int GLX_SAMPLE_BUFFERS_SGIS = 100000;
-		public const int GLX_SAMPLES_SGIS = 100001;
-
-		/* GLX extensions */
-		public const bool GLX_EXT_import_context = true;
-		public const bool GLX_EXT_visual_info = true;
-		public const bool GLX_EXT_visual_rating = true;
-		public const bool GLX_ARB_get_proc_address = true;
-
-		#endregion Constants and Enumerations
-
-		#region GLX functions
-
-		#region IntPtr glXChooseVisual( IntPtr dpy, int screen, IntPtr attriblist )
-		//extern XVisualInfo* glXChooseVisual (Display *dpy, int screen, int *attribList);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXChooseVisual" ), SuppressUnmanagedCodeSecurity]
-		public static extern IntPtr glXChooseVisual( IntPtr dpy, int screen, IntPtr attriblist );
-		public static IntPtr glXChooseVisual( IntPtr dpy, int screen, int attrib )
-		{
-			GCHandle h0 = GCHandle.Alloc( attrib, GCHandleType.Pinned );
-
-			try
-			{
-				return glXChooseVisual( dpy, screen, h0.AddrOfPinnedObject() );
-			}
-			finally
-			{
-				h0.Free();
-			}
-		}
-		public static IntPtr glXChooseVisual( IntPtr dpy, int screen, int[] attriblist )
-		{
-			GCHandle h0 = GCHandle.Alloc( attriblist, GCHandleType.Pinned );
-
-			try
-			{
-				return glXChooseVisual( dpy, screen, h0.AddrOfPinnedObject() );
-			}
-			finally
-			{
-				h0.Free();
-			}
-		}
-		#endregion IntPtr glXChooseVisual( IntPtr dpy, int screen, IntPtr attriblist )
-
-		#region void glXCopyContext( IntPtr dpy, IntPtr src, IntPtr dst, ulong mask )
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="src"></param>
-		/// <param name="dst"></param>
-		/// <param name="mask"></param>
-		//extern void glXCopyContext (Display *dpy, GLXContext src, GLXContext dst, unsigned long mask);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXCopyContext" ), SuppressUnmanagedCodeSecurity]
-		public static extern void glXCopyContext( IntPtr dpy, IntPtr src, IntPtr dst, ulong mask );
-		#endregion void glXCopyContext( IntPtr dpy, IntPtr src, IntPtr dst, ulong mask )
-
-		#region IntPtr glXCreateContext( IntPtr dpy, IntPtr vis, IntPtr shareList, bool direct )
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="vis"></param>
-		/// <param name="shareList"></param>
-		/// <param name="direct"></param>
-		/// <returns></returns>
-		//extern GLXContext glXCreateContext (Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXCreateContext" ), SuppressUnmanagedCodeSecurity]
-		public static extern IntPtr glXCreateContext( IntPtr dpy, IntPtr vis, IntPtr shareList, bool direct );
-		#endregion IntPtr glXCreateContext( IntPtr dpy, IntPtr vis, IntPtr shareList, bool direct )
-
-		#region IntPtr glXCreateGLXPixmap( IntPtr dpy, IntPtr vis, Pixmap pixmap )
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="vis"></param>
-		/// <param name="pixmap"></param>
-		/// <returns></returns>
-		//extern GLXPixmap glXCreateGLXPixmap (Display *dpy, XVisualInfo *vis, Pixmap pixmap);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXCreateGLXPixmap" ), SuppressUnmanagedCodeSecurity]
-		public static extern IntPtr glXCreateGLXPixmap( IntPtr dpy, IntPtr vis, Pixmap pixmap );
-		#endregion IntPtr glXCreateGLXPixmap( IntPtr dpy, IntPtr vis, Pixmap pixmap )
-
-		#region void glXDestroyContext( IntPtr dpy, IntPtr context )
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="context"></param>
-		//extern void glXDestroyContext (Display *dpy, GLXContext ctx);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXDestroyContext" ), SuppressUnmanagedCodeSecurity]
-		public static extern void glXDestroyContext( IntPtr dpy, IntPtr context );
-		#endregion void glXDestroyContext( IntPtr dpy, IntPtr context )
-
-		#region void glXDestroyGLXPixmap( IntPtr dpy, IntPtr pix )
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="pix"></param>
-		//extern void glXDestroyGLXPixmap (Display *dpy, GLXPixmap pix);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXDestroyGLXPixmap" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern void glXDestroyGLXPixmap( IntPtr dpy, IntPtr pix );
-		#endregion void glXDestroyGLXPixmap( IntPtr dpy, IntPtr pix )
-
-		#region int glXGetConfig( IntPtr dpy, IntPtr vis, int attrib, IntPtr value )
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="vis"></param>
-		/// <param name="attrib"></param>
-		/// <param name="value"></param>
-		/// <returns></returns>
-		//extern int glXGetConfig (Display *dpy, XVisualInfo *vis, int attrib, int *value);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXGetConfig" ), SuppressUnmanagedCodeSecurity]
-		public static extern int glXGetConfig( IntPtr dpy, IntPtr vis, int attrib, IntPtr value );
-		public static int glXGetConfig( IntPtr dpy, IntPtr vis, int attrib, int value )
-		{
-			GCHandle h0 = GCHandle.Alloc( value, GCHandleType.Pinned );
-
-			try
-			{
-				return glXChooseVisual( dpy, screen, h0.AddrOfPinnedObject() );
-			}
-			finally
-			{
-				h0.Free();
-			}
-		}
-		public static int glXGetConfig( IntPtr dpy, IntPtr vis, int attrib, int[] value )
-		{
-			GCHandle h0 = GCHandle.Alloc( value, GCHandleType.Pinned );
-
-			try
-			{
-				return glXChooseVisual( dpy, screen, h0.AddrOfPinnedObject() );
-			}
-			finally
-			{
-				h0.Free();
-			}
-		}
-		#endregion int glXGetConfig( IntPtr dpy, IntPtr vis, int attrib, IntPtr value )
-
-		#region IntPtr glXGetCurrentContext()
-		/// <summary>
-		///
-		/// </summary>
-		/// <returns></returns>
-		//extern GLXContext glXGetCurrentContext (void);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXGetCurrentContext" ), SuppressUnmanagedCodeSecurity]
-		public static extern IntPtr glXGetCurrentContext();
-		#endregion IntPtr glXGetCurrentContext()
-
-		#region IntPtr glXGetCurrentDrawable()
-		/// <summary>
-		///
-		/// </summary>
-		/// <returns></returns>
-		//extern GLXDrawable glXGetCurrentDrawable (void);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXGetCurrentDrawable" ), SuppressUnmanagedCodeSecurity]
-		public static extern IntPtr glXGetCurrentDrawable();
-		#endregion IntPtr glXGetCurrentDrawable()
-
-		#region bool glXIsDirect( IntPtr dpy, IntPtr ctx )
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="ctx"></param>
-		/// <returns></returns>
-		//extern Bool glXIsDirect (Display *dpy, GLXContext ctx);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXIsDirect" ), SuppressUnmanagedCodeSecurity]
-		public static extern bool glXIsDirect( IntPtr dpy, IntPtr ctx );
-		#endregion bool glXIsDirect( IntPtr dpy, IntPtr ctx )
-
-		#region bool glXMakeCurrent( IntPtr display, IntPtr drawable, IntPtr context )
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="display"></param>
-		/// <param name="drawable"></param>
-		/// <param name="context"></param>
-		/// <returns></returns>
-		//extern Bool glXMakeCurrent (Display *dpy, GLXDrawable drawable, GLXContext ctx);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXMakeCurrent" ), SuppressUnmanagedCodeSecurity]
-		public static extern bool glXMakeCurrent( IntPtr display, IntPtr drawable, IntPtr context );
-		#endregion bool glXMakeCurrent( IntPtr display, IntPtr drawable, IntPtr context )
-
-		#region bool glXQueryExtension( IntPtr dpy, IntPtr errorBase, IntPtr eventBase )
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="errorBase"></param>
-		/// <param name="eventBase"></param>
-		/// <returns></returns>
-		//extern Bool glXQueryExtension (Display *dpy, int *errorBase, int *eventBase);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXQueryExtension" ), SuppressUnmanagedCodeSecurity]
-		public static extern bool glXQueryExtension( IntPtr dpy, IntPtr errorBase, IntPtr eventBase );
-		public static unsafe extern bool glXQueryExtension( IntPtr dpy, int* errorBase, int* eventBase );
-		public static unsafe bool glXQueryExtension( IntPtr dpy, int errorBase, int eventBase )
-		{
-			GCHandle h0 = GCHandle.Alloc( errorBase, GCHandleType.Pinned );
-			GCHandle h1 = GCHandle.Alloc( eventBase, GCHandleType.Pinned );
-
-			try
-			{
-				return glXQueryExtension( dpy, h0.AddrOfPinnedObject(), h1.AddrOfPinnedObject() );
-			}
-			finally
-			{
-				h0.Free();
-				h1.Free();
-			}
-		}
-		public static unsafe bool glXQueryExtension( IntPtr dpy, int[] errorBase, int[] eventBase )
-		{
-			GCHandle h0 = GCHandle.Alloc( errorBase, GCHandleType.Pinned );
-			GCHandle h1 = GCHandle.Alloc( eventBase, GCHandleType.Pinned );
-
-			try
-			{
-				return glXQueryExtension( dpy, h0.AddrOfPinnedObject(), h1.AddrOfPinnedObject() );
-			}
-			finally
-			{
-				h0.Free();
-				h1.Free();
-			}
-		}
-		#endregion bool glXQueryExtension( IntPtr dpy, IntPtr errorBase, IntPtr eventBase )
-
-		#region bool glXQueryVersion( IntPtr dpy, IntPtr major, IntPtr minor )
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="major"></param>
-		/// <param name="minor"></param>
-		/// <returns></returns>
-		//extern Bool glXQueryVersion (Display *dpy, int *major, int *minor);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXQueryVersion" ), SuppressUnmanagedCodeSecurity]
-		public static extern bool glXQueryVersion( IntPtr dpy, IntPtr major, IntPtr minor );
-		public static unsafe extern bool glXQueryVersion( IntPtr dpy, int* major, int* minor );
-		public static unsafe extern bool glXQueryVersion( IntPtr dpy, out int major, out int minor )
-		{
-			return new NotImplementedException();
-		}
-		public static unsafe extern bool glXQueryVersion( IntPtr dpy, out int[] major, out int[] minor )
-		{
-			return new NotImplementedException();
-		}
-		#endregion bool glXQueryVersion( IntPtr dpy, IntPtr major, IntPtr minor )
-
-		#region void glXSwapBuffers( IntPtr display, IntPtr drawable )
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="display"></param>
-		/// <param name="drawable"></param>
-		//extern void glXSwapBuffers (Display *dpy, GLXDrawable drawable);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXSwapBuffers" ), SuppressUnmanagedCodeSecurity]
-		public static extern void glXSwapBuffers( IntPtr display, IntPtr drawable );
-		#endregion void glXSwapBuffers( IntPtr display, IntPtr drawable )
-
-		#region void glXUseXFont( IntPtr font, int first, int count, int listBase )
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="font"></param>
-		/// <param name="first"></param>
-		/// <param name="count"></param>
-		/// <param name="listBase"></param>
-		//extern void glXUseXFont (Font font, int first, int count, int listBase);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXUseXFont" ), SuppressUnmanagedCodeSecurity]
-		public static extern void glXUseXFont( IntPtr font, int first, int count, int listBase );
-		#endregion void glXUseXFont( IntPtr font, int first, int count, int listBase )
-
-		#region void glXWaitGL()
-		/// <summary>
-		///
-		/// </summary>
-		//extern void glXWaitGL (void);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXWaitGL" ), SuppressUnmanagedCodeSecurity]
-		public static extern void glXWaitGL();
-		#endregion void glXWaitGL()
-
-		#region void glXWaitX()
-		/// <summary>
-		///
-		/// </summary>
-		//extern void glXWaitX (void);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXWaitX" ), SuppressUnmanagedCodeSecurity]
-		public static extern void glXWaitX();
-		#endregion void glXWaitX()
-
-		#region IntPtr glXGetClientString( IntPtr dpy, int name )
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="name"></param>
-		/// <returns></returns>
-		//extern const char * glXGetClientString (Display *dpy, int name );
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXGetClientString" ), SuppressUnmanagedCodeSecurity]
-		public static extern string glXGetClientString( IntPtr dpy, int name );
-		#endregion IntPtr glXGetClientString( IntPtr dpy, int name )
-
-		#region IntPtr glXQueryServerString( IntPtr dpy, int screen, int name )
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="screen"></param>
-		/// <param name="name"></param>
-		/// <returns></returns>
-		//extern const char * glXQueryServerString (Display *dpy, int screen, int name );
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXQueryServerString" ), SuppressUnmanagedCodeSecurity]
-		public static extern string glXQueryServerString( IntPtr dpy, int screen, int name );
-		#endregion IntPtr glXQueryServerString( IntPtr dpy, int screen, int name )
-
-		#region IntPtr glXQueryExtensionsString( IntPtr dpy, int screen )
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="screen"></param>
-		/// <returns></returns>
-		//extern const char * glXQueryExtensionsString (Display *dpy, int screen );
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXQueryExtensionsString" ), SuppressUnmanagedCodeSecurity]
-		public static extern string glXQueryExtensionsString( IntPtr dpy, int screen );
-		#endregion IntPtr glXQueryExtensionsString( IntPtr dpy, int screen )
-
-		/* New for GLX 1.3 */
-
-		#region IntPtr glXGetFBConfigs( IntPtr dpy, int screen, int* nelements )
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="screen"></param>
-		/// <param name="nelements"></param>
-		/// <returns></returns>
-		//extern GLXFBConfig * glXGetFBConfigs (Display *dpy, int screen, int *nelements);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXGetFBConfigs" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern IntPtr glXGetFBConfigs( IntPtr dpy, int screen, int* nelements );
-		public static IntPtr glXGetFBConfigs( IntPtr dpy, int screen, int element );
-		public static IntPtr glXGetFBConfigs( IntPtr dpy, int screen, int[] nelements );
-		#endregion IntPtr glXGetFBConfigs( IntPtr dpy, int screen, int* nelements )
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="screen"></param>
-		/// <param name="attrib_list"></param>
-		/// <param name="nelements"></param>
-		/// <returns></returns>
-		//extern GLXFBConfig * glXChooseFBConfig (Display *dpy, int screen, const int *attrib_list, int *nelements);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXChooseFBConfig" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern IntPtr glXChooseFBConfig( IntPtr dpy, int screen, int* attrib_list, int* nelements );
-		public static IntPtr glXChooseFBConfig( IntPtr dpy, int screen, int attrib_list, int nelements );
-		public static IntPtr glXChooseFBConfig( IntPtr dpy, int screen, int[] attrib_list, int[] nelements );
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="config"></param>
-		/// <param name="attribute"></param>
-		/// <param name="value"></param>
-		/// <returns></returns>
-		//extern int glXGetFBConfigAttrib (Display *dpy, GLXFBConfig config, int attribute, int *value);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXGetFBConfigAttrib" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern int glXGetFBConfigAttrib( IntPtr dpy, IntPtr config, int attribute, int* value );
-		public static int glXGetFBConfigAttrib( IntPtr dpy, IntPtr config, int attribute, int value );
-		public static int glXGetFBConfigAttrib( IntPtr dpy, IntPtr config, int attribute, int[] value );
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="config"></param>
-		/// <returns></returns>
-		//extern XVisualInfo * glXGetVisualFromFBConfig (Display *dpy, GLXFBConfig config);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXGetVisualFromFBConfig" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern IntPtr glXGetVisualFromFBConfig(IntPtr dpy, GLXFBConfig config );
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="config"></param>
-		/// <param name="win"></param>
-		/// <param name="attrib_list"></param>
-		/// <returns></returns>
-		//extern GLXWindow glXCreateWindow (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXCreateWindow" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern int glXCreateWindow( IntPtr dpy, IntPtr config, int win, int* attrib_list );
-		public static int glXCreateWindow( IntPtr dpy, IntPtr config, int win, int[] attrib_list );
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="win"></param>
-		//extern void glXDestroyWindow (Display *dpy, GLXWindow win);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXDestroyWindow" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern void glXDestroyWindow( IntPtr dpy, int win );
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="config"></param>
-		/// <param name="pixmap"></param>
-		/// <param name="attrib_list"></param>
-		/// <returns></returns>
-		//extern GLXPixmap glXCreatePixmap (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXCreatePixmap" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern int glXCreatePixmap( IntPtr dpy, IntPtr config, IntPtr pixmap, int* attrib_list );
-		public static int glXCreatePixmap( IntPtr dpy, IntPtr config, IntPtr pixmap, int[] attrib_list );
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="pixmap"></param>
-		//extern void glXDestroyPixmap (Display *dpy, GLXPixmap pixmap);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXDestroyPixmap" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern void glXDestroyPixmap( IntPtr dpy, int pixmap );
-		public static void glXDestroyPixmap( IntPtr dpy, int pixmap );
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="config"></param>
-		/// <param name="attrib_list"></param>
-		/// <returns></returns>
-		//extern GLXPbuffer glXCreatePbuffer (Display *dpy, GLXFBConfig config, const int *attrib_list);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXCreatePbuffer" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern IntPtr glXCreatePbuffer( IntPtr dpy, IntPtr config, int* attrib_list );
-		public static IntPtr glXCreatePbuffer( IntPtr dpy, IntPtr config, int[] attrib_list );
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="pbuf"></param>
-		//extern void glXDestroyPbuffer (Display *dpy, GLXPbuffer pbuf);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXDestroyPbuffer" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern void glXDestroyPbuffer( IntPtr dpy, IntPtr pbuf );
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="draw"></param>
-		/// <param name="attribute"></param>
-		/// <param name="value"></param>
-		//extern void glXQueryDrawable (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXQueryDrawable" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern void glXQueryDrawable( IntPtr dpy, IntPtr draw, int attribute, uint* value );
-		public static void glXQueryDrawable( IntPtr dpy, IntPtr draw, int attribute, uint[] value );
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="config"></param>
-		/// <param name="render_type"></param>
-		/// <param name="share_list"></param>
-		/// <param name="direct"></param>
-		/// <returns></returns>
-		//extern GLXContext glXCreateNewContext (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXCreateNewContext" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern IntPtr glXCreateNewContext( IntPtr dpy, IntPtr config, int render_type, IntPtr share_list, bool direct );
-
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="display"></param>
-		/// <param name="draw"></param>
-		/// <param name="read"></param>
-		/// <param name="ctx"></param>
-		/// <returns></returns>
-		//extern Bool glXMakeContextCurrent (Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXMakeContextCurrent" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern bool glXMakeContextCurrent( IntPtr display, IntPtr draw, IntPtr read, IntPtr ctx );
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <returns></returns>
-		//extern GLXDrawable glXGetCurrentReadDrawable (void);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXGetCurrentReadDrawable" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern IntPtr glXGetCurrentReadDrawable();
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <returns></returns>
-		//extern Display * glXGetCurrentDisplay (void);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXGetCurrentDisplay" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern IntPtr glXGetCurrentDisplay();
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="ctx"></param>
-		/// <param name="attribute"></param>
-		/// <param name="value"></param>
-		/// <returns></returns>
-		//extern int glXQueryContext (Display *dpy, GLXContext ctx, int attribute, int *value);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXQueryContext" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern int glXQueryContext( IntPtr dpy, IntPtr ctx, int attribute, int* value );
-		public static int glXQueryContext( IntPtr dpy, IntPtr ctx, int attribute, int value );
-		public static int glXQueryContext( IntPtr dpy, IntPtr ctx, int attribute, int[] value );
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="draw"></param>
-		/// <param name="event_mask"></param>
-		//extern void glXSelectEvent (Display *dpy, GLXDrawable draw, unsigned long event_mask);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXSelectEvent" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern void glXSelectEvent( IntPtr dpy, IntPtr draw, ulong event_mask );
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="draw"></param>
-		/// <param name="event_mask"></param>
-		//extern void glXGetSelectedEvent (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXGetSelectedEvent" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern void glXGetSelectedEvent( IntPtr dpy, IntPtr draw, ulong* event_mask );
-		public static unsafe extern void glXGetSelectedEvent( IntPtr dpy, IntPtr draw, ulong event_mask );
-
-		/* GLX 1.4 and later */
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="procName"></param>
-		/// <returns></returns>
-		//extern void (*glXGetProcAddress(const GLubyte *procname))(void);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXGetProcAddress" ), SuppressUnmanagedCodeSecurity]
-		public static extern IntPtr glxGetProcAddress( [MarshalAs( UnmanagedType.LPTStr )] string procName );
-
-
-		/* GLX extensions */
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="ctx"></param>
-		/// <returns></returns>
-		//extern GLXContextID glXGetContextIDEXT (const GLXContext ctx);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXGetContextIDEXT" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern int glXGetContextIDEXT( IntPtr ctx );
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="contextID"></param>
-		/// <returns></returns>
-		//extern GLXContext glXImportContextEXT (Display *dpy, GLXContextID contextID);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXImportContextEXT" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern IntPtr glXImportContextEXT( IntPtr dpy, int contextID );
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="ctx"></param>
-		//extern void glXFreeContextEXT (Display *dpy, GLXContext ctx);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXFreeContextEXT" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern void glXFreeContextEXT( IntPtr dpy, IntPtr ctx );
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="dpy"></param>
-		/// <param name="ctx"></param>
-		/// <param name="attribute"></param>
-		/// <param name="value"></param>
-		/// <returns></returns>
-		//extern int glXQueryContextInfoEXT (Display *dpy, GLXContext ctx, int attribute, int *value);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXQueryContextInfoEXT" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern int glXQueryContextInfoEXT( IntPtr dpy, IntPtr ctx, int attribute, int* value );
-		public static unsafe extern int glXQueryContextInfoEXT( IntPtr dpy, IntPtr ctx, int attribute, int value );
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <returns></returns>
-		//extern Display * glXGetCurrentDisplayEXT (void);
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXGetCurrentDisplayEXT" ), SuppressUnmanagedCodeSecurity]
-		public static unsafe extern IntPtr glXGetCurrentDisplayEXT();
-
-		/// <summary>
-		///
-		/// </summary>
-		/// <param name="procName"></param>
-		/// <returns></returns>
-		//extern void (*glXGetProcAddressARB(const GLubyte *procName))( void );
-		[DllImport( _LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXGetProcAddressARB" ), SuppressUnmanagedCodeSecurity]
-		public static extern IntPtr glXGetProcAddressARB( [MarshalAs( UnmanagedType.LPTStr )] string procName );
-
-		#endregion
-	}
-}


Fixed Announcer Low Volume

Fixed Announcer Low Volume

--- RickshawTradeTimer/RickshawTradeTimer/SettingsForm.cs
+++ RickshawTradeTimer/RickshawTradeTimer/SettingsForm.cs
@@ -31,7 +31,7 @@
             actionBuilder.PauseOnCheckpoint = PauseOnEnd;
             actionBuilder.PauseOnEnd = PauseOnEnd;
             actionBuilder.AnnoucerEnabled = AnnoucerEnabled;
-            actionBuilder.AnnoucerVolume = annoucerVolumeTB.Value;
+            actionBuilder.AnnoucerVolume = annoucerVolumeTB.Value * 10;
         }

         private void saveButton_Click(object sender, EventArgs e) {
@@ -40,7 +40,7 @@
                 actionBuilder.PauseOnCheckpoint = PauseOnEnd;
                 actionBuilder.PauseOnEnd = PauseOnEnd;
                 actionBuilder.AnnoucerEnabled = AnnoucerEnabled;
-                actionBuilder.AnnoucerVolume = annoucerVolumeTB.Value;
+                actionBuilder.AnnoucerVolume = annoucerVolumeTB.Value * 10;
             }
             SaveFile("GEN_settings.ini");
         }


SNTP experiments

SNTP experiments

--- LatencyCollectorCore/SntpClient.cs
+++ LatencyCollectorCore/SntpClient.cs
@@ -29,10 +29,10 @@
 				lock (Sync)
 				{
 					var now = DateTime.UtcNow;
-					if (now - _lastUpdatedOffset > OffsetUpdatePeriod)
+					if (now - _lastRequestedOffset > OffsetUpdatePeriod)
 					{
 						RequestTime();
-						_lastUpdatedOffset = now;
+						_lastRequestedOffset = now;
 					}
 					else
 					{
@@ -40,7 +40,6 @@
 						{
 							var driftSeconds = (now - _lastUpdatedOffset).TotalSeconds * _timeDrift;
 							_currentTimeOffset = _requestedTimeOffset + TimeSpan.FromSeconds(driftSeconds);
-							_timeSynchronized = true;
 						}
 					}
 				}
@@ -101,22 +100,36 @@

 			{
 				var message = string.Format(CultureInfo.InvariantCulture, "Time sync: offset {0}", newOffset);
-				Data.Tracker.Log("Event", message);
+				Trace.WriteLine(message);
+				//Data.Tracker.Log("Event", message);
 			}

 			if (_offsetInitialized)
 			{
 				var message = string.Format(CultureInfo.InvariantCulture, "Time sync: offset changed {0}",
 					newOffset - _currentTimeOffset.TotalSeconds);
-				Data.Tracker.Log("Event", message);
+				Trace.WriteLine(message);
+				//Data.Tracker.Log("Event", message);
 			}

 			var diagMessage = string.Format(CultureInfo.InvariantCulture,
 				"Time sync diagnostics: count {0}, min offset {1}, max offset {2}, max latency {3}",
 				vals.Count, offsets.First(), offsets.Last(), vals.Last().Latency);
-			Data.Tracker.Log("Event", diagMessage);
+			Trace.WriteLine(diagMessage);
+			//Data.Tracker.Log("Event", diagMessage);
+
+			var now = DateTime.UtcNow;
+			if (_offsetInitialized)
+			{
+				_timeDrift = (newOffset - _requestedTimeOffset.TotalSeconds) / (now - _lastUpdatedOffset).TotalSeconds;
+				_timeSynchronized = true;
+
+				Trace.WriteLine("new time drift: " + _timeDrift);
+			}

 			_requestedTimeOffset = TimeSpan.FromSeconds(newOffset);
+			_currentTimeOffset = _requestedTimeOffset;
+			_lastUpdatedOffset = now;
 			_offsetInitialized = true;
 		}

@@ -186,6 +199,8 @@
 		{
 			lock (Sync)
 			{
+				if (!_timeSynchronized)
+					throw new InvalidOperationException();
 				var res = DateTime.UtcNow + _currentTimeOffset;
 				return res;
 			}
@@ -195,6 +210,8 @@
 		{
 			lock (Sync)
 			{
+				if (!_timeSynchronized)
+					throw new InvalidOperationException();
 				return _currentTimeOffset;
 			}
 		}
@@ -223,11 +240,12 @@
 		private static Timer _timer;

 		private static readonly TimeSpan OffsetUpdatePeriod = TimeSpan.FromSeconds(5);
+		private static DateTime _lastRequestedOffset = DateTime.MinValue;
 		private static DateTime _lastUpdatedOffset = DateTime.MinValue;

 		static readonly object Sync = new object();
 		private static readonly List<NtpResult> _requestResults = new List<NtpResult>();
-		private const int MinResultsCount = 16;
+		private const int MinResultsCount = 64;
 		private const int ReceiveTimeoutMsecs = 2000;
 	}


OperationSettings.Options with expression

--- Signum.Web.Extensions/Operations/OperationSettings.cs
+++ Signum.Web.Extensions/Operations/OperationSettings.cs
@@ -10,6 +10,7 @@
 using Signum.Utilities;
 using Signum.Entities.Basics;
 using Signum.Web.Extensions.Properties;
+using System.Linq.Expressions;
 #endregion

 namespace Signum.Web.Operations
@@ -128,6 +129,12 @@
             return Options(RouteHelper.New().Action(actionName,controllerName));
         }

+        public JsOperationOptions Options<TController>(Expression<Action<TController>> action)
+            where TController : Controller
+        {
+            return Options(RouteHelper.New().Action(action));
+        }
+
         public JsOperationOptions Options(string controllerUrl)
         {
             return new JsOperationOptions


Updated parsing of token response for better error handling

--- Source/Libraries/GSF.Security/OIDCSecurityProvider.cs
+++ Source/Libraries/GSF.Security/OIDCSecurityProvider.cs
@@ -435,17 +435,27 @@
             try
             {
                 JObject tokenContent = DecodeJWT(token.id_token);
-
+
                 // Translate UserDetails according to Token
-                UserData userData = new UserData(tokenContent.GetOrDefault("sub").ToString());
+                if (!tokenContent.TryGetValue("sub", out JToken sub))
+                    throw new Exception("Token data was not derived from valid JWT: missing 'sub'");
+                UserData userData = new UserData(sub.ToString());

                 userData.Initialize();
-                userData.Username = tokenContent.GetOrDefault("name").ToString();
-                userData.FirstName = tokenContent.GetOrDefault("given_name").ToString();
-                userData.LastName = tokenContent.GetOrDefault("family_name").ToString();
-                userData.PhoneNumber = tokenContent.GetOrDefault("phone_number").ToString();
-                userData.EmailAddress = tokenContent.GetOrDefault("email").ToString();
-
+
+                if (!tokenContent.TryGetValue("name", out JToken userName))
+                    throw new Exception("Token data was not derived from valid JWT: missing 'name'");
+                userData.Username = userName.ToString();
+
+                if (tokenContent.TryGetValue("given_name", out JToken firstName))
+                    userData.FirstName = firstName.ToString();
+                if (tokenContent.TryGetValue("family_name", out JToken lastName))
+                    userData.LastName = lastName.ToString();
+                if (tokenContent.TryGetValue("phone_number", out JToken phoneNumber))
+                    userData.PhoneNumber = phoneNumber.ToString();
+                if (tokenContent.TryGetValue("email", out JToken email))
+                    userData.EmailAddress = email.ToString();
+
                 try
                 {
                         userData.Roles = tokenContent.GetOrDefault(RolesClaim).ToObject<List<string>>();


Finalized decision

Finalized decision

--- AngleSharp/DOM/Html/Basic/HTMLScriptElement.cs
+++ AngleSharp/DOM/Html/Basic/HTMLScriptElement.cs
@@ -247,25 +247,18 @@
                 }
                 else if (!IsAsync && !_forceAsync)
                 {
-                    //The element must be added to the end of the list of scripts that will execute in order as soon as possible associated
-                    //with the Document of the script element at the time the prepare a script algorithm started.
+                    //Add to end of list of scripts (in order) --> sufficient
                     owner.AddScript(this);
                 }
                 else
                 {
-                    //The element must be added to the set of scripts that will execute as soon as possible of the Document of the
-                    //script element at the time the prepare a script algorithm started.
+                    //Just add to the set of scripts
                     owner.AddScript(this);
                 }
             }
-            else if (_parserInserted)
-            {
-                //and either the parser that created the script is an XML parser or it's an HTML parser whose script nesting level is
-                //not greater than one, and the Document of the HTML parser or XML parser that created the script element has a style
-                //sheet that is blocking scripts
+            else if (_parserInserted && owner.HasScriptBlockingStyleSheet())
+            {
                 _readyToBeExecuted = true;
-                //TODO do not run immediately, i.e. remove the following line
-                options.RunScript(Text, CreateOptions(), ScriptLanguage);
             }
             else
             {


added GraphEditor

added GraphEditor

--- Source/UnrealEnginePython/UnrealEnginePython.Build.cs
+++ Source/UnrealEnginePython/UnrealEnginePython.Build.cs
@@ -98,6 +98,7 @@
                 "MovieSceneTracks",
                 "CinematicCamera",
                 "EditorStyle",
+                "GraphEditor",
                 "UMGEditor",
                 "AIGraph",
             });


make test problematic

make test problematic

--- Spa2/NakedObjects.Spa.Selenium.Test/tests/CCAtests.cs
+++ Spa2/NakedObjects.Spa.Selenium.Test/tests/CCAtests.cs
@@ -346,8 +346,7 @@
         public void CCATests() {
             ListViewWithParmDialogAlreadyOpen();
             ListViewWithParmDialogNotOpen();
-            DateParam();
-            EmptyParam();
+            DateParam();
             TestSelectAll();
             SelectAllTableView();
             SelectionRetainedWhenNavigatingAwayAndBack();
@@ -361,6 +360,7 @@
         [TestMethod]
         [Priority(-1)]
         public void ProblematicCCATests() {
+            EmptyParam();
             ZeroParamAction();
         }
     }


Add documentation for FreeFlyCamera

Add documentation for FreeFlyCamera

--- Assets/PhaseSpaceTesting/FreeFlyRiftPSRigid.cs
+++ Assets/PhaseSpaceTesting/FreeFlyRiftPSRigid.cs
@@ -1,22 +1,35 @@
-using UnityEngine;
-using System.Collections;
+
+using UnityEngine.Assertions;

-public class FreeFlyRiftPSRigid : OWLRigidController
+/// <summary>
+/// This an instance of this class
+/// </summary>
+public class FreeFlyRiftPSRigid : OWLCustomLRigidController
 {
+    public OVRCameraRig targetCamRig;
+
     public override void Start()
     {
-        OVRCameraRig rig = FindObjectOfType<OVRCameraRig>();
+        if(targetCamRig == null)
+            targetCamRig = FindObjectOfType<OVRCameraRig>();

-        rig.UpdatedAnchors += Rig_UpdatedAnchors;
+        Assert.IsNotNull(targetCamRig, "There is no OVRCameraRig Instance in the Scene.");
+
+        targetCamRig.UpdatedAnchors += Rig_UpdatedAnchors;
     }

-    private void Rig_UpdatedAnchors(OVRCameraRig obj)
+    /// <summary>
+    /// This got called after OVR Anchors got all updates from the headset sensors.
+    /// </summary>
+    /// <param name="rig"></param>
+    private void Rig_UpdatedAnchors(OVRCameraRig rig)
     {
-        obj.transform.position = prevPos;
-
+        rig.transform.position = prevPos;
     }

-    //
+    /// <summary>
+    /// Message from Unity got called before the camera gets rendered.
+    /// </summary>
     void OnPreRender()
     {
         // call right before render as well, to ensure most recent data.


catch file not found exceptions

catch file not found exceptions

--- src/Compat/Program.cs
+++ src/Compat/Program.cs
@@ -1,6 +1,7 @@
 using Mono.Cecil;
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -46,16 +47,18 @@
             // first arg is the path to the main assembly being processed
             string fileName = args[0];

-            // second arg and onwards should be paths to reference assemblies
-            // instantiate custom assembly resolver that loads reference assemblies into cache
-            // note: ONLY these assemblies will be available to the resolver
-            var customResolver = new CustomAssemblyResolver(args.Skip(1));
-
-            // load the plugin module (with the custom assembly resolver)
-            // TODO: perhaps we should load the plugin assembly then iterate through all modules
+            // load module and assembly resolver
             ModuleDefinition module;
+            CustomAssemblyResolver customResolver;
             try
             {
+                // second arg and onwards should be paths to reference assemblies
+                // instantiate custom assembly resolver that loads reference assemblies into cache
+                // note: ONLY these assemblies will be available to the resolver
+                customResolver = new CustomAssemblyResolver(args.Skip(1));
+
+                // load the plugin module (with the custom assembly resolver)
+                // TODO: perhaps we should load the plugin assembly then iterate through all modules
                 module = ModuleDefinition.ReadModule(fileName, new ReaderParameters
                 {
                     AssemblyResolver = customResolver
@@ -65,6 +68,11 @@
             {
                 logger.Error(fileName + " is not a .NET assembly");
                 return 110;
+            }
+            catch (FileNotFoundException e)
+            {
+                logger.Error("Couldn't find {0}. Are you sure it exists?", e.FileName);
+                return 111;
             }

             // extract cached reference assemblies from custom assembly resolver


Added --non-interactive and --report-path switches

* --non-interactive indicates non user input mode, i.e. won't open report after generating
* --report-path allows to specify path/name of report

--- APIComparer/Program.cs
+++ APIComparer/Program.cs
@@ -35,7 +35,10 @@
                 };
             }
             var showAllVersions = !args.Contains("--show-failed-only");
-            var noBreakingChanges = compareSets.All(set => Compare(set, showAllVersions));
+            var nonInteractive = args.Contains("--non-interactive");
+            var reportPath = GetReportPath(args);
+
+            var noBreakingChanges = compareSets.All(set => Compare(set, showAllVersions, nonInteractive, reportPath));

             if (Debugger.IsAttached)
             {
@@ -58,7 +61,7 @@
         }
     }

-    static bool Compare(CompareSet compareSet, bool showAllVersions = true)
+    static bool Compare(CompareSet compareSet, bool showAllVersions = true, bool nonInteractive = false, string reportPath = null)
     {
         var engine = new ComparerEngine();

@@ -85,7 +88,7 @@
             Console.Out.WriteLine(": No breaking changes found");
         }

-        var resultFile = Path.Combine(Path.GetTempPath(), Guid.NewGuid() + ".md");
+        var resultFile = reportPath ?? Path.Combine(Path.GetTempPath(), Guid.NewGuid() + ".md");

         using (var fileStream = File.OpenWrite(resultFile))
         using (var into = new StreamWriter(fileStream))
@@ -99,7 +102,10 @@
         }

         Console.Out.WriteLine(resultFile);
-        Process.Start(resultFile);
+        if (!nonInteractive)
+        {
+            Process.Start(resultFile);
+        }
         return !hasBreakingChange;
     }

@@ -277,4 +283,25 @@
         return feeds;
     }

+    static string GetReportPath(IEnumerable<string> args)
+    {
+        var reportPathSpecified = false;
+        var reportPath = args.SkipWhile(arg => arg != "--report-path")
+            .Where(arg=>reportPathSpecified = true)
+            .Skip(1)
+            .Take(1)
+            .FirstOrDefault(arg => !string.IsNullOrWhiteSpace(arg) && !arg.StartsWith("--"));
+
+        if (!string.IsNullOrWhiteSpace(reportPath))
+        {
+            using (File.Create(reportPath))
+            {
+            }
+        }
+        else if (reportPathSpecified)
+        {
+            throw new ApiComparerArgumentException("--report-path is specified, but no valid file path, please use --report-path {report path}");
+        }
+        return reportPath;
+    }
 }


Removed commented out left-over of refactoring

--- Src/AutoNSubstituteUnitTest/NSubstituteBuilderTest.cs
+++ Src/AutoNSubstituteUnitTest/NSubstituteBuilderTest.cs
@@ -176,8 +176,5 @@
             var expected = new NoSpecimen(request);
             Assert.Equal(expected, result);
         }
-
-        // var actual = Expression.Lambda(Expression.ConvertChecked(Expression.Constant(result), request)).Compile().DynamicInvoke();
-        // Assert.NotNull(actual);
     }
 }


lots of comments

lots of comments

--- src/Compat/Program.cs
+++ src/Compat/Program.cs
@@ -11,22 +11,28 @@
     {
         static int Main(string[] args)
         {
+            // first arg is the path to the main assembly being processed
             if (args.Length < 1)
             {
                 return 100; // not enough arguments?
             }
             string fileName = args[0];
-
-            // instantiate custom assembly resolver that loads reference assemblies
+
+            // second arg and onwards should be paths to reference assemblies
+            // instantiate custom assembly resolver that loads reference assemblies into cache
             IAssemblyResolver customResolver = new CustomAssemblyResolver(args.Skip(1));

-            // load the plugin module
+            // load the plugin module (with the custom assembly resolver)
             // TODO: perhaps we should load the plugin assembly then iterate through all modules
             ModuleDefinition module = ModuleDefinition.ReadModule(fileName, new ReaderParameters
             {
                 AssemblyResolver = customResolver
             });
-            string[] assemblyNames = (customResolver as CustomAssemblyResolver).AssemblyNames;
+
+            // extract cached reference assemblies from custom assembly resolver
+            // we'll query these later to make sure we only attempt to resolve a reference when the
+            // definition is defined in an assembly in this list
+            AssemblyDefinition[] cache = (customResolver as CustomAssemblyResolver).Assemblies;

             // print assembly name, cached assembly names and reference assembly names
             Console.WriteLine("{0}\n", module.Assembly.FullName);
@@ -47,23 +53,23 @@
             // global failure tracker
             bool failure = false;

-            // iterate over all the types
+            // iterate over all the TYPES
             foreach (TypeDefinition type in module.Types)
             {
                 Console.ForegroundColor = ConsoleColor.Magenta;
                 Console.WriteLine("CLASS\t{0}", type.FullName);
                 Console.ResetColor();

-                // iterate over all the methods that have a method body
+                // iterate over all the METHODS that have a method body
                 foreach (MethodDefinition method in type.Methods)
                 {
                     Console.ForegroundColor = ConsoleColor.Yellow;
                     Console.WriteLine("METHOD\t{0}", method.FullName);
                     Console.ResetColor();
-                    if (!method.HasBody)
+                    if (!method.HasBody) // skip if no body
                         continue;

-                    // iterate over all the instructions
+                    // iterate over all the INSTRUCTIONS
                     foreach (var instruction in method.Body.Instructions)
                     {
                         Console.WriteLine(
@@ -72,26 +78,30 @@
                             instruction.OpCode.Code,
                             instruction.Operand == null ? "<null>" : string.Format("{0} / {1}", instruction.Operand.GetType().FullName, instruction.Operand.ToString()));

-                        // get the scope
+                        // get the scope (the name of the assembly in which the operand is defined)
                         IMetadataScope scope = GetOperandScope(instruction.Operand);
                         if (scope != null)
                         {
-                            // skip if scope is not in the list of reference assemblies loaded
-                            if (!assemblyNames.Any(a => a == scope.Name))
+                            // skip if scope is not in the list of cached reference assemblies
+                            if (!cache.Any(a => a.Name.Name == scope.Name))
                             {
                                 Console.WriteLine("RESULT\tSkip ({0} is not in the list)", scope.Name);
                                 continue;
                             }
                             // try to resolve operand
+                            // this is the big question - does the field/method/class exist in one of
+                            // the cached reference assemblies
                             bool success = TryResolve(instruction.Operand);
                             if (success)
+                                // TODO: print nothing (unless debug)
                                 Console.ForegroundColor = ConsoleColor.Green;
                             else
                             {
+                                // TODO: print information about field/method/class that couldn't be resolved
                                 Console.ForegroundColor = ConsoleColor.Red;
-                                failure = true;
+                                failure = true; // set global failure (non-zero exit code)
                             }
-                            Console.WriteLine("RESULT\t{0}", success);
+                            Console.WriteLine("RESULT\t{0}", success); // print resolution status
                             Console.ResetColor();
                         }
                     }
@@ -113,6 +123,8 @@
         static IMetadataScope GetOperandScope(object operand)
         {
             IMetadataScope scope = null;
+
+            // try to cast operand to either field, method or class
             var mref = operand as MethodReference;
             if (mref != null)
             {
@@ -159,7 +171,7 @@
         {
             try
             {
-                // TODO: why am I casting again??
+                // TODO: why am I casting again?? merge with GetOperandScope perhaps?
                 var fref = operand as FieldReference;
                 if (fref != null)
                 {
@@ -179,23 +191,20 @@
                     return true;
                 }
             }
-            catch (AssemblyResolutionException e)
-            {
-                // TODO: instead of rethrowing, keep track of fields/methods/classes
-                // that couldn't be resolved and, at the end, exit with an error
-                // code and display useful information
-                //throw e;
+            catch (AssemblyResolutionException)
+            {
                 return false;
             }
-            return false;
-        }
-
+            return false; // just in case
+        }
+
+        // TODO: investigate http://stackoverflow.com/a/18080305
         /// <summary>
         /// Custom assembly resolver to load specified reference assemblies into the cache.
         /// </summary>
         class CustomAssemblyResolver : DefaultAssemblyResolver
         {
-            private List<string> _names;
+            private List<AssemblyDefinition> _cache; // store cached reference assemblies

             /// <summary>
             /// Creates a Custom Assembly Resolver and preload the cache with some reference assemblies.
@@ -204,21 +213,21 @@
             public CustomAssemblyResolver(IEnumerable<string> paths)
                 : base()
             {
-                this._names = new List<string>();
+                this._cache = new List<AssemblyDefinition>();
                 foreach (string path in paths)
                 {
                     var assembly = AssemblyDefinition.ReadAssembly(path);
                     this.RegisterAssembly(assembly);
-                    this._names.Add(assembly.Name.Name); // store names for lookup later
+                    this._cache.Add(assembly); // store assemblies for lookup later
                 }
             }

             /// <summary>
             /// Gets names of assemblies loaded into resolver cache. This array is a copy.
             /// </summary>
-            public string[] AssemblyNames
-            {
-                get { return _names.ToArray(); } // copied so I can't mess things up
+            public AssemblyDefinition[] Assemblies
+            {
+                get { return _cache.ToArray(); } // copied so things can't get messed up
             }
         }
     }


seach Rider on mac

seach Rider on mac

--- Assets/Plugins/Editor/JetBrains/RiderPlugin.cs
+++ Assets/Plugins/Editor/JetBrains/RiderPlugin.cs
@@ -20,40 +20,50 @@
     private static bool Initialized;
     private static string SlnFile;

-    private static string DefaultApp
-    {
-      get
-      {
+    private static string GetDefaultApp()
+    {
         var alreadySetPath = EditorPrefs.GetString("kScriptsDefaultApp");
         if (!string.IsNullOrEmpty(alreadySetPath) && alreadySetPath.ToLower().Contains("rider") &&
             RiderPathExist(alreadySetPath))
           return alreadySetPath;

-        switch (new FileInfo(alreadySetPath).Extension)
-        {
-          case ".lnk":
-          case ".exe":
+        switch (SystemInfo.operatingSystemFamily)
+        {
+          case OperatingSystemFamily.Windows:
             //"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\JetBrains\*Rider*.lnk"
             //%appdata%\Microsoft\Windows\Start Menu\Programs\JetBrains Toolbox\*Rider*.lnk

             var f1 = new DirectoryInfo(@"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\JetBrains").GetFiles("*Rider*.lnk");
             var f2 = new DirectoryInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
               @"Microsoft\Windows\Start Menu\Programs\JetBrains Toolbox")).GetFiles("*Rider*.lnk");
-            var newPathLnk = f1.ToArray().Concat(f2).OrderBy(a => a.LastWriteTime).LastOrDefault();
-            if (newPathLnk != null)
+            var newPathLnks = f1.ToArray().Concat(f2);
+            if (newPathLnks.Any())
             {
-              var newPath = ShortcutResolver.Resolve(newPathLnk.FullName);
-              if (EnableLogging) Debug.Log("[Rider] " + string.Format("Update {0} to {1}", alreadySetPath, newPath));
-              if (!string.IsNullOrEmpty(newPath))
-                EditorPrefs.SetString("kScriptsDefaultApp", newPath);
+              var newPath = newPathLnks.Select(newPathLnk=> new FileInfo(ShortcutResolver.Resolve(newPathLnk.FullName))).OrderBy(a => FileVersionInfo.GetVersionInfo(a.FullName).FileVersion).LastOrDefault();
+              if (!string.IsNullOrEmpty(newPath.FullName))
+              {
+                if (EnableLogging) Debug.Log("[Rider] " + string.Format("Update {0} to {1}", alreadySetPath, newPath));
+                EditorPrefs.SetString("kScriptsDefaultApp", newPath.FullName);
+              }
             }
             break;

-          case ".app":
+          case OperatingSystemFamily.MacOSX:
             // "/Applications/*Rider*.app"
             //"~/Applications/JetBrains Toolbox/*Rider*.app"
+
+            var dir = new DirectoryInfo("/Applications").GetDirectories("*Rider*.app").ToArray();
+            var toolboxDir = new DirectoryInfo(Path.Combine(Environment.SpecialFolder.MyDocuments.ToString(), "Applications")).GetDirectories("*Rider*.app").ToArray();
+            var newPathMac = dir.Concat(toolboxDir).OrderBy(a => a.LastWriteTime).LastOrDefault();
+            if (newPathMac != null)
+            {
+              if (!string.IsNullOrEmpty(newPathMac.FullName))
+              {
+                if (EnableLogging) Debug.Log("[Rider] " + string.Format("Update {0} to {1}", alreadySetPath, newPathMac));
+                EditorPrefs.SetString("kScriptsDefaultApp", newPathMac.FullName);
+              }
+            }
             break;
-
         }

         var riderPath = EditorPrefs.GetString("kScriptsDefaultApp");
@@ -65,7 +75,6 @@
         }

         return riderPath;
-      }
     }

     public static bool TargetFrameworkVersion45
@@ -189,7 +198,7 @@
         {
           SyncSolution(); // added to handle opening file, which was just recently created.
           var assetFilePath = Path.Combine(appPath, AssetDatabase.GetAssetPath(selected));
-          if (!DetectPortAndOpenFile(line, assetFilePath, new FileInfo(DefaultApp).Extension == ".exe"))
+          if (!DetectPortAndOpenFile(line, assetFilePath, new FileInfo(GetDefaultApp()).Extension == ".exe"))
           {
             var args = string.Format("{0}{1}{0} --line {2} {0}{3}{0}", "\"", SlnFile, line, assetFilePath);
             return CallRider(args);
@@ -249,7 +258,7 @@
       if (EnableLogging) Debug.Log("[Rider] " + string.Format("HttpRequestOpenFile({0})", uri.AbsoluteUri));

       CallHttpApi(uri, client);
-      ActivateWindow(new FileInfo(DefaultApp).FullName);
+      ActivateWindow(new FileInfo(GetDefaultApp()).FullName);
       return true;
     }

@@ -262,7 +271,7 @@

     private static bool CallRider(string args)
     {
-      var riderFileInfo = new FileInfo(DefaultApp);
+      var riderFileInfo = new FileInfo(GetDefaultApp());
       var macOSVersion = riderFileInfo.Extension == ".app";
       if (!RiderPathExist(riderFileInfo.FullName))
       {
@@ -273,12 +282,12 @@
       if (macOSVersion)
       {
         proc.StartInfo.FileName = "open";
-        proc.StartInfo.Arguments = string.Format("-n {0}{1}{0} --args {2}", "\"", "/" + DefaultApp, args);
+        proc.StartInfo.Arguments = string.Format("-n {0}{1}{0} --args {2}", "\"", "/" + GetDefaultApp(), args);
         if (EnableLogging) Debug.Log("[Rider] " + proc.StartInfo.FileName + " " + proc.StartInfo.Arguments);
       }
       else
       {
-        proc.StartInfo.FileName = DefaultApp;
+        proc.StartInfo.FileName = GetDefaultApp();
         proc.StartInfo.Arguments = args;
         if (EnableLogging)
           Debug.Log("[Rider] " + ("\"" + proc.StartInfo.FileName + "\"" + " " + proc.StartInfo.Arguments));
@@ -290,7 +299,7 @@
       proc.StartInfo.RedirectStandardOutput = true;
       proc.Start();

-      ActivateWindow(DefaultApp);
+      ActivateWindow(GetDefaultApp());
       return true;
     }


Correção no resource. #20000006-1004 #143

--- Src/GestaoEscolar/Academico/Sondagem/Cadastro.aspx.cs
+++ Src/GestaoEscolar/Academico/Sondagem/Cadastro.aspx.cs
@@ -391,8 +391,8 @@
                     txtItem.Focus();
                 updPopUp.Update();

-                btnAdicionar.Text = VS_sdq_id > 0 || VS_sdr_id > 0 ? GetGlobalResourceObject("Academico", "Sondagem.Cadastro.bntAdicionar.Text").ToString() :
-                                    GetGlobalResourceObject("Academico", "Sondagem.Cadastro.bntAlterar.Text").ToString();
+                btnAdicionar.Text = VS_sdq_id > 0 || VS_sdr_id > 0 ? GetGlobalResourceObject("Academico", "Sondagem.Cadastro.bntAlterar.Text").ToString() :
+                                    GetGlobalResourceObject("Academico", "Sondagem.Cadastro.bntAdicionar.Text").ToString();

                 ScriptManager.RegisterStartupScript(Page, typeof(Page), "EditarAulas", "$('#divInserir').dialog('open');", true);
             }


Looking for page buffer release problem

Looking for page buffer release problem

--- LiteDB/Engine/Services/SnapShot.cs
+++ LiteDB/Engine/Services/SnapShot.cs
@@ -328,10 +328,11 @@
             ENSURE(page.PrevPageID == uint.MaxValue && page.NextPageID == uint.MaxValue, "before delete a page, no linked list with any another page");

             // update localPage to new Empty Page
-            _localPages[page.PageID] =
-                new BasePage(page.GetBuffer(false), page.PageID, PageType.Empty);
+            page = new BasePage(page.GetBuffer(false), page.PageID, PageType.Empty);

             page.IsDirty = true;
+
+            _localPages[page.PageID] = page;

             _transPages.DeletedPages++;
         }


[Core] Issue #58. ModuleCreationException documentation

--- Bam.Core/Exceptions/ModuleCreationException.cs
+++ Bam.Core/Exceptions/ModuleCreationException.cs
@@ -29,9 +29,17 @@
 #endregion // License
 namespace Bam.Core
 {
+    /// <summary>
+    /// Specified exception class to throw when modules fail to create.
+    /// </summary>
     public class ModuleCreationException :
         Exception
     {
+        /// <summary>
+        /// Constructs a new exception instance.
+        /// </summary>
+        /// <param name="moduleType">Type of module that failed to be created.</param>
+        /// <param name="exception">Exception that had been thrown, usually deep in the package scripts, causing the failure.</param>
         public ModuleCreationException(
             System.Type moduleType,
             System.Exception exception) :
@@ -40,6 +48,10 @@
             this.ModuleType = moduleType;
         }

+        /// <summary>
+        /// Gets the type of the module that failed to be created.
+        /// </summary>
+        /// <value>The type of the module.</value>
         public System.Type ModuleType
         {
             get;


Disable order log tracing when backtesting

These logging instructions were only meant to be executed in live mode.

--- Brokerages/Backtesting/BacktestingBrokerage.cs
+++ Brokerages/Backtesting/BacktestingBrokerage.cs
@@ -126,7 +126,10 @@
         /// <returns>True if the request for a new order has been placed, false otherwise</returns>
         public override bool PlaceOrder(Order order)
         {
-            Log.Trace("BacktestingBrokerage.PlaceOrder(): Type: " + order.Type + " Symbol: " + order.Symbol.Value + " Quantity: " + order.Quantity);
+            if (Algorithm.LiveMode)
+            {
+                Log.Trace("BacktestingBrokerage.PlaceOrder(): Type: " + order.Type + " Symbol: " + order.Symbol.Value + " Quantity: " + order.Quantity);
+            }

             if (order.Status == OrderStatus.New)
             {
@@ -156,7 +159,10 @@
         /// <returns>True if the request was made for the order to be updated, false otherwise</returns>
         public override bool UpdateOrder(Order order)
         {
-            Log.Trace("BacktestingBrokerage.UpdateOrder(): Symbol: " + order.Symbol.Value + " Quantity: " + order.Quantity + " Status: " + order.Status);
+            if (Algorithm.LiveMode)
+            {
+                Log.Trace("BacktestingBrokerage.UpdateOrder(): Symbol: " + order.Symbol.Value + " Quantity: " + order.Quantity + " Status: " + order.Status);
+            }

             lock (_needsScanLock)
             {
@@ -189,7 +195,10 @@
         /// <returns>True if the request was made for the order to be canceled, false otherwise</returns>
         public override bool CancelOrder(Order order)
         {
-            Log.Trace("BacktestingBrokerage.CancelOrder(): Symbol: " + order.Symbol.Value + " Quantity: " + order.Quantity);
+            if (Algorithm.LiveMode)
+            {
+                Log.Trace("BacktestingBrokerage.CancelOrder(): Symbol: " + order.Symbol.Value + " Quantity: " + order.Quantity);
+            }

             lock (_needsScanLock)
             {


added enable extension

added enable extension

--- Strathweb.TypedRouting/HttpConfigurationExtensions.cs
+++ Strathweb.TypedRouting/HttpConfigurationExtensions.cs
@@ -26,5 +26,10 @@

             return route;
         }
+
+        public static void EnableTypedDirectRouteProvider(this HttpConfiguration config)
+        {
+            config.MapHttpAttributeRoutes(new TypedDirectRouteProvider());
+        }
     }
 }


Fixed problem with labels

Fixed problem with labels

--- TFG.Droid/Fragments/Sintrom/SintromResultsFragment.cs
+++ TFG.Droid/Fragments/Sintrom/SintromResultsFragment.cs
@@ -83,7 +83,10 @@
             var inrItems = DBHelper.Instance.GetSintromINRItems();

             for(var i = 0; i < inrItems.Count; i++) {
-                entries[new BarEntry(i, (float) inrItems.ElementAt(i).INR)] = inrItems.ElementAt(i).Date.ToString("dd MMM");
+                if (inrItems[i].INR != 0) {
+                    entries[new BarEntry(i, (float) inrItems.ElementAt(i).INR)] =
+                        inrItems.ElementAt(i).Date.ToString("dd MMM");
+                }
             }

             return entries;
@@ -107,7 +110,11 @@
         }

         public override string GetFormattedValue(float value, AxisBase axis) {
-            return _labels[(int) value];
+            if (value.Equals((int) value) && (int) value < _labels.Length) {
+                return _labels[(int) value];
+            }
+
+            return "";
         }

     }


ToBitmapStream compile fix

ToBitmapStream compile fix

--- Tests/Mapsui.Rendering.Xaml.Tests/MapRendererTests.cs
+++ Tests/Mapsui.Rendering.Xaml.Tests/MapRendererTests.cs
@@ -229,7 +229,7 @@
         {
             var canvas = new Canvas();
             MapRenderer.RenderLayer(canvas, viewport, layer);
-            return Xaml.Utilities.ToBitmapStream(canvas, viewport.Width, viewport.Height);
+            return BitmapRendering.BitmapConverter.ToBitmapStream(canvas, viewport.Width, viewport.Height);
         }
 #endif


Added another test for UserActivityOverPeriod

--- TimeTracker.Core.Tests/UserActivityOverPeriodTests.cs
+++ TimeTracker.Core.Tests/UserActivityOverPeriodTests.cs
@@ -105,5 +105,39 @@
             userActivity.IsActiveSegment.Should().BeFalse("because we added 4 inactive samples and 4 unique samples");
             userActivity.PrimaryActivityInSegment.Should().BeNull("because this isn't an active segment");
         }
+
+        [TestMethod]
+        public void UserActivityOverPeriod_SampleTotalsAddUpAndMatchCorrectly()
+        {
+            userActivity.AddInactiveSample();
+            userActivity.AddInactiveSample();
+            userActivity.AddInactiveSample();
+
+            userActivity.AddActiveSample(testActivity1);
+            userActivity.AddActiveSample(testActivity1);
+            userActivity.AddActiveSample(testActivity2);
+
+            userActivity.AddActiveSample(testActivity4);
+
+            userActivity.TotalSecondsInSegment.Should().Be(7, "because 7 samples have been added");
+            foreach (var sample in userActivity.Samples)
+            {
+                if (sample.WasActive)
+                {
+                    if (sample.Details.IsEqualishTo(testActivity1))
+                    {
+                        sample.Seconds.Should().Be(3, "because we added 2 other samples equalish to testActivity1");
+                    }
+                    else if (sample.Details.IsEqualishTo(testActivity4))
+                    {
+                        sample.Seconds.Should().Be(1, "because we only added 1 sample like testActivity4");
+                    }
+                }
+                else
+                {
+                    sample.Seconds.Should().Be(3, "because we added 3 inactive samples");
+                }
+            }
+        }
     }
 }


increase version number

increase version number

--- yafsrc/YAF.Utils/BoardInfo.cs
+++ yafsrc/YAF.Utils/BoardInfo.cs
@@ -29,6 +29,7 @@
     using System.Linq;
     using System.Text;
     using System.Web;
+
     using YAF.Configuration;
     using YAF.Types;
     using YAF.Types.Constants;
@@ -87,7 +88,7 @@
         /// <summary>
         /// Gets the Current YAF Database Version
         /// </summary>
-        public static int AppVersion => 74;
+        public static int AppVersion => 75;

         /// <summary>
         /// Gets the Current YAF Application Version
@@ -105,14 +106,14 @@
                 const byte ReleaseNumber = 0;

                 var list = new List<int>
-                                      {
-                                          Major,
-                                          Minor,
-                                          Build,
-                                          Sub,
-                                          ReleaseType.ToType<int>(),
-                                          ReleaseNumber
-                                      };
+                               {
+                                   Major,
+                                   Minor,
+                                   Build,
+                                   Sub,
+                                   ReleaseType.ToType<int>(),
+                                   ReleaseNumber
+                               };

                 return list.SelectMany(BitConverter.GetBytes).ToArray();
             }
@@ -150,15 +151,9 @@

             versionString.AppendFormat("{0}.{1}{2}", version.Major, version.Minor, version.Build);

-            if (version.Sub > 0)
-            {
-                versionString.AppendFormat(".{0}", version.Sub);
-            }
-
-            if (version.ReleaseType == ReleaseType.Regular)
-            {
-                return versionString.ToString();
-            }
+            if (version.Sub > 0) versionString.AppendFormat(".{0}", version.Sub);
+
+            if (version.ReleaseType == ReleaseType.Regular) return versionString.ToString();

             var number = version.ReleaseNumber >= 1
                              ? version.ReleaseNumber.ToString()


implemented GLNK archives.

implemented GLNK archives.

--- ArcFormats/ArcMiris.cs
+++ ArcFormats/ArcMiris.cs
@@ -85,4 +85,51 @@
             return new ArcFile (file, this, dir);
         }
     }
+
+    [Export(typeof(ArchiveFormat))]
+    public class GlnkOpener : ArchiveFormat
+    {
+        public override string         Tag { get { return "GLNK/MIRIS"; } }
+        public override string Description { get { return "Studio Miris resource archive"; } }
+        public override uint     Signature { get { return 0x4B4E4C47; } } // 'GLNK'
+        public override bool  IsHierarchic { get { return false; } }
+        public override bool     CanCreate { get { return false; } }
+
+        public GlnkOpener ()
+        {
+            Extensions = new string[] { "dat" };
+        }
+
+        public override ArcFile TryOpen (ArcView file)
+        {
+            int version = file.View.ReadUInt16 (4);
+            int count = file.View.ReadInt32 (6);
+            if (!IsSaneCount (count))
+                return null;
+            long index_offset = file.View.ReadUInt32 (0xA);
+            int index_length = file.View.ReadInt32 (0xE);
+            if (index_length > file.View.Reserve (index_offset, (uint)index_length))
+                return null;
+            int entry_size = version >= 0x6E ? 12 : 8;
+
+            var dir = new List<Entry> (count);
+            for (int i = 0; i < count; ++i)
+            {
+                if (index_length <= 0)
+                    return null;
+                int name_length = file.View.ReadByte (index_offset++);
+                string name = file.View.ReadString (index_offset, (uint)name_length);
+                index_offset += name_length;
+                var entry = FormatCatalog.Instance.Create<Entry> (name);
+                entry.Offset = file.View.ReadUInt32 (index_offset);
+                entry.Size = file.View.ReadUInt32 (index_offset+4);
+                if (!entry.CheckPlacement (file.MaxOffset))
+                    return null;
+                dir.Add (entry);
+                index_offset += entry_size;
+                index_length -= 1+name_length + entry_size;
+            }
+            return new ArcFile (file, this, dir);
+        }
+    }
 }


Life bar

Life bar

--- Assets/Scripts/Turn.cs
+++ Assets/Scripts/Turn.cs
@@ -1,5 +1,10 @@
 using UnityEngine;
 using System.Collections;
+
+public enum State{
+	life,maturity
+}
+

 public class Turn : MonoBehaviour
 {
@@ -7,23 +12,37 @@
 	float mfY;
 	float mfZ;
 	float OriScale100Pourcent;
-	public GameObject tree;
+	public GameObject tree;
+	public State bar_type;
 	// Use this for initialization
 	void Start ()
-	{
-
-		OriScale100Pourcent = transform.localScale.x;
-		mfX = transform.position.x - transform.localScale.x/2.0f;
-		mfY = transform.position.y ;
-		mfZ = transform.position.z;
+	{
+		if (bar_type == State.maturity) {
+			OriScale100Pourcent = transform.localScale.x;
+			mfX = transform.position.x - transform.localScale.x / 2.0f;
+			mfY = transform.position.y;
+			mfZ = transform.position.z;
+		} else if (bar_type == State.life) {
+			OriScale100Pourcent = transform.localScale.x;
+			mfX = transform.position.x + transform.localScale.x / 2.0f;
+			mfY = transform.position.y;
+			mfZ = transform.position.z;
+		}
 	}

 	     // Update is called once per frame
 	void Update ()
 	{
-		 //tree.GetComponent<Tree>().total_maturity
-		Vector3 v3Scale =new Vector3 (tree.GetComponent<Tree>().total_maturity*OriScale100Pourcent/100,transform.localScale.y,transform.localScale.z);
-		transform.localScale = new Vector3(v3Scale.x + Time.deltaTime , v3Scale.y , v3Scale.z);
-		transform.position = new Vector3(mfX + transform.localScale.x / 2.0f, mfY, mfZ);
-	}
+		if (bar_type == State.maturity) {
+			//tree.GetComponent<Tree>().total_maturity
+			Vector3 v3Scale = new Vector3 (tree.GetComponent<Tree> ().total_maturity * OriScale100Pourcent / 100, transform.localScale.y, transform.localScale.z);
+			transform.localScale = new Vector3 (v3Scale.x + Time.deltaTime, v3Scale.y, v3Scale.z);
+			transform.position = new Vector3 (mfX + transform.localScale.x / 2.0f, mfY, mfZ);
+		} else if (bar_type == State.life) {
+			Debug.Log(tree.GetComponent<Tree> ().Tree_life);
+			Vector3 v3Scale = new Vector3 (tree.GetComponent<Tree> ().Tree_life * OriScale100Pourcent / 100, transform.localScale.y, transform.localScale.z);
+			transform.localScale = new Vector3 (v3Scale.x - Time.deltaTime, v3Scale.y, v3Scale.z);
+			transform.position = new Vector3 (mfX - transform.localScale.x / 2.0f, mfY, mfZ);
+		}
+	}
 }


Update EscapeShuttle.cs

Update EscapeShuttle.cs

Fixes NRE

--- UnityProject/Assets/Scripts/Shuttles/EscapeShuttle.cs
+++ UnityProject/Assets/Scripts/Shuttles/EscapeShuttle.cs
@@ -49,8 +49,6 @@
 			StationDest = new Destination { Orientation = Orientation.Right, Position = new Vector2(49, 6), ApproachReversed = true };
 		}

-		centComm = gameManager.GetComponent<CentComm>();
-
 		AlertLevelInitialTimerSeconds = InitialTimerSeconds;
 		AlertLevelTooLateToRecallSeconds = TooLateToRecallSeconds;

@@ -152,10 +150,6 @@
 	/// Thrusters are removed from this when destroyed
 	/// </summary>
 	private List<ShipThruster> thrusters = new List<ShipThruster>();
-
-	public GameManager gameManager;
-
-	private CentComm centComm;

 	private int AlertLevelInitialTimerSeconds;
 	private int AlertLevelTooLateToRecallSeconds;
@@ -328,7 +322,7 @@
 			return false;
 		}

-		var Alert = centComm.CurrentAlertLevel;
+		var Alert = GameManager.Instance.CentComm.CurrentAlertLevel;

 		//Changes EscapeShuttle time depending on Alert Level


sample of how to include an image/file

sample of how to include an image/file

might not want to keep them in db, but fine for now

--- Badges.Core/Profile.cs
+++ Badges.Core/Profile.cs
@@ -7,6 +7,7 @@
         public virtual string FirstName { get; set; }
         public virtual string LastName { get; set; }
         public virtual string LoginId { get; set; }
+        public virtual byte[] Image { get; set; }
     }

     public class ProfileMap : ClassMap<Profile>
@@ -18,6 +19,7 @@
             Map(x => x.FirstName);
             Map(x => x.LastName);
             Map(x => x.LoginId);
+            Map(x => x.Image).CustomType("BinaryBlob");
         }
     }
 }


Handle resolving of retargeteable references

--- Mono.Cecil/BaseAssemblyResolver.cs
+++ Mono.Cecil/BaseAssemblyResolver.cs
@@ -150,6 +150,13 @@
 				return assembly;

 #if !SILVERLIGHT && !CF
+			if (name.IsRetargetable) {
+				// if the reference is retargetable, zero it
+				name = new AssemblyNameReference (name.Name, new Version (0, 0, 0, 0)) {
+					PublicKeyToken = Empty<byte>.Array,
+				};
+			}
+
 			var framework_dir = Path.GetDirectoryName (typeof (object).Module.FullyQualifiedName);

 			if (IsZero (name.Version)) {


Refactoring

Refactoring

--- MusicXml.Unit.Tests/XScoreTests.cs
+++ MusicXml.Unit.Tests/XScoreTests.cs
@@ -15,11 +15,11 @@

 			var score = new XScore("TestData/MusicXmlWithStaffValues.xml");

-			var firstPart = score.Parts[knownPartWithStaffTags];
-			var fifthMeasure = firstPart.Measures[knownMeasureWithStaffTags];
-			var firstNote = fifthMeasure.Notes[firstNoteIndex];
+			var part = score.Parts[knownPartWithStaffTags];
+			var measure = part.Measures[knownMeasureWithStaffTags];
+			var note = measure.Notes[firstNoteIndex];

-			Assert.That(firstNote.Staff, Is.EqualTo(knownStaffValue));
+			Assert.That(note.Staff, Is.EqualTo(knownStaffValue));
 		}
     }
 }


update

update

--- CSharpGL4/Scene/SceneNodes/Lights/LightBase.cs
+++ CSharpGL4/Scene/SceneNodes/Lights/LightBase.cs
@@ -21,7 +21,7 @@
         public vec3 Position { get; set; }

         private readonly IFramebufferProvider framebufferProvider = new DepthFramebufferProvider();
-        private readonly PolygonOffsetFillState state = new PolygonOffsetFillState(false);
+        private readonly PolygonOffsetFillState state = new PolygonOffsetFillState(false);// TODO: other offset also needed?
         private readonly int[] viewport = new int[4];

         /// <summary>


Appended comment.

Appended comment.

--- MyDotNetHelpers/MyBindingHelper.cs
+++ MyDotNetHelpers/MyBindingHelper.cs
@@ -101,7 +101,7 @@
 		/// <param name="parameter"></param>
 		public void Execute(object parameter)
 		{
-			var handler = ExecuteHandler;
+			var handler = this.ExecuteHandler;
 			if (handler != null)
 			{
 				handler(parameter);
@@ -115,13 +115,14 @@
 		/// <returns></returns>
 		public bool CanExecute(object parameter)
 		{
-			var handler = CanExecuteHandler;
+			var handler = this.CanExecuteHandler;
 			if (handler != null)
 			{
 				return handler(parameter);
 			}
 			else
 			{
+				// デリゲートがひとつも割り当てられていない場合は、既定で有効とする。
 				return true;
 			}
 		}
@@ -131,7 +132,7 @@
 		/// </summary>
 		public void RaiseCanExecuteChanged()
 		{
-			CanExecuteChanged(this, null);
+			this.CanExecuteChanged(this, null);
 		}
 	}