SerialPinChanges.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Sys / System / IO / Ports / SerialPinChanges.cs / 1305376 / SerialPinChanges.cs

                            // ==++== 
//
//   Copyright (c) Microsoft Corporation.  All rights reserved.
//
// ==--== 
/*============================================================
** 
** Type: SerialPinChange 
**
** Purpose: Used to describe which pin has changed on a PinChanged event. 
**
** Date:  August 2002
**
** 
===========================================================*/
 
using Microsoft.Win32; 

namespace System.IO.Ports 
{
 	public enum SerialPinChange
	{
		CtsChanged = NativeMethods.EV_CTS, 
		DsrChanged = NativeMethods.EV_DSR,
 		CDChanged = NativeMethods.EV_RLSD, 
		Ring = NativeMethods.EV_RING, 
 		Break = NativeMethods.EV_BREAK,
 	} 

    public class SerialPinChangedEventArgs : EventArgs
    {
        private SerialPinChange pinChanged; 

    	internal SerialPinChangedEventArgs (SerialPinChange eventCode) { 
    	    pinChanged = eventCode; 
    	}
 
    	public SerialPinChange EventType {
    	    get { return pinChanged; }
    	}
    } 

    public delegate void SerialPinChangedEventHandler(object sender, SerialPinChangedEventArgs e); 
} 


// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// ==++== 
//
//   Copyright (c) Microsoft Corporation.  All rights reserved.
//
// ==--== 
/*============================================================
** 
** Type: SerialPinChange 
**
** Purpose: Used to describe which pin has changed on a PinChanged event. 
**
** Date:  August 2002
**
** 
===========================================================*/
 
using Microsoft.Win32; 

namespace System.IO.Ports 
{
 	public enum SerialPinChange
	{
		CtsChanged = NativeMethods.EV_CTS, 
		DsrChanged = NativeMethods.EV_DSR,
 		CDChanged = NativeMethods.EV_RLSD, 
		Ring = NativeMethods.EV_RING, 
 		Break = NativeMethods.EV_BREAK,
 	} 

    public class SerialPinChangedEventArgs : EventArgs
    {
        private SerialPinChange pinChanged; 

    	internal SerialPinChangedEventArgs (SerialPinChange eventCode) { 
    	    pinChanged = eventCode; 
    	}
 
    	public SerialPinChange EventType {
    	    get { return pinChanged; }
    	}
    } 

    public delegate void SerialPinChangedEventHandler(object sender, SerialPinChangedEventArgs e); 
} 


// File provided for Reference Use Only by Microsoft Corporation (c) 2007.

                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK