Skip to content
This repository was archived by the owner on Mar 9, 2024. It is now read-only.

Commit 96f62e1

Browse files
authored
v2.1 Update
1 parent 45b2b7c commit 96f62e1

34 files changed

+624
-613
lines changed

EBSOCStatus/EBSOCStatus/EBSOCStatus.vbproj

+7-4
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<ApplicationManifest>My Project\app.manifest</ApplicationManifest>
6666
</PropertyGroup>
6767
<PropertyGroup>
68-
<ApplicationIcon>icon.ico</ApplicationIcon>
68+
<ApplicationIcon>icon2.ico</ApplicationIcon>
6969
</PropertyGroup>
7070
<ItemGroup>
7171
<Reference Include="System" />
@@ -130,9 +130,9 @@
130130
</EmbeddedResource>
131131
<EmbeddedResource Include="My Project\Resources.resx">
132132
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
133-
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
134133
<CustomToolNamespace>My.Resources</CustomToolNamespace>
135134
<SubType>Designer</SubType>
135+
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
136136
</EmbeddedResource>
137137
<EmbeddedResource Include="SearchCode.resx">
138138
<DependentUpon>SearchCode.vb</DependentUpon>
@@ -150,6 +150,7 @@
150150
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
151151
</None>
152152
<None Include="App.config" />
153+
<None Include="Resources\icon2.png" />
153154
</ItemGroup>
154155
<ItemGroup>
155156
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
@@ -165,8 +166,10 @@
165166
</ItemGroup>
166167
<ItemGroup>
167168
<Content Include="icon.ico" />
168-
<None Include="Resources\icon.ico" />
169-
<None Include="Resources\icon.png" />
169+
<Content Include="icon2.ico" />
170+
<None Include="Resources\icon3.png" />
171+
<None Include="Resources\icon21.png" />
170172
</ItemGroup>
173+
<ItemGroup />
171174
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
172175
</Project>

EBSOCStatus/EBSOCStatus/Form1.Designer.vb

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

EBSOCStatus/EBSOCStatus/Form1.resx

+281-283
Large diffs are not rendered by default.

EBSOCStatus/EBSOCStatus/Form1.vb

+41-29
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Public Class Form1
44
Public U1, UrlList(), First, SAML0, SAML1, Shost, MainH, LType As String
55
Dim nowVersion As String
66
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
7-
nowVersion = "2.00.0" '버전 가운데는 두자리로!
7+
nowVersion = "2.01.0" '버전 가운데는 두자리로!
88
lrnType.Text = "학습중"
99
LType = "LRN"
1010
CheckUpdate(nowVersion)
@@ -13,6 +13,11 @@ Public Class Form1
1313
IDSaveBox.Checked = My.Settings.IDSave
1414
Shost = "hoc30" '임시방편
1515

16+
StatusList.Enabled = False
17+
ClassList.Enabled = False
18+
startNokori.Enabled = False
19+
lrnType.Enabled = False
20+
1621
http = CreateObject("WinHttp.WinHttpRequest.5.1")
1722
http.Open("GET", "https://ebssw.kr/sso/loginView.do?loginType=onlineClass")
1823
'http.Send("c=LI&SAMLRequest=PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c2FtbDJwOkF1dGhuUmVxdWVzdCAgICB4bWxuczpzYW1sMnA9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDpwcm90b2NvbCIgICAgICAgIElEPSJob2MyNC5lYnNzdy5rci0xNTg2OTY0MDcxNjUxIiAgICAgICAgVmVyc2lvbj0iMi4wIiAgICAgICAgSXNzdWVJbnN0YW50PSIyMDIwLTA0LTE1VDE1OjIxOjExLjY1MVoiICAgICAgICBBc3NlcnRpb25Db25zdW1lclNlcnZpY2VVUkw9Imh0dHBzOi8vaG9jMjQuZWJzc3cua3Ivc3NvIiAgICAgICAgRGVzdGluYXRpb249Imh0dHBzOi8vc3NvLmVicy5jby5rci9pZHAvcHJvZmlsZS9TQU1MMi9QT1NULVJlZGlyZWN0L1NTTyI+PHNhbWwyOklzc3VlciB4bWxuczpzYW1sMj0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOmFzc2VydGlvbiI+aG9jMjQuZWJzc3cua3I8L3NhbWwyOklzc3Vlcj48L3NhbWwycDpBdXRoblJlcXVlc3Q+&j_returnurl=https%3A%2F%2Fhoc.ebssw.kr%2FonlineClass%2Freqst%2FonlineClassReqstInfoView.do&j_loginurl=https%3A%2F%2Fhoc24.ebssw.kr%2Fsso%2FloginView.do&hmpgId=&userSeCode=&loginType=onlineClass")
@@ -132,7 +137,7 @@ Public Class Form1
132137
Next i
133138
Call CallNokori() '자동 새로고침
134139
Catch ex As Exception
135-
MsgBox("불러오기에 실패했습니다.")
140+
MsgBox("불러오는 중 오류가 발생했습니다.")
136141
End Try
137142
End Sub
138143

@@ -151,9 +156,11 @@ Public Class Form1
151156

152157
Private Sub CallNokori()
153158
'진행중인 강의와 진도율 조회
154-
Dim html, html2, MyUrl, Cutting, Lname(), Cutting2, NowUrl, ClassName, Ltotal(), Lend() As String
159+
Dim html, html2, MyUrl, Cutting, Lname(), NowUrl, ClassName, Lend(), Ltotal, Lcontext() As String
155160
Dim Lcount, Ltot As String
156-
startNokori.Enabled = False
161+
162+
startNokori.Enabled = False '새로고침 비활성화
163+
lrnType.Enabled = False '콤보박스 비활성화
157164
UrlList = Split(U1, "|") 'URL을 리스트로 정렬
158165
StatusList.Items.Clear() '리스트 초기화
159166

@@ -178,36 +185,32 @@ Public Class Form1
178185
'Console.WriteLine("<------------------------>" & vbCrLf & html2)
179186
Cutting = Split(html2, "list al")(1)
180187

181-
If InStr(Cutting, "학습중인 강좌가 없습니다.") Then
188+
If InStr(Cutting, "강좌가 없습니다.") Then
182189
'넘어가욧!
183190
Else
184-
'Console.WriteLine(Cutting)
191+
'Console.WriteLine(Cutting)
185192
Lname = Split(Cutting, "tit bold") 'for문에서 i가 추가되면 새롭게 string을 찾음
186-
Cutting2 = Split(Split(Cutting, "ico_way clearfix")(1), "</div>")(0)
193+
Lcontext = Split(Cutting, "tit bold")
194+
187195
For i2 = 1 To UBound(Lname)
188-
Lcount = 0
189-
Ltot = 0
190196
Lname(i2) = Split(Split(Lname(i2), "tit_txt"">")(1), "</span>")(0).Replace(vbTab, "") '강의 제목
197+
Lcontext(i2) = Split(Split(Lcontext(i2), "class=""way""")(1), "</div>")(0) '목차 부분만 따오기
198+
Lend = Split(Lcontext(i2), "<a href") 'a 부분 반복 ㄱㄱ
191199

192-
Ltotal = Split(Cutting2, "<a")
193-
Lend = Split(Cutting2, "<a")
194-
195-
For i3 = 1 To UBound(Ltotal) 'end 검출
196-
'Console.WriteLine("<------------------------>" & vbCrLf & Ltotal(i3))
197-
Ltotal(i3) = Split(Split(Ltotal(i3), "hr")(1), "javascript")(0)
198-
Lend(i3) = Split(Split(Lend(i3), "class")(1), ">")(0)
200+
'Console.WriteLine("<------------------------>" & vbCrLf & Lcontext(i2)) '강의 당 목차 파싱 출력
199201

200-
If InStr(Ltotal(i3), "ef") Then
201-
Ltot = Ltot + 1
202-
End If
203-
If InStr(Lend(i3), "end") Then 'class="end">
204-
Lcount = Lcount + 1
202+
Lcount = 0
203+
Ltot = 0 '카운트 초기화
204+
For i4 = 1 To UBound(Lend) 'end 검출
205+
Lend(i4) = Split(Split(Lend(i4), "class=")(1), ">")(0) '강의 목차 추출
206+
If InStr(Lend(i4), "end") Then 'class="end">
207+
Lcount = Lcount + 1 '완료 카운트 계산
205208
End If
206-
207-
Next i3
208-
Application.DoEvents()
209-
210-
Dim totalPer As Double = Lcount / Ltot * 100
209+
Next i4
210+
Ltotal = UBound(Lend)
211+
'Application.DoEvents()
212+
'Console.WriteLine("<--" & Lname(i2) & ": " & Lcount & "/" & UBound(Lend))
213+
Dim totalPer As Double = Lcount / Ltotal * 100
211214
Dim strPer As String = Int32.Parse(Math.Truncate(totalPer).ToString()) & "%"
212215

213216
' MsgBox(strPer)
@@ -218,11 +221,15 @@ Public Class Form1
218221
CListDesu.SubItems.Add(Lname(i2)) '진도 이름
219222
CListDesu.SubItems.Add(strPer) '진도율
220223
Application.DoEvents()
224+
Lcount = 0
225+
Ltot = 0 '카운트 초기화
221226
Next i2
222227
End If
223228
Application.DoEvents()
224229
Next i
230+
'로딩완료 이후
225231
startNokori.Enabled = True '새로고침 버튼 활성화
232+
lrnType.Enabled = True '콤보박스 활성화
226233
End Sub
227234
Private Sub IDSaveBox_CheckedChanged(sender As Object, e As EventArgs) Handles IDSaveBox.CheckedChanged
228235
'아이디저장 체크시 상태저장 ㄱㄱ
@@ -231,12 +238,12 @@ Public Class Form1
231238
Call IDSaving()
232239
End Sub
233240
Private Sub SCodeFind_Click(sender As Object, e As EventArgs) Handles SCodeFind.Click
234-
SearchCode.Show()
241+
SearchCode.Show() '학교검색 폼 실행
235242
'System.Diagnostics.Process.Start("https://github.com/devITae/EBSOCProgressViewer#11-%ED%95%99%EA%B5%90%EC%BD%94%EB%93%9C-%EC%B0%BE%EA%B8%B0")
236243
End Sub
237244

238245
Private Sub LinkLabel1_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
239-
System.Diagnostics.Process.Start("https://github.com/devITae/EBSOCProgressViewer")
246+
System.Diagnostics.Process.Start("https://github.com/devITae/EBSOCProgressViewer") '깃허브 이동
240247
End Sub
241248

242249
Private Sub startNokori_Click(sender As Object, e As EventArgs) Handles startNokori.Click
@@ -254,7 +261,8 @@ Public Class Form1
254261
End If
255262
End Sub
256263
Public Sub CheckUpdate(nowVer As String)
257-
Dim HTML, lastest, upLink, IU As String
264+
'업데이트 확인
265+
Dim HTML, lastest, upLink, IU, notice As String
258266
http2 = CreateObject("WinHttp.WinHttpRequest.5.1")
259267
http2.Open("GET", "https://github.com/devITae/EBSOCProgressViewer/blob/master/img/version")
260268
http2.Send()
@@ -265,6 +273,10 @@ Public Class Form1
265273

266274
If lastest = nowVer Then
267275
'최신버전
276+
If InStr(HTML, "공지사항있음") Then
277+
notice = Split(Split(HTML, "NotiMent(")(1), ")")(0)
278+
MsgBox(notice, MsgBoxStyle.Exclamation, "공지사항")
279+
End If
268280
ElseIf lastest > nowVersion Then
269281
'업데이트 알림
270282
IU = MsgBox("새로운 버전이 감지되었습니다!" & vbCrLf & "지금 업데이트 하시겠습니까?", vbYesNo)

EBSOCStatus/EBSOCStatus/My Project/AssemblyInfo.vb

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
3131
' 지정되도록 할 수 있습니다.
3232
' <Assembly: AssemblyVersion("1.0.*")>
3333

34-
<Assembly: AssemblyVersion("2.0.0.0")>
35-
<Assembly: AssemblyFileVersion("2.0.0.0")>
34+
<Assembly: AssemblyVersion("2.1.0.0")>
35+
<Assembly: AssemblyFileVersion("2.1.0.0")>

EBSOCStatus/EBSOCStatus/My Project/Resources.Designer.vb

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

EBSOCStatus/EBSOCStatus/My Project/Resources.resx

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120120
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
121-
<data name="icon1" type="System.Resources.ResXFileRef, System.Windows.Forms">
122-
<value>..\Resources\icon.ico;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
121+
<data name="icon3" type="System.Resources.ResXFileRef, System.Windows.Forms">
122+
<value>..\Resources\icon3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
123123
</data>
124124
</root>
8.94 KB
Loading

0 commit comments

Comments
 (0)