Search results for query: *

  1. blinky

    Resolved How to close/delete/dispose of an object

    Thanks for the replies - Im going to make the changes you request, well to the naming convention at least, as for the serial port, I will only ever have 1 serial port. I am communicating with an Arduino and it will control the switch to open/shut the observatory roof.
  2. blinky

    Resolved How to close/delete/dispose of an object

    Figured it out - I found out that what I was actually doing was creating a second timer object which was populating a list box, this meant it was populating twice 1 for each timer and not creating a 2nd port!
  3. blinky

    Resolved How to close/delete/dispose of an object

    I have a class that creates and opens a serial port: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO.Ports; namespace ObservatoryControl { public static class ObservatoryPortProvider { private...
  4. blinky

    Resolved cross thread operation not valid

    Found another article that was easier to use that background worker: if (ListBoxState.InvokeRequired) { ListBoxState.Invoke(new MethodInvoker(delegate { ListBoxState.Items.Add(roof.serialdata); })); }
  5. blinky

    Resolved cross thread operation not valid

    Following from this afternoons question..... I have a class, roof, which has a public string, serialdata. Im setting the value of this by a timer which runs every 2 seconds to query the serial port. I then have a list box Im trying to populate with this data, by doing the same - creating a...
  6. blinky

    Answered Want to do this OOP stuff properly - separate class for a list of com ports?

    Great, thanks for the reply! Look out for many more questions to follow.....
  7. blinky

    Answered Want to do this OOP stuff properly - separate class for a list of com ports?

    Hi, Pretty much new to programming and defiantly new to OOP, so go easy! Im writing a tiny Windows Form app that will be used to open and close my observatory roof. I have created a seperate class for my observatory object but I will be communicating with the actual roof through the...
Back
Top Bottom