11using System ;
22using System . Collections . Generic ;
3+ using System . Diagnostics ;
34using System . IO ;
45using System . Linq ;
56using System . Text ;
@@ -11,6 +12,14 @@ namespace MayhemFamiliar
1112{
1213 public partial class MainForm : Form
1314 {
15+ private class Url
16+ {
17+ public const string CustomYourAction = "https://poslogithub.github.io/MayhemFamiliarCustom/your-action.html" ;
18+ public const string CustomOpponentsAction = "https://poslogithub.github.io/MayhemFamiliarCustom/opponent-action.html" ;
19+ public const string CustomOpponentsThirdAction = "https://poslogithub.github.io/MayhemFamiliarCustom/opponent-third-action.html" ;
20+ public const string CustomLimited = "https://poslogithub.github.io/MayhemFamiliarCustom/limited.html" ;
21+ }
22+
1423 // UI用
1524 private Dictionary < string , ComboBox > _comboBoxSynthesizers = new Dictionary < string , ComboBox > ( ) ;
1625 private Dictionary < string , Button > _buttonTestSpeaks = new Dictionary < string , Button > ( ) ;
@@ -26,7 +35,7 @@ public partial class MainForm : Form
2635 private LogWatcher _logWatcer ;
2736 private JsonParser _jsonParser ;
2837 private DialogueGenerator _dialogueGenerator ;
29- private Speaker _speaker ;
38+ private DialogueSpeaker _speaker ;
3039 private CancellationTokenSource _ctsLogWatcher , _ctsJsonParser , _ctsDialogueGenerator , _ctsSpeaker ;
3140 private Boolean _readFullLog = false ;
3241
@@ -404,7 +413,7 @@ private async void Form_Shown(object sender, EventArgs e)
404413 break ;
405414 }
406415 }
407- _speaker = new Speaker ( synthesizers [ PlayerWho . You ] , synthesizers [ PlayerWho . Opponent ] ) ;
416+ _speaker = new DialogueSpeaker ( synthesizers [ PlayerWho . You ] , synthesizers [ PlayerWho . Opponent ] ) ;
408417
409418 _ctsSpeaker = new CancellationTokenSource ( ) ;
410419 Task . Run ( ( ) => _speaker . Start ( _ctsSpeaker . Token ) ) ;
@@ -574,6 +583,27 @@ private string GetLargestCardDatabaseFilePath(string cardDatabaseDirectoryPath)
574583 }
575584 return cardDatabaseFile ;
576585 }
586+
587+ private void linkLabelCustomYourAction_LinkClicked ( object sender , LinkLabelLinkClickedEventArgs e )
588+ {
589+ Process . Start ( Url . CustomYourAction ) ;
590+ }
591+
592+ private void linkLabelCustomOpponentsAction_LinkClicked ( object sender , LinkLabelLinkClickedEventArgs e )
593+ {
594+ Process . Start ( Url . CustomOpponentsAction ) ;
595+ }
596+
597+ private void linkLabelCustomOpponentsThirdAction_LinkClicked ( object sender , LinkLabelLinkClickedEventArgs e )
598+ {
599+ Process . Start ( Url . CustomOpponentsThirdAction ) ;
600+ }
601+
602+ private void linkLabelCustomLimited_LinkClicked ( object sender , LinkLabelLinkClickedEventArgs e )
603+ {
604+ Process . Start ( Url . CustomLimited ) ;
605+ }
606+
577607 private string GetCardDatabaseFilePath ( )
578608 {
579609 string cardDatabaseDirectoryPath = Program . _config . MtgArenaSettings ? . CardDatabaseDirectoryPath ?? DefaultValue . CardDatabaseDirectory ;
0 commit comments