/* * Test .NET bindings test program * Copyright (c) 2006 Jean-Yves Lamoureux * All Rights Reserved * * $Id$ * * This program is free software. It comes without any warranty, to * the extent permitted by applicable law. You can redistribute it * and/or modify it under the terms of the Do What The Fuck You Want * To Public License, Version 2, as published by Sam Hocevar. See * http://sam.zoy.org/wtfpl/COPYING for more details. */ using System; using libCucul; using libCaca; class Test { public static void Main() { int barCount = 6; Console.WriteLine("libcaca .NET test"); Console.WriteLine("(c) 2006 Jean-Yves Lamoureux "); /* Instanciate a cucul canvas */ Cucul qq = new Cucul(); /* Random number. This is a static method, not to be used with previous instance */ Console.WriteLine("A random number : {0}", Cucul.Rand(0, 1337)); /* We have a proper canvas, let's display it using Caca */ Caca kk = new Caca(qq); kk.setDisplayTime(20000); // Refresh every 20 ms kk.setDisplayTitle("libcaca .NET Bindings test suite"); double v; Int32 y = 0; Event e = new Event(); Int32 i; DateTime startTime = DateTime.Now; while(kk.getEvent(Event.type.KEY_RELEASE, e, 10) == 0) { TimeSpan curTime = DateTime.Now - startTime; double t = curTime.TotalMilliseconds; qq.setColor(Cucul.CUCUL_WHITE, Cucul.CUCUL_BLACK); for(i=0; i