Imports System.Net Imports System.Net.Dns Module Common Enum ESorted No = 1 YES = 2 NULL = 0 End Enum Enum E_AuthType Dev = 1 Normal = 0 adm = 2 Demo = -9 End Enum Structure S_AuthInfo Dim Type As E_AuthType '//ÀÎÁõÇüÅ Dim Cnt As Short '//¹«·á»ç¿ëȽ¼ö(µ¥¸ð¸ðµå½Ã) Dim ExpireDate As String Dim Id As String '//»ç¿ëÀÚId Dim Name As String '//»ç¿ëÀÚ¸í Dim authmsg As String Dim Permission() As Char '//±ÇÇÑ End Structure Structure Cfont Dim FontName As String Dim FontSize As Int16 End Structure Structure Str_Alllabels '·¹À̺íµéÀ» ÀúÀåÇÑ´Ù. Dim ctl As CEpole.C_label Dim desc As String End Structure Structure SStyle Dim Desc As String Dim File As String Dim Backimg As String Dim MarginX As Integer Dim MarginY As Integer Dim ScaleX As Single Dim ScaleY As Single Dim PrintFontOffset As Integer Dim Viewimage As Boolean Dim LandScape As Boolean Dim Dummy As Boolean Dim Dummytype As Short Dim dummmyx As Short Dim dummmyy As Short Dim picstyle As Short Dim CanvasX As Integer Dim CanvasY As Integer Dim Filter As String Dim PATTERNTABLE As DataTable End Structure Public StyleList() As SStyle Public RunCnt As Integer = 0 Public RunDate As Date = Date.Now Public Admin As Boolean = False Public DataBaseFile As String = My.Application.Info.DirectoryPath & "\database\irea.mdb" Public ini As New ACC.MyINI(My.Application.Info.DirectoryPath & "\epole.ini") 'Public ConString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DataBaseFile Public Arin As New ACC.ARINCLASS Public ArinPath As New ACC.MyPath Public Auto_Log As Boolean = False '//µðºñ³ª °¢Á¾ ·Î±×ÆÄÀÏÀ» ½×À»Áö ¿©ºÎ Public PICmanFile As String = vbNullString '//±×¸²°ü¸®ÇÁ·Î±×·¥ÀÇ ÆÄÀϸíÀ» Àû´Â´Ù. Public MakeState As String = vbNullString Public PoleState As String = vbNullString Public PoleEtcState As String = vbNullString Public PicState As String = vbNullString '/±×¸²ÆÄÀÏ¿¬°á°ü¸®´Ù. Public HelpWebSite As String = vbNullString '//À¥ÆäÀÌÁöÁÖ¼Ò ÀÏ´ÜÀº µµ¿ò¸»À» ¾ò±âÀ§Çؾ´´Ù. Public HomePage As String = vbNullString Public SORTNULL As Boolean = True '//ÀüÁÖ¼¼ºÎ-Á¤·ÄÀÌ ¹øÈ£°¡ ºñ¾îÀÕÀ»°æ¿ì °¡ÀåÀ§¿¡Ç¥½ÃÇÒÁö ¾Æ´ÒÁö! Public NUMCOLOR As Boolean '//°¡°ø¹øÈ£Âû¿¡¼­ ¹øÈ£¿¡ »ö»óÀ» ÁöÁ¤ÇÒÁö 'Public Admin As Boolean = False '//°³¹ßÀÚ¸ðµå·Î Á¢¼ÓÇÞÀ»¶§ Public ViewFont As Cfont '//ºäÀÇ ±ÛÀÚ Public MenuFont As Cfont '//¸Þ´ºÀÇ ±ÛÀÚ Public FormFont As Cfont '//ÆûÀÇ ±ÛÀÚ ' Public UserInfo As S_AuthInfo '//»ç¿ëÀÚÁ¤º¸ Public Enum Work_Type kakong = 0 jijung = 1 suyong = 2 tongsin = 3 karodung = 4 jongakdung = 5 boandung = 6 Sknetworks = 7 Lcable = 8 End Enum Public Sub Work_Form(ByVal T As String) Form_Work.Show() Form_Work.Msg(T) End Sub Public Function Get_SavePatternString(ByVal ÀúÀå´ë»ó As String, ByVal pc As Boolean, ByVal cp As String, ByVal pl As Boolean, ByVal pstr As String, ByVal plen As Short, _ ByVal pchr As String) As System.Text.StringBuilder If pc Then cp = "[¹®ÀÚÆÐÅÏ]" If pl Then cp &= "[±æÀÌÆÐÅÏ]" If cp = "" Then cp = "[ÆÐÅϾøÀ½]" Dim Msg As New System.Text.StringBuilder("(" & ÀúÀå´ë»ó & ")" & " ÆÐÅÏÀ» ÀúÀåÇÕ´Ï´Ù") '//¹®ÀÚÆÐÅÏÀÌ Àû¿ëµÇ¾îÀÖ´Ù¸é ¹®ÀÚÆÐÅÏÀ¸·Î Àû¿ëÇÒ °ÍÀ» ‚¤ÀåÇÏ¸ç ±×·¸Áö ¾ÊÀº °æ¿ì¿¡´Â ±æÀÌÆÐÅÏÀ̳ª ¹®ÀÚÆÐÅÏÀ» ÀûÀýÈ÷ ±ÇÀåÇÑ´Ù. '//±æÀ̰¡ 5ÀÚ¸®ÀÌÇÏÀÌ°í Æ¯¼ö¹®ÀÚ(-,;)µîÀÌ ¾ø´Â°æ¿ì¿¡ ±æÀÌÆÐÅÏ Àû¿ëÀ» ±ÇÀ¯ÇÑ´Ù. Msg.AppendLine() Msg.AppendLine("ÆÐÅÏ ÀúÀ广¹ý¿¡´Â ±æÀÌ,¹®ÀÚ°¡ ÀÖ½À´Ï´Ù") Msg.AppendLine("ÆÐÅϿ켱¼øÀ§ : ¹®ÀÚÆÐÅÏ -> ±æÀÌÆÐÅÏ") Msg.AppendLine() Msg.AppendLine("ÇöÀçÀû¿ëµÈ ÆÐÅÏ : " & cp) If pc Then Msg.AppendLine() Msg.AppendLine(">> ÇöÀç ¹®ÀÚÆÐÅÏÀÌ Àû¿ëµÇ¾îÀÖ½À´Ï´Ù" & vbCrLf & ">> ¹®ÀÚÆÐÅÏÀº °¡Àå¿ì¼±µÇ´Â ÆÐÅϹæ½ÄÀÔ´Ï´Ù") Msg.AppendLine(">> ÀúÀå½Ã¿¡´Â [¹®ÀÚÆÐÅÏ]À¸·Î ÀúÀåÇϽñ⠹ٶø´Ï´Ù.") Msg.AppendLine(">> [±æÀÌÆÐÅÏ]À¸·Î ÀúÀåÇϴ°ÍÀº Àǹ̰¡ ¾ø½À´Ï´Ù") ElseIf pl Then Msg.AppendLine() Msg.AppendLine(">> ÇöÀç ±æÀÌÆÐÅÏÀÌ Àû¿ëµÇ¾îÀÖ½À´Ï´Ù" & vbCrLf & ">> ÆÐÅÏÀº ±æÀÌ,¹®ÀÚ µÑ´Ù ÀúÀåÀÌ °¡´ÉÇÕ´Ï´Ù") Else Msg.AppendLine() Msg.AppendLine(">> Àû¿ëµÈ ÆÐÅÏÀ̾ø½À´Ï´Ù") Msg.AppendLine(">> ¹®ÀÚ¼ö(±æÀÌ)°¡ ÀûÀº ¹®ÀÚÀǰæ¿ì [±æÀÌÆÐÅÏ] ÀúÀåÀ» ±ÇÀåÇÕ´Ï´Ù") End If Msg.AppendLine() Msg.AppendLine("±æÀÌÆÐÅÏÀ̶õ? (¹®ÀÚÀÇ ±æÀ̰¡ °°À»‹š Àû¿ë)") Msg.AppendLine(" ¼±Åõȹ®ÀÚ´Â " & pstr & " ÀÌ¸ç ±æÀÌ´Â = " & plen & " ÀÔ´Ï´Ù") Msg.AppendLine(" ÀúÀåÀ» Çϸé " & ÀúÀå´ë»ó & " ÀÇ ±æÀ̰¡ " & plen & vbCrLf & " ÀÎ ¹®ÀÚ°¡ ¿À¸é ÆÐÅÏÀÌ Àû¿ëµË´Ï´Ù") Msg.AppendLine() Msg.AppendLine("¹®ÀÚÆÐÅÏÀ̶õ? (°°Àº ÇüÅÂÀÇ ¹®ÀÚÀ϶§ Àû¿ë)") Msg.AppendLine(" ¼±Åõȹ®ÀÚ´Â " & pstr & " À̸ç ÇüÅ´ = " & pchr & " ÀÔ´Ï´Ù") Msg.AppendLine(" ÀúÀåÀ» Çϸé " & ÀúÀå´ë»ó & " ÀÇ ÇüŰ¡ " & pchr & vbCrLf & " ÀÎ ¹®ÀÚ°¡ ¿À¸é ÆÐÅÏÀÌ Àû¿ëµË´Ï´Ù") Msg.AppendLine(" * 1=¼ýÀÚ,0=¾ËÆÄºª¹®ÀÚ,H=Çѱ۹®ÀÚ,;=Ư¼ö¹®ÀÚ(;),-=Ư¼ö¹®ÀÚ(-)") Msg.AppendLine() Msg.AppendLine("ÆÐÅϿ켱¼øÀ§¶õ? (ÆÐÅÏÀÌ Áߺ¹Àû¿ëµÇ¾úÀ»¶§ ³ôÀº¿ì¼±¼øÀ§°¡ Àû¿ë)") Msg.AppendLine(" ±æÀÌ,¹®ÀÚ ÆÐÅÏÀÌ µÑ´Ù Àû¿ëµÇ¾îÀÖÀ»°æ¿ì ¿ì¼±¼øÀ§°¡ ³ôÀº") Msg.AppendLine(" ¹®ÀÚÆÐÅÏÀÌ ÃÖÁ¾ÀûÀ¸·Î Àû¿ëÀÌ µË´Ï´Ù.(±æÀÌÆÐÅÏÀº ¹«½ÃµÊ)") Msg.AppendLine() Msg.AppendLine("# ±æÀÌÆÐÅÏÀ¸·Î ÀúÀåÇϽðڽÀ´Ï±î?") Msg.AppendLine("# ¿¹) ±æÀÌÀúÀå , ¾Æ´Ï¿À) ¹®ÀÚÀúÀå , Ãë¼Ò) Ãë¼Ò") If pc Then Msg.AppendLine("# ¹®ÀÚÆÐÅÏÀÌ Àû¿ëµÇ¾úÀ¸¹Ç·Î [±æÀÌÆÐÅÏ] ÀúÀåÀº Àǹ̰¡ ¾ø½À´Ï´Ù") Return Msg End Function Public Function Check_auth() As Boolean 'If UserInfo.Type = E_AuthType.Demo Then ' MsgBox("ÇöÀç±ÇÇÑÀ¸·Î´Â À̱â´ÉÀ» »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù", MsgBoxStyle.Critical, "Àӽûç¿ëÀÚ±ÇÇÑ") ' Return False 'End If Return True End Function Public Sub NOTICE(ByVal MSG As String, ByVal Src As Object) On Error Resume Next If Src.GetType.Name.ToUpper = "TOOLSTRIPSTATUSLABEL" Then CType(Src, ToolStripStatusLabel).Text = "¢º " & MSG & Space(1) CType(Src, ToolStripStatusLabel).ForeColor = Color.Black ElseIf Src.GetType.Name.ToUpper = "LABEL" Then CType(Src, Label).Text = "¢º " & MSG & Space(1) CType(Src, Label).ForeColor = Color.Black End If ' My.Computer.Audio.PlaySystemSound(Media.SystemSounds.Beep) End Sub Public Sub NOTICE(ByVal MSG As String, ByVal FCOLOR As Color, ByVal Src As Windows.Forms.ToolStripStatusLabel) Src.Text = "¢º " & MSG & Space(1) Src.ForeColor = FCOLOR ' My.Computer.Audio.PlaySystemSound(Media.SystemSounds.Beep) End Sub Public Sub ReNum(ByVal Srcspread As NewFp, ByVal NumColumnindex As Integer, Optional ByVal PBar As ProgressBar = Nothing) If Not PBar Is Nothing Then PBar.Minimum = 0 PBar.Maximum = Srcspread.ActiveSheet.RowCount PBar.Value = 0 End If For Each SR As FarPoint.Win.Spread.Row In Srcspread.ActiveSheet.Rows If Not PBar Is Nothing Then PBar.Value += 1 Srcspread.ActiveSheet.Cells(SR.Index, NumColumnindex).Value = SR.Index + 1 Next End Sub Public Sub AddLog(ByVal t1 As Boolean, ByVal txt As String, Optional ByVal t2fn As String = "") ' If UserInfo.Type = E_AuthType.Dev Then Log.RichTextBox1.AppendText(txt & vbCrLf) End Sub Public Sub showlog() Log.Show() End Sub Public Sub hidelog() Log.Close() End Sub Public Sub resetLog() Log.RichTextBox1.Text = "" End Sub Public Sub ReNum(ByRef SrcTable As DataTable, ByVal ColumnName As String, Optional ByVal PBar As ProgressBar = Nothing) If Not SrcTable.GetChanges Is Nothing Then MsgBox("º¯°æµÈ ³»¿ëÀÌ ÀÖ½À´Ï´Ù" & vbCrLf & vbCrLf & "¸ÕÀú ÀúÀåÀ» Çϼ¼¿ä", MsgBoxStyle.Information, "È®ÀÎ") Return End If If MsgBox("¸ðµç¹øÈ£°¡ »õ·Î °»½ÅµË´Ï´Ù" & vbCrLf & vbCrLf & "°è¼ÓÇϽðڽÀ´Ï±î?", MsgBoxStyle.Information + MsgBoxStyle.OkCancel, "È®ÀÎ") <> MsgBoxResult.Ok Then Return End If If Not PBar Is Nothing Then PBar.Minimum = 0 PBar.Maximum = SrcTable.Rows.Count PBar.Value = 0 End If Dim i As Integer = 0 Dim DV As New DataView(SrcTable, "", "Á¤·Ä¹øÈ£,¹øÈ£", DataViewRowState.CurrentRows) Dim DT As DataTable = DV.ToTable For Each dr As DataRow In DT.Rows i += 1 dr(ColumnName) = i If Not PBar Is Nothing Then PBar.Value += 1 Next SrcTable.Merge(DT) MsgBox("¹øÈ£ Á¤·ÄÀÌ ¿Ï·áµÇ¾ú½À´Ï´Ù", MsgBoxStyle.Information, "È®ÀÎ") End Sub Public Function GetFirstIP() As String '//ipÁÖ¼Òº¸±â Dim objAddress() As Net.IPAddress 'Dim IA As Net.IPAddress Dim B(15) As Byte Dim sAns As String = vbNullString objAddress = Dns.GetHostEntry(GetHostName).AddressList Try Return objAddress(0).ToString Catch ex As Exception Return "" End Try End Function End Module