- v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
- Use this page to report any issues related to the migration.
Utility Talk:Tweak/Development
K, I got it to work, I did have to redo the reference to the DLL. The reveal example worked too, once I referenced Windows.Forms. Looks like a pretty nice setup, I applaud! :) --Corc 04:00, 10 May 2008 (EDT)
module variables with forms
I'm mostly self taught so I most likely have bad habits in coding, so bare with me :)
I'd like to make a little form with options on it and then run code when certain buttons are clicked. I've got the form added to the project and couldn't quite figure out how to get a function from the Module class as an event for a button click without making the button public (in the form class) and adding it manually (in the module class) after I made a new instance of the form in the module run function. I also, wanted to store the memory/version/mode/etc arguments passed to the run function so I could later use them in other functions that would be called from the form according to options selected in that form. I tried to add private storage variables inside the class itself, but I don't know the constructors for the types to make a valid copy (after run finishes the private variables don't work).
Can only one module be used at a time, or is it possible to spawn a module and have it be an "info box" while other modules are free to be "run"? That's kinda what I'm getting at, I'd like to keep the connection to the memory/version/modulemode/etc stuff while the main program is running but not hog up the program.
Unfortunately, this is me learning C# at the same time as learning windows gui stuff. I've tried a little google searching and came up with mostly web development--so any links to useful examples/tutorials/refs would be awesome. As soon as I get to the bookstore, I'll see how the pricing on books for C# are :)--Corc 18:39, 12 May 2008 (EDT)
- Currently Tweak is not designed for having multiple modules running at once, since most of them currently suspend the game while it does its work to prevent conflicts. As for your form issues -- instantiate your main form in the Run function, and use form.ShowDialog() (something like that), this is how I do it. —Rick 04:30, 13 May 2008 (EDT)