Click here to Skip to main content
15,898,947 members
Home / Discussions / C#
   

C#

 
QuestionBackup/Restore - SQL Compact Edition Pin
saturnuk31-Oct-12 22:47
saturnuk31-Oct-12 22:47 
AnswerRe: Backup/Restore - SQL Compact Edition Pin
Richard MacCutchan31-Oct-12 23:48
mveRichard MacCutchan31-Oct-12 23:48 
AnswerRe: Backup/Restore - SQL Compact Edition Pin
Simon_Whale1-Nov-12 0:47
Simon_Whale1-Nov-12 0:47 
GeneralRe: Backup/Restore - SQL Compact Edition Pin
saturnuk1-Nov-12 0:58
saturnuk1-Nov-12 0:58 
GeneralRe: Backup/Restore - SQL Compact Edition Pin
Eddy Vluggen1-Nov-12 1:55
professionalEddy Vluggen1-Nov-12 1:55 
GeneralRe: Backup/Restore - SQL Compact Edition Pin
GrooverFromHolland2-Nov-12 10:46
GrooverFromHolland2-Nov-12 10:46 
QuestionInfragistics Tree With Checkboxes Pin
Kevin Marois31-Oct-12 12:49
professionalKevin Marois31-Oct-12 12:49 
AnswerRe: Infragistics Tree With Checkboxes Pin
Pete O'Hanlon31-Oct-12 13:26
mvePete O'Hanlon31-Oct-12 13:26 
GeneralRe: Infragistics Tree With Checkboxes Pin
Kevin Marois31-Oct-12 13:28
professionalKevin Marois31-Oct-12 13:28 
AnswerRe: Infragistics Tree With Checkboxes Pin
Mycroft Holmes31-Oct-12 16:29
professionalMycroft Holmes31-Oct-12 16:29 
GeneralRe: Infragistics Tree With Checkboxes Pin
Kevin Marois31-Oct-12 18:41
professionalKevin Marois31-Oct-12 18:41 
Question921600 Pin
C-P-User-331-Oct-12 12:47
C-P-User-331-Oct-12 12:47 
AnswerRe: 921600 Pin
Pete O'Hanlon31-Oct-12 13:24
mvePete O'Hanlon31-Oct-12 13:24 
GeneralRe: 921600 Pin
C-P-User-31-Nov-12 7:00
C-P-User-31-Nov-12 7:00 
GeneralRe: 921600 Pin
C-P-User-31-Nov-12 7:08
C-P-User-31-Nov-12 7:08 
GeneralRe: 921600 Pin
Pete O'Hanlon1-Nov-12 7:32
mvePete O'Hanlon1-Nov-12 7:32 
GeneralRe: 921600 Pin
C-P-User-35-Nov-12 6:19
C-P-User-35-Nov-12 6:19 
GeneralRe: 921600 Pin
Pete O'Hanlon5-Nov-12 6:58
mvePete O'Hanlon5-Nov-12 6:58 
GeneralRe: 921600 Pin
C-P-User-35-Nov-12 7:19
C-P-User-35-Nov-12 7:19 
GeneralRe: 921600 Pin
Pete O'Hanlon5-Nov-12 7:27
mvePete O'Hanlon5-Nov-12 7:27 
GeneralRe: 921600 Pin
C-P-User-35-Nov-12 7:48
C-P-User-35-Nov-12 7:48 
GeneralRe: 921600 Pin
C-P-User-35-Nov-12 8:16
C-P-User-35-Nov-12 8:16 
GeneralRe: 921600 Pin
Pete O'Hanlon5-Nov-12 8:30
mvePete O'Hanlon5-Nov-12 8:30 
GeneralRe: 921600 Pin
C-P-User-35-Nov-12 9:25
C-P-User-35-Nov-12 9:25 
GeneralRe: 921600 Pin
C-P-User-35-Nov-12 9:54
C-P-User-35-Nov-12 9:54 
Okay, I'm studying the suggested app from the 2nd message in this thread.

I see this magic word "SerialPortManager" in different files, and C# knows they are there.

When I try to put something in a different file, C# can't see it.

What's going on with this correct app that isn't going on with mine ?

I'll mark the SerialPortManager with bold type in these file clips.





File: SerialPortManager.cs

C#
File: MainForm.cs
namespace SerialPortListener
{
    public partial class MainForm : Form
    {
        SerialPortManager _spManager;
        public MainForm()
        {
            InitializeComponent();

            UserInitialization();
        }

      
        private void UserInitialization()
        {
            _spManager = new SerialPortManager();
             (more stuff)
             (more stuff)
             (more stuff)
             (more stuff)
             (more stuff)





File: SerialPortManager.cs

C#
namespace SerialPortListener.Serial
{
    /// <summary>
    /// Manager for serial port data
    /// </summary>
    public class SerialPortManager : IDisposable
    {
        public SerialPortManager()
        {
            // Finding installed serial ports on hardware
            _currentSerialSettings.PortNameCollection = SerialPort.GetPortNames();
            _currentSerialSettings.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(_currentSerialSettings_PropertyChanged);

            // If serial ports is found, we select the first found
            if (_currentSerialSettings.PortNameCollection.Length > 0)
                _currentSerialSettings.PortName = _currentSerialSettings.PortNameCollection[0];
        }

        
        ~SerialPortManager()
        {
            Dispose(false);
        }


Sorry, no clue why the formatting goes into all italics in the second code snip

Anyway, which lines in his code are giving him the ability to share the names between files ? Why can't I share the name of this group of bytes between files ?

C#
namespace SerialPortPractice_03
{
    public partial class Form1 : Form
    {
        public byte[] This_Does_Not_Work = new byte[] { 0x01, 0x02, 0x03, 0x04 };
        
        public byte[] A_Test_To_Experiment = new byte[] {
                                                0xFF, 0xFE, 0xFD, 0xFC, 
                                                0x11, 0x22, 0x33, 0x44, 
                                                0x55, 0x66, 0x77 
                                                }
                                                ;


        


    }


Really hate this, but until I figure out the secret, I'm going to have to adopt the use of one huge source file with all 17 commands typed out.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.