diff --git a/Epole/Common.vb b/Epole/Common.vb index 144aa1e..a1d5903 100644 --- a/Epole/Common.vb +++ b/Epole/Common.vb @@ -54,6 +54,10 @@ Module Common Dim PATTERNTABLE As DataTable End Structure + Public RunCnt As Integer = 0 + Public RunDate As Date = Now + Public Admin As Boolean = False + Public StyleList() As SStyle Public DataBaseFile As String = My.Application.Info.DirectoryPath & "\database\irea.mdb" @@ -77,7 +81,7 @@ Module Common Public MenuFont As Cfont '//޴ Public FormFont As Cfont '// - Public UserInfo As S_AuthInfo '// + ' Public UserInfo As S_AuthInfo '// Public Enum Work_Type kakong = 0 @@ -148,10 +152,10 @@ Module Common End Function Public Function Check_auth() As Boolean - If UserInfo.Type = E_AuthType.Demo Then - MsgBox("δ ̱ ϴ", MsgBoxStyle.Critical, "ӽûڱ") - Return False - End If + 'If UserInfo.Type = E_AuthType.Demo Then + ' MsgBox("δ ̱ ϴ", MsgBoxStyle.Critical, "ӽûڱ") + ' Return False + 'End If Return True End Function @@ -205,7 +209,7 @@ Module Common End Sub Public Sub AddLog(ByVal t1 As Boolean, ByVal txt As String, Optional ByVal t2fn As String = "") - If UserInfo.Type = E_AuthType.Admin Then Log.RichTextBox1.AppendText(txt & vbCrLf) + 'If UserInfo.Type = E_AuthType.Admin Then Log.RichTextBox1.AppendText(txt & vbCrLf) End Sub Public Sub showlog() Log.Show() diff --git a/Epole/MakeList.vb b/Epole/MakeList.vb index 0d98daf..7643ef4 100644 --- a/Epole/MakeList.vb +++ b/Epole/MakeList.vb @@ -32,7 +32,7 @@ Public Class MakeList Private Sub MakeList_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown If e.KeyCode = Keys.F12 Then Dim msg As String = InputBox("pass") - If msg = "arin" Then UserInfo.Type = E_AuthType.Admin + If msg = "arin" Then Admin = True 'UserInfo.Type = E_AuthType.Admin ShowMenu() End If End Sub @@ -40,18 +40,20 @@ Public Class MakeList Private Sub ShowMenu() For Each Obj As ToolStripMenuItem In Me.mbt_addnew.DropDownItems If Not Obj.Tag Is Nothing Then '//±װִ ȮѴ. - If UserInfo.Type = E_AuthType.Admin Then - Obj.Visible = True - Else - Obj.Visible = False - For Each C As Char In UserInfo.Permission - ' MsgBox(C & "//" & Obj.Tag.ToString) - If Obj.Tag.ToString.ToUpper = C.ToString.ToUpper Then '//±װٸ 밡 - Obj.Visible = True - Exit For - End If - Next - End If + Obj.Visible = True + + 'If Admin Then + ' Obj.Visible = True + 'Else + ' Obj.Visible = False + ' For Each C As Char In UserInfo.Permission + ' ' MsgBox(C & "//" & Obj.Tag.ToString) + ' If Obj.Tag.ToString.ToUpper = C.ToString.ToUpper Then '//±װٸ 밡 + ' Obj.Visible = True + ' Exit For + ' End If + ' Next + 'End If End If Next @@ -67,24 +69,24 @@ Public Class MakeList End If Me.view1.ASetting_Load(False) - - Select Case UserInfo.Type - Case E_AuthType.Admin - Me.lb_auth.Text = "[]" - Me.lb_auth.ForeColor = Color.Green - Case E_AuthType.Demo - Me.lb_auth.Text = "[ӽû]" - Me.lb_auth.ForeColor = Color.Blue - Case E_AuthType.Normal - Me.lb_auth.Text = "[]" - Me.lb_auth.ForeColor = Color.Black - End Select + Me.lb_auth.Text = "[:" + RunDate.ToShortDateString() + "]" + 'Select Case UserInfo.Type + ' Case E_AuthType.Admin + ' Me.lb_auth.Text = "[:" + RunDate.ToShortDateString() + "]" + ' Me.lb_auth.ForeColor = Color.Green + ' Case E_AuthType.Demo + ' Me.lb_auth.Text = "[ӽû]" + ' Me.lb_auth.ForeColor = Color.Blue + ' Case E_AuthType.Normal + ' Me.lb_auth.Text = "[]" + ' Me.lb_auth.ForeColor = Color.Black + 'End Select ShowMenu() - If UserInfo.Type = E_AuthType.Demo Then - If DemoDlg.ShowDialog() <> Windows.Forms.DialogResult.OK Then End - End If + 'If UserInfo.Type = E_AuthType.Demo Then + ' If DemoDlg.ShowDialog() <> Windows.Forms.DialogResult.OK Then End + 'End If Me.Text = My.Application.Info.ProductName & " Ver. {0}.{1:00}.{2}.{3}" Me.Text = System.String.Format(Me.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor, My.Application.Info.Version.Build, My.Application.Info.Version.Revision) diff --git a/Epole/My Project/AssemblyInfo.vb b/Epole/My Project/AssemblyInfo.vb index ce8a009..9edcc7b 100644 --- a/Epole/My Project/AssemblyInfo.vb +++ b/Epole/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' 지정되도록 할 수 있습니다. ' - - + + diff --git a/Epole/ReadMe.txt b/Epole/ReadMe.txt index d97a391..74ef04a 100644 --- a/Epole/ReadMe.txt +++ b/Epole/ReadMe.txt @@ -1,4 +1,5 @@ -170717 * 가로등입력화면 관리번호2에서 틀고정 +190505 인증로직변경 +170717 * 가로등입력화면 관리번호2에서 틀고정 * 통합번호찰 프로그램(가로등) 으로 프로그램및 폴더명 모두 수정 * 분리출력시 페이지 이동시에 데이터가 1개 누락되는 현상 제거 170716 diff --git a/Epole/dialogForm/DemoDlg.Designer.vb b/Epole/dialogForm/DemoDlg.Designer.vb index 08e58fb..1a10d88 100644 --- a/Epole/dialogForm/DemoDlg.Designer.vb +++ b/Epole/dialogForm/DemoDlg.Designer.vb @@ -37,15 +37,10 @@ Partial Class DemoDlg Me.LabelCopyright = New System.Windows.Forms.Label() Me.LabelCompanyName = New System.Windows.Forms.Label() Me.Panel1 = New System.Windows.Forms.Panel() - Me.Button4 = New System.Windows.Forms.Button() - Me.Button3 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel() - Me.lb_ip = New System.Windows.Forms.Label() Me.lb_expiredate = New System.Windows.Forms.Label() - Me.lb_usertype = New System.Windows.Forms.Label() - Me.lb_remaincnt = New System.Windows.Forms.Label() Me.lb_msg = New System.Windows.Forms.Label() Me.TableLayoutPanel.SuspendLayout() CType(Me.LogoPictureBox, System.ComponentModel.ISupportInitialize).BeginInit() @@ -76,7 +71,7 @@ Partial Class DemoDlg Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 46.95652!)) Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 13.47826!)) Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 8.0!)) - Me.TableLayoutPanel.Size = New System.Drawing.Size(527, 250) + Me.TableLayoutPanel.Size = New System.Drawing.Size(527, 235) Me.TableLayoutPanel.TabIndex = 0 ' 'LogoPictureBox @@ -86,7 +81,7 @@ Partial Class DemoDlg Me.LogoPictureBox.Location = New System.Drawing.Point(3, 3) Me.LogoPictureBox.Name = "LogoPictureBox" Me.TableLayoutPanel.SetRowSpan(Me.LogoPictureBox, 7) - Me.LogoPictureBox.Size = New System.Drawing.Size(167, 244) + Me.LogoPictureBox.Size = New System.Drawing.Size(167, 229) Me.LogoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage Me.LogoPictureBox.TabIndex = 0 Me.LogoPictureBox.TabStop = False @@ -106,7 +101,7 @@ Partial Class DemoDlg 'LabelVersion ' Me.LabelVersion.Dock = System.Windows.Forms.DockStyle.Fill - Me.LabelVersion.Location = New System.Drawing.Point(180, 24) + Me.LabelVersion.Location = New System.Drawing.Point(180, 22) Me.LabelVersion.Margin = New System.Windows.Forms.Padding(7, 0, 3, 0) Me.LabelVersion.MaximumSize = New System.Drawing.Size(0, 16) Me.LabelVersion.Name = "LabelVersion" @@ -118,7 +113,7 @@ Partial Class DemoDlg 'LabelCopyright ' Me.LabelCopyright.Dock = System.Windows.Forms.DockStyle.Fill - Me.LabelCopyright.Location = New System.Drawing.Point(180, 48) + Me.LabelCopyright.Location = New System.Drawing.Point(180, 44) Me.LabelCopyright.Margin = New System.Windows.Forms.Padding(7, 0, 3, 0) Me.LabelCopyright.MaximumSize = New System.Drawing.Size(0, 16) Me.LabelCopyright.Name = "LabelCopyright" @@ -130,7 +125,7 @@ Partial Class DemoDlg 'LabelCompanyName ' Me.LabelCompanyName.Dock = System.Windows.Forms.DockStyle.Fill - Me.LabelCompanyName.Location = New System.Drawing.Point(180, 72) + Me.LabelCompanyName.Location = New System.Drawing.Point(180, 66) Me.LabelCompanyName.Margin = New System.Windows.Forms.Padding(7, 0, 3, 0) Me.LabelCompanyName.MaximumSize = New System.Drawing.Size(0, 16) Me.LabelCompanyName.Name = "LabelCompanyName" @@ -142,50 +137,22 @@ Partial Class DemoDlg 'Panel1 ' Me.Panel1.BackColor = System.Drawing.Color.Transparent - Me.Panel1.Controls.Add(Me.Button4) - Me.Panel1.Controls.Add(Me.Button3) Me.Panel1.Controls.Add(Me.Button2) Me.Panel1.Controls.Add(Me.Button1) Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill - Me.Panel1.Location = New System.Drawing.Point(176, 211) + Me.Panel1.Location = New System.Drawing.Point(176, 196) Me.Panel1.Name = "Panel1" - Me.Panel1.Size = New System.Drawing.Size(348, 26) + Me.Panel1.Size = New System.Drawing.Size(348, 24) Me.Panel1.TabIndex = 2 ' - 'Button4 - ' - Me.Button4.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.Button4.BackColor = System.Drawing.Color.Transparent - Me.Button4.DialogResult = System.Windows.Forms.DialogResult.Cancel - Me.Button4.Location = New System.Drawing.Point(71, 1) - Me.Button4.Name = "Button4" - Me.Button4.Size = New System.Drawing.Size(62, 25) - Me.Button4.TabIndex = 4 - Me.Button4.Text = "인증2(&B)" - Me.Button4.UseVisualStyleBackColor = False - Me.Button4.Visible = False - ' - 'Button3 - ' - Me.Button3.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.Button3.BackColor = System.Drawing.Color.Transparent - Me.Button3.DialogResult = System.Windows.Forms.DialogResult.Cancel - Me.Button3.Location = New System.Drawing.Point(2, 1) - Me.Button3.Name = "Button3" - Me.Button3.Size = New System.Drawing.Size(69, 25) - Me.Button3.TabIndex = 3 - Me.Button3.Text = "인증1(&A)" - Me.Button3.UseVisualStyleBackColor = False - Me.Button3.Visible = False - ' 'Button2 ' - Me.Button2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Button2.BackColor = System.Drawing.Color.Transparent Me.Button2.DialogResult = System.Windows.Forms.DialogResult.Cancel - Me.Button2.Location = New System.Drawing.Point(133, 1) + Me.Button2.Dock = System.Windows.Forms.DockStyle.Left + Me.Button2.Location = New System.Drawing.Point(0, 0) Me.Button2.Name = "Button2" - Me.Button2.Size = New System.Drawing.Size(83, 25) + Me.Button2.Size = New System.Drawing.Size(83, 24) Me.Button2.TabIndex = 2 Me.Button2.Text = "홈페이지(&H)" Me.Button2.UseVisualStyleBackColor = False @@ -196,7 +163,7 @@ Partial Class DemoDlg Me.Button1.BackColor = System.Drawing.Color.Transparent Me.Button1.DialogResult = System.Windows.Forms.DialogResult.Cancel Me.Button1.Font = New System.Drawing.Font("굴림", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte)) - Me.Button1.Location = New System.Drawing.Point(284, 1) + Me.Button1.Location = New System.Drawing.Point(284, -1) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(64, 25) Me.Button1.TabIndex = 1 @@ -207,67 +174,34 @@ Partial Class DemoDlg ' Me.TableLayoutPanel1.ColumnCount = 1 Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!)) - Me.TableLayoutPanel1.Controls.Add(Me.lb_ip, 0, 4) Me.TableLayoutPanel1.Controls.Add(Me.lb_expiredate, 0, 1) - Me.TableLayoutPanel1.Controls.Add(Me.lb_usertype, 0, 2) - Me.TableLayoutPanel1.Controls.Add(Me.lb_remaincnt, 0, 3) Me.TableLayoutPanel1.Controls.Add(Me.lb_msg, 0, 0) Me.TableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill - Me.TableLayoutPanel1.Location = New System.Drawing.Point(173, 95) + Me.TableLayoutPanel1.Location = New System.Drawing.Point(173, 87) Me.TableLayoutPanel1.Margin = New System.Windows.Forms.Padding(0) Me.TableLayoutPanel1.Name = "TableLayoutPanel1" - Me.TableLayoutPanel1.RowCount = 5 + Me.TableLayoutPanel1.RowCount = 2 Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25.0!)) Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25.0!)) - Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25.0!)) - Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25.0!)) - Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!)) - Me.TableLayoutPanel1.Size = New System.Drawing.Size(354, 113) + Me.TableLayoutPanel1.Size = New System.Drawing.Size(354, 106) Me.TableLayoutPanel1.TabIndex = 3 ' - 'lb_ip - ' - Me.lb_ip.AutoSize = True - Me.lb_ip.Location = New System.Drawing.Point(3, 92) - Me.lb_ip.Name = "lb_ip" - Me.lb_ip.Size = New System.Drawing.Size(53, 12) - Me.lb_ip.TabIndex = 1 - Me.lb_ip.Text = "아이피 : " - ' 'lb_expiredate ' Me.lb_expiredate.AutoSize = True - Me.lb_expiredate.Location = New System.Drawing.Point(3, 23) + Me.lb_expiredate.Location = New System.Drawing.Point(3, 53) Me.lb_expiredate.Name = "lb_expiredate" Me.lb_expiredate.Size = New System.Drawing.Size(77, 12) Me.lb_expiredate.TabIndex = 0 Me.lb_expiredate.Text = "인증만료일 : " ' - 'lb_usertype - ' - Me.lb_usertype.AutoSize = True - Me.lb_usertype.Location = New System.Drawing.Point(3, 46) - Me.lb_usertype.Name = "lb_usertype" - Me.lb_usertype.Size = New System.Drawing.Size(73, 12) - Me.lb_usertype.TabIndex = 0 - Me.lb_usertype.Text = "사용자형태 :" - ' - 'lb_remaincnt - ' - Me.lb_remaincnt.AutoSize = True - Me.lb_remaincnt.Location = New System.Drawing.Point(3, 69) - Me.lb_remaincnt.Name = "lb_remaincnt" - Me.lb_remaincnt.Size = New System.Drawing.Size(93, 12) - Me.lb_remaincnt.TabIndex = 0 - Me.lb_remaincnt.Text = "사용가능 횟수 : " - ' 'lb_msg ' Me.lb_msg.AutoSize = True Me.lb_msg.Dock = System.Windows.Forms.DockStyle.Fill Me.lb_msg.Location = New System.Drawing.Point(3, 0) Me.lb_msg.Name = "lb_msg" - Me.lb_msg.Size = New System.Drawing.Size(348, 23) + Me.lb_msg.Size = New System.Drawing.Size(348, 53) Me.lb_msg.TabIndex = 0 Me.lb_msg.Text = "." Me.lb_msg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -276,7 +210,7 @@ Partial Class DemoDlg ' Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 12.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(547, 266) + Me.ClientSize = New System.Drawing.Size(547, 251) Me.Controls.Add(Me.TableLayoutPanel) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog Me.MaximizeBox = False @@ -298,12 +232,7 @@ Partial Class DemoDlg Friend WithEvents Panel1 As System.Windows.Forms.Panel Friend WithEvents TableLayoutPanel1 As System.Windows.Forms.TableLayoutPanel Friend WithEvents Button2 As System.Windows.Forms.Button - Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents lb_expiredate As System.Windows.Forms.Label - Friend WithEvents lb_usertype As System.Windows.Forms.Label - Friend WithEvents lb_remaincnt As System.Windows.Forms.Label Friend WithEvents lb_msg As System.Windows.Forms.Label - Friend WithEvents Button4 As System.Windows.Forms.Button - Friend WithEvents lb_ip As System.Windows.Forms.Label End Class diff --git a/Epole/dialogForm/DemoDlg.vb b/Epole/dialogForm/DemoDlg.vb index cfea50d..0551890 100644 --- a/Epole/dialogForm/DemoDlg.vb +++ b/Epole/dialogForm/DemoDlg.vb @@ -1,12 +1,12 @@ Public NotInheritable Class DemoDlg Private Sub DemoDlg_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing - If UserInfo.Type = E_AuthType.Demo AndAlso UserInfo.Cnt > 10 Then - End - Else - Me.DialogResult = Windows.Forms.DialogResult.OK - Me.Dispose() - End If + 'If UserInfo.Type = E_AuthType.Demo AndAlso UserInfo.Cnt > 10 Then + ' End + 'Else + ' Me.DialogResult = Windows.Forms.DialogResult.OK + ' Me.Dispose() + 'End If End Sub Private Sub DemoDlg_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load @@ -27,24 +27,24 @@ Me.LabelCompanyName.Text = My.Application.Info.CompanyName Display_info() - If UserInfo.Type = E_AuthType.Demo AndAlso UserInfo.Cnt > 10 Then '//사용불가다 - Me.Button1.Text = "끝내기(&O)" - End If + 'If UserInfo.Type = E_AuthType.Demo AndAlso UserInfo.Cnt > 10 Then '//사용불가다 + ' Me.Button1.Text = "끝내기(&O)" + 'End If 'Me.TextBoxDescription.Text = My.Application.Info.Description End Sub Private Sub Display_info() - Me.lb_expiredate.Text = "인증만료일 : " & UserInfo.ExpireDate - Select Case UserInfo.Type - Case E_AuthType.Admin - Me.lb_usertype.Text = "사용자형태 : 관리자" - Case E_AuthType.Demo - Me.lb_usertype.Text = "사용자형태 : 임시(일부기능만 사용가능)" - Me.lb_remaincnt.Text = "사용 횟수 : " & UserInfo.Cnt & "/10" & IIf(UserInfo.Cnt > 10, "[사용횟수초과]", "") - Case E_AuthType.Normal - Me.lb_usertype.Text = "사용자형태 : 정상" - End Select - Me.lb_ip.Text = "아이피 : " & GetFirstIP() + Me.lb_expiredate.Text = "인증만료일 : " & RunDate.ToShortDateString() + 'Select Case UserInfo.Type + ' Case E_AuthType.Admin + ' Me.lb_usertype.Text = "사용자형태 : 관리자" + ' Case E_AuthType.Demo + ' Me.lb_usertype.Text = "사용자형태 : 임시(일부기능만 사용가능)" + ' Me.lb_remaincnt.Text = "사용 횟수 : " & UserInfo.Cnt & "/10" & IIf(UserInfo.Cnt > 10, "[사용횟수초과]", "") + ' Case E_AuthType.Normal + ' Me.lb_usertype.Text = "사용자형태 : 정상" + 'End Select + 'Me.lb_ip.Text = "아이피 : " & GetFirstIP() End Sub Private Sub OKButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click @@ -55,7 +55,7 @@ Process.Start(HomePage) End Sub - Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click + Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Dim auth As New CEpole.Auth Dim NewKey As String = InputBox("인증번호1을 입력하세요") If NewKey <> "" AndAlso auth.check_key1(NewKey) Then '//뭔가있고 정상이라면 @@ -66,10 +66,10 @@ MsgBox("취소되었거나 정상적인 키가 아닙니다", MsgBoxStyle.Critical, "오류") Me.Close() End If - + End Sub - Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click + Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Dim auth As New CEpole.Auth Dim NewKey As String = InputBox("인증번호2를 입력하세요") If NewKey <> "" AndAlso auth.Check_key2(NewKey) Then '//뭔가있고 정상이라면 diff --git a/Epole/dialogForm/SplashScreen.vb b/Epole/dialogForm/SplashScreen.vb index b9dbf62..39c913e 100644 --- a/Epole/dialogForm/SplashScreen.vb +++ b/Epole/dialogForm/SplashScreen.vb @@ -3,7 +3,7 @@ Public NotInheritable Class SplashScreen Dim install, installkey As Long Dim auth As New ACC.MyAuth - Dim Runcnt As Integer = 0 + 'Dim Runcnt As Integer = 0 Private Sub SplashScreen1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If My.Application.Info.Title <> "" Then @@ -19,13 +19,30 @@ Public NotInheritable Class SplashScreen Me.Show() : My.Application.DoEvents() If Not LoadINI() Then End '//환경파일 불러오기실패시 종료한다. - ReadAuth() - - - If Command().ToUpper = "ARIN2506" Then - UserInfo.Type = E_AuthType.Admin '//파라미터로 운영자모드 가능하게 + If Command() <> "ARIN" AndAlso Not ReadAuth() Then '//에러났을떄는 카운터를 확인 + '//사용횟수가 10번ㅇ르 초과했는지 확인 + Runcnt = Me.ReadAuthcount + Dim f As New fAuth() + If (f.ShowDialog <> Windows.Forms.DialogResult.OK) Then + End + End If + 'If Runcnt >= 10 Then + ' Dim NewKey As String = InputBox("인증번호를 입력하세요 (인증번호는 숫자로만 이루어져 있습니다)") + ' If IsNumeric(NewKey) = False Then + ' MsgBox("프로그램을 재실행 하세요", MsgBoxStyle.Information, "확인") + ' End + ' End If + ' auth.SetAuth(NewKey, My.Application.Info.DirectoryPath & "\epole.ini") + ' MsgBox("프로그램을 재실행 하세요", MsgBoxStyle.Information, "확인") + ' End + 'Else + ' MsgBox(CStr(10 - Runcnt) & "번의 사용횟수가 남았습니다", MsgBoxStyle.Critical, "실행확인") + 'End If End If + 'If Command().ToUpper = "ARIN2506" Then + ' UserInfo.Type = E_AuthType.Admin '//파라미터로 운영자모드 가능하게 + 'End If 'If Not ReadAuth() Then DemoDlg.ShowDialog() @@ -36,109 +53,77 @@ Public NotInheritable Class SplashScreen MakeList.Show() Me.Dispose() End Sub - Private Function ReadAuth() As Boolean - - '//기능해제 160516 - UserInfo.Permission = New Char() {"B"} - UserInfo.Cnt = 1 - UserInfo.ExpireDate = Date.Now.AddYears(1) - UserInfo.Type = E_AuthType.Normal - Return True - - - '//먼저파일에 있는 키를 체크한다. - Dim Key1 As String = ini.Read("main", "key1", "") - Dim key2 As String = ini.Read("main", "key2", "") - Dim KeyCnt As String = ini.Read("main", "keycount", "11" & CStr(11).GetHashCode) '//없으면 최대로한다. - - If key2 = "" Then UserInfo.Permission = "A" '//아무것도 없으면 1번메뉴만 실행가능하게한다. - - Try - If IsNumeric(KeyCnt.Substring(2)) = False Then - UserInfo.Cnt = 11 - UserInfo.Type = E_AuthType.Demo - UserInfo.Permission = "A" - Return False + Private Function ReadAuthcount() As Integer + Dim RunCnt As Integer = 0 + Dim ini As New MyINI(My.Application.Info.DirectoryPath & "\epole.ini") + Dim RegDate As String = ini.Read("main", "regdate2", "") + Dim CurDate As String = Me.auth.GetDateNumberEnc(Today.AddDays(-10)) + If RegDate = "" Then '//등록일이없으면 10번카운터를 셋팅한다. + RunCnt = 1 + ini.Write("main", "reg2", RunCnt) '//1일로한다. + ini.Write("main", "regdate2", Me.auth.GetDateNumberEnc(Today)) '//1일로한다. + Else + '//상요자가 숫자를 임의로 고칠수있으니 설치된 날짜랑 오늘이랑 10일이상차이나면 횟수에상관없이 사용불가로한다. + If CurDate > RegDate Then + MsgBox("프로그램을 사용할 수 없습니다" & vbCrLf & "배포업체에 문의하세요", MsgBoxStyle.Information, "확인") + Return 10 End If - Catch ex As Exception - UserInfo.Cnt = 11 - UserInfo.Type = E_AuthType.Demo - UserInfo.Permission = "A" - Return False - End Try - - '//둘다비어있으면 데모상태로한다. - If Key1 = "" AndAlso key2 = "" Then - UserInfo.Type = E_AuthType.Demo - If CStr(11).GetHashCode = KeyCnt.Substring(2) Then '//가져온 카운트랑 10이랑같으면 다썻다는 말이다. - UserInfo.Cnt = 11 - Else '//아니라면 아직 무료횟수가 남았다는ㄱ다 - Dim Cnt As Integer = KeyCnt.Substring(0, 2) '//02 라고치자 - Cnt += 1 '//하나증가해서 기록한다. - ini.Write("main", "keycount", Format(Cnt, "00") & Format(Cnt, "00").GetHashCode) - UserInfo.Cnt = Cnt + RunCnt = ini.Read("main", "reg2", 10) '//없으면 10으로한다 즉 사용못하게하겠다는거다 + If RunCnt < 10 Then + RunCnt += 1 + ini.Write("main", "reg2", RunCnt) '//1일로한다. End If - Return False - End If - - Dim auth As New CEpole.Auth - If Key1.IndexOf("%") = -1 Then Key1 = "0%" & Key1 - If Not auth.check_key1(Key1) OrElse Not auth.Check_key2(key2) Then '//키중에 오류가있다면 사용불가로한다. - UserInfo.Cnt = 11 - UserInfo.Type = E_AuthType.Demo - UserInfo.Permission = "A" - Return False - End If - '//여기까지왓다면 둘다 정상이란소리다. : - '//IP가 맞는지 확인 - Dim Cip() As String = GetFirstIP.Split(".") - Dim Cipsum As Short = 0 - Dim IPok As Boolean = False - For Each a As String In Cip - Try - Cipsum += Val(a) - Catch ex As Exception - IPok = True - '//아이피에 문제가잇다 이거는 메일보낸다. 그리고 사용은 가능하게한다. - End Try - Next - 'If IPok = False Then - ' If Cipsum <> Val(Key1.Split("%")(0)) Then '//인증코드의 아이피의 합과 현재아이피의 합이 틀리다면 - ' UserInfo.Cnt = 11 '//데모상태로 전환한다. - ' UserInfo.Type = E_AuthType.Demo - ' UserInfo.Permission = "A" - ' Return False - ' End If - 'End If - - '//권한정보셋팅 - UserInfo.Permission = key2.Split("%")(0).ToCharArray - Dim k() As String = Key1.Split("%") - '//닐짜비교() - Dim Curdate As Date = Today - Dim UserDate As Date = CDate(k(1).Substring(0, 4) & "-" & k(1).Substring(4, 2) & "-" & k(1).Substring(6, 2)) - If Curdate > UserDate Then '//지정된날짜가 오늘보다 컷을경우 즉 기간을 오버했다는것이다. 사용불가이다. - UserInfo.Cnt = 11 - UserInfo.Type = E_AuthType.Demo - Return False - Else '//정상사용자이다 - UserInfo.ExpireDate = UserDate.ToShortDateString - UserInfo.Type = E_AuthType.Normal - Return True End If + If RunCnt >= 10 Then Return 10 + Return RunCnt End Function + Private Function ReadAuth() As Boolean + If install = 0 OrElse installkey = 0 Then + ' MsgBox("인증정보가 존재하지 않습니다." & vbCrLf & vbCrLf & "홈페이지 [자료실] 에서 인증번호를 확인하세요" & vbCrLf & "062-382-0411" & vbCrLf & Common.HomePage, MsgBoxStyle.Critical, "확인") + 'Process.Start(HomePage) + Return False + End If + + Dim 현재날짜값 As Long = auth.GetDateNumber(Now) + + If 현재날짜값 > install Then + ' MsgBox("사용기간이 초과되었습니다." & vbCrLf & vbCrLf & "홈페이지 [자료실] 에서 인증번호를 확인하세요" & vbCrLf & "062-382-0411" & vbCrLf & Common.HomePage, MsgBoxStyle.Critical, "확인") + 'Process.Start(HomePage) + Return False '//만기일을 초과했다면 + End If + + 'Dim FI As New System.IO.FileInfo(My.Application.Info.DirectoryPath & "\epole.ini") + 'If (auth.GetDateNumber(FI.LastAccessTimeUtc)) > Now.ToFileTimeUtc Then '//설정파일을 접근한 날짜가 오늘보다 크면 즉 오늘이 조작디었을경우다 + ' ' MsgBox("사용기간이 초과되었습니다." & vbCrLf & vbCrLf & "홈페이지 [자료실] 에서 인증번호를 확인하세요" & vbCrLf & "062-382-0411" & vbCrLf & Common.HomePage, MsgBoxStyle.Critical, "확인") + ' 'Process.Start(HomePage) + ' Return False '//만기일을 초과했다면 + 'End If + + Dim 해쉬값 As Integer = install.GetHashCode() + If installkey.ToString <> 해쉬값 Then '//인증정보가 손상되었다면 + ' MsgBox("인증정보가 손상되었습니다" & vbCrLf & vbCrLf & "홈페이지 [자료실] 에서 인증번호를 확인하세요" & vbCrLf & "062-382-0411" & vbCrLf & Common.HomePage, MsgBoxStyle.Critical, "확인") + 'Process.Start(HomePage) + Return False + End If + + Rundate = Date.FromFileTimeUtc(install) + + Return True + ' MsgBox(auth.GetDateNumberEnc(Now)) + End Function Private Sub SetAuth(ByVal NewDate As Date) - Dim auth As New ACC.MyAuth + Dim auth As New MyAuth Dim Arinini As New MyINI(My.Application.Info.DirectoryPath & "\epole.ini") - Arinini.Write("main", "install", auth.GetDateNumber(NewDate)) - Arinini.Write("main", "installkey", auth.GetDateNumberEnc(NewDate)) + Arinini.Write("main", "install2", auth.GetDateNumber(NewDate)) + Arinini.Write("main", "installkey2", auth.GetDateNumberEnc(NewDate)) MsgBox("기록완료") End Sub + Private Function LoadINI() As Boolean Me.lb_msg.Text = "환경설정 데이터를 읽어옵니다" @@ -163,8 +148,8 @@ Public NotInheritable Class SplashScreen Common.ViewFont.FontName = buf(0) Common.ViewFont.FontSize = buf(1) - Me.install = Arinini.Read("main", "install", 0) - Me.installkey = Arinini.Read("main", "installkey", 0) + Me.install = Arinini.Read("main", "install2", 0) + Me.installkey = Arinini.Read("main", "installkey2", 0) buf = Arinini.Read("main", "menufont", "굴림,9").Split(",") Common.MenuFont.FontName = buf(0) diff --git a/Epole/업로드폼/XLSImport.vb b/Epole/업로드폼/XLSImport.vb index fe3bc0c..4fed81c 100644 --- a/Epole/업로드폼/XLSImport.vb +++ b/Epole/업로드폼/XLSImport.vb @@ -106,11 +106,11 @@ Public Class XLSImport Dim Nullcnt As Short = 0 NOTICE("(ӽ)ͺ̽ մϴ(ҺҰ)", Me.lb_msg) - If (Me.tb_ecnt.Text = 0 AndAlso UserInfo.Type = E_AuthType.Demo) OrElse (UserInfo.Type = E_AuthType.Demo AndAlso (Me.tb_ecnt.Text - Me.tb_scnt.Text) > 100) Then - MsgBox("ӽûڴ ڵīƮ(0) " & vbCrLf & vbCrLf & _ - "īͿ ī 100 մϴ", MsgBoxStyle.Information, "Ȯ") - Me.tb_ecnt.Text = Me.tb_scnt.Text + 100 - End If + 'If (Me.tb_ecnt.Text = 0 AndAlso UserInfo.Type = E_AuthType.Demo) OrElse (UserInfo.Type = E_AuthType.Demo AndAlso (Me.tb_ecnt.Text - Me.tb_scnt.Text) > 100) Then + ' MsgBox("ӽûڴ ڵīƮ(0) " & vbCrLf & vbCrLf & _ + ' "īͿ ī 100 մϴ", MsgBoxStyle.Information, "Ȯ") + ' Me.tb_ecnt.Text = Me.tb_scnt.Text + 100 + 'End If Me.DT_Sknetworks.Rows.Clear() : Me.DT_Sknetworks.AcceptChanges() For Each Dr As FarPoint.Win.Spread.Row In Me.CustFP1.ActiveSheet.Rows '//ο쿡شϴµ ٺѴ @@ -190,11 +190,11 @@ Public Class XLSImport Dim NullCnt As Short = 0 NOTICE("(ӽ)ͺ̽ մϴ(ҺҰ)", Me.lb_msg) - If (Me.tb_ecnt.Text = 0 AndAlso UserInfo.Type = E_AuthType.Demo) OrElse (UserInfo.Type = E_AuthType.Demo AndAlso (Me.tb_ecnt.Text - Me.tb_scnt.Text) > 100) Then - MsgBox("ӽûڴ ڵīƮ(0) " & vbCrLf & vbCrLf & _ - "īͿ ī 100 մϴ", MsgBoxStyle.Information, "Ȯ") - Me.tb_ecnt.Text = Me.tb_scnt.Text + 100 - End If + 'If (Me.tb_ecnt.Text = 0 AndAlso UserInfo.Type = E_AuthType.Demo) OrElse (UserInfo.Type = E_AuthType.Demo AndAlso (Me.tb_ecnt.Text - Me.tb_scnt.Text) > 100) Then + ' MsgBox("ӽûڴ ڵīƮ(0) " & vbCrLf & vbCrLf & _ + ' "īͿ ī 100 մϴ", MsgBoxStyle.Information, "Ȯ") + ' Me.tb_ecnt.Text = Me.tb_scnt.Text + 100 + 'End If Me.DT_Karo.Rows.Clear() : Me.DT_Karo.AcceptChanges() For Each Dr As FarPoint.Win.Spread.Row In Me.CustFP1.ActiveSheet.Rows '//ο쿡شϴµ ٺѴ @@ -297,11 +297,11 @@ Public Class XLSImport Dim nullcnt As Short = 0 NOTICE("(ӽ)ͺ̽ մϴ(ҺҰ)", Me.lb_msg) - If (Me.tb_ecnt.Text = 0 AndAlso UserInfo.Type = E_AuthType.Demo) OrElse (UserInfo.Type = E_AuthType.Demo AndAlso (Me.tb_ecnt.Text - Me.tb_scnt.Text) > 100) Then - MsgBox("ӽûڴ ڵīƮ(0) " & vbCrLf & vbCrLf & _ - "īͿ ī 100 մϴ", MsgBoxStyle.Information, "Ȯ") - Me.tb_ecnt.Text = Me.tb_scnt.Text + 100 - End If + 'If (Me.tb_ecnt.Text = 0 AndAlso UserInfo.Type = E_AuthType.Demo) OrElse (UserInfo.Type = E_AuthType.Demo AndAlso (Me.tb_ecnt.Text - Me.tb_scnt.Text) > 100) Then + ' MsgBox("ӽûڴ ڵīƮ(0) " & vbCrLf & vbCrLf & _ + ' "īͿ ī 100 մϴ", MsgBoxStyle.Information, "Ȯ") + ' Me.tb_ecnt.Text = Me.tb_scnt.Text + 100 + 'End If Me.DT_Jdung.Rows.Clear() : Me.DT_Jdung.AcceptChanges() For Each Dr As FarPoint.Win.Spread.Row In Me.CustFP1.ActiveSheet.Rows '//ο쿡شϴµ ٺѴ diff --git a/Epole/입력폼/AddEpole_SkNetworks.vb b/Epole/입력폼/AddEpole_SkNetworks.vb index 55e3476..71fe27f 100644 --- a/Epole/입력폼/AddEpole_SkNetworks.vb +++ b/Epole/입력폼/AddEpole_SkNetworks.vb @@ -409,10 +409,10 @@ Public Class AddEpole_SKNetworks MsgBox(" õ ʵ Ǿֽϴ", MsgBoxStyle.Critical, "Ȯ") Return End If - If UserInfo.Type = E_AuthType.Demo Then - MsgBox(" ӽûԴϴ" & vbCrLf & " ޼ ӽûڸ µ˴ϴ", MsgBoxStyle.Information, "Ȯ") - End If - Dim Aa As New Cls_SkNetworks.PrintForm(Me.DT, IIf(UserInfo.Type = E_AuthType.Admin, True, False), Me.view1.⺻Ÿε, CType(Me.bs.Current, DataRowView)) + 'If UserInfo.Type = E_AuthType.Demo Then + ' MsgBox(" ӽûԴϴ" & vbCrLf & " ޼ ӽûڸ µ˴ϴ", MsgBoxStyle.Information, "Ȯ") + 'End If + Dim Aa As New Cls_SkNetworks.PrintForm(Me.DT, IIf(Admin, True, False), Me.view1.⺻Ÿε, CType(Me.bs.Current, DataRowView)) Aa.Show() End Sub diff --git a/Epole/입력폼/AddEpole_jdung.vb b/Epole/입력폼/AddEpole_jdung.vb index c3156e9..2b71fe3 100644 --- a/Epole/입력폼/AddEpole_jdung.vb +++ b/Epole/입력폼/AddEpole_jdung.vb @@ -421,10 +421,10 @@ Public Class AddEpole_jDung MsgBox(" õ ʵ Ǿֽϴ", MsgBoxStyle.Critical, "Ȯ") Return End If - If UserInfo.Type = E_AuthType.Demo Then - MsgBox(" ӽûԴϴ" & vbCrLf & " ޼ ӽûڸ µ˴ϴ", MsgBoxStyle.Information, "Ȯ") - End If - Dim Aa As New Cls_Jdung.PrintForm(Me.DT, IIf(UserInfo.Type = E_AuthType.Admin, True, False), Me.view1.⺻Ÿε, CType(Me.bs.Current, DataRowView)) + 'If UserInfo.Type = E_AuthType.Demo Then + ' MsgBox(" ӽûԴϴ" & vbCrLf & " ޼ ӽûڸ µ˴ϴ", MsgBoxStyle.Information, "Ȯ") + 'End If + Dim Aa As New Cls_Jdung.PrintForm(Me.DT, IIf(Admin, True, False), Me.view1.⺻Ÿε, CType(Me.bs.Current, DataRowView)) Aa.Show() End Sub diff --git a/Epole/입력폼/AddEpole_karo.vb b/Epole/입력폼/AddEpole_karo.vb index f1fc917..09227ff 100644 --- a/Epole/입력폼/AddEpole_karo.vb +++ b/Epole/입력폼/AddEpole_karo.vb @@ -452,10 +452,10 @@ Public Class AddEpole_karo MsgBox(" õ ʵ Ǿֽϴ", MsgBoxStyle.Critical, "Ȯ") Return End If - If UserInfo.Type = E_AuthType.Demo Then - MsgBox(" ӽûԴϴ" & vbCrLf & " ޼ ӽûڸ µ˴ϴ", MsgBoxStyle.Information, "Ȯ") - End If - Dim Aa As New Cls_Karo.PrintForm(Me.DT, IIf(UserInfo.Type = E_AuthType.Admin, True, False), Me.view1.⺻Ÿε, CType(Me.bs.Current, DataRowView)) + 'If UserInfo.Type = E_AuthType.Demo Then + ' MsgBox(" ӽûԴϴ" & vbCrLf & " ޼ ӽûڸ µ˴ϴ", MsgBoxStyle.Information, "Ȯ") + 'End If + Dim Aa As New Cls_Karo.PrintForm(Me.DT, IIf(Admin, True, False), Me.view1.⺻Ÿε, CType(Me.bs.Current, DataRowView)) Aa.Show() End Sub diff --git a/Epole/통합번호찰_가로등.vbproj b/Epole/통합번호찰_가로등.vbproj index 6b994cb..65ee07b 100644 --- a/Epole/통합번호찰_가로등.vbproj +++ b/Epole/통합번호찰_가로등.vbproj @@ -160,6 +160,13 @@ Form + + + fAuth.vb + + + Form + Form_Work.vb @@ -266,6 +273,9 @@ Designer Frm_ViewSetup.vb + + fAuth.vb + Form_Work.vb Designer diff --git a/Epole/통합번호찰_가로등.vbproj.user b/Epole/통합번호찰_가로등.vbproj.user index 07e85fa..531adef 100644 --- a/Epole/통합번호찰_가로등.vbproj.user +++ b/Epole/통합번호찰_가로등.vbproj.user @@ -3,7 +3,8 @@ false false - ARIN25061 + + false diff --git a/Epole_통합가로등.v12.suo b/Epole_통합가로등.v12.suo index 01889f7..32619b4 100644 Binary files a/Epole_통합가로등.v12.suo and b/Epole_통합가로등.v12.suo differ