Search results for query: *

  1. R

    Converting C to C#, handling lack of local static vars

    I can't find a c# version of libastro so I guess I have to convert it myself. It doesn't look all that hard though it does use static locals a lot which c# doesn't support. I figure I'll have to use class static vars and rename them so different methods don't mess with other methods using the...
  2. R

    How to do non-blocking TCP comms?

    Very interesting. I used VB for years and even learned a bit of VB.net so I'll have a good look - thanks!
  3. R

    How to do non-blocking TCP comms?

    Isn't this still unavailable in the main thread since the methods/vars are all static?
  4. R

    How to do non-blocking TCP comms?

    I'm playing with async TCP to communicate between two applications. I'm having a heck of a time trying to figure out how actually be able to use TCP messages. Using an async callback I can receive messages but since the method is static I can't access it or call non static methods from it - so...
  5. R

    Translations from XML files rather than baked into resx files?

    I didn't realize each resx file was compiled into a separate dll, I thought they were rolled into the program binary. Well that solves that problem. Now I just have to figure out how to get inno installer to include them. Should be pretty simple. thanks!
  6. R

    Translations from XML files rather than baked into resx files?

    Just started getting into adding different languages for an app, just en-US and fr-CA so far but I'm already realizing that I really want the words/phrases in a text file so changes and corrections can be made without having to re-compile. Should I just dump the Globalization string handling and...
  7. R

    Char* and [MarshalAs(UnmanagedType.LPStr)]

    Ok, thanks for the clarification. Just looking for shortcuts.
  8. R

    Adding namespace/classes to an existing namespace

    Ooh, I do have a real related question! When I've added a child namespace as above (I2CCmd) I have to preface the actual commands (I2CReadByte() etc) with the class name. I want to get around having the double I2C bit I2CCmd.I2CReadByte() which I could do by making each actual command a class...
  9. R

    Char* and [MarshalAs(UnmanagedType.LPStr)]

    On a related note. Is there a simple way to pass a list of bytes to a method? I noticed in the shared library (I think it's just C) you could pass bytes using curly braces and the receiver would automatically treat that as an array of bytes. Like this pseudocode (don't know C sytnax)...
  10. R

    Char* and [MarshalAs(UnmanagedType.LPStr)]

    Thanks, i'll try that tomorrow. Been caught up in RL all day and I have an Astronomy outreach event tonight so no chance to try it yet. Looks like if I'm going to make a wrapper for pigpio then I'll have to make wrappers for all the methods that use char* as well. Maybe have the programmer...
  11. R

    Char* and [MarshalAs(UnmanagedType.LPStr)]

    I have to send byte values to a C dll that is expecting char* which is apparently not allowed. Did some searching and I'm supposed to replace the char* with [MarshalAs(UnmanagedType.LPStr)] string myBytes That's all fine but I'm trying to figure out how to create a string from a byte array in a...
  12. R

    Documentation for a project

    I tried it out and it produces pretty nice docs. There's no "home" page in the output but I imagine that's because I'm supposed to load it via a special viewer of some sort. Didn't get that far into it last night as I found out the MS version was abandoned and now it's open source. I grabbed the...
  13. R

    Documentation for a project

    Yes, got all my "///" auto comments all filled out. Always do that as I go along so it doesn't really feel like so much like I'm "documenting" rather than coding.
  14. R

    Documentation for a project

    This doesn't seem to fit any of the existing forums so I'll blindly post here and hope I don't get beat up too badly. I'm working on a GPL C# IO library called PiIO for the Raspberry and what I'm trying to do is document everything as I go along rather than finish the project and give up due to...
  15. R

    Adding namespace/classes to an existing namespace

    Yep. For some reason my brain just can't figure these things out until I write it out in a post then a couple of minutes later I've figured it out. I added a namespace I2C and renamed the I2C class to I2CCmd. Now I can add namespaces and classes the way I wanted to.
  16. R

    Adding namespace/classes to an existing namespace

    Actually I just realized something. I'm thinking of I2C as a namespace when it's actually a class inside TheHardware. That's probably the root of my problems.
  17. R

    Adding namespace/classes to an existing namespace

    I'm probably searching with the wrong terms or maybe just not recognizing the answer when I see it. I've got existing namespaces like TheHardware.I2C And I want to add classes to I2C like this TheHardware.I2C.Devices Then eventually like TheHardware.I2C.Devices.Temperature...
  18. R

    Need link or search terms to look up adding my classes to using statements

    Oh duh! After hours of fruitless searching I stumbled on the Oh Too Simple answer. After adding a reference to the project make the classes you want to appear PUBLIC and then it'll show up. I was looking for something complexity that doesn't exist apparently.
  19. R

    Need link or search terms to look up adding my classes to using statements

    I've been googling but obviously I just don't know the right terms to use to get to step one in learning the subject. What I want to do is make my classes show up as children of a root namespace the way Diagnostics appears as a child of System. I've been staring at a solution that does this but...
  20. R

    Converting math from Python, not confident with mixed datatypes

    I need to use a larger font. I didn't spot that one either - there goes those little differences.
Back
Top Bottom