-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForm1.cs
1971 lines (1675 loc) · 76.4 KB
/
Form1.cs
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.IO;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.Win32;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Globalization;
namespace WindowsFormsApplication7
{
public partial class がしゃふぃるたー : Form
{
static byte settingver = 1;
struct BorderTBL
{
public DateTime timer;
public Int32 rank1;
public Int32 rank2;
public Int32 rank3;
public Int32 rank4;
public Int32 rank5;
public Int32 rank6;
public Int32 rank7;
public BorderTBL(DateTime now, Int32 j, Int32 k, Int32 l, Int32 m, Int32 n, Int32 o, Int32 p)
{
timer =now;
rank1 = j;
rank2 = k;
rank3 = l;
rank4 = m;
rank5 = n;
rank6 = o;
rank7 = p;
}
}
public がしゃふぃるたー()
{
InitializeComponent();
if (File.Exists(Application.StartupPath + "\\" + "setting"))
{
FileStream sr = new FileStream(Application.StartupPath + "\\" + "setting", FileMode.Open);
if (sr.Length > 10)
{
byte[] bs = new byte[sr.Length];
sr.Read(bs, 0, bs.Length);
if ((bs[7]-settingver) ==0)
{
if (((bs[0]) & 2) == 0)
{
radioButton1.Checked = true;
}
else{
radioButton3.Checked = true;
}
if (((bs[0]) & 1) != 0)
{
checkBox10.Checked = true;
}
if (((bs[0] >> 3) & 1) != 0)
{
checkBox1.Checked = true;
}
if (((bs[0] >> 4) & 1) != 0)
{
checkBox2.Checked = true;
}
if (((bs[0] >> 5) & 1) != 0)
{
checkBox3.Checked = true;
}
if (((bs[0] >> 5) & 1) != 0)
{
checkBox4.Checked = true;
}
if (((bs[0] >> 7) & 1) != 0)
{
checkBox5.Checked = true;
}
if (((bs[1]) & 1) != 0)
{
checkBox6.Checked = true;
}
if (((bs[1] >> 1) & 1) != 0)
{
checkBox7.Checked = true;
}
if (((bs[1] >> 2) & 1) != 0)
{
radioButton2.Checked = true;
}
if (((bs[1] >> 3) & 1) != 0)
{
panel1.Visible = true;
}
if (((bs[1] >> 4) & 1) != 0)
{
radioButton3.Checked = true;
}
if (((bs[1] >> 5) & 1) != 0)
{
checkBox8.Checked = true;
}
if (((bs[1] >> 6) & 1) != 0)
{
comboBox5.SelectedIndex = 1;
}
textBox3.Text = BitConverter.ToInt16(bs, 8).ToString();
textBox5.Text = BitConverter.ToInt16(bs, 5).ToString();
byte[] sb = new byte[bs.Length - 10];
Array.Copy(bs, 10, sb, 0, bs.Length - 10);
string s = Encoding.GetEncoding(65001).GetString(sb);
string[] ss = s.Split('\t');
if (ss.Length >= 6)
{
comboBox1.Text = ss[0];
comboBox2.Text = ss[1];
textBox4.Text = ss[2];
comboBox3.Text = ss[3];
comboBox4.Text = ss[4];
comboBox5.Text = ss[5];
}
}
}
sr.Close();
}
}
private void がしゃふぃるたー_FormClosed(object sender, FormClosedEventArgs e)
{
FileStream sr = new FileStream(Application.StartupPath + "\\" + "setting", FileMode.Create);
byte[] bs = new byte[10];
int flag = 0;
int flag2 = 0;
if (checkBox10.Checked)
flag=1;
if (radioButton3.Checked)
flag+=2;
if (checkBox1.Checked)
flag |= 1<<3;
if (checkBox2.Checked)
flag |= 1 << 4;
if (checkBox3.Checked)
flag |= 1 << 5;
if (checkBox4.Checked)
flag |= 1 << 6;
if (checkBox5.Checked)
flag |= 1 << 7;
if (checkBox6.Checked)
flag2 |= 1;
if (checkBox7.Checked)
flag2 |= 1<<1;
if (radioButton2.Checked)
flag2 |= 1<<2;
if (panel1.Visible == true)
flag2 |= 1<<3;
if (radioButton3.Checked)
flag2 |= 1 << 4;
if (checkBox8.Checked)
flag2 |= 1 << 5;
if (comboBox6.SelectedIndex>0)
flag2 |= 1 << 6;
bs[0] = (byte)flag;
bs[1] = (byte)flag2;
bs[7] = settingver;
if (textBox3.Text == "") {
textBox3.Text = "0";
}
bs[5] = (byte)(Convert.ToInt32(textBox5.Text) & 0xFF);
bs[6] = (byte)(Convert.ToInt32(textBox5.Text) >> 8);
bs[8] = (byte)(Convert.ToInt32(textBox3.Text) & 0xFF);
bs[9] = (byte)(Convert.ToInt32(textBox3.Text) >>8) ;
string s = comboBox1.Text + "\t" + comboBox2.Text + "\t" + textBox4.Text + "\t" + comboBox3.Text + "\t" + comboBox4.Text +"\t" + comboBox5.Text;
byte[] sb = Encoding.GetEncoding(65001).GetBytes(s);
sr.Write(bs, 0, bs.Length);
sr.Write(sb, 0, sb.Length);
sr.Close();
}
private void button1_Click(object sender, EventArgs e)
{
if (comboBox4.SelectedIndex > 2 && comboBox4.SelectedIndex < 6)
{
if (checkBox11.Checked == true)
{
//textBox2.Text = boder_parser(textBox1.Text) + textBox2.Text;
string[] s = boder_parser(textBox1.Text).Split(("|").ToCharArray());
textBox2.Text =s[0] + textBox2.Text;
if (s.Length > 1)
{
textBox6.Text =s[1] + textBox6.Text;
}
}
else
{
string[] s = boder_parser(textBox1.Text).Split(("|").ToCharArray());
textBox2.Text += boder_parser(s[0]);
if (s.Length > 1)
{
textBox6.Text += boder_parser(s[1]);
}
}
}
else if (comboBox4.Text.Contains("収集")) {
if (checkBox11.Checked == true)
{ //textBox2.Text = boder_parser(textBox1.Text) + textBox2.Text;
string[] s = boder_parser(textBox1.Text).Split(("|").ToCharArray());
textBox2.Text = s[0] + textBox2.Text;
if (s.Length > 1)
{
textBox6.Text =s[1] + textBox6.Text;
}
}
else
{
string[] s = boder_parser(textBox1.Text).Split(("|").ToCharArray());
textBox2.Text += s[0];
if (s.Length > 1)
{
textBox6.Text += s[1];
}
}
}
else if (comboBox4.Text.Contains("IMC"))
{
if (checkBox11.Checked == true)
{
textBox2.Text = boder_parser(textBox1.Text) + textBox2.Text;
}
else
{
textBox2.Text += boder_parser(textBox1.Text);
}
}
else
{
textBox2.Text = boder_parser(textBox1.Text);
}
}
private void button5_Click(object sender, EventArgs e)
{
if (comboBox4.SelectedIndex > 2 && comboBox4.SelectedIndex < 6)
{
if (checkBox11.Checked == true)
{
textBox1.Text = boder_parser(textBox2.Text)+ textBox1.Text;
}
else
{
textBox1.Text += boder_parser(textBox2.Text);
}
}
else if (comboBox4.Text.Contains("100/500/1200/3000収集"))
{
if (checkBox11.Checked == true)
{
textBox1.Text = boder_parser(textBox2.Text) + textBox1.Text;
}
else
{
textBox1.Text += boder_parser(textBox2.Text);
}
}
else if (comboBox4.Text.Contains("IMC"))
{
if (checkBox11.Checked == true)
{
textBox1.Text = boder_parser(textBox2.Text) + textBox1.Text;
}
else
{
textBox1.Text += boder_parser(textBox2.Text);
}
}
else
{
textBox1.Text = boder_parser(textBox2.Text);
}
}
string boder_parser(string sbase){
if (sbase.Contains("<!DOCTYPE") == true)
{
sbase = Regex.Replace(sbase, "210096be0c8", ">SR <");
sbase = Regex.Replace(sbase, "21006be53eb", ">HR <");
sbase = Regex.Replace(sbase, "210083cbf51", ">R <");
sbase = Regex.Replace(sbase, "2100343fe11", ">HN <");
sbase = Regex.Replace(sbase, "2100675985a", ">N <");
if (comboBox4.Text.Contains("HTML") == false)
{
sbase = Regex.Replace(sbase, " ", "");
//sbase = Regex.Replace(sbase, "<.*?>", "");
sbase = Regex.Replace(sbase, "<.*?\n?.*?>", "");
}
}
StringBuilder sbtm = new StringBuilder();
bool sitaraba = false;
bool rtb = false;
if (comboBox5.Text != "")
{
sbase = Regex.Replace(sbase, comboBox5.Text, "XX:XX");
}
if (comboBox4.SelectedIndex == 1)
{
sitaraba = true;
}
else if (comboBox4.Text.Contains("RTB変換"))
{
rtb = true;
}
else if (comboBox4.Text.Contains("RTB収集"))
{
string regst = "(\\d+位.+\n)+※.+集計時点";
if (checkBox9.Checked == true)
{
//regst = "\\d+位の.*?pt(\r\r)?\\d+(,\\d{3})*pt\r\n(現在の順位.+\r\n)?※.+集計時点";
regst = "\\d+位の.*?pt.*?\\d+(,\\d{3})* pt\r\n※.+集計時点";
int seek = sbase.IndexOf("選択チーム");
if (seek > 0) {
sbase = sbase.Substring(seek, sbase.Length - seek - 1);
sbase = sbase.Replace("現在の順位\r\n", "");
sbase = sbase.Replace("集計中\r\n", "");
sbase = Regex.Replace(sbase, "\\d+位\r\n", "");
sbase = sbase.Replace("pt\r\n", "pt\t");
sbase = sbase.Replace("pt\t※", "pt\r\n※");
sbase = Regex.Replace(sbase, "pt\tチーム.+\r\n", "pt\r\n");
}
}
if (checkBox12.Checked == true)
{
regst = "((.*?)(\\d+位.+\n))+※.+集計時点";
}
Regex ranks = new Regex(regst);
Match rankm = ranks.Match(sbase);
if (rankm.Success) {
sbtm.AppendLine();
sbtm.AppendLine(rankm.Value);
if (savetime.Checked == true)
{
sbtm.AppendLine(DateTime.Now.ToString("※MM/dd HH:mm:ss 保存時刻(゚∀゚)\r\n"));
}
}
sbase = sbase.Replace("みんなでビートptをためて『フィーバーライブ』を開催しよう!\r\nフィーバーライブにアピールすることで、「新シアターくじ券」を獲得できます!\r\n", "");
DateTime nw = DateTime.Now;
Regex ls = new Regex("総(マスターズ|ラウンジ)pt\r\n(\\d+(,\\d+)*) pt");
Match lm = ls.Match(sbase);
Regex fs = new Regex("本日の総フェス勝利数\r\n(\\d+ / \\d+)\r\n\r\n※.+集計時点");
Match fm = fs.Match(sbase);
Regex ts = new Regex("(本日の達成|連?続?フィーバー|フィーバーライブ開催)まで(\r\n)?あと[ \t]+\\d+(,\\d+)*[ \t]+pt\r\n(.*\r\n){0,3}※.+集計時点");
Match tm = ts.Match(sbase);
Regex idols = new Regex("(.+\r\n){3}※.+集計時点の思い出");
Match idolm = idols.Match(sbase);
Regex asm = new Regex("応援ゲージMAXまで あと\r\n?\\d+(,\\d+)* ASpt\r\n\r\n応援ゲージ: \\d+ %");
Match asmm = asm.Match(sbase);
if (lm.Success)
{
sbtm.AppendLine("|");
sbtm.AppendLine(lm.Value);
sbtm.AppendLine(nw.ToString("※MM/dd HH:mm 集計時点 らうんじ"));
}
if (fm.Success)
{
sbtm.AppendLine("|");
sbtm.AppendLine(fm.Value);
}
if (tm.Success)
{
sbtm.AppendLine("|");
sbtm.AppendLine(tm.Value);
}
if (idolm.Success)
{
sbtm.AppendLine("|");
sbtm.AppendLine(idolm.Value);
}
if (asmm.Success)
{
sbtm.AppendLine("|");
sbtm.AppendLine(asmm.Value);
sbtm.AppendLine(DateTime.Now.ToString("※MM/dd HH:mm 集計時点のASpt"));
}
if (checkBox9.Checked == true)
{
string rr = sbtm.ToString();
rr = Regex.Replace(rr, "現在.*?\r\n", "");
return rr;
}
return sbtm.ToString();
}
else if (comboBox4.Text.Contains("全PT収集"))
{
Regex ranks = new Regex("報酬獲得者数[\\t ]+全\\d+名\r\n獲得者数上限アップまであと[\\t ]+\\d+(,\\d{3})* pt\r\nイベント参加者総獲得pt[\\t ]+\\d+(,\\d{3})* pt\r\n※.+集計時点");
Match rankm = ranks.Match(sbase);
if (rankm.Success)
{
sbtm.AppendLine();
sbtm.AppendLine(rankm.Value);
}
return sbtm.ToString();
}
else if (comboBox4.Text.Contains("中間/最終全収集"))
{
int start = sbase.IndexOf("前へ次へ");
int end = sbase.LastIndexOf("前へ次へ")-start;
if (end-start>8)
{
sbase = sbase.Substring(start + 4, end - 4);
sbase = Regex.Replace(sbase, "^\t", "");
sbtm.AppendLine(DateTime.Now.ToString("//yyyyMMddHHmm"));
sbtm.AppendLine(sbase);
}
return sbtm.ToString();
}
else if (comboBox4.Text.Contains("GREE"))
{
int start = sbase.IndexOf("アイドルランキング");
int end = sbase.LastIndexOf("イベントTOP") - start;
if (end - start > 8)
{
sbase = sbase.Substring(start + 4, end - 4);
sbase = Regex.Replace(sbase, "^\t", "");
sbase = sbase.Replace("を選択中", "");
sbase = Regex.Replace(sbase, "^\t\t", "N位");
sbase = Regex.Replace(sbase, "\t\t", "");
sbase = Regex.Replace(sbase, "\r\n", "\t");
sbase = Regex.Replace(sbase, "pt\t", "pt\r\n");
//sbtm.AppendLine(DateTime.Now.ToString("//yyyyMMddHHmm"));
sbtm.Append(sbase);
sbtm.AppendLine(DateTime.Now.ToString("※MM/dd HH:mm 集計時点 BYそくどん\r\n"));
}
return sbtm.ToString();
}
else if (comboBox4.Text.Contains("100/500/1200/3000収集"))
{
Regex ranks = new Regex("(\\d+0|\t1?1|765)位.+\n.+\n.+pt (\\d+(,\\d{3})*)");
Match rankm = ranks.Match(sbase);
int interval = 20;
int mtime = 10;
int dlay = interval;
if (comboBox4.Text.Contains("※")) {
string tmp2 =comboBox4.Text.Substring(comboBox4.Text.LastIndexOf("※"),comboBox4.Text.Length-comboBox4.Text.LastIndexOf("※"));
Regex dd = new Regex("\\d+");
Match ddm = dd.Match(tmp2);
if(ddm.Success){
interval = Convert.ToInt32(ddm.Value);
ddm = ddm.NextMatch();
mtime = Convert.ToInt32(ddm.Value);
ddm = ddm.NextMatch();
dlay = Convert.ToInt32(ddm.Value);
if (interval == mtime) {
interval = 20;
mtime = 10;
dlay = 20;
}
}
}
DateTime nw = DateTime.Now.AddMinutes(-interval);
if (interval > 1)
{
while (true)
{
if (Convert.ToInt32(nw.ToString("mm")) % interval == mtime)
{
goto exs;
}
nw = nw.AddMinutes(1);
}
}
else {
nw = DateTime.Now;
}
exs:
if (rankm.Success)
{
bool ranks_add = checkBox12.Checked;
if(ranks_add == false) {
sbtm.Append( DateTime.Now.ToString("yyyyMMddHHmm"));
sbtm.Append("(");
sbtm.Append(nw.ToString("yyyyMMddHHmm"));
if (checkBox9.Checked == true)
{
sbtm.Append("\t");
}
else
{
sbtm.AppendLine(")");
}
if (checkBox9.Checked == true)
{
Regex idol = new Regex("(秋月律子|天海春香|伊吹翼|エミリー|大神環|春日未来|音無小鳥|我那覇響|菊地真|如月千早|北上麗花|北沢志保|木下ひなた|高坂海美|佐竹美奈子|四条貴音|篠宮可憐|島原エレナ|ジュリア|周防桃子|高槻やよい|高山紗代子|田中琴葉|天空橋朋花|徳川まつり|所恵美|豊川風花|中谷育|永吉昴|七尾百合子|二階堂千鶴|野々原茜|萩原雪歩|箱崎星梨花|馬場このみ|福田のり子|双海亜美|双海真美|星井美希|舞浜歩|真壁瑞希|松田亜利沙|三浦あずさ|宮尾美也|水瀬伊織|最上静香|望月杏奈|百瀬莉緒|矢吹可奈|横山奈緒|ロコ)");
Match idm = idol.Match(sbase);
if (idm.Success)
{
sbtm.Append(idm.Value);
sbtm.Append("\t");
Regex aranks = new Regex("(\\d+)位.+\n.+\n.+pt \\d+(,\\d{3})*");
Match arankm = aranks.Match(sbase);
while(arankm.Success){
sbtm.Append(Regex.Replace(arankm.Value, ".+\r\n.+\r\n.+pt ", "").Trim());
sbtm.Append("\t");
arankm= arankm.NextMatch();
}
}
}
else {
while(rankm.Success){
sbtm.AppendLine(Regex.Replace(rankm.Value, ".+\r\n.+\r\n.+pt ", "").Trim());
rankm= rankm.NextMatch();
}
}
}
else{
GroupCollection groups = rankm.Groups;
while (rankm.Success)
{
sbtm.Append(rankm.Groups[1]);
sbtm.Append("位\t");
sbtm.Append(rankm.Groups[2]);
sbtm.AppendLine(" pt");
rankm = rankm.NextMatch();
}
sbtm.AppendLine(DateTime.Now.ToString("※MM/dd HH:mm 集計時点 BYそくどん\r\n"));
}
}
sbtm.AppendLine();
return sbtm.ToString();
}
string[] str = sbase.Split(new string[] { "\n", "\r\n" }, StringSplitOptions.None);
string[] strs = str[0].Split(new string[] { "\t" }, StringSplitOptions.None);
StringBuilder sb = new StringBuilder();
DateTime dt;
DateTime utcTime;
DateTime localTime;
int base100=0;
int base500=0;
int base1200=0;
List<BorderTBL> arr = new List<BorderTBL>();
SorterByTimer sorter = new SorterByTimer();
DateTime t = DateTime.Now;
int[] jsoku = new int[7];
string baseyear = "2015/";
string basenyear = "2016/";
if (comboBox4.Text.Contains("BASEYEAR"))
{
Regex by = new Regex("20\\d\\d");
Match bym = by.Match(comboBox4.Text);
if (bym.Success)
{
baseyear = bym.Value+"/";
DateTime dd = new DateTime(Convert.ToInt32(bym.Value), 1, 1, 0, 00,0, 0);
basenyear = dd.AddYears(1).ToString("yyyy/");
}
}
else if (comboBox4.Text.Contains("IMC"))
{
sbtm.AppendLine(DateTime.Now.ToString("//yyyyMMddHHmm"));
bool add = false;
foreach (string s in str)
{
if (comboBox4.Text.Contains("ぷれみあ"))
{
if (s.Contains("ステージ詳細") == true)
{
add = false;
}
else if (s.Contains("ステージ状況") == true)
{
add = true;
}
else if (add == true)
{
sbtm.AppendLine(s);
}
}
else
{
if (s.Contains("イベントTOPへ") == true)
{
add = false;
}
else if (s.Contains("自ラウンジ") == true)
{
add = true;
}
else if (add == true)
{
sbtm.AppendLine(s);
}
}
}
return sbtm.ToString();
}
if (comboBox4.Text.Contains("HTML"))
{
if (checkBox9.Checked == true)
{
int start = sbase.IndexOf("memberStatus");
int end = sbase.IndexOf("mySwiper");
if (start > 0) {
string sss = sbase.Substring(start, end - start);
sss = Regex.Replace(sss, ",\r\n?", "\r\n");
sss = Regex.Replace(sss,"var.+", "");
sss = Regex.Replace(sss, "memberStatus.+", "");
sss = Regex.Replace(sss, "unitLevel.+", "");
sss = Regex.Replace(sss, "centerIdol.+", "");
sss = Regex.Replace(sss, "unitStatus.+", "");
sss = Regex.Replace(sss, "user.+", "");
sss = Regex.Replace(sss, "'", "");
sss = Regex.Replace(sss, "};", "");
sss = Regex.Replace(sss, "<.*?>", "");
sss = Regex.Replace(sss, ".*?[a-z]:", "");
sss = Regex.Replace(sss, " +", "");
sss = Regex.Replace(sss, "\t+", "");
sss = Regex.Replace(sss, ",\r\n", "\t");
sss = Regex.Replace(sss, "\n+", "");
sss = Regex.Replace(sss, "\r", "\r\n");
sss = Regex.Replace(sss, "pt\t", "pt\r\n");
sss = Regex.Replace(sss, "(チーム[A-Z])\r\n(\\d+)\r\n", "$2位の$1 pt\t");
sss = Regex.Replace(sss, " ", " ");
if (checkBox12.Checked == true)
{
sss = Regex.Replace(sss, "\r\n\r\n", "\r\n");
sss = Regex.Replace(sss, "\r\n\r\n", "\r\n");
Regex idol = new Regex("※.+集計時点");
Match idm = idol.Match(sss);
sss = Regex.Replace(sss, "※.+集計時点\r\n", "");
sss = sss + idm.Value+ "\r\n";
}
sbtm.AppendLine(sss);
}
return sbtm.ToString();
}
string ll="<a href=\"http://imas.gree-apps.net/app/index.php/lounge/profile/id/(\\d+)\" ?>(.*?)</a>";
string ff ="<span class=\"txt-sub2\">ファン数/週 </span>(\\d+(,\\d+)*)人";
string uu= "<a href=\"http://imas.gree-apps.net/app/index.php/mypage/user_profile/id/(\\d+)\" ?>(.*?)</a>";
string ss = "<span class=\"txt-sub2\">.*? </span>(\\d+(,\\d+)*)";
string kidol = "<li class=\"tab-item tab-base is-active\">(.*?)</li>";
string kiz = "<span class=\"txt-sub2\">絆(Lv|Exp).*?</span>(\\d+)";
if (checkBox12.Checked) {
uu = "ZZ";
ll = "XX";
ss = "SS";
}
Regex lounge = new Regex(ll);
Regex fansuu = new Regex(ff);
Regex user = new Regex(uu);
Regex score = new Regex(ss);
Regex ki = new Regex(kidol);
Regex kz = new Regex(kiz);
int i = 0;
string temp = "";
int rankct = 0;
foreach (string s in str)
{
Match lm = lounge.Match(s);
Match fm = fansuu.Match(s);
Match um = user.Match(s);
Match sm = score.Match(s);
Match kim = ki.Match(s);
Match kzm = kz.Match(s);
if (lm.Success) {
sbtm.Append(Regex.Replace(lm.Value, ll, "$2\t$1\t"));
}
if (fm.Success)
{
sbtm.AppendLine(Regex.Replace(fm.Value, ff, "$1"));
}
if (um.Success)
{
sbtm.Append(Regex.Replace(um.Value, uu, "$2\t$1\t"));
}
if (kim.Success)
{
if (i == 0)
{
temp = Regex.Replace(kim.Value, kidol, "$1");
i++;
}
else
{
rankct= Convert.ToInt32(Regex.Replace(kim.Value, kidol, "$1").Replace("トップ", "1位").Replace("位", ""));
if (rankct == 100) {
rankct=91;
}
i = 0;
}
}
if (kzm.Success)
{
if (i == 0)
{
if (rankct == 1 || rankct == 10 || rankct==100){
sbtm.Append(temp);
sbtm.Append("\t");
sbtm.Append(rankct.ToString());
sbtm.Append("位\t");
sbtm.Append(Regex.Replace(kzm.Value, kiz, "$2"));
}
i++;
}
else
{
if (rankct == 1 || rankct == 10 || rankct == 100)
{
sbtm.AppendLine(Regex.Replace(kzm.Value, kiz, ".$2"));
}
rankct++;
i = 0;
}
}
if (sm.Success)
{
sbtm.AppendLine(Regex.Replace(sm.Value, ss, "$1"));
}
}
sbtm.AppendLine(DateTime.Now.ToString("※MM/dd HH:mm 集計時点 BYそくどん\r\n"));
return sbtm.ToString().Replace(",","");
}
string tyear = baseyear;
string tmp = "";
string pthout = textBox4.Text;
string datetimes = comboBox1.Text;
if (checkBox1.Checked == false)
{
datetimes = "HH:mm";
}
if (comboBox4.SelectedIndex == 6) {
pthout = ".?";
}
if (textBox3.Text == "") {
textBox3.Text = "0";
}
int line = 0;
int outlim = 0;
int.TryParse(textBox3.Text, NumberStyles.Integer, NumberFormatInfo.CurrentInfo, out line);
int.TryParse(textBox5.Text, NumberStyles.Integer, NumberFormatInfo.CurrentInfo, out outlim);
bool cms= checkBox8.Checked;
if (radioButton3.Checked == true && str.Length>0)
{
if (DateTime.TryParse(str[0], out dt))
{
sb.AppendLine(dt.ToShortDateString());
}
StringBuilder sb10 = new StringBuilder();
StringBuilder sb11 = new StringBuilder();
StringBuilder sb50 = new StringBuilder();
StringBuilder sb30 = new StringBuilder();
StringBuilder sb100 = new StringBuilder();
StringBuilder sb5000 = new StringBuilder();
StringBuilder sb5001 = new StringBuilder();
if (radioButton2.Checked == false)
{
string[] legend = comboBox3.Text.Split(new string[] { "/" }, StringSplitOptions.None);
if (legend.Length > 4)
{
sb10.AppendLine(legend[0]);
sb50.AppendLine(legend[1]);
sb11.AppendLine(legend[2]);
sb30.AppendLine(legend[3]);
sb100.AppendLine(legend[4]);
}
else
{
sb10.AppendLine("100位");
sb50.AppendLine("500位");
sb30.AppendLine("3000位");
sb100.AppendLine("10000位");
if (comboBox2.SelectedIndex < comboBox2.Items.Count - 18)
{
sb11.AppendLine("1200位");
}
else if (comboBox2.SelectedIndex < comboBox2.Items.Count - 8)
{
sb11.AppendLine("1100位");
}
else
{
sb11.AppendLine("1000位");
}
}
if (sitaraba==true)
{
Regex bases = new Regex("\\d+(,\\d{3})*");
Match bm= bases.Match(comboBox3.Text);
base100=Convert.ToInt32(bm.Value);
bm = bm.NextMatch();
base500 = Convert.ToInt32(bm.Value);
bm = bm.NextMatch();
base1200 = Convert.ToInt32(bm.Value);
}
}
else
{
if (rtb == true)
{
Regex ra = new Regex("(\\d+位[\\t ]+\\d+(,\\d{3})*.*?\n)+※");
Match ram = ra.Match(sbase);
if (ram.Success)
{
Regex ra2 = new Regex("\\d+位");
Match ra2m = ra2.Match(ram.Value);
int p=1;
Array.Resize(ref strs, 16);
while (ra2m.Success)
{
strs[2 * p - 1] = ra2m.Value;
ra2m = ra2m.NextMatch();
p++;
if (p > 7)
{
break;
}
}
}
}
if (strs.Length > 6){
sb10.AppendLine(strs[1]);
sb50.AppendLine(strs[3]);
sb11.AppendLine(strs[5]);
if (strs.Length > 8)
{
sb30.AppendLine(strs[7]);
if (strs.Length > 10)
{
sb100.AppendLine(strs[9]);
if (strs.Length > 12)
{
sb5000.AppendLine(strs[11]);
if (strs.Length > 14)
{
sb5001.AppendLine(strs[13]);
}
}
}
}
}
}
bool ok = true;
int f = -7;
foreach (string s in str)
{
string[] str2 = s.Split(new string[] { "\t" }, StringSplitOptions.None);
f++;
if (line > 0)
{
line--;
}
else
{