@@ -45,14 +45,24 @@ public Form1()
4545 if ( ! string . IsNullOrEmpty ( channelId ) )
4646 bGotChannelId = true ;
4747 }
48- if ( ConfigurationManager . AppSettings . AllKeys . Contains ( "bIsOnline" ) )
48+
49+ if ( ConfigurationManager . AppSettings . AllKeys . Contains ( "SelGame" ) )
4950 {
50- string strIsOnline = ConfigurationManager . AppSettings [ "bIsOnline " ] ;
51- bool bIsOnline = bool . Parse ( strIsOnline ) ;
51+ string strSelGame = ConfigurationManager . AppSettings [ "SelGame " ] ;
52+ int SelGame = int . Parse ( strSelGame ) ;
5253
53- Core . bIsOnline = bIsOnline ;
54- rbGT4USOnline . Checked = bIsOnline ;
55- rbGT4US . Checked = ! bIsOnline ;
54+ switch ( SelGame )
55+ {
56+ case 2 :
57+ rbSpec2 . Checked = true ;
58+ break ;
59+ case 1 :
60+ rbGT4USOnline . Checked = true ;
61+ break ;
62+ default :
63+ rbGT4US . Checked = true ;
64+ break ;
65+ }
5666 }
5767
5868 UpdateLoginStatusLabel ( ) ;
@@ -82,7 +92,15 @@ private void UpdateConfig()
8292 config . AppSettings . Settings [ "McPath" ] . Value = tbMcPath . Text ;
8393 config . AppSettings . Settings [ "TitleFormat" ] . Value = tbTitleFormat . Text ;
8494
85- config . AppSettings . Settings [ "bIsOnline" ] . Value = rbGT4USOnline . Checked . ToString ( ) ;
95+ if ( rbSpec2 . Checked )
96+ config . AppSettings . Settings [ "SelGame" ] . Value = "2" ;
97+ else if ( rbGT4USOnline . Checked )
98+ config . AppSettings . Settings [ "SelGame" ] . Value = "1" ;
99+ else
100+ config . AppSettings . Settings [ "SelGame" ] . Value = "0" ;
101+
102+ //config.AppSettings.Settings["bIsOnline"].Value = rbGT4USOnline.Checked.ToString();
103+ //config.AppSettings.Settings["bIsSpec2"].Value = rbSpec2.Checked.ToString();
86104
87105 config . AppSettings . Settings [ "authToken" ] . Value = authToken ;
88106 config . AppSettings . Settings [ "channelId" ] . Value = channelId ;
@@ -238,5 +256,11 @@ private void btAPIKey_Click(object sender, EventArgs e)
238256 //else
239257 // ApiKey = "";
240258 }
259+
260+ private void rbSpec2_CheckedChanged ( object sender , EventArgs e )
261+ {
262+ Core . bIsOnline = rbSpec2 . Checked ;
263+ Core . bIsSpec2 = rbSpec2 . Checked ;
264+ }
241265 }
242266}
0 commit comments