我正在寻找一种递归调用事件的方法。我有以下
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 事件来理清僵局。标签将从分配方法中获得值。但我正在努力实现对 btn_choose_click() 的调用;我必须通过什么论据?谁能给我一个例子?
谢谢 :)