This repository was archived by the owner on Apr 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDBPost.cs
More file actions
67 lines (62 loc) · 2.18 KB
/
DBPost.cs
File metadata and controls
67 lines (62 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
using DBPost.Properties;
using Grabacr07.KanColleViewer.Composition;
using Grabacr07.KanColleWrapper;
using System.Collections.ObjectModel;
using System.ComponentModel.Composition;
namespace DBPost
{
[Export(typeof(IPlugin))]
[Export(typeof(ISettings))]
[ExportMetadata("Guid", "222896DD-9131-4929-A3B0-4B8BB82296D6")]
[ExportMetadata("Title", "KanColleDbPost")]
[ExportMetadata("Description", "艦これ統計データベースへ送信するプラグインです。")]
[ExportMetadata("Version", "1.0")]
[ExportMetadata("Author", "@about518")]
public class DBPost : IPlugin, ISettings
{
object ISettings.View => new DBPostSettings { DataContext = this, };
public bool IsSendDb
{
get { return Settings.Default.IsSendDb; }
set
{
Settings.Default.IsSendDb = value;
Settings.Default.Save();
}
}
public string DbAccessKey
{
get { return Settings.Default.DbAccessKey; }
set
{
Settings.Default.DbAccessKey = value;
Settings.Default.Save();
}
}
public ObservableCollection<PostData> postDatas;
public static readonly string[] endPoints =
{
"/kcsapi/api_port/port",
"/kcsapi/api_get_member/ship2",
"/kcsapi/api_get_member/ship3",
"/kcsapi/api_get_member/slot_item",
"/kcsapi/api_get_member/kdock",
"/kcsapi/api_get_member/mapinfo",
"/kcsapi/api_req_hensei/change",
"/kcsapi/api_req_kousyou/createship",
"/kcsapi/api_req_kousyou/getship",
"/kcsapi/api_req_kousyou/createitem",
"/kcsapi/api_req_map/select_eventmap_rank",
"/kcsapi/api_req_sortie/battleresult",
"/kcsapi/api_req_combined_battle/battleresult",
};
public void Initialize()
{
postDatas = new ObservableCollection<PostData>();
foreach(var endPoint in endPoints)
{
postDatas.Add(new PostData(KanColleClient.Current.Proxy, endPoint));
}
}
}
}