private void Start_Click(object sender, RoutedEventArgs e) { Core core = null; if (Nexon.IsChecked.Value) { core = new Nexon(webControl); } else if (Naver.IsChecked.Value) { core = new Naver(webControl); } else if (Daum.IsChecked.Value) { core = new Daum(webControl); } else if (MGame.IsChecked.Value) { core = new MGame(webControl); } else if (HanGame.IsChecked.Value) { core = new HanGame(webControl); } core.StartGame(); }
private void Login() { Core core = null; if (Nexon.IsChecked.Value) { core = new Nexon(webControl); } else if (Naver.IsChecked.Value) { core = new Naver(webControl); } else if (Daum.IsChecked.Value) { core = new Daum(webControl); } else if (MGame.IsChecked.Value) { core = new MGame(webControl); } else if (HanGame.IsChecked.Value) { core = new HanGame(webControl); } if (core == null) { MessageBox.Show("로스트사가 서버를 선택해주세요.", "알림", MessageBoxButton.OK, MessageBoxImage.Information); return; } if (Favorite.IsChecked.Value) { SetFavorite(core.GetServer()); } core.LogIn(ID.Text, PW.Password, () => { LoGin.IsEnabled = false; Naver.IsEnabled = false; Daum.IsEnabled = false; Nexon.IsEnabled = false; MGame.IsEnabled = false; HanGame.IsEnabled = false; Start.IsEnabled = true; Favorite.IsEnabled = false; MessageBox.Show("로그인에 성공하였습니다.", "알림", MessageBoxButton.OK, MessageBoxImage.Information); }); }