this.textBoxOutput = new System.Windows.Forms.TextBox();\r
this.label11 = new System.Windows.Forms.Label();\r
this.buttonOutputDir = new System.Windows.Forms.Button();\r
- this.tabPageCollabo = new System.Windows.Forms.TabPage();\r
- this.tabControlCollabo = new System.Windows.Forms.TabControl();\r
- this.tabPagePushNotification = new System.Windows.Forms.TabPage();\r
+ this.tabPagePush = new System.Windows.Forms.TabPage();\r
this.groupBoxPushover = new System.Windows.Forms.GroupBox();\r
this.buttonPushoverTest = new System.Windows.Forms.Button();\r
this.label16 = new System.Windows.Forms.Label();\r
this.textBoxPushbulletToken = new System.Windows.Forms.TextBox();\r
this.label7 = new System.Windows.Forms.Label();\r
this.checkBoxPushbulletOn = new System.Windows.Forms.CheckBox();\r
- this.tabPageExternalService = new System.Windows.Forms.TabPage();\r
- this.groupBoxKancolleDb = new System.Windows.Forms.GroupBox();\r
- this.textBoxKancolleDbToken = new System.Windows.Forms.TextBox();\r
- this.label8 = new System.Windows.Forms.Label();\r
- this.checkBoxKancolleDbOn = new System.Windows.Forms.CheckBox();\r
this.tabPageDebug = new System.Windows.Forms.TabPage();\r
this.buttonPlayDebugLog = new System.Windows.Forms.Button();\r
this.buttonDebugLogOpenFile = new System.Windows.Forms.Button();\r
this.groupBoxAutoConfig.SuspendLayout();\r
this.tabPageLog.SuspendLayout();\r
((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaterialLogInterval)).BeginInit();\r
- this.tabPageCollabo.SuspendLayout();\r
- this.tabControlCollabo.SuspendLayout();\r
- this.tabPagePushNotification.SuspendLayout();\r
+ this.tabPagePush.SuspendLayout();\r
this.groupBoxPushover.SuspendLayout();\r
this.groupBoxPushbullet.SuspendLayout();\r
- this.tabPageExternalService.SuspendLayout();\r
- this.groupBoxKancolleDb.SuspendLayout();\r
this.tabPageDebug.SuspendLayout();\r
this.SuspendLayout();\r
// \r
this.tabControl.Controls.Add(this.tabPageVersion);\r
this.tabControl.Controls.Add(this.tabPageProxy);\r
this.tabControl.Controls.Add(this.tabPageLog);\r
- this.tabControl.Controls.Add(this.tabPageCollabo);\r
+ this.tabControl.Controls.Add(this.tabPagePush);\r
this.tabControl.Controls.Add(this.tabPageDebug);\r
this.tabControl.Location = new System.Drawing.Point(7, 6);\r
this.tabControl.Multiline = true;\r
this.buttonOutputDir.UseVisualStyleBackColor = true;\r
this.buttonOutputDir.Click += new System.EventHandler(this.buttonOutputDir_Click);\r
// \r
- // tabPageCollabo\r
- // \r
- this.tabPageCollabo.Controls.Add(this.tabControlCollabo);\r
- this.tabPageCollabo.Location = new System.Drawing.Point(4, 40);\r
- this.tabPageCollabo.Name = "tabPageCollabo";\r
- this.tabPageCollabo.Size = new System.Drawing.Size(256, 158);\r
- this.tabPageCollabo.TabIndex = 8;\r
- this.tabPageCollabo.Text = "連携";\r
- this.tabPageCollabo.UseVisualStyleBackColor = true;\r
- // \r
- // tabControlCollabo\r
- // \r
- this.tabControlCollabo.Controls.Add(this.tabPagePushNotification);\r
- this.tabControlCollabo.Controls.Add(this.tabPageExternalService);\r
- this.tabControlCollabo.Dock = System.Windows.Forms.DockStyle.Fill;\r
- this.tabControlCollabo.Location = new System.Drawing.Point(0, 0);\r
- this.tabControlCollabo.Name = "tabControlCollabo";\r
- this.tabControlCollabo.SelectedIndex = 0;\r
- this.tabControlCollabo.Size = new System.Drawing.Size(256, 158);\r
- this.tabControlCollabo.TabIndex = 3;\r
- // \r
- // tabPagePushNotification\r
- // \r
- this.tabPagePushNotification.Controls.Add(this.groupBoxPushover);\r
- this.tabPagePushNotification.Controls.Add(this.groupBoxPushbullet);\r
- this.tabPagePushNotification.Location = new System.Drawing.Point(4, 22);\r
- this.tabPagePushNotification.Name = "tabPagePushNotification";\r
- this.tabPagePushNotification.Padding = new System.Windows.Forms.Padding(3);\r
- this.tabPagePushNotification.Size = new System.Drawing.Size(248, 132);\r
- this.tabPagePushNotification.TabIndex = 0;\r
- this.tabPagePushNotification.Text = "プッシュ通知";\r
- this.tabPagePushNotification.UseVisualStyleBackColor = true;\r
+ // tabPagePush\r
+ // \r
+ this.tabPagePush.Controls.Add(this.groupBoxPushover);\r
+ this.tabPagePush.Controls.Add(this.groupBoxPushbullet);\r
+ this.tabPagePush.Location = new System.Drawing.Point(4, 40);\r
+ this.tabPagePush.Name = "tabPagePush";\r
+ this.tabPagePush.Size = new System.Drawing.Size(256, 158);\r
+ this.tabPagePush.TabIndex = 8;\r
+ this.tabPagePush.Text = "プッシュ通知";\r
+ this.tabPagePush.UseVisualStyleBackColor = true;\r
// \r
// groupBoxPushover\r
// \r
this.groupBoxPushover.Controls.Add(this.textBoxPushoverUserKey);\r
this.groupBoxPushover.Controls.Add(this.checkBoxPushoverOn);\r
this.groupBoxPushover.Controls.Add(this.textBoxPushoverApiKey);\r
- this.groupBoxPushover.Location = new System.Drawing.Point(6, 55);\r
+ this.groupBoxPushover.Location = new System.Drawing.Point(11, 60);\r
this.groupBoxPushover.Name = "groupBoxPushover";\r
this.groupBoxPushover.Size = new System.Drawing.Size(236, 66);\r
this.groupBoxPushover.TabIndex = 2;\r
this.groupBoxPushbullet.Controls.Add(this.textBoxPushbulletToken);\r
this.groupBoxPushbullet.Controls.Add(this.label7);\r
this.groupBoxPushbullet.Controls.Add(this.checkBoxPushbulletOn);\r
- this.groupBoxPushbullet.Location = new System.Drawing.Point(6, 6);\r
+ this.groupBoxPushbullet.Location = new System.Drawing.Point(11, 11);\r
this.groupBoxPushbullet.Name = "groupBoxPushbullet";\r
this.groupBoxPushbullet.Size = new System.Drawing.Size(236, 43);\r
this.groupBoxPushbullet.TabIndex = 1;\r
this.checkBoxPushbulletOn.Text = "有効";\r
this.checkBoxPushbulletOn.UseVisualStyleBackColor = true;\r
// \r
- // tabPageExternalService\r
- // \r
- this.tabPageExternalService.Controls.Add(this.groupBoxKancolleDb);\r
- this.tabPageExternalService.Location = new System.Drawing.Point(4, 22);\r
- this.tabPageExternalService.Name = "tabPageExternalService";\r
- this.tabPageExternalService.Padding = new System.Windows.Forms.Padding(3);\r
- this.tabPageExternalService.Size = new System.Drawing.Size(248, 132);\r
- this.tabPageExternalService.TabIndex = 1;\r
- this.tabPageExternalService.Text = "外部サービス";\r
- this.tabPageExternalService.UseVisualStyleBackColor = true;\r
- // \r
- // groupBoxKancolleDb\r
- // \r
- this.groupBoxKancolleDb.Controls.Add(this.textBoxKancolleDbToken);\r
- this.groupBoxKancolleDb.Controls.Add(this.label8);\r
- this.groupBoxKancolleDb.Controls.Add(this.checkBoxKancolleDbOn);\r
- this.groupBoxKancolleDb.Location = new System.Drawing.Point(6, 6);\r
- this.groupBoxKancolleDb.Name = "groupBoxKancolleDb";\r
- this.groupBoxKancolleDb.Size = new System.Drawing.Size(234, 47);\r
- this.groupBoxKancolleDb.TabIndex = 0;\r
- this.groupBoxKancolleDb.TabStop = false;\r
- this.groupBoxKancolleDb.Text = "艦これ統計データベース";\r
- // \r
- // textBoxKancolleDbToken\r
- // \r
- this.textBoxKancolleDbToken.Location = new System.Drawing.Point(121, 20);\r
- this.textBoxKancolleDbToken.Name = "textBoxKancolleDbToken";\r
- this.textBoxKancolleDbToken.Size = new System.Drawing.Size(107, 19);\r
- this.textBoxKancolleDbToken.TabIndex = 2;\r
- // \r
- // label8\r
- // \r
- this.label8.AutoSize = true;\r
- this.label8.Location = new System.Drawing.Point(57, 23);\r
- this.label8.Name = "label8";\r
- this.label8.Size = new System.Drawing.Size(63, 12);\r
- this.label8.TabIndex = 1;\r
- this.label8.Text = "アクセスキー:";\r
- // \r
- // checkBoxKancolleDbOn\r
- // \r
- this.checkBoxKancolleDbOn.AutoSize = true;\r
- this.checkBoxKancolleDbOn.Location = new System.Drawing.Point(6, 22);\r
- this.checkBoxKancolleDbOn.Name = "checkBoxKancolleDbOn";\r
- this.checkBoxKancolleDbOn.Size = new System.Drawing.Size(48, 16);\r
- this.checkBoxKancolleDbOn.TabIndex = 0;\r
- this.checkBoxKancolleDbOn.Text = "有効";\r
- this.checkBoxKancolleDbOn.UseVisualStyleBackColor = true;\r
- // \r
// tabPageDebug\r
// \r
this.tabPageDebug.Controls.Add(this.buttonPlayDebugLog);\r
this.tabPageLog.ResumeLayout(false);\r
this.tabPageLog.PerformLayout();\r
((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaterialLogInterval)).EndInit();\r
- this.tabPageCollabo.ResumeLayout(false);\r
- this.tabControlCollabo.ResumeLayout(false);\r
- this.tabPagePushNotification.ResumeLayout(false);\r
+ this.tabPagePush.ResumeLayout(false);\r
this.groupBoxPushover.ResumeLayout(false);\r
this.groupBoxPushover.PerformLayout();\r
this.groupBoxPushbullet.ResumeLayout(false);\r
this.groupBoxPushbullet.PerformLayout();\r
- this.tabPageExternalService.ResumeLayout(false);\r
- this.groupBoxKancolleDb.ResumeLayout(false);\r
- this.groupBoxKancolleDb.PerformLayout();\r
this.tabPageDebug.ResumeLayout(false);\r
this.tabPageDebug.PerformLayout();\r
this.ResumeLayout(false);\r
private System.Windows.Forms.GroupBox groupBox3;\r
private System.Windows.Forms.GroupBox groupBox2;\r
private System.Windows.Forms.CheckBox checkBoxPresetAkashi;\r
- private System.Windows.Forms.TabPage tabPageCollabo;\r
- private System.Windows.Forms.GroupBox groupBoxKancolleDb;\r
- private System.Windows.Forms.TextBox textBoxKancolleDbToken;\r
- private System.Windows.Forms.Label label8;\r
- private System.Windows.Forms.CheckBox checkBoxKancolleDbOn;\r
+ private System.Windows.Forms.TabPage tabPagePush;\r
private System.Windows.Forms.ComboBox comboBoxZoom;\r
private System.Windows.Forms.Label label14;\r
private System.Windows.Forms.Label label15;\r
private System.Windows.Forms.CheckBox checkBoxLocationPerMachine;\r
private System.Windows.Forms.TextBox textBoxPushoverApiKey;\r
private System.Windows.Forms.CheckBox checkBoxPushoverOn;\r
- private System.Windows.Forms.TabControl tabControlCollabo;\r
- private System.Windows.Forms.TabPage tabPagePushNotification;\r
private System.Windows.Forms.GroupBox groupBoxPushover;\r
private System.Windows.Forms.Button buttonPushoverTest;\r
private System.Windows.Forms.Label label16;\r
private System.Windows.Forms.Label label12;\r
private System.Windows.Forms.TextBox textBoxPushoverUserKey;\r
- private System.Windows.Forms.TabPage tabPageExternalService;\r
private System.Windows.Forms.CheckBox checkBoxRepeat;\r
private System.Windows.Forms.CheckBox checkBoxBattleResult;\r
private System.Windows.Forms.CheckBox checkBoxAirBattleResult;\r
+++ /dev/null
-// Copyright (C) 2015 Kazuhiro Fujieda <fujieda@users.osdn.me>\r
-// \r
-// Licensed under the Apache License, Version 2.0 (the "License");\r
-// you may not use this file except in compliance with the License.\r
-// You may obtain a copy of the License at\r
-//\r
-// http://www.apache.org/licenses/LICENSE-2.0\r
-//\r
-// Unless required by applicable law or agreed to in writing, software\r
-// distributed under the License is distributed on an "AS IS" BASIS,\r
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-// See the License for the specific language governing permissions and\r
-// limitations under the License.\r
-\r
-using System;\r
-using System.Collections.Concurrent;\r
-using System.Collections.Generic;\r
-using System.Collections.Specialized;\r
-using System.Net;\r
-using System.Text.RegularExpressions;\r
-using System.Threading.Tasks;\r
-\r
-namespace KancolleSniffer\r
-{\r
- public class KancolleDb\r
- {\r
- private readonly BlockingCollection<Tuple<string, string, string>> _queue =\r
- new BlockingCollection<Tuple<string, string, string>>(10);\r
-\r
- private bool _started;\r
- private string _token;\r
-\r
- public void Start(string token)\r
- {\r
- _token = token;\r
- if (_started)\r
- return;\r
- _started = true;\r
- Task.Run(() =>\r
- {\r
- try\r
- {\r
- while (true)\r
- {\r
- var e = _queue.Take();\r
- try\r
- {\r
- using (var wc = new WebClient())\r
- {\r
- var values = new NameValueCollection\r
- {\r
- {"token", _token},\r
- {"agent", "KdpR5STmwYTaFpNCbD4N"},\r
- {"url", e.Item1},\r
- {"requestbody", e.Item2},\r
- {"responsebody", e.Item3}\r
- };\r
- wc.UploadValues("http://api.kancolle-db.net/2/", values);\r
- }\r
- }\r
- catch (WebException)\r
- {\r
- }\r
- }\r
- }\r
- catch (InvalidOperationException)\r
- {\r
- }\r
- });\r
- }\r
-\r
- private readonly HashSet<string> _urlSet = new HashSet<string>()\r
- {\r
- "/kcsapi/api_port/port",\r
- "/kcsapi/api_get_member/ship2",\r
- "/kcsapi/api_get_member/ship3",\r
- "/kcsapi/api_get_member/slot_item",\r
- "/kcsapi/api_get_member/kdock",\r
- "/kcsapi/api_get_member/mapinfo",\r
- "/kcsapi/api_req_hensei/change",\r
- "/kcsapi/api_req_kousyou/createship",\r
- "/kcsapi/api_req_kousyou/getship",\r
- "/kcsapi/api_req_kousyou/createitem",\r
- "/kcsapi/api_req_map/start",\r
- "/kcsapi/api_req_map/next",\r
- "/kcsapi/api_req_map/select_eventmap_rank",\r
- "/kcsapi/api_req_sortie/battle",\r
- "/kcsapi/api_req_battle_midnight/battle",\r
- "/kcsapi/api_req_battle_midnight/sp_midnight",\r
- "/kcsapi/api_req_sortie/night_to_day",\r
- "/kcsapi/api_req_sortie/battleresult",\r
- "/kcsapi/api_req_combined_battle/battle",\r
- "/kcsapi/api_req_combined_battle/airbattle",\r
- "/kcsapi/api_req_combined_battle/midnight_battle",\r
- "/kcsapi/api_req_combined_battle/battleresult",\r
- "/kcsapi/api_req_sortie/airbattle",\r
- "/kcsapi/api_req_combined_battle/battle_water",\r
- "/kcsapi/api_req_combined_battle/sp_midnight"\r
- };\r
-\r
- public void Send(string url, string request, string response)\r
- {\r
- if (!_urlSet.Contains(url))\r
- return;\r
- request = Regex.Replace(request, @"&api%5Ftoken=[^&]+|api%5Ftoken=[^&]+&?", "");\r
- response = response.Replace("svdata=", "");\r
- _queue.TryAdd(new Tuple<string, string, string>(url, request, response));\r
- }\r
-\r
- public void Stop()\r
- {\r
- _queue.CompleteAdding();\r
- }\r
- }\r
-}
\ No newline at end of file