2012年10月26日 星期五

FileTracker:error FTK1011

Ref: http://www.dotblogs.com.tw/ricochen/archive/2010/06/15/15889.aspx

1. Download 3DTools souce code.
2. System: Mac Pro: VM : Windows 7 x64
    Tools: VS 2010
3. Open demo project with FileTracker error.
4. Solve problem by changing compiler from .net framework 3.0 to 4.0 as described in ref.

2012年10月23日 星期二

xbox controller test 2 (C#)

0-1 Hardware : ASUS A43S
0-2 OS: Windows 7 (x64)
0-3 Tools: VS 2010 (x86)
       - 1. XBox Controller Driver
              http://www.microsoft.com/hardware/en-us/d/xbox-360-wireless-controller-for-windows
       - 2. SlimDX x86 Runtime
              http://slimdx.org/download.php
1. using SlimDX.DLL (Downloadable)
2. Employ controls.cs from the example of the previous program.
3. using Xbox360Controller;
4. In the class of forms,

       GamepadState controls;
        Timer t1 = new Timer();
        private void Form1_Load(object sender, EventArgs e)
        {
            controls = new GamepadState(0);
            t1.Interval = 100;
            t1.Tick += new EventHandler(t1_Tick);
            t1.Start();
        }

        int i = 0;
        void t1_Tick(object sender, EventArgs e)
        {
            controls.Update();
            //this.Text = controls.LeftStick.Position.X.ToString() + ","
            //    + controls.LeftStick.Position.Y.ToString();
            //this.Text += (i++).ToString();
            if (controls.LeftStick.Position.X > 0.5) button1.Location = new Point(button1.Location.X + 10, button1.Location.Y);
            if (controls.LeftStick.Position.X < -0.5) button1.Location = new Point(button1.Location.X - 10, button1.Location.Y);
            if (controls.LeftStick.Position.Y > 0.5) button1.Location = new Point(button1.Location.X, button1.Location.Y-10);
            if (controls.LeftStick.Position.Y < -0.5) button1.Location = new Point(button1.Location.X, button1.Location.Y+10);
        }
5. All of the switches in the xbox controller can be read by a timer base event method();
6. Examples

XBOX360Controller Test

ref : http://visualcsharp.webs.com/projectdownloads.htm

1. Hardware: ASUS A43S, Microsoft wireless xbox controller
2. OS: Windows 8 (x64)
3. Tools: VS 2010(x86)

Download SlimDX (.NET4.0, x86) ** Notes x64 won't work.
http://slimdx.org/download.php