I must learn how to do this kind of stuff one day. Amazing to think that there are people who are 10 years younger than me who can do this stuff with their eyes shut practically.
It's like learning different type of english. Well also you need some logical thinking, but as I can see you have passed 5th grade some long time ago, and so I believe it wouldn't be a hard thing to do.. but who knows. Good luck
Anyway to create a insim button when pressing a form button then you would need the UCID of the user you want it to be sent to. But if you want it for everyone then as you know you can just use 255.
InSim doesnt have to be static if its declared in MainForm (Form1?)
vane, if U want to send button to just one connection, then i suppose U need some control containing all players. ListBox maybe?
ListBox.Items is typeof ObjectCollection, so U can make custom item class:
public class ListBoxItem { private string _name; private ushort _id;
thank you for the large amounts of code, but this is only mean to be a client side insim, creating buttons only on the client's lfs, not meant to be run on a server or anything. I have tried setting the UCID to 0 and 1 but that didnt work, i will try 255.
UCID = 0 -> Host
UCID = 1 -> 1st player that has connected after the start of the server(not 100% sure if that's true)
Maybe if you give us some more information of what you are trying to do we may be able to help you out.
well basically i am trying to find out how to make the insim buttons from say a timer ticking or a form button press. I am attempting to make an interface which is controlled by the scroll wheel on the DFGT steering wheel, and the insim part is so you can control features while in game, so effectively the insim isn't doing much more than just displaying buttons
Oh now I see what you mean by client-side insim. Well... In this case if you aren't the host there should be no problem in using 255 as UCID. I am not familiar with client-side insims tho so I can't say for sure.
I have tried changing the BTN.UCID to 255 but it still did not make the button appear when the form button was pressed.
I have succesfully coded the part that interfaces with the controller and all the ancillary systems such as saving the data into an xml file to be loaded next time the program is loaded
handle NCN_Received event, struct IS_NCN has field Flags, bit 2 tells U if its local or remote connection. if its local, store UCID in some global variable, then use it for button send
but 255 should work, are U sure rest of code is proper?
sure, of course Your program must know address, port and admin password
edit:
sorry, didnt get Ya, thought U asked for using insim with remote dedi server
Sorry, not been following this thread, but if you are connecting to a local client, then you need to set the flag ISF_LOCAL in the IS_ISI packet, otherwise the buttons will clash with those sent by a host.
I'm having some trouble getting OutGauge to work with LFS_External. I have it set to listen on port 30001 and my LFS config is as follows:
OutGauge Mode 2 OutGauge Delay 10 OutGauge IP 127.0.0.1 OutGauge Port 30001 OutGauge ID 0
Even the OutGauge sample application does nothing, the RPM and Pitch fields remain blank. If I look at netstat output in a terminal, it shows a service listening on UDP port 30001, so I know it's listening, it just never seems to call the event handler.
i'm working on a c# project. is it possible to move the LFS_External.dll file into my app's resources and makes calls to it from within my program? (to save on having to distribute the dll separately)
Someone can correct me if I'm wrong, but I don't think it's possible to do this. You can add a DLL to your main assembly as an embedded resource, but if you use that DLL as a reference then I believe it needs to be separate.
That said there is a tool called ILMerge which can merge multiple assemblies into one, but I've never personally used it and don't know if it would work for your intentions.