initial commit

This commit is contained in:
Chikyun
2019-10-24 21:24:21 +09:00
commit 376f7d9de0
544 changed files with 295019 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class ArinDv
Inherits System.Windows.Forms.DataGridView
'UserControl은 Dispose를 재정의하여 구성 요소 목록을 정리합니다.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Windows Form 디자이너에 필요합니다.
Private components As System.ComponentModel.IContainer
'참고: 다음 프로시저는 Windows Form 디자이너에 필요합니다.
'수정하려면 Windows Form 디자이너를 사용하십시오.
'코드 편집기를 사용하여 수정하지 마십시오.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
components = New System.ComponentModel.Container()
' Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
End Sub
End Class

View File

@@ -0,0 +1,55 @@
Public Class ArinDv
Private Sub DataGridView1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
Select Case e.KeyCode
Case Keys.O
If e.Control Then
ExportView("c:\ExportData.txt", Me)
End If
End Select
End Sub
'//그리드뷰의 내용을 내보낸다(ArinDataView 의 일부)
Public Sub ExportView(ByVal Filename As String, ByVal Dv As DataGridView)
If Dv.RowCount < 1 Then
MsgBox("저장가능한 목록이 없습니다", MsgBoxStyle.Information, "확인")
Return
End If
Dim SD As New Windows.Forms.SaveFileDialog
'SD.InitialDirectory = My.Application.Info.DirectoryPath & "\XLSOUT"
SD.FileName = Filename
' If System.IO.Directory.Exists(SD.InitialDirectory) = False Then System.IO.Directory.CreateDirectory(SD.InitialDirectory)
SD.Filter = "탭으로 분리된 텍스트파일(*.TXT)|*.TXT|콤마로 분리된 텍스트파일(*.CSV)|*.CSV"
SD.FilterIndex = 0
SD.RestoreDirectory = True
If SD.ShowDialog <> Windows.Forms.DialogResult.OK Then Return
SaveTextfile(Dv, SD.FileName, CChar(IIf(SD.FilterIndex = 2, ",", vbTab)))
End Sub
Private Sub SaveTextfile(ByVal Dv As DataGridView, ByVal FUllFileName As String, ByVal Splitter As Char)
Dim Fs As New System.IO.FileStream(FUllFileName, IO.FileMode.Create)
Dim SW As New System.IO.StreamWriter(Fs, System.Text.Encoding.Default)
Dim Strbuf As String = ""
SW.WriteLine("====")
SW.WriteLine("파일생성일자" & vbTab & Now.ToShortDateString & vbTab & Now.ToShortTimeString)
SW.WriteLine("====")
For Each DC As Windows.Forms.DataGridViewColumn In Dv.Columns
Strbuf = Strbuf & vbTab & DC.HeaderText
Next
SW.WriteLine(Strbuf)
Strbuf = ""
For Each DR As Windows.Forms.DataGridViewRow In Dv.Rows
For i As Integer = 0 To Dv.Columns.Count - 1
Strbuf = Strbuf & Splitter & DR.Cells(i).FormattedValue.ToString
Next
SW.WriteLine(Strbuf)
Strbuf = ""
Next
SW.Dispose()
Fs.Dispose()
MsgBox("저장완료" & vbCrLf & FUllFileName, MsgBoxStyle.Information, "확인")
Shell("notepad " & FUllFileName, AppWinStyle.NormalFocus)
End Sub
End Class

View File

@@ -0,0 +1,28 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class MyCmb
Inherits System.Windows.Forms.ComboBox
'UserControl은 Dispose를 재정의하여 구성 요소 목록을 정리합니다.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Windows Form 디자이너에 필요합니다.
Private components As System.ComponentModel.IContainer
'참고: 다음 프로시저는 Windows Form 디자이너에 필요합니다.
'수정하려면 Windows Form 디자이너를 사용하십시오.
'코드 편집기를 사용하여 수정하지 마십시오.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
components = New System.ComponentModel.Container()
End Sub
End Class

View File

@@ -0,0 +1,22 @@
Public Class MyCmb
Dim NC As Control = Nothing
Private Sub MyCmb_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.Enter Then
If Me.NC Is Nothing Then
SendKeys.Send("{TAB}")
Else
NC.Focus()
End If
End If
End Sub
Public Property NectControl() As Control
Get
Return NC
End Get
Set(ByVal value As Control)
NC = value
End Set
End Property
End Class

28
ArinWarev1/UserControls/MyTb.Designer.vb generated Normal file
View File

@@ -0,0 +1,28 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class MyTb
Inherits System.Windows.Forms.TextBox
'UserControl은 Dispose를 재정의하여 구성 요소 목록을 정리합니다.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Windows Form 디자이너에 필요합니다.
Private components As System.ComponentModel.IContainer
'참고: 다음 프로시저는 Windows Form 디자이너에 필요합니다.
'수정하려면 Windows Form 디자이너를 사용하십시오.
'코드 편집기를 사용하여 수정하지 마십시오.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
components = New System.ComponentModel.Container()
End Sub
End Class

View File

@@ -0,0 +1,61 @@
Public Class MyTb
Enum ETFormat
TimeHHMM = 1
Normal = 0
End Enum
Private v_TextFormat As ETFormat = ETFormat.Normal
Property TextFormat() As ETFormat
Get
Return v_TextFormat
End Get
Set(ByVal value As ETFormat)
Me.v_TextFormat = value
End Set
End Property
Dim NC As Control = Nothing
Private Sub MyTb_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.GotFocus
Me.SelectAll()
End Sub
Private Sub MyTb_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.Enter Then
If Me.Text <> "" Then
Dim Txt As String = Me.Text
Select Case TextFormat
Case ETFormat.Normal
Case ETFormat.TimeHHMM
If Txt.IndexOf(":") = -1 Then
If IsNumeric(Txt) Then
Select Case Txt.Length
Case 1
Me.Text = "0" & Txt & ":00"
Case 2
Me.Text = Txt & ":00"
Case 3
Me.Text = Txt.Substring(0, 2) & ":" & Txt.Substring(2) & "0"
Case 4
Me.Text = Txt.Substring(0, 2) & ":" & Txt.Substring(2)
End Select
End If
End If
End Select
End If
If Me.NC Is Nothing Then
SendKeys.Send("{TAB}")
Else
NC.Focus()
End If
End If
End Sub
Public Property NectControl() As Control
Get
Return NC
End Get
Set(ByVal value As Control)
NC = value
End Set
End Property
End Class

View File

@@ -0,0 +1,29 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class YkCtl
Inherits System.Windows.Forms.UserControl
'UserControl은 Dispose를 재정의하여 구성 요소 목록을 정리합니다.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Windows Form 디자이너에 필요합니다.
Private components As System.ComponentModel.IContainer
'참고: 다음 프로시저는 Windows Form 디자이너에 필요합니다.
'수정하려면 Windows Form 디자이너를 사용하십시오.
'코드 편집기를 사용하여 수정하지 마십시오.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
components = New System.ComponentModel.Container()
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
End Sub
End Class

View File

@@ -0,0 +1,160 @@
Public Class YkCtl
Structure SM
Private vStyle As Drawing2D.HatchStyle
Private vwidth As Single, vHeight As Single
Private vFColor As Color
Private vBColor As Color
Property Style() As Drawing2D.HatchStyle
Get
Return Me.vStyle
End Get
Set(ByVal value As Drawing2D.HatchStyle)
Me.vStyle = value
End Set
End Property
Property Width() As Single
Get
Return Me.vwidth
End Get
Set(ByVal value As Single)
Me.vwidth = value
End Set
End Property
Property Height() As Single
Get
Return Me.vHeight
End Get
Set(ByVal value As Single)
Me.vHeight = value
End Set
End Property
Property FColor() As Color
Get
Return Me.vFColor
End Get
Set(ByVal value As Color)
Me.vFColor = value
End Set
End Property
Property BColor() As Color
Get
Return Me.vBColor
End Get
Set(ByVal value As Color)
Me.vBColor = value
End Set
End Property
End Structure
Dim vMFilltype(0) As SM
Dim vVertical As Boolean = True
Dim vMaxWidth As Single = Me.Width '//총너비
Property MaxSize() As Single
Get
Return (vMaxWidth)
End Get
Set(ByVal value As Single)
Me.vMaxWidth = value
Me.Refresh()
End Set
End Property
Property Vertical() As Boolean '//그림이 세로형태?
Get
Return (vVertical)
End Get
Set(ByVal value As Boolean)
Me.vVertical = value
Me.Refresh()
' MsgBox(value)
End Set
End Property
Property M1FillType() As SM()
Get
Return (Me.vMFilltype)
End Get
Set(ByVal value As SM())
Me.vMFilltype = value
Me.Refresh()
' MsgBox("sdf")
End Set
End Property
Private Sub UserControl1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
If Me.vMFilltype Is Nothing OrElse Me.MaxSize <= 0 Then Return
Dim G As Graphics = e.Graphics
Dim Rect As Rectangle
Dim W As Single
' If Me.MaxWidth <> 0 Then
For i As Integer = 0 To Me.M1FillType.GetUpperBound(0) '//갯수만큼 돈다
'//해당 사각형의 Rectangle 을 생성
If i = 0 Then
If Me.Vertical Then
W = Me.Width / Me.MaxSize * Me.M1FillType(i).Width
Rect = New Rectangle(0, 5, W, Me.Height - 10)
Else
W = Me.Height / Me.MaxSize * Me.M1FillType(i).Width
Rect = New Rectangle(5, 0, Me.Width - 10, W)
End If
Else
If Me.Vertical Then
W = Me.Width / Me.MaxSize * Me.M1FillType(i).Width
Rect = New Rectangle(GetWidth(i), 5, W, Me.Height - 10)
Else
W = Me.Height / Me.MaxSize * Me.M1FillType(i).Width
Rect = New Rectangle(5, GetWidth(i), Me.Width - 10, W)
End If
End If
Try
Dim B As New System.Drawing.Drawing2D.HatchBrush(Me.M1FillType(i).Style, Me.M1FillType(i).FColor, Me.M1FillType(i).BColor)
G.FillRectangle(B, Rect)
Catch ex As Exception
End Try
Next
For i As Integer = 0 To Me.M1FillType.GetUpperBound(0) '//갯수만큼 돈다
If Vertical Then
If i = 0 Then
W = Me.Width / Me.MaxSize * Me.M1FillType(i).Width
Rect = New Rectangle(0, 5, W, Me.Height - 10)
Else
W = Me.Width / Me.MaxSize * Me.M1FillType(i).Width
Rect = New Rectangle(GetWidth(i), 5, W, Me.Height - 10)
End If
If i <> 0 Then ' AndAlso i <> Me.M1FillType.GetUpperBound(0) Then
G.DrawLine(New Pen(Color.Black), Rect.X, 5, Rect.X, Me.Height - 5)
End If
Else
If i = 0 Then
W = Me.Height / Me.MaxSize * Me.M1FillType(i).Width
Rect = New Rectangle(5, 0, Me.Width - 10, W)
Else
W = Me.Height / Me.MaxSize * Me.M1FillType(i).Width
Rect = New Rectangle(5, GetWidth(i), Me.Width - 10, W)
End If
If i <> 0 Then 'AndAlso i <> Me.M1FillType.GetUpperBound(0) Then
G.DrawLine(New Pen(Color.Black), 5, Rect.Y, Me.Width - 5, Rect.Y)
End If
End If
Next
G.DrawRectangle(New Pen(Color.Black), New Rectangle(0, 0, Me.Width - 2, Me.Height - 2))
G.Dispose()
End Sub
Private Function GetWidth(ByVal idx As Integer) As Single
Dim Retval As Single = 0
For i As Integer = 0 To idx - 1
Retval += IIf(Me.Vertical = True, Me.Width, Me.Height) / Me.MaxSize * Me.M1FillType(i).Width
Next
Return Retval
End Function
End Class