Search results for query: *

  • Users: Rhodan
  • Content: Threads
  • Order by date
  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?

    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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. R

    Converting math from Python, not confident with mixed datatypes

    I've just translated some math done in Python to C# which calibrates the temperature reading from a BMP180 Temp/Pressure sensor and it appears to be working! The problem is that I'm not entirely confident it will work all the time or if I have to do some casting in there somewhere. Please take a...
  9. R

    Can Serial.Open() report open yet delay the actual opening?

    I've got a strange problem on one PC. My application uses the code below to open the port. For some reason the program doesn't report any problems but my writes report the port not open several times then I see a port open message just before the application locks up. It's fine on my production...
  10. R

    Wrapping my head around classes

    I'm just starting to work on a fairly simple game just for programming practice/fun and I'm trying to start doing things in a "proper" and efficient fashion rather than my usual "do whatever is most convenient at the time" method that ends up in a confusing mess. One thing I'm really unsure...
  11. R

    Access properties short form (with?)

    I remember there being a way you could access properties of a class without having to type out the entire class name etc. I thought it was something like With MyLongClassName .Name = "Aname" .Value = 15 End With But I can seem to find anything of the sort. Any ideas? Or perhaps it was...
  12. R

    Conceptual help Different classes in a single List<>?

    I'm working on a project using a beaglebone/mono and I want to display inputs, outputs, alarms, etc all on a single datagridview. The problem is that the classes for these are quite different. I could just use separate classes and manually fill the DGV but I was thinking there should be a way to...
  13. R

    binding list<class> to mschart

    I've done bindings to mschart before using datasets but now I want to use in-memory data without setting up databases etc. What I've done is created a list<> of a simple class private class TrendEntry { public DateTime logTime; public Single room_Temp...
  14. R

    getting started with XML

    I'm just dabbling in XML for the first time and, as usual with MS, there are so many variations of ways to handle something that I'm thoroughly lost. Can someone point me in the right direction? What is the current selection of XML editing tools in VS? I've discovered XMLDocument and XDocument...
Back
Top Bottom