SkyDrive TWJT NetworkProgramming2008Summer
Network Programming2008 Summer
NetworkProgramming2008Summer
Try to learn something new and useful everyday! And, try to do something good for our society from time to time.
' Begin_[2008_07_20_MM_12_44_29]
' Comments by WeiJin Tang (湯偉晉) :
' 將字串資料寫入文字檔案的範例程式
'
' [2008-07-20-MM-12-10-10]
' 宣告一個類別為 [StreamWriter] 的物件,並且取名為 [myStreamWriter]
' Declare an instance of StreamWriter to write text to a file.
Dim myStreamWriter As StreamWriter
' 路徑的名稱
' Folder Path
Dim FP As String
FP = "C:\WeiJin Tang\Output folder"
' 檔案名稱
' File Name
Dim FN As String
FN = "My first text file.txt"
' 完整的檔案名稱
' Full Path File Name
Dim FPFN As String
FPFN = System.IO.Path.Combine(FP, FN)
' 在記憶體中新增一個 [StreamWriter] 的物件,並且將它連結到硬碟中檔案名稱為FPFN的檔案
' Create an instance of StreamWriter to write text to a file.
myStreamWriter = New StreamWriter(FPFN)
' Begin_[2008_07_20_MM_12_38_48]
' Comments by WeiJin Tang (湯偉晉) :
' 將資料寫入 myStreamWriter 裡面
'
With myStreamWriter
.Write("The date is: ")
.WriteLine(DateTime.Now)
.WriteLine()
' Add some text to the file.
.Write("時間就是你的生命")
.WriteLine()
End With
'
' End_[2008_07_20_MM_12_38_48]
' 將 myStreamWriter 關閉,以釋放它所使用到的系統資源
' close myStreamWriter to fully release the resources used by this StreamWriter object
myStreamWriter.Close()
'
' End_[2008_07_20_MM_12_44_29]
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' [2008_07_19_PM_08_48_57] ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' - - - - - - - - - - - - -
' - - - - - - - - - - - - -
' Network Programs 2008 Summer, Class 01, Serving TSINT_2009級_進二技_篤班
' - - - - - - - - - - - - -
' - - - - - - - - - - - - -
' Code Name of this module:
' NP_2008_Summer_C01.減法高手Y2008M07D19
'
' - - - - - - - - - - - - -
' - - - - - -
' NP_2008_Summer_C01.減法高手Y2008M07D19 [2008-03-18-PM-07-48-23]
' (修改程式的人員) Revised by: 李俊毅
'
' Version: 1.00.01
' Last Updated: (2008 07 19 PM 08 44 44)
' - - - - - - - - - - - - -
' - - - - - - - - - - - - -
Public Class 減法高手Y2008M07D19
Private m_上帝給我的錢 As Integer
Private m_我還有多少錢可以用 As Integer
Public Sub New(ByVal 上帝給我的錢 As Integer)
Me.m_上帝給我的錢 = 上帝給我的錢
Me.m_我還有多少錢可以用 = 上帝給我的錢
End Sub
Public Sub 把這些錢花掉(ByVal 要花掉的錢 As Integer)
Me.m_我還有多少錢可以用 = Me.m_我還有多少錢可以用 - 要花掉的錢
If Me.m_我還有多少錢可以用 < 0 Then
MsgBox("丫…我破產了。")
End If
End Sub
End Class '減法高手Y2008M07D19
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' [2008_07_19_PM_08_48_57] ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' [2008_07_12_PM_09_50_30] ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' - - - - - - - - - - - - -
' - - - - - - - - - - - - -
' Object Oriented Programming 2008, Class 01, Serving TSINT_2010級_夜四技_忠班
' - - - - - - - - - - - - -
' - - - - - - - - - - - - -
' Code Name of this module:
' OOP2008C01.敲敲樂
'
' - - - - - - - - - - - - -
' - - - - - -
' OOP2008C01.敲敲樂 [2008-07-12-PM-09-49-37]
'
' OOP2008C01.敲敲樂 [2008-03-18-PM-07-48-23]
' (修改程式的人員) Revised by: 劉靜汝
'
' Version: 1.00.02
' Last Updated: (2008 07 12 PM 09 45 59)
' Version: 1.00.01
' Last Updated: (2008 03 18 PM 07 43 52)
' - - - - - - - - - - - - -
' - - - - - - - - - - - - -
Public Class 敲敲樂
' Begin_Keywords for easily searching source code on [BlogSpot.com] :
'
' 敲敲樂 Click Fun, a simple and basic class, the first class for WeiJin Tang's students
'
' Begin_Keywords for easily searching source code on [BlogSpot.com] :
Private m_我幾下要反應 As Integer
Private m_我總共被拍幾下了 As Integer
Public Sub New(ByVal 我幾下要反應 As Integer)
Me.m_我幾下要反應 = 我幾下要反應
End Sub
Public Sub 懂了沒()
' (本段程式之目的) Purpose:
' Explanation
' (本段程式是否已經在被使用中) In use: Yes
' (程式撰寫的進度) Developing: Ongoing (80%)
' (程式撰寫的進度) Developing: 100% (Mandatory)
' (程式堪用的程度) Workable: 0% (Threshold at 80%)
' (程式的測試程度) Code tested: 0% (max 99%)
' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
' (修改程式的日期) Revision Date: (2008 03 18 PM 07 49 08)
' (修改程式的人員) Revised by: 劉靜汝
' OK
' Version: 1.00.02
' Last Updated: (2008 07 12 PM 09 44 58)
' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Me.m_我總共被拍幾下了 = Me.m_我總共被拍幾下了 + 1
If Me.m_我總共被拍幾下了 = Me.m_我幾下要反應 Then
MsgBox("終於懂了")
'ElseIf (Me.m_我總共被拍幾下了 Mod Me.m_我幾下要反應) = 0 Then
' MsgBox("終於懂了 ; Me.m_我總共被拍幾下了 = " & Me.m_我總共被拍幾下了)
'ElseIf Me.m_我總共被拍幾下了 = 10 Then
' MsgBox("終於懂了 ; Me.m_我總共被拍幾下了 = " & Me.m_我總共被拍幾下了)
Else
' ffff
End If
End Sub
End Class ' 敲敲樂
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' [2008_07_12_PM_09_50_30] ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' [2008_07_12_PM_09_37_40] ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' - - - - - - - - - - - - -
' - - - - - - - - - - - - -
'
' 加法高手Y2008M07D13 [2008-07-12-PM-09-36-50]
'
' Version: 1.00.05
' Last Updated: (2008 07 12 PM 09 36 41)
' Version: 1.00.04
' Last Updated: (2008 07 12 PM 09 28 37)
' Version: 1.00.03
' Last Updated: (2008 07 12 PM 08 03 34)
' - - - - - - - - - - - - -
' - - - - - - - - - - - - -
Public Class 加法高手Y2008M07D13
' Begin_Keywords for easily searching source code on [BlogSpot.com] :
'
' 加法高手 Addition Expert
' Adding Add
'
' Begin_Keywords for easily searching source code on [BlogSpot.com] :
Private m_要炸掉的數字 As Integer
Private m_數值的總和 As Integer
' - - - - - - - - - - - - -
' - - - - - - - - - - - - -
Public Sub New(ByVal 要炸掉的數字 As Integer)
' OK
Me.m_要炸掉的數字 = 要炸掉的數字
End Sub ' New
' - - - - - - - - - - - - -
' - - - - - - - - - - - - -
Public Function 加上這個數字(ByVal 要加上去的數值 As Integer) As Integer
' OK
Me.m_數值的總和 = Me.m_數值的總和 + 要加上去的數值
If Me.m_數值的總和 >= Me.m_要炸掉的數字 Then
MsgBox("爆炸 爆炸 爆炸 爆炸 " & Me.m_要炸掉的數字)
End If
Return Me.m_數值的總和
End Function ' 加上這個數字
' - - - - - - - - - - - - -
' - - - - - - - - - - - - -
Public Sub 重新開始()
' OK
Me.m_數值的總和 = 0
End Sub
' - - - - - - - - - - - - -
' - - - - - - - - - - - - -
Public Function 數值的總和() As Integer
' Ok
Return Me.m_數值的總和
End Function
' - - - - - - - - - - - - -
' - - - - - - - - - - - - -
End Class ' 加法高手Y2008M07D13
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' [2008_07_12_PM_09_37_40] ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' [2008_07_12_PM_08_03_55] ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
'
' SourceCodePublishingHelper_VBY2008M06 [2008-07-12-PM-08-31-52]
' Version: 1.00.03
' Last Updated: (2008 07 12 PM 08 03 34)
' Version: 1.00.02
' Last Updated: (2008 06 15 PM 05 36 04)
' Version: 1.00.01
' Last Updated: (2008 06 10 PM 09 56 14)
Imports System.Windows.Forms
Public Class SourceCodePublishingHelper_VBY2008M06
' Begin_Keywords for easily searching it on BlogSpot.com :
'
' Source Code Publishing Helper
'
' Begin_Keywords for easily searching it on BlogSpot.com :
Public Sub TreatClipboardContentAsVBSourceCodeAndMakeItReadyForPostingToBlogSpot()
' OK
Dim T As String
T = Me.Do_GetStringInClipboard()
Dim SB As New System.Text.StringBuilder
Dim T2 As String = "' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '"
Dim T3 As String = "' ' ' ' ' ' ' ' ' ' ' ' ' "
Dim T4 As String = " ' ' ' ' ' ' ' ' ' ' ' ' ' '"
Dim TS As String
TS = Me.Do_GetStandardTimeType02
With SB
.Append(T2)
.Append(vbNewLine)
.Append(T2)
.Append(vbNewLine)
.Append(T3 & TS & T4)
.Append(vbNewLine)
.Append(T2)
.Append(vbNewLine)
.Append(T)
.Append(vbNewLine)
.Append(T2)
.Append(vbNewLine)
.Append(T3 & TS & T4)
.Append(vbNewLine)
.Append(T2)
.Append(vbNewLine)
.Append(T2)
.Append(vbNewLine)
End With
Me.Do_PasteStringToClipboard(SB.ToString)
End Sub ' TreatClipboardContentAsVBSourceCodeAndMakeItReadyForPostingToBlogSpot
Private Function Do_GetStringInClipboard() As String
' (本段程式之目的) Purpose:
' Get the text content currently stored in system's clipboard.
' (本段程式是否已經在被使用中) In use: Yes
' (重要等級) Importance rating: 85%
' (再利用的可能性) Chances of reuse: 90%
' (程式撰寫的進度) Developing: 100% (Mandatory)
' (程式堪用的程度) Workable: 80% (Threshold at 80%)
' (程式的測試程度) Code tested: 80% (max 99%)
' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
' (修改程式的日期) Revision Date: (2005 09 01 PM 01 50 25)
' (修改程式的人員) Revised by: WeiJin Tang (湯偉晉)
' OK
' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Dim myDataObject As System.Windows.Forms.IDataObject
Dim T As String
myDataObject = System.Windows.Forms.Clipboard.GetDataObject()
' Try to return Unicode Text first, if failed, then try to return ANSI Text
If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.UnicodeText) Then
T = myDataObject.GetData(System.Windows.Forms.DataFormats.UnicodeText)
Else
If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Text) Then
T = myDataObject.GetData(System.Windows.Forms.DataFormats.Text)
Else
T = String.Empty
End If
End If
Return T
' Begin: Reusable code block (2005 09 01 PM 10 26 20)
If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Text) Then
MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Text]")
Else
MsgBox("Clipboard content is NOT compatible with data type [System.Windows.Forms.DataFormats.Text]")
End If
If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.UnicodeText) Then
MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.UnicodeText]")
Else
MsgBox("Clipboard content is NOT compatible with data type [System.Windows.Forms.DataFormats.UnicodeText]")
End If
If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.WaveAudio) Then
MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.WaveAudio]")
Else
MsgBox("Clipboard content is NOT compatible with data type [System.Windows.Forms.DataFormats.WaveAudio]")
End If
If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Html) Then
MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Html]")
Else
MsgBox("Clipboard content is NOT compatible with data type [System.Windows.Forms.DataFormats.Html]")
End If
If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Rtf) Then
MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Rtf]")
Else
MsgBox("Clipboard content is NOT compatible with data type [System.Windows.Forms.DataFormats.Rtf]")
End If
If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Bitmap) Then
MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Bitmap]")
Else
MsgBox("Clipboard content is NOT compatible with data type [System.Windows.Forms.DataFormats.Bitmap]")
End If
If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.PenData) Then
MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.PenData]")
Else
MsgBox("Clipboard content is NOT compatible with data type [System.Windows.Forms.DataFormats.PenData]")
End If
If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.StringFormat) Then
MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.StringFormat]")
Else
MsgBox("Clipboard content is NOT compatible with data type [System.Windows.Forms.DataFormats.StringFormat]")
End If
If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Serializable) Then
MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Serializable]")
Else
MsgBox("Clipboard content is NOT compatible with data type [System.Windows.Forms.DataFormats.Serializable]")
End If
If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Riff) Then
MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Riff]")
Else
MsgBox("Clipboard content is NOT compatible with data type [System.Windows.Forms.DataFormats.Riff]")
End If
' End: Reusable code block (2005 09 01 PM 10 26 20)
End Function ' Do_GetStringInClipboard
' - - - - - - - - - - - - -
' - - - - - - - - - - - - -
Private Function Do_GetStandardTimeStampWithYearMonthDayAndTime() As String
' (本段程式之目的) Purpose:
' Return a standard time stamp like the followings:
'
' "(2003 07 28 AM 01 51 56)"
' "(2003 07 28 MM 12 51 56)"
' "(2003 07 28 PM 01 51 56)"
'
' (本段程式是否已經在被使用中) In use: Yes
' (重要等級) Importance rating: 90%
' (再利用的可能性) Chances of reuse: 80%
' (程式撰寫的進度) Developing: 100%
' (程式堪用的程度) Workable: 80%
' (程式的測試程度) Code tested: 80%
' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
' (修改程式的日期) Revision Date: (2003 07 28 PM 01 49 20)
' (修改程式的人員) Revised by: WeiJin Tang (湯偉晉)
' OK
' Version: 1.00.02
' Last Updated: (2006 01 13 AM 01 39 50)
' Version: 1.00.01
' Last Updated: (2003 07 28 PM 01 49 20)
' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
' Begin: 1.00.02 (2006 01 13 AM 01 40 03)
Dim TimeStampWithYearMonthDayAndTime As String
Dim ValueOfHour As Long
Dim ThisMoment As Date
ThisMoment = Now
ValueOfHour = Hour(ThisMoment)
Dim AM_MM_or_PM As String
If ValueOfHour >= 0 And ValueOfHour < 12 Then
AM_MM_or_PM = "AM"
ElseIf ValueOfHour = 12 Then
AM_MM_or_PM = "MM"
Else
AM_MM_or_PM = "PM"
If ValueOfHour <> 12 Then
ValueOfHour = ValueOfHour - 12
End If
End If
Dim YearAsString As String
YearAsString = ThisMoment.Year.ToString.PadLeft(4, Convert.ToChar("0"))
Dim MonthAsString As String
MonthAsString = ThisMoment.Month.ToString.PadLeft(2, Convert.ToChar("0"))
Dim DayAsString As String
DayAsString = ThisMoment.Day.ToString.PadLeft(2, Convert.ToChar("0"))
Dim HourAsString As String
HourAsString = ValueOfHour.ToString.PadLeft(2, Convert.ToChar("0"))
Dim MinuteAsString As String
MinuteAsString = ThisMoment.Minute.ToString.PadLeft(2, Convert.ToChar("0"))
Dim SecondAsString As String
SecondAsString = ThisMoment.Second.ToString.PadLeft(2, Convert.ToChar("0"))
Dim SpaceChar As String = " "
TimeStampWithYearMonthDayAndTime = "(" & YearAsString & SpaceChar & MonthAsString & SpaceChar & DayAsString & SpaceChar & AM_MM_or_PM & SpaceChar & HourAsString & SpaceChar & MinuteAsString & SpaceChar & SecondAsString & ")"
Return TimeStampWithYearMonthDayAndTime
' End: 1.00.02 (2006 01 13 AM 01 40 03)
End Function ' Do_GetStandardTimeStampWithYearMonthDayAndTime
' - - - - - - - - - - - - -
' - - - - - - - - - - - - -
Private Function Do_GetStandardTimeType02() As String
' (本段程式之目的) Purpose:
' Return a standard time stamp like the followings:
'
' "[2008_06_10_PM_09_28_21]"
'
' (本段程式是否已經在被使用中) In use: Yes
' (重要等級) Importance rating: 90%
' (再利用的可能性) Chances of reuse: 80%
' (程式撰寫的進度) Developing: 100%
' (程式堪用的程度) Workable: 80%
' (程式的測試程度) Code tested: 80%
' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
' (修改程式的日期) Revision Date: (2008 06 10 PM 09 30 16)
' (修改程式的人員) Revised by: WeiJin Tang (湯偉晉)
' OK
' Version: 1.00.01
' Last Updated: (2008 06 10 PM 09 30 16)
' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Dim T As String
T = Me.Do_GetStandardTimeStampWithYearMonthDayAndTime
T = T.Replace("(", "[")
'T = T.Replace("-", "_")
T = T.Replace(" ", "_")
T = T.Replace(")", "]")
Return T
End Function
' - - - - - - - - - - - - -
' - - - - - - - - - - - - -
Private Sub Do_PasteStringToClipboard(ByVal AnyString As String)
' (本段程式之目的) Purpose:
' Paste string to Clipboard.
' (本段程式是否已經在被使用中) In use: Yes
' (重要等級) Importance rating: 80%
' (再利用的可能性) Chances of reuse: 90%
' (程式撰寫的進度) Developing: 100% (Mandatory)
' (程式堪用的程度) Workable: 80% (Threshold at 80%)
' (程式的測試程度) Code tested: 80% (max 99%)
' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
' (修改程式的日期) Revision Date: (2004 12 06 PM 03 17 30)
' (修改程式的人員) Revised by: WeiJin Tang (湯偉晉)
' ok
' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Clipboard.SetDataObject(AnyString, True)
End Sub ' Do_PasteStringToClipboard
' - - - - - - - - - - - - -
' - - - - - - - - - - - - -
End Class ' SourceCodePublishingHelper_VBY2008M06
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' [2008_07_12_PM_08_03_55] ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '