백업파일제거
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
Winsock Orcas is the result of refining a project that started when I graduated from VB6 to VB.NET 2003.
|
||||
|
||||
.NET no longer supported the old Winsock control that had been so easy to use in VB6. Instead they gave us something with much more power, but also much more complexity: the Socket.
|
||||
|
||||
It took me a bit of time to figure the socket out, but when I did I decided to create a wrapper that worked just like the old control I was familiar with - making sockets much easier.
|
||||
|
||||
The first version was wrought with bugs and wasn't thread-safe. When VS 2005 came out, and revealed even more functions with regards to the socket - I resolved to make a new version.
|
||||
|
||||
That was Winsock 2005. It was thread-safe (to a point), and fixed the major bugs of the previous version. It even had UDP support.
|
||||
|
||||
In April of 2007 I started work on Winsock 2007. Due to a project I was working on at the time, I was looking into Remoting to synchronize an object between server/client. I decided Remoting wasn't for my project (couldn't implement blacklist), thus a new version of Winsock was born.
|
||||
|
||||
Winsock 2007 enabled synchronizing of objects (via BinaryFormatter), making the Send/Get routines simpler. The thread-safe events have been improved, as has UDP support. IPv6 support was added making it much easier to use with Vista.
|
||||
|
||||
Winsock Orcas (version 4.0.0) was made just to keep this going. It had come to my attention that VS2008 had problems compiling the code for previous version, so I made this version. This version streamlines the code, making it simpler to read (mainly by removing the WinsockMonitor class), and also adds in some Generics support on the Get/Peek methods to do automatic conversion to the type you want (watch out, you could cause exceptions for casting to the wrong type).
|
||||
|
||||
All in all I've enjoyed creating this component, and hope others find it as helpful as I have.
|
||||
|
||||
To report bugs please visit: http://www.k-koding.com/ and use the bug tracker.
|
||||
|
||||
Thanks for using it,
|
||||
|
||||
Chris Kolkman
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,185 +0,0 @@
|
||||
Option Strict On
|
||||
''' <summary>
|
||||
''' Represents both a last-in, first-out (LIFO) and a first-in, first-out (FIFO) non-generic collection of objects.
|
||||
''' </summary>
|
||||
''' <remarks>
|
||||
''' While the System.Collections.Stack and the System.Collections.Queue
|
||||
''' have seemingly different ways of operating, they can be combined easily
|
||||
''' by just manipulating the way in which an item in inserted into the list.
|
||||
'''
|
||||
''' This allows the removal from the list to remain the same, whether you
|
||||
''' are treating this class like a Stack or a Queue. The also allows the
|
||||
''' Peek() method to work for both at the same time.
|
||||
'''
|
||||
''' Helping tidbit - Deque is pronounced like "deck."
|
||||
''' </remarks>
|
||||
Public Class Deque
|
||||
Implements ICollection, IEnumerable, ICloneable
|
||||
|
||||
#Region " Private Members "
|
||||
|
||||
''' <summary>
|
||||
''' Stores the list of items within this instance.
|
||||
''' </summary>
|
||||
Private llList As LinkedList(Of Object)
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Constructor "
|
||||
|
||||
''' <summary>
|
||||
''' Initializes a new instance of the Deque class that is empty and has the default initial capacity.
|
||||
''' </summary>
|
||||
Public Sub New()
|
||||
llList = New LinkedList(Of Object)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Initializes a new instance of the Deque class that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied.
|
||||
''' </summary>
|
||||
''' <param name="col">The collection whose elements are copied to the new Deque.</param>
|
||||
Public Sub New(ByVal col As ICollection)
|
||||
llList = New LinkedList(Of Object)(CType(col, IEnumerable(Of Object)))
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Interface Method Implementations "
|
||||
|
||||
''' <summary>
|
||||
''' Copies the entire Deque to a compatible one-dimensional array, starting at the specified index of the target array.
|
||||
''' </summary>
|
||||
''' <param name="array">The one-dimensional Array that is the destination of the elements copied from Deque. The Array must have zero-based indexing.</param>
|
||||
''' <param name="index">The zero-based index in array at which copying begins.</param>
|
||||
Public Sub CopyTo(ByVal array As System.Array, ByVal index As Integer) Implements System.Collections.ICollection.CopyTo
|
||||
If array.Rank > 1 Then Throw New ArgumentException("Array must have only a single dimension.", "array")
|
||||
llList.CopyTo(CType(array, Object()), index)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Gets the number of elements actually contained in the Deque.
|
||||
''' </summary>
|
||||
''' <value>The number of elements actually contained in the Deque.</value>
|
||||
Public ReadOnly Property Count() As Integer Implements System.Collections.ICollection.Count
|
||||
Get
|
||||
Return llList.Count
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value indicating whether access to the ICollection is synchronized (thread safe).
|
||||
''' </summary>
|
||||
''' <value>true if access to the ICollection is synchronized (thread safe); otherwise, false. In the default implementation of List, this property always returns false.</value>
|
||||
Public ReadOnly Property IsSynchronized() As Boolean Implements System.Collections.ICollection.IsSynchronized
|
||||
Get
|
||||
Return CType(llList, ICollection).IsSynchronized
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets an object that can be used to synchronize access to the ICollection.
|
||||
''' </summary>
|
||||
''' <value>An object that can be used to synchronize access to the ICollection. In the default implementation of List, this property always returns the current instance.</value>
|
||||
Public ReadOnly Property SyncRoot() As Object Implements System.Collections.ICollection.SyncRoot
|
||||
Get
|
||||
Return CType(llList, ICollection).SyncRoot
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Returns an enumerator that iterates through the Queue.
|
||||
''' </summary>
|
||||
Public Function GetEnumerator() As System.Collections.IEnumerator Implements System.Collections.IEnumerable.GetEnumerator
|
||||
Return llList.GetEnumerator()
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Creates a shallow copy of the Queue.
|
||||
''' </summary>
|
||||
Public Function Clone() As Object Implements System.ICloneable.Clone
|
||||
Return New Deque(llList)
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Methods common to both Queues and Stacks "
|
||||
|
||||
''' <summary>
|
||||
''' Removes all elements from the Deque.
|
||||
''' </summary>
|
||||
Public Sub Clear()
|
||||
llList.Clear()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Determines whether an element is in the Deque.
|
||||
''' </summary>
|
||||
''' <param name="obj">The object to locate in the Deque. The value can be a null reference (Nothing in Visual Basic) for reference types.</param>
|
||||
Public Function Contains(ByVal obj As Object) As Boolean
|
||||
Return llList.Contains(obj)
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Returns the object at the beginning (top) of the Deque without removing it.
|
||||
''' </summary>
|
||||
''' <returns>The object at the beginning (top) of the Deque.</returns>
|
||||
Public Function Peek(Of dataType)() As dataType
|
||||
If llList.Count = 0 Then Return Nothing
|
||||
Return DirectCast(llList.First().Value, dataType)
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Returns a String that represents the current Object.
|
||||
''' </summary>
|
||||
''' <returns>A String that represents the current Object.</returns>
|
||||
Public Overrides Function ToString() As String
|
||||
Return llList.ToString()
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Queue methods "
|
||||
|
||||
''' <summary>
|
||||
''' Removes and returns the object at the beginning of the Deque.
|
||||
''' </summary>
|
||||
''' <returns>The object that is removed from the beginning of the Deque.</returns>
|
||||
''' <remarks>Synonymous with Pop().</remarks>
|
||||
Public Function Dequeue(Of dataType)() As dataType
|
||||
Dim oRet As dataType = Peek(Of dataType)()
|
||||
llList.RemoveFirst()
|
||||
Return oRet
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Adds an object to the end of the Deque.
|
||||
''' </summary>
|
||||
''' <param name="obj">The object to add to the Deque. The value can be a null reference (Nothing in Visual Basic).</param>
|
||||
Public Sub Enqueue(ByVal obj As Object)
|
||||
llList.AddLast(obj)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Stack methods "
|
||||
|
||||
''' <summary>
|
||||
''' Removes and returns the object at the top of the Deque.
|
||||
''' </summary>
|
||||
''' <returns>The Object removed from the top of the Deque.</returns>
|
||||
''' <remarks>Synonymous with Dequeue().</remarks>
|
||||
Public Function Pop(Of dataType)() As dataType
|
||||
Return Dequeue(Of dataType)()
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Inserts an object at the top of the Deque.
|
||||
''' </summary>
|
||||
''' <param name="obj">The Object to push onto the Deque. The value can be a null reference (Nothing in Visual Basic).</param>
|
||||
Public Sub Push(ByVal obj As Object)
|
||||
llList.AddFirst(obj)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
@@ -1,49 +0,0 @@
|
||||
Option Strict On
|
||||
|
||||
''' <summary>
|
||||
''' Enumeration containing the various supported network protocols.
|
||||
''' </summary>
|
||||
Public Enum WinsockProtocol
|
||||
''' <summary>
|
||||
''' Transmission Control Protocol - a connection oriented protocol.
|
||||
''' </summary>
|
||||
Tcp = 0
|
||||
''' <summary>
|
||||
''' User Datagram Protocol - a connection-less protocol.
|
||||
''' </summary>
|
||||
Udp = 1
|
||||
End Enum
|
||||
|
||||
''' <summary>
|
||||
''' Enumeration containing the various Winsock states.
|
||||
''' </summary>
|
||||
Public Enum WinsockStates
|
||||
''' <summary>
|
||||
''' The Winsock is closed.
|
||||
''' </summary>
|
||||
Closed = 0
|
||||
''' <summary>
|
||||
''' The Winsock is listening (TCP for connections, UDP for data).
|
||||
''' </summary>
|
||||
Listening = 1
|
||||
''' <summary>
|
||||
''' The Winsock is attempting the resolve the remote host.
|
||||
''' </summary>
|
||||
ResolvingHost = 2
|
||||
''' <summary>
|
||||
''' The remote host has been resolved to IP address.
|
||||
''' </summary>
|
||||
HostResolved = 3
|
||||
''' <summary>
|
||||
''' The Winsock is attempting to connect to the remote host.
|
||||
''' </summary>
|
||||
Connecting = 4
|
||||
''' <summary>
|
||||
''' The Winsock is connected to a remote source (client or server).
|
||||
''' </summary>
|
||||
Connected = 5
|
||||
''' <summary>
|
||||
''' The Winsock is attempting to close the connection.
|
||||
''' </summary>
|
||||
Closing = 6
|
||||
End Enum
|
||||
@@ -1,422 +0,0 @@
|
||||
Option Strict On
|
||||
|
||||
''' <summary>
|
||||
''' Provides data for the Winsock.ErrorReceived event.
|
||||
''' </summary>
|
||||
Public Class WinsockErrorReceivedEventArgs
|
||||
Inherits System.EventArgs
|
||||
|
||||
Private m_errorMsg As String
|
||||
Private m_function As String
|
||||
Private m_errorCode As System.Net.Sockets.SocketError
|
||||
Private m_Details As String
|
||||
|
||||
''' <summary>
|
||||
''' Initializes a new instance of the WinsockErrorEventArgs class.
|
||||
''' </summary>
|
||||
''' <param name="error_message">A String containing the error message.</param>
|
||||
Public Sub New(ByVal error_message As String)
|
||||
Me.New(error_message, Nothing)
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' Initializes a new instance of the WinsockErrorEventArgs class.
|
||||
''' </summary>
|
||||
''' <param name="error_message">A String containing the error message.</param>
|
||||
''' <param name="function_name">A String containing the name of the function that produced the error.</param>
|
||||
Public Sub New(ByVal error_message As String, ByVal function_name As String)
|
||||
Me.New(error_message, function_name, Nothing)
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' Initializes a new instance of the WinsockErrorEventArgs class.
|
||||
''' </summary>
|
||||
''' <param name="error_message">A String containing the error message.</param>
|
||||
''' <param name="function_name">A String containing the name of the function that produced the error.</param>
|
||||
''' <param name="extra_details">A String containing extra details for the error message.</param>
|
||||
Public Sub New(ByVal error_message As String, ByVal function_name As String, ByVal extra_details As String)
|
||||
Me.New(error_message, function_name, extra_details, Net.Sockets.SocketError.Success)
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' Initializes a new instance of the WinsockErrorEventArgs class.
|
||||
''' </summary>
|
||||
''' <param name="error_message">A String containing the error message.</param>
|
||||
''' <param name="function_name">A String containing the name of the function that produced the error.</param>
|
||||
''' <param name="extra_details">A String containing extra details for the error message.</param>
|
||||
''' <param name="error_code">A value containing the socket's ErrorCode.</param>
|
||||
Public Sub New(ByVal error_message As String, ByVal function_name As String, ByVal extra_details As String, ByVal error_code As System.Net.Sockets.SocketError)
|
||||
m_errorMsg = error_message
|
||||
m_function = function_name
|
||||
m_Details = extra_details
|
||||
m_errorCode = error_code
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value containing the error message.
|
||||
''' </summary>
|
||||
Public ReadOnly Property Message() As String
|
||||
Get
|
||||
Return m_errorMsg
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value containing the name of the function that produced the error.
|
||||
''' </summary>
|
||||
Public ReadOnly Property [Function]() As String
|
||||
Get
|
||||
Return m_function
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value indicating the error code returned by the socket.
|
||||
''' </summary>
|
||||
''' <remarks>If it wasn't returned by the socket, it defaults to success.</remarks>
|
||||
Public ReadOnly Property ErrorCode() As System.Net.Sockets.SocketError
|
||||
Get
|
||||
Return m_errorCode
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value containing more details than the typical error message.
|
||||
''' </summary>
|
||||
Public ReadOnly Property Details() As String
|
||||
Get
|
||||
Return m_Details
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
|
||||
''' <summary>
|
||||
''' Provides data for the Winsock.ConnectionRequest event.
|
||||
''' </summary>
|
||||
Public Class WinsockConnectionRequestEventArgs
|
||||
Inherits System.EventArgs
|
||||
|
||||
Private _client As System.Net.Sockets.Socket
|
||||
Private _cancel As Boolean = False
|
||||
|
||||
''' <summary>
|
||||
''' Initializes a new instance of the WinsockClientReceivedEventArgs class.
|
||||
''' </summary>
|
||||
''' <param name="new_client">A Socket object containing the new client that needs to be accepted.</param>
|
||||
Public Sub New(ByVal new_client As System.Net.Sockets.Socket)
|
||||
_client = new_client
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value containing the client information.
|
||||
''' </summary>
|
||||
''' <remarks>Used in accepting the client.</remarks>
|
||||
Public ReadOnly Property Client() As System.Net.Sockets.Socket
|
||||
Get
|
||||
Return _client
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value containing the incoming clients IP address.
|
||||
''' </summary>
|
||||
Public ReadOnly Property ClientIP() As String
|
||||
Get
|
||||
Dim rEP As System.Net.IPEndPoint = CType(_client.RemoteEndPoint, System.Net.IPEndPoint)
|
||||
Return rEP.Address.ToString()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets or sets a value indicating whether the incoming client request should be cancelled.
|
||||
''' </summary>
|
||||
Public Property Cancel() As Boolean
|
||||
Get
|
||||
Return _cancel
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
_cancel = value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
''' <summary>
|
||||
''' Provides data for the Winsock.StateChanged event.
|
||||
''' </summary>
|
||||
Public Class WinsockStateChangedEventArgs
|
||||
Inherits System.EventArgs
|
||||
|
||||
Private m_OldState As WinsockStates
|
||||
Private m_NewState As WinsockStates
|
||||
|
||||
''' <summary>
|
||||
''' Initializes a new instance of the WinsockStateChangingEventArgs class.
|
||||
''' </summary>
|
||||
''' <param name="oldState">The old state of the Winsock control.</param>
|
||||
''' <param name="newState">The state the Winsock control is changing to.</param>
|
||||
Public Sub New(ByVal oldState As WinsockStates, ByVal newState As WinsockStates)
|
||||
m_OldState = oldState
|
||||
m_NewState = newState
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value indicating the previous state of the Winsock control.
|
||||
''' </summary>
|
||||
Public ReadOnly Property Old_State() As WinsockStates
|
||||
Get
|
||||
Return m_OldState
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value indicating the new state of the Winsock control.
|
||||
''' </summary>
|
||||
Public ReadOnly Property New_State() As WinsockStates
|
||||
Get
|
||||
Return m_NewState
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
|
||||
''' <summary>
|
||||
''' Provides data for the Winsock.DataArrival event.
|
||||
''' </summary>
|
||||
Public Class WinsockDataArrivalEventArgs
|
||||
Inherits System.EventArgs
|
||||
|
||||
Private _bTotal As Integer
|
||||
Private _IP As String
|
||||
Private _Port As Integer
|
||||
|
||||
''' <summary>
|
||||
''' Initializes a new instance of the WinsockDataArrivalEventArgs class.
|
||||
''' </summary>
|
||||
''' <param name="bytes_total">The number of bytes that were received.</param>
|
||||
''' <param name="source_ip">The source address of the bytes.</param>
|
||||
''' <param name="source_port">The source port of the bytes.</param>
|
||||
Public Sub New(ByVal bytes_total As Integer, ByVal source_ip As String, ByVal source_port As Integer)
|
||||
_bTotal = bytes_total
|
||||
_IP = source_ip
|
||||
_Port = source_port
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value indicating the number of bytes received.
|
||||
''' </summary>
|
||||
Public ReadOnly Property TotalBytes() As Integer
|
||||
Get
|
||||
Return _bTotal
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value indicating the data's originating address.
|
||||
''' </summary>
|
||||
Public ReadOnly Property SourceIP() As String
|
||||
Get
|
||||
Return _IP
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value indicating the data's originating port.
|
||||
''' </summary>
|
||||
Public ReadOnly Property SourcePort() As Integer
|
||||
Get
|
||||
Return _Port
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
|
||||
''' <summary>
|
||||
''' Provides data for the Winsock.Connected event.
|
||||
''' </summary>
|
||||
Public Class WinsockConnectedEventArgs
|
||||
Inherits System.EventArgs
|
||||
|
||||
Private _IP As String
|
||||
Private _Port As Integer
|
||||
|
||||
''' <summary>
|
||||
''' Initializes a new instance of the WinsockConnectedEventArgs class.
|
||||
''' </summary>
|
||||
''' <param name="source_ip">The source address of the connection.</param>
|
||||
''' <param name="source_port">The source port of the connection.</param>
|
||||
Public Sub New(ByVal source_ip As String, ByVal source_port As Integer)
|
||||
_IP = source_ip
|
||||
_Port = source_port
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value indicating the remote address of the connection.
|
||||
''' </summary>
|
||||
Public ReadOnly Property SourceIP() As String
|
||||
Get
|
||||
Return _IP
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value indicating the remote port of the connection.
|
||||
''' </summary>
|
||||
Public ReadOnly Property SourcePort() As Integer
|
||||
Get
|
||||
Return _Port
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
|
||||
''' <summary>
|
||||
''' Provides data for the Winsock.SendComplete event.
|
||||
''' </summary>
|
||||
Public Class WinsockSendEventArgs
|
||||
Inherits System.EventArgs
|
||||
|
||||
Private _bTotal As Integer
|
||||
Private _bSent As Integer
|
||||
Private _IP As String
|
||||
|
||||
''' <summary>
|
||||
''' Initializes a new instance of the WinsockSendEventArgs class.
|
||||
''' </summary>
|
||||
''' <param name="dest_ip">The destination of the bytes sent.</param>
|
||||
''' <param name="bytes_sent">The total number of bytes sent.</param>
|
||||
''' <param name="bytes_total">The total number of bytes that were supposed to be sent.</param>
|
||||
Public Sub New(ByVal dest_ip As String, ByVal bytes_sent As Integer, ByVal bytes_total As Integer)
|
||||
_IP = dest_ip
|
||||
_bTotal = bytes_total
|
||||
_bSent = bytes_sent
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value indicating the destination of the bytes sent.
|
||||
''' </summary>
|
||||
Public ReadOnly Property DestinationIP() As String
|
||||
Get
|
||||
Return _IP
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value indicating the number of bytes sent.
|
||||
''' </summary>
|
||||
Public ReadOnly Property BytesSent() As Integer
|
||||
Get
|
||||
Return _bSent
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value indicating the total number of bytes that should have been sent.
|
||||
''' </summary>
|
||||
Public ReadOnly Property BytesTotal() As Integer
|
||||
Get
|
||||
Return _bTotal
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value indicating the percentage (0-100) of bytes that where sent.
|
||||
''' </summary>
|
||||
Public ReadOnly Property SentPercent() As Double
|
||||
Get
|
||||
Return (_bSent / _bTotal) * 100
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
|
||||
''' <summary>
|
||||
''' Provides data for the WinsockCollection.CountChanged event.
|
||||
''' </summary>
|
||||
Public Class WinsockCollectionCountChangedEventArgs
|
||||
Inherits System.EventArgs
|
||||
|
||||
Private _oldCount As Integer
|
||||
Private _newCount As Integer
|
||||
|
||||
''' <summary>
|
||||
''' Initializes a new instance of the WinsockCollectionCountChangedEventArgs class.
|
||||
''' </summary>
|
||||
''' <param name="old_count">The old number of items in the collection.</param>
|
||||
''' <param name="new_count">The new number of items in the collection.</param>
|
||||
Public Sub New(ByVal old_count As Integer, ByVal new_count As Integer)
|
||||
_oldCount = old_count
|
||||
_newCount = new_count
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value indicating the previous number of items in the collection.
|
||||
''' </summary>
|
||||
Public ReadOnly Property OldCount() As Integer
|
||||
Get
|
||||
Return _oldCount
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value indicating the current number of items in the collection.
|
||||
''' </summary>
|
||||
Public ReadOnly Property NewCount() As Integer
|
||||
Get
|
||||
Return _newCount
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
|
||||
''' <summary>
|
||||
''' Provides data for the Winsock.ReceiveProgress event.
|
||||
''' </summary>
|
||||
Public Class WinsockReceiveProgressEventArgs
|
||||
Inherits System.EventArgs
|
||||
|
||||
Private _bTotal As Integer
|
||||
Private _bIn As Integer
|
||||
Private _IP As String
|
||||
|
||||
''' <summary>
|
||||
''' Initializes a new instance of the WinsockReceiveProgressEventArgs class.
|
||||
''' </summary>
|
||||
''' <param name="source_ip">The source ip of the bytes received.</param>
|
||||
''' <param name="bytes_received">The total number of bytes received.</param>
|
||||
''' <param name="bytes_total">The total number of bytes that were supposed to be received.</param>
|
||||
Public Sub New(ByVal source_ip As String, ByVal bytes_received As Integer, ByVal bytes_total As Integer)
|
||||
_IP = source_ip
|
||||
_bTotal = bytes_total
|
||||
_bIn = bytes_received
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value indicating the source of the bytes sent.
|
||||
''' </summary>
|
||||
Public ReadOnly Property SourceIP() As String
|
||||
Get
|
||||
Return _IP
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value indicating the number of bytes received.
|
||||
''' </summary>
|
||||
Public ReadOnly Property BytesReceived() As Integer
|
||||
Get
|
||||
Return _bIn
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value indicating the total number of bytes that should be received.
|
||||
''' </summary>
|
||||
Public ReadOnly Property BytesTotal() As Integer
|
||||
Get
|
||||
Return _bTotal
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value indicating the percentage (0-100) of bytes that where received.
|
||||
''' </summary>
|
||||
Public ReadOnly Property ReceivedPercent() As Double
|
||||
Get
|
||||
Return (_bIn / _bTotal) * 100
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
@@ -1,28 +0,0 @@
|
||||
04.21.2008 - Fixed RaiseEventSafe in Winsock.vb and WinsockCollection.vb to use BeginInvoke instead of Invoked. Changed order of operations in ReceiveCallbackUDP to allow remote IP address to be detected properly.
|
||||
|
||||
03.25.2008 - Added a NetworkStream property to expose a NetworkStream object that uses the connection made by this component.
|
||||
|
||||
03.24.2008 - Fixed Listen methods to properly raise state changed events for UDP as well as TCP. Modified IWinsock, Winsock, and AsyncSocket to allow AsyncSocket to modify the LocalPort property of the component.
|
||||
|
||||
02.14.2008 - Fixed a bug in UDP receiving that caused it to always receive at the full byte buffer instead of size of the incoming data.
|
||||
|
||||
12.28.2007 - Winsock.Get and Winsock.Peek updated to check for nothing.
|
||||
SyncLock added to all qBuffer instances in AsyncSocket and _buff (ProcessIncoming)
|
||||
|
||||
12.26.2007 - Added new event ReceiveProgress.
|
||||
|
||||
12.13.2007 - Fixed PacketHeader.AddHeader to use .Length instead of .GetUpperBound(0). Also changed AsyncSocket.ProcessIncoming in two places with the same change (second half of the first nested IF statements with the >= comparison operator).
|
||||
|
||||
11.19.2007 - Completed WinsockDesigner to original intentions. Can now jump to event code using the Action list.
|
||||
|
||||
11.14.2007 - Demo programs completed, and test ran successfully (quick tests)
|
||||
|
||||
11.06.2007 - Began work on version 4.0.0
|
||||
|
||||
Interim time - various bug fixes
|
||||
|
||||
04.27.2007 - Third release using VS 2005 (called Winsock 2007)
|
||||
|
||||
06.12.2006 - Second release using VS 2005 (called Winsock 2005)
|
||||
|
||||
08.24.2005 - First release using VB 2003 (called Winsock.NET)
|
||||
@@ -1,111 +0,0 @@
|
||||
Option Strict On
|
||||
|
||||
Public Interface IWinsock
|
||||
|
||||
#Region " Events "
|
||||
|
||||
''' <summary>
|
||||
''' Occurs when connection is achieved (client and server).
|
||||
''' </summary>
|
||||
Event Connected(ByVal sender As Object, ByVal e As WinsockConnectedEventArgs)
|
||||
''' <summary>
|
||||
''' Occurs on the server when a client is attempting to connect.
|
||||
''' </summary>
|
||||
''' <remarks>Client registers connected at this point. Server must Accept in order for it to be connected.</remarks>
|
||||
Event ConnectionRequest(ByVal sender As Object, ByVal e As WinsockConnectionRequestEventArgs)
|
||||
''' <summary>
|
||||
''' Occurs when data arrives on the socket.
|
||||
''' </summary>
|
||||
''' <remarks>Raised only after all parts of the data have been collected.</remarks>
|
||||
Event DataArrival(ByVal sender As Object, ByVal e As WinsockDataArrivalEventArgs)
|
||||
''' <summary>
|
||||
''' Occurs when disconnected from the remote computer (client and server).
|
||||
''' </summary>
|
||||
Event Disconnected(ByVal sender As Object, ByVal e As System.EventArgs)
|
||||
''' <summary>
|
||||
''' Occurs when an error is detected in the socket.
|
||||
''' </summary>
|
||||
''' <remarks>May also be raised on disconnected (depending on disconnect circumstance).</remarks>
|
||||
Event ErrorReceived(ByVal sender As Object, ByVal e As WinsockErrorReceivedEventArgs)
|
||||
''' <summary>
|
||||
''' Occurs while the receive buffer is being filled with data.
|
||||
''' </summary>
|
||||
Event ReceiveProgress(ByVal sender As Object, ByVal e As WinsockReceiveProgressEventArgs)
|
||||
''' <summary>
|
||||
''' Occurs when sending of data is completed.
|
||||
''' </summary>
|
||||
Event SendComplete(ByVal sender As Object, ByVal e As WinsockSendEventArgs)
|
||||
''' <summary>
|
||||
''' Occurs when the send buffer has been sent but not all the data has been sent yet.
|
||||
''' </summary>
|
||||
Event SendProgress(ByVal sender As Object, ByVal e As WinsockSendEventArgs)
|
||||
''' <summary>
|
||||
''' Occurs when the state of the socket changes.
|
||||
''' </summary>
|
||||
Event StateChanged(ByVal sender As Object, ByVal e As WinsockStateChangedEventArgs)
|
||||
|
||||
''' <summary>
|
||||
''' Raises the Connected event.
|
||||
''' </summary>
|
||||
Sub OnConnected(ByVal e As WinsockConnectedEventArgs)
|
||||
''' <summary>
|
||||
''' Raises the ConnectionRequest event.
|
||||
''' </summary>
|
||||
Sub OnConnectionRequest(ByVal e As WinsockConnectionRequestEventArgs)
|
||||
''' <summary>
|
||||
''' Raises the DataArrival event.
|
||||
''' </summary>
|
||||
Sub OnDataArrival(ByVal e As WinsockDataArrivalEventArgs)
|
||||
''' <summary>
|
||||
''' Raises the Disconnected event.
|
||||
''' </summary>
|
||||
Sub OnDisconnected()
|
||||
''' <summary>
|
||||
''' Raises the ErrorReceived event.
|
||||
''' </summary>
|
||||
Sub OnErrorReceived(ByVal e As WinsockErrorReceivedEventArgs)
|
||||
''' <summary>
|
||||
''' Raises the ReceiveProgress event.
|
||||
''' </summary>
|
||||
Sub OnReceiveProgress(ByVal e As WinsockReceiveProgressEventArgs)
|
||||
''' <summary>
|
||||
''' Raises the SendComplete event.
|
||||
''' </summary>
|
||||
Sub OnSendComplete(ByVal e As WinsockSendEventArgs)
|
||||
''' <summary>
|
||||
''' Raises the SendProgress event.
|
||||
''' </summary>
|
||||
Sub OnSendProgress(ByVal e As WinsockSendEventArgs)
|
||||
' '' <summary>
|
||||
' '' Raises the StateChanged event.
|
||||
' '' </summary>
|
||||
'Sub OnStateChanged(ByVal e As WinsockStateChangedEventArgs)
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Properties "
|
||||
|
||||
Property LegacySupport() As Boolean
|
||||
Property Protocol() As WinsockProtocol
|
||||
Property RemoteHost() As String
|
||||
Property RemotePort() As Integer
|
||||
''' <summary>
|
||||
''' Gets the state of the <see cref="Winsock">Winsock</see> control.
|
||||
''' </summary>
|
||||
ReadOnly Property State() As WinsockStates
|
||||
|
||||
#End Region
|
||||
|
||||
''' <summary>
|
||||
''' Encapsulates the OnStateChanged methods so the AsyncSocket
|
||||
''' doesn't have to build the EventArgs parameter all the time.
|
||||
''' </summary>
|
||||
''' <param name="new_state">The new state of the Winsock.</param>
|
||||
Sub ChangeState(ByVal new_state As WinsockStates)
|
||||
|
||||
''' <summary>
|
||||
''' When the port is set dynamically by using port 0, the socket can now update the property of the component.
|
||||
''' </summary>
|
||||
''' <param name="new_port">The port we are now listening on.</param>
|
||||
Sub ChangeLocalPort(ByVal new_port As Integer)
|
||||
End Interface
|
||||
@@ -1,13 +0,0 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:2.0.50727.1318
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>false</MySubMain>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<ApplicationType>1</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
@@ -1,35 +0,0 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' General Information about an assembly is controlled through the following
|
||||
' set of attributes. Change these attribute values to modify the information
|
||||
' associated with an assembly.
|
||||
|
||||
' Review the values of the assembly attributes
|
||||
|
||||
<Assembly: AssemblyTitle("Winsock Orcas")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("Kolkman Koding")>
|
||||
<Assembly: AssemblyProduct("Winsock Orcas")>
|
||||
<Assembly: AssemblyCopyright("Copyright © Kolkman Koding 2007")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
<Assembly: Guid("c235b8bb-8687-4ca7-b991-ae3b12c3fc68")>
|
||||
|
||||
' Version information for an assembly consists of the following four values:
|
||||
'
|
||||
' Major Version
|
||||
' Minor Version
|
||||
' Build Number
|
||||
' Revision
|
||||
'
|
||||
' You can specify all the values or you can default the Build and Revision Numbers
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("4.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("4.0.0.0")>
|
||||
@@ -1,70 +0,0 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:2.0.50727.1318
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
'class via a tool like ResGen or Visual Studio.
|
||||
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
'with the /str option, or rebuild your VS project.
|
||||
'''<summary>
|
||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' Returns the cached ResourceManager instance used by this class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Winsock_Orcas.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Overrides the current thread's CurrentUICulture property for all
|
||||
''' resource lookups using this strongly typed resource class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property k_koding() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("k-koding", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
@@ -1,124 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="k-koding" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\k-koding.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,73 +0,0 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:2.0.50727.1318
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
|
||||
|
||||
#Region "My.Settings Auto-Save Functionality"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.Winsock_Orcas.My.MySettings
|
||||
Get
|
||||
Return Global.Winsock_Orcas.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
@@ -1,53 +0,0 @@
|
||||
Imports System.IO
|
||||
Imports System.Xml
|
||||
Imports System.Xml.Serialization
|
||||
Imports System.Runtime.Serialization.Formatters.Binary
|
||||
|
||||
''' <summary>
|
||||
''' Contains function for serializing/deserializing an object to and from a byte array.
|
||||
''' </summary>
|
||||
Public Class ObjectPacker
|
||||
|
||||
''' <summary>
|
||||
''' Serializes an object to a byte array.
|
||||
''' </summary>
|
||||
''' <param name="obj">The object to be serialized.</param>
|
||||
Public Shared Function GetBytes(ByVal obj As Object) As Byte()
|
||||
If obj.GetType Is GetType(Byte).MakeArrayType Then
|
||||
Return CType(obj, Byte())
|
||||
End If
|
||||
Dim ret() As Byte = Nothing
|
||||
Dim blnRetAfterClose As Boolean = False
|
||||
Dim ms As New MemoryStream()
|
||||
Dim bf As New BinaryFormatter()
|
||||
Try
|
||||
bf.Serialize(ms, obj)
|
||||
Catch ex As Exception
|
||||
blnRetAfterClose = True
|
||||
Finally
|
||||
ms.Close()
|
||||
End Try
|
||||
If blnRetAfterClose Then Return ret
|
||||
ret = ms.ToArray()
|
||||
Return ret
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Deserializes an object from a byte array.
|
||||
''' </summary>
|
||||
''' <param name="byt">The byte array from which to obtain the object.</param>
|
||||
Public Shared Function GetObject(ByVal byt() As Byte) As Object
|
||||
Dim ms As New MemoryStream(byt, False)
|
||||
Dim bf As New BinaryFormatter()
|
||||
Dim x As Object
|
||||
Try
|
||||
x = bf.Deserialize(ms)
|
||||
Catch ex As Exception
|
||||
x = byt
|
||||
Finally
|
||||
ms.Close()
|
||||
End Try
|
||||
Return x
|
||||
End Function
|
||||
|
||||
End Class
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 30 KiB |
@@ -1,85 +0,0 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Net.Sockets
|
||||
|
||||
''' <summary>
|
||||
''' This call contains shared methods that any class can use.
|
||||
''' </summary>
|
||||
Public Class SharedMethods
|
||||
|
||||
''' <summary>
|
||||
''' Raises an error on the parent Winsock object.
|
||||
''' </summary>
|
||||
''' <param name="iParent">The parent Winsock object to raise the error on.</param>
|
||||
''' <param name="msg">A String containing a message describing the error being raised.</param>
|
||||
Protected Friend Shared Sub RaiseError(ByRef iParent As IWinsock, ByVal msg As String)
|
||||
' First use the StackTrace to get the calling class and function.
|
||||
Dim CurrentStack As New System.Diagnostics.StackTrace()
|
||||
Dim callingFunction As String = CurrentStack.GetFrame(1).GetMethod.Name
|
||||
Dim callingClass As String = CurrentStack.GetFrame(1).GetMethod.DeclaringType.ToString()
|
||||
Dim caller As String = CStr(IIf(callingFunction.StartsWith("."), callingClass & callingFunction, callingClass & "." & callingFunction))
|
||||
' Create the event arguement
|
||||
Dim e As New WinsockErrorReceivedEventArgs(msg, caller)
|
||||
' Raise the event only if there really is a parent
|
||||
If iParent IsNot Nothing Then
|
||||
iParent.OnErrorReceived(e)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Raises an error on the parent Winsock object.
|
||||
''' </summary>
|
||||
''' <param name="iParent">The parent Winsock object to raise the error on.</param>
|
||||
''' <param name="msg">A String containing a message describing the error being raised.</param>
|
||||
''' <param name="details">A String containing extra details describing the error being raised.</param>
|
||||
Protected Friend Shared Sub RaiseError(ByRef iParent As IWinsock, ByVal msg As String, ByVal details As String)
|
||||
' First use the StackTrace to get the calling class and function
|
||||
Dim CurrentStack As New System.Diagnostics.StackTrace()
|
||||
Dim callingFunction As String = CurrentStack.GetFrame(1).GetMethod.Name
|
||||
Dim callingClass As String = CurrentStack.GetFrame(1).GetMethod.DeclaringType.ToString()
|
||||
Dim caller As String = CStr(IIf(callingFunction.StartsWith("."), callingClass & callingFunction, callingClass & "." & callingFunction))
|
||||
' Create the event arguement
|
||||
Dim e As New WinsockErrorReceivedEventArgs(msg, caller, details)
|
||||
' Raise the event only if there really is a parent
|
||||
If iParent IsNot Nothing Then
|
||||
iParent.OnErrorReceived(e)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Raises an error on the parent Winsock object.
|
||||
''' </summary>
|
||||
''' <param name="iParent">The parent Winsock object to raise the error on.</param>
|
||||
''' <param name="msg">A String containing a message describing the error being raised.</param>
|
||||
''' <param name="details">A String containing extra details describing the error being raised.</param>
|
||||
''' <param name="errCode">A value containing the socket's error code.</param>
|
||||
Protected Friend Shared Sub RaiseError(ByRef iParent As IWinsock, ByVal msg As String, ByVal details As String, ByVal errCode As SocketError)
|
||||
' First use the StackTrace to get the calling class and function
|
||||
Dim CurrentStack As New System.Diagnostics.StackTrace()
|
||||
Dim callingFunction As String = CurrentStack.GetFrame(1).GetMethod.Name
|
||||
Dim callingClass As String = CurrentStack.GetFrame(1).GetMethod.DeclaringType.ToString()
|
||||
Dim caller As String = CStr(IIf(callingFunction.StartsWith("."), callingClass & callingFunction, callingClass & "." & callingFunction))
|
||||
' Create the event arguement
|
||||
Dim e As New WinsockErrorReceivedEventArgs(msg, caller, details, errCode)
|
||||
' Raise the event only if there really is a parent
|
||||
If iParent IsNot Nothing Then
|
||||
iParent.OnErrorReceived(e)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Removes items from the beginning of an array.
|
||||
''' </summary>
|
||||
Protected Friend Shared Function ShrinkArray(Of arrayType)(ByRef arr() As arrayType, ByVal desiredLengthToTrim As Integer) As arrayType()
|
||||
' Grab desired length from array - this will be returned
|
||||
Dim retArr(desiredLengthToTrim - 1) As arrayType
|
||||
Array.Copy(arr, 0, retArr, 0, desiredLengthToTrim)
|
||||
' Trim what we grabbed out of the array
|
||||
Dim tmpArr(arr.GetUpperBound(0) - desiredLengthToTrim) As arrayType
|
||||
Array.Copy(arr, desiredLengthToTrim, tmpArr, 0, arr.Length - desiredLengthToTrim)
|
||||
arr = DirectCast(tmpArr.Clone(), arrayType())
|
||||
' Return the data
|
||||
Return retArr
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -1,129 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{C422352B-E7E1-4CA6-9275-1142249D40E2}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Winsock_Orcas</RootNamespace>
|
||||
<AssemblyName>Winsock Orcas</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Windows</MyType>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>Winsock Orcas.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>Winsock Orcas.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Design" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AsyncSocket.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="History.txt" />
|
||||
<None Include="Resources\k-koding.png" />
|
||||
<EmbeddedResource Include="frmAbout.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmAbout.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Winsock.png" />
|
||||
<Compile Include="Enumerations.vb" />
|
||||
<Compile Include="EventArgs.vb" />
|
||||
<Compile Include="frmAbout.Designer.vb">
|
||||
<DependentUpon>frmAbout.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmAbout.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="IWinsock.vb" />
|
||||
<Compile Include="Deque.vb" />
|
||||
<Compile Include="ObjectPacker.vb" />
|
||||
<Compile Include="SharedMethods.vb" />
|
||||
<Compile Include="Winsock.vb">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WinsockCollection.vb" />
|
||||
<Compile Include="WinsockDesigner.vb" />
|
||||
<Compile Include="WinsockFileData.vb" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="About.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 749 B |
@@ -1,583 +0,0 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.ComponentModel
|
||||
Imports System.ComponentModel.Design
|
||||
Imports System.Drawing
|
||||
Imports System.Net
|
||||
|
||||
<ToolboxBitmap(GetType(Winsock), "Winsock.png")> _
|
||||
<DefaultEvent("ErrorReceived")> _
|
||||
<DesignerAttribute(GetType(WinsockDesigner), GetType(IDesigner))> _
|
||||
Public Class Winsock
|
||||
Inherits Component
|
||||
Implements IWinsock
|
||||
|
||||
Public Sub New()
|
||||
_localPort = 8080
|
||||
_remotePort = 8080
|
||||
_remoteHost = "localhost"
|
||||
_maxPendingConnections = 1
|
||||
_legacySupport = False
|
||||
_protocol = WinsockProtocol.Tcp
|
||||
_wsState = WinsockStates.Closed
|
||||
_asSock = New AsyncSocket(Me)
|
||||
End Sub
|
||||
|
||||
#Region " Events "
|
||||
|
||||
''' <summary>
|
||||
''' Triggers an event declared at module level within a class, form, or document in a thread-safe manner.
|
||||
''' </summary>
|
||||
''' <param name="ev">The event to be raised.</param>
|
||||
''' <param name="args">The arguements for the event.</param>
|
||||
Private Sub RaiseEventSafe(ByVal ev As System.Delegate, ByRef args() As Object)
|
||||
Dim bFired As Boolean
|
||||
If ev IsNot Nothing Then
|
||||
For Each singleCast As System.Delegate In ev.GetInvocationList()
|
||||
bFired = False
|
||||
Try
|
||||
Dim syncInvoke As ISynchronizeInvoke = CType(singleCast.Target, ISynchronizeInvoke)
|
||||
If syncInvoke IsNot Nothing AndAlso syncInvoke.InvokeRequired Then
|
||||
bFired = True
|
||||
syncInvoke.BeginInvoke(singleCast, args)
|
||||
Else
|
||||
bFired = True
|
||||
singleCast.DynamicInvoke(args)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
If Not bFired Then singleCast.DynamicInvoke(args)
|
||||
End Try
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Occurs when connection is achieved (client and server).
|
||||
''' </summary>
|
||||
Public Event Connected(ByVal sender As Object, ByVal e As WinsockConnectedEventArgs) Implements IWinsock.Connected
|
||||
''' <summary>
|
||||
''' Occurs on the server when a client is attempting to connect.
|
||||
''' </summary>
|
||||
''' <remarks>Client registers connected at this point. Server must Accept in order for it to be connected.</remarks>
|
||||
Public Event ConnectionRequest(ByVal sender As Object, ByVal e As WinsockConnectionRequestEventArgs) Implements IWinsock.ConnectionRequest
|
||||
''' <summary>
|
||||
''' Occurs when data arrives on the socket.
|
||||
''' </summary>
|
||||
''' <remarks>Raised only after all parts of the data have been collected.</remarks>
|
||||
Public Event DataArrival(ByVal sender As Object, ByVal e As WinsockDataArrivalEventArgs) Implements IWinsock.DataArrival
|
||||
''' <summary>
|
||||
''' Occurs when disconnected from the remote computer (client and server).
|
||||
''' </summary>
|
||||
Public Event Disconnected(ByVal sender As Object, ByVal e As System.EventArgs) Implements IWinsock.Disconnected
|
||||
''' <summary>
|
||||
''' Occurs when an error is detected in the socket.
|
||||
''' </summary>
|
||||
''' <remarks>May also be raised on disconnected (depending on disconnect circumstance).</remarks>
|
||||
Public Event ErrorReceived(ByVal sender As Object, ByVal e As WinsockErrorReceivedEventArgs) Implements IWinsock.ErrorReceived
|
||||
''' <summary>
|
||||
''' Occurs while the receive buffer is being filled with data.
|
||||
''' </summary>
|
||||
Public Event ReceiveProgress(ByVal sender As Object, ByVal e As WinsockReceiveProgressEventArgs) Implements IWinsock.ReceiveProgress
|
||||
''' <summary>
|
||||
''' Occurs when sending of data is completed.
|
||||
''' </summary>
|
||||
Public Event SendComplete(ByVal sender As Object, ByVal e As WinsockSendEventArgs) Implements IWinsock.SendComplete
|
||||
''' <summary>
|
||||
''' Occurs when the send buffer has been sent but not all the data has been sent yet.
|
||||
''' </summary>
|
||||
Public Event SendProgress(ByVal sender As Object, ByVal e As WinsockSendEventArgs) Implements IWinsock.SendProgress
|
||||
''' <summary>
|
||||
''' Occurs when the state of the socket changes.
|
||||
''' </summary>
|
||||
Public Event StateChanged(ByVal sender As Object, ByVal e As WinsockStateChangedEventArgs) Implements IWinsock.StateChanged
|
||||
|
||||
''' <summary>
|
||||
''' Raises the Connected event.
|
||||
''' </summary>
|
||||
Public Sub OnConnected(ByVal e As WinsockConnectedEventArgs) Implements IWinsock.OnConnected
|
||||
RaiseEventSafe(ConnectedEvent, New Object() {Me, e})
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Raises the ConnectionRequest event.
|
||||
''' </summary>
|
||||
Public Sub OnConnectionRequest(ByVal e As WinsockConnectionRequestEventArgs) Implements IWinsock.OnConnectionRequest
|
||||
RaiseEventSafe(ConnectionRequestEvent, New Object() {Me, e})
|
||||
If e.Cancel Then
|
||||
e.Client.Disconnect(False)
|
||||
e.Client.Close()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Raises the DataArrival event.
|
||||
''' </summary>
|
||||
Public Sub OnDataArrival(ByVal e As WinsockDataArrivalEventArgs) Implements IWinsock.OnDataArrival
|
||||
RaiseEventSafe(DataArrivalEvent, New Object() {Me, e})
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Raises the Disconnected event.
|
||||
''' </summary>
|
||||
Public Sub OnDisconnected() Implements IWinsock.OnDisconnected
|
||||
RaiseEventSafe(DisconnectedEvent, New Object() {Me, New System.EventArgs})
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Raises the ErrorReceived event.
|
||||
''' </summary>
|
||||
Public Sub OnErrorReceived(ByVal e As WinsockErrorReceivedEventArgs) Implements IWinsock.OnErrorReceived
|
||||
RaiseEventSafe(ErrorReceivedEvent, New Object() {Me, e})
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Raises the ReceiveProgress event.
|
||||
''' </summary>
|
||||
Public Sub OnReceiveProgress(ByVal e As WinsockReceiveProgressEventArgs) Implements IWinsock.OnReceiveProgress
|
||||
RaiseEventSafe(ReceiveProgressEvent, New Object() {Me, e})
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Raises the SendComplete event.
|
||||
''' </summary>
|
||||
Public Sub OnSendComplete(ByVal e As WinsockSendEventArgs) Implements IWinsock.OnSendComplete
|
||||
RaiseEventSafe(SendCompleteEvent, New Object() {Me, e})
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Raises the SendProgress event.
|
||||
''' </summary>
|
||||
Public Sub OnSendProgress(ByVal e As WinsockSendEventArgs) Implements IWinsock.OnSendProgress
|
||||
RaiseEventSafe(SendProgressEvent, New Object() {Me, e})
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Raises the StateChanged event.
|
||||
''' </summary>
|
||||
Private Sub OnStateChanged(ByVal e As WinsockStateChangedEventArgs) 'Implements IWinsock.OnStateChanged
|
||||
If _wsState <> e.New_State Then
|
||||
_wsState = e.New_State
|
||||
RaiseEventSafe(StateChangedEvent, New Object() {Me, e})
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Private Members "
|
||||
|
||||
Private _asSock As AsyncSocket
|
||||
Private _wsState As WinsockStates
|
||||
Private _localPort As Integer
|
||||
Private _maxPendingConnections As Integer
|
||||
Private _remoteHost As String
|
||||
Private _remotePort As Integer
|
||||
Private _legacySupport As Boolean
|
||||
Private _protocol As WinsockProtocol
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Helper Methods "
|
||||
|
||||
''' <summary>
|
||||
''' Encapsulates the OnStateChanged methods so the AsyncSocket
|
||||
''' doesn't have to build the EventArgs parameter all the time.
|
||||
''' </summary>
|
||||
''' <param name="new_state">The new state of the Winsock.</param>
|
||||
Protected Friend Sub ChangeState(ByVal new_state As WinsockStates) Implements IWinsock.ChangeState
|
||||
OnStateChanged(New WinsockStateChangedEventArgs(_wsState, new_state))
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' When the port is set dynamically by using port 0, the socket can now update the property of the component.
|
||||
''' </summary>
|
||||
''' <param name="new_port">The port we are now listening on.</param>
|
||||
Protected Friend Sub ChangeLocalPort(ByVal new_port As Integer) Implements IWinsock.ChangeLocalPort
|
||||
_localPort = new_port
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Public Properties "
|
||||
|
||||
''' <summary>
|
||||
''' Gets or sets a value indicating the interal size of the byte buffers.
|
||||
''' </summary>
|
||||
Public Property BufferSize() As Integer
|
||||
Get
|
||||
Return _asSock.BufferSize
|
||||
End Get
|
||||
Set(ByVal value As Integer)
|
||||
_asSock.BufferSize = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets a value indicating whether the buffer has data for retrieval.
|
||||
''' </summary>
|
||||
<Browsable(False)> _
|
||||
Public ReadOnly Property HasData() As Boolean
|
||||
Get
|
||||
Return _asSock.BufferCount > 0
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets or sets a value indicating if Legacy support should be used or not.
|
||||
''' </summary>
|
||||
''' <remarks>Legacy support is to support older winsock style connections.</remarks>
|
||||
Public Property LegacySupport() As Boolean Implements IWinsock.LegacySupport
|
||||
Get
|
||||
Return _legacySupport
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
If Not value AndAlso Protocol = WinsockProtocol.Udp Then
|
||||
Throw New Exception("LegacySupport is required for UDP connections.")
|
||||
End If
|
||||
_legacySupport = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets the local machine's IP address(es).
|
||||
''' </summary>
|
||||
<Browsable(False)> _
|
||||
Public ReadOnly Property LocalIP() As String()
|
||||
Get
|
||||
Dim h As System.Net.IPHostEntry = System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName)
|
||||
Dim s(h.AddressList.Length - 1) As String
|
||||
For i As Integer = 0 To h.AddressList.Length - 1
|
||||
s(i) = CType(h.AddressList.GetValue(i), Net.IPAddress).ToString
|
||||
Next
|
||||
Return s
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets or sets a value indicating the port the <see cref="Winsock" /> control should listen on.
|
||||
''' </summary>
|
||||
''' <remarks>Cannot change while listening, connected, or connecting - but can change while closing.</remarks>
|
||||
Public Property LocalPort() As Integer
|
||||
Get
|
||||
Return _localPort
|
||||
End Get
|
||||
Set(ByVal value As Integer)
|
||||
Select Case State
|
||||
Case WinsockStates.Listening
|
||||
Throw New Exception("Cannot change the local port while already listening on a port.")
|
||||
Case WinsockStates.Connected
|
||||
Throw New Exception("Cannot change the local port of a connection that is already active.")
|
||||
Case Else
|
||||
If State <> WinsockStates.Closed AndAlso State <> WinsockStates.Closing Then
|
||||
Throw New Exception("Cannot change the local port while the component is processing, it may have adverse effects on the connection process.")
|
||||
End If
|
||||
End Select
|
||||
_localPort = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets or sets a value that control the length of the maximum length of the pending connections queue.
|
||||
''' </summary>
|
||||
''' <remarks>Cannot change while listening.</remarks>
|
||||
Public Property MaxPendingConnections() As Integer
|
||||
Get
|
||||
Return _maxPendingConnections
|
||||
End Get
|
||||
Set(ByVal value As Integer)
|
||||
Select Case State
|
||||
Case WinsockStates.Listening
|
||||
Throw New Exception("Cannot change the pending connections value while already listening.")
|
||||
End Select
|
||||
_maxPendingConnections = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets a NetworkStream that this Winsock object is based on.
|
||||
''' </summary>
|
||||
<Browsable(False)> _
|
||||
Public ReadOnly Property NetworkStream() As System.Net.Sockets.NetworkStream
|
||||
Get
|
||||
Return _asSock.UnderlyingStream
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets or sets the winsock protocol to use when communicating with the remote computer.
|
||||
''' </summary>
|
||||
<RefreshProperties(RefreshProperties.All)> _
|
||||
Public Property Protocol() As WinsockProtocol Implements IWinsock.Protocol
|
||||
Get
|
||||
Return _protocol
|
||||
End Get
|
||||
Set(ByVal value As WinsockProtocol)
|
||||
If State <> WinsockStates.Closed Then
|
||||
Throw New Exception("Cannot change the protocol while listening or connected to a remote computer.")
|
||||
End If
|
||||
_protocol = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets or sets a value that determines what remote computer to connect to, or is currently connected to.
|
||||
''' </summary>
|
||||
''' <remarks>Can only change if closed or listening.</remarks>
|
||||
Public Property RemoteHost() As String Implements IWinsock.RemoteHost
|
||||
Get
|
||||
Return _remoteHost
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
If State <> WinsockStates.Closed AndAlso State <> WinsockStates.Listening Then
|
||||
Throw New Exception("Cannot change the remote host while already connected to a remote computer.")
|
||||
End If
|
||||
_remoteHost = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets or sets a value that determines which port on the remote computer to connect on, or is currently connected on.
|
||||
''' </summary>
|
||||
''' <remarks>Can only change if closed or listening.</remarks>
|
||||
Public Property RemotePort() As Integer Implements IWinsock.RemotePort
|
||||
Get
|
||||
Return _remotePort
|
||||
End Get
|
||||
Set(ByVal value As Integer)
|
||||
If State <> WinsockStates.Closed AndAlso State <> WinsockStates.Listening Then
|
||||
Throw New Exception("Cannot change the remote port while already connected to a remote computer.")
|
||||
End If
|
||||
_remotePort = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets the state of the <see cref="Winsock">Winsock</see> control.
|
||||
''' </summary>
|
||||
<Browsable(False)> _
|
||||
Public ReadOnly Property State() As WinsockStates Implements IWinsock.State
|
||||
Get
|
||||
Return _wsState
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Public Methods "
|
||||
|
||||
''' <summary>
|
||||
''' Places a <see cref="Winsock">Winsock</see> in a listening state.
|
||||
''' </summary>
|
||||
Public Sub Listen()
|
||||
_asSock.Listen(LocalPort, MaxPendingConnections)
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' Places a <see cref="Winsock">Winsock</see> in a listening state.
|
||||
''' </summary>
|
||||
''' <param name="port">The port <see cref="Winsock">Winsock</see> should listen on.</param>
|
||||
Public Sub Listen(ByVal port As Integer)
|
||||
If port < 0 Then
|
||||
Throw New ArgumentException("Port cannot be less than zero.", "port")
|
||||
End If
|
||||
LocalPort = port
|
||||
Listen()
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' Places a <see cref="Winsock">Winsock</see> in a listening state.
|
||||
''' </summary>
|
||||
''' <param name="ip">The IP address the <see cref="Winsock">Winsock</see> should listen on. This must be an ip address.</param>
|
||||
Public Sub Listen(ByVal ip As String)
|
||||
If ip Is Nothing Then
|
||||
Listen()
|
||||
Else
|
||||
Dim ipAddr As IPAddress = Nothing
|
||||
If Not IPAddress.TryParse(ip, ipAddr) Then
|
||||
Throw New ArgumentException("IP address specified is not a valid IP address.", "ip")
|
||||
End If
|
||||
_asSock.Listen(LocalPort, MaxPendingConnections, ipAddr)
|
||||
End If
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' Places a <see cref="Winsock">Winsock</see> in a listening state.
|
||||
''' </summary>
|
||||
''' <param name="ip">The IP address the <see cref="Winsock">Winsock</see> should listen on.</param>
|
||||
''' <param name="port">The port <see cref="Winsock">Winsock</see> should listen on.</param>
|
||||
Public Sub Listen(ByVal ip As String, ByVal port As Integer)
|
||||
If port < 0 Then
|
||||
Throw New ArgumentException("Port cannot be less than zero.", "port")
|
||||
End If
|
||||
LocalPort = port
|
||||
If ip Is Nothing Then
|
||||
Listen()
|
||||
Else
|
||||
Dim ipAddr As IPAddress = Nothing
|
||||
If Not IPAddress.TryParse(ip, ipAddr) Then
|
||||
Throw New ArgumentException("IP address specified is not a valid IP address.", "ip")
|
||||
End If
|
||||
_asSock.Listen(LocalPort, MaxPendingConnections, ipAddr)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Accepts a client connect as valid and begins to monitor it for incoming data.
|
||||
''' </summary>
|
||||
''' <param name="client">A <see cref="System.Net.Sockets.Socket">System.Net.Sockets.Socket</see> that represents the client being accepted.</param>
|
||||
Public Sub Accept(ByVal client As Sockets.Socket)
|
||||
If _asSock.Accept(client) Then
|
||||
_localPort = _asSock.LocalPort
|
||||
' also set remote host and port
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Creates an new <see cref="Winsock">Winsock</see> and accepts the client connection on it.
|
||||
''' </summary>
|
||||
''' <param name="client">A <see cref="System.Net.Sockets.Socket">System.Net.Sockets.Socket</see> that represents the client being accepted.</param>
|
||||
''' <remarks>
|
||||
''' This was created to be used by the listener, to keep the listener listening while
|
||||
''' also accepting a connection.
|
||||
''' </remarks>
|
||||
Public Function AcceptNew(ByVal client As Sockets.Socket) As Winsock
|
||||
Dim wskReturn As New Winsock()
|
||||
wskReturn.Protocol = Me.Protocol
|
||||
wskReturn.LegacySupport = Me.LegacySupport
|
||||
wskReturn.Accept(client)
|
||||
Return wskReturn
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Closes an open <see cref="Winsock">Winsock</see> connection.
|
||||
''' </summary>
|
||||
Public Sub Close()
|
||||
_asSock.Close()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Establishes a connection to a remote host.
|
||||
''' </summary>
|
||||
Public Sub Connect()
|
||||
_asSock.Connect(RemoteHost, RemotePort)
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' Establishes a connection to a remote host.
|
||||
''' </summary>
|
||||
''' <param name="remoteHostOrIP">A <see cref="System.String">System.String</see> containing the Hostname or IP address of the remote host.</param>
|
||||
''' <param name="remote_port">A value indicating the port on the remote host to connect to.</param>
|
||||
Public Sub Connect(ByVal remoteHostOrIP As String, ByVal remote_port As Integer)
|
||||
RemoteHost = remoteHostOrIP
|
||||
RemotePort = remote_port
|
||||
Connect()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Sends an object to a connected socket on a remote computer.
|
||||
''' </summary>
|
||||
''' <param name="data">The object to send.</param>
|
||||
''' <remarks>
|
||||
''' The object is first serialized using a BinaryFormatter - unless
|
||||
''' it is already a byte array, in which case it just sends the byte array.
|
||||
''' </remarks>
|
||||
Public Sub Send(ByVal data As Object)
|
||||
Dim byt() As Byte
|
||||
If LegacySupport AndAlso data.GetType Is GetType(String) Then
|
||||
byt = System.Text.Encoding.Default.GetBytes(CStr(data))
|
||||
Else
|
||||
byt = ObjectPacker.GetBytes(data)
|
||||
End If
|
||||
_asSock.Send(byt)
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' Sends a file to a connected socket on a remote computer.
|
||||
''' </summary>
|
||||
''' <param name="filename">The full path to the file you want to send.</param>
|
||||
''' <remarks>
|
||||
''' Creates a special file object to send, so the receiving end knows what to do with it.
|
||||
''' </remarks>
|
||||
Public Sub SendFile(ByVal filename As String)
|
||||
Dim wsf As New WinsockFileData()
|
||||
Try
|
||||
If Not wsf.ReadFile(filename) Then
|
||||
Throw New Exception("File does not exist, or there was a problem reading the file.")
|
||||
End If
|
||||
If LegacySupport Then
|
||||
Send(wsf.FileData)
|
||||
Else
|
||||
Send(wsf)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
SharedMethods.RaiseError(Me, ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Gets the next object from the buffer, removing it from the buffer.
|
||||
''' </summary>
|
||||
''' <returns>
|
||||
''' A Deserialized object or if it can't be deserialized the byte array.
|
||||
''' </returns>
|
||||
Public Function [Get]() As Object
|
||||
Dim byt() As Byte = _asSock.GetData()
|
||||
If byt Is Nothing Then Return Nothing
|
||||
Return ObjectPacker.GetObject(byt)
|
||||
End Function
|
||||
''' <summary>
|
||||
''' Gets the next object from the buffer as the supplied type, removing it from the buffer.
|
||||
''' </summary>
|
||||
''' <typeparam name="dataType">The System.Type you wish to have the data returned as.</typeparam>
|
||||
''' <returns>
|
||||
''' A Deserialized object converted to the data type you wish.
|
||||
''' </returns>
|
||||
''' <remarks>
|
||||
''' This function was added to make it easier for Option Strict users.
|
||||
''' It allows for easier conversion instead of the user using CType, DirectCast, or the like.
|
||||
''' Can throw an error if you specify the wrong type.
|
||||
''' </remarks>
|
||||
Public Function [Get](Of dataType)() As dataType
|
||||
Dim byt() As Byte = _asSock.GetData()
|
||||
If byt Is Nothing Then Return Nothing
|
||||
Dim obj As Object
|
||||
If LegacySupport AndAlso GetType(dataType) Is GetType(String) Then
|
||||
obj = System.Text.Encoding.Default.GetString(byt)
|
||||
Else
|
||||
obj = ObjectPacker.GetObject(byt)
|
||||
End If
|
||||
Return DirectCast(obj, dataType)
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Gets the next object from the buffer, leaving it ing the buffer.
|
||||
''' </summary>
|
||||
''' <returns>
|
||||
''' A Deserialized object or if it can't be deserialized the byte array.
|
||||
''' </returns>
|
||||
Public Function Peek() As Object
|
||||
Dim byt() As Byte = _asSock.PeekData()
|
||||
If byt Is Nothing Then Return Nothing
|
||||
Return ObjectPacker.GetObject(byt)
|
||||
End Function
|
||||
''' <summary>
|
||||
''' Gets the next object from the buffer as the supplied type, leaving it in the buffer.
|
||||
''' </summary>
|
||||
''' <typeparam name="dataType">The System.Type you wish to have the data returned as.</typeparam>
|
||||
''' <returns>
|
||||
''' A Deserialized object converted to the data type you wish.
|
||||
''' </returns>
|
||||
''' <remarks>
|
||||
''' This function was added to make it easier for Option Strict users.
|
||||
''' It allows for easier conversion instead of the user using CType, DirectCast, or the like.
|
||||
''' Can throw an error if you specify the wrong type.
|
||||
''' </remarks>
|
||||
Public Function Peek(Of dataType)() As dataType
|
||||
Dim byt() As Byte = _asSock.PeekData()
|
||||
If byt Is Nothing Then Return Nothing
|
||||
Dim obj As Object
|
||||
If LegacySupport AndAlso GetType(dataType) Is GetType(String) Then
|
||||
obj = System.Text.Encoding.Default.GetString(byt)
|
||||
Else
|
||||
obj = ObjectPacker.GetObject(byt)
|
||||
End If
|
||||
Return DirectCast(obj, dataType)
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
@@ -1,571 +0,0 @@
|
||||
Imports System.ComponentModel
|
||||
|
||||
''' <summary>
|
||||
''' A collection of Winsock objects.
|
||||
''' </summary>
|
||||
Public Class WinsockCollection
|
||||
Inherits CollectionBase
|
||||
|
||||
|
||||
#Region " Private Members "
|
||||
|
||||
' These two hashtables store the key's and the values.
|
||||
' The base class's List store the GUID that ties the
|
||||
' keys to the values
|
||||
Private _keys As Hashtable
|
||||
Private _values As Hashtable
|
||||
|
||||
' These are for auto removal of the Winsock object
|
||||
' when the Winsock's Disconnected event is raised.
|
||||
Private _autoRemoval As Queue
|
||||
Private _autoRemove As Boolean = False
|
||||
|
||||
' These are for timing and removal of every Winsock
|
||||
' object in the collection - only used when the
|
||||
' Clear() method is run.
|
||||
Private _clearRemoval As Queue
|
||||
Private _clearRemove As Boolean = False
|
||||
Private _clearOK As Boolean = False
|
||||
|
||||
' Allows LegacySupport to work in a multi-client
|
||||
' environment
|
||||
Private _legacySupport As Boolean = False
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Constructor "
|
||||
|
||||
''' <summary>
|
||||
''' Initializes a new instance of the WinsockCollection class.
|
||||
''' </summary>
|
||||
''' <param name="auto_remove">
|
||||
''' Determines if the collection should automatically remove the
|
||||
''' connection when the Disconnected event is fired.
|
||||
''' </param>
|
||||
''' <param name="legacy_support">
|
||||
''' Enables LegacySupport for connections accepted using the
|
||||
''' collections Accept method.
|
||||
''' </param>
|
||||
Public Sub New(Optional ByVal auto_remove As Boolean = False, Optional ByVal legacy_support As Boolean = False)
|
||||
_keys = New Hashtable
|
||||
_values = New Hashtable
|
||||
_autoRemoval = New Queue
|
||||
_autoRemove = auto_remove
|
||||
_clearRemoval = New Queue
|
||||
_legacySupport = legacy_support
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Overriden Methods "
|
||||
|
||||
''' <summary>
|
||||
''' Run when the base class's list is finished clearing.
|
||||
''' Triggers clearing of the keys and values - closing
|
||||
''' all connections.
|
||||
''' </summary>
|
||||
Protected Overrides Sub OnClearComplete()
|
||||
MyBase.OnClearComplete()
|
||||
_keys.Clear()
|
||||
Dim b As Boolean = _autoRemove : _autoRemove = False
|
||||
_clearOK = False
|
||||
_clearRemove = True
|
||||
For Each wsk As Winsock In _values.Values
|
||||
wsk.Close()
|
||||
Next
|
||||
_clearOK = True
|
||||
_autoRemove = b
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Causes the CountChanged event to be triggered when an item is added to the collection.
|
||||
''' </summary>
|
||||
Protected Overrides Sub OnInsertComplete(ByVal index As Integer, ByVal value As Object)
|
||||
MyBase.OnInsertComplete(index, value)
|
||||
OnCountChanged(List.Count - 1, List.Count)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Causes the CountChanged event to be triggered when an item is removed from the collection.
|
||||
''' </summary>
|
||||
Protected Overrides Sub OnRemoveComplete(ByVal index As Integer, ByVal value As Object)
|
||||
MyBase.OnRemoveComplete(index, value)
|
||||
OnCountChanged(List.Count + 1, List.Count)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Private Methods "
|
||||
|
||||
''' <summary>
|
||||
''' Run during the Clearing of the collection.
|
||||
''' The method actually clears the values safely
|
||||
''' so as not to cause exceptions. Triggered via
|
||||
''' the last Disconnected event.
|
||||
''' </summary>
|
||||
Private Sub ClearAllValues()
|
||||
While _values.Count > 0
|
||||
If _clearOK AndAlso _clearRemoval.Count > 0 Then
|
||||
Dim i As Integer = _values.Count
|
||||
Dim gid2Rem As Guid = CType(_clearRemoval.Dequeue(), Guid)
|
||||
_values.Remove(gid2Rem)
|
||||
OnCountChanged(i, _values.Count)
|
||||
End If
|
||||
End While
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Attemps to retrieve the GUID of the item at the index specified.
|
||||
''' </summary>
|
||||
''' <param name="index">The zero-based index of the GUID you are attempting to find.</param>
|
||||
Private Function getGID(ByVal index As Integer) As Guid
|
||||
Return CType(List.Item(index), Guid)
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Attempts to retrieve the GUID of the item using the Key given to the item.
|
||||
''' </summary>
|
||||
''' <param name="key">The key whose GUID you are looking for.</param>
|
||||
Private Function getGID(ByVal key As Object) As Guid
|
||||
For Each gid As Guid In _keys.Keys
|
||||
If Object.ReferenceEquals(_keys(gid), key) Then Return gid
|
||||
Next
|
||||
Return Guid.Empty
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Removes the given GUID and it's ties from the collections.
|
||||
''' </summary>
|
||||
''' <param name="gid">The GUID to remove.</param>
|
||||
Private Sub RemoveGID(ByVal gid As Guid)
|
||||
If gid <> Guid.Empty Then
|
||||
CType(_values(gid), Winsock).Dispose()
|
||||
_values.Remove(gid)
|
||||
_keys.Remove(gid)
|
||||
List.Remove(gid)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Adds a winsock value to the collection.
|
||||
''' </summary>
|
||||
''' <param name="gid">The GUID of the object.</param>
|
||||
''' <param name="key">The Key of the object (may be nothing).</param>
|
||||
''' <param name="value">The Winsock that is to be added to the collection.</param>
|
||||
''' <remarks>Attaches handlers to each Winsock event so the collection can act as a proxy.</remarks>
|
||||
Private Sub Add(ByVal gid As Guid, ByVal key As Object, ByVal value As Winsock)
|
||||
AddHandler value.Connected, AddressOf OnConnected
|
||||
AddHandler value.ConnectionRequest, AddressOf OnConnectionRequest
|
||||
AddHandler value.DataArrival, AddressOf OnDataArrival
|
||||
AddHandler value.Disconnected, AddressOf OnDisconnected
|
||||
AddHandler value.ErrorReceived, AddressOf OnErrorReceived
|
||||
AddHandler value.SendComplete, AddressOf OnSendComplete
|
||||
AddHandler value.SendProgress, AddressOf OnSendProgress
|
||||
AddHandler value.StateChanged, AddressOf OnStateChanged
|
||||
_keys.Add(gid, key)
|
||||
_values.Add(gid, value)
|
||||
List.Add(gid)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Method to remove an object automatically - threaded to avoid problems.
|
||||
''' </summary>
|
||||
Private Sub RemovalThread()
|
||||
Threading.Thread.Sleep(50)
|
||||
Dim gid As Guid = CType(_autoRemoval.Dequeue(), Guid)
|
||||
RemoveGID(gid)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Public Methods "
|
||||
|
||||
''' <summary>
|
||||
''' Retrieves the GUID assigned to the specified Winsock object in the collection.
|
||||
''' </summary>
|
||||
''' <param name="value">The Winsock object to find the GUID of.</param>
|
||||
Public Function findGID(ByVal value As Winsock) As Guid
|
||||
If Not ContainsValue(value) Then Return Guid.Empty
|
||||
For Each gid As Guid In _values.Keys
|
||||
If Object.ReferenceEquals(_values(gid), value) Then Return gid
|
||||
Next
|
||||
Return Guid.Empty
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Retrieves the Key assigned to the specified Winsock object in the collection.
|
||||
''' </summary>
|
||||
''' <param name="value">The Winsock object to find the Key of.</param>
|
||||
''' <returns>The key object that was assigned to the Winsock - may be Nothing.</returns>
|
||||
Public Function findKey(ByVal value As Winsock) As Object
|
||||
Dim gid As Guid = findGID(value)
|
||||
If gid = Guid.Empty Then Return Nothing
|
||||
Return _keys(gid)
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Determines if the collection contains the key specified.
|
||||
''' </summary>
|
||||
''' <param name="key">The key to search the collection for.</param>
|
||||
Public Function ContainsKey(ByVal key As Object) As Boolean
|
||||
If key Is Nothing Then
|
||||
Throw New ArgumentNullException("key")
|
||||
End If
|
||||
Return _keys.ContainsValue(key)
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Determines if the collection contains the specified value.
|
||||
''' </summary>
|
||||
''' <param name="value">The value to search the collection for.</param>
|
||||
Public Function ContainsValue(ByVal value As Winsock) As Boolean
|
||||
Return _values.ContainsValue(value)
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Removes the value at the specified index. Use this instead of RemoveAt.
|
||||
''' </summary>
|
||||
''' <param name="index">The zero-based index of the item you wish to remove.</param>
|
||||
Public Sub Remove(ByVal index As Integer)
|
||||
Dim gid As Guid = getGID(index)
|
||||
RemoveGID(gid)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Removes the value with the specified key.
|
||||
''' </summary>
|
||||
''' <param name="key">The key of the value you wish to remove.</param>
|
||||
Public Sub Remove(ByVal key As Object)
|
||||
If TypeOf (key) Is Integer Then
|
||||
Dim gidIndex As Guid = getGID(CInt(key))
|
||||
RemoveGID(gidIndex)
|
||||
Exit Sub
|
||||
End If
|
||||
If Not ContainsKey(key) Then Exit Sub
|
||||
Dim gid As Guid = getGID(key)
|
||||
RemoveGID(gid)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Removes the value with the specified Guid.
|
||||
''' </summary>
|
||||
''' <param name="gid">The Guid of the value you wish to remove.</param>
|
||||
Public Sub Remove(ByVal gid As Guid)
|
||||
RemoveGID(gid)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Adds a value to the collection.
|
||||
''' </summary>
|
||||
''' <param name="value">The Winsock object to add to the collection.</param>
|
||||
''' <returns>Returns the GUID assigned to the element.</returns>
|
||||
Public Function Add(ByVal value As Winsock) As Guid
|
||||
Dim gid As Guid = Guid.NewGuid()
|
||||
Add(gid, Nothing, value)
|
||||
Return gid
|
||||
End Function
|
||||
''' <summary>
|
||||
''' Adds a value to the collection.
|
||||
''' </summary>
|
||||
''' <param name="value">The Winsock object to add to the collection.</param>
|
||||
''' <param name="key">The Key of the element to add.</param>
|
||||
''' <returns>Returns the GUID assigned to the element.</returns>
|
||||
Public Function Add(ByVal value As Winsock, ByVal key As Object) As Guid
|
||||
Dim gid As Guid = Guid.NewGuid()
|
||||
Add(gid, key, value)
|
||||
Return gid
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Accepts an incoming connection and adds it to the collection.
|
||||
''' </summary>
|
||||
''' <param name="client">The client to accept.</param>
|
||||
''' <returns>Returns the GUID assigned to the element.</returns>
|
||||
Public Function Accept(ByVal client As System.Net.Sockets.Socket) As Guid
|
||||
Dim wsk As New Winsock()
|
||||
wsk.LegacySupport = _legacySupport
|
||||
Dim gid As Guid = Add(wsk, Nothing)
|
||||
wsk.Accept(client)
|
||||
Return gid
|
||||
End Function
|
||||
''' <summary>
|
||||
''' Accepts an incoming connection and adds it to the collection.
|
||||
''' </summary>
|
||||
''' <param name="client">The client to accept.</param>
|
||||
''' <param name="key">The Key of the element to add.</param>
|
||||
''' <returns>Returns the GUID assigned to the element.</returns>
|
||||
Public Function Accept(ByVal client As System.Net.Sockets.Socket, ByVal key As Object) As Guid
|
||||
Dim wsk As New Winsock()
|
||||
wsk.LegacySupport = _legacySupport
|
||||
Dim gid As Guid = Me.Add(wsk, key)
|
||||
wsk.Accept(client)
|
||||
Return gid
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Connects to a remote host and adds it to the collection.
|
||||
''' </summary>
|
||||
''' <param name="remoteHostOrIP">A <see cref="System.String" /> containing the Hostname or IP address of the remote host.</param>
|
||||
''' <param name="remotePort">A value indicating the port on the remote host to connect to.</param>
|
||||
''' <returns>Return the GUID assigned to the element.</returns>
|
||||
Public Function Connect(ByVal remoteHostOrIP As String, ByVal remotePort As Integer) As Guid
|
||||
Dim wsk As New Winsock()
|
||||
wsk.Protocol = WinsockProtocol.Tcp
|
||||
wsk.LegacySupport = _legacySupport
|
||||
Dim gid As Guid = Add(wsk, Nothing)
|
||||
CType(_values(gid), Winsock).Connect(remoteHostOrIP, remotePort)
|
||||
End Function
|
||||
''' <summary>
|
||||
''' Connects to a remote host and adds it to the collection.
|
||||
''' </summary>
|
||||
''' <param name="remoteHostOrIP">A <see cref="System.String" /> containing the Hostname or IP address of the remote host.</param>
|
||||
''' <param name="remotePort">A value indicating the port on the remote host to connect to.</param>
|
||||
''' <param name="key">The Key of the element to add.</param>
|
||||
''' <returns>Return the GUID assigned to the element.</returns>
|
||||
Public Function Connect(ByVal remoteHostOrIP As String, ByVal remotePort As Integer, ByVal key As Object) As Guid
|
||||
Dim wsk As New Winsock()
|
||||
wsk.Protocol = WinsockProtocol.Tcp
|
||||
wsk.LegacySupport = _legacySupport
|
||||
Dim gid As Guid = Add(wsk, key)
|
||||
CType(_values(gid), Winsock).Connect(remoteHostOrIP, remotePort)
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Gets an Array of all the remote IP addresses of each connection in this collection.
|
||||
''' </summary>
|
||||
Public Function GetRemoteIPs() As ArrayList
|
||||
Dim ar As New ArrayList
|
||||
For Each key As Object In _values.Keys
|
||||
ar.Add(CType(_values(key), Winsock).RemoteHost)
|
||||
Next
|
||||
Return ar
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Public Properties "
|
||||
|
||||
''' <summary>
|
||||
''' Gets a Collection containing all the keys in this collection.
|
||||
''' </summary>
|
||||
Public ReadOnly Property Keys() As System.Collections.ICollection
|
||||
Get
|
||||
Return _keys.Values()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets a Collection containing all the values in this collection.
|
||||
''' </summary>
|
||||
Public ReadOnly Property Values() As System.Collections.ICollection
|
||||
Get
|
||||
Return _values.Values
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets or sets the Winsock at the specified index.
|
||||
''' </summary>
|
||||
''' <param name="index">A zero-based index of the Winsock to get or set.</param>
|
||||
Default Public Property Item(ByVal index As Integer) As Winsock
|
||||
Get
|
||||
Dim gid As Guid = getGID(index)
|
||||
Return CType(_values(gid), Winsock)
|
||||
End Get
|
||||
Set(ByVal value As Winsock)
|
||||
Dim gid As Guid = getGID(index)
|
||||
If Not _values.ContainsKey(gid) Then
|
||||
Add(gid, Nothing, value)
|
||||
Else
|
||||
_values(gid) = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets or sets the Winsock associated with the specified key.
|
||||
''' </summary>
|
||||
''' <param name="key">The key whose value to get or set.</param>
|
||||
Default Public Property Item(ByVal key As Object) As Winsock
|
||||
Get
|
||||
Dim gid As Guid = getGID(key)
|
||||
Return CType(_values(gid), Winsock)
|
||||
End Get
|
||||
Set(ByVal value As Winsock)
|
||||
Dim gid As Guid = getGID(key)
|
||||
If Not _values.ContainsKey(gid) Then
|
||||
Add(gid, Nothing, value)
|
||||
Else
|
||||
_values(gid) = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets or sets the Winsock associated with the specified GUID.
|
||||
''' </summary>
|
||||
''' <param name="gid">The GUID whose value to get or set.</param>
|
||||
Default Public Property Item(ByVal gid As Guid) As Winsock
|
||||
Get
|
||||
Return CType(_values(gid), Winsock)
|
||||
End Get
|
||||
Set(ByVal value As Winsock)
|
||||
If Not _values.ContainsKey(gid) Then
|
||||
Add(gid, Nothing, value)
|
||||
Else
|
||||
_values(gid) = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Events "
|
||||
|
||||
''' <summary>
|
||||
''' Occurs when connection is achieved (client and server).
|
||||
''' </summary>
|
||||
Public Event Connected(ByVal sender As Object, ByVal e As WinsockConnectedEventArgs)
|
||||
''' <summary>
|
||||
''' Occurs on the server when a client is attempting to connect.
|
||||
''' </summary>
|
||||
''' <remarks>Client registers connected at this point. Server must Accept in order for it to be connected.</remarks>
|
||||
Public Event ConnectionRequest(ByVal sender As Object, ByVal e As WinsockConnectionRequestEventArgs)
|
||||
''' <summary>
|
||||
''' Occurs when the number of items in the collection has changed.
|
||||
''' </summary>
|
||||
Public Event CountChanged(ByVal sender As Object, ByVal e As WinsockCollectionCountChangedEventArgs)
|
||||
''' <summary>
|
||||
''' Occurs when data arrives on the socket.
|
||||
''' </summary>
|
||||
''' <remarks>Raised only after all parts of the data have been collected.</remarks>
|
||||
Public Event DataArrival(ByVal sender As Object, ByVal e As WinsockDataArrivalEventArgs)
|
||||
''' <summary>
|
||||
''' Occurs when disconnected from the remote computer (client and server).
|
||||
''' </summary>
|
||||
Public Event Disconnected(ByVal sender As Object, ByVal e As System.EventArgs)
|
||||
''' <summary>
|
||||
''' Occurs when an error is detected in the socket.
|
||||
''' </summary>
|
||||
''' <remarks>May also be raised on disconnected (depending on disconnect circumstance).</remarks>
|
||||
Public Event ErrorReceived(ByVal sender As Object, ByVal e As WinsockErrorReceivedEventArgs)
|
||||
''' <summary>
|
||||
''' Occurs when sending of data is completed.
|
||||
''' </summary>
|
||||
Public Event SendComplete(ByVal sender As Object, ByVal e As WinsockSendEventArgs)
|
||||
''' <summary>
|
||||
''' Occurs when the send buffer has been sent but not all the data has been sent yet.
|
||||
''' </summary>
|
||||
Public Event SendProgress(ByVal sender As Object, ByVal e As WinsockSendEventArgs)
|
||||
''' <summary>
|
||||
''' Occurs when the state of the socket changes.
|
||||
''' </summary>
|
||||
Public Event StateChanged(ByVal sender As Object, ByVal e As WinsockStateChangedEventArgs)
|
||||
|
||||
''' <summary>
|
||||
''' Triggers an event declared at module level within a class, form, or document in a thread-safe manner.
|
||||
''' </summary>
|
||||
''' <param name="ev">The event to be raised.</param>
|
||||
''' <param name="args">The arguements for the event.</param>
|
||||
Private Sub RaiseEventSafe(ByVal ev As System.Delegate, ByRef args() As Object)
|
||||
Dim bFired As Boolean
|
||||
If ev IsNot Nothing Then
|
||||
For Each singleCast As System.Delegate In ev.GetInvocationList()
|
||||
bFired = False
|
||||
Try
|
||||
Dim syncInvoke As ISynchronizeInvoke = CType(singleCast.Target, ISynchronizeInvoke)
|
||||
If syncInvoke IsNot Nothing AndAlso syncInvoke.InvokeRequired Then
|
||||
bFired = True
|
||||
syncInvoke.BeginInvoke(singleCast, args)
|
||||
Else
|
||||
bFired = True
|
||||
singleCast.DynamicInvoke(args)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
If Not bFired Then singleCast.DynamicInvoke(args)
|
||||
End Try
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Raises the Connected event.
|
||||
''' </summary>
|
||||
Protected Friend Sub OnConnected(ByVal sender As Object, ByVal e As WinsockConnectedEventArgs)
|
||||
RaiseEventSafe(ConnectedEvent, New Object() {sender, e})
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Raises the ConnectionRequest event, and closes the socket if the ConnectionRequest was rejected.
|
||||
''' </summary>
|
||||
Protected Friend Sub OnConnectionRequest(ByVal sender As Object, ByVal e As WinsockConnectionRequestEventArgs)
|
||||
RaiseEventSafe(ConnectionRequestEvent, New Object() {sender, e})
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Raises the DataArrival event.
|
||||
''' </summary>
|
||||
Protected Friend Sub OnDataArrival(ByVal sender As Object, ByVal e As WinsockDataArrivalEventArgs)
|
||||
RaiseEventSafe(DataArrivalEvent, New Object() {sender, e})
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Raises the Disconnected Event.
|
||||
''' </summary>
|
||||
Protected Friend Sub OnDisconnected(ByVal sender As Object, ByVal e As System.EventArgs)
|
||||
RaiseEventSafe(DisconnectedEvent, New Object() {sender, e})
|
||||
If _clearRemove Then
|
||||
Dim gid As Guid = findGID(CType(sender, Winsock))
|
||||
_clearRemoval.Enqueue(gid)
|
||||
If _clearRemoval.Count = _values.Count Then
|
||||
Dim thd As New Threading.Thread(AddressOf ClearAllValues)
|
||||
thd.Start()
|
||||
_clearRemove = False
|
||||
End If
|
||||
ElseIf _autoRemove Then
|
||||
Dim gid As Guid = findGID(CType(sender, Winsock))
|
||||
_autoRemoval.Enqueue(gid)
|
||||
Dim thd As New Threading.Thread(AddressOf RemovalThread)
|
||||
thd.Start()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Raises the ErrorReceived event.
|
||||
''' </summary>
|
||||
Protected Friend Sub OnErrorReceived(ByVal sender As Object, ByVal e As WinsockErrorReceivedEventArgs)
|
||||
RaiseEventSafe(ErrorReceivedEvent, New Object() {sender, e})
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Raises the SendComplete event.
|
||||
''' </summary>
|
||||
Protected Friend Sub OnSendComplete(ByVal sender As Object, ByVal e As WinsockSendEventArgs)
|
||||
RaiseEventSafe(SendCompleteEvent, New Object() {sender, e})
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Raises the SendProgress event.
|
||||
''' </summary>
|
||||
Protected Friend Sub OnSendProgress(ByVal sender As Object, ByVal e As WinsockSendEventArgs)
|
||||
RaiseEventSafe(SendProgressEvent, New Object() {sender, e})
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Raises the StateChanged event.
|
||||
''' </summary>
|
||||
Protected Friend Sub OnStateChanged(ByVal sender As Object, ByVal e As WinsockStateChangedEventArgs)
|
||||
RaiseEventSafe(StateChangedEvent, New Object() {sender, e})
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Raises the count changed event.
|
||||
''' </summary>
|
||||
Private Sub OnCountChanged(ByVal old_count As Integer, ByVal new_count As Integer)
|
||||
Dim e As New WinsockCollectionCountChangedEventArgs(old_count, new_count)
|
||||
RaiseEventSafe(CountChangedEvent, New Object() {Me, e})
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
@@ -1,236 +0,0 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.ComponentModel.Design
|
||||
Imports Microsoft.VisualBasic
|
||||
|
||||
''' <summary>
|
||||
''' Winsock designer class provides designer time support for the Winsock component.
|
||||
''' </summary>
|
||||
Public Class WinsockDesigner
|
||||
Inherits System.ComponentModel.Design.ComponentDesigner
|
||||
|
||||
Private lists As DesignerActionListCollection
|
||||
|
||||
''' <summary>
|
||||
''' Creates a new instance of the WinsockDesigner class.
|
||||
''' </summary>
|
||||
''' <remarks></remarks>
|
||||
Public Sub New()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Initializes this instance of the WinsockDesigner class.
|
||||
''' </summary>
|
||||
''' <param name="component">The base component of the designer.</param>
|
||||
Public Overrides Sub Initialize(ByVal component As System.ComponentModel.IComponent)
|
||||
MyBase.Initialize(component)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Gets the Verb collection.
|
||||
''' </summary>
|
||||
''' <remarks>
|
||||
''' The Verb collection is used to display links at the
|
||||
''' bottom of the description in the Properties pane.
|
||||
''' </remarks>
|
||||
Public Overrides ReadOnly Property Verbs() As System.ComponentModel.Design.DesignerVerbCollection
|
||||
Get
|
||||
Return New DesignerVerbCollection()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets the Action list collection.
|
||||
''' </summary>
|
||||
''' <remarks>
|
||||
''' The Action list collection is used for the Smart Tag
|
||||
''' popup to provide easy access to various properties/actions.
|
||||
''' </remarks>
|
||||
Public Overrides ReadOnly Property ActionLists() As DesignerActionListCollection
|
||||
Get
|
||||
If lists Is Nothing Then
|
||||
lists = New DesignerActionListCollection()
|
||||
lists.Add(New WinsockActionList(Me.Component))
|
||||
End If
|
||||
Return lists
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
|
||||
''' <summary>
|
||||
''' Provides the action list for the Winsock component during design time.
|
||||
''' </summary>
|
||||
Public Class WinsockActionList
|
||||
Inherits DesignerActionList
|
||||
|
||||
Private _wsk As Winsock
|
||||
Private designerActionUISvc As DesignerActionUIService = Nothing
|
||||
|
||||
Private host As IDesignerHost
|
||||
Private parentDesigner As IDesigner
|
||||
|
||||
''' <summary>
|
||||
''' Initializes a new instance of the WinsockActionList class.
|
||||
''' </summary>
|
||||
''' <param name="component">The component used in initialization.</param>
|
||||
Public Sub New(ByVal component As IComponent)
|
||||
MyBase.New(component)
|
||||
Me._wsk = CType(component, Winsock)
|
||||
|
||||
Me.designerActionUISvc = CType(GetService(GetType(DesignerActionUIService)), DesignerActionUIService)
|
||||
|
||||
Me.host = Me.Component.Site.GetService(GetType(IDesignerHost))
|
||||
|
||||
Me.parentDesigner = host.GetDesigner(Me.Component)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Gets or sets a value indicating if Legacy support should be used or not.
|
||||
''' </summary>
|
||||
''' <remarks>Legacy support is to support older winsock style connections.</remarks>
|
||||
Public Property LegacySupport() As Boolean
|
||||
Get
|
||||
Return _wsk.LegacySupport
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
GetPropertyByName("LegacySupport").SetValue(_wsk, value)
|
||||
Me.designerActionUISvc.Refresh(Me.Component)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets or sets the winsock protocol to use when communicating with the remote computer.
|
||||
''' </summary>
|
||||
Public Property Protocol() As WinsockProtocol
|
||||
Get
|
||||
Return _wsk.Protocol
|
||||
End Get
|
||||
Set(ByVal value As WinsockProtocol)
|
||||
GetPropertyByName("Protocol").SetValue(_wsk, value)
|
||||
Me.designerActionUISvc.Refresh(Me.Component)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Builds and retrieves the Action list itself.
|
||||
''' </summary>
|
||||
Public Overrides Function GetSortedActionItems() As DesignerActionItemCollection
|
||||
Dim items As New DesignerActionItemCollection()
|
||||
|
||||
' create the headers
|
||||
items.Add(New DesignerActionHeaderItem("Appearance & Behavior"))
|
||||
items.Add(New DesignerActionHeaderItem("Events"))
|
||||
items.Add(New DesignerActionHeaderItem("About"))
|
||||
|
||||
' add the properties
|
||||
items.Add(New DesignerActionPropertyItem("LegacySupport", "Legacy Support", "Appearance & Behavior", "Enables legacy (VB6) send/receive support."))
|
||||
items.Add(New DesignerActionPropertyItem("Protocol", "Protocol", "Appearance & Behavior", "Specifies whether the component should use the TCP or UDP protocol."))
|
||||
|
||||
' add the events
|
||||
items.Add(New DesignerActionMethodItem(Me, "TriggerConnectedEvent", "Connected", "Events", "Takes you to the handler for the Connected event.", False))
|
||||
items.Add(New DesignerActionMethodItem(Me, "TriggerConnectionRequestEvent", "ConnectionRequest", "Events", "Takes you to the handler for the ConnectionRequest event.", False))
|
||||
items.Add(New DesignerActionMethodItem(Me, "TriggerDataArrivalEvent", "DataArrival", "Events", "Takes you to the handler for the DataArrival event.", False))
|
||||
items.Add(New DesignerActionMethodItem(Me, "TriggerDisconnectedEvent", "Disconnected", "Events", "Takes you to the handler for the Disconnected event.", False))
|
||||
items.Add(New DesignerActionMethodItem(Me, "TriggerErrorReceivedEvent", "ErrorReceived", "Events", "Takes you to the handler for the ErrorReceived event.", False))
|
||||
items.Add(New DesignerActionMethodItem(Me, "TriggerStateChangedEvent", "StateChanged", "Events", "Takes you to the handler for the StateChanged event.", False))
|
||||
|
||||
' add support items
|
||||
Dim ver As String = String.Format("{0}.{1}.{2}", My.Application.Info.Version.Major, My.Application.Info.Version.Minor, My.Application.Info.Version.Build)
|
||||
items.Add(New DesignerActionMethodItem(Me, "ShowAbout", "About Winsock " & ver, "About", "Displays the about box.", False))
|
||||
items.Add(New DesignerActionMethodItem(Me, "LaunchWebSite", "Kolkman Koding Website", "About", "Opens the author's website.", False))
|
||||
|
||||
Return items
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Gets the property information by the given name.
|
||||
''' </summary>
|
||||
''' <param name="propName">The name of the property to get.</param>
|
||||
Private Function GetPropertyByName(ByVal propName As String) As PropertyDescriptor
|
||||
Dim prop As PropertyDescriptor
|
||||
prop = TypeDescriptor.GetProperties(_wsk)(propName)
|
||||
If prop Is Nothing Then
|
||||
Throw New ArgumentException("Invalid property.", propName)
|
||||
Else
|
||||
Return prop
|
||||
End If
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Shows the about box.
|
||||
''' </summary>
|
||||
Public Sub ShowAbout()
|
||||
Dim f As New frmAbout()
|
||||
f.ShowDialog()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Launches the author's website.
|
||||
''' </summary>
|
||||
Public Sub LaunchWebSite()
|
||||
System.Diagnostics.Process.Start("http://www.k-koding.com")
|
||||
End Sub
|
||||
|
||||
Public Sub TriggerConnectedEvent()
|
||||
CreateAndShowEvent("Connected")
|
||||
End Sub
|
||||
Public Sub TriggerConnectionRequestEvent()
|
||||
CreateAndShowEvent("ConnectionRequest")
|
||||
End Sub
|
||||
Public Sub TriggerDataArrivalEvent()
|
||||
CreateAndShowEvent("DataArrival")
|
||||
End Sub
|
||||
Public Sub TriggerDisconnectedEvent()
|
||||
CreateAndShowEvent("Disconnected")
|
||||
End Sub
|
||||
Public Sub TriggerErrorReceivedEvent()
|
||||
CreateAndShowEvent("ErrorReceived")
|
||||
End Sub
|
||||
Public Sub TriggerStateChangedEvent()
|
||||
CreateAndShowEvent("StateChanged")
|
||||
End Sub
|
||||
|
||||
Private Sub CreateAndShowEvent(ByVal eventName As String)
|
||||
Dim evService As IEventBindingService = CType(Me.Component.Site.GetService(GetType(System.ComponentModel.Design.IEventBindingService)), IEventBindingService)
|
||||
Dim ev As EventDescriptor = GetEvent(evService, eventName)
|
||||
If ev IsNot Nothing Then
|
||||
CreateEvent(evService, ev)
|
||||
Me.designerActionUISvc.HideUI(Me.Component)
|
||||
evService.ShowCode(Me.Component, ev)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CreateEvent(ByRef evService As IEventBindingService, ByVal ev As EventDescriptor)
|
||||
Dim epd As PropertyDescriptor = evService.GetEventProperty(ev)
|
||||
Dim strEventName As String = Me.Component.Site.Name & "_" & ev.Name
|
||||
Dim existing As Object = epd.GetValue(Me.Component)
|
||||
'Only create if there isn't already a handler
|
||||
If existing Is Nothing Then
|
||||
epd.SetValue(Me.Component, strEventName)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function GetEvent(ByRef evService As IEventBindingService, ByVal eventName As String) As EventDescriptor
|
||||
If evService Is Nothing Then Return Nothing
|
||||
' Attempt to obtain a PropertyDescriptor for a
|
||||
' component event named "testEvent".
|
||||
Dim edc As EventDescriptorCollection = TypeDescriptor.GetEvents(Me.Component)
|
||||
If edc Is Nothing Or edc.Count = 0 Then
|
||||
Return Nothing
|
||||
End If
|
||||
Dim ed As EventDescriptor = Nothing
|
||||
' Search for an event named "Connected".
|
||||
Dim edi As EventDescriptor
|
||||
For Each edi In edc
|
||||
If edi.Name = eventName Then
|
||||
ed = edi
|
||||
Exit For
|
||||
End If
|
||||
Next edi
|
||||
If ed Is Nothing Then
|
||||
Return Nothing
|
||||
End If
|
||||
Return ed
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -1,83 +0,0 @@
|
||||
''' <summary>
|
||||
''' A class that wraps a file allowing you to serialize it for transport.
|
||||
''' </summary>
|
||||
<Serializable()> _
|
||||
Public Class WinsockFileData
|
||||
|
||||
#Region " Private Members "
|
||||
|
||||
Private _fileData() As Byte ' Stores the file data
|
||||
Private _fileName As String ' Stores the file name
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Constructor "
|
||||
|
||||
''' <summary>
|
||||
''' Initializes a new instance of the WinsockFileData class.
|
||||
''' </summary>
|
||||
Public Sub New()
|
||||
_fileData = Nothing
|
||||
_fileName = Nothing
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Properties "
|
||||
|
||||
''' <summary>
|
||||
''' Gets or sets the name of the file.
|
||||
''' </summary>
|
||||
Public Property FileName() As String
|
||||
Get
|
||||
Return _fileName
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
_fileName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Gets or sets the contents of the file.
|
||||
''' </summary>
|
||||
Public Property FileData() As Byte()
|
||||
Get
|
||||
Return _fileData
|
||||
End Get
|
||||
Set(ByVal value As Byte())
|
||||
_fileData = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Methods "
|
||||
|
||||
''' <summary>
|
||||
''' Saves the file to the specified path.
|
||||
''' </summary>
|
||||
''' <param name="save_path">The full path of the file to save to.</param>
|
||||
''' <param name="append">Whether you want to append the data to the end of an existing file or not.</param>
|
||||
Public Sub SaveFile(ByVal save_path As String, Optional ByVal append As Boolean = False)
|
||||
My.Computer.FileSystem.WriteAllBytes(save_path, _fileData, append)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Reads a file into the WinsockFileData class.
|
||||
''' </summary>
|
||||
''' <param name="file_path">The full path of the file you want to read.</param>
|
||||
Public Function ReadFile(ByVal file_path As String) As Boolean
|
||||
Dim fi As IO.FileInfo = My.Computer.FileSystem.GetFileInfo(file_path)
|
||||
If fi.Exists Then
|
||||
ReDim _fileData(0)
|
||||
_fileName = fi.Name
|
||||
_fileData = My.Computer.FileSystem.ReadAllBytes(fi.FullName)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
146
Sub/WinsockOracs/Backup/frmAbout.Designer.vb
generated
146
Sub/WinsockOracs/Backup/frmAbout.Designer.vb
generated
@@ -1,146 +0,0 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class frmAbout
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Required by the Windows Form Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Windows Form Designer
|
||||
'It can be modified using the Windows Form Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAbout))
|
||||
Me.pctLogo = New System.Windows.Forms.PictureBox
|
||||
Me.txtAbout = New System.Windows.Forms.TextBox
|
||||
Me.cmdClose = New System.Windows.Forms.Button
|
||||
Me.TabControl1 = New System.Windows.Forms.TabControl
|
||||
Me.TabPage1 = New System.Windows.Forms.TabPage
|
||||
Me.TabPage2 = New System.Windows.Forms.TabPage
|
||||
Me.txtHistory = New System.Windows.Forms.TextBox
|
||||
CType(Me.pctLogo, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.TabControl1.SuspendLayout()
|
||||
Me.TabPage1.SuspendLayout()
|
||||
Me.TabPage2.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'pctLogo
|
||||
'
|
||||
Me.pctLogo.Anchor = System.Windows.Forms.AnchorStyles.Top
|
||||
Me.pctLogo.Image = Global.Winsock_Orcas.My.Resources.Resources.k_koding
|
||||
Me.pctLogo.Location = New System.Drawing.Point(169, 12)
|
||||
Me.pctLogo.Name = "pctLogo"
|
||||
Me.pctLogo.Size = New System.Drawing.Size(121, 120)
|
||||
Me.pctLogo.TabIndex = 0
|
||||
Me.pctLogo.TabStop = False
|
||||
'
|
||||
'txtAbout
|
||||
'
|
||||
Me.txtAbout.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.txtAbout.Location = New System.Drawing.Point(3, 3)
|
||||
Me.txtAbout.Multiline = True
|
||||
Me.txtAbout.Name = "txtAbout"
|
||||
Me.txtAbout.ReadOnly = True
|
||||
Me.txtAbout.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
|
||||
Me.txtAbout.Size = New System.Drawing.Size(420, 221)
|
||||
Me.txtAbout.TabIndex = 1
|
||||
'
|
||||
'cmdClose
|
||||
'
|
||||
Me.cmdClose.Location = New System.Drawing.Point(371, 397)
|
||||
Me.cmdClose.Name = "cmdClose"
|
||||
Me.cmdClose.Size = New System.Drawing.Size(75, 23)
|
||||
Me.cmdClose.TabIndex = 2
|
||||
Me.cmdClose.Text = "Close"
|
||||
Me.cmdClose.UseVisualStyleBackColor = True
|
||||
'
|
||||
'TabControl1
|
||||
'
|
||||
Me.TabControl1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.TabControl1.Controls.Add(Me.TabPage1)
|
||||
Me.TabControl1.Controls.Add(Me.TabPage2)
|
||||
Me.TabControl1.Location = New System.Drawing.Point(12, 138)
|
||||
Me.TabControl1.Name = "TabControl1"
|
||||
Me.TabControl1.SelectedIndex = 0
|
||||
Me.TabControl1.Size = New System.Drawing.Size(434, 253)
|
||||
Me.TabControl1.TabIndex = 3
|
||||
'
|
||||
'TabPage1
|
||||
'
|
||||
Me.TabPage1.BackColor = System.Drawing.SystemColors.Control
|
||||
Me.TabPage1.Controls.Add(Me.txtAbout)
|
||||
Me.TabPage1.Location = New System.Drawing.Point(4, 22)
|
||||
Me.TabPage1.Name = "TabPage1"
|
||||
Me.TabPage1.Padding = New System.Windows.Forms.Padding(3)
|
||||
Me.TabPage1.Size = New System.Drawing.Size(426, 227)
|
||||
Me.TabPage1.TabIndex = 0
|
||||
Me.TabPage1.Text = "About"
|
||||
'
|
||||
'TabPage2
|
||||
'
|
||||
Me.TabPage2.BackColor = System.Drawing.SystemColors.Control
|
||||
Me.TabPage2.Controls.Add(Me.txtHistory)
|
||||
Me.TabPage2.Location = New System.Drawing.Point(4, 22)
|
||||
Me.TabPage2.Name = "TabPage2"
|
||||
Me.TabPage2.Padding = New System.Windows.Forms.Padding(3)
|
||||
Me.TabPage2.Size = New System.Drawing.Size(426, 227)
|
||||
Me.TabPage2.TabIndex = 1
|
||||
Me.TabPage2.Text = "History"
|
||||
'
|
||||
'txtHistory
|
||||
'
|
||||
Me.txtHistory.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.txtHistory.Location = New System.Drawing.Point(3, 3)
|
||||
Me.txtHistory.Multiline = True
|
||||
Me.txtHistory.Name = "txtHistory"
|
||||
Me.txtHistory.ReadOnly = True
|
||||
Me.txtHistory.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
|
||||
Me.txtHistory.Size = New System.Drawing.Size(420, 221)
|
||||
Me.txtHistory.TabIndex = 0
|
||||
'
|
||||
'frmAbout
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(458, 432)
|
||||
Me.Controls.Add(Me.TabControl1)
|
||||
Me.Controls.Add(Me.cmdClose)
|
||||
Me.Controls.Add(Me.pctLogo)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmAbout"
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "About Winsock Orcas"
|
||||
CType(Me.pctLogo, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.TabControl1.ResumeLayout(False)
|
||||
Me.TabPage1.ResumeLayout(False)
|
||||
Me.TabPage1.PerformLayout()
|
||||
Me.TabPage2.ResumeLayout(False)
|
||||
Me.TabPage2.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents pctLogo As System.Windows.Forms.PictureBox
|
||||
Friend WithEvents txtAbout As System.Windows.Forms.TextBox
|
||||
Friend WithEvents cmdClose As System.Windows.Forms.Button
|
||||
Friend WithEvents TabControl1 As System.Windows.Forms.TabControl
|
||||
Friend WithEvents TabPage1 As System.Windows.Forms.TabPage
|
||||
Friend WithEvents TabPage2 As System.Windows.Forms.TabPage
|
||||
Friend WithEvents txtHistory As System.Windows.Forms.TextBox
|
||||
End Class
|
||||
@@ -1,149 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAEBAAAAAAAABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAA////ACJ6/wCioqIAeq//ALrc/wB/f38AxMTEAE2T/wCdxP8As7OzAI+PjwDP6/8AYqL/ADSI
|
||||
/wCLuf8ArM7/AJmZmQCHh4cAvLy8AKqqqgBYmv8AcKj/ALnQ/wAtf/8AP4r/AJK//wCDtf8ApMn/AGmk
|
||||
/wAoe/8AM4L/ALPR/wBQmP8Adaz/AF6e/wCXwP8Ay+n/AIe3/wB+sf8Ao8X/AI6+/wBtpf8AqMn/ALDQ
|
||||
/wBlo/8Acqv/ADGE/wBcnP8AkLz/AHeu/wCBs/8AIXz/AKbI/wBXmP8AlcH/AGqm/wAkev8AS5P/AJe+
|
||||
/wCQvv8Ahbf/AHCq/wB3rP8AJ3r/ADSD/wCx0f8ApMb/AGij/wCItv8AfbD/AKTI/wCjxv8AnsT/AJXA
|
||||
/wBlov8AZqP/AGmj/wBxqP8Acqr/AHWt/wB7r/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAABQAAAAABgAAAAAAAAAAAAAK
|
||||
FAMRCxIAAAAAAAAAAAAAAAoMJREAAAAAAAAAAAAAAAATChQDAAAAAAAAS1AVAAAAABcFAAAAADQONC4J
|
||||
LQA2IQAHEwAvGAA5ODRRSD4ADUQAAAAAOkEAHioCPUMEAAAzAAAAAEwAAB8dQABJPAAALhsWOE4hAAAI
|
||||
MAAAGjUmAAAAPh0AAAAITxkAAAAcRw8AAAAAAAAjP00AAAAAAEcQJEU9RjInKQQAAAAAAAAAOytCICwo
|
||||
SiIAAAAAAAAAAAAAOzcxDwAAAAAAAP//AAD3/wAA+98AAPgfAAD8PwAA/D8AAB54AAASSAAAE8gAABvY
|
||||
AACYGQAAjnEAAMfjAADgBwAA8A8AAPw/AAA=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,24 +0,0 @@
|
||||
Public Class frmAbout
|
||||
|
||||
Private Sub cmdClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdClose.Click
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub frmAbout_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
||||
txtAbout.Text = ReadFromAssembly("About.txt")
|
||||
txtHistory.Text = ReadFromAssembly("History.txt")
|
||||
End Sub
|
||||
|
||||
Private Function ReadFromAssembly(ByVal filename As String) As String
|
||||
Dim sRet As String = ""
|
||||
Dim executing_assembly As System.Reflection.Assembly = System.Reflection.Assembly.GetExecutingAssembly()
|
||||
Dim my_namespace As String = GetType(frmAbout).Namespace
|
||||
Dim text_stream As IO.Stream = executing_assembly.GetManifestResourceStream(my_namespace & "." & filename)
|
||||
If text_stream IsNot Nothing Then
|
||||
Dim stream_reader As New IO.StreamReader(text_stream)
|
||||
sRet = stream_reader.ReadToEnd()
|
||||
End If
|
||||
Return sRet
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -1,299 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- saved from url=(0014)about:internet -->
|
||||
<html xmlns:msxsl="urn:schemas-microsoft-com:xslt"><head><meta content="en-us" http-equiv="Content-Language" /><meta content="text/html; charset=utf-16" http-equiv="Content-Type" /><title _locID="ConversionReport0">
|
||||
마이그레이션 보고서
|
||||
</title><style>
|
||||
/* Body style, for the entire document */
|
||||
body
|
||||
{
|
||||
background: #F3F3F4;
|
||||
color: #1E1E1F;
|
||||
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Header1 style, used for the main title */
|
||||
h1
|
||||
{
|
||||
padding: 10px 0px 10px 10px;
|
||||
font-size: 21pt;
|
||||
background-color: #E2E2E2;
|
||||
border-bottom: 1px #C1C1C2 solid;
|
||||
color: #201F20;
|
||||
margin: 0;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* Header2 style, used for "Overview" and other sections */
|
||||
h2
|
||||
{
|
||||
font-size: 18pt;
|
||||
font-weight: normal;
|
||||
padding: 15px 0 5px 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Header3 style, used for sub-sections, such as project name */
|
||||
h3
|
||||
{
|
||||
font-weight: normal;
|
||||
font-size: 15pt;
|
||||
margin: 0;
|
||||
padding: 15px 0 5px 0;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/* Color all hyperlinks one color */
|
||||
a
|
||||
{
|
||||
color: #1382CE;
|
||||
}
|
||||
|
||||
/* Table styles */
|
||||
table
|
||||
{
|
||||
border-spacing: 0 0;
|
||||
border-collapse: collapse;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
table th
|
||||
{
|
||||
background: #E7E7E8;
|
||||
text-align: left;
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
padding: 3px 6px 3px 6px;
|
||||
}
|
||||
|
||||
table td
|
||||
{
|
||||
vertical-align: top;
|
||||
padding: 3px 6px 5px 5px;
|
||||
margin: 0px;
|
||||
border: 1px solid #E7E7E8;
|
||||
background: #F7F7F8;
|
||||
}
|
||||
|
||||
/* Local link is a style for hyperlinks that link to file:/// content, there are lots so color them as 'normal' text until the user mouse overs */
|
||||
.localLink
|
||||
{
|
||||
color: #1E1E1F;
|
||||
background: #EEEEED;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.localLink:hover
|
||||
{
|
||||
color: #1382CE;
|
||||
background: #FFFF99;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Center text, used in the over views cells that contain message level counts */
|
||||
.textCentered
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* The message cells in message tables should take up all avaliable space */
|
||||
.messageCell
|
||||
{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Padding around the content after the h1 */
|
||||
#content
|
||||
{
|
||||
padding: 0px 12px 12px 12px;
|
||||
}
|
||||
|
||||
/* The overview table expands to width, with a max width of 97% */
|
||||
#overview table
|
||||
{
|
||||
width: auto;
|
||||
max-width: 75%;
|
||||
}
|
||||
|
||||
/* The messages tables are always 97% width */
|
||||
#messages table
|
||||
{
|
||||
width: 97%;
|
||||
}
|
||||
|
||||
/* All Icons */
|
||||
.IconSuccessEncoded, .IconInfoEncoded, .IconWarningEncoded, .IconErrorEncoded
|
||||
{
|
||||
min-width:18px;
|
||||
min-height:18px;
|
||||
background-repeat:no-repeat;
|
||||
background-position:center;
|
||||
}
|
||||
|
||||
/* Success icon encoded */
|
||||
.IconSuccessEncoded
|
||||
{
|
||||
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
|
||||
/* [---XsltValidateInternal-Base64EncodedImage:IconSuccess#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABcElEQVR4Xq2TsUsCURzHv15g8ZJcBWlyiYYgCIWcb9DFRRwMW5TA2c0/QEFwFkxxUQdxVlBwCYWOi6IhWgQhBLHJUCkhLr/BW8S7gvrAg+N+v8/v+x68Z8MGy+XSCyABQAXgBgHGALoASkIIDWSLeLBetdHryMjd5IxQPWT4rn1c/P7+xxp72Cs9m5SZ0Bq2vPnbPFafK2zDvmNHypdC0BPkLlQhxJsCAhQoZwdZU5mwxh720qGo8MzTxTTKZDPCx2HoVzp6lz0Q9tKhyx0kGs8Ny+TkWRKk8lCROwEduhyg9l/6lunOPSfmH3NUH6uQ0KHLAe7JYvJjevm+DAMGJHToKtigE+vwvIidxLamb8IBY9e+C5LiXREkfho3TSd06HJA13/oh6T51MTsfQbHrsMynQ5dDihFjiK8JJAU9AKIWTp76dCVN7HWHrajmUEGvyF9nkbAE6gLIS7kTUyuf2gscLoJrElZo/Mvj+nPz/kLTmfnEwP3tB0AAAAASUVORK5CYII=);
|
||||
}
|
||||
|
||||
/* Information icon encoded */
|
||||
.IconInfoEncoded
|
||||
{
|
||||
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
|
||||
/* [---XsltValidateInternal-Base64EncodedImage:IconInformation#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABHElEQVR4Xs2TsUoDQRRF7wwoziokjZUKadInhdhukR9YP8DMX1hYW+QvdsXa/QHBbcXC7W0CamWTQnclFutceIQJwwaWNLlwm5k5d94M76mmaeCrrmsLYOocY12FcxZFUeozCqKqqgYA8uevv1H6VuPxcwlfk5N92KHBxfFeCSAxxswlYAW/Xr989x/mv9gkhtyMDhcAxgzRsp7flj8B/HF1RsMXq+NZMkopaHe7lbKxQUEIGbKsYNoGn969060hZBkQex/W8oRQwsQaW2o3Ago2SVcJUzAgY3N0lTCZZm+zPS8HB51gMmS1DEYyOz9acKO1D8JWTlafKIMxdhvlfdyT94Vv5h7P8Ky7nQzACmhvKq3zk3PjW9asz9D/1oigecsioooAAAAASUVORK5CYII=);
|
||||
}
|
||||
|
||||
/* Warning icon encoded */
|
||||
.IconWarningEncoded
|
||||
{
|
||||
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
|
||||
/* [---XsltValidateInternal-Base64EncodedImage:IconWarning#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAx0lEQVR4XpWSMQ7CMAxFf4xAyBMLCxMrO8dhaBcuwdCJS3RJBw7SA/QGTCxdWJgiQYWKXJWKIXHIlyw5lqr34tQgEOdcBsCOx5yZK3hCCKdYXneQkh4pEfqzLfu+wVDSyyzFoJjfz9NB+pAF+eizx2Vruts0k15mPgvS6GYvpVtQhB61IB/dk6AF6fS4Ben0uIX5odtFe8Q/eW1KvFeH4e8khT6+gm5B+t3juyDt7n0jpe+CANTd+oTUjN/U3yVaABnSUjFz/gFq44JaVSCXeQAAAABJRU5ErkJggg==);
|
||||
}
|
||||
|
||||
/* Error icon encoded */
|
||||
.IconErrorEncoded
|
||||
{
|
||||
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
|
||||
/* [---XsltValidateInternal-Base64EncodedImage:IconError#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABQElEQVR4XqWTvUoEQRCE6wYPZUA80AfwAQz23uCMjA7MDRQEIzPBVEyNTQUFIw00vcQTTMzuAh/AxEQQT8HF/3G/oGGnEUGuoNnd6qoZuqltyKEsyzVJq5I6rnUp6SjGeGhESikzzlc1eL7opfuVbrqbU1Zw9NCgtQMaZpY0eNnaaL2fHusvTK5vKu7sjSS1Y4y3QUA6K3e3Mau5UFDyMP7tYF9o8cAHZv68vipoIJg971PZIZ5HiwdvYGGvFVFHmGmZ2MxwmQYPXubPl9Up0tfoMQGetXd6mRbvhBw+boZ6WF7Mbv1+GsHRk0fQmPAH1GfmZirbCfDJ61tw3Px8/8pZsPAG4jlVhcPgZ7adwNWBB68lkRQWFiTgFlbnLY3DGGM7izIJIyT/jjIvEJw6fdJTc6krDzh6aMwMP9bvDH4ADSsa9uSWVJkAAAAASUVORK5CYII=);
|
||||
}
|
||||
</style><script type="text/javascript" language="javascript">
|
||||
|
||||
// Startup
|
||||
// Hook up the the loaded event for the document/window, to linkify the document content
|
||||
var startupFunction = function() { linkifyElement("messages"); };
|
||||
|
||||
if(window.attachEvent)
|
||||
{
|
||||
window.attachEvent('onload', startupFunction);
|
||||
}
|
||||
else if (window.addEventListener)
|
||||
{
|
||||
window.addEventListener('load', startupFunction, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
document.addEventListener('load', startupFunction, false);
|
||||
}
|
||||
|
||||
// Toggles the visibility of table rows with the specified name
|
||||
function toggleTableRowsByName(name)
|
||||
{
|
||||
var allRows = document.getElementsByTagName('tr');
|
||||
for (i=0; i < allRows.length; i++)
|
||||
{
|
||||
var currentName = allRows[i].getAttribute('name');
|
||||
if(!!currentName && currentName.indexOf(name) == 0)
|
||||
{
|
||||
var isVisible = allRows[i].style.display == '';
|
||||
isVisible ? allRows[i].style.display = 'none' : allRows[i].style.display = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function scrollToFirstVisibleRow(name)
|
||||
{
|
||||
var allRows = document.getElementsByTagName('tr');
|
||||
for (i=0; i < allRows.length; i++)
|
||||
{
|
||||
var currentName = allRows[i].getAttribute('name');
|
||||
var isVisible = allRows[i].style.display == '';
|
||||
if(!!currentName && currentName.indexOf(name) == 0 && isVisible)
|
||||
{
|
||||
allRows[i].scrollIntoView(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Linkifies the specified text content, replaces candidate links with html links
|
||||
function linkify(text)
|
||||
{
|
||||
if(!text || 0 === text.length)
|
||||
{
|
||||
return text;
|
||||
}
|
||||
|
||||
// Find http, https and ftp links and replace them with hyper links
|
||||
var urlLink = /(http|https|ftp)\:\/\/[a-zA-Z0-9\-\.]+(:[a-zA-Z0-9]*)?\/?([a-zA-Z0-9\-\._\?\,\/\\\+&%\$#\=~;\{\}])*/gi;
|
||||
|
||||
return text.replace(urlLink, '<a href="$&">$&</a>') ;
|
||||
}
|
||||
|
||||
// Linkifies the specified element by ID
|
||||
function linkifyElement(id)
|
||||
{
|
||||
var element = document.getElementById(id);
|
||||
if(!!element)
|
||||
{
|
||||
element.innerHTML = linkify(element.innerHTML);
|
||||
}
|
||||
}
|
||||
|
||||
function ToggleMessageVisibility(projectName)
|
||||
{
|
||||
if(!projectName || 0 === projectName.length)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
toggleTableRowsByName("MessageRowClass" + projectName);
|
||||
toggleTableRowsByName('MessageRowHeaderShow' + projectName);
|
||||
toggleTableRowsByName('MessageRowHeaderHide' + projectName);
|
||||
}
|
||||
|
||||
function ScrollToFirstVisibleMessage(projectName)
|
||||
{
|
||||
if(!projectName || 0 === projectName.length)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// First try the 'Show messages' row
|
||||
if(!scrollToFirstVisibleRow('MessageRowHeaderShow' + projectName))
|
||||
{
|
||||
// Failed to find a visible row for 'Show messages', try an actual message row
|
||||
scrollToFirstVisibleRow('MessageRowClass' + projectName);
|
||||
}
|
||||
}
|
||||
</script></head><body><h1 _locID="ConversionReport">
|
||||
마이그레이션 보고서 - </h1><div id="content"><h2 _locID="OverviewTitle">개요</h2><div id="overview"><table><tr><th></th><th _locID="ProjectTableHeader">프로젝트</th><th _locID="PathTableHeader">경로</th><th _locID="ErrorsTableHeader">오류</th><th _locID="WarningsTableHeader">경고</th><th _locID="MessagesTableHeader">메시지</th></tr><tr><td class="IconSuccessEncoded" /><td><strong><a href="#Winsock Orcas">Winsock Orcas</a></strong></td><td>Winsock Orcas.vbproj</td><td class="textCentered"><a>0</a></td><td class="textCentered"><a>0</a></td><td class="textCentered"><a href="#" onclick="ScrollToFirstVisibleMessage('Winsock Orcas'); return false;">28</a></td></tr></table></div><h2 _locID="SolutionAndProjectsTitle">솔루션 및 프로젝트</h2><div id="messages"><a name="Winsock Orcas" /><h3>Winsock Orcas</h3><table><tr id="Winsock OrcasHeaderRow"><th></th><th class="messageCell" _locID="MessageTableHeader">메시지</th></tr><tr name="MessageRowHeaderShowWinsock Orcas"><td class="IconInfoEncoded" /><td class="messageCell"><a _locID="ShowAdditionalMessages" href="#" name="Winsock OrcasMessage" onclick="ToggleMessageVisibility('Winsock Orcas'); return false;">
|
||||
표시 28 추가 메시지
|
||||
</a></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>Winsock Orcas.vbproj:
|
||||
</strong><span>프로젝트 파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\Winsock Orcas.vbproj(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>AsyncSocket.vb:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\AsyncSocket.vb(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>My Project\AssemblyInfo.vb:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\My Project\AssemblyInfo.vb(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>My Project\Application.Designer.vb:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\My Project\Application.Designer.vb(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>My Project\Resources.Designer.vb:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\My Project\Resources.Designer.vb(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>My Project\Settings.Designer.vb:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\My Project\Settings.Designer.vb(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>Enumerations.vb:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\Enumerations.vb(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>EventArgs.vb:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\EventArgs.vb(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>frmAbout.Designer.vb:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\frmAbout.Designer.vb(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>frmAbout.vb:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\frmAbout.vb(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>IWinsock.vb:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\IWinsock.vb(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>Deque.vb:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\Deque.vb(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>ObjectPacker.vb:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\ObjectPacker.vb(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>SharedMethods.vb:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\SharedMethods.vb(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>Winsock.vb:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\Winsock.vb(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>WinsockCollection.vb:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\WinsockCollection.vb(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>WinsockDesigner.vb:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\WinsockDesigner.vb(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>WinsockFileData.vb:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\WinsockFileData.vb(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>My Project\Application.myapp:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\My Project\Application.myapp(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>My Project\Settings.settings:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\My Project\Settings.settings(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>Resources\k-koding.png:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\Resources\k-koding.png(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>My Project\Resources.resx:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\My Project\Resources.resx(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>History.txt:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\History.txt(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>frmAbout.resx:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\frmAbout.resx(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>Winsock.png:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\Winsock.png(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>About.txt:
|
||||
</strong><span>파일을 S:\Source\JDTEK\VMS2016\Sub\WinsockOracs\Backup\About.txt(으)로 백업했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>Winsock Orcas.vbproj:
|
||||
</strong><span>프로젝트를 마이그레이션했습니다.</span></td></tr><tr name="MessageRowClassWinsock Orcas" style="display: none"><td class="IconInfoEncoded"><a name="Winsock OrcasMessage" /></td><td class="messageCell"><strong>Winsock Orcas.vbproj:
|
||||
</strong><span>검사 완료: 프로젝트 파일을 마이그레이션할 필요가 없습니다.</span></td></tr><tr style="display: none" name="MessageRowHeaderHideWinsock Orcas"><td class="IconInfoEncoded" /><td class="messageCell"><a _locID="HideAdditionalMessages" href="#" name="Winsock OrcasMessage" onclick="ToggleMessageVisibility('Winsock Orcas'); return false;">
|
||||
숨기기 28 추가 메시지
|
||||
</a></td></tr></table></div></div></body></html>
|
||||
Reference in New Issue
Block a user