양식으로 연결되는 단추를 클릭하면 양식이 표시되지만 다른 양식이 나타납니다. 특정 조건이 참일 때 양식을 한 번만 호출합니다. 이것에 대한 이유는 무엇일까요? 모든 소스 코드를 보지 않고Windows 양식 자체가 중복됩니다.
if (selectedGame.NumOfPlayerShortForGame == 0)
{
bl.UpdateGamePlayerTurn(myGame.GameID, username);
GoToPlayingScreen();
}
private void GoToPlayingScreen()
{
frmPlayingScreen playingScreen = new frmPlayingScreen(myGame, username);
this.Hide();
playingScreen.Show();
}
private void timerUpdateBindings_Tick(object sender, EventArgs e)
{
timerUpdateBindings.Stop();
if (counter == 0)
{
UpdateBindings();
//myGame = bl.GetUserGame(username);
if (myGame != null)
{
if (bl.GetRemainingPlayers(myGame.GameID) == 0)
{
counter++;
GoToPlayingScreen();
}
}
}
timerUpdateBindings.Start();
}
몇 가지 코드를 게시해야합니다 .... 아래로 내려 가면서 행동을 표시하는 것이 바람직합니다. –