Imports System.Drawing Imports System.Drawing.Printing Imports System.Math Imports System.IO Imports ThoughtWorks.QRCode.Codec '//QRÄÚµå Imports ThoughtWorks.QRCode.Codec.Util Imports ThoughtWorks.QRCode.Codec.Data Public Class printformsy Dim DrStyle As PatternDS.TStyleRow = Nothing Dim DtPattern As PatternDS.TPatternDataTable = Nothing Dim AllLabels() As Str_Alllabels '//Àüü°¹¼ö´Â Ãß°¡ÇÒ´ë ¼ÂÆÃÇÑ´Ù. Dim S°ü¸®±¸Àü»ê¹øÈ£ As MyControlOLEDBv2.MyLabel Dim S¼±·Î¸í(0) As MyControlOLEDBv2.MyLabel Dim SÀüÁÖ¹øÈ£(1) As MyControlOLEDBv2.MyLabel Dim Sºñ°í1(0) As MyControlOLEDBv2.MyLabel Dim Sºñ°í2(0) As MyControlOLEDBv2.MyLabel Dim Sºñ°í3(0) As MyControlOLEDBv2.MyLabel Dim Sºñ°í4(0) As MyControlOLEDBv2.MyLabel 'Dim S»ç¿ëÀÚ1(0) As MyControlOLEDBv2.MyLabel 'U ¸¶À̳ʽº 'Dim S»ç¿ëÀÚ2(0) As MyControlOLEDBv2.MyLabel 'A 'Dim S»ç¿ëÀÚ3(0) As MyControlOLEDBv2.MyLabel 'B 'Dim S»ç¿ëÀÚ4(0) As MyControlOLEDBv2.MyLabel 'D 'Dim S»ç¿ëÀÚ5(0) As MyControlOLEDBv2.MyLabel 'E Dim SÀϷùøÈ£ As MyControlOLEDBv2.MyLabel Dim S°íÀå½Å°í(0) As MyControlOLEDBv2.MyLabel Dim °ü¸®±¸, Àü»ê¹øÈ£ As String Dim °ü¸®Àü»ê¹øÈ£ As String = vbNullString Dim ÆÐÅϸí_°ü¸®Àü»ê¹øÈ£ As String = "KWANLIJUNSAN" Dim ¼±·Î¸í As String = vbNullString Dim ÆÐÅϸí_¼±·Î As String = "SUNLOPATTERN" Dim ¹øÈ£ As String = vbNullString Dim ÆÐÅϸí_¹øÈ£ As String = "JJNUMPATTERN" Dim ºñ°í As String = vbNullString Dim ºñ°í1 As String = vbNullString Dim ÆÐÅϸí_ºñ°í1 As String = "BIGO1PATTERN" Dim ºñ°í2 As String = vbNullString Dim ÆÐÅϸí_ºñ°í2 As String = "BIGO2PATTERN" Dim ºñ°í3 As String = vbNullString Dim ÆÐÅϸí_ºñ°í3 As String = "BIGO3PATTERN" Dim ºñ°í4 As String = vbNullString Dim ÆÐÅϸí_ºñ°í4 As String = "BIGO4PATTERN" Dim °íÀå½Å°í As String = vbNullString Dim ÆÐÅϸí_°íÀå½Å°í As String = "GOJANGPATTERN" Dim BlineNum As Short = 0 Dim NoView As Boolean = False '//LOAD_STYLE À» Àá½Ã ½ÇÇàÇÏÁö ¾Ê±âÀ§ÇÞ(Áߺ¹½ÇÇà¹æÁö)¼­ µÐ´Ù. Dim °ü¸®±¸Àü»ê¹øÈ£Á¶ÀÛµÊ As Boolean = True Dim ¼±·Î¸íÁ¶ÀÛµÊ As Boolean = True Dim ÀüÁÖ¹øÈ£Á¶ÀÛµÊ As Boolean = True Dim SrcIdx As Integer = -1 '//¿øº» ¸®ºä¿¡¼­ Ŭ¸¯µÈ À妽º Dim Srcnum As Integer = -1 '//¿øº» ¸®ºå¿¡¼­ Ŭ¸¯µÈ ¹øÈ£°ª Dim Srcrow As DataRowView Dim FirstIdx As Integer = -1 '//»õ·Î »ý¼ºµÈ ¸®ºä¿¡¼­ Àû¿ëµÉ À妽º 'Public File As String = My.Application.Info.DirectoryPath & "\style.ini" '//½ºÅ¸ÀÏ ÆÄÀÏ Dim StyleDir As New System.IO.DirectoryInfo(My.Application.Info.DirectoryPath & "\styleetc") Public FileC As String = My.Application.Info.DirectoryPath & "\styleetc.ini" '//»ç¿ëÀÚ ½ºÅ¸ÀÏ ÆÄÀÏ '/qrÄڵ庯¼ö Dim qrȨÆäÀÌÁö1 As String = "" Dim qrȨÆäÀÌÁö2 As String = "" Dim qrȨÆäÀÌÁö3 As String = "" Dim qrȨÆäÀÌÁö4 As String = "" Private WithEvents pDoc As New PrintDocument() Dim SelCon As New ArrayList '//¼±ÅÃµÈ ·¹À̺íµéÀÌ ÀúÀåµÈ ¹è¿­ÀÌ´Ù. Dim onlyOne As MyControlOLEDBv2.MyLabel '//Æ÷Ä¿½º¸¦ °¡Áø ·¹À̺íÀÌ´Ù. Dim srcTable As ireaDataSet.EtcTableDataTable '//µ¥ÀÌÅͰ¡ ÀúÀåµÉ Å×À̺í Dim Dv As DataView '//µ¥ÀÌÅͺä(½ÇÁ¦·Î ÀÌ ºäÀÇ µ¥ÀÌÅ͸¦ °¡Áö°í Ãâ·ÂÀ» ÇàÇÑ´Ù.) Dim printindex As Integer = 0 '//ÇÁ¸°Æ®µÇ´Â ÆäÀÌÁö ¹øÈ£ À̰ªÀÌ -1 À̸é ÇöÀçÆäÀÌÁöÀ̹ǷΠ°»½ÅÇÏÁö ¾Ê°í Ãâ·ÂÇÑ´Ù. Dim PrintArray() As Integer '//ÇÁ¸°Æ®ÇÒ ÆäÀÌÁöÀÇ ¹è¿­¹øÈ£ Dim SettingFile As String = My.Application.Info.DirectoryPath & "\epole.ini" '//ȯ°æ¼³Á¤ ÆÄÀÏ Dim PrintMode As Boolean = False #Region "New" Public Sub New() InitializeComponent() WLog2(Auto_Log, "New()", "\¼øÂ÷·Î±×.txt") End Sub Public Sub New(ByRef Src As ireaDataSet.EtcTableDataTable, Optional ByVal IRow As DataRowView = Nothing) InitializeComponent() WLog2(Auto_Log, "New(srctable,srcRow)", "\¼øÂ÷·Î±×.txt") srcTable = Src '//°¡Á®¿Â Å×À̺íÀ» ÀÓ½ÃÅ×ÀÌºí¿¡ ÀúÀåÀ» ÇØµÎ°í »ç¿ëÇÑ´Ù. Srcrow = IRow '//À̰ÍÀº Ŭ¸¯µÈ Çà¹øÈ£ÀÌ´Ù. ÀÌ Çà¹øÈ£¸¦ °¡Áö°í ½ºÅ¸ÀÏÀ» ÆÇº°ÇÑ´Ù End Sub #End Region Private Sub printformsy_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.dataview.Setting_Load(False, "printjjung", "\viewConfig\suyoung_") Me.SetStyle(ControlStyles.AllPaintingInWmPaint Or ControlStyles.UserPaint Or ControlStyles.DoubleBuffer, True) '//´õºí¹öÆÛ¸µ WLog2(Auto_Log, "Form_Load()", "\¼øÂ÷·Î±×.txt") GetPrintersName() '//ÇÁ¸°Å͸íÀ» °¡Á®¿É´Ï´Ù. Load_Setting() SetControls() '//ÄÁÆ®·ÑÀ» ÃʱâÈ­ÇÏ°í ¼ÂÆÃÇÑ´Ù. If srcTable Is Nothing Then 'MsgBox("¼Ò½º°¡¾ø¾î¼­ ±âº»¼ÂÆÃÀ¸·Î ÀüȯÇÔ") WLog2(Auto_Log, "°³¹ßÀÚ ±âº»¼ÂÆÃÀ¸·Î Àüȯ()", "\¼øÂ÷·Î±×.txt") Common.Auto_Log = True Me.NoView = True 'Me.fryTableAdapter.Connection.ConnectionString = ConString 'Me.fryTableAdapter.Fill(Me.IreaDataSet1.etctable, 1) 'Me.srcTable = Me.IreaDataSet1.etctable ''MsgBox("µ¥ÀÌÅͼö=" & Me.IreaDataSet1.etctable.Rows.Count) Admin = True End If WLog2(Auto_Log, "°³¹ßÀÚ¸ðµå=" & Admin.ToString, "\¼øÂ÷·Î±×.txt") If Admin Then '//°³¹ßÀÚ¸ðµå¶ó¸é »ó¼¼Á¶Á¤³»¿¡ ¼û°ÜÁø üũ¹Ú½º¸¦¿ÀÇÂÇÑ´Ù. For Each A As Control In Me.TabPage3.Controls If A.GetType.Name.ToUpper = "CHECKBOX" Then A.Visible = True Next End If Me.SETTOOLTIP() GetStyleList() '//style.ini ¿¡¼­ ½ºÅ¸Àϸñ·Ï¸í¸¸ °¡Á®¿Â´Ù. If Srcrow Is Nothing Then '//°¡Á®¿Â Çà°ªÀÌÀ妽º°¡ ¾øÀ¸¹Ç·Î 1¹øÂ° ½ºÅ¸ÀÏÀ» ÁöÁ¤ÇÑ´Ù. WLog2(Auto_Log, "°¡Á®¿Â Çà°ªÀÌ ¾ø½À´Ï´Ù. firstidx=0 / ÀϹݿëÀ¸·Î ¼ÂÆÃÇÕ´Ï´Ù()", "\¼øÂ÷·Î±×.txt") FirstIdx = 0 '//¶ÇÇÑ ¸Ç óÀ½ µ¥ÀÌÅ͸¦ Ç¥½ÃÇϰԵȴÙ. Me.cmb_style.SelectedIndex = 0 Return End If '//¿©±â¼­ Çà°ªÀ» ºÐ¼®Çؼ­ ÄÞº¸¹Ü¸¦ ¼ÂÆÃÇØÁØ´Ù; '//ÀüºÎ ¼ÂÆÃµÈÈÄ ÇØ´ç °ªÀ» ¶Ç ã¾Æ¾ß ÇÑ´Ù. Srcnum = Srcrow("¹øÈ£") 'srcTable.Rows(SrcIdx).Item("¹øÈ£") Me.cmb_style.SelectedIndex = 0 WLog2(Auto_Log, "¼±ÅõǼ­ ³Ñ¿À¿Âµ¥ÀÌÅÍÀÇ ¹øÈ£¸¦ ã½À´Ï´Ù=" & Srcnum, "\¼øÂ÷·Î±×.txt") If Me.cmb_style.SelectedIndex < 0 AndAlso Me.cmb_style.Items.Count > 0 Then Me.cmb_style.SelectedIndex = 0 End Sub Private Sub printform_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing Me.dataview.Setting_Save(False, "printjjung", "\viewConfig\suyoung_") WLog2(Auto_Log, "Form_Closk", "\¼øÂ÷·Î±×.txt") Save_Setting() End Sub Private Sub printform_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown 'If SelCon Is Nothing Then Return 'Dim Tobj As MyControlOLEDBv2.MyLabel Select Case e.KeyCode Case Keys.Up If e.Shift Then '//±Û¾¾³ôÀÌ Me.CtrSize(True, -1) Else Me.CtrPos(True, -1) End If 'Me.ViewProperty(SelCon(0)) e.Handled = True Case Keys.Down If e.Shift Then Me.CtrSize(True, 1) Else Me.CtrPos(True, 1) End If 'ViewProperty(Tobj) e.Handled = True Case Keys.Left If e.Shift Then Me.CtrSize(False, -1) Else Me.CtrPos(False, -1) End If 'ViewProperty(Tobj) e.Handled = True Case Keys.Right If e.Shift Then Me.CtrSize(False, 1) Else Me.CtrPos(False, 1) End If 'ViewProperty(Tobj) e.Handled = True Case Keys.F4 '//°ü¸®±¸5¹øÀúÀå Me.Button8.PerformClick() Case Keys.F7 Me.bt_print.PerformButtonClick() Case Keys.F8 Me.bt_prnpreview.PerformClick() End Select End Sub Private Sub SetControls() WLog2(Auto_Log, "Running : SetControls()", "\¼øÂ÷·Î±×.txt") Dim CtlCnt As Short = 0 For i As Integer = 0 To SÀüÁÖ¹øÈ£.GetUpperBound(0) '//¸ðµç¹®ÀÚ¸¦ ÇÒ´çÇÑ´Ù. SÀüÁÖ¹øÈ£(i) = New MyControlOLEDBv2.MyLabel SÀüÁÖ¹øÈ£(i).¼³¸í = "ÀüÁÖ¹øÈ£" & i + 1 SÀüÁÖ¹øÈ£(i).Name = "X" & i + 1 SÀüÁÖ¹øÈ£(i).Visible = False ReDim Preserve AllLabels(CtlCnt) Me.AllLabels(CtlCnt).ctl = SÀüÁÖ¹øÈ£(i) Me.cmb_controls.Items.Add(SÀüÁÖ¹øÈ£(i).¼³¸í) CtlCnt += 1 Next SÀϷùøÈ£ = New MyControlOLEDBv2.MyLabel SÀϷùøÈ£.¼³¸í = "ÀϷùøÈ£" SÀϷùøÈ£.MyText = "" SÀϷùøÈ£.Name = "N1" SÀϷùøÈ£.Visible = False ReDim Preserve AllLabels(CtlCnt) Me.AllLabels(CtlCnt).ctl = SÀϷùøÈ£ Me.cmb_controls.Items.Add(SÀϷùøÈ£.¼³¸í) CtlCnt += 1 Sºñ°í4(0) = New MyControlOLEDBv2.MyLabel Sºñ°í4(0).¼³¸í = "ºñ°í4" Sºñ°í4(0).MyText = "" Sºñ°í4(0).Name = "R" Sºñ°í4(0).Visible = False ReDim Preserve AllLabels(CtlCnt) Me.AllLabels(CtlCnt).ctl = Sºñ°í4(0) Me.cmb_controls.Items.Add(Sºñ°í4(0).¼³¸í) CtlCnt += 1 Sºñ°í3(0) = New MyControlOLEDBv2.MyLabel Sºñ°í3(0).¼³¸í = "ºñ°í3" Sºñ°í3(0).MyText = "" Sºñ°í3(0).Name = "Q" Sºñ°í3(0).Visible = False ReDim Preserve AllLabels(CtlCnt) Me.AllLabels(CtlCnt).ctl = Sºñ°í3(0) Me.cmb_controls.Items.Add(Sºñ°í3(0).¼³¸í) CtlCnt += 1 Sºñ°í2(0) = New MyControlOLEDBv2.MyLabel Sºñ°í2(0).¼³¸í = "ºñ°í2" Sºñ°í2(0).MyText = "" Sºñ°í2(0).Name = "P" Sºñ°í2(0).Visible = False ReDim Preserve AllLabels(CtlCnt) Me.AllLabels(CtlCnt).ctl = Sºñ°í2(0) Me.cmb_controls.Items.Add(Sºñ°í2(0).¼³¸í) CtlCnt += 1 Sºñ°í1(0) = New MyControlOLEDBv2.MyLabel Sºñ°í1(0).¼³¸í = "ºñ°í1" Sºñ°í1(0).MyText = "" Sºñ°í1(0).Name = "O" Sºñ°í1(0).Visible = False ReDim Preserve AllLabels(CtlCnt) Me.AllLabels(CtlCnt).ctl = Sºñ°í1(0) Me.cmb_controls.Items.Add(Sºñ°í1(0).¼³¸í) CtlCnt += 1 S¼±·Î¸í(0) = New MyControlOLEDBv2.MyLabel S¼±·Î¸í(0).¼³¸í = "¼±·Î¸í" S¼±·Î¸í(0).MyText = "" S¼±·Î¸í(0).Name = "L" S¼±·Î¸í(0).Visible = False ReDim Preserve AllLabels(CtlCnt) Me.AllLabels(CtlCnt).ctl = S¼±·Î¸í(0) Me.cmb_controls.Items.Add(S¼±·Î¸í(0).¼³¸í) CtlCnt += 1 S°ü¸®±¸Àü»ê¹øÈ£ = New MyControlOLEDBv2.MyLabel S°ü¸®±¸Àü»ê¹øÈ£.¼³¸í = "°ü¸®±¸Àü»ê¹øÈ£" S°ü¸®±¸Àü»ê¹øÈ£.MyText = "" S°ü¸®±¸Àü»ê¹øÈ£.Name = "H" S°ü¸®±¸Àü»ê¹øÈ£.Visible = False ReDim Preserve AllLabels(CtlCnt) Me.AllLabels(CtlCnt).ctl = S°ü¸®±¸Àü»ê¹øÈ£ Me.cmb_controls.Items.Add(S°ü¸®±¸Àü»ê¹øÈ£.¼³¸í) CtlCnt += 1 S°íÀå½Å°í(0) = New MyControlOLEDBv2.MyLabel S°íÀå½Å°í(0).¼³¸í = "°íÀå½Å°í" S°íÀå½Å°í(0).MyText = "" S°íÀå½Å°í(0).Name = "Z" S°íÀå½Å°í(0).Visible = False ReDim Preserve AllLabels(CtlCnt) Me.AllLabels(CtlCnt).ctl = S°íÀå½Å°í(0) Me.cmb_controls.Items.Add(S°íÀå½Å°í(0).¼³¸í) CtlCnt += 1 End Sub Private Sub SETTOOLTIP() WLog2(Auto_Log, "Settooltip()", "\¼øÂ÷·Î±×.txt") Dim TMSG As New System.Text.StringBuilder() TMSG.AppendLine() TMSG.AppendLine("¼±Åð¡´ÉÇÑ °³Ã¼¸ñ·ÏÀ» º¼ ¼ö ÀÕ½À´Ï´Ù") TMSG.AppendLine() TMSG.AppendLine("È­¸é¿¡ º¸ÀÌÁö ¾Ê´Â °³Ã¼µµ ¼±ÅÃÀÌ °¡´ÉÇÕ´Ï´Ù") TMSG.AppendLine() Me.ToolTip1.SetToolTip(Me.cmb_controls, TMSG.ToString) TMSG = New System.Text.StringBuilder("") TMSG.AppendLine() TMSG.AppendLine("¼±ÅÃµÈ °³Ã¼µéÀÇ È­¸éÇ¥½Ã¿©ºÎ¸¦ °áÁ¤Á¤ÇÕ´Ï´Ù") Me.ToolTip1.SetToolTip(Me.cb_visible, TMSG.ToString) TMSG = New System.Text.StringBuilder() TMSG.AppendLine() TMSG.AppendLine("¡å ¿¬¼ÓµÈ ÆäÀÌÁö´Â -(¸¶À̳ʽº) ·Î ±¸ºÐÇÕ´Ï´Ù") TMSG.AppendLine(" ¿¹) 2ÆäÀÌÁö¿¡¼­ 8ÆäÀÌÁö±îÁö : 2-8") TMSG.AppendLine() TMSG.AppendLine("¡å ºÒ±ÔÄ¢ ÆäÀÌÁö´Â ,(ÄÞ¸¶) ·Î ±¸ºÐÇÕ´Ï´Ù") TMSG.AppendLine(" ¿¹) 1,3,4,10 ÆäÀÌÁö : 1,3,4,7") TMSG.AppendLine() TMSG.AppendLine("¡å °¢Á¶°ÇÀÇ ±¸ºÐÀº /(½½·¡½¬) ·Î ±¸ºÐÇÕ´Ï´Ù") TMSG.AppendLine(" ¿¹) 2~8ÆäÀÌÁö¿Í 11,15¹ø ÆäÀÌÁö : 2-8/11,15") TMSG.AppendLine() Me.ToolTip1.SetToolTip(Me.RadioButton3, TMSG.ToString) TMSG = New System.Text.StringBuilder() TMSG.AppendLine() TMSG.AppendLine("<°³Ã¼µéÀÇ »óŸ¦ È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù>") TMSG.AppendLine() TMSG.AppendLine("´õºíŬ¸¯½Ã ÀÓ½ÃÀûÀ¸·Î ÇØ´ç ¹®ÀÚ¸¦ ¼öÁ¤ÇÒ ¼ö ÀÖ½À´Ï´Ù.") TMSG.AppendLine("¿ÞÂÊŬ¸¯½Ã ÇØ´ç°³Ã¼¸¸ ¼±Åõ˴ϴÙ.") TMSG.AppendLine("Ctrl + ¿ÞÂÊŬ¸¯½Ã ÇØ´ç°³Ã¼°¡ ¼ÓÇÑ ±×·ìÀÌ ¼±Åõ˴ϴÙ.") TMSG.AppendLine("¿ìŬ¸¯½Ã ¼±ÅÃµÈ °³Ã¼°¡ Ãß°¡µË´Ï´Ù(´ÙÁß¼±Åñâ´É)") TMSG.AppendLine() TMSG.AppendLine("[¹øÈ£Ãâ·Â½Ã »ö»ó±¸ºÐ]") TMSG.AppendLine("Èæ»ö : ¹®ÀÚÆÐÅÏ Àû¿ë") TMSG.AppendLine("³ì»ö : ±æÀÌÆÐÅÏ Àû¿ë") TMSG.AppendLine("Àû»ö : ±æÀÌ,¹®ÀÚÆÐÅÏ ¹ÌÀû¿ë") TMSG.AppendLine() TMSG.AppendLine(">>ȯ°æ¼³Á¤¿¡¼­ »ö»ó±¸ºÐÀÌ °¡´ÉÇϵµ·Ï ¼³Á¤µÇ¾î¾ß ÇÕ´Ï´Ù") TMSG.AppendLine() Me.ToolTip1.SetToolTip(Me.PictureBox1, TMSG.ToString) TMSG = New System.Text.StringBuilder() TMSG.AppendLine() TMSG.AppendLine("<»ç¿ëÇÒ ÇÁ¸°Å͸¦ ¼±ÅÃÇϼ¼¿ä>") TMSG.AppendLine() TMSG.AppendLine("¾Æ¹«°Íµµ ÀԷµÇÁö ¾Ê¾ÒÀ¸¸é ±âº»ÇÁ¸°ÅÍ·Î Ãâ·ÂµË´Ï´Ù.") TMSG.AppendLine("ÇöÀç ¼³Ä¡µÇ¾îÀÖ´Â ÇÁ¸°ÅÍ ¸ñ·ÏÀÌ Ç¥½ÃµË´Ï´Ù.") TMSG.AppendLine() Me.combobox5.ToolTipText = TMSG.ToString 'Me.ToolTip1.SetToolTip(Me.ComboBox5, TMSG.ToString) TMSG = New System.Text.StringBuilder() TMSG.AppendLine() TMSG.AppendLine("<2¹øÂ° ÀåÀÌ Ãâ·ÂµÉ À§Ä¡¸¦ °áÁ¤Çϼ¼¿ä.>") TMSG.AppendLine() TMSG.AppendLine("2¹øÂ° ÀåÀÌ Ãâ·ÂµÉ¶§ 1¹øÂ°Àå°úÀÇ ¿ÞÂʰŸ® °ªÀÔ´Ï´Ù. 0 À¸·ÎÇÒ°æ¿ì µ¿ÀÏÇÑ X°ªÀÌ µË´Ï´Ù.") TMSG.AppendLine("°°Àº ÁÙ ¾Æ·¡ÂÊ¿¡ Ç¥½Ã¸¦ ÇÏ·Á¸é X=0 À¸·ÎµÎ°í Y=°ªÀ» ÀÓÀÇ·Î ÀÔ·ÂÇϼ¼¿ä") TMSG.AppendLine() Me.ToolTip1.SetToolTip(Me.tb_secX, TMSG.ToString) TMSG = New System.Text.StringBuilder() TMSG.AppendLine() TMSG.AppendLine("<2¹øÂ° ÀåÀÌ Ãâ·ÂµÉ À§Ä¡¸¦ °áÁ¤Çϼ¼¿ä.>") TMSG.AppendLine() TMSG.AppendLine("2¹øÂ° ÀåÀÌ Ãâ·ÂµÉ¶§ 1¹øÂ°Àå°úÀÇ À§ÂʰŸ® °ªÀÔ´Ï´Ù. 0 À¸·ÎÇÒ°æ¿ì µ¿ÀÏÇÑ Y°ªÀÌ µË´Ï´Ù.") TMSG.AppendLine("°°Àº ÁÙ ¾Æ·¡ÂÊ¿¡ Ç¥½Ã¸¦ ÇÏ·Á¸é X=0 À¸·ÎµÎ°í Y=°ªÀ» ÀÓÀÇ·Î ÀÔ·ÂÇϼ¼¿ä") TMSG.AppendLine() Me.ToolTip1.SetToolTip(Me.tb_secY, TMSG.ToString) TMSG = New System.Text.StringBuilder() TMSG.AppendLine() TMSG.AppendLine("<2Àå Ãâ·Â½Ã µ¥ÀÌÅÍÀÇ Ãâ·Â¹æ¹ýÀ» ¼±ÅÃÇϼ¼¿ä.>") TMSG.AppendLine() TMSG.AppendLine("[º¹»ç]´Â ÇöÀçµ¥ÀÌÅÍ¿Í µ¿ÀÏÇÑ µ¥ÀÌÅͰ¡ Ç¥½ÃµË´Ï´Ù.") TMSG.AppendLine("[´ÙÀ½]Àº ´ÙÀ½µ¥ÀÌÅͰ¡ Ç¥½ÃµË´Ï´Ù.") TMSG.AppendLine() TMSG.AppendLine("µ¿ÀÏÇÑ µ¥ÀÌÅ͸¦ Çѹø´õ Ãâ·ÂÇÏ·Á¸é [º¹»ç]¸¦ ¼±ÅÃÇϼ¼¿ä.") TMSG.AppendLine("´ÙÀ½µ¥ÀÌÅͱîÁö Ãâ·ÂÇÏ·Á¸é [´ÙÀ½]À» ¼±ÅÃÇϼ¼¿ä") Me.ToolTip1.SetToolTip(Me.cmb_dummy, TMSG.ToString) End Sub Private Sub con_dclick(ByVal sender As Object, ByVal e As System.EventArgs) WLog2(Auto_Log, "°³Ã¼¸¦ ´õºíŬ¸¯Çß½À´Ï´Ù.(À̰ÍÀº »ç¿ëµÇÁö ¾ÊÀ½)", "\¼øÂ÷·Î±×.txt") Dim Msg As New System.Text.StringBuilder("º¯°æÇÒ °ªÀ» ÀÔ·ÂÇϼ¼¿ä") Msg.AppendLine("ÁٹٲÞÀ»ÇÏ·Á¸é \n À» ÀÔ·ÂÇϼ¼¿ä") Msg.AppendLine("¿¹) ¼¼·Î·Î 12¸¦ Ãâ·ÂÇÏ·Á¸é 1\n2 À» ÀÔ·ÂÇϼ¼¿ä") Msg.AppendLine() Msg.AppendLine("º¯°æÇÑ °ªÀº ÇöÀçÆäÀÌÁö¿¡¸¸ Àû¿ëµË´Ï´Ù") Dim A As MyControlOLEDBv2.MyLabel = sender Dim Val As String = InputBox(Msg.ToString, "º¯°æ", A.MyText) If Val = "" Then Return Val = Val.Replace("\n", vbCrLf) A.MyText = Val '//preview ´Â ¾Æ¸¶µµ ÇÈÃĹڽº ´õºíŬ¸¯¿¡¼­ Á¤ÀÇÇѵí ÇÏ´Ù. End Sub Private Sub Save_Setting() WLog2(Auto_Log, "ÇöÀç ¼³Á¤(½ºÅ¸ÀÏ)À» ÀúÀåÇÕ´Ï´Ù.", "\¼øÂ÷·Î±×.txt") Dim A As New MyINI2(SettingFile) A.Write("PRINTFORM", "printername", Me.combobox5.Text) '//ÆÐÅϰ˻çÁ¶°Ç ÄÞº¸¹Ú½º End Sub Private Sub Load_Setting() WLog2(Auto_Log, "ÇöÀç¼³Á¤(½ºÅ¸ÀÏ)À» °¡Á®¿É´Ï´Ù.()", "\¼øÂ÷·Î±×.txt") WLog2(Auto_Log, "Load_Setting()", "\¼øÂ÷·Î±×.txt") Dim a As New MyINI2(SettingFile) Me.combobox5.Text = a.Read("PRINTFORM", "printername", "") End Sub Public Sub GeTviewData(ByVal index As Integer, ByVal previewWindow As Boolean, Optional ByRef ¹øÈ£ÆÐÅϰ˻ç As Integer = -1) ' Dim STARTTIME, ENDTIME As Date WLog2(Auto_Log, "Entering : GetviewData", "\¼øÂ÷·Î±×.txt") If Dv.Count <= 0 OrElse index < 0 OrElse index > Dv.Count Then WLog2(Auto_Log, "GetViewData : Not index or has problem", "\¼øÂ÷·Î±×.txt") 'MsgBox("GETVIEWDATA : µ¥ÀÌÅͰ¡ ¾ø°Å³ª À߸øµÈ À妽º ÀÔ´Ï´Ù", MsgBoxStyle.Information, "È®ÀÎ") & index & "/" & Me.CustFP1.ActiveSheet.RowCount & ")", MsgBoxStyle.Critical, "È®ÀÎ") Return '//À߸øµÈ À妽º´Â ¸®ÅÏ End If WLog2(Auto_Log, "Running : GetviewData", "\¼øÂ÷·Î±×.txt") °ü¸®±¸ = GetSpread(Me.Dv, index, "°ü¸®±¸") Àü»ê¹øÈ£ = GetSpread(Me.Dv, index, "ÀüÁÖ¹øÈ£") If °ü¸®±¸ <> "" OrElse Àü»ê¹øÈ£ <> "" Then Me.°ü¸®Àü»ê¹øÈ£ = °ü¸®±¸ & "-" & Àü»ê¹øÈ£ ¼±·Î¸í = GetSpread(Me.Dv, index, "¼±·Î¸í") ¹øÈ£ = GetSpread(Me.Dv, index, "¹øÈ£1") & GetSpread(Me.Dv, index, "¹øÈ£2") & GetSpread(Me.Dv, index, "¹øÈ£3") & GetSpread(Me.Dv, index, "¹øÈ£4") & GetSpread(Me.Dv, index, "¹øÈ£5") Me.ºñ°í1 = GetSpread(Me.Dv, index, "ºñ°í1") : Me.ºñ°í2 = GetSpread(Me.Dv, index, "ºñ°í2") Me.ºñ°í3 = GetSpread(Me.Dv, index, "ºñ°í3") : Me.ºñ°í4 = GetSpread(Me.Dv, index, "ºñ°í4") ºñ°í = ºñ°í1 & ºñ°í2 & ºñ°í3 & ºñ°í4 Me.°íÀå½Å°í = Me.gojang.Text.ToString() Me.BlineNum = 0 '//ÁÙ¹øÈ£¼ö¸¦ ÃʱâÈ­ÇÑ´Ù. //'//Àüü ¸îÁÙÀÌ Ç¥½Ã‰ç´ÂÁö È®ÀÎÇÑ´Ù. ÀÌ´Â ÆÐÅÏÀ» ãÀ»¶§ ¾´´Ù. If ºñ°í1 <> "" Then BlineNum += 1 : If ºñ°í2 <> "" Then BlineNum += 1 : If ºñ°í3 <> "" Then BlineNum += 1 : If ºñ°í4 <> "" Then BlineNum += 1 WLog2(Auto_Log, "Complete : Load Data from Dataview's data", "\¼øÂ÷·Î±×.txt") Me.Text = "¼ö¿ë¹øÈ£Âû Ãâ·ÂÀÛ¾÷(" & ¹øÈ£ & ")" WLog2(Auto_Log, "Entering : All Parse Function.", "\¼øÂ÷·Î±×.txt") '============ ¿©±â´Â µû·Î ÇØ¼®ÀÌ ¾ø´Â°÷ÀÌ´Ù ========================================================== Me.PARSE_ÀϷùøÈ£(index) '==================================================================================================== WLog2(Auto_Log, "ÆÐÅÏÀÌÀÖ´Â PASE ±¸¹®À» ½ÇÇàÇÕ´Ï´Ù.()", "\¼øÂ÷·Î±×.txt") If Me.PARSE_¼±·Î¸í(Me.¼±·Î¸í) Then Me.PARSE_¼±·Î¸íÆÐÅÏ(¼±·Î¸í) If Me.PARSE_¹øÈ£(Me.¹øÈ£) Then Me.PARSE_¹øÈ£ÆÐÅÏ(¹øÈ£) If Me.PARSE_°ü¸®Àü»ê¹øÈ£(Me.°ü¸®Àü»ê¹øÈ£) Then Me.PARSE_°ü¸®Àü»ê¹øÈ£ÆÐÅÏ(Me.°ü¸®Àü»ê¹øÈ£) If Me.PARSE_ºñ°í1(Me.ºñ°í1) Then Me.PARSE_ºñ°í1ÆÐÅÏ(ºñ°í1) If Me.PARSE_ºñ°í2(Me.ºñ°í2) Then Me.PARSE_ºñ°í2ÆÐÅÏ(ºñ°í2) If Me.PARSE_ºñ°í3(Me.ºñ°í3) Then Me.PARSE_ºñ°í3ÆÐÅÏ(ºñ°í3) If Me.PARSE_ºñ°í4(Me.ºñ°í4) Then Me.PARSE_ºñ°í4ÆÐÅÏ(ºñ°í4) If Me.PARSE_°íÀå½Å°í(Me.°íÀå½Å°í) Then Me.PARSE_°íÀå½Å°í(°íÀå½Å°í) WLog2(Auto_Log, "»ç¿ëÀÚ¹®ÀÚÀÇ Ç¥½Ã¿©ºÎ¸¦ °áÁ¤ÇÕ´Ï´Ù.()", "\¼øÂ÷·Î±×.txt") '»ç¿ëÀÚ¹®ÀÚÀÇ Ç¥½Ã¿©ºÎ u a b d e 'If Not Me.cb_»ç¿ëÀÚ1.Checked Then Me.S»ç¿ëÀÚ1(0).Visible = False 'If Not Me.cb_»ç¿ëÀÚ2.Checked Then Me.S»ç¿ëÀÚ2(0).Visible = False 'If Not Me.cb_»ç¿ëÀÚ3.Checked Then Me.S»ç¿ëÀÚ3(0).Visible = False 'If Not Me.cb_»ç¿ëÀÚ4.Checked Then Me.S»ç¿ëÀÚ4(0).Visible = False 'If Not Me.cb_»ç¿ëÀÚ5.Checked Then Me.S»ç¿ëÀÚ5(0).Visible = False WLog2(Auto_Log, "Pewview À©µµ¿ì¸¦ ½ÇÇàÇÕ´Ï´Ù.()", "\¼øÂ÷·Î±×.txt") Me.preview_window() End Sub Public Function ChkNumPattern(ByVal index As Integer) As Int16 WLog2(Auto_Log, "¹øÈ£ÆÐÅÏÀ» üũÇÕ´Ï´Ù. int16À» ¹ÝȯÇÕ´Ï´Ù.()", "\¼øÂ÷·Î±×.txt") If Dv.Count <= 0 Or index < 0 OrElse index > Dv.Count Then 'MsgBox("µ¥ÀÌÅͰ¡ ¾ø°Å³ª À߸øµÈ À妽º ÀÔ´Ï´Ù(" & index & "/" & Me.CustFP1.ActiveSheet.RowCount & ")", MsgBoxStyle.Critical, "È®ÀÎ") Return -1 '//À߸øµÈ À妽º´Â ¸®ÅÏ End If Dim °Ë»ç¹øÈ£ÆÐÅϰ˻ç As Integer = 0 Dim °Ë»ç¹øÈ£ As String °Ë»ç¹øÈ£ = GetSpread(Me.Dv, index, 7) & GetSpread(Me.Dv, index, 8) & GetSpread(Me.Dv, index, 9) & GetSpread(Me.Dv, index, 10) & GetSpread(Me.Dv, index, 11) If °Ë»ç¹øÈ£.Trim = "" Then Return -1 '//°Ë»ç¹øÈ£ÀÚü¿¡ ¹®Á¦°¡ÀÕÀ»½Ã ¿¡ ¸®ÅÏ Dim Wlen As Short = °Ë»ç¹øÈ£.Length : If Wlen <= 0 Then Return -1 '//¾ø´Â ±Û±Í°¡ ¿ÓÀ»¶§ ÅÏÇØ¹ö¸°´Ù. Dim SRC() As Char = °Ë»ç¹øÈ£.ToCharArray Dim Log As String = "\Parse_°Ë»ç¹øÈ£ÆÐÅÏ.txt" Dim SepPos As Short = °Ë»ç¹øÈ£.IndexOf(";") Dim retval As Integer = 0 ''0Àº Á¤»ó 1Àº ±æÀÌÆÐÅϾøÀ½ 2´Â 3Àº ±æÀÌ+¹®ÀÚ¾øÀ½ '//°Ë»ç¹øÈ£´Â ±æÀÌÆÐÅÏÀ» ÇÏÁö¾Ê°í ¹®ÀÚÆÐÅϸ¸ ÇÑ´Ù. Dim pname As String Dim Arinini As New MyINI2(DrStyle.FILE) Dim PATTERN As String = PATTERN_ENC(°Ë»ç¹øÈ£) '//¸ÕÀú¹®ÀÚ°¡ÀÖ´ÂÁö È®ÀÎÇÑ´Ù. pname = "JJNUMPATTERNII" & PATTERN Dim Dr() As DataRow Dr = Me.DtPattern.Select("NAME = '" & pname & "DESC'") WLog2(Auto_Log, "±æÀÌÆÐÅÏÀÇ Á¸Àç¿©ºÎ = " & Dr.GetUpperBound(0) & ":" & pname, "\¼øÂ÷·Î±×.txt") If Dr.GetUpperBound(0) <> -1 Then '//ÀÖ´Ù. retval += 2 'WLog2(Auto_Log, "°ü¸®±¸5¹ø ¹®ÀÚ¸¦ ã¾Ò½À´Ï´Ù (" & pname & "DESC" & ")", Log) End If 'If Arinini.Read(pname, "DESC") = vbNullString Then retval += 2 '//ÆÐÅÏÀÌ ¾øÀ¸¹Ç·Î ¹Ù·Î ³Ñ±ä´Ù. pname = "JJNUMPATTERN" & Wlen Dr = DtPattern.Select("NAME = '" & pname & "DESC'") WLog2(Auto_Log, "¹®ÀÚÆÐÅÏÀÇ Á¸Àç¿©ºÎ = " & Dr.GetUpperBound(0) & ";" & pname, "\¼øÂ÷·Î±×.txt") If Dr.GetUpperBound(0) <> -1 Then '//ÀÖ´Ù. retval += 1 'WLog2(Auto_Log, "°ü¸®±¸5¹ø ¹®ÀÚ¸¦ ã¾Ò½À´Ï´Ù (" & pname & "DESC" & ")", Log) End If Return retval '// 0ÀÌ ¸®ÅϵɰÍÀÌ´Ù. ÆÐÅÏÀÌ ¸ðµÎ Á¤»óÀ̶õ ¶æÀÌ´Ù End Function Public Sub CLEAR_ITEM(ByVal DIV As String) WLog2(Auto_Log, "Running : Clear_item() div=" & DIV, "\¼øÂ÷·Î±×.txt") Select Case DIV.ToUpper Case "L" For i As Short = 0 To S¼±·Î¸í.GetUpperBound(0) S¼±·Î¸í(i).MyText = "" S¼±·Î¸í(i).Visible = False Next Case "H" S°ü¸®±¸Àü»ê¹øÈ£.MyText = "" S°ü¸®±¸Àü»ê¹øÈ£.Visible = False Case "X" For i As Short = 0 To SÀüÁÖ¹øÈ£.GetUpperBound(0) SÀüÁÖ¹øÈ£(i).MyText = "" SÀüÁÖ¹øÈ£(i).Visible = False Next Case "N" SÀϷùøÈ£.MyText = "" SÀϷùøÈ£.Visible = False Case "O" Me.Sºñ°í1(0).MyText = "" Me.Sºñ°í1(0).Visible = False Case "P" Me.Sºñ°í2(0).MyText = "" Me.Sºñ°í2(0).Visible = False Case "Q" Me.Sºñ°í3(0).MyText = "" Me.Sºñ°í3(0).Visible = False Case "R" Me.Sºñ°í4(0).MyText = "" Me.Sºñ°í4(0).Visible = False Case "Z" Me.S°íÀå½Å°í(0).MyText = "" Me.S°íÀå½Å°í(0).Visible = False Case Else MsgBox("Clear_Item ¿¡ ¾Ë¼ö¾ø´Â ¹®ÀÚ ( " & DIV & ") ÀÔ´Ï´Ù") End Select End Sub Public Sub GetStyleList() AddLog(Auto_Log, "GetStyleListÁøÀÔ()", "\ÁöÁß(ÄÉÀ̺í¶óº§)¼øÂ÷·Î±×.txt") '//½ºÅ¸ÀϸíÀ» °¡Á®¿Í¼­ ÄÞº¸¹Ú½º¿¡ Ç¥½ÃÇÕ´Ï´Ù. '//style Æú´õ¾Æ·¡ÀÇ ini ÆÄÀÏÀüü¸¦ ½ºÅ¸ÀÏ À̶óÇÑ´Ù. '//ÆÄÀÏÀ» Àо ¸Þ¸ð¸®¿¡ ÀúÀåÇÑ´Ù. ' Dim Arinini As MyINI Dim CurIdx As Integer = 0 If StyleDir.Exists = False Then StyleDir.Create() Dim StyleCnt As Short = StyleDir.GetFiles("*.ini").GetUpperBound(0) 'ReDim StyleList(StyleCnt) ReDim Common.PDS(StyleCnt) '//ÆÐÅϵ¥ÀÌÅͼÂÀÇ °¹¼ö¸¦ ÀúÀåÇÑ´Ù Dim Section, Value As New ArrayList Dim SectionIdx As Integer = 0 AddLog(Auto_Log, "GetStyleList(ÆÄÀÏ¿¡¼­ ½ºÅ¸ÀϸñÀ» °¡Á®¿Â´Ù)", "\ÁöÁß(ÄÉÀ̺í¶óº§)¼øÂ÷·Î±×.txt") '//½ºÅ¸ÀÏÆÄÀϸíÀ» Å×ÀÌºí¿¡ ÀÓ½ÃÀúÀåÇÑ´Ù(Àϰý·Î ºÒ·¯¿À±âÀ§ÇÔÀÌ´Ù.) Dim Dt As New System.Data.DataTable : Dt.Columns.Add("ÆÄÀϸí") For Each FI As IO.FileInfo In StyleDir.GetFiles("*.ini") Dt.Rows.Add(FI.FullName) Next For Each Dr As DataRow In Dt.Select("", "ÆÄÀϸí asc") Dim FileName As String = Dr("ÆÄÀϸí") AddLog(Auto_Log, "ÆÄÀϸí=(" & FileName & ") ÀÇ ½ºÅ¸ÀÏÀ» °¡Á®¿É´Ï´Ù ¸Þ¸ð¸®·Î", "\ÁöÁß¼øÂ÷·Î±×.txt") '//XMLÅ×À̺íÀ» »õ·Î»ý¼º Common.PDS(CurIdx) = New PatternDS GetAllsection(FileName, CurIdx) Me.cmb_style.Items.Add(Common.PDS(CurIdx).TStyle.Rows(0)("DESC").ToString) CurIdx += 1 Next End Sub Private Sub µ¥ÀÌÅÍÅ×ÀÌºí°»½Å() WLog2(Auto_Log, "µ¥ÀÌÅÍÅ×ÀÌºí °»½Å()", "\¼øÂ÷·Î±×.txt") GetAllsection(DrStyle.FILE, Me.cmb_style.SelectedIndex) '//±âº»º¯¼ö¼³Á¤ 170219 DrStyle = Common.PDS(Me.cmb_style.SelectedIndex).TStyle.Rows(0) DtPattern = Common.PDS(Me.cmb_style.SelectedIndex).TPattern End Sub Private Function Prepare_Print() As Boolean '//¹üÀ§³»ÀÇ ÆäÀÌÁö¹øÈ£¿Í ÀÏÄ¡ÇÏ´Â ¹øÈ£¸¦ ã¾Æ¼­ ¹è¿­¿¡ ÇÒ´çÇÑ´Ù. WLog2(Auto_Log, "Func(PrePare_Print) ÀÎ¼â¹øÈ£ ÇÒ´ç Áغñ", "\Alllog.txt") Dim Number As Integer = 0 Dim FindNum As Boolean = False Me.printindex = 0 '//¹è¿­ÀÇ Ã¹¹øÀ¸·Î Ãâ·ÂÀ» ÁغñÇÑ´Ù. 'Me.PrintArray = Nothing '//Ãâ·Â¹øÈ£ ¹è¿­À» ÀúÀåÇÒ °ÍÀÌ´Ù.\ ReDim PrintArray(0) PrintArray(0) = 1 'log = False 'AddLog("==============Ãâ·ÂÁغñÁß==============", True) Me.pDoc.DefaultPageSettings.Margins.Left = 0 'Me.tb_marginx.Text '//ÁÂ,¿ì ¿©¹é ¼³Á¤ Me.pDoc.DefaultPageSettings.Margins.Top = 0 'Me.tb_marginy.Text Me.pDoc.DefaultPageSettings.Landscape = IIf(Me.cmb_landscape.SelectedIndex = 0, False, True) '//°¡·Î,¼¼·Î Ãâ·Â°áÁ¤ '//ÇÁ¸°Å͸íÀÌ ÁöÁ¤µÇ¾îÀÖ´Ù¸é ÇØ´ç ÇÁ¸°Åͷμ³Á¤,¾øÀ¸¸é ±âº»ÇÁ¸°ÅÍ If Me.combobox5.Text <> "" Then Me.pDoc.PrinterSettings.PrinterName = Me.combobox5.Text '//¹üÀ§Àε¥ °ªÀÌ ºñ¾îÀÖÀ¸¸é ÇöÀçÃâ·ÂÀ¸·Î If Me.RadioButton3.Checked AndAlso Me.tb_printrange.Text.Trim = "" Then Me.RadioButton2.Checked = True If Me.rad_repeat.Checked Then If IsNumeric(Me.tb_printrange.Text) = False Then MsgBox("Ãâ·ÂÀå¼ö¿¡ ¼ýÀÚ¸¸ ÀÔ·ÂÇϼ¼¿ä", MsgBoxStyle.Critical, "È®ÀÎ") Return False End If ReDim PrintArray(Val(Me.tb_printrange.Text) - 1) For i As Integer = 0 To Val(Me.tb_printrange.Text) - 1 PrintArray(i) = Me.BindingNavigatorPositionItem.Text - 1 Next End If If Me.RadioButton1.Checked Then '//ÀüüÃâ·ÂÀ̹ǷΠ¹è¿­¿¡ ¸ðµç°ÍÀ» ¸®ÅÏÇÑ´Ù : ¸ðµçµ¥ÀÌÅÍÀÇ ·¹ÄÚµå À妽º¸¦ ÀúÀåÇÑ´Ù. 'MsgBox("rad1") ReDim Me.PrintArray(Me.Dv.Count - 1) For i As Integer = 0 To Dv.Count - 1 Me.PrintArray(i) = i Next End If If Me.RadioButton2.Checked Then '//ÇöÀçÆäÀÌÁö : ÇöÀ纸°íÀÖ´Ù´Â Æä¿¡ÁöÀÇ ·¹ÄÚµåÀ妽º¸¸ ÀúÀåÇÑ´Ù. 'MsgBox("Rad2" & Me.BindingNavigatorPositionItem.Text - 1) ReDim Me.PrintArray(0) Me.PrintArray(0) = Me.BindingNavigatorPositionItem.Text - 1 '/ÇöÀçÄ«¿îÆ®º¸´Ù 1ÀÛ´Ù ¹è¿­Àº 0ºÎÅÍ ½ÃÀÛÇϱ⋚¹®¿¡ 'Me.printindex = -1 End If '//2007-12-21ÀÏ º¯°æ½ÃÀÛ If Me.RadioButton3.Checked Then '//¹üÀ§ÁöÁ¤ : ÁöÁ¤µÈ¹üÀ§³»ÀÇ ¹øÈ£°ªÀ» °¡Áö°í ÇØ´ç À妽º¸¦ ã¾Æ¼­ ¹è¿­¿¡ ÇÒ´çÇÑ´Ù. 'Dim buff() As String = Me.tb_printrange.Text.Split("/") 'Dim curpos As Integer = 0 'MsgBox("rad3") Dim buff As String = Me.tb_printrange.Text ReDim Me.PrintArray(0) : Me.PrintArray(0) = -1 '//¸ÕÀú -°¡ ÀÖ³ª¾ø³ª ÆÇ´ÜÇØ¼­ ÇÑÆäÀÌÁö¿ëÀÎÁö ¹üÀ§¿ëÀÎÁö ±¸ºÐÇÑ´Ù. If buff.IndexOf("-") >= 0 Then '//¹üÀ§ÀÌ´Ù. Dim SubBuff() As String = buff.Split("-") Dim Sttnum As Integer = CInt(SubBuff(0)) '//½ÃÀÛ Dim endnum As Integer = CInt(SubBuff(1)) '//Á¾·á°ª For SI As Integer = 0 To endnum - Sttnum '//¹üÀ§°¹¼ö¸¸Å­ µ·´Ù FindNum = False Number = CInt(Sttnum + SI) '//ÆäÀÌÁö¸¸ Àû¾ùÀ» °ÍÀ̹ǷΠFor ni As Integer = 0 To Dv.Count - 1 '//ÇöÀçºäÀÇ ¸ðµçµ¥ÀÌÅ͸¦ °¡Áö°í °Ë»öÇÑ´Ù ÁÂ->¿ì ¼øÂ÷°Ë»ö If Number = Dv(ni).Row("¹øÈ£") Then If PrintArray(0) = -1 Then '//óÀ½µ¥ÀÌÅÍÀ̹ǷΠMe.PrintArray(0) = ni Else '//óÀ½À̾ƴϹǷΠ¹è¿­À» Áõ°¡½ÃŰ°í ±âÀÔÇÑ´Ù. ReDim Preserve PrintArray(PrintArray.GetUpperBound(0) + 1) '//¹è¿­1Áõ°¡ Me.PrintArray(PrintArray.GetUpperBound(0)) = ni End If FindNum = True Exit For End If Next Next Else '//ÆäÀÌÁö¹øÈ£¸¸ Àû¾úÀ»¶§´Ù If IsNumeric(buff) Then Number = CInt(buff) '//ÆäÀÌÁö¸¸ Àû¾ùÀ» °ÍÀ̹ǷΠFor ni As Integer = 0 To Dv.Count - 1 '//ÇöÀçºäÀÇ ¸ðµçµ¥ÀÌÅ͸¦ °¡Áö°í °Ë»öÇÑ´Ù ÁÂ->¿ì ¼øÂ÷°Ë»ö If Number = Dv(ni).Row("¹øÈ£") Then PrintArray(0) = ni Exit For End If Next Else MsgBox("¹üÀ§(-)¸¦ Á¦¿ÜÇÏ°í ¼ýÀÚ¸¸ ÀÔ·ÂÇϼ¼¿ä", MsgBoxStyle.Critical, "ÀԷ¿À·ù") End If End If End If If PrintArray(0) = -1 Then '//¹è¿­¿¡ ¾Æ¹«°Íµµ ¾ø´Ù¸é Return False Else Return True End If End Function Private Sub Print_Preview() WLog2(Auto_Log, "print_preview ¹Ì¸®º¸±â ¹öưÀ» ´­·¶À»¶§´Ù.()", "\¼øÂ÷·Î±×.txt") Me.PrintMode = True If Not Prepare_Print() Then MsgBox("ÀμâÇÒ ¸ñ·ÏÀÌ ¾ø½À´Ï´Ù", MsgBoxStyle.Critical, "È®ÀÎ") Return End If Dim Preview As New PrintPreviewDialog() Try Preview.Document = pDoc Preview.ShowDialog() Catch EX As Exception MsgBox(EX.Message) End Try End Sub Private Sub pDoc_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles pDoc.PrintPage AddLog(Admin, "proc_printpage ÇÁ¸°Æ®ÆÐÀÌÁö¸¦ ÀÛ¼ºÇÑ´Ù Áß¿äÇÏ´Ù.()", "\Alllog.txt") Dim fmt As New StringFormat(StringFormatFlags.LineLimit) Dim MyFont As Font Dim NewFontSize As Int16 = 10 Dim dummy As Boolean = False '//À̰ªÀÌ true À̸é Ãâ·Â½Ã º¯À§¸¦ ÁöÁ¤Çؼ­ Ãâ·ÂÇÑ´Ù. Dim C As MyControlOLEDBv2.MyLabel Dim NewLeft, NewTop As Integer 'ÆäÀÌÁö ±¸ºÐÀ» ÀÌÇØÇÏ°í ¸î°³¸¦ ÂïÀ»Áö °áÁ¤ÇÑ´Ù. 'Debug.Print("ÇÁ¸°ÅÍÀ妽º=" & Me.printindex) 'Debug.Print("ÇÁ¸°Å͹迭=" & Me.PrintArray.GetUpperBound(0)) If Me.printindex <> -1 Then If Me.rad_repeat.Checked = False Then Me.GeTviewData(Me.PrintArray(Me.printindex), False) '//ÆäÀÌÁö¸¦ °»½ÅÇϰí Ãâ·ÂÀ» ½ÃÀÛÇÑ´Ù. Else MsgBox("ÇÁ¸°Æ® À妽º°¡ ¾ø½À´Ï´Ù", MsgBoxStyle.Critical, "È®ÀÎ") End If e.Graphics.ScaleTransform(Me.tb_scalex.Text, Me.tb_scaley.Text) If Me.chk_draw.Checked Then '//¶óÀÎÀ» ±×¸°´Ù. For Each Rect As S_Line In Draw_Line Dim Pen As New Drawing.Pen(Rect.PenColor, Rect.PenWidth) If Me.PrintMode Then e.Graphics.DrawLine(Pen, Rect.X + CInt(Me.tb_marginx.Text), Rect.Y + CInt(Me.tb_marginy.Text), Rect.X2 + CInt(Me.tb_marginx.Text), Rect.Y2 + CInt(Me.tb_marginy.Text)) Else e.Graphics.DrawLine(Pen, Rect.X, Rect.Y, Rect.X2, Rect.Y2) End If Next '//¹Ú½º¸¦ ±×¸°´Ù. For Each Rect As S_Box In Draw_Box Dim Pen As New Drawing.Pen(Rect.PenColor, Rect.PenWidth) If Me.PrintMode Then e.Graphics.DrawRectangle(Pen, Rect.X + CInt(Me.tb_marginx.Text), Rect.Y + CInt(Me.tb_marginy.Text), Rect.Width, Rect.Height) Else e.Graphics.DrawRectangle(Pen, Rect.X, Rect.Y, Rect.Width, Rect.Height) End If Next '//¿øÀ» ±×¸°´Ù. For Each Rect As S_Circle In Draw_Circle Dim Pen As New Drawing.Pen(Rect.PenColor, Rect.PenWidth) If Me.PrintMode Then e.Graphics.DrawEllipse(Pen, Rect.X + CInt(Me.tb_marginx.Text), Rect.Y + CInt(Me.tb_marginy.Text), Rect.Width, Rect.Height) Else e.Graphics.DrawEllipse(Pen, Rect.X, Rect.Y, Rect.Width, Rect.Height) End If Next End If If °ü¸®±¸ <> "" Then Try '//QRÄڵ带 ±×¸°´Ù. For Each Rect As S_QRCode In Draw_QRcode 'Dim scale As Int16 Dim version As Int16 Dim image As Image Dim data As String Dim errorCorrect As String Dim qrCodeEncoder1 As New QRCodeEncoder() Dim encoding As String encoding = cboEncoding.Text If encoding = "3" Then qrCodeEncoder1.QRCodeEncodeMode = ThoughtWorks.QRCode.Codec.QRCodeEncoder.ENCODE_MODE.BYTE ElseIf encoding = "1" Then qrCodeEncoder1.QRCodeEncodeMode = ThoughtWorks.QRCode.Codec.QRCodeEncoder.ENCODE_MODE.ALPHA_NUMERIC ElseIf encoding = "2" Then qrCodeEncoder1.QRCodeEncodeMode = ThoughtWorks.QRCode.Codec.QRCodeEncoder.ENCODE_MODE.NUMERIC Try version = Convert.ToInt16(cboVersion.Text) qrCodeEncoder1.QRCodeVersion = version Catch ex As Exception MessageBox.Show("Invaild Version!") End Try End If errorCorrect = cboCorrectionLevel.Text If errorCorrect = "1" Then qrCodeEncoder1.QRCodeErrorCorrect = ThoughtWorks.QRCode.Codec.QRCodeEncoder.ERROR_CORRECTION.L ElseIf errorCorrect = "2" Then qrCodeEncoder1.QRCodeErrorCorrect = ThoughtWorks.QRCode.Codec.QRCodeEncoder.ERROR_CORRECTION.M ElseIf errorCorrect = "3" Then qrCodeEncoder1.QRCodeErrorCorrect = ThoughtWorks.QRCode.Codec.QRCodeEncoder.ERROR_CORRECTION.Q ElseIf errorCorrect = "4" Then qrCodeEncoder1.QRCodeErrorCorrect = ThoughtWorks.QRCode.Codec.QRCodeEncoder.ERROR_CORRECTION.H End If qrȨÆäÀÌÁö1 = home1.Text qrȨÆäÀÌÁö2 = home2.Text qrȨÆäÀÌÁö3 = home3.Text qrȨÆäÀÌÁö4 = home4.Text data = qrȨÆäÀÌÁö1 & "/" & qrȨÆäÀÌÁö2 & "/" & qrȨÆäÀÌÁö3 & "/" & qrȨÆäÀÌÁö4 & "=" & °ü¸®±¸ & "-" & Àü»ê¹øÈ£ & "&name=" & ¼±·Î¸í & ":" & ¹øÈ£ If lbQrBg.BackColor <> Drawing.Color.White Then qrCodeEncoder1.QRCodeBackgroundColor = lbQrBg.BackColor If lbQrFG.BackColor <> Drawing.Color.Black Then qrCodeEncoder1.QRCodeForegroundColor = lbQrFG.BackColor image = qrCodeEncoder1.Encode(data, e.Graphics.DpiX, e.Graphics.DpiY) If Me.PrintMode Then e.Graphics.DrawImage(image, Rect.X + CInt(Me.tb_marginx.Text), Rect.Y + CInt(Me.tb_marginy.Text), Rect.Width, Rect.Height) Else e.Graphics.DrawImage(image, Rect.X, Rect.Y, Rect.Width, Rect.Height) End If ' If Rect.Width = 0 OrElse Rect.Height = 0 Then ' Ga.DrawImage(Image, Rect.X + MyProperty_Paper.Ãâ·Â¿©¹éX, Rect.Y + MyProperty_Paper.Ãâ·Â¿©¹éY) 'e.Graphics.DrawImage(image, Rect.X + CInt(Me.tb_marginx.Text), Rect.Y + CInt(Me.tb_marginy.Text)) 'Else ' Ga.DrawImage(Image, Rect.X + MyProperty_Paper.Ãâ·Â¿©¹éX, Rect.Y + MyProperty_Paper.Ãâ·Â¿©¹éY, Rect.Width, Rect.Height) 'e.Graphics.DrawImage(image, Rect.X, Rect.Y, Rect.Width, Rect.Height) 'End If Next Catch ex As Exception MessageBox.Show(ex.ToString()) End Try End If Dummyflag: '//--2ÀåÃâ·ÂÀϰæ¿ì À̺κп¡¼­ ´Ù½Ã ½ÃÀÛÇÑ´Ù. 'MsgBox(dummy) For i As Integer = 0 To Me.AllLabels.GetUpperBound(0) C = Me.AllLabels(i).ctl If C.Visible = True AndAlso C.MyText <> "" Then '//myfont ´Â ±Û²ÃÀÇ ÀϰýÅ©±âº¯°æ ¿É¼ÇÀÇÀÇÇØ¼­ »ý¼ºµÊ NewFontSize = C.MyFont.Size + Me.tb_myfontsize.Text If NewFontSize < 0 Then NewFontSize = 0 MyFont = New Font(C.MyFont.FontFamily, NewFontSize, C.MyFont.Style) If dummy Then '//ÀμⰡ ¾Æ´Ò´ë¿¡´Â margin À» ³ÖÁö¾Ê´Â´Ù. NewLeft = C.Left + IIf(Me.PrintMode, Me.tb_marginx.Text, 0) + Me.tb_secX.Text NewTop = C.Top + IIf(Me.PrintMode, Me.tb_marginy.Text, 0) + Me.tb_secY.Text Else NewLeft = C.Left + IIf(Me.PrintMode, Me.tb_marginx.Text, 0) NewTop = C.Top + IIf(Me.PrintMode, Me.tb_marginy.Text, 0) End If If C.ÀåÆò = 100 AndAlso C.Àå³ôÀÌ = 100 Then '//ÀåÆò¹Ì»ç¿ë ¹®ÀÚ¿­ ó¸® e.Graphics.DrawString(C.ÃÖÁ¾¹®ÀÚ, MyFont, Brushes.Black, New Point(NewLeft, NewTop)) Else '//ÀåÆò»ç¿ë À̹ÌÁö ó¸® Dim NewX, Newy As Integer Dim SrcDpix, SrcDPiY As Single 'MsgBox(Tobj.Àå³ôÀÌ) SrcDpix = C.CreateGraphics.DpiX SrcDPiY = C.CreateGraphics.DpiY NewX = C.GetSize(MyFont).Width * (C.ÀåÆò / 100) * (e.Graphics.DpiX / SrcDpix) Newy = C.GetSize(MyFont).Height * (C.Àå³ôÀÌ / 100) * (e.Graphics.DpiY / SrcDPiY) Dim BMP As New Bitmap(NewX, Newy, e.Graphics) Dim G As Graphics = Graphics.FromImage(BMP) G.ScaleTransform((C.ÀåÆò / 100), (C.Àå³ôÀÌ / 100)) G.DrawString(C.ÃÖÁ¾¹®ÀÚ, MyFont, Brushes.Black, 0, 0) G.Dispose() e.Graphics.DrawImage(BMP, New Point(NewLeft, NewTop)) ', CInt(GetSize.Width * (vÀåÆò / 100)), GetSize.Height) End If End If Next '//ÆäÀÌÁö°¡ ÀÖ´ø¾ø´ø 2À庹»ç¸¦ ¸ÕÀú È®ÀÎÇÑ´Ù. '//´ÙÀ½ÆäÀÌÁö°¡ ÀÕÀ¸¸é ´ÙÀ½±â´ÉÀ» È®ÀÎÇÏ°í ±×·¸Áö ¾ÊÀ»°æ¿ì¿¡´Â ÇÑÀ庹»ç¸¸ È®ÀÎÇÑ´Ù. If dummy = False AndAlso Me.cb_dummy.Checked Then '//2À庹»çÀϰæ¿ì¿¡´Â ÇöÀ纹»çÀÎÁö ´ÙÀ½º¹»çÀÎÁö üũ dummy = True If Me.cmb_dummy.SelectedIndex = 0 Then '//ÇöÀ纹»ç´Â ±ÄÀÌ ´ÙÀ½Àå¾ø¾îµµ °¡´ÉÇÏ´Ù. 'dummy = True ' MsgBox("ÀÕ´ø¾ø´ø ÇöÀ纹»ç") GoTo Dummyflag Else '//´ÙÀ½º¹»çÀ̹ǷΠ´ÙÀ½ÀåÀÌÀÕ´ÂÁö È®ÀÎÇϰíÇØ¾ßÇÑ´Ù. 'MsgBox("´ÙÀ½À庹»ç") If Me.printindex >= 0 AndAlso Me.printindex < Me.PrintArray.GetUpperBound(0) Then '//´ÙÀ½ÀåÀÌÀÖ´Ù. 'MsgBox("´ÙÀ½ÀåÀÌÀÕ´Ù.. µ¥ÀÌÅ͹ٲٰí gotoÇÑ´Ù") Me.printindex += 1 '/1Àå³Ñ±â°í If Me.rad_repeat.Checked = False Then Me.GeTviewData(Me.PrintArray(Me.printindex), False) '//µ¥ÀÌÅÍ ¹Ù²Ù´Âµ¥..È­¸éÀº °»½ÅÇÏÁö ¾Ê´Â´Ù. GoTo Dummyflag '//¹Ù·Î Ãâ·Â´Ù½ÃÇÑ´Ù. Else 'MsgBox("´ÙÀ½Àå¾ø¾î¼­ ±×³É³Ñ¾î°£´Ù") '´ÙÀ½ÀåÀ̾øÀ¸¹Ç·Î ±×³É ³Ñ¾î°£´Ù. e.HasMorePages = False End If End If Else '//´ÙÀ½ÀåÀ¸·Î³Ñ±é´Ï´Ù. If Me.printindex >= 0 AndAlso Me.printindex < Me.PrintArray.GetUpperBound(0) Then '//´ÙÀ½ÀåÀÌÀÖ´Ù. dummy = False '//Àå¼ö¸¦ ³Ñ¾î°¡¸é ´õ¹Ì¸¦ ÇØÁ¦ÇÑ´Ù. Me.printindex += 1 e.HasMorePages = True Else e.HasMorePages = False End If End If e.Graphics.Dispose() End Sub Private Sub Print() If MsgBox("Àμ⸦ ÇϽðڽÀ´Ï±î?", MsgBoxStyle.Information + MsgBoxStyle.OkCancel, "È®ÀÎ") = MsgBoxResult.Ok Then WLog2(Auto_Log, "print ¹Ù·Î Ãâ·ÂÀ» Ç϶ó´Â ¸í·ÉÀÌ´Ù()", "\Alllog.txt") Me.PrintMode = True If Me.Prepare_Print() Then pDoc.Print() GeTviewData(BindingSource1.Position, True) ' preview_window() Else MsgBox("ÀμⰡ´ÉÇÑ ¸ñ·ÏÀÌ ¾ø½À´Ï´Ù", MsgBoxStyle.Critical, "È®ÀÎ") End If Else NOTICE("ÀμⰡ Ãë¼ÒµÇ¾ú½À´Ï´Ù", Drawing.Color.Tomato, Me.lb_msg) End If End Sub Private Sub con_Mmove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) WLog2(Auto_Log, "con _move °³Ã¼À̵¿ÇÒ ÇÁ·Î½ÃÁ®Àε¥ ÇöÀç ¾È¾´´Ù.()", "\¼øÂ÷·Î±×.txt") If My.Computer.Keyboard.CtrlKeyDown AndAlso e.Button = System.Windows.Forms.MouseButtons.Left Then ' Me.Text = CType(sender, Label).Left & "/" & e.X CType(sender, MyControlOLEDBv2.MyLabel).Left += e.X CType(sender, MyControlOLEDBv2.MyLabel).Top += e.Y End If End Sub Public Sub ViewProperty(ByVal sender As MyControlOLEDBv2.MyLabel) WLog2(Auto_Log, "view properfty °³Ã¼ÀÇ »óꏱâ()", "\¼øÂ÷·Î±×.txt") If Not Me.GroupBox2.Enabled Then Me.GroupBox2.Enabled = True Me.TB_FONTNAME.Text = sender.MyFont.Name.ToString Me.tb_left.Text = sender.Left Me.tb_top.Text = sender.Top Me.tb_foncol.BackColor = sender.MyForeColor Me.cb_visible.Checked = sender.Visible Me.cb_bold.Checked = sender.MyFont.Bold 'Me.cb_italic.Checked = sender.MyFont.Italic ' Me.cb_uline.Checked = sender.MyFont.Underline Me.tb_fsize.Text = sender.MyFont.Size Me.tb_wordwidth.Text = sender.ÀåÆò Me.tb_wordheight.Text = sender.Àå³ôÀÌ Me.tb_space.Text = sender.°ø¹é Me.GroupBox2.Text = "À§Ä¡/Å©±â/±Û²Ã(" & sender.MyText & ") W=" & sender.GetSize.Width & ",H=" & sender.GetSize.Height If Not sender.Tag Is Nothing Then '//¿©±â¼­ °³Ã¼ÀÇ ÆÐÅÏÀû¿ë¿©ºÎ¸¦ Ç¥½ÃÇÕ´Ï´Ù. ' MsgBox(sender.Tag.ToString) Me.lb_countpattern.ForeColor = IIf(sender.Tag.ToString.IndexOf("L") >= 0, Drawing.Color.Green, Drawing.Color.Black) Me.lb_strpattern.ForeColor = IIf(sender.Tag.ToString.IndexOf("C") >= 0, Drawing.Color.Green, Drawing.Color.Black) 'Me.CB_LPATTERN.Checked = IIf(sender.Tag.ToString.IndexOf("L") >= 0, True, False) 'Me.CB_CHARPATTERN.Checked = IIf(sender.Tag.ToString.IndexOf("C") >= 0, True, False) Else Me.lb_countpattern.ForeColor = Drawing.Color.Black Me.lb_strpattern.ForeColor = Drawing.Color.Black End If End Sub Private Sub ViewBackImage() WLog2(Auto_Log, "viewBackImage ¹è°æÀ̹ÌÁö¸¦ Ç¥½ÃÇÕ´Ï´Ù.()", "\Á¤¾×µî¼øÂ÷·Î±×.txt") Dim Picimg As String If Me.tb_picfile.Text.IndexOf(":") > -1 Then '//µå¶óÀ̺ê¸íÀÌ ÀÖÀ¸¸é ±×´ë·Î¾²°í ¾Æ´Ï¸é ºÙ¿©¼­¾´´Ù. Picimg = Me.tb_picfile.Text Else Picimg = My.Application.Info.DirectoryPath & "\image\" & Me.tb_picfile.Text End If If Not System.IO.File.Exists(Picimg) Then Me.CheckBox4.Checked = False ElseIf Me.CheckBox4.Checked Then Me.PictureBox1.BackgroundImage = Image.FromFile(Picimg) End If End Sub Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox4.CheckedChanged WLog2(Auto_Log, "¹è°æº¸±â üũ¹Ú½º¸¦ Ŭ¸¯Çß´Ù.)", "\¼øÂ÷·Î±×.txt") 'Me.PictureBox1.Visible = IIf(CType(sender, CheckBox).Checked, True, False) If CType(sender, System.Windows.Forms.CheckBox).Checked Then Me.ViewBackImage() Else Me.PictureBox1.BackgroundImage = Nothing End If End Sub Private Sub Label11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label11.Click Dim A As New OpenFileDialog WLog2(Auto_Log, "ÆÄÀÏã±â ¹öưÀÌ Å¬¸¯µÊ", "\¼øÂ÷·Î±×.txt") If System.IO.File.Exists(Me.tb_picfile.Text) Then A.FileName = Me.tb_picfile.Text Else A.FileName = My.Application.Info.DirectoryPath & "\image\normal.jpg" End If If A.ShowDialog() <> System.Windows.Forms.DialogResult.OK Then Return Me.tb_picfile.Text = A.FileName Me.PictureBox1.BackgroundImage = Image.FromFile(Me.tb_picfile.Text) Me.CheckBox4.Checked = True End Sub Public Sub CtrPos(ByVal vertical As Boolean, ByVal offset As Short) WLog2(Auto_Log, "ctrpos (¼±ÅÃµÈ °³Ã¼µéÀÇ À§Ä¡°ªÀ» º¯°æÇÕ´Ï´Ù)", "\¼øÂ÷·Î±×.txt") If SelCon Is Nothing OrElse SelCon.Count < 1 Then Exit Sub For Each sender As Control In SelCon If vertical Then '//Á¿ìÃø If My.Computer.Keyboard.CtrlKeyDown Then If offset < 0 Then sender.Top -= 10 Else sender.Top += 10 End If Else sender.Top += offset End If Else '//»óÇÏÃø If My.Computer.Keyboard.CtrlKeyDown Then If offset < 0 Then sender.Left -= 10 Else sender.Left += 10 End If Else sender.Left += offset End If End If Next WLog2(Auto_Log, "ctrpos =[ preview È£ÃâÇÕ´Ï´Ù]", "\¼øÂ÷·Î±×.txt") Me.preview_window() 'Me.ViewProperty(sender) End Sub Public Sub SetFont() '//üũ¹Ú½º »óÅ¿¡µû¶ó¼­ ÆùÆ®¸¦ º¯°æÇÕ´Ï´Ù. WLog2(Auto_Log, "set font üũ¹Ú½º »óÅ¿¡ µû¶ó¼­ ÆùÆ®¸¦ º¯°æÇÕ´Ï´Ù.", "\¼øÂ÷·Î±×.txt") Dim B As System.Drawing.FontStyle If Me.cb_bold.Checked = True Then B = FontStyle.Bold Dim Tobj As MyControlOLEDBv2.MyLabel For Each A As Control In SelCon Tobj = CType(A, MyControlOLEDBv2.MyLabel) Tobj.MyFont = New Font(Tobj.MyFont, B) Next WLog2(Auto_Log, "setfont = preview È£ÃâÇÕ´Ï´Ù.", "\¼øÂ÷·Î±×.txt") Me.preview_window() End Sub Private Sub cmb_style_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cmb_style.KeyUp WLog2(Auto_Log, "½ºÅ¸ÀÏÄÞº¸¹Ú½º¿¡¼­ keyip ÀÌ °¨ÁöµÇ¾úÀ¸³ª ÇÚµéÀ» true ·Î ÇØ¹ö¸°´Ù.", "\¼øÂ÷·Î±×.txt") e.Handled = True End Sub Private Sub cmb_style_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmb_style.SelectedIndexChanged '//¿©±â¼­ µ¥ÀÌÅ͸¦ Ãß·Á³»°í(ÇÊÅ͸¦ °¡Á®¿Â´Ù.) '//ÇØ´ç ½ºÅ¸ÀÏÀ» ºÒ·¯¿Â´Ù. WLog2(Auto_Log, "½ºÅ¸ÀÏ À妽º°¡ º¯°æµÇ¾ú´Ù.", "\¼øÂ÷·Î±×.txt") If Me.cmb_style.SelectedIndex < 0 Then Me.cmb_style.SelectedIndex = 0 '//±âº»º¯¼ö¼³Á¤ 170219 DrStyle = Common.PDS(Me.cmb_style.SelectedIndex).TStyle.Rows(0) DtPattern = Common.PDS(Me.cmb_style.SelectedIndex).TPattern Dim DataFilter As String = drstyle.Filter If DataFilter.Trim = "" Then DataFilter = "Ãâ·Â = true" '//ÀμâÇʵå´Â Áö¼±ÁÖ ±¸ºÐ¿ëÀ¸·Î Àç»ç¿ëÇÑ´Ù. Else DataFilter &= " AND Ãâ·Â = true" '//Áö¼±ÁÖ´Â ÀμⰡ True °ªÀ̱⶧¹®¿¡ ÇØ´ç °ªÀ» Á¦¿ÜÇÑ´Ù End If Me.BindingSource1.Sort = "" Me.BindingSource1.DataSource = Nothing Dv = New DataView(srcTable, DataFilter, "Á¤·Ä¹øÈ£,¹øÈ£", DataViewRowState.CurrentRows) 'Dv = New DataView(srcTable, "len(DL¸í) > 0", "", DataViewRowState.CurrentRows) Me.SaveReadLayOut(True) Me.SaveDrawData(True) If Dv.Count <= 0 Then '//µ¥ÀÌÅͰ¡¾ø´Ù¸é MsgBox(Me.cmb_style.Text & "¿¡ ÇØ´çÇÏ´Â µ¥ÀÌÅͰ¡Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù" & vbCrLf & vbCrLf & "´Ù¸¥ ½ºÅ¸ÀÏÀ» ¼±ÅÃÇϼ¼¿ä", MsgBoxStyle.Information, "È®ÀÎ") Me.PictureBox1.Refresh() Else WLog2(Auto_Log, "¼±ÅÃµÈ ½ºÅ¸ÀÏ¿¡ µ¥ÀÌÅͰ¡ÀÖ´Ù=" & Dv.Count, "\¼øÂ÷·Î±×.txt") Me.textbox2.Text = Dv.Count - 1 '//ÆÐÅϰ˻ç½Ã Á¾·áÄ«¿îÅÍÀÌ´Ù... 'Me.VScrollBar1.Minimum = 1 'Me.BindingNavigatorPositionItem.Text 'Me.VScrollBar1.Maximum = Dv.Count 'Me.BindingNavigatorCountItem.Text ' Dv.Count '- 1 Me.VScrollBar1.Minimum = 0 Me.VScrollBar1.Maximum = Dv.Count - 1 'MsgBox("cmb style select change=" & Me.VScrollBar1.Maximum) Me.LOAD_STYLE() '//½ºÅ¸ÀϺҷ¯¿À±â(¿©±â¼­ ¸ðµçÄÁÆ®·ÑÀÇ ±âº» À§Ä¡¿Í ±Û²ÃÀÌ °áÁ¤µÈ´Ù) If Me.FirstIdx = -1 Then For i As Integer = 0 To Dv.Count - 1 '//¸Ç÷º¸¿©ÁÙ³ðÀ» ã´Â´Ù. DV¿Í ¿ø·¡ À妽º°ªÀÌ ´Ù¸£±â¶§¹®¿¡ ã¾Æ¾ßÇÑ´Ù. If Dv(i)("¹øÈ£") = Srcnum Then FirstIdx = i Exit For End If Next End If 'ÇÊÅ͸¦ Àû¿ëÇØ¼­ ºä¸¦ ±¸¼ºÇÑ´ÙÀ½¿¡ ÇØ´ç ºä¸¦ µ¥ÀÌÅͼҽº·Î º¯°æÇÑ´Ù. Me.SaveReadLayOut(True) Me.SaveDrawData(True) If FirstIdx = -1 OrElse FirstIdx > Dv.Count - 1 Then FirstIdx = 0 '//ãÁö¸øÇÏ°í ³ª¿ÓÀ»°æ¿ì¿¡´Â 1¹ø¤Š ·¹Äڵ带 º¸¿©ÁÖµµ·Ï ÇÑ´Ù. NoView = True '//For Validate Index =0 If FirstIdx = 0 Then '//Index is first WLog2(Auto_Log, "View : First Record // Set = 0", "\Alllog.txt") Else '//index is not first WLog2(Auto_Log, "View : Index Count = " & FirstIdx, "\Alllog.txt") End If Me.BindingSource1.DataSource = Dv 'Dv '//¿©±â¼­¼ÂÆÃµÇ¸é¼­ ¹Ù·Î tview °¡ ÀÛµ¿µÈ´Ù. Me.BindingSource1.Sort = "Á¤·Ä¹øÈ£,¹øÈ£" ',¹øÈ£" Me.VScrollBar1.Value = FirstIdx Me.BindingSource1.Position = FirstIdx Me.dataview.DataSource = Me.BindingSource1 'MsgBox("ASDF" & Me.BindingNavigatorPositionItem.Text) If FirstIdx = 0 Then Me.GeTviewData(Me.BindingNavigatorPositionItem.Text - 1, True) End If 'WLog2(Auto_Log, "cmb_style selectindexchanged ¿¡¼­ preview ¸¦ È£ÃâÇÔ", "\¼øÂ÷·Î±×.txt") 'Me.preview_window() End Sub Public Sub LOAD_STYLE(Optional ByVal Div As String = "Z") '//ÀúÀåµÈ ½ºÅ¸ÀÏÀ» ºÒ·¯¿É´Ï´Ù. ' MsgBox("LOADSTYLE" & "/" & Div) ' MsgBox("LOADSTYLE" & "/" & Div) WLog2(Auto_Log, "load_style : ½ºÅ¸ÀÏÀ» ºÒ·¯¿É´Ï´Ù. div= " & Div, "\¼øÂ÷·Î±×.txt") Dim Arinini As New MyINI2(drstyle.file) Dim pos(), font(), visible, mytext As String Dim Tobj As MyControlOLEDBv2.MyLabel Dim DR() As DataRow Dim idx As Integer = 0 '//¸ðµç¾ÆÀÌÅÛÀ» µ·´Ù For i As Integer = 0 To Me.AllLabels.GetUpperBound(0) '//¸ðµç¾ÆÀÌÅÛÀ» µ·´Ù. Tobj = Me.AllLabels(i).ctl Try If Div.ToUpper = "Z" Then '//¸ðµç¾ÆÀÌÅÛÀ» °¡Á®¿À°í '//¸Þ¸ð¸®¿¡¼­ ã´Â´Ù. Tobj.Tag = "" DR = DtPattern.Select("NAME = 'STYLE" & Tobj.Name.ToUpper & "POS'") If DR.GetUpperBound(0) = 0 Then pos = DR(0)(1).ToString.Split(",") Tobj.Location = New Point(pos(0), pos(1)) Tobj.Size = New Size(pos(2), pos(3)) End If DR = DtPattern.Select("NAME = 'STYLE" & Tobj.Name.ToUpper & "FONT'") If DR.GetUpperBound(0) = 0 Then font = DR(0)(1).ToString.Split(",") Tobj.ÀåÆò = font(5) Tobj.Àå³ôÀÌ = font(6) Tobj.MyFont = New Font(font(0), font(1), IIf(font(3).ToUpper = "TRUE", FontStyle.Bold, FontStyle.Regular), GraphicsUnit.Point) End If DR = DtPattern.Select("NAME = 'STYLE" & Tobj.Name.ToUpper & "VISIBLE'") If DR.GetUpperBound(0) = 0 Then visible = DR(0)(1).ToString Tobj.Visible = CType(visible, Boolean) End If DR = DtPattern.Select("NAME = 'STYLE" & Tobj.Name.ToUpper & "MYTEXT'") If DR.GetUpperBound(0) = 0 Then mytext = DR(0)(1).ToString Select Case Tobj.Name.ToUpper.Substring(0, 1) Case "U", "A", "B", "D", "E" '//»ç¿ëÀÚ¹®ÀÚÀϰæ¿ì¿¡´Â ¹®ÀÚ¿­µµ ÀúÀåÇØ¾ßÇÑ´Ù. If mytext <> "" Then Tobj.MyText = TextDec(mytext) '//ini±¸Á¶»ó ¹Ù·ÎÀúÀåÇϸé¾ÈµÇ±â¶§¹®¿¡ º¯È¯Çؼ­ ÀúÀåÇÑ´Ù. End Select End If DR = DtPattern.Select("NAME = 'STYLE" & Tobj.Name.ToUpper & "SPACE'") If DR.GetUpperBound(0) = 0 Then Tobj.°ø¹é = DR(0)(1).ToString Else '//ƯÁ¤¾ÆÀÌÅÛ±¸ºÐÀ϶§ If Tobj.Name.ToUpper.Substring(0, 1) = Div Then If Div.ToUpper = "H" Then '//HÀǰæ¿ì´Â µû·Î ã¾Æº»´Ù. '//¸Þ¸ð¸®¿¡¼­ ã´Â´Ù. Tobj.Tag = "" DR = DtPattern.Select("NAME = 'STYLE" & Tobj.Name.ToUpper & "POS'") If DR.GetUpperBound(0) = 0 Then pos = DR(0)(1).ToString.Split(",") Tobj.Location = New Point(pos(0), pos(1)) Tobj.Size = New Size(pos(2), pos(3)) End If DR = DtPattern.Select("NAME = 'STYLE" & Tobj.Name.ToUpper & "FONT'") If DR.GetUpperBound(0) = 0 Then font = DR(0)(1).ToString.Split(",") Tobj.ÀåÆò = font(5) Tobj.Àå³ôÀÌ = font(6) Tobj.MyFont = New Font(font(0), font(1), IIf(font(3).ToUpper = "TRUE", FontStyle.Bold, FontStyle.Regular), GraphicsUnit.Point) End If DR = DtPattern.Select("NAME = 'STYLE" & Tobj.Name.ToUpper & "VISIBLE'") If DR.GetUpperBound(0) = 0 Then visible = DR(0)(1).ToString Tobj.Visible = CType(visible, Boolean) End If DR = DtPattern.Select("NAME = 'STYLE" & Tobj.Name.ToUpper & "MYTEXT'") If DR.GetUpperBound(0) = 0 Then mytext = DR(0)(1).ToString Select Case Tobj.Name.ToUpper.Substring(0, 1) Case "U", "A", "B", "D", "E" '//»ç¿ëÀÚ¹®ÀÚÀϰæ¿ì¿¡´Â ¹®ÀÚ¿­µµ ÀúÀåÇØ¾ßÇÑ´Ù. If mytext <> "" Then Tobj.MyText = TextDec(mytext) '//ini±¸Á¶»ó ¹Ù·ÎÀúÀåÇϸé¾ÈµÇ±â¶§¹®¿¡ º¯È¯Çؼ­ ÀúÀåÇÑ´Ù. End Select End If DR = DtPattern.Select("NAME = 'STYLE" & Tobj.Name.ToUpper & "SPACE'") If DR.GetUpperBound(0) = 0 Then Tobj.°ø¹é = DR(0)(1).ToString Else '//¸Þ¸ð¸®¿¡¼­ ã´Â´Ù. Tobj.Tag = "" DR = DtPattern.Select("NAME = 'STYLE" & Tobj.Name.ToUpper & "POS'") If DR.GetUpperBound(0) = 0 Then pos = DR(0)(1).ToString.Split(",") Tobj.Location = New Point(pos(0), pos(1)) Tobj.Size = New Size(pos(2), pos(3)) End If DR = DtPattern.Select("NAME = 'STYLE" & Tobj.Name.ToUpper & "FONT'") If DR.GetUpperBound(0) = 0 Then font = DR(0)(1).ToString.Split(",") Tobj.ÀåÆò = font(5) Tobj.Àå³ôÀÌ = font(6) Tobj.MyFont = New Font(font(0), font(1), IIf(font(3).ToUpper = "TRUE", FontStyle.Bold, FontStyle.Regular), GraphicsUnit.Point) End If DR = DtPattern.Select("NAME = 'STYLE" & Tobj.Name.ToUpper & "VISIBLE'") If DR.GetUpperBound(0) = 0 Then visible = DR(0)(1).ToString Tobj.Visible = CType(visible, Boolean) End If DR = DtPattern.Select("NAME = 'STYLE" & Tobj.Name.ToUpper & "MYTEXT'") If DR.GetUpperBound(0) = 0 Then mytext = DR(0)(1).ToString Select Case Tobj.Name.ToUpper.Substring(0, 1) Case "U", "A", "B", "D", "E" '//»ç¿ëÀÚ¹®ÀÚÀϰæ¿ì¿¡´Â ¹®ÀÚ¿­µµ ÀúÀåÇØ¾ßÇÑ´Ù. If mytext <> "" Then Tobj.MyText = TextDec(mytext) '//ini±¸Á¶»ó ¹Ù·ÎÀúÀåÇϸé¾ÈµÇ±â¶§¹®¿¡ º¯È¯Çؼ­ ÀúÀåÇÑ´Ù. End Select End If DR = DtPattern.Select("NAME = 'STYLE" & Tobj.Name.ToUpper & "SPACE'") If DR.GetUpperBound(0) = 0 Then Tobj.°ø¹é = DR(0)(1).ToString End If End If End If Catch ex As Exception WLog2(Auto_Log, "LOAD_STYLE_CUSTOM ¿À·ù:" & ex.Message.ToString, "LOAD_STYLE") ' MsgBox(ex.Message.ToString) End Try Next ' If Div.ToUpper <> "Z" Then Return '//¸ðµçÅÛÀ̾ƴϴ٠------ÀӽùæÆí.. ' WLog2(Auto_Log, "load_style ±âº»°ª üũ¹Ú½ºµîÀÇ °ªÀ» ºÒ·¯¿Â´Ù. À̰ÍÀº ¸Ç÷¿¡¸¸ ºÒ·¯¿À¸é µÈ´Ù. ", "\¼øÂ÷·Î±×.txt") ------Àӽà ¹æÆí.. '''''''''''''''''''''¿ìÃø ½ºÅ¸ÀÏ Ã¼Å©¹Ú½º¸¦ °¡Á®¿Â´Ù. For Each B As Control In Me.TabPage1.Controls If B.GetType.Name.ToUpper = "CHECKBOX" Then '//üũ¹Ú½º¶ó¸é ű׸¦ ÀúÀåÇÑ´Ù. CType(B, System.Windows.Forms.CheckBox).Checked = Arinini.Read("STYLE", B.Name, False) '//±âº»°ª false End If Next For Each B As Control In Me.TabPage3.Controls If B.GetType.Name.ToUpper = "CHECKBOX" Then '//üũ¹Ú½º¶ó¸é ű׸¦ ÀúÀåÇÑ´Ù. CType(B, System.Windows.Forms.CheckBox).Checked = Arinini.Read("STYLE", B.Name, False) '//±âº»°ª false End If Next ''''''''''''''''''''''''''''¿Ü''''''''''''''''''''''''''''''''' Me.tb_marginx.Text = drstyle.MarginX 'Arinini.Read("STYLE", "MarginX", 10) Me.tb_marginy.Text = drstyle.MarginY ' Arinini.Read("STYLE", "MarginY", 10) Me.tb_scalex.Text = drstyle.ScaleX ' Arinini.Read("STYLE", "ScaleX", "1.5") Me.tb_scaley.Text = drstyle.ScaleY ' Arinini.Read("STYLE", "ScaleY", "1.3") ''''''''''''2Áß Me.cb_dummy.Checked = drstyle.Dummy 'Arinini.Read("STYLE", "dummy", False) Me.cmb_dummy.SelectedIndex = drstyle.Dummytype ' Arinini.Read("STYLE", "dummytype", 0) Me.tb_secX.Text = drstyle.dummmyx ' Arinini.Read("STYLE", "dummmyx", "0") Me.tb_secY.Text = drstyle.dummmyy ' Arinini.Read("STYLE", "dummmyy", "300") If DrStyle.BACKIMG.IndexOf("\") = -1 Then Me.tb_picfile.Text = My.Application.Info.DirectoryPath & "\image\" & DrStyle.BACKIMG Else Me.tb_picfile.Text = DrStyle.BACKIMG ' Arinini.Read("STYLE", "backimg", My.Application.Info.DirectoryPath & "\image\wall.bmp").ToString.Trim(Chr(0)) End If Me.ViewBackImage() '//¹è°æÀ̹ÌÁö¸¦ Ç¥½ÃÇÑ´Ù. Me.pDoc.DefaultPageSettings.Landscape = DrStyle.LANDSCAPE ' Arinini.Read("STYLE", "LandScape", False) Me.cmb_landscape.SelectedIndex = IIf(Me.pDoc.DefaultPageSettings.Landscape, 1, 0) Me.CheckBox4.Checked = DrStyle.VIEWIMAGE ' Arinini.Read("STYLE", "ViewImage", True) Me.tb_myfontsize.Text = DrStyle.PRINTFONTOFFSET ' Arinini.Read("STYLE", "PrintFontOffset", 0) '//QRÄÚµå Try Me.cboCorrectionLevel.Text = Arinini.Read("STYLE", "qrlevel", 1) Me.cboEncoding.Text = Arinini.Read("STYLE", "qrencoding", 2) Me.cboVersion.Text = Arinini.Read("STYLE", "qrvison", 1) Dim qrbgstr As String = Arinini.Read("STYLE", "qrbg", "") Dim qrfgstr As String = Arinini.Read("STYLE", "qrfg", "") If qrbgstr = "" Then lbQrBg.BackColor = Drawing.Color.White Else lbQrBg.BackColor = Drawing.Color.FromArgb(CInt(qrbgstr)) End If If qrfgstr = "" Then lbQrFG.BackColor = Drawing.Color.Black Else lbQrFG.BackColor = Drawing.Color.FromArgb(CInt(qrfgstr)) End If Catch ex As Exception MessageBox.Show(ex.ToString()) End Try '//QRȨÆäÀÌÁö '//Try Me.home1.Text = Arinini.Read("STYLE", "qrhome1", "http://cyber.kepco.co.kr") Me.home2.Text = Arinini.Read("STYLE", "qrhome2", "jeonbuk") Me.home3.Text = Arinini.Read("STYLE", "qrhome3", "mjeonbuk") Me.home4.Text = Arinini.Read("STYLE", "qrhome4", "report.jsp?location") '//Catch ex As Exception '// MessageBox.Show(ex.ToString()) '//End Try Me.gojang.Text = Arinini.Read("STYLE", "gojang", "°íÀå½Å°íµµ ½º¸¶Æ®ÇϰÔ") 'Me.PictureBox1.Width =drstyle.CanvasX 'Arinini.Read("STYLE", "CanvasX", 297) '520 'Me.PictureBox1.Height =drstyle.CanvasY ' Arinini.Read("STYLE", "CanvasY", 520) '520 NOTICE(Me.cmb_style.Text & "½ºÅ¸ÀÏÀ» ºÒ·¯¿Ô½À´Ï´Ù.", Me.lb_msg) End Sub Public Sub SAVE_STYLE() WLog2(Auto_Log, "[Saving] Current Style to INI File ", "\¼øÂ÷·Î±×.txt") Dim Arinini As New MyINI2(drstyle.file) Dim Arininic As New MyINI2(CStr(drstyle.file).ToLower.Replace("ini", "cfg")) Dim Tobj As MyControlOLEDBv2.MyLabel 'Dim Div As Char '//ÇöÀç ¼±ÅÃµÈ ½ºÅ¸ÀÏÀ» ÀúÀåÇÕ´Ï´Ù. erp.SetError(Me.cmb_style, vbNullString) If Me.cmb_style.SelectedIndex < 0 Then erp.SetError(Me.cmb_style, "ÀúÀåÇÒ ½ºÅ¸ÀÏÀÌ ¼±ÅõÇÁö ¾Ê¾Ò½À´Ï´Ù.") NOTICE("½ºÅ¸ÀÏÀ» ¼±ÅÃÇϼ¼¿ä", Me.lb_msg) Return End If Dim f As New fProgress() f.ProgressBar1.Minimum = 0 f.ProgressBar1.Maximum = Me.AllLabels.Length f.ProgressBar1.Value = 0 f.ProgressBar1.Style = ProgressBarStyle.Blocks f.Label1.Text = String.Format("½ºÅ¸ÀÏÀ» ÀúÀåÇÕ´Ï´Ù" + vbCrLf + "Control") 'f.TopMost = True f.Show() Application.DoEvents() For i As Integer = 0 To Me.AllLabels.GetUpperBound(0) f.ProgressBar1.Value += 1 f.Refresh() Tobj = Me.AllLabels(i).ctl Arinini.Write("STYLE", Tobj.Name & "pos", Tobj.Left & "," & Tobj.Top & "," & Tobj.Width & "," & Tobj.Height) Arinini.Write("STYLE", Tobj.Name & "font", Tobj.MyFont.Name & "," & Tobj.MyFont.Size & "," & Tobj.MyFont.Underline & "," & Tobj.MyFont.Bold & "," & Tobj.MyFont.Italic & "," & Tobj.ÀåÆò & "," & Tobj.Àå³ôÀÌ) Arinini.Write("STYLE", Tobj.Name & "visible", "true") '±âº»°ªÀ¸·Î Ç¥½Ã·Î Á¤Çسõ°í üũ¹Ú½º üũÇÑ´Ù. Arinini.Write("STYLE", Tobj.Name & "space", Tobj.°ø¹é) Select Case Tobj.Name.ToUpper.Substring(0, 1) '//»ç¿ëÀÚ¹®ÀÚÀÏ °æ¿ì¿¡´Â ÇØ´ç ¹®ÀÚ¿ª½Ã ÀúÀåÀ» ÇÑ´Ù. Case "U", "A", "B", "D", "E" '//»ç¿ëÀÚ¹®ÀÚ´Â ÃÑ 5°³ÀÌ´Ù. Arinini.Write("STYLE", Tobj.Name & "mytext", TextEnc(Tobj.MyText)) End Select 'Div = Tobj.Name.Substring(0, 1) '1ÀÚ¸®¸¸²÷¾î¼­ üũ¹Ú½º ű׶û ¿¬°áÇÑ´Ù. (¸ð¸£°Ù´Ù À̺κÐÀÌ ¿Ö ÀÖ´ÂÁö ÀÏ´ÜÇØÁ¦ÇÑ´Ù. 1118ÀÏ 19½Ã 2ºÐ 'For Each B As Control In Me.TabPage1.Controls ' If B.GetType.Name.ToUpper = "CHECKBOX" Then '//üũ¹Ú½º¶ó¸é ű׸¦ ÀúÀåÇÑ´Ù. ' If B.Tag <> Nothing AndAlso B.Tag.ToString.ToUpper = Div.ToString.ToUpper Then '//ÇØ´ç üũ¹Ú½º¸¦ ã¾ÒÀ¸¸é üũ¹Ú½º »óÅ·ΠÀúÀåÀ»ÇÑ´Ù. ' Arinini.Write("STYLE", Tobj.Name & "visible", CType(B, System.Windows.Forms.CheckBox).Checked) 'A.Visible) ' Exit For ' End If ' End If 'Next Next f.Label1.Text = String.Format("½ºÅ¸ÀÏÀ» ÀúÀåÇÕ´Ï´Ù" + vbCrLf + "CheckBox") f.Show() Application.DoEvents() f.ProgressBar1.Style = ProgressBarStyle.Marquee For Each TC As TabPage In Me.TabControl1.TabPages '//ÅÇÄÁÆ®·Ñ1ÀÇ ¸ðµç ÆäÀÌÁö¿¡¼­ üũ¹Ú½ºÀÇ »óŸ¦ ÀúÀåÇÑ´Ù. For Each B As Control In TC.Controls If B.GetType.Name.ToUpper = "CHECKBOX" Then '//üũ¹Ú½º¶ó¸é ű׸¦ ÀúÀåÇÑ´Ù. Arinini.Write("STYLE", B.Name, CType(B, System.Windows.Forms.CheckBox).Checked) 'A.Visible) End If Next Next 'For Each B As Control In Me.TabPage1.Controls ' If B.GetType.Name.ToUpper = "CHECKBOX" Then '//üũ¹Ú½º¶ó¸é ű׸¦ ÀúÀåÇÑ´Ù. ' Arinini.Write("STYLE", B.Name, CType(B, System.Windows.Forms.CheckBox).Checked) 'A.Visible) ' End If 'Next 'For Each B As Control In Me.TabPage3.Controls ' If B.GetType.Name.ToUpper = "CHECKBOX" Then '//üũ¹Ú½º¶ó¸é ű׸¦ ÀúÀåÇÑ´Ù. ' Arinini.Write("STYLE", B.Name, CType(B, System.Windows.Forms.CheckBox).Checked) 'A.Visible) ' End If 'Next 'Arinini.Write("STYLE", "CanvasX", Me.PictureBox1.Width) '//Save Canvas Size 'Arinini.Write("STYLE", "CanvasY", Me.PictureBox1.Height) f.Label1.Text = String.Format("½ºÅ¸ÀÏÀ» ÀúÀåÇÕ´Ï´Ù" + vbCrLf + "ÀϹÝÁ¤º¸") f.Show() Application.DoEvents() Arinini.Write("STYLE", "ViewImage", Me.CheckBox4.Checked) If Not IsNumeric(tb_marginx.Text) Then MsgBox("Àμ⿩¹é(°¡·Î) °ªÀ» ¼ýÀÚ·Î ÀÔ·ÂÇϼ¼¿ä." + vbCrLf + "ÇöÀçÀԷ°ª:" + tb_marginx.Text, MsgBoxStyle.Information, "È®ÀÎ") Else Arininic.Write("printer", "MarginX", Me.tb_marginx.Text) End If If Not IsNumeric(tb_marginy.Text) Then MsgBox("Àμ⿩¹é(¼¼·Î) °ªÀ» ¼ýÀÚ·Î ÀÔ·ÂÇϼ¼¿ä." + vbCrLf + "ÇöÀçÀԷ°ª:" + tb_marginy.Text, MsgBoxStyle.Information, "È®ÀÎ") Else Arininic.Write("printer", "MarginY", Me.tb_marginy.Text) End If If Not IsNumeric(tb_scalex.Text) Then MsgBox("È®´ëºñÀ²(°¡·Î) °ªÀ» ¼ýÀÚ·Î ÀÔ·ÂÇϼ¼¿ä." + vbCrLf + "ÇöÀçÀԷ°ª:" + tb_scalex.Text, MsgBoxStyle.Information, "È®ÀÎ") Else Arininic.Write("printer", "ScaleX", Me.tb_scalex.Text) End If If Not IsNumeric(tb_scaley.Text) Then MsgBox("È®´ëºñÀ²(¼¼·Î) °ªÀ» ¼ýÀÚ·Î ÀÔ·ÂÇϼ¼¿ä." + vbCrLf + "ÇöÀçÀԷ°ª:" + tb_scaley.Text, MsgBoxStyle.Information, "È®ÀÎ") Else Arininic.Write("printer", "ScaleY", Me.tb_scaley.Text) End If If Me.tb_picfile.Text.Trim = "" Then Arinini.Write("STYLE", "backimg", "") Else Dim newpath As String = CStr(My.Application.Info.DirectoryPath & "\image\").ToUpper Dim NEwpathp As Short = (Me.tb_picfile.Text.ToUpper.IndexOf(newpath)) If NEwpathp = -1 Then Arinini.Write("STYLE", "backimg", Me.tb_picfile.Text) Else Arinini.Write("STYLE", "backimg", Me.tb_picfile.Text.Substring(NEwpathp + newpath.Length)) End If End If Arininic.Write("printer", "PrintFontOffset", Me.tb_myfontsize.Text) Arinini.Write("STYLE", "LandScape", Me.pDoc.DefaultPageSettings.Landscape) '//´õ¹Ì üũ¹Ú½º¶û ´õ¹ÌÄÞº¸¹Ú½º À妽º¶û º¯À§ x,y Arinini.Write("STYLE", "dummy", Me.cb_dummy.Checked) Arinini.Write("STYLE", "dummytype", Me.cmb_dummy.SelectedIndex) Arinini.Write("STYLE", "dummmyx", Me.tb_secX.Text) Arinini.Write("STYLE", "dummmyy", Me.tb_secY.Text) ' Arinini.Write("STYLE", "picstyle", Me.ComboBox1.SelectedIndex) '//QRÄÚµå Arinini.Write("STYLE", "qrencoding", Me.cboEncoding.Text) Arinini.Write("STYLE", "qrlevel", Me.cboCorrectionLevel.Text) Arinini.Write("STYLE", "qrvison", Me.cboVersion.Text) Arinini.Write("STYLE", "qrfg", Me.lbQrFG.BackColor.ToArgb().ToString()) Arinini.Write("STYLE", "qrbg", Me.lbQrBg.BackColor.ToArgb().ToString()) '//QRȨÆäÀÌÁö Arinini.Write("STYLE", "qrhome1", Me.home1.Text) Arinini.Write("STYLE", "qrhome2", Me.home2.Text) Arinini.Write("STYLE", "qrhome3", Me.home3.Text) Arinini.Write("STYLE", "qrhome4", Me.home4.Text) Arinini.Write("STYLE", "gojang", Me.gojang.Text) f.Label1.Text = String.Format("½ºÅ¸ÀÏÀ» ÀúÀåÇÕ´Ï´Ù" + vbCrLf + "·¹À̾ƿô") f.Show() Application.DoEvents() Me.SaveReadLayOut(False) f.Label1.Text = String.Format("½ºÅ¸ÀÏÀ» ÀúÀåÇÕ´Ï´Ù" + vbCrLf + "±×¸®±â°³Ã¼") f.Show() Application.DoEvents() Me.SaveDrawData(False) NOTICE("±âº»½ºÅ¸ÀÏÀ» ÀúÀåÇß½À´Ï´Ù", Me.lb_msg) WLog2(Auto_Log, "Request Update DataTable Infomation After Style Save ", "\¼øÂ÷·Î±×.txt") f.Close() f.Dispose() Application.DoEvents() Me.µ¥ÀÌÅÍÅ×ÀÌºí°»½Å() Me.preview_window() End Sub Public Sub SAVE_PATTERNII(ByVal SRCSTR As String, ByVal MIDNAME As String, ByVal DIV As Char, Optional ByVal LOGFILENAME As String = "\ÆÐÅÏ.TXT", Optional ByVal prompt As Boolean = True) 'ÆÐÅÏÀ» ÀúÀåÇÕ´Ï´Ù. ÆÐÅÏ¿ª½Ã À§Ä¡/Å©±â/ÀåÆòµîÀÌ ÀúÀåµË´Ï´Ù. Dim Arinini As New MyINI2(drstyle.file) Dim BUF() As Char = SRCSTR.ToCharArray Dim mb As String = PATTERN_ENC(SRCSTR) '¼±·Î¸í ÆÐÅÏ ÀúÀå Dim TOBJ As MyControlOLEDBv2.MyLabel Dim Pname As String = MIDNAME & mb.ToString If prompt Then If MsgBox("¹®ÀÚÆÐÅÏÀ» ÀúÀåÇϽðڽÀ´Ï±î?", MsgBoxStyle.Information + MsgBoxStyle.OkCancel, "È®ÀÎ") <> MsgBoxResult.Ok Then NOTICE("¹®ÀÚÆÐÅÏ ÀúÀåÀÌ Ãë¼ÒµÇ¾ú½À´Ï´Ù", Me.lb_msg) Return End If End If WLog2(Auto_Log, " save_pattern2 ¸¦ ½ÇÇàÇÑ´Ù.", "\¼øÂ÷·Î±×.txt") Select Case DIV.ToString.ToUpper Case "O" '//¼±·Î¸í For i As Integer = 0 To Me.Sºñ°í1.GetUpperBound(0) TOBJ = Me.Sºñ°í1(i) WLog2(Auto_Log, MIDNAME & "ÆÐÅÏÀúÀå½Ã ¾ÆÀÌÅÛ=" & TOBJ.Name & "/" & TOBJ.Name.Substring(0, 1).ToUpper, LOGFILENAME) Arinini.Write(Pname, "DESC", "ÀúÀåµÈ ¹®ÀÚÆÐÅÏ " & MIDNAME) WLog2(Auto_Log, "ÃÖÁ¾¼±ÅÿϷá=" & Pname & " " & TOBJ.Name & "/" & TOBJ.Name.Substring(0, 1).ToUpper, LOGFILENAME) Arinini.Write(Pname, TOBJ.Name & "pos", TOBJ.Left & "," & TOBJ.Top & "," & TOBJ.Width & "," & TOBJ.Height) Arinini.Write(Pname, TOBJ.Name & "font", TOBJ.MyFont.Name & "," & TOBJ.MyFont.Size & "," & TOBJ.MyFont.Underline & "," & TOBJ.MyFont.Bold & "," & TOBJ.MyFont.Italic & "," & TOBJ.ÀåÆò & "," & TOBJ.Àå³ôÀÌ) Arinini.Write(Pname, TOBJ.Name & "visible", TOBJ.Visible) Arinini.Write(Pname, TOBJ.Name & "space", TOBJ.°ø¹é) Next Case "P" '//¼±·Î¸í For i As Integer = 0 To Me.Sºñ°í2.GetUpperBound(0) TOBJ = Me.Sºñ°í2(i) WLog2(Auto_Log, MIDNAME & "ÆÐÅÏÀúÀå½Ã ¾ÆÀÌÅÛ=" & TOBJ.Name & "/" & TOBJ.Name.Substring(0, 1).ToUpper, LOGFILENAME) Arinini.Write(Pname, "DESC", "ÀúÀåµÈ ¹®ÀÚÆÐÅÏ " & MIDNAME) WLog2(Auto_Log, "ÃÖÁ¾¼±ÅÿϷá=" & Pname & " " & TOBJ.Name & "/" & TOBJ.Name.Substring(0, 1).ToUpper, LOGFILENAME) Arinini.Write(Pname, TOBJ.Name & "pos", TOBJ.Left & "," & TOBJ.Top & "," & TOBJ.Width & "," & TOBJ.Height) Arinini.Write(Pname, TOBJ.Name & "font", TOBJ.MyFont.Name & "," & TOBJ.MyFont.Size & "," & TOBJ.MyFont.Underline & "," & TOBJ.MyFont.Bold & "," & TOBJ.MyFont.Italic & "," & TOBJ.ÀåÆò & "," & TOBJ.Àå³ôÀÌ) Arinini.Write(Pname, TOBJ.Name & "visible", TOBJ.Visible) Arinini.Write(Pname, TOBJ.Name & "space", TOBJ.°ø¹é) Next Case "Q" '//¼±·Î¸í For i As Integer = 0 To Me.Sºñ°í3.GetUpperBound(0) TOBJ = Me.Sºñ°í3(i) WLog2(Auto_Log, MIDNAME & "ÆÐÅÏÀúÀå½Ã ¾ÆÀÌÅÛ=" & TOBJ.Name & "/" & TOBJ.Name.Substring(0, 1).ToUpper, LOGFILENAME) Arinini.Write(Pname, "DESC", "ÀúÀåµÈ ¹®ÀÚÆÐÅÏ " & MIDNAME) WLog2(Auto_Log, "ÃÖÁ¾¼±ÅÿϷá=" & Pname & " " & TOBJ.Name & "/" & TOBJ.Name.Substring(0, 1).ToUpper, LOGFILENAME) Arinini.Write(Pname, TOBJ.Name & "pos", TOBJ.Left & "," & TOBJ.Top & "," & TOBJ.Width & "," & TOBJ.Height) Arinini.Write(Pname, TOBJ.Name & "font", TOBJ.MyFont.Name & "," & TOBJ.MyFont.Size & "," & TOBJ.MyFont.Underline & "," & TOBJ.MyFont.Bold & "," & TOBJ.MyFont.Italic & "," & TOBJ.ÀåÆò & "," & TOBJ.Àå³ôÀÌ) Arinini.Write(Pname, TOBJ.Name & "visible", TOBJ.Visible) Arinini.Write(Pname, TOBJ.Name & "space", TOBJ.°ø¹é) Next Case "R" '//¼±·Î¸í For i As Integer = 0 To Me.Sºñ°í4.GetUpperBound(0) TOBJ = Me.Sºñ°í4(i) WLog2(Auto_Log, MIDNAME & "ÆÐÅÏÀúÀå½Ã ¾ÆÀÌÅÛ=" & TOBJ.Name & "/" & TOBJ.Name.Substring(0, 1).ToUpper, LOGFILENAME) Arinini.Write(Pname, "DESC", "ÀúÀåµÈ ¹®ÀÚÆÐÅÏ " & MIDNAME) WLog2(Auto_Log, "ÃÖÁ¾¼±ÅÿϷá=" & Pname & " " & TOBJ.Name & "/" & TOBJ.Name.Substring(0, 1).ToUpper, LOGFILENAME) Arinini.Write(Pname, TOBJ.Name & "pos", TOBJ.Left & "," & TOBJ.Top & "," & TOBJ.Width & "," & TOBJ.Height) Arinini.Write(Pname, TOBJ.Name & "font", TOBJ.MyFont.Name & "," & TOBJ.MyFont.Size & "," & TOBJ.MyFont.Underline & "," & TOBJ.MyFont.Bold & "," & TOBJ.MyFont.Italic & "," & TOBJ.ÀåÆò & "," & TOBJ.Àå³ôÀÌ) Arinini.Write(Pname, TOBJ.Name & "visible", TOBJ.Visible) Arinini.Write(Pname, TOBJ.Name & "space", TOBJ.°ø¹é) Next Case "L" '//¼±·Î¸í For i As Integer = 0 To Me.S¼±·Î¸í.GetUpperBound(0) TOBJ = Me.S¼±·Î¸í(i) WLog2(Auto_Log, MIDNAME & "ÆÐÅÏÀúÀå½Ã ¾ÆÀÌÅÛ=" & TOBJ.Name & "/" & TOBJ.Name.Substring(0, 1).ToUpper, LOGFILENAME) Arinini.Write(Pname, "DESC", "ÀúÀåµÈ ¹®ÀÚÆÐÅÏ " & MIDNAME) WLog2(Auto_Log, "ÃÖÁ¾¼±ÅÿϷá=" & Pname & " " & TOBJ.Name & "/" & TOBJ.Name.Substring(0, 1).ToUpper, LOGFILENAME) Arinini.Write(Pname, TOBJ.Name & "pos", TOBJ.Left & "," & TOBJ.Top & "," & TOBJ.Width & "," & TOBJ.Height) Arinini.Write(Pname, TOBJ.Name & "font", TOBJ.MyFont.Name & "," & TOBJ.MyFont.Size & "," & TOBJ.MyFont.Underline & "," & TOBJ.MyFont.Bold & "," & TOBJ.MyFont.Italic & "," & TOBJ.ÀåÆò & "," & TOBJ.Àå³ôÀÌ) Arinini.Write(Pname, TOBJ.Name & "visible", TOBJ.Visible) Arinini.Write(Pname, TOBJ.Name & "space", TOBJ.°ø¹é) Next Case "X" '//ÀüÁÖ¹øÈ£ For i As Integer = 0 To Me.SÀüÁÖ¹øÈ£.GetUpperBound(0) TOBJ = Me.SÀüÁÖ¹øÈ£(i) WLog2(Auto_Log, MIDNAME & "ÆÐÅÏÀúÀå½Ã ¾ÆÀÌÅÛ=" & TOBJ.Name & "/" & TOBJ.Name.Substring(0, 1).ToUpper, LOGFILENAME) Arinini.Write(Pname, "DESC", "ÀúÀåµÈ ¹®ÀÚÆÐÅÏ " & MIDNAME) WLog2(Auto_Log, "ÃÖÁ¾¼±ÅÿϷá=" & Pname & " " & TOBJ.Name & "/" & TOBJ.Name.Substring(0, 1).ToUpper, LOGFILENAME) Arinini.Write(Pname, TOBJ.Name & "pos", TOBJ.Left & "," & TOBJ.Top & "," & TOBJ.Width & "," & TOBJ.Height) Arinini.Write(Pname, TOBJ.Name & "font", TOBJ.MyFont.Name & "," & TOBJ.MyFont.Size & "," & TOBJ.MyFont.Underline & "," & TOBJ.MyFont.Bold & "," & TOBJ.MyFont.Italic & "," & TOBJ.ÀåÆò & "," & TOBJ.Àå³ôÀÌ) Arinini.Write(Pname, TOBJ.Name & "visible", TOBJ.Visible) Arinini.Write(Pname, TOBJ.Name & "space", TOBJ.°ø¹é) Next Arinini.Write(Pname, "LineType", Me.tb_ntype.Text) Arinini.Write(Pname, "nseparate", Me.cmb_sep.SelectedIndex) Case Else MsgBox("Save_PatternII ¿¡ Á¤ÀǵÇÁö¾ÊÀº ¹®ÀÚ(" & DIV & ") °¡ ¹ß»ýÇÏ¿´½À´Ï´Ù", MsgBoxStyle.Critical, "È®ÀÎ") End Select WLog2(Auto_Log, "save_patter2 ¤Ä¼­ µ¥ÀÌÅÍÅ×ÀÌºí °»½ÅÀ» ¤¾È£ÃâÇÑ´Ù¤Ó¤Ó ", "\¼øÂ÷·Î±×.txt") Me.µ¥ÀÌÅÍÅ×ÀÌºí°»½Å() End Sub Private Sub cmb_controls_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmb_controls.SelectedIndexChanged '//°³Ã¼°¡ ¼±ÅõǸé ÇØ´ç °³Ã¼ÀÇ ³»¿ªÀ» º¸¿©ÁØ´Ù. 'Me.Timer1.Enabled = False WLog2(Auto_Log, "°³Ã¼¸ñ·Ï ÄÞº¸¹Ú½º¿¡¼­ ƯÁ¤ °³Ã¼°¡ ¼±ÅõǾú´Ù view property È£Ãâ", "\¼øÂ÷·Î±×.txt") ViewProperty(AllLabels(Me.cmb_controls.SelectedIndex).ctl) End Sub Private Sub cb_visible_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cb_visible.CheckedChanged WLog2(Auto_Log, "Ç¥½Ã üũ¹Ú½º ¼±Åà ", "\¼øÂ÷·Î±×.txt") For Each a As Control In SelCon a.Visible = Me.cb_visible.Checked Next WLog2(Auto_Log, "[Ç¥½Ã] üũ¹Ú½º ¼±Åÿ¡¼­ pewview¸¦ È£Ãâ ", "\¼øÂ÷·Î±×.txt") Me.preview_window() End Sub Private Sub tb_foncol_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles tb_foncol.DoubleClick WLog2(Auto_Log, " ±Û¾¾»ö±ò º¯°æ Ŭ¸¯µÊ", "\¼øÂ÷·Î±×.txt") Dim A As New ColorDialog If A.ShowDialog() = System.Windows.Forms.DialogResult.OK Then For Each Onlyone As MyControlOLEDBv2.MyLabel In SelCon Onlyone.MyForeColor = A.Color Next Me.tb_foncol.BackColor = A.Color End If Me.preview_window() End Sub Private Sub cb_bold_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cb_bold.CheckedChanged WLog2(Auto_Log, "±Û¾¾…B°Ô ¼±ÅÃµÊ setfont È£Ãâ ", "\¼øÂ÷·Î±×.txt") SetFont() End Sub Private Sub UpdateFontSize(ByVal newsize As Integer, Optional ByVal Src As MyControlOLEDBv2.MyLabel = Nothing) ' WLog2(Auto_Log, "updatefont : ", "\¼øÂ÷·Î±×.txt") Dim A As Font For Each Tobj As MyControlOLEDBv2.MyLabel In SelCon A = New Font(Tobj.MyFont.FontFamily, newsize, FontStyle.Regular, GraphicsUnit.Point) Tobj.MyFont = A Next Me.SetFont() End Sub Public Sub CtrSize(ByVal vertical As Boolean, ByVal offset As Short) If SelCon Is Nothing OrElse SelCon.Count < 1 Then Exit Sub For Each sender As MyControlOLEDBv2.MyLabel In SelCon If vertical Then '//»óÇÏ If My.Computer.Keyboard.CtrlKeyDown Then If offset < 0 Then sender.Àå³ôÀÌ -= 10 Else sender.Àå³ôÀÌ += 10 End If Else sender.Àå³ôÀÌ += offset End If Else '//Á¿ì If My.Computer.Keyboard.CtrlKeyDown Then If offset < 0 Then sender.ÀåÆò -= 10 Else sender.ÀåÆò += 10 End If Else sender.ÀåÆò += offset End If End If Next Me.preview_window() End Sub Public Sub LOAD_STYLEC(ByVal StyleName As String, ByVal Div As String) '//±âŸ½ºÅ¸ÀÏÀº ºóµµ°¡ ÀûÀ¸´Ï ÆÄÀÏ¿¡¼­ ºÒ·¯¿À±â·ÎÇÑ´Ù.;;¸Þ¸ð¸®´Â ½ÈŸ. Dim Arinini As New MyINI2(FileC) If Not IO.File.Exists(FileC) Then MsgBox("±âŸ½ºÅ¸Àϼ³Á¤ ÆÄÀÏÀÌ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù\n\n°ü¸®ÀÚ¿¡ ¹®ÀÇÇϼ¼¿ä", MsgBoxStyle.Critical, "¿À·ù") Return End If Dim pos(), font(), visible As String '//±¸Àü»ê¹øÈ£¸¦ ±¸ÇöÇØº»´Ù. Dim Tobj As MyControlOLEDBv2.MyLabel For i As Integer = 0 To Me.AllLabels.GetUpperBound(0) Tobj = Me.AllLabels(i).ctl Try If Div.ToUpper = "Z" Then '//¸ðµç¾ÆÀÌÅÛÀ» °¡Á®¿À°í pos = Arinini.Read(StyleName, Tobj.Name & "pos").Split(",") font = Arinini.Read(StyleName, Tobj.Name & "font").Trim(Chr(0)).Split(",") visible = Arinini.Read(StyleName, Tobj.Name & "visible") '//»óŸ¦ Àо ¹Ù·Î Àû¿ëÇÑ´Ù. Tobj.Location = New Point(pos(0), pos(1)) Tobj.Size = New Size(pos(2), pos(3)) Tobj.MyFont = New Font(font(0), font(1), IIf(font(3).ToUpper = "TRUE", FontStyle.Bold, FontStyle.Regular), GraphicsUnit.Point) Tobj.ÀåÆò = font(5) Tobj.Àå³ôÀÌ = font(6) Tobj.°ø¹é = Arinini.Read(StyleName, Tobj.Name & "space", 0) Tobj.Visible = CType(visible, Boolean) Else 'À̰÷¿¡ O°¡¿Ã°ÍÀÌ´Ù. If Tobj.Name.ToUpper.Substring(0, 1) = Div Then pos = Arinini.Read(StyleName, Tobj.Name & "pos").Split(",") font = Arinini.Read(StyleName, Tobj.Name & "font").Trim(Chr(0)).Split(",") visible = Arinini.Read(StyleName, Tobj.Name & "visible") '//»óŸ¦ Àо ¹Ù·Î Àû¿ëÇÑ´Ù. Tobj.Location = New Point(pos(0), pos(1)) Tobj.Size = New Size(pos(2), pos(3)) Tobj.MyFont = New Font(font(0), font(1), IIf(font(3).ToUpper = "TRUE", FontStyle.Bold, FontStyle.Regular), GraphicsUnit.Point) Tobj.ÀåÆò = font(5) Tobj.Àå³ôÀÌ = font(6) Tobj.°ø¹é = Arinini.Read(StyleName, Tobj.Name & "space", 0) Tobj.Visible = CType(visible, Boolean) End If End If Catch ex As Exception WLog2(Auto_Log, "LOAD_STYLE_CUSTOM ¿À·ù:" & ex.Message.ToString, "LOAD_STYLEC") End Try Next NOTICE(StyleName & "±âŸ½ºÅ¸ÀÏÀ» ºÒ·¯¿Ô½À´Ï´Ù.", Me.lb_msg) Me.preview_window() End Sub Public Sub SAVE_STYLEC(ByVal stylename As String, ByVal div As String) '//±âŸ½ºÅ¸ÀÏ ÀúÀåÇÑ´Ù. Dim Arinini As New MyINI2(FileC) '//ÇöÀç ¼±ÅÃµÈ ½ºÅ¸ÀÏÀ» ÀúÀåÇÕ´Ï´Ù. Arinini.Write(stylename, "DESC", stylename) Dim Tobj As MyControlOLEDBv2.MyLabel For i As Integer = 0 To Me.AllLabels.GetUpperBound(0) Tobj = Me.AllLabels(i).ctl Arinini.Write(stylename, Tobj.Name & "pos", Tobj.Left & "," & Tobj.Top & "," & Tobj.Width & "," & Tobj.Height) Arinini.Write(stylename, Tobj.Name & "font", Tobj.MyFont.Name & "," & Tobj.MyFont.Size & "," & Tobj.MyFont.Underline & "," & Tobj.MyFont.Bold & "," & Tobj.MyFont.Italic & "," & Tobj.ÀåÆò & "," & Tobj.Àå³ôÀÌ) Arinini.Write(stylename, Tobj.Name & "visible", Tobj.Visible) Arinini.Write(stylename, Tobj.Name & "space", Tobj.°ø¹é) Next NOTICE("±âŸ½ºÅ¸ÀÏÀ» ÀúÀåÇß½À´Ï´Ù", Me.lb_msg) End Sub Private Sub Button30_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button30.Click Me.CtrSize(False, -5) End Sub Private Sub Button29_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button29.Click Me.CtrSize(False, 5) End Sub Private Sub Button32_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button32.Click Me.CtrSize(True, -5) End Sub Private Sub Button31_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button31.Click Me.CtrSize(True, 5) End Sub Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click Me.CtrPos(False, -5) End Sub Private Sub Button6_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click Me.CtrPos(False, 5) End Sub Private Sub Button27_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button27.Click Me.CtrPos(True, -5) End Sub Private Sub Button26_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button26.Click Me.CtrPos(True, 5) End Sub Private Sub BindingNavigatorPositionItem_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles BindingNavigatorPositionItem.KeyUp '//ÇöÀçÀ§Ä¡¿¡¼­ ¿£ÅÍÄÖÀ»°æ¿ì µ¥ÀÌÅͺ£À̽º À§Ä¡°ªÀ» º¯°æÇÑ´Ù.(position) If e.KeyCode = Keys.Enter Then If IsNumeric(Me.BindingNavigatorPositionItem.Text) Then Me.GeTviewData(Me.BindingNavigatorPositionItem.Text - 1, True) End If End Sub Private Sub showcnt(ByVal cnt1 As Integer, ByVal cnt2 As Integer, Optional ByVal tag As String = "") Me.lb_msg.Text = cnt1 & "/" & cnt2 & Space(1) & tag My.Application.DoEvents() End Sub Private Sub NPartternCheck() Dim ¹øÈ£ÆÐÅϰ˻ç As Integer = 0 '//ÆÐÅϰ˻ç½ÃÀÛ ' Me.PictureBox1.Image = Image.FromFile(My.Application.Info.DirectoryPath & "\image\start.png") For i As Integer = Me.textbox1.Text To Me.textbox2.Text ' If chkFlag Then Exit For Me.showcnt(i, Me.textbox2.Text) Me.textbox1.Text = i ¹øÈ£ÆÐÅϰ˻ç = ChkNumPattern(i) ' MsgBox(¹øÈ£ÆÐÅϰ˻ç) If ¹øÈ£ÆÐÅϰ˻ç = 0 Then '1Àº ±æÀÌÆÐÅÏÀÌ ¾ø°í 3À̳ª 2´Â ¹®ÀÚÆÐÅÏÀÌ´Ù NOTICE("ÀϷùøÈ£=" & i + 1 & "¹ø ¹®ÀÚ,±æÀÌ ÆÐÅÏÀÌ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù", Me.lb_msg) My.Computer.Audio.Play(My.Application.Info.DirectoryPath & "\sound\ding.wav", AudioPlayMode.Background) 'If MsgBox("Sdf", MsgBoxStyle.OkCancel) = MsgBoxResult.Ok Then Me.BindingSource1.Position = i Exit For End If Next If Me.textbox1.Text = Me.textbox2.Text Then '//¿Ï·áµÇ¾ú´Ù¸é My.Computer.Audio.Play(My.Application.Info.DirectoryPath & "\sound\notify.wav", AudioPlayMode.Background) NOTICE("ÆÐÅϰ˻簡 ¿Ï·áµÇ¾ú½À´Ï´Ù", Me.lb_msg) End If Me.bt_chkpattern.Text = "½ÃÀÛ(&S)" End Sub Private Sub tb_printrange_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tb_printrange.TextChanged If Me.rad_repeat.Checked = False Then Me.RadioButton3.Checked = True End Sub Private Sub ¹øÈ£Çü½ÄÁöÁ¤(Optional ByVal msg As String = "99,99") 'MsgBox("¹øÈ£Çü½ÄÁöÁ¤ : " & ¹øÈ£, MsgBoxStyle.Information, msg) '//ÁöÁ¤µÈ ¹øÈ£Çü½ÄÀ¸·Î ÀüºÎ¹øÈ£¸¦ Ç¥½ÃÇÑ´Ù. '//20070826 ¹øÈ£´Â ºÐ¸®/ÅëÇÕÀ¸·Î ±¸ºÐÇØ¼­ Ãâ·ÂÇÑ´Ù. Dim A() As Char = ¹øÈ£.ToCharArray Dim P() As String If msg.IndexOf(",") = -1 Then '//±¸¹öÁ¯ 140702 Dim pp As New List(Of String) For Each cc As Char In msg.ToCharArray pp.Add(cc) Next P = pp.ToArray() Else P = msg.Split(",") End If Me.CLEAR_ITEM("X") Me.cmb_sep.SelectedIndex = 2 '//¸ðµÎ ÅëÇÕÀ¸·Î º¯°æ Dim NextCtl As MyControlOLEDBv2.MyLabel = Me.S¼±·Î¸í(0) Dim CurPos As Short = 0 '//¸î¹øÂ° ÄÁÆ®·Ñ±îÁö ›§´Ù´Â Ç¥½Ã Dim CPos As Short = -1 '//Àüü¹®ÀÚÁß ¸î¹øÂ°±îÁö Çߴٴ ǥ½Ã Select Case Me.cmb_sep.SelectedIndex Case 2 '//ÅëÇÕ Me.tb_ntype.Enabled = True For i As Integer = 0 To A.GetUpperBound(0) '//¸ðµç ¹®ÀÚ¿­À» Áý¾î³Ö´Â´Ù ±æÀ̰¡ ¸ðÀÚ¶ó¸é Áß°£¿¡ ¾ø¾îÁø´Ù. If i <= CInt(P(0).ToString) - 1 Then Me.SÀüÁÖ¹øÈ£(0).MyText &= IIf(A(i) <> ";", A(i), "") ElseIf i <= (CInt(P(0).ToString) + CInt(P(1).ToString) - 1) Then Me.SÀüÁÖ¹øÈ£(1).MyText &= IIf(A(i) <> ";", A(i), "") End If Next End Select For i As Integer = 0 To Me.SÀüÁÖ¹øÈ£.GetUpperBound(0) Me.SÀüÁÖ¹øÈ£(i).Visible = IIf(Me.SÀüÁÖ¹øÈ£(i).MyText = "", False, True) Next End Sub Public Function PARSE_°ü¸®Àü»ê¹øÈ£(ByVal srcstr As String) As Boolean '/¼±·Î¸íÀÇ ±æÀÌ´Â ¿¹ÃøµÇÁö ¾Ê´Â´Ù µ¿Àû ÄÁÆ®·Ñ »ý¼ºÀ» »ç¿ëÇÑ´Ù. Me.CLEAR_ITEM("H") 0: Dim Log As String = "\Parse_°ü¸®±¸Àü»ê¹øÈ£.txt" If srcstr = "" OrElse Not Me.cb_kwnaligu.Checked Then WLog2(Auto_Log, "Zero Length - Return", Log) Return False End If Dim Wlen As Short = srcstr.Length Dim SepPos As Short = srcstr.IndexOf(";") WLog2(Auto_Log, "Length=" & Wlen & " Sep=" & SepPos, Log) Me.S°ü¸®±¸Àü»ê¹øÈ£.MyText = srcstr Me.S°ü¸®±¸Àü»ê¹øÈ£.Visible = True Return True End Function Private Sub PARSE_°ü¸®Àü»ê¹øÈ£ÆÐÅÏ(ByVal SRCSTR As String) '//°ü¸®±¸5¹ø ¾ËÆÄºª ÁöÁ¤À̵ǾîÀÖ´ÂÁö È®ÀÎÇÑ´Ù. Dim Log As String = "\Parse_°ü¸®±¸Àü»ê¹øÈ£(¼ö¿ë).txt" Dim PNAME As String = "" Dim DR() As DataRow Dim CTLPOS() As String Dim CTLFONT() As String Dim CTLVISIBLE As Boolean If °ü¸®±¸.Length < 5 Then Return '//160830 PNAME = "CNUMPATTERNI" & °ü¸®±¸.Substring(4, 1) ' Me.h5.MyText '//5¹øÀÌ W À϶§´Â cnumpatternIw ¸¦ ã°ÔµÈ´Ù. DR = DtPattern.Select("NAME = '" & PNAME & "DESC'") If DR.GetUpperBound(0) = 0 Then '//ÀÖ´Ù. WLog2(Auto_Log, "°ü¸®±¸5¹ø ¹®ÀÚ¸¦ ã¾Ò½À´Ï´Ù (" & PNAME & "DESC" & ")", Log) DR = DtPattern.Select("NAME = '" & PNAME & S°ü¸®±¸Àü»ê¹øÈ£.Name & "POS'") If DR.GetUpperBound(0) = 0 Then CTLPOS = DR(0)(1).ToString.Split(",") Me.S°ü¸®±¸Àü»ê¹øÈ£.Location = New Point(CTLPOS(0), CTLPOS(1)) Me.S°ü¸®±¸Àü»ê¹øÈ£.Size = New Size(CTLPOS(2), CTLPOS(3)) End If DR = DtPattern.Select("NAME = '" & PNAME & S°ü¸®±¸Àü»ê¹øÈ£.Name & "FONT'") If DR.GetUpperBound(0) = 0 Then CTLFONT = DR(0)(1).ToString.Split(",") S°ü¸®±¸Àü»ê¹øÈ£.MyFont = New Font(CTLFONT(0), CTLFONT(1), IIf(CTLFONT(3).ToUpper = "TRUE", FontStyle.Bold, FontStyle.Regular), GraphicsUnit.Point) S°ü¸®±¸Àü»ê¹øÈ£.ÀåÆò = CTLFONT(5) S°ü¸®±¸Àü»ê¹øÈ£.Àå³ôÀÌ = CTLFONT(6) End If DR = DtPattern.Select("NAME = '" & PNAME & S°ü¸®±¸Àü»ê¹øÈ£.Name & "VISIBLE'") If DR.GetUpperBound(0) = 0 Then CTLVISIBLE = DR(0)(1).ToString S°ü¸®±¸Àü»ê¹øÈ£.Visible = CType(CTLVISIBLE, Boolean) End If DR = DtPattern.Select("NAME = '" & PNAME & S°ü¸®±¸Àü»ê¹øÈ£.Name & "SPACE'") If DR.GetUpperBound(0) = 0 Then S°ü¸®±¸Àü»ê¹øÈ£.°ø¹é = DR(0)(1) End If Else WLog2(Auto_Log, "°ü¸®±¸5¹ø ¹®ÀÚ°¡ ÁöÁ¤µÇ¾îÀÖÁö¾Ê½À´Ï´Ù. (" & S°ü¸®±¸Àü»ê¹øÈ£.MyText & ")", Log) End If End Sub Public Sub PARSE_¼±·Î¸íÆÐÅÏ(ByVal Srcstr As String) Dim Log As String = "\PATTERN_¼±·Î¸í.txt" Dim Wlen As Short = Srcstr.Length : If Wlen <= 0 Then Return '±æÀÌÆÐÅÏ¿©ºÎ¸¦ È®ÀÎÇßÀ¸¹Ç·Î ÆÐÅÏÀ»Àû¿ëÇÑ´Ù.[STYLE1LINEPATTERN9] 'Me.±æÀÌÆÐÅÏ¿¬½À(Srcstr, CStr(Me.ÆÐÅϸí_¼±·Î & Wlen), Log, "L", S¼±·Î¸í) Me.¹®ÀÚÆÐÅÏ¿¬½À(Srcstr, CStr(Me.ÆÐÅϸí_¼±·Î & "II" & PATTERN_ENC(¼±·Î¸í)), Log, Me.S¼±·Î¸í) End Sub Public Function PARSE_¼±·Î¸í(ByVal srcstr As String) As Boolean Me.CLEAR_ITEM("L") '/¼±·Î¸íÀÇ ±æÀÌ´Â ¿¹ÃøµÇÁö ¾Ê´Â´Ù µ¿Àû ÄÁÆ®·Ñ »ý¼ºÀ» »ç¿ëÇÑ´Ù. Dim Log As String = "\Parse_¼±·Î¸í.txt" If srcstr = "" OrElse Not Me.cb_sunlo.Checked Then WLog2(Auto_Log, "Zero Length - Return", Log) Return False End If Dim Wlen As Short = srcstr.Length Dim SepPos As Short = srcstr.IndexOf(";") WLog2(Auto_Log, "Length=" & Wlen & " Sep=" & SepPos, Log) S¼±·Î¸í(0).MyText = srcstr.Trim(";") S¼±·Î¸í(0).Visible = True Return True End Function Private Sub PARSE_ÀϷùøÈ£(ByVal index As Short) If Me.cb_seq.Checked Then Me.SÀϷùøÈ£.MyText = GetSpread(Me.Dv, index, "¹øÈ£") 'index + 1 Me.SÀϷùøÈ£.Visible = True Else Me.SÀϷùøÈ£.Visible = False End If End Sub Public Function PARSE_¹øÈ£(ByVal srcstr As String) As Boolean 'Me.CLEAR_ITEM("X") Dim Log As String = "\Parse_¹øÈ£.txt" If srcstr = "" OrElse Not Me.cb_jnum.Checked Then Me.CLEAR_ITEM("X") WLog2(Auto_Log, "Zero Length - Return", Log) Return False End If Dim Wlen As Short = srcstr.Length Dim SepPos As Short = srcstr.IndexOf(";") WLog2(Auto_Log, "Length=" & Wlen & " Sep=" & SepPos, Log) Return True End Function Public Function PARSE_¹øÈ£ÆÐÅÏ(ByVal srcstr As String) As Integer Dim Wlen As Short = ¹øÈ£.Length : If Wlen <= 0 Then Return False '//¾ø´Â ±Û±Í°¡ ¿ÓÀ»¶§ ÅÏÇØ¹ö¸°´Ù. Dim SRC() As Char = ¹øÈ£.ToCharArray Dim Log As String = "\¹øÈ£ÆÐÅÏETC.txt" Dim SepPos As Short = ¹øÈ£.IndexOf(";") Dim retval As Integer = 0 ''0Àº Á¤»ó 1Àº ±æÀÌÆÐÅϾøÀ½ 2´Â 3Àº ±æÀÌ+¹®ÀÚ¾øÀ½ '//¹øÈ£´Â ±æÀÌÆÐÅÏÀ» ÇÏÁö¾Ê°í ¹®ÀÚÆÐÅϸ¸ ÇÑ´Ù. Dim Arinini As New MyINI2(drstyle.file) Dim CTLPOS() As String '//À§Ä¡Á¤º¸ Dim CTLFONT() As String Dim CTLVISIBLE As Boolean Dim TOBJ As MyControlOLEDBv2.MyLabel Dim Dr() As DataRow Dim ºÐ¸®À妽º As Short = 0 Dim ¹øÈ£Çü½Ä As String = "99,99" Dim Pname As String = CStr(Me.ÆÐÅϸí_¹øÈ£ & "II" & PATTERN_ENC(srcstr)) Dr = DtPattern.Select("NAME = '" & Pname & "DESC'") If Dr.GetUpperBound(0) = 0 Then '//µ¥ÀÌÅͰ¡ Á¸ÀçÇϹǷΠ¸ðµÎ Àû¿ëÀ» ÇÑ´Ù. WLog2(Auto_Log, "¹øÈ£ÆÐÅϰ¨Áö(¹®ÀÚ) : ±æÀÌ=" & Wlen & " ¹®ÀÚ¿­=" & srcstr & " ÆÐÅÏ=" & Pname, Log) '//µ¥ÀÌÅÍ´Â ÃÖÁ¾ÀûÀ¸·Î ¹øÈ£Çü½Ä¿¡¼­ º¸³½´Ù. ºÐ¸®À妽º = Arinini.Read(Pname, "nseparate", 0) ¹øÈ£Çü½Ä = Arinini.Read(Pname, "LineType", "999") For i As Integer = 0 To Me.SÀüÁÖ¹øÈ£.GetUpperBound(0) TOBJ = Me.SÀüÁÖ¹øÈ£(i) TOBJ.Tag = "" '//±âÁ¸Å±׸¦ »èÁ¦ÇÑ´Ù. Try '//»óŸ¦ Àо ¹Ù·Î Àû¿ëÇÑ´Ù. Dr = DtPattern.Select("NAME = '" & Pname & TOBJ.Name & "POS'") If Dr.GetUpperBound(0) = 0 Then CTLPOS = Dr(0)(1).ToString.Split(",") TOBJ.Location = New Point(CTLPOS(0), CTLPOS(1)) TOBJ.Size = New Size(CTLPOS(2), CTLPOS(3)) End If Dr = DtPattern.Select("NAME = '" & Pname & TOBJ.Name & "FONT'") If Dr.GetUpperBound(0) = 0 Then CTLFONT = Dr(0)(1).ToString.Split(",") TOBJ.MyFont = New Font(CTLFONT(0), CTLFONT(1), IIf(CTLFONT(3).ToUpper = "TRUE", FontStyle.Bold, FontStyle.Regular), GraphicsUnit.Point) TOBJ.ÀåÆò = CTLFONT(5) TOBJ.Àå³ôÀÌ = CTLFONT(6) End If Dr = DtPattern.Select("NAME = '" & Pname & TOBJ.Name & "VISIBLE'") If Dr.GetUpperBound(0) = 0 Then CTLVISIBLE = Dr(0)(1).ToString TOBJ.Visible = CType(CTLVISIBLE, Boolean) End If Dr = DtPattern.Select("NAME = '" & Pname & TOBJ.Name & "SPACE'") If Dr.GetUpperBound(0) = 0 Then TOBJ.°ø¹é = Dr(0)(1).ToString End If TOBJ.Tag = "C" Catch ex As Exception WLog2(Auto_Log, "¹®ÀÚÆÐÅÏ¿À·ù=" & ex.Message.ToString, Log) End Try Next Else WLog2(Auto_Log, "¹®ÀÚÆÐÅϺÒÀÏÄ¡ ±æÀÌ=" & Wlen & " ¹®ÀÚ¿­=" & srcstr & " ÆÐÅÏ=" & Pname, Log) 'MsgBox("¹®ÀÚ¾ø´Ù=" & Pname) retval += 2 '//ÆÐÅÏÀÌ ¾øÀ¸¹Ç·Î ¹Ù·Î ³Ñ±ä´Ù. End If If retval = 2 Then '//¹®ÀÚÆÐÅÏÀÌ ¾øÀ»°æ¿ì¿¡¸¸ ±æÀÌÆÐÅÏÀ» È®ÀÎÇÑ´Ù. '//±æÀÌÆÐÅÏ È®ÀÎ Pname = CStr(Me.ÆÐÅϸí_¹øÈ£ & Wlen) Dr = DtPattern.Select("NAME = '" & Pname & "DESC'") If Dr.GetUpperBound(0) = 0 Then '//µ¥ÀÌÅͰ¡ Á¸ÀçÇϹǷΠ¸ðµÎ Àû¿ëÀ» ÇÑ´Ù. WLog2(Auto_Log, "¹øÈ£ÆÐÅϰ¨Áö(±æÀÌ) : ±æÀÌ=" & Wlen & " ¹®ÀÚ¿­=" & srcstr, Log) '//µ¥ÀÌÅÍ´Â ÃÖÁ¾ÀûÀ¸·Î ¹øÈ£Çü½Ä¿¡¼­ º¸³½´Ù. ºÐ¸®À妽º = Arinini.Read(Pname, "nseparate", 0) ¹øÈ£Çü½Ä = Arinini.Read(Pname, "LineType", "999") For i As Integer = 0 To Me.SÀüÁÖ¹øÈ£.GetUpperBound(0) TOBJ = Me.SÀüÁÖ¹øÈ£(i) TOBJ.Tag = "" '//±âÁ¸Å±׸¦ »èÁ¦ÇÑ´Ù. Try '//»óŸ¦ Àо ¹Ù·Î Àû¿ëÇÑ´Ù. Dr = DtPattern.Select("NAME = '" & Pname & TOBJ.Name & "POS'") If Dr.GetUpperBound(0) = 0 Then CTLPOS = Dr(0)(1).ToString.Split(",") TOBJ.Location = New Point(CTLPOS(0), CTLPOS(1)) TOBJ.Size = New Size(CTLPOS(2), CTLPOS(3)) End If Dr = DtPattern.Select("NAME = '" & Pname & TOBJ.Name & "FONT'") If Dr.GetUpperBound(0) = 0 Then CTLFONT = Dr(0)(1).ToString.Split(",") TOBJ.MyFont = New Font(CTLFONT(0), CTLFONT(1), IIf(CTLFONT(3).ToUpper = "TRUE", FontStyle.Bold, FontStyle.Regular), GraphicsUnit.Point) TOBJ.ÀåÆò = CTLFONT(5) TOBJ.Àå³ôÀÌ = CTLFONT(6) End If Dr = DtPattern.Select("NAME = '" & Pname & TOBJ.Name & "VISIBLE'") If Dr.GetUpperBound(0) = 0 Then CTLVISIBLE = Dr(0)(1).ToString TOBJ.Visible = CType(CTLVISIBLE, Boolean) End If Dr = DtPattern.Select("NAME = '" & Pname & TOBJ.Name & "SPACE'") If Dr.GetUpperBound(0) = 0 Then TOBJ.°ø¹é = Dr(0)(1).ToString End If TOBJ.Tag &= "L" Catch ex As Exception WLog2(Auto_Log, "±æÀÌ ÆÐÅÏ¿À·ù=" & ex.Message.ToString, Log) End Try Next Else WLog2(Auto_Log, "±æÀÌÆÐÅϺÒÀÏÄ¡ ±âº»½ºÅ¸ÀÏ º¹¿ø ±æÀÌ=" & Wlen & " ¹®ÀÚ¿­=" & srcstr, Log) retval += 1 '//¾ø´Ù End If End If Me.cmb_sep.SelectedIndex = ºÐ¸®À妽º If ¹øÈ£Çü½Ä = "99,99" Then '//ÆÐÅÏÀ̾ø¾ú´Ù´Â ¸»ÀÌ´Ù ¹øÈ£Çü½ÄÀ» ¾î´ÀÁ¤µµ ¸ÂÃçÁØ´Ù. 'MsgBox("¹øÈ£Çü½ÄÀÌ ¾ø¾î¼­ ¼ÂÆÃÇÕ´Ï´Ù(" & ¹øÈ£ & "/" & ¹øÈ£.Length) If ¹øÈ£.Length <= 10 Then ¹øÈ£Çü½Ä = "10,0" Else '//12ÀÚ¸®ÀÌ»óÀ̹ǷΠ¾î‰F°Ô Âɰ³¾ßÇÒÁö 3À¸·Î³ª´²¼­ ..int ´ëÀÔÀ» ÇÏÀÚ ¹øÈ£Çü½Ä = "10," & srcstr.Length - 10 End If End If Me.tb_ntype.Text = ¹øÈ£Çü½Ä ¹øÈ£Çü½ÄÁöÁ¤(Me.tb_ntype.Text) '//¹øÈ£Çü½ÄÀ» °»½ÅÇØÁØ´Ù. Return retval '// 0ÀÌ ¸®ÅϵɰÍÀÌ´Ù. ÆÐÅÏÀÌ ¸ðµÎ Á¤»óÀ̶õ ¶æÀÌ´Ù End Function Public Function PARSE_°íÀå½Å°í(ByVal srcstr As String) As Boolean Me.CLEAR_ITEM("Z") Dim Log As String = "\Parse_°íÀå½Å°í.txt" If srcstr = "" OrElse Not Me.cb_gojang.Checked Then WLog2(Auto_Log, "Zero Length - Return", Log) Return False End If Dim Wlen As Short = srcstr.Length Dim SepPos As Short = srcstr.IndexOf(";") WLog2(Auto_Log, "Length=" & Wlen & " Sep=" & SepPos, Log) Me.S°íÀå½Å°í(0).MyText = srcstr Me.S°íÀå½Å°í(0).Visible = True Return True End Function Public Sub PARSE_°íÀå½Å°íÆÐÅÏ(ByVal SRCSTR As String) '//ºñ°íÆÐÅÏÀº 1234 °¡ Á¸ÀçÇÑ´Ù. ''//ºñ°í ÆÐÅÏÀº ¸îÁÙ ¿¡ °¢ ºñ°íº°·Î Á¸ÀçÇÑ´Ù. Dim Wlen As Short = °íÀå½Å°í.Length : If Wlen <= 0 Then Return '//¾ø´Â ±Û±Í°¡ ¿ÓÀ»¶§ ÅÏÇØ¹ö¸°´Ù. Dim Log As String = "\PATTERN_°íÀå½Å°í.txt" Dim SepPos As Short = °íÀå½Å°í.IndexOf(";") Dim retval As Integer = 0 ''0Àº Á¤»ó 1Àº ±æÀÌÆÐÅϾøÀ½ 2´Â 3Àº ±æÀÌ+¹®ÀÚ¾øÀ½ 'Me.±æÀÌÆÐÅÏ¿¬½À(SRCSTR, "LNUM" & BlineNum & CStr(Me.ÆÐÅϸí_ºñ°í1 & Wlen), Log, "O", Sºñ°í1) Me.¹®ÀÚÆÐÅÏ¿¬½À(SRCSTR, "LNUM" & BlineNum & CStr(Me.ÆÐÅϸí_°íÀå½Å°í & "II" & PATTERN_ENC(SRCSTR)), Log, Me.S°íÀå½Å°í) End Sub Public Function PARSE_ºñ°í1(ByVal srcstr As String) As Boolean Me.CLEAR_ITEM("O") Dim Log As String = "\Parse_ºñ°í1.txt" If srcstr = "" OrElse Not Me.cb_bigo1.Checked Then WLog2(Auto_Log, "Zero Length - Return", Log) Return False End If Dim Wlen As Short = srcstr.Length Dim SepPos As Short = srcstr.IndexOf(";") WLog2(Auto_Log, "Length=" & Wlen & " Sep=" & SepPos, Log) Me.Sºñ°í1(0).MyText = srcstr Me.Sºñ°í1(0).Visible = True Return True End Function Public Sub PARSE_ºñ°í1ÆÐÅÏ(ByVal SRCSTR As String) '//ºñ°íÆÐÅÏÀº 1234 °¡ Á¸ÀçÇÑ´Ù. ''//ºñ°í ÆÐÅÏÀº ¸îÁÙ ¿¡ °¢ ºñ°íº°·Î Á¸ÀçÇÑ´Ù. Dim Wlen As Short = ºñ°í1.Length : If Wlen <= 0 Then Return '//¾ø´Â ±Û±Í°¡ ¿ÓÀ»¶§ ÅÏÇØ¹ö¸°´Ù. Dim Log As String = "\PATTERN_ºñ°í1.txt" Dim SepPos As Short = ºñ°í1.IndexOf(";") Dim retval As Integer = 0 ''0Àº Á¤»ó 1Àº ±æÀÌÆÐÅϾøÀ½ 2´Â 3Àº ±æÀÌ+¹®ÀÚ¾øÀ½ 'Me.±æÀÌÆÐÅÏ¿¬½À(SRCSTR, "LNUM" & BlineNum & CStr(Me.ÆÐÅϸí_ºñ°í1 & Wlen), Log, "O", Sºñ°í1) Me.¹®ÀÚÆÐÅÏ¿¬½À(SRCSTR, "LNUM" & BlineNum & CStr(Me.ÆÐÅϸí_ºñ°í1 & "II" & PATTERN_ENC(SRCSTR)), Log, Me.Sºñ°í1) End Sub Public Function PARSE_ºñ°í2(ByVal srcstr As String) As Boolean Me.CLEAR_ITEM("P") Dim Log As String = "\Parse_ºñ°í2.txt" If srcstr = "" OrElse Not Me.cb_bigo1.Checked Then WLog2(Auto_Log, "Zero Length - Return", Log) Return False End If Dim Wlen As Short = srcstr.Length Dim SepPos As Short = srcstr.IndexOf(";") WLog2(Auto_Log, "Length=" & Wlen & " Sep=" & SepPos, Log) Me.Sºñ°í2(0).MyText = srcstr Me.Sºñ°í2(0).Visible = True Return True End Function Public Sub PARSE_ºñ°í2ÆÐÅÏ(ByVal SRCSTR As String) '//ºñ°íÆÐÅÏÀº 1234 °¡ Á¸ÀçÇÑ´Ù. ''//ºñ°í ÆÐÅÏÀº ¸îÁÙ ¿¡ °¢ ºñ°íº°·Î Á¸ÀçÇÑ´Ù. Dim Wlen As Short = ºñ°í2.Length : If Wlen <= 0 Then Return '//¾ø´Â ±Û±Í°¡ ¿ÓÀ»¶§ ÅÏÇØ¹ö¸°´Ù. Dim Log As String = "\PATTERN_ºñ°í2.txt" Dim SepPos As Short = ºñ°í2.IndexOf(";") Dim retval As Integer = 0 ''0Àº Á¤»ó 1Àº ±æÀÌÆÐÅϾøÀ½ 2´Â 3Àº ±æÀÌ+¹®ÀÚ¾øÀ½ 'Me.±æÀÌÆÐÅÏ¿¬½À(SRCSTR, "LNUM" & BlineNum & CStr(Me.ÆÐÅϸí_ºñ°í2 & Wlen), Log, "P", Sºñ°í2) Me.¹®ÀÚÆÐÅÏ¿¬½À(SRCSTR, "LNUM" & BlineNum & CStr(Me.ÆÐÅϸí_ºñ°í2 & "II" & PATTERN_ENC(SRCSTR)), Log, Me.Sºñ°í2) End Sub Public Function PARSE_ºñ°í3(ByVal srcstr As String) As Boolean Me.CLEAR_ITEM("Q") Dim Log As String = "\Parse_ºñ°í3.txt" If srcstr = "" OrElse Not Me.cb_bigo1.Checked Then WLog2(Auto_Log, "Zero Length - Return", Log) Return False End If Dim Wlen As Short = srcstr.Length Dim SepPos As Short = srcstr.IndexOf(";") WLog2(Auto_Log, "Length=" & Wlen & " Sep=" & SepPos, Log) Me.Sºñ°í3(0).MyText = srcstr Me.Sºñ°í3(0).Visible = True Return True End Function Public Sub PARSE_ºñ°í3ÆÐÅÏ(ByVal SRCSTR As String) '//ºñ°íÆÐÅÏÀº 1234 °¡ Á¸ÀçÇÑ´Ù. ''//ºñ°í ÆÐÅÏÀº ¸îÁÙ ¿¡ °¢ ºñ°íº°·Î Á¸ÀçÇÑ´Ù. Dim Wlen As Short = ºñ°í3.Length : If Wlen <= 0 Then Return '//¾ø´Â ±Û±Í°¡ ¿ÓÀ»¶§ ÅÏÇØ¹ö¸°´Ù. Dim Log As String = "\PATTERN_ºñ°í3.txt" Dim SepPos As Short = ºñ°í3.IndexOf(";") Dim retval As Integer = 0 ''0Àº Á¤»ó 1Àº ±æÀÌÆÐÅϾøÀ½ 2´Â 3Àº ±æÀÌ+¹®ÀÚ¾øÀ½ 'Me.±æÀÌÆÐÅÏ¿¬½À(SRCSTR, "LNUM" & BlineNum & CStr(Me.ÆÐÅϸí_ºñ°í3 & Wlen), Log, "Q", Sºñ°í3) Me.¹®ÀÚÆÐÅÏ¿¬½À(SRCSTR, "LNUM" & BlineNum & CStr(Me.ÆÐÅϸí_ºñ°í3 & "II" & PATTERN_ENC(SRCSTR)), Log, Me.Sºñ°í3) End Sub Public Function PARSE_ºñ°í4(ByVal srcstr As String) As Boolean Me.CLEAR_ITEM("R") Dim Log As String = "\Parse_ºñ°í1.txt" If srcstr = "" OrElse Not Me.cb_bigo1.Checked Then WLog2(Auto_Log, "Zero Length - Return", Log) Return False End If Dim Wlen As Short = srcstr.Length Dim SepPos As Short = srcstr.IndexOf(";") WLog2(Auto_Log, "Length=" & Wlen & " Sep=" & SepPos, Log) Me.Sºñ°í4(0).MyText = srcstr Me.Sºñ°í4(0).Visible = True Return True End Function Public Sub PARSE_ºñ°í4ÆÐÅÏ(ByVal SRCSTR As String) '//ºñ°íÆÐÅÏÀº 1234 °¡ Á¸ÀçÇÑ´Ù. ''//ºñ°í ÆÐÅÏÀº ¸îÁÙ ¿¡ °¢ ºñ°íº°·Î Á¸ÀçÇÑ´Ù. Dim Wlen As Short = ºñ°í4.Length : If Wlen <= 0 Then Return '//¾ø´Â ±Û±Í°¡ ¿ÓÀ»¶§ ÅÏÇØ¹ö¸°´Ù. Dim Log As String = "\PATTERN_ºñ°í4.txt" Dim SepPos As Short = ºñ°í4.IndexOf(";") Dim retval As Integer = 0 ''0Àº Á¤»ó 1Àº ±æÀÌÆÐÅϾøÀ½ 2´Â 3Àº ±æÀÌ+¹®ÀÚ¾øÀ½ 'Me.±æÀÌÆÐÅÏ¿¬½À(SRCSTR, "LNUM" & BlineNum & CStr(Me.ÆÐÅϸí_ºñ°í4 & Wlen), Log, "R", Sºñ°í4) Me.¹®ÀÚÆÐÅÏ¿¬½À(SRCSTR, "LNUM" & BlineNum & CStr(Me.ÆÐÅϸí_ºñ°í4 & "II" & PATTERN_ENC(SRCSTR)), Log, Me.Sºñ°í4) End Sub Private Sub SaveReadLayOut(ByVal read As Boolean) '//ÇöÀç È­¸é±¸¼ºÀ» °¡·Î/¼¼·Î °áÁ¤ÇÕ´Ï´Ù. '//iniÆÄÀÏ¿¡ÀúÀåÇÑ´Ù. ¼½¼Ç¸íÀº pagetype0 ,pagetyp1 0Àº ¼¼·Î 1Àº °¡·Î´Ù Dim ini As New MyINI2(drstyle.file) Dim Secname As String = "pagetype" & Me.cmb_landscape.SelectedIndex If read = False Then ini.Write(Secname, "tablelayoutpanel1loc", Me.TableLayoutPanel1.Left & "," & Me.TableLayoutPanel1.Top) ini.Write(Secname, "tablelayoutpanel1size", Me.TableLayoutPanel1.Width & "," & Me.TableLayoutPanel1.Height) ini.Write(Secname, "PictureBox1loc", Me.PictureBox1.Left & "," & Me.PictureBox1.Top) ini.Write(Secname, "PictureBox1size", Me.PictureBox1.Width & "," & Me.PictureBox1.Height) ini.Write(Secname, "TabControl1loc", Me.TabControl1.Left & "," & Me.TabControl1.Top) ini.Write(Secname, "TabControl1size", Me.TabControl1.Width & "," & Me.TabControl1.Height) ini.Write(Secname, "GroupBox3loc", Me.GroupBox3.Left & "," & Me.GroupBox3.Top) ini.Write(Secname, "GroupBox3size", Me.GroupBox3.Width & "," & Me.GroupBox3.Height) ini.Write(Secname, "GroupBox2loc", Me.GroupBox2.Left & "," & Me.GroupBox2.Top) ini.Write(Secname, "GroupBox2size", Me.GroupBox2.Width & "," & Me.GroupBox2.Height) ini.Write(Secname, "cmb_styleloc", Me.cmb_style.Left & "," & Me.cmb_style.Top) ini.Write(Secname, "cmb_stylesize", Me.cmb_style.Width & "," & Me.cmb_style.Height) ini.Write(Secname, "ToolStrip2loc", Me.ToolStrip2.Left & "," & Me.ToolStrip2.Top) ini.Write(Secname, "mesize", Me.Width & "," & Me.Height) Else '//¿©±â´Â Àд ºÎºÐ If Me.cmb_landscape.SelectedIndex = 0 Then '//¼¼·Î Me.pDoc.DefaultPageSettings.Landscape = False TableLayoutPanel1.Location = New Point(ini.Read(Secname, "tablelayoutpanel1loc", "0,31").Split(",")(0), ini.Read(Secname, "tablelayoutpanel1loc", "0,31").Split(",")(1)) TableLayoutPanel1.Size = New Size(ini.Read(Secname, "tablelayoutpanel1size", "297,522").Split(",")(0), ini.Read(Secname, "tablelayoutpanel1size", "297,522").Split(",")(1)) PictureBox1.Location = New Point(ini.Read(Secname, "PictureBox1loc", "3,3").Split(",")(0), ini.Read(Secname, "PictureBox1loc", "3,3").Split(",")(1)) PictureBox1.Size = New Size(ini.Read(Secname, "PictureBox1size", "270,479").Split(",")(0), ini.Read(Secname, "PictureBox1size", "270,479").Split(",")(1)) TabControl1.Location = New Point(ini.Read(Secname, "TabControl1loc", "303,34").Split(",")(0), ini.Read(Secname, "TabControl1loc", "303,34").Split(",")(1)) TabControl1.Size = New Size(ini.Read(Secname, "TabControl1size", "279,519").Split(",")(0), ini.Read(Secname, "TabControl1size", "279,519").Split(",")(1)) TabControl2.Location = New Point(ini.Read(Secname, "TabControl2loc", "16,246").Split(",")(0), ini.Read(Secname, "TabControl2loc", "16,246").Split(",")(1)) GroupBox3.Location = New Point(ini.Read(Secname, "GroupBox3loc", "11,368").Split(",")(0), ini.Read(Secname, "GroupBox3loc", "11,368").Split(",")(1)) GroupBox3.Size = New Size(ini.Read(Secname, "GroupBox3size", "246,78").Split(",")(0), ini.Read(Secname, "GroupBox3size", "246,78").Split(",")(1)) GroupBox2.Location = New Point(ini.Read(Secname, "GroupBox2loc", "11,170").Split(",")(0), ini.Read(Secname, "GroupBox2loc", "11,170").Split(",")(1)) GroupBox2.Size = New Size(ini.Read(Secname, "GroupBox2size", "245,192").Split(",")(0), ini.Read(Secname, "GroupBox2size", "245,192").Split(",")(1)) cmb_style.Location = New Point(ini.Read(Secname, "cmb_styleloc", "11,18").Split(",")(0), ini.Read(Secname, "cmb_styleloc", "11,18").Split(",")(1)) cmb_style.Size = New Size(ini.Read(Secname, "cmb_stylesize", "245,146").Split(",")(0), ini.Read(Secname, "cmb_stylesize", "245,146").Split(",")(1)) ToolStrip2.Location = New Point(ini.Read(Secname, "ToolStrip2loc", "3,451").Split(",")(0), ini.Read(Secname, "ToolStrip2loc", "3,451").Split(",")(1)) Me.Size = New Size(ini.Read(Secname, "mesize", "588,632").Split(",")(0), ini.Read(Secname, "mesize", "588,632").Split(",")(1)) Else Me.pDoc.DefaultPageSettings.Landscape = True TableLayoutPanel1.Location = New Point(ini.Read(Secname, "tablelayoutpanel1loc", "0,31").Split(",")(0), ini.Read(Secname, "tablelayoutpanel1loc", "0,31").Split(",")(1)) TableLayoutPanel1.Size = New Size(ini.Read(Secname, "tablelayoutpanel1size", "710,292").Split(",")(0), ini.Read(Secname, "tablelayoutpanel1size", "710,292").Split(",")(1)) PictureBox1.Location = New Point(ini.Read(Secname, "PictureBox1loc", "325,3").Split(",")(0), ini.Read(Secname, "PictureBox1loc", "325,3").Split(",")(1)) PictureBox1.Size = New Size(ini.Read(Secname, "PictureBox1size", "355,200").Split(",")(0), ini.Read(Secname, "PictureBox1size", "355,200").Split(",")(1)) TabControl1.Location = New Point(ini.Read(Secname, "TabControl1loc", "3,326").Split(",")(0), ini.Read(Secname, "TabControl1loc", "3,326").Split(",")(1)) TabControl1.Size = New Size(ini.Read(Secname, "TabControl1size", "711,228").Split(",")(0), ini.Read(Secname, "TabControl1size", "711,228").Split(",")(1)) TabControl2.Location = New Point(ini.Read(Secname, "TabControl2loc", "265,1").Split(",")(0), ini.Read(Secname, "TabControl2loc", "265,1").Split(",")(1)) GroupBox3.Location = New Point(ini.Read(Secname, "GroupBox3loc", "513,6").Split(",")(0), ini.Read(Secname, "GroupBox3loc", "513,6").Split(",")(1)) GroupBox3.Size = New Size(ini.Read(Secname, "GroupBox3size", "184,78").Split(",")(0), ini.Read(Secname, "GroupBox3size", "184,78").Split(",")(1)) GroupBox2.Location = New Point(ini.Read(Secname, "GroupBox2loc", "262,6").Split(",")(0), ini.Read(Secname, "GroupBox2loc", "262,6").Split(",")(1)) GroupBox2.Size = New Size(ini.Read(Secname, "GroupBox2size", "245,192").Split(",")(0), ini.Read(Secname, "GroupBox2size", "245,192").Split(",")(1)) cmb_style.Location = New Point(ini.Read(Secname, "cmb_styleloc", "11,18").Split(",")(0), ini.Read(Secname, "cmb_styleloc", "11,18").Split(",")(1)) cmb_style.Size = New Size(ini.Read(Secname, "cmb_stylesize", "245,139").Split(",")(0), ini.Read(Secname, "cmb_stylesize", "245,139").Split(",")(1)) ToolStrip2.Location = New Point(ini.Read(Secname, "ToolStrip2loc", "3,159").Split(",")(0), ini.Read(Secname, "ToolStrip2loc", "3,159").Split(",")(1)) Me.Size = New Size(ini.Read(Secname, "mesize", "730,643").Split(",")(0), ini.Read(Secname, "mesize", "730,643").Split(",")(1)) End If End If End Sub Private Sub bt_canvasD_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles bt_canvasD.MouseDown, bt_canvasL.MouseDown, bt_canvasR.MouseDown, bt_canvasU.MouseDown If e.Button = System.Windows.Forms.MouseButtons.Right Then Select Case sender.name.ToString.ToUpper Case "BT_CANVASD" Me.PictureBox1.Top += 5 Case "BT_CANVASU" Me.PictureBox1.Top -= 5 Case "BT_CANVASR" Me.PictureBox1.Left += 5 Case "BT_CANVASL" Me.PictureBox1.Left -= 5 End Select End If End Sub Private Sub cmb_landscape_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmb_landscape.SelectedIndexChanged Me.SaveReadLayOut(True) End Sub Private Sub GetPrintersName() WLog2(Auto_Log, "GetPrinterName()", "\¼øÂ÷·Î±×.txt") Dim value As PrinterSettings.StringCollection = System.Drawing.Printing.PrinterSettings.InstalledPrinters Me.combobox5.Items.Clear() For i As Integer = 0 To value.Count - 1 Me.combobox5.Items.Add(value(i)) Next End Sub Private Sub printform_MouseWheel(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseWheel If e.Delta < 0 Then 'If Me.BindingNavigatorPositionItem.Text < Me.BindingNavigatorCountItem.Text Then Me.BindingNavigatorMoveNextItem.PerformClick() Me.BindingNavigatorPositionItem.Focus() 'End If Else If Me.BindingNavigatorPositionItem.Text > 0 Then Me.BindingNavigatorMovePreviousItem.PerformClick() Me.BindingNavigatorPositionItem.Focus() End If End If End Sub Private Sub ToolStripButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_chkpattern.Click If Me.bt_chkpattern.Text = "ÁßÁö(&S)" Then ' If BackWork.IsAlive Then BackWork.Abort() Me.bt_chkpattern.Text = "½ÃÀÛ(&S)" Else Me.bt_chkpattern.Text = "ÁßÁö(&S)" 'BackWork = New Threading.Thread(AddressOf NPartternCheck) 'BackWork.Start() NPartternCheck() End If End Sub Private Sub Button3_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click 'Me.SetFont() If Not IsNumeric(Me.tb_space.Text) Then MsgBox("¼ýÀÚ¸¸ ÀÔ·ÂÇϼ¼¿ä", MsgBoxStyle.Critical, "È®ÀÎ") Return End If For Each A As Control In SelCon CType(A, MyControlOLEDBv2.MyLabel).°ø¹é = CInt(Me.tb_space.Text) 'Me.UpdateFontSize(Me.tb_space.Text, A) Next Me.preview_window() End Sub Private Sub tb_picfile_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tb_picfile.TextChanged If Not IO.File.Exists(Me.tb_picfile.Text) Then Me.erp.SetError(Me.tb_picfile, "±×¸²ÆÄÀÏÀÌ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù") Else Me.erp.SetError(Me.tb_picfile, "") End If End Sub Private Sub bt_canvasL_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_canvasL.Click Me.PictureBox1.Width -= 2 End Sub Private Sub bt_canvasR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_canvasR.Click Me.PictureBox1.Width += 2 End Sub Private Sub bt_canvasU_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_canvasU.Click Me.PictureBox1.Height -= 2 End Sub Private Sub bt_canvasD_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_canvasD.Click Me.PictureBox1.Height += 2 End Sub Private Sub tb_space_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) If e.KeyCode = Keys.Enter Then Me.Button3.PerformClick() End Sub Private Sub preview_window() '//¹Ì¸®º¸±âÈ­¸éÀ» »ý¼ºÇÕ´Ï´Ù. 'Dim fmt As New StringFormat(StringFormatFlags.LineLimit) Dim MyFont As Font Dim NewFontSize As Int16 = 10 Dim dummy As Boolean = False '//À̰ªÀÌ true À̸é Ãâ·Â½Ã º¯À§¸¦ ÁöÁ¤Çؼ­ Ãâ·ÂÇÑ´Ù. Dim BackScr As New Bitmap(Me.PictureBox1.Width, Me.PictureBox1.Height, Me.PictureBox1.CreateGraphics) Dim Ga As Graphics = Graphics.FromImage(BackScr) Dim Brush As SolidBrush Dim obj As MyControlOLEDBv2.MyLabel 'ÆäÀÌÁö ±¸ºÐÀ» ÀÌÇØÇÏ°í ¸î°³¸¦ ÂïÀ»Áö °áÁ¤ÇÑ´Ù. 'Debug.Print("ÇÁ¸°ÅÍÀ妽º=" & Me.printindex) 'Debug.Print("ÇÁ¸°Å͹迭=" & Me.PrintArray.GetUpperBound(0)) ' If Me.printindex <> -1 Then Me.GeTviewData(Me.PrintArray(Me.printindex)) '//ÆäÀÌÁö¸¦ °»½ÅÇϰí Ãâ·ÂÀ» ½ÃÀÛÇÑ´Ù. 'Dummyflag: '//--2ÀåÃâ·ÂÀϰæ¿ì À̺κп¡¼­ ´Ù½Ã ½ÃÀÛÇÑ´Ù. 'If Not Me.PictureBox1.BackgroundImage Is Nothing Then ' Ga.DrawImage(Me.PictureBox1.BackgroundImage, 0, 0, Me.PictureBox1.Width, Me.PictureBox1.Height) ' End If 'MsgBox("orevuew") For i As Integer = 0 To Me.AllLabels.GetUpperBound(0) '//¸ðµç °³Ã¼µé¿¡ ´ëÇØ¼­ Àμ⸦ ¼³Á¤ÇÑ´Ù. obj = Me.AllLabels(i).ctl If obj.Visible AndAlso obj.MyText <> "" Then '//È­¸é¿¡ º¸À̴°͸¸ ÇÑ´Ù. NewFontSize = obj.MyFont.Size + Me.tb_myfontsize.Text If NewFontSize < 0 Then NewFontSize = 0 Brush = New SolidBrush(obj.MyForeColor) '//Àü°æ»öÀ¸·Î ºê·¯½¬¸¦ ¸¸µç´Ù. MyFont = New Font(obj.MyFont.FontFamily, NewFontSize, obj.MyFont.Style) If obj.ÀåÆò = 100 AndAlso obj.Àå³ôÀÌ = 100 Then '//ÀåÆò¹Ì»ç¿ë ¹®ÀÚ¿­ ó¸® Ga.DrawString(obj.ÃÖÁ¾¹®ÀÚ, MyFont, Brush, obj.Location) Else '//ÀåÆò»ç¿ë À̹ÌÁö ó¸® Dim NewX, Newy As Integer Dim SrcDpix, SrcDPiY As Single 'MsgBox(Tobj.Àå³ôÀÌ) SrcDpix = obj.CreateGraphics.DpiX SrcDPiY = obj.CreateGraphics.DpiY NewX = obj.GetSize(MyFont).Width * (obj.ÀåÆò / 100) * (Ga.DpiX / SrcDpix) Newy = obj.GetSize(MyFont).Height * (obj.Àå³ôÀÌ / 100) * (Ga.DpiY / SrcDPiY) Dim BMP As New Bitmap(NewX, Newy, Ga) Dim G As Graphics = Graphics.FromImage(BMP) G.ResetTransform() G.ScaleTransform((obj.ÀåÆò / 100), (obj.Àå³ôÀÌ / 100)) G.DrawString(obj.ÃÖÁ¾¹®ÀÚ, MyFont, Brush, 0, 0) G.Dispose() Ga.DrawImage(BMP, New Point(obj.Left, obj.Top)) ', CInt(GetSize.Width * (vÀåÆò / 100)), GetSize.Height) End If End If Next If Me.cb_dummy.Checked Then '//º¹»ç°¡ ¼±ÅõǾîÀÖÀ¸¸ç ¤¤Çѹø´õ Ãâ·ÂÇÑ´Ù. For i As Integer = 0 To Me.AllLabels.GetUpperBound(0) '//¸ðµç °³Ã¼µé¿¡ ´ëÇØ¼­ Àμ⸦ ¼³Á¤ÇÑ´Ù. obj = Me.AllLabels(i).ctl If obj.Visible AndAlso obj.MyText <> "" Then '//È­¸é¿¡ º¸À̴°͸¸ ÇÑ´Ù. NewFontSize = obj.MyFont.Size + Me.tb_myfontsize.Text If NewFontSize < 0 Then NewFontSize = 0 Brush = New SolidBrush(obj.MyForeColor) '//Àü°æ»öÀ¸·Î ºê·¯½¬¸¦ ¸¸µç´Ù. MyFont = New Font(obj.MyFont.FontFamily, NewFontSize, obj.MyFont.Style) If obj.ÀåÆò = 100 AndAlso obj.Àå³ôÀÌ = 100 Then '//ÀåÆò¹Ì»ç¿ë ¹®ÀÚ¿­ ó¸® Ga.DrawString(obj.ÃÖÁ¾¹®ÀÚ, MyFont, Brushes.Gray, (obj.Left + Me.tb_secX.Text), (obj.Top + Me.tb_secY.Text)) Else '//ÀåÆò»ç¿ë À̹ÌÁö ó¸® Dim NewX, Newy As Integer Dim SrcDpix, SrcDPiY As Single 'MsgBox(Tobj.Àå³ôÀÌ) SrcDpix = obj.CreateGraphics.DpiX SrcDPiY = obj.CreateGraphics.DpiY NewX = obj.GetSize(MyFont).Width * (obj.ÀåÆò / 100) * (Ga.DpiX / SrcDpix) Newy = obj.GetSize(MyFont).Height * (obj.Àå³ôÀÌ / 100) * (Ga.DpiY / SrcDPiY) Dim BMP As New Bitmap(NewX, Newy, Ga) Dim G As Graphics = Graphics.FromImage(BMP) G.ResetTransform() G.ScaleTransform((obj.ÀåÆò / 100), (obj.Àå³ôÀÌ / 100)) G.DrawString(obj.ÃÖÁ¾¹®ÀÚ, MyFont, Brushes.Gray, 0, 0) G.Dispose() Ga.DrawImage(BMP, CSng(obj.Left + Me.tb_secX.Text), CSng(obj.Top + Me.tb_secY.Text)) ', CInt(GetSize.Width * (vÀåÆò / 100)), GetSize.Height) End If End If Next End If '//½¦ÀÌÇÁ¸¦ ¸ÕÀú ±×¸°´Ù. If Me.chk_draw.Checked Then '//¶óÀÎÀ» ±×¸°´Ù. For Each Rect As S_Line In Draw_Line Dim Pen As New Drawing.Pen(Rect.PenColor, Rect.PenWidth) Ga.DrawLine(Pen, Rect.X, Rect.Y, Rect.X2, Rect.Y2) Next '//¹Ú½º¸¦ ±×¸°´Ù. For Each Rect As S_Box In Draw_Box Dim Pen As New Drawing.Pen(Rect.PenColor, Rect.PenWidth) Ga.DrawRectangle(Pen, Rect.X, Rect.Y, Rect.Width, Rect.Height) Next '//¿øÀ» ±×¸°´Ù For Each Rect As S_Circle In Draw_Circle Dim Pen As New Drawing.Pen(Rect.PenColor, Rect.PenWidth) Ga.DrawEllipse(Pen, Rect.X, Rect.Y, Rect.Width, Rect.Height) Next If °ü¸®±¸ <> "" Then Try '// qrÄڵ带 ±×¸°´Ù For Each Rect As S_QRCode In Draw_QRcode 'Dim scale As Int16 Dim version As Int16 Dim image As Image Dim data As String Dim errorCorrect As String Dim qrCodeEncoder1 As New QRCodeEncoder() Dim encoding As String encoding = cboEncoding.Text If encoding = "3" Then qrCodeEncoder1.QRCodeEncodeMode = ThoughtWorks.QRCode.Codec.QRCodeEncoder.ENCODE_MODE.BYTE ElseIf encoding = "1" Then qrCodeEncoder1.QRCodeEncodeMode = ThoughtWorks.QRCode.Codec.QRCodeEncoder.ENCODE_MODE.ALPHA_NUMERIC ElseIf encoding = "2" Then qrCodeEncoder1.QRCodeEncodeMode = ThoughtWorks.QRCode.Codec.QRCodeEncoder.ENCODE_MODE.NUMERIC ' Try 'scale = Convert.ToInt16(txtSize.Text) 'qrCodeEncoder.QRCodeScale = scale 'Catch ex As Exception ' MessageBox.Show("Invalid size!") ' End Try Try version = Convert.ToInt16(cboVersion.Text) qrCodeEncoder1.QRCodeVersion = version Catch ex As Exception MessageBox.Show("Invaild Version!") End Try End If errorCorrect = cboCorrectionLevel.Text If errorCorrect = "1" Then qrCodeEncoder1.QRCodeErrorCorrect = ThoughtWorks.QRCode.Codec.QRCodeEncoder.ERROR_CORRECTION.L ElseIf errorCorrect = "2" Then qrCodeEncoder1.QRCodeErrorCorrect = ThoughtWorks.QRCode.Codec.QRCodeEncoder.ERROR_CORRECTION.M ElseIf errorCorrect = "3" Then qrCodeEncoder1.QRCodeErrorCorrect = ThoughtWorks.QRCode.Codec.QRCodeEncoder.ERROR_CORRECTION.Q ElseIf errorCorrect = "4" Then qrCodeEncoder1.QRCodeErrorCorrect = ThoughtWorks.QRCode.Codec.QRCodeEncoder.ERROR_CORRECTION.H End If data = qrȨÆäÀÌÁö1 & "/" & qrȨÆäÀÌÁö2 & "/" & qrȨÆäÀÌÁö3 & "/" & qrȨÆäÀÌÁö4 & "=" & °ü¸®±¸ & "-" & Àü»ê¹øÈ£ & "&name=" & ¼±·Î¸í & ":" & ¹øÈ£ If lbQrBg.BackColor <> Drawing.Color.White Then qrCodeEncoder1.QRCodeBackgroundColor = lbQrBg.BackColor If lbQrFG.BackColor <> Drawing.Color.Black Then qrCodeEncoder1.QRCodeForegroundColor = lbQrFG.BackColor image = qrCodeEncoder1.Encode(data, Ga.DpiX, Ga.DpiY) If Rect.Width = 0 OrElse Rect.Height = 0 Then 'Ga.DrawImage(image, Rect.X + MyProperty_Paper.Ãâ·Â¿©¹éX, Rect.Y + MyProperty_Paper.Ãâ·Â¿©¹éY) Ga.DrawImage(image, Rect.X, Rect.Y) Else 'Ga.DrawImage(image, Rect.X + MyProperty_Paper.Ãâ·Â¿©¹éX, Rect.Y + MyProperty_Paper.Ãâ·Â¿©¹éY, Rect.Width, Rect.Height) Ga.DrawImage(image, Rect.X, Rect.Y, Rect.Width, Rect.Height) End If Next Catch ex As Exception MessageBox.Show(ex.ToString()) End Try End If End If Ga.Dispose() Me.PictureBox1.Image = BackScr End Sub Private Sub cb_bold_CheckedChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) SetFont() End Sub Private Sub Button1_Click_2(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If SelCon Is Nothing Then Return Dim B As New FontDialog B.Font = CType(SelCon(0), MyControlOLEDBv2.MyLabel).MyFont If B.ShowDialog() <> System.Windows.Forms.DialogResult.OK Then Return For Each a As MyControlOLEDBv2.MyLabel In SelCon a.MyFont = B.Font Next Me.ViewProperty(CType(SelCon(0), MyControlOLEDBv2.MyLabel)) Me.preview_window() End Sub Private Sub TextBox3_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles tb_left.KeyUp If e.KeyCode = Keys.Enter Then Me.Button5.PerformClick() End Sub Private Sub TextBox4_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles tb_top.KeyUp If e.KeyCode = Keys.Enter Then Me.Button9.PerformClick() End Sub Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click For Each A As Control In SelCon A.Top = IIf(IsNumeric(Me.tb_top.Text), Val(Me.tb_top.Text), A.Top) Next Me.preview_window() End Sub Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click If Not IsNumeric(Me.tb_wordwidth.Text) Then Return For Each A As Control In SelCon 'Me.UpdateFontWidth(CType(A, MyControlOLEDBv2.MyLabel).ÀåÆò - Val(Me.tb_pixelsize.Text)) CType(A, MyControlOLEDBv2.MyLabel).ÀåÆò = CInt(Me.tb_wordwidth.Text) ViewProperty(A) Next Me.preview_window() End Sub Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click If Not IsNumeric(Me.tb_wordheight.Text) Then Return For Each A As Control In SelCon 'Me.UpdateFontWidth(CType(A, MyControlOLEDBv2.MyLabel).ÀåÆò - Val(Me.tb_pixelsize.Text)) CType(A, MyControlOLEDBv2.MyLabel).Àå³ôÀÌ = CInt(Me.tb_wordheight.Text) ViewProperty(A) Next Me.preview_window() End Sub Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click If Not IsNumeric(Me.tb_fsize.Text) Then MsgBox("¼ýÀÚ¸¸ ÀÔ·ÂÇϼ¼¿ä", MsgBoxStyle.Critical, "È®ÀÎ") Return End If For Each A As Control In SelCon Me.UpdateFontSize(Me.tb_fsize.Text, A) Next Me.preview_window() End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click For Each A As Control In SelCon A.Left = IIf(IsNumeric(Me.tb_left.Text), Val(Me.tb_left.Text), A.Left) Next Me.preview_window() End Sub Private Sub TextBox5_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles tb_wordwidth.KeyUp If e.KeyCode = Keys.Enter Then Me.Button10.PerformClick() End Sub Private Sub TextBox6_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles tb_wordheight.KeyUp If e.KeyCode = Keys.Enter Then Me.Button11.PerformClick() End Sub Private Sub TextBox7_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles tb_fsize.KeyUp If e.KeyCode = Keys.Enter Then Me.Button12.PerformClick() End Sub Private Sub TextBox8_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles tb_space.KeyUp If e.KeyCode = Keys.Enter Then Me.Button3.PerformClick() End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click If SelCon Is Nothing Then Return For Each a As MyControlOLEDBv2.MyLabel In SelCon a.MyFont = CType(SelCon(0), MyControlOLEDBv2.MyLabel).MyFont a.ÀåÆò = CType(SelCon(0), MyControlOLEDBv2.MyLabel).ÀåÆò a.Àå³ôÀÌ = CType(SelCon(0), MyControlOLEDBv2.MyLabel).Àå³ôÀÌ Next Me.ViewProperty(CType(SelCon(0), MyControlOLEDBv2.MyLabel)) Me.preview_window() End Sub Private Sub BindingSource1_PositionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles BindingSource1.PositionChanged 'MsgBox("BindingSource1_PositionChanged=" & Now.ToString & "current=" & Me.BindingNavigatorPositionItem.Text & "mnoview=" & NoView) Debug.Print("BindingSource1_PositionChanged : " & Me.BindingSource1.Position) Debug.Print("½ºÅ©·Ñ¹Ù°ª ¹üÀ§°ª " & Me.VScrollBar1.Minimum & "/" & Me.VScrollBar1.Maximum) If Me.BindingSource1.Position >= 0 Then Me.VScrollBar1.Value = Me.BindingSource1.Position If Me.NoView Then Me.NoView = False Else Me.GeTviewData(Me.BindingNavigatorPositionItem.Text - 1, True) End If End Sub Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Me.GeTviewData(Me.BindingSource1.Position, True) End Sub Private Sub VScrollBar1_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) 'MsgBox(Me.VScrollBar1.Minimum & "/" & Me.VScrollBar1.Maximum & "=" & e.NewValue) Me.BindingSource1.Position = e.NewValue End Sub Private Sub PictureBox1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseClick Dim Tobj As MyControlOLEDBv2.MyLabel Dim selitem As New ArrayList Tobj = Nothing For i As Integer = 0 To Me.AllLabels.GetUpperBound(0) If Me.AllLabels(i).ctl.Visible AndAlso Me.AllLabels(i).ctl.MyText <> "" AndAlso _ ((e.X >= Me.AllLabels(i).ctl.Left) And e.X <= (Me.AllLabels(i).ctl.Left + Me.AllLabels(i).ctl.GetSize.Width)) _ AndAlso ((e.Y >= Me.AllLabels(i).ctl.Top) AndAlso (e.Y <= (Me.AllLabels(i).ctl.Top + Me.AllLabels(i).ctl.GetSize.Height))) Then Tobj = Me.AllLabels(i).ctl selitem.Add(Me.AllLabels(i).ctl) 'Exit For End If Next If Tobj Is Nothing Then Return '//¼±ÅÃµÈ°Ô ¾øÀ¸¸é ³¯¸°´Ù 'If Me.chk_multisel.Checked Then '//´ÙÁ߸ñ·Ï¿¡¼­ ¼±Åýð¡ üũµÇ¾îÀÖÀ¸¸é ¸ñ·ÏÀ» Ç¥½ÃÇØÁØ´Ù. If selitem.Count > 1 Then Dim A As New selitem For si As Short = 1 To selitem.Count A.ListBox1.Items.Add(CType(selitem.Item(si - 1), MyControlOLEDBv2.MyLabel).¼³¸í) Next If A.ShowDialog() = System.Windows.Forms.DialogResult.OK Then Tobj = selitem.Item(A.ListBox1.SelectedIndex) Else '//ĵ½½½Ã¿¡´Â ù¹øÂ° ¾ÆÅÛÀ¸·Î ÇÑ´Ù. Tobj = selitem.Item(0) End If End If 'End If Dim Exist As Boolean = False '//¼±Åð³Ã¼¿¡ Á¸Àç¿©ºÎ If SelCon Is Nothing Then SelCon.Add(Tobj) Else If e.Button = System.Windows.Forms.MouseButtons.Right Then For Each obj As MyControlOLEDBv2.MyLabel In SelCon If obj.Name = Tobj.Name Then '//»èÁ¦µÈ´Ù. obj.MyForeColor = Drawing.Color.Black SelCon.Remove(obj) Exist = True Exit For End If Next If Exist = False Then SelCon.Add(Tobj) Tobj.MyForeColor = Drawing.Color.Tomato End If ElseIf e.Button = System.Windows.Forms.MouseButtons.Left Then '¿ÞÂÊŬ¸®À̸é Áö¿ì°í ´Ù½Ã ¼ÂÆÃ For Each SC As MyControlOLEDBv2.MyLabel In SelCon SC.MyForeColor = Drawing.Color.Black Next SelCon.Clear() SelCon.Add(Tobj) Tobj.MyForeColor = Drawing.Color.DodgerBlue If My.Computer.Keyboard.CtrlKeyDown Then '//ÄÁÆ®·ÑÀÌ ´­·¯ ºÀ¸¸é ÇØ´ç ±×·ìÀ» ÀüºÎ ã´Â´Ù. 'MsgBox(Tobj.Name) SelCon.Clear() For z As Short = 0 To Me.AllLabels.GetUpperBound(0) If Me.AllLabels(z).ctl.Name.Substring(0, 1) = Tobj.Name.Substring(0, 1) Then Me.AllLabels(z).ctl.MyForeColor = Drawing.Color.Blue SelCon.Add(Me.AllLabels(z).ctl) End If Next End If Else Me.Button1.PerformClick() End If End If 'onlyOne = sender 'CType(sender, MyControlOLEDBv2.MyLabel). Me.cmb_controls.Text = Tobj.¼³¸í ViewProperty(Tobj) 'For Each A As MyControlOLEDBv2.MyLabel In SelCon ' A.MyForeColor = Color.DodgerBlue ' Next Me.tb_left.Focus() Me.preview_window() End Sub Private Sub PictureBox1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click End Sub Private Sub Panel1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) End Sub Private Sub PictureBox1_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDoubleClick Dim Tobj As MyControlOLEDBv2.MyLabel Tobj = Nothing For i As Integer = 0 To Me.AllLabels.GetUpperBound(0) If Me.AllLabels(i).ctl.Visible AndAlso Me.AllLabels(i).ctl.MyText <> "" AndAlso _ ((e.X >= Me.AllLabels(i).ctl.Left) And e.X <= (Me.AllLabels(i).ctl.Left + Me.AllLabels(i).ctl.GetSize.Width)) _ AndAlso ((e.Y >= Me.AllLabels(i).ctl.Top) AndAlso (e.Y <= (Me.AllLabels(i).ctl.Top + Me.AllLabels(i).ctl.GetSize.Height))) Then Tobj = Me.AllLabels(i).ctl Exit For End If Next If Tobj Is Nothing Then Return '//¼±ÅÃµÈ°Ô ¾øÀ¸¸é ³¯¸°´Ù Dim Msg As New System.Text.StringBuilder("º¯°æÇÒ °ªÀ» ÀÔ·ÂÇϼ¼¿ä") Msg.AppendLine("ÁٹٲÞÀ»ÇÏ·Á¸é \n À» ÀÔ·ÂÇϼ¼¿ä") Msg.AppendLine("¿¹) ¼¼·Î·Î 12¸¦ Ãâ·ÂÇÏ·Á¸é 1\n2 À» ÀÔ·ÂÇϼ¼¿ä") Msg.AppendLine() Msg.AppendLine("º¯°æÇÑ °ªÀº ÇöÀçÆäÀÌÁö¿¡¸¸ Àû¿ëµË´Ï´Ù") Dim Val As String = InputBox(Msg.ToString, "º¯°æ", Tobj.MyText) If Val = "" Then Return Val = Val.Replace("\n", vbCrLf) Tobj.MyText = Val Me.preview_window() End Sub Private Sub cmb_controls_SelectionChangeCommitted(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmb_controls.SelectionChangeCommitted For Each A As MyControlOLEDBv2.MyLabel In Me.SelCon A.MyForeColor = Drawing.Color.Black Next SelCon.Clear() SelCon.Add(AllLabels(Me.cmb_controls.SelectedIndex).ctl) AllLabels(Me.cmb_controls.SelectedIndex).ctl.MyForeColor = Drawing.Color.DodgerBlue ViewProperty(AllLabels(Me.cmb_controls.SelectedIndex).ctl) Me.preview_window() End Sub Private Sub ToolStripButton5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) If MsgBox("ÇöÀç ½ºÅ¸ÀÏ(±âº»)À» ÀúÀåÇϽðڽÀ´Ï±î?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "½ºÅ¸ÀÏÀúÀå") = MsgBoxResult.Yes Then SAVE_STYLE() Else NOTICE("½ºÅ¸ÀÏ(±âÁ¸)ÀúÀåÀÌ Ãë¼ÒµÇ¾ú½À´Ï´Ù", Me.lb_msg) End If End Sub Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click Me.Close() End Sub Private Sub ¹®ÀÚÆÐÅÏ¿¬½À(ByVal srcstr As String, ByVal pname As String, ByVal log As String, ByVal S¶óº§() As MyControlOLEDBv2.MyLabel) Dim Wlen As Short = srcstr.Length : If Wlen <= 0 Then Return '//¾ø´Â ±Û±Í°¡ ¿ÓÀ»¶§ ÅÏÇØ¹ö¸°´Ù. Dim SepPos As Short = srcstr.IndexOf(";") Dim DR() As DataRow Dim CTLPOS() As String Dim CTLFONT() As String Dim CTLVISIBLE As Boolean DR = DtPattern.Select("NAME = '" & pname & "DESC'") If DR.GetUpperBound(0) = 0 Then '//±æÀÌÆÐÅÏÀÌ ÀÖÀ¸¸é WLog2(Auto_Log, "¹®ÀÚÆÐÅÏ °Ë»ö ±æÀÌ=" & Wlen & " ±¸ºÐÀÚÀ§Ä¡=" & SepPos & " ¹Ìµé³×ÀÓ=" & pname, log) For Each C As MyControlOLEDBv2.MyLabel In S¶óº§ Try DR = DtPattern.Select("NAME = '" & pname & C.Name & "POS'") If DR.GetUpperBound(0) = 0 Then CTLPOS = DR(0)(1).ToString.Split(",") C.Location = New Point(CTLPOS(0), CTLPOS(1)) C.Size = New Size(CTLPOS(2), CTLPOS(3)) End If DR = DtPattern.Select("NAME = '" & pname & C.Name & "FONT'") If DR.GetUpperBound(0) = 0 Then CTLFONT = DR(0)(1).ToString.Split(",") C.MyFont = New Font(CTLFONT(0), CTLFONT(1), IIf(CTLFONT(3).ToUpper = "TRUE", FontStyle.Bold, FontStyle.Regular), GraphicsUnit.Point) C.ÀåÆò = CTLFONT(5) C.Àå³ôÀÌ = CTLFONT(6) End If DR = DtPattern.Select("NAME = '" & pname & C.Name & "VISIBLE'") If DR.GetUpperBound(0) = 0 Then CTLVISIBLE = DR(0)(1).ToString C.Visible = CType(CTLVISIBLE, Boolean) End If DR = DtPattern.Select("NAME = '" & pname & C.Name & "SPACE'") If DR.GetUpperBound(0) = 0 Then C.°ø¹é = DR(0)(1).ToString End If '//¹Ýº¹Á¤º¸È®ÀÎ Arinini.Write(Pname, TOBJ.Name & "repeat", TOBJ.Repeat & "," & TOBJ.RepeatX & "," & TOBJ.RepeatY) '//¹Ýº¹Ãâ·ÂÁ¤º¸ÀúÀå AddLog(Auto_Log, "¹Ýº¹¹®ÀÚ¼ÂÆ® : " & pname & C.Name & "REPEAT" & " ¸¦ °Ë»öÇÕ´Ï´Ù") DR = DtPattern.Select("NAME = '" & pname & C.Name & "REPEAT'") If DR.GetUpperBound(0) = 0 Then AddLog(Auto_Log, "ÇØ´ç¹Ýº¹¹®ÀÚ¸¦ ã¾Ò½À´Ï´Ù") CTLFONT = DR(0)(1).ToString.Split(",") AddLog(Auto_Log, "ÇØ´ç¹Ýº¹¹®ÀÚ¸¦ ÄÞ¸¶·Î Âɰ³¾î¼­ CTLFONT ¹è¿­¿¡ ÀúÀåÇÏ¿´½À´Ï´Ù.") C.Repeat = CTLFONT(0) AddLog(Auto_Log, "ÇØ´ç¹Ýº¹¹®ÀÚÁß 0¹øÂ°À§Ä¡°ªÀ» Àû¿ë") C.RepeatX = CTLFONT(1) AddLog(Auto_Log, "ÇØ´ç¹Ýº¹¹®ÀÚÁß 1¹øÂ°À§Ä¡°ªÀ» Àû¿ë") C.RepeatY = CTLFONT(2) AddLog(Auto_Log, "ÇØ´ç¹Ýº¹¹®ÀÚÁß 2¹øÂ°À§Ä¡°ªÀ» Àû¿ë") 'C.MyFont = New Font(CTLFONT(0), CTLFONT(1), IIf(CTLFONT(3).ToUpper = "TRUE", FontStyle.Bold, FontStyle.Regular), GraphicsUnit.Point) ' C.ÀåÆò = CTLFONT(5) ' C.Àå³ôÀÌ = CTLFONT(6) Else AddLog(Auto_Log, "ÇØ´ç¹Ýº¹¹®ÀÚ¸¦ ãÁö¸øÇß½À´Ï´Ù.") End If C.Tag = "C" Catch ex As Exception WLog2(Auto_Log, "¹®ÀÚÆÐÅÏ¿À·ù ±æÀÌ=" & Wlen & " Message=" & ex.Message.ToString, log) End Try Next Else WLog2(Auto_Log, "¹®ÀÚÆÐÅϺÒÀÏÄ¡ ±æÀÌ=" & Wlen & " ¹®ÀÚ¿­=" & srcstr, log) Me.LOAD_STYLE(S¶óº§(0).DIV) End If End Sub Private Sub cmb_style_SelectionChangeCommitted(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmb_style.SelectionChangeCommitted '//½ºÅ¸ÀÏÀ» Á÷Á¢ ¼±ÅÃÇÞÀ»¶§ ±âº»idx°ªÀ» 0 À¸·ÎÇÑ´Ù. 'MsgBox("½ºÅ¸ÀÏÁ÷Á¢¼±ÅÃ") FirstIdx = 0 End Sub Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click '//°í°ü¸®±¸ 5¹ø ÀúÀå If °ü¸®±¸.Trim = "" Then MsgBox("ÀúÀåÇÒ [°ü¸®±¸]°¡ ¾ø½À´Ï´Ù", MsgBoxStyle.Critical, "È®ÀÎ") Return End If Dim msg As New System.Text.StringBuilder msg.AppendLine("°ü¸®±¸-Àü»ê¹øÈ£ ¿µ¹®ÀÚ(" & Me.°ü¸®±¸.Substring(4, 1) & " )¿¡ ´ëÇÑ ½ºÅ¸ÀÏÀ» ÀúÀåÇÕ´Ï´Ù") msg.AppendLine() msg.AppendLine("ÀúÀåÈÄ °ü¸®±¸5¹ø¿¡ µ¿ÀÏÇÑ ¿µ¹®ÀÚ°¡ ¿Ã°æ¿ì¿¡ ÀúÀåµÈ ³»¿ëÀÌ ¹Ý¿µµË´Ï´Ù") msg.AppendLine("------------------") msg.AppendLine("±Û²Ã = " & Me.S°ü¸®±¸Àü»ê¹øÈ£.MyFont.ToString) msg.AppendLine("³Êºñ = " & Me.S°ü¸®±¸Àü»ê¹øÈ£.ÀåÆò) msg.AppendLine("³ôÀÌ = " & Me.S°ü¸®±¸Àü»ê¹øÈ£.Àå³ôÀÌ) msg.AppendLine("ÁÂÇ¥ = " & Me.S°ü¸®±¸Àü»ê¹øÈ£.Location.ToString) msg.AppendLine("------------------") msg.AppendLine(" ÀúÀåÇϽðڽÀ´Ï±î?") If MsgBox(msg.ToString, MsgBoxStyle.Information + MsgBoxStyle.OkCancel, "ÀúÀåÈ®ÀÎ") <> MsgBoxResult.Ok Then NOTICE("Ãë¼ÒµÇ¾ú½À´Ï´Ù", Me.lb_msg) Return End If 'ÀÌ°Ç ±æÀÌÆÐÅÏ ÀúÀåÇÏ´Â ÇÔ¼ö´Ù. 'MsgBox(drstyle.file) Dim Arinini As New MyINI2(drstyle.file) Dim TOBJ As MyControlOLEDBv2.MyLabel = Me.S°ü¸®±¸Àü»ê¹øÈ£ Dim Pname As String = "CNUMPATTERNI" & °ü¸®±¸.Substring(4, 1) '//5¹øÀÌ W À϶§´Â cnumpatternIw ¸¦ ã°ÔµÈ´Ù. Arinini.Write(Pname, "DESC", "¿µ¹®ÀÚ Æ¯¼öÀúÀå(" & °ü¸®±¸.Substring(4, 1) & ")") Arinini.Write(Pname, TOBJ.Name & "pos", TOBJ.Left & "," & TOBJ.Top & "," & TOBJ.Width & "," & TOBJ.Height) Arinini.Write(Pname, TOBJ.Name & "font", TOBJ.MyFont.Name & "," & TOBJ.MyFont.Size & "," & TOBJ.MyFont.Underline & "," & TOBJ.MyFont.Bold & "," & TOBJ.MyFont.Italic & "," & TOBJ.ÀåÆò & "," & TOBJ.Àå³ôÀÌ) Arinini.Write(Pname, TOBJ.Name & "visible", TOBJ.Visible) Arinini.Write(Pname, TOBJ.Name & "space", TOBJ.°ø¹é) NOTICE("°ü¸®±¸5¹ø ÀÇ ¿µ¹®ÀÚ (" & Me.°ü¸®±¸.Substring(4, 1) & ") »óŸ¦ ÀúÀåÇÏ¿´½À´Ï´Ù", Me.lb_msg) µ¥ÀÌÅÍÅ×ÀÌºí°»½Å() End Sub Private Sub ToolStripTextBox1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles tb_ntype.KeyUp If e.KeyCode = Keys.Enter Then If Me.cmb_sep.SelectedIndex = 1 Then NOTICE("ºÐ¸®»óÅ¿¡¼­´Â ¹øÈ£ÁöÁ¤ÀÌ ºÒ°¡´ÉÇÕ´Ï´Ù", Drawing.Color.Red, Me.lb_msg) Else ¹øÈ£Çü½ÄÁöÁ¤(Me.tb_ntype.Text) End If Me.preview_window() End If End Sub Private Sub ToolStripLabel2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripLabel2.Click If MsgBox("ÇöÀç ½ºÅ¸ÀÏ(±âº»)À» ÀúÀåÇϽðڽÀ´Ï±î?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "½ºÅ¸ÀÏÀúÀå") = MsgBoxResult.Yes Then SAVE_STYLE() Else NOTICE("½ºÅ¸ÀÏ(±âÁ¸)ÀúÀåÀÌ Ãë¼ÒµÇ¾ú½À´Ï´Ù", Me.lb_msg) End If End Sub Private Sub tb_ntype_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles tb_ntype.MouseEnter Me.tb_ntype.Focus() Me.tb_ntype.SelectAll() End Sub Private Sub BindingNavigatorPositionItem_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles BindingNavigatorPositionItem.MouseEnter Me.BindingNavigatorPositionItem.Focus() Me.BindingNavigatorPositionItem.SelectAll() End Sub Private Sub VScrollBar1_Scroll_1(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles VScrollBar1.Scroll Debug.Print("Scroll Old:" & e.OldValue & "/ New :" & e.NewValue & "/ Current : " & Me.VScrollBar1.Value) Debug.Print("½ºÅ©·Ñ¹Ù°ª ¹üÀ§°ª " & Me.VScrollBar1.Minimum & "/" & Me.VScrollBar1.Maximum) If e.NewValue > 0 Then Me.BindingSource1.Position = e.NewValue Else Debug.Print("½ºÅ©·Ñ¹Ùvalue°ªÀÌ 0º¸´Ù ÀÛ½À´Ï´Ù. ¼Ò½ºÀÇ À§Ä¡¸¦ 0À¸·Î ¼³Á¤ÇÕ´Ï´Ù") Me.BindingSource1.Position = 0 End If End Sub Private Sub sdfnuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_prnpreview.Click Me.Print_Preview() End Sub Private Sub bt_print_ButtonClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_print.ButtonClick Me.Print() End Sub Private Sub cm_styleedit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cm_styleedit.Click StyleEdit.ListIndex = Me.cmb_style.SelectedIndex StyleEdit.Path = Me.StyleDir StyleEdit.Show() End Sub Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove 'Me.Text = e.X & "/" & e.Y If My.Computer.Keyboard.CtrlKeyDown = True AndAlso My.Computer.Keyboard.AltKeyDown = True Then '//¼±ÅÃµÈ ÄÁÆ®·ÑÀ» ¸¶¿ì½ºÀ§Ä¡·Î À̵¿ÇÑ´Ù. If SelCon Is Nothing OrElse SelCon.Count < 1 Then Exit Sub For Each sender1 As MyControlOLEDBv2.MyLabel In SelCon sender1.Left = e.X - (sender1.Width / 2) sender1.Top = e.Y + (sender1.Height / 2) Next Me.preview_window() End If End Sub Private Sub ContextMenuStrip1_Opening(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ContextMenuStrip1.Opening If Me.cmb_style.Items.Count < 1 Then Me.cm_styleedit.Enabled = False End If End Sub Private Sub tyuToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tyuToolStripMenuItem.Click SAVE_PATTERNII(Me.°ü¸®Àü»ê¹øÈ£ & "II", ÆÐÅϸí_°ü¸®Àü»ê¹øÈ£, "H", "\°ü¸®±¸Àü»êÆÐÅÏ2.TXT") '//¼±·Î¸íÀÇ ÆÐÅÏÀ» ÀúÀåÇÕ´Ï´Ù. End Sub Private Sub xxxolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles xxxolStripMenuItem.Click If MsgBox("ºñ°í1,2,3,4 ¸¦ ÀúÀåÇϽðڽÀ´Ï±î?", MsgBoxStyle.OkCancel Or MsgBoxStyle.Information, "¹®ÀÚÆÐÅÏÀúÀå") = MsgBoxResult.Ok Then If ºñ°í1 <> "" Then SAVE_PATTERNII(Me.ºñ°í1, "LNUM" & BlineNum & ÆÐÅϸí_ºñ°í1 & "II", "O", "\ºñ°í1ÆÐÅÏ2.TXT", False) '//¼±·Î¸íÀÇ ÆÐÅÏÀ» ÀúÀåÇÕ´Ï´Ù. If ºñ°í2 <> "" Then SAVE_PATTERNII(Me.ºñ°í2, "LNUM" & BlineNum & ÆÐÅϸí_ºñ°í2 & "II", "P", "\ºñ°í2ÆÐÅÏ2.TXT", False) '//¼±·Î¸íÀÇ ÆÐÅÏÀ» ÀúÀåÇÕ´Ï´Ù. If ºñ°í3 <> "" Then SAVE_PATTERNII(Me.ºñ°í3, "LNUM" & BlineNum & ÆÐÅϸí_ºñ°í3 & "II", "Q", "\ºñ°í3ÆÐÅÏ2.TXT", False) '//¼±·Î¸íÀÇ ÆÐÅÏÀ» ÀúÀåÇÕ´Ï´Ù. If ºñ°í4 <> "" Then SAVE_PATTERNII(Me.ºñ°í4, "LNUM" & BlineNum & ÆÐÅϸí_ºñ°í4 & "II", "R", "\ºñ°í4ÆÐÅÏ2.TXT", False) '//¼±·Î¸íÀÇ ÆÐÅÏÀ» ÀúÀåÇÕ´Ï´Ù. End If End Sub Private Sub olStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles olStripMenuItem.Click SAVE_PATTERNII(Me.¼±·Î¸í, ÆÐÅϸí_¼±·Î & "II", "L", "\¼±·Î¸íÆÐÅÏ2.TXT") '//¼±·Î¸íÀÇ ÆÐÅÏÀ» ÀúÀåÇÕ´Ï´Ù. End Sub Private Sub kiuStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kiuStripMenuItem.Click SAVE_PATTERNII(Me.¹øÈ£, ÆÐÅϸí_¹øÈ£ & "II", "X", "\¹øÈ£ÆÐÅÏ2.TXT") '//¼±·Î¸íÀÇ ÆÐÅÏÀ» ÀúÀåÇÕ´Ï´Ù. End Sub Private Sub Button16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button16.Click '//¼±Ãß°¡ Dim NewLine As New S_Line NewLine.PenColor = Drawing.Color.Black NewLine.PenWidth = 3 NewLine.X = Draw_Line.Count * 10 NewLine.Y = 10 NewLine.X2 = 100 + Draw_Line.Count * 10 NewLine.Y2 = NewLine.X2 Draw_Line.Add(NewLine) Refresh_Drawlist() End Sub Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click '//¼±Ãß°¡ Dim NewLine As New S_Box NewLine.PenColor = Drawing.Color.Black NewLine.PenWidth = 3 NewLine.X = Draw_Box.Count * 10 NewLine.Y = Draw_Box.Count * 10 NewLine.Width = 100 + Draw_Box.Count * 10 NewLine.Height = NewLine.Width Draw_Box.Add(NewLine) Refresh_Drawlist() End Sub Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click Dim NewLine As New S_Circle NewLine.PenColor = Drawing.Color.Black NewLine.PenWidth = 3 NewLine.X = 100 NewLine.Y = 100 NewLine.Width = 200 'NewLine.Height = 200 Draw_Circle.Add(NewLine) Refresh_Drawlist() End Sub Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click Try '//»èÁ¦ Select Case Me.ListBox1.Text.Substring(0, 1) Case "¼±" Draw_Line.RemoveAt(Me.ListBox1.Text.Split(":")(1)) Case "¹Ú" Draw_Box.RemoveAt(Me.ListBox1.Text.Split(":")(1)) Case "¿ø" Draw_Circle.RemoveAt(Me.ListBox1.Text.Split(":")(1)) Case "Q" Draw_QRcode.RemoveAt(Me.ListBox1.Text.Split(":")(1)) End Select Me.Refresh_Drawlist() Catch ex As Exception MessageBox.Show("¼±Åà ÈÄ »èÁ¦°¡ °¡´ÉÇÕ´Ï´Ù.", "È®ÀÎ", MessageBoxButtons.OK, MessageBoxIcon.Error) ListBox1.Focus() End Try End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim NewLine As New S_QRCode NewLine.X = 100 NewLine.Y = 100 NewLine.Width = 0 NewLine.Height = 0 Draw_QRcode.Add(NewLine) Refresh_Drawlist() End Sub Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged If Me.ListBox1.SelectedIndex < 0 Then Return Select Case Me.ListBox1.Text.Substring(0, 1) Case "¼±" Dim Line As S_Line = Draw_Line(Me.ListBox1.Text.Split(":")(1)) Me.bt_pencolor.BackColor = Line.PenColor Me.tb_pensize.Text = Line.PenWidth Me.tb_dx.Text = Line.X Me.tb_dy.Text = Line.Y Me.tb_dw.Text = Line.X2 Me.tb_dh.Text = Line.Y2 Case "¹Ú" Dim Line As S_Box = Draw_Box(Me.ListBox1.Text.Split(":")(1)) Me.bt_pencolor.BackColor = Line.PenColor Me.tb_pensize.Text = Line.PenWidth Me.tb_dx.Text = Line.X Me.tb_dy.Text = Line.Y Me.tb_dw.Text = Line.Width Me.tb_dh.Text = Line.Height Case "¿ø" Dim Line As S_Circle = Draw_Circle(Me.ListBox1.Text.Split(":")(1)) Me.bt_pencolor.BackColor = Line.PenColor Me.tb_pensize.Text = Line.PenWidth Me.tb_dx.Text = Line.X Me.tb_dy.Text = Line.Y Me.tb_dw.Text = Line.Width Case "Q" Dim Line As S_QRCode = Draw_QRcode(Me.ListBox1.Text.Split(":")(1)) Me.tb_dx.Text = Line.X Me.tb_dy.Text = Line.Y Me.tb_dw.Text = Line.Width Me.tb_dh.Text = Line.Height End Select End Sub Private Sub tb_pensize_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles tb_pensize.KeyDown, tb_dx.KeyDown, tb_dy.KeyDown, tb_dw.KeyDown, tb_dh.KeyDown If Me.ListBox1.SelectedIndex < 0 Then Return Dim SI As Short = Me.ListBox1.SelectedIndex If e.KeyCode = Keys.Enter Then '//»õ·Î¸¸µé¾î¼­ ÀúÀåÇÑ´Ù. Set_NewDraw() Me.Refresh_Drawlist() Me.ListBox1.SelectedIndex = SI End If End Sub Private Sub Set_NewDraw() Select Case Me.ListBox1.Text.Substring(0, 1) Case "¼±" Dim Line As New S_Line Line.PenColor = Me.bt_pencolor.BackColor Line.PenWidth = Me.tb_pensize.Text Line.X = Me.tb_dx.Text Line.Y = Me.tb_dy.Text Line.X2 = Me.tb_dw.Text Line.Y2 = Me.tb_dh.Text Draw_Line(Me.ListBox1.Text.Split(":")(1)) = Line 'MsgBox("¼±À籸¼º") Case "¹Ú" Dim Line As New S_Box Line.PenColor = Me.bt_pencolor.BackColor Line.PenWidth = Me.tb_pensize.Text Line.X = Me.tb_dx.Text Line.Y = Me.tb_dy.Text Line.Width = Me.tb_dw.Text Line.Height = Me.tb_dh.Text Draw_Box(Me.ListBox1.Text.Split(":")(1)) = Line 'MsgBox("¹Ú½ºÀ籸¼º") Case "¿ø" Dim Line As New S_Circle Line.PenColor = Me.bt_pencolor.BackColor Line.PenWidth = Me.tb_pensize.Text Line.X = Me.tb_dx.Text Line.Y = Me.tb_dy.Text Line.Width = Me.tb_dw.Text Draw_Circle(Me.ListBox1.Text.Split(":")(1)) = Line 'MsgBox("¿øÀ籸¼º") Case "Q" Dim Line As New S_QRCode Line.X = Me.tb_dx.Text Line.Y = Me.tb_dy.Text Line.Width = Me.tb_dw.Text Line.Height = Me.tb_dh.Text Draw_QRcode(Me.ListBox1.Text.Split(":")(1)) = Line End Select End Sub Private Sub bt_pencolor_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_pencolor.Click Dim CD As New ColorDialog CD.Color = Me.bt_pencolor.BackColor If CD.ShowDialog <> System.Windows.Forms.DialogResult.OK Then Return Me.bt_pencolor.BackColor = CD.Color Set_NewDraw() End Sub Private Sub SaveDrawData(ByVal read As Boolean) '//ÇöÀç È­¸é±¸¼ºÀ» °¡·Î/¼¼·Î °áÁ¤ÇÕ´Ï´Ù. '//iniÆÄÀÏ¿¡ÀúÀåÇÑ´Ù. ¼½¼Ç¸íÀº pagetype0 ,pagetyp1 0Àº ¼¼·Î 1Àº °¡·Î´Ù Dim ini As New MyINI2(drstyle.file) Dim bname As String = "DrawBox" Dim lname As String = "DrawLine" Dim cname As String = "DrawCircle" Dim qname As String = "DrawQRcode" Dim bcnt, lcnt, ccnt, qcnt As Short If read = False Then ini.Write(bname, "Count", Draw_Box.Count) For i As Short = 1 To Draw_Box.Count '//¸ðµÎµ¹¾Æ¼­ ÀúÀåÇÑ´Ù. Dim L As S_Box = Draw_Box(i - 1) ini.Write(bname, "box" & i & "pencolor", L.PenColor.ToArgb) ini.Write(bname, "box" & i & "pensize", L.PenWidth) ini.Write(bname, "box" & i & "x", L.X) ini.Write(bname, "box" & i & "y", L.Y) ini.Write(bname, "box" & i & "x2", L.Width) ini.Write(bname, "box" & i & "y2", L.Height) Next ini.Write(lname, "Count", Draw_Line.Count) For i As Short = 1 To Draw_Line.Count '//¸ðµÎµ¹¾Æ¼­ ÀúÀåÇÑ´Ù. Dim L As S_Line = Draw_Line(i - 1) ini.Write(lname, "line" & i & "pencolor", L.PenColor.ToArgb) ini.Write(lname, "line" & i & "pensize", L.PenWidth) ini.Write(lname, "line" & i & "x", L.X) ini.Write(lname, "line" & i & "y", L.Y) ini.Write(lname, "line" & i & "x2", L.X2) ini.Write(lname, "line" & i & "y2", L.Y2) Next ini.Write(cname, "Count", Draw_Circle.Count) For i As Short = 1 To Draw_Circle.Count '//¸ðµÎµ¹¾Æ¼­ ÀúÀåÇÑ´Ù. Dim L As S_Circle = Draw_Circle(i - 1) ini.Write(cname, "circle" & i & "pencolor", L.PenColor.ToArgb) ini.Write(cname, "circle" & i & "pensize", L.PenWidth) ini.Write(cname, "circle" & i & "x", L.X) ini.Write(cname, "circle" & i & "y", L.Y) ini.Write(cname, "circle" & i & "x2", L.Width) ini.Write(cname, "box" & i & "y2", L.Height) Next ini.Write(qname, "Count", Draw_QRcode.Count) For i As Short = 1 To Draw_QRcode.Count '//¸ðµÎµ¹¾Æ¼­ ÀúÀåÇÑ´Ù. Dim L As S_QRCode = Draw_QRcode(i - 1) 'ini.Write(pname, "Image" & i & "pencolor", L.PenColor.ToArgb) 'ini.Write(pname, "Image" & i & "pensize", L.PenWidth) ini.Write(qname, "qrcode" & i & "x", L.X) ini.Write(qname, "qrcode" & i & "y", L.Y) ini.Write(qname, "qrcode" & i & "x2", L.Width) ini.Write(qname, "qrcode" & i & "y2", L.Height) Next Else '//¿©±â´Â Àд ºÎºÐ Draw_Box.Clear() Draw_Line.Clear() Draw_Circle.Clear() Draw_QRcode.Clear() bcnt = ini.Read(bname, "Count", 0) For i As Short = 1 To bcnt '//¸ðµÎµ¹¾Æ¼­ ÀúÀåÇÑ´Ù. Dim L As New S_Box L.PenColor = Drawing.Color.FromArgb(ini.Read(bname, "box" & i & "pencolor", 0)) L.PenWidth = ini.Read(bname, "box" & i & "pensize", 3) L.X = ini.Read(bname, "box" & i & "x", 0) L.Y = ini.Read(bname, "box" & i & "y", 0) L.Width = ini.Read(bname, "box" & i & "x2", 10) L.Height = ini.Read(bname, "box" & i & "y2", 10) Draw_Box.Add(L) Next lcnt = ini.Read(lname, "Count", 0) For i As Short = 1 To lcnt '//¸ðµÎµ¹¾Æ¼­ ÀúÀåÇÑ´Ù. Dim L As New S_Line L.PenColor = Drawing.Color.FromArgb(ini.Read(lname, "line" & i & "pencolor", 0)) L.PenWidth = ini.Read(lname, "line" & i & "pensize", 3) L.X = ini.Read(lname, "line" & i & "x", 0) L.Y = ini.Read(lname, "line" & i & "y", 0) L.X2 = ini.Read(lname, "line" & i & "x2", 10) L.Y2 = ini.Read(lname, "line" & i & "y2", 10) Draw_Line.Add(L) Next ccnt = ini.Read(cname, "Count", 0) '//¿ø For i As Short = 1 To ccnt '//¸ðµÎµ¹¾Æ¼­ ÀúÀåÇÑ´Ù. Dim L As New S_Circle L.PenColor = Drawing.Color.FromArgb(ini.Read(cname, "circle" & i & "pencolor", 0)) L.PenWidth = ini.Read(cname, "circle" & i & "pensize", 3) L.X = ini.Read(cname, "circle" & i & "x", 0) L.Y = ini.Read(cname, "circle" & i & "y", 0) L.Width = ini.Read(cname, "circle" & i & "x2", 10) L.Height = ini.Read(cname, "circle" & i & "y2", 10) Draw_Circle.Add(L) Next qcnt = ini.Read(qname, "Count", 0) For i As Short = 1 To qcnt '//¸ðµÎµ¹¾Æ¼­ ÀúÀåÇÑ´Ù. Dim L As New S_QRCode 'L.PenColor = Color.FromArgb(ini.Read(pname, "Circle" & i & "pencolor", 0)) 'L.PenWidth = ini.Read(sname, "Circle" & i & "pensize", 3) L.X = ini.Read(qname, "qrcode" & i & "x", 0) L.Y = ini.Read(qname, "qrcode" & i & "y", 0) L.Width = ini.Read(qname, "qrcode" & i & "x2", 10) L.Height = ini.Read(qname, "qrcode" & i & "y2", 10) Draw_QRcode.Add(L) Next Me.Refresh_Drawlist() End If End Sub Private Sub Refresh_Drawlist() '//;¶óÀÎÇÏ°í ¹Ú½º¸¦ Àо ¸®½ºÆ®¹Ú½º¿¡ Me.ListBox1.Items.Clear() Dim I As Short = 0 For Each Rect As S_Line In Draw_Line Me.ListBox1.Items.Add("¼±(" & Rect.X & "," & Rect.Y & "," & Rect.X2 & "," & Rect.Y2 & "):" & I) I += 1 Next I = 0 For Each Rect As S_Box In Draw_Box Me.ListBox1.Items.Add("¹Ú½º(" & Rect.X & "," & Rect.X & "," & Rect.Width & "," & Rect.Height & "):" & I) I += 1 Next I = 0 For Each Rect As S_Circle In Draw_Circle Me.ListBox1.Items.Add("¿ø(" & Rect.X & "," & Rect.Y & "," & Rect.Width & "," & Rect.Height & "):" & I) Next I = 0 For Each Rect As S_QRCode In Draw_QRcode Me.ListBox1.Items.Add("QR(" & Rect.X & "," & Rect.Y & "," & Rect.Width & "," & Rect.Height & "):" & I) I += 1 Next I = 0 preview_window() End Sub Private Sub LinkLabel1_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked Dim a As New ColorDialog a.Color = lbQrBg.BackColor If a.ShowDialog() = System.Windows.Forms.DialogResult.OK Then lbQrBg.BackColor = a.Color End If End Sub Private Sub LinkLabel2_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel2.LinkClicked Dim a As New ColorDialog a.Color = lbQrFG.BackColor If a.ShowDialog() = System.Windows.Forms.DialogResult.OK Then lbQrFG.BackColor = a.Color End If End Sub End Class