WorldCup 을 보던 중에 패스 성공율에 대해 보여주는 화면이 나오더라고요...
패스 하는 걸 일일이 카운팅하는 사람들이 있을텐데
이건 그런 패스 카운팅하는 사람들이 쓸 것 같은? 어플입니다. ^^

그냥 TV 만 보느니 한번 만들어 볼까 해서 만들어봤습니다.



그냥 기본적인 문법을 사용한 거라서요...
뭐 건져가실 건 없을 겁니다.

^^'
다음번엔 패스 퍼센티지를 만들어 볼까? ㅋㅋㅋ

대~~애 한민국 짝!짝!~짝!~짝!짝!

필승입니다.

행복한 고수되셔요...

woojja ))*
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

깜빡잊고 실행파일과 소스를 안올렸네요... ㅋㅋ 필요는 없으시겠지만... ^^;
아르헨티나 경기 합니다.
오늘 필승입니다.

대애~~한 민국 짝짝짝짝짝... ^^

    1 Public Class frmCounter

    2 

    3     Dim ActionStack As Stack(Of String)

    4 

    5     Public Sub New()

    6 

    7         ' This call is required by the designer.

    8         InitializeComponent()

    9 

   10         ' Add any initialization after the InitializeComponent() call.

   11         ActionStack = New Stack(Of String)

   12 

   13     End Sub

   14 

   15     Private Sub Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pbBPassFore.Click, pbBPassCross.Click, pbBPassError.Click, pbBCancel.Click, pbRPassFore.Click, pbRPassCross.Click, pbRPassError.Click, pbRCancel.Click

   16         Dim pb As PictureBox = CType(sender, PictureBox)

   17         Dim buttonName As String = pb.Name

   18         Select Case buttonName

   19             Case "pbBPassFore"

   20                 nupBFore.UpButton()

   21             Case "pbBPassCross"

   22                 nupBCross.UpButton()

   23             Case "pbBPassError"

   24                 nupBError.UpButton()

   25             Case "pbRPassFore"

   26                 nupRFore.UpButton()

   27             Case "pbRPassCross"

   28                 nupRCross.UpButton()

   29             Case "pbRPassError"

   30                 nupRError.UpButton()

   31             Case "pbRCancel"

   32                 'VB 에는break나 Continue 문이 없는 관계로 ^^'

   33                 CancelCount()

   34             Case "pbBCancel"

   35                 CancelCount()

   36         End Select

   37 

   38         If Not (String.Equals(buttonName, "pbRCancel") Or String.Equals(buttonName, "pbBCancel")) Then

   39             ActionStack.Push(buttonName)

   40         End If

   41 

   42     End Sub

   43 

   44     Private Sub CancelCount()

   45         If ActionStack.Count < 1 Then

   46             Return

   47         End If

   48         Dim buttonName As String = ActionStack.Pop()

   49         Select Case buttonName

   50             Case "pbBPassFore"

   51                 nupBFore.DownButton()

   52             Case "pbBPassCross"

   53                 nupBCross.DownButton()

   54             Case "pbBPassError"

   55                 nupBError.DownButton()

   56             Case "pbRPassFore"

   57                 nupRFore.DownButton()

   58             Case "pbRPassCross"

   59                 nupRCross.DownButton()

   60             Case "pbRPassError"

   61                 nupRError.DownButton()

   62         End Select

   63     End Sub

   64 

   65 End Class

   66 

   67 



반응형

+ Recent posts