blinky
Member
- Joined
- Oct 21, 2020
- Messages
- 7
- Programming Experience
- Beginner
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 serial/Com port (its an Arduino controller that will open/close the switches to open/close the roof). As such I want the user to be able to select the correct com port, this will be done via some form of chooser, either on the main form, or maybe from a menu item on the main form. I think I know how to enumerate a list of the available COM ports but Im wondering where I should do this? Should I create a new class, say ComPorts that returns a list of the com ports and use that to populate the menu item or is it just as easy/better to do this within the main form.cs code?
Hopefully the above is clear enough!
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 serial/Com port (its an Arduino controller that will open/close the switches to open/close the roof). As such I want the user to be able to select the correct com port, this will be done via some form of chooser, either on the main form, or maybe from a menu item on the main form. I think I know how to enumerate a list of the available COM ports but Im wondering where I should do this? Should I create a new class, say ComPorts that returns a list of the com ports and use that to populate the menu item or is it just as easy/better to do this within the main form.cs code?
Hopefully the above is clear enough!