• R/O
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javaandroidc++linuxc#objective-ccocoa誰得qtrubybathyscaphegamephpguicwindows翻訳pythonomegattwitterframeworkbtronarduinovb.net計画中(planning stage)directxpreviewertestゲームエンジンdom

将棋ウォーズ棋譜を検索条件を指定して一括でダウンロードする。


コミットメタ情報

リビジョン2 (tree)
日時2015-01-25 20:59:23
作者bellyoshi

ログメッセージ

変更サマリ

差分

--- ShogiWarsKifuDownloader/ShogiWarsKifuDownloader/My Project/Settings.Designer.vb (revision 1)
+++ ShogiWarsKifuDownloader/ShogiWarsKifuDownloader/My Project/Settings.Designer.vb (revision 2)
@@ -1,10 +1,10 @@
11 '------------------------------------------------------------------------------
22 ' <auto-generated>
3-' This code was generated by a tool.
4-' Runtime Version:4.0.30319.18444
3+' このコードはツールによって生成されました。
4+' ランタイム バージョン:4.0.30319.18444
55 '
6-' Changes to this file may cause incorrect behavior and will be lost if
7-' the code is regenerated.
6+' このファイルへの変更は、以下の状況下で不正な動作の原因になったり、
7+' コードが再生成されるときに損失したりします。
88 ' </auto-generated>
99 '------------------------------------------------------------------------------
1010
@@ -13,42 +13,42 @@
1313
1414
1515 Namespace My
16-
17- <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
18- Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0"), _
19- Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
16+
17+ <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
18+ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0"), _
19+ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
2020 Partial Friend NotInheritable Class MySettings
2121 Inherits Global.System.Configuration.ApplicationSettingsBase
22-
23- Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
24-
25-#Region "My.Settings Auto-Save Functionality"
22+
23+ Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
24+
25+#Region "My.Settings 自動保存機能"
2626 #If _MyType = "WindowsForms" Then
27- Private Shared addedHandler As Boolean
27+ Private Shared addedHandler As Boolean
2828
29- Private Shared addedHandlerLockObject As New Object
29+ Private Shared addedHandlerLockObject As New Object
3030
31- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
32- Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
33- If My.Application.SaveMySettingsOnExit Then
34- My.Settings.Save()
35- End If
36- End Sub
31+ <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
32+ Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
33+ If My.Application.SaveMySettingsOnExit Then
34+ My.Settings.Save()
35+ End If
36+ End Sub
3737 #End If
3838 #End Region
39-
39+
4040 Public Shared ReadOnly Property [Default]() As MySettings
4141 Get
42-
42+
4343 #If _MyType = "WindowsForms" Then
44- If Not addedHandler Then
45- SyncLock addedHandlerLockObject
46- If Not addedHandler Then
47- AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
48- addedHandler = True
49- End If
50- End SyncLock
51- End If
44+ If Not addedHandler Then
45+ SyncLock addedHandlerLockObject
46+ If Not addedHandler Then
47+ AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
48+ addedHandler = True
49+ End If
50+ End SyncLock
51+ End If
5252 #End If
5353 Return defaultInstance
5454 End Get
--- ShogiWarsKifuDownloader/ShogiWarsKifuDownloader/My Project/app.manifest (nonexistent)
+++ ShogiWarsKifuDownloader/ShogiWarsKifuDownloader/My Project/app.manifest (revision 2)
@@ -0,0 +1,48 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3+ <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
4+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
5+ <security>
6+ <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
7+ <!-- UAC マニフェスト オプション
8+ Windows のユーザー アカウント制御のレベルを変更するには、
9+ requestedExecutionLevel ノードを以下のいずれかで置換します。
10+
11+ <requestedExecutionLevel level="asInvoker" uiAccess="false" />
12+ <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
13+ <requestedExecutionLevel level="highestAvailable" uiAccess="false" />
14+
15+ requestedExecutionLevel ノードを指定すると、ファイルおよびレジストリの仮想化は無効になります。
16+ 旧バージョンとの互換性のためにファイルおよびレジストリの仮想化を
17+ 使用する場合は、requestedExecutionLevel ノードを削除します。
18+ -->
19+ <requestedExecutionLevel level="asInvoker" uiAccess="false" />
20+ </requestedPrivileges>
21+ </security>
22+ </trustInfo>
23+
24+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
25+ <application>
26+ <!-- このアプリケーションが動作するように設計されている、Windows のすべてのバージョンの一覧。Windows によって、最も互換性の高い環境が自動的に選択されます。-->
27+
28+ <!-- アプリケーションが Windows 7 で動作するように設計されている場合は、次の supportedOS ノードのコメントを解除してください-->
29+ <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->
30+
31+ </application>
32+ </compatibility>
33+
34+ <!-- Windows コモン コントロールおよびダイアログのテーマを有効にします (Windows XP 以降) -->
35+ <!-- <dependency>
36+ <dependentAssembly>
37+ <assemblyIdentity
38+ type="win32"
39+ name="Microsoft.Windows.Common-Controls"
40+ version="6.0.0.0"
41+ processorArchitecture="*"
42+ publicKeyToken="6595b64144ccf1df"
43+ language="*"
44+ />
45+ </dependentAssembly>
46+ </dependency>-->
47+
48+</asmv1:assembly>
--- ShogiWarsKifuDownloader/ShogiWarsKifuDownloader/My Project/Application.Designer.vb (revision 1)
+++ ShogiWarsKifuDownloader/ShogiWarsKifuDownloader/My Project/Application.Designer.vb (revision 2)
@@ -1,10 +1,10 @@
11 '------------------------------------------------------------------------------
22 ' <auto-generated>
3-' This code was generated by a tool.
4-' Runtime Version:4.0.30319.18444
3+' このコードはツールによって生成されました。
4+' ランタイム バージョン:4.0.30319.18444
55 '
6-' Changes to this file may cause incorrect behavior and will be lost if
7-' the code is regenerated.
6+' このファイルへの変更は、以下の状況下で不正な動作の原因になったり、
7+' コードが再生成されるときに損失したりします。
88 ' </auto-generated>
99 '------------------------------------------------------------------------------
1010
@@ -14,10 +14,10 @@
1414
1515 Namespace My
1616
17- 'NOTE: This file is auto-generated; do not modify it directly. To make changes,
18- ' or if you encounter build errors in this file, go to the Project Designer
19- ' (go to Project Properties or double-click the My Project node in
20- ' Solution Explorer), and make changes on the Application tab.
17+ 'メモ: このファイルは自動生成されました。直接変更しないでください。変更したり、
18+ ' ビルド エラーが発生した場合は、プロジェクト デザイナー へ移動し (プロジェクト
19+ ' プロパティに移動するか、またはソリューション エクスプローラーのマイ プロジェクト
20+ ' ノード上でダブルクリック)、アプリケーション タブ上で変更を行います。
2121 '
2222 Partial Friend Class MyApplication
2323
--- ShogiWarsKifuDownloader/ShogiWarsKifuDownloader/My Project/Resources.Designer.vb (revision 1)
+++ ShogiWarsKifuDownloader/ShogiWarsKifuDownloader/My Project/Resources.Designer.vb (revision 2)
@@ -1,10 +1,10 @@
11 '------------------------------------------------------------------------------
22 ' <auto-generated>
3-' This code was generated by a tool.
4-' Runtime Version:4.0.30319.18444
3+' このコードはツールによって生成されました。
4+' ランタイム バージョン:4.0.30319.18444
55 '
6-' Changes to this file may cause incorrect behavior and will be lost if
7-' the code is regenerated.
6+' このファイルへの変更は、以下の状況下で不正な動作の原因になったり、
7+' コードが再生成されるときに損失したりします。
88 ' </auto-generated>
99 '------------------------------------------------------------------------------
1010
@@ -11,30 +11,31 @@
1111 Option Strict On
1212 Option Explicit On
1313
14+Imports System
1415
1516 Namespace My.Resources
1617
17- 'This class was auto-generated by the StronglyTypedResourceBuilder
18- 'class via a tool like ResGen or Visual Studio.
19- 'To add or remove a member, edit your .ResX file then rerun ResGen
20- 'with the /str option, or rebuild your VS project.
18+ 'このクラスは StronglyTypedResourceBuilder クラスが ResGen
19+ 'または Visual Studio のようなツールを使用して自動生成されました。
20+ 'メンバーを追加または削除するには、.ResX ファイルを編集して、/str オプションと共に
21+ 'ResGen を実行し直すか、または VS プロジェクトをビルドし直します。
2122 '''<summary>
22- ''' A strongly-typed resource class, for looking up localized strings, etc.
23+ ''' ローカライズされた文字列などを検索するための、厳密に型指定されたリソース クラスです。
2324 '''</summary>
24- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
25- Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
26- Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
27- Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
25+ <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
26+ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
27+ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
28+ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
2829 Friend Module Resources
29-
30+
3031 Private resourceMan As Global.System.Resources.ResourceManager
31-
32+
3233 Private resourceCulture As Global.System.Globalization.CultureInfo
33-
34+
3435 '''<summary>
35- ''' Returns the cached ResourceManager instance used by this class.
36+ ''' このクラスで使用されているキャッシュされた ResourceManager インスタンスを返します。
3637 '''</summary>
37- <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
38+ <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
3839 Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
3940 Get
4041 If Object.ReferenceEquals(resourceMan, Nothing) Then
@@ -44,17 +45,17 @@
4445 Return resourceMan
4546 End Get
4647 End Property
47-
48+
4849 '''<summary>
49- ''' Overrides the current thread's CurrentUICulture property for all
50- ''' resource lookups using this strongly typed resource class.
50+ ''' 厳密に型指定されたこのリソース クラスを使用して、すべての検索リソースに対し、
51+ ''' 現在のスレッドの CurrentUICulture プロパティをオーバーライドします。
5152 '''</summary>
52- <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
53+ <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
5354 Friend Property Culture() As Global.System.Globalization.CultureInfo
5455 Get
5556 Return resourceCulture
5657 End Get
57- Set(ByVal value As Global.System.Globalization.CultureInfo)
58+ Set
5859 resourceCulture = value
5960 End Set
6061 End Property
--- ShogiWarsKifuDownloader/ShogiWarsKifuDownloader/HttpPostUtl.vb (nonexistent)
+++ ShogiWarsKifuDownloader/ShogiWarsKifuDownloader/HttpPostUtl.vb (revision 2)
@@ -0,0 +1,38 @@
1+Imports System.IO
2+Imports System.Net
3+Imports System.Text
4+Imports System.Collections
5+
6+Public Class HttpPostUtl
7+ Shared Function HttpPost(url As String, vals As Hashtable, cc As CookieContainer, encoder As Encoding) As String
8+ Dim param As String = ""
9+ For Each k As String In vals.Keys
10+ param += String.Format("{0}={1}&", k, vals(k))
11+ Next
12+ Dim data As Byte() = Encoding.ASCII.GetBytes(param)
13+
14+ ' リクエストの作成
15+ Dim req As HttpWebRequest _
16+ = CType(WebRequest.Create(url), HttpWebRequest)
17+ req.Method = "POST"
18+ req.ContentType = "application/x-www-form-urlencoded"
19+ req.ContentLength = data.Length
20+ req.CookieContainer = cc
21+
22+ ' ポスト・データの書き込み
23+ Dim reqStream As Stream = req.GetRequestStream()
24+ reqStream.Write(data, 0, data.Length)
25+ reqStream.Close()
26+
27+ Dim res As WebResponse = req.GetResponse()
28+
29+ ' レスポンスの読み取り
30+ Dim resStream As Stream = res.GetResponseStream()
31+ Dim sr As StreamReader = New StreamReader(resStream, encoder)
32+ Dim result As String = sr.ReadToEnd()
33+ sr.Close()
34+ resStream.Close()
35+
36+ Return result
37+ End Function
38+End Class
--- ShogiWarsKifuDownloader/ShogiWarsKifuDownloader/frmCondtion.Designer.vb (revision 1)
+++ ShogiWarsKifuDownloader/ShogiWarsKifuDownloader/frmCondtion.Designer.vb (revision 2)
@@ -28,12 +28,13 @@
2828 Me.rbAnimal = New System.Windows.Forms.RadioButton()
2929 Me.GroupBox1 = New System.Windows.Forms.GroupBox()
3030 Me.Label1 = New System.Windows.Forms.Label()
31- Me.TextBox1 = New System.Windows.Forms.TextBox()
32- Me.TextBox2 = New System.Windows.Forms.TextBox()
31+ Me.txtName1 = New System.Windows.Forms.TextBox()
32+ Me.txtName2 = New System.Windows.Forms.TextBox()
3333 Me.Label2 = New System.Windows.Forms.Label()
34- Me.TextBox3 = New System.Windows.Forms.TextBox()
34+ Me.txtSaveDirectory = New System.Windows.Forms.TextBox()
3535 Me.btnSelectDirectory = New System.Windows.Forms.Button()
3636 Me.btnDownload = New System.Windows.Forms.Button()
37+ Me.txtDebug = New System.Windows.Forms.TextBox()
3738 Me.GroupBox1.SuspendLayout()
3839 Me.SuspendLayout()
3940 '
@@ -51,7 +52,8 @@
5152 'rb3min
5253 '
5354 Me.rb3min.AutoSize = True
54- Me.rb3min.Location = New System.Drawing.Point(185, 18)
55+ Me.rb3min.Checked = True
56+ Me.rb3min.Location = New System.Drawing.Point(108, 18)
5557 Me.rb3min.Name = "rb3min"
5658 Me.rb3min.Size = New System.Drawing.Size(86, 16)
5759 Me.rb3min.TabIndex = 0
@@ -62,11 +64,10 @@
6264 'rb10sec
6365 '
6466 Me.rb10sec.AutoSize = True
65- Me.rb10sec.Location = New System.Drawing.Point(108, 18)
67+ Me.rb10sec.Location = New System.Drawing.Point(200, 18)
6668 Me.rb10sec.Name = "rb10sec"
6769 Me.rb10sec.Size = New System.Drawing.Size(71, 16)
6870 Me.rb10sec.TabIndex = 0
69- Me.rb10sec.TabStop = True
7071 Me.rb10sec.Text = "10秒将棋"
7172 Me.rb10sec.UseVisualStyleBackColor = True
7273 '
@@ -102,19 +103,20 @@
102103 Me.Label1.TabIndex = 2
103104 Me.Label1.Text = "vs"
104105 '
105- 'TextBox1
106+ 'txtName1
106107 '
107- Me.TextBox1.Location = New System.Drawing.Point(12, 26)
108- Me.TextBox1.Name = "TextBox1"
109- Me.TextBox1.Size = New System.Drawing.Size(129, 19)
110- Me.TextBox1.TabIndex = 3
108+ Me.txtName1.Location = New System.Drawing.Point(12, 26)
109+ Me.txtName1.Name = "txtName1"
110+ Me.txtName1.Size = New System.Drawing.Size(129, 19)
111+ Me.txtName1.TabIndex = 3
112+ Me.txtName1.Text = "yoshi55_wata"
111113 '
112- 'TextBox2
114+ 'txtName2
113115 '
114- Me.TextBox2.Location = New System.Drawing.Point(170, 26)
115- Me.TextBox2.Name = "TextBox2"
116- Me.TextBox2.Size = New System.Drawing.Size(129, 19)
117- Me.TextBox2.TabIndex = 3
116+ Me.txtName2.Location = New System.Drawing.Point(170, 26)
117+ Me.txtName2.Name = "txtName2"
118+ Me.txtName2.Size = New System.Drawing.Size(129, 19)
119+ Me.txtName2.TabIndex = 3
118120 '
119121 'Label2
120122 '
@@ -125,12 +127,12 @@
125127 Me.Label2.TabIndex = 2
126128 Me.Label2.Text = "保存フォルダ"
127129 '
128- 'TextBox3
130+ 'txtSaveDirectory
129131 '
130- Me.TextBox3.Location = New System.Drawing.Point(90, 104)
131- Me.TextBox3.Name = "TextBox3"
132- Me.TextBox3.Size = New System.Drawing.Size(241, 19)
133- Me.TextBox3.TabIndex = 4
132+ Me.txtSaveDirectory.Location = New System.Drawing.Point(90, 104)
133+ Me.txtSaveDirectory.Name = "txtSaveDirectory"
134+ Me.txtSaveDirectory.Size = New System.Drawing.Size(241, 19)
135+ Me.txtSaveDirectory.TabIndex = 4
134136 '
135137 'btnSelectDirectory
136138 '
@@ -150,20 +152,29 @@
150152 Me.btnDownload.Text = "ダウンロード"
151153 Me.btnDownload.UseVisualStyleBackColor = True
152154 '
153- 'Form1
155+ 'txtDebug
154156 '
157+ Me.txtDebug.Location = New System.Drawing.Point(8, 208)
158+ Me.txtDebug.Multiline = True
159+ Me.txtDebug.Name = "txtDebug"
160+ Me.txtDebug.Size = New System.Drawing.Size(382, 300)
161+ Me.txtDebug.TabIndex = 6
162+ '
163+ 'frmCondtion
164+ '
155165 Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
156166 Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
157- Me.ClientSize = New System.Drawing.Size(402, 179)
167+ Me.ClientSize = New System.Drawing.Size(402, 520)
168+ Me.Controls.Add(Me.txtDebug)
158169 Me.Controls.Add(Me.btnDownload)
159170 Me.Controls.Add(Me.btnSelectDirectory)
160- Me.Controls.Add(Me.TextBox3)
161- Me.Controls.Add(Me.TextBox2)
162- Me.Controls.Add(Me.TextBox1)
171+ Me.Controls.Add(Me.txtSaveDirectory)
172+ Me.Controls.Add(Me.txtName2)
173+ Me.Controls.Add(Me.txtName1)
163174 Me.Controls.Add(Me.Label2)
164175 Me.Controls.Add(Me.Label1)
165176 Me.Controls.Add(Me.GroupBox1)
166- Me.Name = "Form1"
177+ Me.Name = "frmCondtion"
167178 Me.Text = "将棋ウォーズ棋譜ダウンローダー"
168179 Me.GroupBox1.ResumeLayout(False)
169180 Me.GroupBox1.PerformLayout()
@@ -177,11 +188,12 @@
177188 Friend WithEvents rbAnimal As System.Windows.Forms.RadioButton
178189 Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
179190 Friend WithEvents Label1 As System.Windows.Forms.Label
180- Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
181- Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
191+ Friend WithEvents txtName1 As System.Windows.Forms.TextBox
192+ Friend WithEvents txtName2 As System.Windows.Forms.TextBox
182193 Friend WithEvents Label2 As System.Windows.Forms.Label
183- Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
194+ Friend WithEvents txtSaveDirectory As System.Windows.Forms.TextBox
184195 Friend WithEvents btnSelectDirectory As System.Windows.Forms.Button
185196 Friend WithEvents btnDownload As System.Windows.Forms.Button
197+ Friend WithEvents txtDebug As System.Windows.Forms.TextBox
186198
187199 End Class
--- ShogiWarsKifuDownloader/ShogiWarsKifuDownloader/frmCondtion.vb (revision 1)
+++ ShogiWarsKifuDownloader/ShogiWarsKifuDownloader/frmCondtion.vb (revision 2)
@@ -1,3 +1,91 @@
11 Public Class frmCondtion
22
3+ Private url As String = "http://swks.sakura.ne.jp/wars/kifusearch/"
4+ Private csrfmiddlewaretoken As String
5+ Dim cc As System.Net.CookieContainer
6+
7+ Private Sub btnDownload_Click(sender As System.Object, e As System.EventArgs) Handles btnDownload.Click
8+
9+ FirstReq()
10+ SecondReq()
11+
12+ End Sub
13+
14+ Private Sub FirstReq()
15+
16+ cc = New System.Net.CookieContainer()
17+
18+ Dim webreq As System.Net.HttpWebRequest = _
19+ System.Net.WebRequest.Create(url)
20+ webreq.CookieContainer = cc
21+ Dim webres As System.Net.WebResponse = webreq.GetResponse()
22+ Dim st As System.IO.Stream = webres.GetResponseStream()
23+
24+ Dim sr As New System.IO.StreamReader(st, System.Text.Encoding.UTF8)
25+
26+ Dim htmlSource As String = sr.ReadToEnd()
27+
28+ sr.Close()
29+ st.Close()
30+ webres.Close()
31+
32+
33+
34+ csrfmiddlewaretoken = GetCsrmiddlewaretoken(htmlSource)
35+ csrfmiddlewaretoken = csrfmiddlewaretoken.Substring(1, csrfmiddlewaretoken.Length - 2)
36+ txtDebug.Text = csrfmiddlewaretoken
37+
38+ End Sub
39+
40+ Private Function GetCsrmiddlewaretoken(ByVal text As String) As String
41+ Dim m As System.Text.RegularExpressions.Match = _
42+ System.Text.RegularExpressions.Regex.Match( _
43+ text, _
44+ "\<input\s+[^>]*name\s*=\s*'csrfmiddlewaretoken'\s*value=(?<value>'.*') /\>",
45+ System.Text.RegularExpressions.RegexOptions.IgnoreCase Or _
46+ System.Text.RegularExpressions.RegexOptions.Singleline)
47+
48+ Return m.Groups("value").Value.Trim()
49+ End Function
50+
51+
52+
53+ Private Sub SecondReq()
54+
55+ Dim ps As New Hashtable
56+ ps.Add("csrfmiddlewaretoken", csrfmiddlewaretoken)
57+ ps.Add("name1", txtName1.Text)
58+ ps.Add("name2", txtName2.Text)
59+ ps.Add("gtype", GetGTypeValue())
60+ ps.Add("x", 15)
61+ ps.Add("y", 13)
62+
63+
64+
65+ Dim encoder As System.Text.Encoding = System.Text.Encoding.UTF8
66+
67+ Dim resText As String = HttpPostUtl.HttpPost(url, ps, cc, encoder)
68+ txtDebug.Text = resText
69+ End Sub
70+
71+
72+ Private Function GetGTypeValue() As Integer
73+ If rb10min.Checked Then
74+ Return 0
75+ End If
76+ If rb3min.Checked Then
77+ Return 1
78+ End If
79+ If rb10sec.Checked Then
80+ Return 3
81+ End If
82+ If rbAnimal.Checked Then
83+ Return 2
84+ End If
85+ Return 0
86+ End Function
87+
88+ Private Sub frmCondtion_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
89+ rb3min.Checked = True
90+ End Sub
391 End Class