イベントを再帰的に呼び出す方法を探しています。私は次のものを持っています
private void btn_choose_Click(object sender, EventArgs e)
{
// switch statement to take the user input and decide the outcome.
switch (Convert.ToInt32(nud_cat_chooser.Value))
{
case 1:
if (Convert.ToInt32(lbl_p1_cat_1_value.Text) == Convert.ToInt32(lbl_p2_cat_1_value.Text))
{
MessageBox.Show("Stalemate");//message box to inform the user of a statemate.
playingcards card1 = player1.Dequeue();//creates tempoary instance of the abstract class playign cards to store the cards
playingcards card2 = player2.Dequeue();//creates tempoary instance of the abstract class playign cards to store the cards
assign_Values();
btn_choose_Click();
}
....
}
}
膠着状態を整理するために、もう一度 btn_choose_click イベントを呼び出したいと思います。ラベルには、assign メソッドからの値が与えられます。しかし、 btn_choose_click(); の呼び出しの実装に苦労しています。どの引数を渡す必要がありますか? 誰かが私に例を示すことができますか?
ありがとう :)