August 8, 200718 yr I would like to know if somebody has the C# version of some C++ samples of SimConnect SDK. I got to translate some samples to C#, but the Throttle Control is more complex to me...The tutorials of NotASenator where very important to understand a lot of concepts related to the C# interface of SimConnect. It seems the next one (Part 5) will deal with some details of Throttle Control C++ example.RegardsRodrigo
August 13, 200718 yr I've been tinkering a little bit with SimConnect in C#, so I decided to take up this example.I had to get a little creative with some SimConnect calls because in C# you have to use all method parameters, whereas in C++ you can omit them and use the default parameter values.The C++ example maps event IDs to the down keypress events, and by omitting parameters, ignores the up keypress events. But, I couldn't do that, so I had to create another key event to map the up-key events. This is explained a little bit in the commentary in my code.The C++ example uses the A and Z keys to control the throttle, but I used the Q and Z keys instead. This is because the A key was also changing the current view, which made testing a bit difficult.I hope that my example is helpful to you. You may need to respecify the location of the SimConnect Reference in the Visual Studio IDE.Good luck!Johnhttp://forums.avsim.net/user_files/176646.zip
August 13, 200718 yr Thank you, John! It was very useful. If you have other sample codes, please share them.RegardsRodrigo
August 16, 200718 yr Thanks a lot for this. Is it just me, or is finding C# examples for simconnect difficult? Is there a place specfically for C# simconnect examples? If not, this or one like it would be helpful to a lot of users. Besides us few, is there any interest in sharing C# examples? Reply if so, we can all help each other out.Kranky
Create an account or sign in to comment