OSDN Git Service

kancolle-db.netへの送信機能を削除する
[kancollesniffer/KancolleSniffer.git] / KancolleSniffer / Config.cs
index 1309d8e..7175ad0 100644 (file)
@@ -70,12 +70,6 @@ namespace KancolleSniffer
         }\r
     }\r
 \r
-    public class KancolleDbConfig\r
-    {\r
-        public bool On { get; set; }\r
-        public string Token { get; set; } = "";\r
-    }\r
-\r
     public class PushbulletConfig\r
     {\r
         public bool On { get; set; }\r
@@ -124,7 +118,8 @@ namespace KancolleSniffer
         Pushbullet = 1 << 3,\r
         Push = 1 << 4,\r
         Repeat = 1 << 5,\r
-        Cont = 1 << 6\r
+        Cont = 1 << 6,\r
+        Preliminary = 1 << 7\r
     }\r
 \r
 \r
@@ -133,6 +128,7 @@ namespace KancolleSniffer
         public string Name { get; set; }\r
         public NotificationType Flags { get; set; }\r
         public int RepeatInterval { get; set; }\r
+        public int PreliminaryPeriod { get; set; }\r
     }\r
 \r
     public class NotificationConfig\r
@@ -143,18 +139,23 @@ namespace KancolleSniffer
         public int[] RepeatIntervals =\r
             Config.NotificationNames.Select(x => 0).ToArray();\r
 \r
+        public int[] PreliminaryPeriods =\r
+            Config.NotificationNames.Select(x => 0).ToArray();\r
+\r
         public NotificationSpec this[string name]\r
         {\r
             get => new NotificationSpec\r
             {\r
                 Name = name,\r
                 Flags = Settings[Config.NotificationIndex[name]],\r
-                RepeatInterval = RepeatIntervals[Config.NotificationIndex[name]]\r
+                RepeatInterval = RepeatIntervals[Config.NotificationIndex[name]],\r
+                PreliminaryPeriod = PreliminaryPeriods[Config.NotificationIndex[name]]\r
             };\r
             set\r
             {\r
                 Settings[Config.NotificationIndex[name]] = value.Flags;\r
                 RepeatIntervals[Config.NotificationIndex[name]] = value.RepeatInterval;\r
+                PreliminaryPeriods[Config.NotificationIndex[name]] = value.PreliminaryPeriod;\r
             }\r
         }\r
     }\r
@@ -168,6 +169,22 @@ namespace KancolleSniffer
         public Size ListSize { get; set; }\r
     }\r
 \r
+    [Flags]\r
+    public enum Spoiler\r
+    {\r
+        ResultRank = 1,\r
+        AirBattleResult = 1 << 1,\r
+        BattleResult = 1 << 2,\r
+        All = (1 << 3) - 1\r
+    }\r
+\r
+    [Flags]\r
+    public enum TimerKind\r
+    {\r
+        Mission = 1,\r
+        NDock = 1 << 1\r
+    }\r
+\r
     public class Config\r
     {\r
         private readonly string _baseDir = AppDomain.CurrentDomain.BaseDirectory;\r
@@ -181,6 +198,7 @@ namespace KancolleSniffer
         public bool SaveLocationPerMachine { get; set; }\r
         public List<LocationPerMachine> LocationList { get; set; } = new List<LocationPerMachine>();\r
         public bool ShowHpInPercent { get; set; }\r
+        public TimerKind ShowEndTime { get; set; }\r
         public bool FlashWindow { get; set; } = true;\r
         public bool ShowBaloonTip { get; set; } = true;\r
         public bool PlaySound { get; set; } = true;\r
@@ -191,6 +209,7 @@ namespace KancolleSniffer
         public List<int> NotifyConditions { get; set; }\r
         public List<int> ResetHours { get; set; }\r
         public bool AlwaysShowResultRank { get; set; }\r
+        public Spoiler Spoilers { get; set; }\r
         public bool UsePresetAkashi { get; set; }\r
         public SoundConfig Sounds { get; set; } = new SoundConfig();\r
         public bool DebugLogging { get; set; }\r
@@ -198,7 +217,6 @@ namespace KancolleSniffer
         public ProxyConfig Proxy { get; set; } = new ProxyConfig();\r
         public ShipListConfig ShipList { get; set; } = new ShipListConfig();\r
         public LogConfig Log { get; set; } = new LogConfig();\r
-        public KancolleDbConfig KancolleDb { get; set; } = new KancolleDbConfig();\r
         public PushbulletConfig Pushbullet { get; set; } = new PushbulletConfig();\r
         public PushoverConfig Pushover { get; set; } = new PushoverConfig();\r
 \r
@@ -240,6 +258,11 @@ namespace KancolleSniffer
                         ns[i] = ns[i] ^ NotificationType.Pushbullet | NotificationType.Push;\r
                 }\r
                 ComposeNotificationFlags();\r
+                if (AlwaysShowResultRank)\r
+                {\r
+                    Spoilers = Spoiler.All;\r
+                    AlwaysShowResultRank = false;\r
+                }\r
                 if (SaveLocationPerMachine)\r
                 {\r
                     foreach (var l in LocationList)\r