-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathConfigViewModel.cs
942 lines (921 loc) · 30.9 KB
/
ConfigViewModel.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
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using System;
using System.Diagnostics;
using System.Windows.Input;
namespace BouyomiPlugin
{
class ConfigViewModel : ViewModelBase
{
private const int VoiceTypeSapi5Offset = 10001;
private readonly int VoiceTypeLength = Enum.GetNames(typeof(FNF.Utility.VoiceType)).Length;
private readonly Options _options;
public bool IsEnabled
{
get { return _options.IsEnabled; }
set { _options.IsEnabled = value; }
}
public string ExeLocation
{
get { return _options.BouyomiChanPath; }
set { _options.BouyomiChanPath = value; }
}
public bool IsReadHandleName
{
get { return _options.IsReadHandleName; }
set { _options.IsReadHandleName = value; }
}
public bool IsReadComment
{
get { return _options.IsReadComment; }
set { _options.IsReadComment = value; }
}
public bool IsAppendNickTitle
{
get { return _options.IsAppendNickTitle; }
set { _options.IsAppendNickTitle = value; }
}
public string NickTitle
{
get { return _options.NickTitle; }
set { _options.NickTitle = value; }
}
public bool Want184Read
{
get { return _options.Want184Read; }
set { _options.Want184Read = value; }
}
public bool IsExecBouyomiChanAtBoot
{
get { return _options.IsExecBouyomiChanAtBoot; }
set { _options.IsExecBouyomiChanAtBoot = value; }
}
public bool IsKillBouyomiChan
{
get { return _options.IsKillBouyomiChan; }
set { _options.IsKillBouyomiChan = value; }
}
public bool IsVoiceTypeSpecfied
{
get { return _options.IsVoiceTypeSpecfied; }
set { _options.IsVoiceTypeSpecfied = value; }
}
public int VoiceTypeSelectedIndex
{
get { var index = _options.VoiceTypeIndex; return index >= VoiceTypeSapi5Offset ? (index - VoiceTypeSapi5Offset) + VoiceTypeLength : index; }
set { _options.VoiceTypeIndex = value < 0 ? 0 : value >= VoiceTypeLength ? VoiceTypeSapi5Offset + value - VoiceTypeLength : value; }
}
public int VoiceVolume
{
get { return _options.VoiceVolume; }
set { _options.VoiceVolume = value; }
}
public int VoiceSpeed
{
get { return _options.VoiceSpeed; }
set { _options.VoiceSpeed = value; }
}
public int VoiceTone
{
get { return _options.VoiceTone; }
set { _options.VoiceTone = value; }
}
#region YouTubeLive
/// <summary>
/// YouTubeLiveの接続メッセージを読み上げるか
/// </summary>
public bool IsYouTubeLiveConnect
{
get => _options.IsYouTubeLiveConnect;
set => _options.IsYouTubeLiveConnect = value;
}
/// <summary>
/// YouTubeLiveの切断メッセージを読み上げるか
/// </summary>
public bool IsYouTubeLiveDisconnect
{
get => _options.IsYouTubeLiveDisconnect;
set => _options.IsYouTubeLiveDisconnect = value;
}
/// <summary>
/// YouTubeLiveのコメントを読み上げるか
/// </summary>
public bool IsYouTubeLiveComment
{
get => _options.IsYouTubeLiveComment;
set => _options.IsYouTubeLiveComment = value;
}
/// <summary>
/// YouTubeLiveのコメント中のスタンプを読み上げるか
/// </summary>
public bool IsYouTubeLiveCommentStamp
{
get => _options.IsYouTubeLiveCommentStamp;
set => _options.IsYouTubeLiveCommentStamp = value;
}
/// <summary>
/// YouTubeLiveのコメントのコテハンを読み上げるか
/// </summary>
public bool IsYouTubeLiveCommentNickname
{
get => _options.IsYouTubeLiveCommentNickname;
set => _options.IsYouTubeLiveCommentNickname = value;
}
/// <summary>
/// YouTubeLiveのsuper chat(投げ銭)を読み上げるか
/// </summary>
public bool IsYouTubeLiveSuperchat
{
get => _options.IsYouTubeLiveSuperchat;
set => _options.IsYouTubeLiveSuperchat = value;
}
/// <summary>
/// YouTubeLiveのsuper chat(投げ銭)のコテハンを読み上げるか
/// </summary>
public bool IsYouTubeLiveSuperchatNickname
{
get => _options.IsYouTubeLiveSuperchatNickname;
set => _options.IsYouTubeLiveSuperchatNickname = value;
}
/// <summary>
/// YouTubeLiveのメンバー登録を読み上げるか
/// </summary>
public bool IsYouTubeLiveMembership
{
get => _options.IsYouTubeLiveMembership;
set => _options.IsYouTubeLiveMembership = value;
}
/// <summary>
/// YouTubeLiveのメンバー登録のコテハンを読み上げるか
/// </summary>
public bool IsYouTubeLiveMembershipNickname
{
get => _options.IsYouTubeLiveMembershipNickname;
set => _options.IsYouTubeLiveMembershipNickname = value;
}
#endregion //YouTubeLive
#region OPENREC
/// <summary>
/// OPENRECの接続メッセージを読み上げるか
/// </summary>
public bool IsOpenrecConnect
{
get => _options.IsOpenrecConnect;
set => _options.IsOpenrecConnect = value;
}
/// <summary>
/// OPENRECの切断メッセージを読み上げるか
/// </summary>
public bool IsOpenrecDisconnect
{
get => _options.IsOpenrecDisconnect;
set => _options.IsOpenrecDisconnect = value;
}
/// <summary>
/// OPENRECのコメントを読み上げるか
/// </summary>
public bool IsOpenrecComment
{
get => _options.IsOpenrecComment;
set => _options.IsOpenrecComment = value;
}
/// <summary>
/// OPENRECのコメントのコテハンを読み上げるか
/// </summary>
public bool IsOpenrecCommentNickname
{
get => _options.IsOpenrecCommentNickname;
set => _options.IsOpenrecCommentNickname = value;
}
///// <summary>
///// OPENRECのアイテムを読み上げるか
///// </summary>
//public bool IsOpenrecItem
//{
// get => _options.IsOpenrecItem;
// set => _options.IsOpenrecItem = value;
//}
///// <summary>
///// OPENRECのアイテムのコテハンを読み上げるか
///// </summary>
//public bool IsOpenrecItemNickname
//{
// get => _options.IsOpenrecItemNickname;
// set => _options.IsOpenrecItemNickname = value;
//}
#endregion //OPENREC
#region ミクチャ
/// <summary>
/// MIXCHのコメントを読み上げるか
/// </summary>
public bool IsMixchComment
{
get => _options.IsMixchComment;
set => _options.IsMixchComment = value;
}
/// <summary>
/// MIXCHのコメントのコテハンを読み上げるか
/// </summary>
public bool IsMixchCommentNickname
{
get => _options.IsMixchCommentNickname;
set => _options.IsMixchCommentNickname = value;
}
/// <summary>
/// MIXCHのコメントで最初だけ読むか
/// </summary>
public bool IsMixchCommentOnlyFirst
{
get => _options.IsMixchCommentOnlyFirst;
set => _options.IsMixchCommentOnlyFirst = value;
}
/// <summary>
/// MIXCHのアイテムを読み上げるか
/// </summary>
public bool IsMixchItem
{
get => _options.IsMixchItem;
set => _options.IsMixchItem = value;
}
/// <summary>
/// MIXCHのアイテムのコテハンを読み上げるか
/// </summary>
public bool IsMixchItemNickname
{
get => _options.IsMixchItemNickname;
set => _options.IsMixchItemNickname = value;
}
/// <summary>
/// MIXCHのシステムメッセージを読み上げるか
/// </summary>
public bool IsMixchSystem
{
get => _options.IsMixchSystem;
set => _options.IsMixchSystem = value;
}
#endregion //MIXCH
#region Twitch
/// <summary>
/// Twitchの接続メッセージを読み上げるか
/// </summary>
public bool IsTwitchConnect
{
get => _options.IsTwitchConnect;
set => _options.IsTwitchConnect = value;
}
/// <summary>
/// Twitchの切断メッセージを読み上げるか
/// </summary>
public bool IsTwitchDisconnect
{
get => _options.IsTwitchDisconnect;
set => _options.IsTwitchDisconnect = value;
}
/// <summary>
/// Twitchのコメントを読み上げるか
/// </summary>
public bool IsTwitchComment
{
get => _options.IsTwitchComment;
set => _options.IsTwitchComment = value;
}
/// <summary>
/// Twitchのコメントのコテハンを読み上げるか
/// </summary>
public bool IsTwitchCommentNickname
{
get => _options.IsTwitchCommentNickname;
set => _options.IsTwitchCommentNickname = value;
}
/// <summary>
/// TwitchのコメントのエモートIDを読み上げるか
/// </summary>
public bool IsTwitchCommentEmoteId
{
get => _options.IsTwitchCommentEmoteId;
set => _options.IsTwitchCommentEmoteId = value;
}
/// <summary>
/// TwitchのコメントのエモートIDを何個まで読み上げるか
/// </summary>
public int TwitchMaxEmotes
{
get { return _options.TwitchMaxEmotes; }
set { _options.TwitchMaxEmotes = value; }
}
/// <summary>
/// Twitchのコメントの連続する同一エモートを省略するか
/// </summary>
public bool IsTwitchSkipSameEmote
{
get { return _options.IsTwitchSkipSameEmote; }
set { _options.IsTwitchSkipSameEmote = value; }
}
///// <summary>
///// Twitchのアイテムを読み上げるか
///// </summary>
//public bool IsTwitchItem
//{
// get => _options.IsTwitchItem;
// set => _options.IsTwitchItem = value;
//}
///// <summary>
///// Twitchのアイテムのコテハンを読み上げるか
///// </summary>
//public bool IsTwitchItemNickname
//{
// get => _options.IsTwitchItemNickname;
// set => _options.IsTwitchItemNickname = value;
//}
#endregion //Twitch
#region ニコ生
/// <summary>
/// ニコ生の接続メッセージを読み上げるか
/// </summary>
public bool IsNicoConnect
{
get => _options.IsNicoConnect;
set => _options.IsNicoConnect = value;
}
/// <summary>
/// ニコ生の切断メッセージを読み上げるか
/// </summary>
public bool IsNicoDisconnect
{
get => _options.IsNicoDisconnect;
set => _options.IsNicoDisconnect = value;
}
/// <summary>
/// ニコ生のコメントを読み上げるか
/// </summary>
public bool IsNicoComment
{
get => _options.IsNicoComment;
set => _options.IsNicoComment = value;
}
/// <summary>
/// ニコ生のコメントのコテハンを読み上げるか
/// </summary>
public bool IsNicoCommentNickname
{
get => _options.IsNicoCommentNickname;
set => _options.IsNicoCommentNickname = value;
}
/// <summary>
/// ニコ生のアイテムを読み上げるか
/// </summary>
public bool IsNicoItem
{
get => _options.IsNicoItem;
set => _options.IsNicoItem = value;
}
/// <summary>
/// ニコ生のアイテムのコテハンを読み上げるか
/// </summary>
public bool IsNicoItemNickname
{
get => _options.IsNicoItemNickname;
set => _options.IsNicoItemNickname = value;
}
/// <summary>
/// ニコ生の広告を読み上げるか
/// </summary>
public bool IsNicoAd
{
get => _options.IsNicoAd;
set => _options.IsNicoAd = value;
}
/// <summary>
/// ニコ生のリクエストを読み上げるか
/// </summary>
public bool IsNicoSpi
{
get => _options.IsNicoSpi;
set => _options.IsNicoSpi = value;
}
/// <summary>
/// ニコ生のエモーションを読み上げるか
/// </summary>
public bool IsNicoEmotion
{
get => _options.IsNicoEmotion;
set => _options.IsNicoEmotion = value;
}
#endregion //ニコ生
#region Twicas
/// <summary>
/// Twicasの接続メッセージを読み上げるか
/// </summary>
public bool IsTwicasConnect
{
get => _options.IsTwicasConnect;
set => _options.IsTwicasConnect = value;
}
/// <summary>
/// Twicasの切断メッセージを読み上げるか
/// </summary>
public bool IsTwicasDisconnect
{
get => _options.IsTwicasDisconnect;
set => _options.IsTwicasDisconnect = value;
}
/// <summary>
/// Twicasのコメントを読み上げるか
/// </summary>
public bool IsTwicasComment
{
get => _options.IsTwicasComment;
set => _options.IsTwicasComment = value;
}
/// <summary>
/// Twicasのコメントのコテハンを読み上げるか
/// </summary>
public bool IsTwicasCommentNickname
{
get => _options.IsTwicasCommentNickname;
set => _options.IsTwicasCommentNickname = value;
}
/// <summary>
/// Twicasのアイテムを読み上げるか
/// </summary>
public bool IsTwicasItem
{
get => _options.IsTwicasItem;
set => _options.IsTwicasItem = value;
}
/// <summary>
/// Twicasのアイテムのコテハンを読み上げるか
/// </summary>
public bool IsTwicasItemNickname
{
get => _options.IsTwicasItemNickname;
set => _options.IsTwicasItemNickname = value;
}
#endregion //Twicas
#region LINELIVE
/// <summary>
/// LINELIVEの接続メッセージを読み上げるか
/// </summary>
public bool IsLineLiveConnect
{
get => _options.IsLineLiveConnect;
set => _options.IsLineLiveConnect = value;
}
/// <summary>
/// LINELIVEの切断メッセージを読み上げるか
/// </summary>
public bool IsLineLiveDisconnect
{
get => _options.IsLineLiveDisconnect;
set => _options.IsLineLiveDisconnect = value;
}
/// <summary>
/// LINELIVEのコメントを読み上げるか
/// </summary>
public bool IsLineLiveComment
{
get => _options.IsLineLiveComment;
set => _options.IsLineLiveComment = value;
}
/// <summary>
/// LINELIVEのコメントのコテハンを読み上げるか
/// </summary>
public bool IsLineLiveCommentNickname
{
get => _options.IsLineLiveCommentNickname;
set => _options.IsLineLiveCommentNickname = value;
}
///// <summary>
///// LINELIVEのアイテムを読み上げるか
///// </summary>
//public bool IsLineLiveItem
//{
// get => _options.IsLineLiveItem;
// set => _options.IsLineLiveItem = value;
//}
///// <summary>
///// LINELIVEのアイテムのコテハンを読み上げるか
///// </summary>
//public bool IsLineLiveItemNickname
//{
// get => _options.IsLineLiveItemNickname;
// set => _options.IsLineLiveItemNickname = value;
//}
#endregion //LINELIVE
#region ふわっち
/// <summary>
/// ふわっちの接続メッセージを読み上げるか
/// </summary>
public bool IsWhowatchConnect
{
get => _options.IsWhowatchConnect;
set => _options.IsWhowatchConnect = value;
}
/// <summary>
/// ふわっちの切断メッセージを読み上げるか
/// </summary>
public bool IsWhowatchDisconnect
{
get => _options.IsWhowatchDisconnect;
set => _options.IsWhowatchDisconnect = value;
}
/// <summary>
/// ふわっちのコメントを読み上げるか
/// </summary>
public bool IsWhowatchComment
{
get => _options.IsWhowatchComment;
set => _options.IsWhowatchComment = value;
}
/// <summary>
/// ふわっちのコメントのコテハンを読み上げるか
/// </summary>
public bool IsWhowatchCommentNickname
{
get => _options.IsWhowatchCommentNickname;
set => _options.IsWhowatchCommentNickname = value;
}
/// <summary>
/// ふわっちのアイテムを読み上げるか
/// </summary>
public bool IsWhowatchItem
{
get => _options.IsWhowatchItem;
set => _options.IsWhowatchItem = value;
}
/// <summary>
/// ふわっちのアイテムのコテハンを読み上げるか
/// </summary>
public bool IsWhowatchItemNickname
{
get => _options.IsWhowatchItemNickname;
set => _options.IsWhowatchItemNickname = value;
}
#endregion //ふわっち
#region Mirrativ
/// <summary>
/// Mirrativの接続メッセージを読み上げるか
/// </summary>
public bool IsMirrativConnect
{
get => _options.IsMirrativConnect;
set => _options.IsMirrativConnect = value;
}
/// <summary>
/// Mirrativの切断メッセージを読み上げるか
/// </summary>
public bool IsMirrativDisconnect
{
get => _options.IsMirrativDisconnect;
set => _options.IsMirrativDisconnect = value;
}
/// <summary>
/// Mirrativのコメントを読み上げるか
/// </summary>
public bool IsMirrativComment
{
get => _options.IsMirrativComment;
set => _options.IsMirrativComment = value;
}
/// <summary>
/// Mirrativのコメントのコテハンを読み上げるか
/// </summary>
public bool IsMirrativCommentNickname
{
get => _options.IsMirrativCommentNickname;
set => _options.IsMirrativCommentNickname = value;
}
/// <summary>
/// Mirrativの入室メッセージを読み上げるか
/// </summary>
public bool IsMirrativJoinRoom
{
get => _options.IsMirrativJoinRoom;
set => _options.IsMirrativJoinRoom = value;
}
/// <summary>
/// Mirrativのアイテムを読み上げるか
/// </summary>
public bool IsMirrativItem
{
get => _options.IsMirrativItem;
set => _options.IsMirrativItem = value;
}
#endregion //Mirrativ
#region Periscope
/// <summary>
/// Periscopeの接続メッセージを読み上げるか
/// </summary>
public bool IsPeriscopeConnect
{
get => _options.IsPeriscopeConnect;
set => _options.IsPeriscopeConnect = value;
}
/// <summary>
/// Periscopeの切断メッセージを読み上げるか
/// </summary>
public bool IsPeriscopeDisconnect
{
get => _options.IsPeriscopeDisconnect;
set => _options.IsPeriscopeDisconnect = value;
}
/// <summary>
/// Periscopeのコメントを読み上げるか
/// </summary>
public bool IsPeriscopeComment
{
get => _options.IsPeriscopeComment;
set => _options.IsPeriscopeComment = value;
}
/// <summary>
/// Periscopeのコメントのコテハンを読み上げるか
/// </summary>
public bool IsPeriscopeCommentNickname
{
get => _options.IsPeriscopeCommentNickname;
set => _options.IsPeriscopeCommentNickname = value;
}
/// <summary>
/// Periscopeの入室メッセージを読み上げるか
/// </summary>
public bool IsPeriscopeJoin
{
get => _options.IsPeriscopeJoin;
set => _options.IsPeriscopeJoin = value;
}
/// <summary>
/// Periscopeのアイテムを読み上げるか
/// </summary>
public bool IsPeriscopeLeave
{
get => _options.IsPeriscopeLeave;
set => _options.IsPeriscopeLeave = value;
}
#endregion //Periscope
#region Mixer
/// <summary>
/// Mixerの接続メッセージを読み上げるか
/// </summary>
public bool IsMixerConnect
{
get => _options.IsMixerConnect;
set => _options.IsMixerConnect = value;
}
/// <summary>
/// Mixerの切断メッセージを読み上げるか
/// </summary>
public bool IsMixerDisconnect
{
get => _options.IsMixerDisconnect;
set => _options.IsMixerDisconnect = value;
}
/// <summary>
/// Mixerのコメントを読み上げるか
/// </summary>
public bool IsMixerComment
{
get => _options.IsMixerComment;
set => _options.IsMixerComment = value;
}
/// <summary>
/// Mixerのコメントのコテハンを読み上げるか
/// </summary>
public bool IsMixerCommentNickname
{
get => _options.IsMixerCommentNickname;
set => _options.IsMixerCommentNickname = value;
}
/// <summary>
/// Mixerの入室メッセージを読み上げるか
/// </summary>
public bool IsMixerJoin
{
get => _options.IsMixerJoin;
set => _options.IsMixerJoin = value;
}
/// <summary>
/// Mixerのアイテムを読み上げるか
/// </summary>
public bool IsMixerLeave
{
get => _options.IsMixerLeave;
set => _options.IsMixerLeave = value;
}
#endregion //Mixer
#region Mildom
/// <summary>
/// Mildomの接続メッセージを読み上げるか
/// </summary>
public bool IsMildomConnect
{
get => _options.IsMildomConnect;
set => _options.IsMildomConnect = value;
}
/// <summary>
/// Mildomの切断メッセージを読み上げるか
/// </summary>
public bool IsMildomDisconnect
{
get => _options.IsMildomDisconnect;
set => _options.IsMildomDisconnect = value;
}
/// <summary>
/// Mildomのコメントを読み上げるか
/// </summary>
public bool IsMildomComment
{
get => _options.IsMildomComment;
set => _options.IsMildomComment = value;
}
/// <summary>
/// Mildomのコメントのコテハンを読み上げるか
/// </summary>
public bool IsMildomCommentNickname
{
get => _options.IsMildomCommentNickname;
set => _options.IsMildomCommentNickname = value;
}
/// <summary>
/// MildomのコメントのスタンプIDを読み上げるか
/// </summary>
public bool IsMildomCommentStampId
{
get => _options.IsMildomCommentStampId;
set => _options.IsMildomCommentStampId = value;
}
/// <summary>
/// Mildomの入室メッセージを読み上げるか
/// </summary>
public bool IsMildomJoin
{
get => _options.IsMildomJoin;
set => _options.IsMildomJoin = value;
}
/// <summary>
/// Mildomのアイテムを読み上げるか
/// </summary>
public bool IsMildomLeave
{
get => _options.IsMildomLeave;
set => _options.IsMildomLeave = value;
}
#endregion //Mildom
#region ShowRoom
/// <summary>
/// ShowRoomの接続メッセージを読み上げるか
/// </summary>
//public bool IsShowRoomConnect
//{
// get => _options.IsShowRoomConnect;
// set => _options.IsShowRoomConnect = value;
//}
/// <summary>
/// ShowRoomの切断メッセージを読み上げるか
/// </summary>
//public bool IsShowRoomDisconnect
//{
// get => _options.IsShowRoomDisconnect;
// set => _options.IsShowRoomDisconnect = value;
//}
/// <summary>
/// ShowRoomのコメントを読み上げるか
/// </summary>
public bool IsShowRoomComment
{
get => _options.IsShowRoomComment;
set => _options.IsShowRoomComment = value;
}
/// <summary>
/// ShowRoomのコメントのコテハンを読み上げるか
/// </summary>
public bool IsShowRoomCommentNickname
{
get => _options.IsShowRoomCommentNickname;
set => _options.IsShowRoomCommentNickname = value;
}
/// <summary>
/// ShowRoomの入室メッセージを読み上げるか
/// </summary>
//public bool IsShowRoomJoin
//{
// get => _options.IsShowRoomJoin;
// set => _options.IsShowRoomJoin = value;
//}
/// <summary>
/// ShowRoomのアイテムを読み上げるか
/// </summary>
//public bool IsShowRoomLeave
//{
// get => _options.IsShowRoomLeave;
// set => _options.IsShowRoomLeave = value;
//}
#endregion //ShowRoom
#region BigoLive
/// <summary>
/// BigoLiveの接続メッセージを読み上げるか
/// </summary>
//public bool IsBigoLiveConnect
//{
// get => _options.IsBigoLiveConnect;
// set => _options.IsBigoLiveConnect = value;
//}
/// <summary>
/// BigoLiveの切断メッセージを読み上げるか
/// </summary>
//public bool IsBigoLiveDisconnect
//{
// get => _options.IsBigoLiveDisconnect;
// set => _options.IsBigoLiveDisconnect = value;
//}
/// <summary>
/// BigoLiveのコメントを読み上げるか
/// </summary>
public bool IsBigoLiveComment
{
get => _options.IsBigoLiveComment;
set => _options.IsBigoLiveComment = value;
}
/// <summary>
/// BigoLiveのコメントのコテハンを読み上げるか
/// </summary>
public bool IsBigoLiveCommentNickname
{
get => _options.IsBigoLiveCommentNickname;
set => _options.IsBigoLiveCommentNickname = value;
}
/// <summary>
/// BigoLiveの入室メッセージを読み上げるか
/// </summary>
//public bool IsBigoLiveJoin
//{
// get => _options.IsBigoLiveJoin;
// set => _options.IsBigoLiveJoin = value;
//}
/// <summary>
/// BigoLiveのアイテムを読み上げるか
/// </summary>
//public bool IsBigoLiveLeave
//{
// get => _options.IsBigoLiveLeave;
// set => _options.IsBigoLiveLeave = value;
//}
#endregion //BigoLive
public ICommand ShowFilePickerCommand { get; }
private void ShowFilePicker()
{
try
{
var fileDialog = new Microsoft.Win32.OpenFileDialog
{
Title = "棒読みちゃんの実行ファイル(BouyomiChan.exe)を選択してください",
Filter = "棒読みちゃん | BouyomiChan.exe"
};
var result = fileDialog.ShowDialog();
if (result == true)
{
this.ExeLocation = fileDialog.FileName;
}
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
}
}
public ConfigViewModel()
{
//if (IsInDesignMode)
//{
//}else
//{
// throw new NotSupportedException();
//}
}
[GalaSoft.MvvmLight.Ioc.PreferredConstructor]
public ConfigViewModel(Options options)
{
_options = options;
_options.PropertyChanged += (s, e) =>
{
switch (e.PropertyName)
{
case nameof(_options.IsEnabled):
RaisePropertyChanged(nameof(IsEnabled));
break;
case nameof(_options.BouyomiChanPath):
RaisePropertyChanged(nameof(ExeLocation));
break;
case nameof(_options.IsReadHandleName):
RaisePropertyChanged(nameof(IsReadHandleName));
break;
case nameof(_options.IsReadComment):
RaisePropertyChanged(nameof(IsReadComment));
break;
case nameof(_options.IsVoiceTypeSpecfied):
RaisePropertyChanged(nameof(IsVoiceTypeSpecfied));
break;
}
};
ShowFilePickerCommand = new RelayCommand(ShowFilePicker);
}
}
}