private void DoHideAuto() { myForm.Hide(); HideTimer.Enabled = false; FocusTimer.Enabled = false; }
private void button2_Click(object sender, EventArgs e) { Program.AnimateWindow(form.Handle, 1000, Program.AW_HIDE | Program.AW_HOR_POSITIVE); form.Hide(); }
//метод закртия текущей и переход к необходимой форме public static void vibor(Form p, Form l) { p.Show(); l.Hide(); }
void doneBtnClick(Object sender, EventArgs e) { colorSelectForm.Hide(); }
// All game's mechanics is there private void timer1_Tick(object sender, EventArgs e) { CardForm.Hide(); timer1.Enabled = false; if (firstCard != -1 && secondCard != -1) { if (firstCard == secondCard) // Player open two equal cards { firstButton.Hide(); secondButton.Hide(); if (groupBox1.Enabled) // Player 1 { var li = listView1.Items.Add("", firstCard); li.Focused = true; scoreP1++; label2.Refresh(); } else // Player 2 { var li = listView2.Items.Add("", firstCard); li.Focused = true; scoreP2++; label5.Refresh(); } if (GameField_NoCards()) // win conditions { if (scoreP1 > scoreP2) { WinGame(nameP1); //by scores } else if (scoreP2 > scoreP1) { WinGame(nameP2); } else // if scores is equal - see who spend less time if (timeP1 > timeP2) { WinGame(nameP1); } else if (timeP2 > timeP1) { WinGame(nameP2); } else { WinGame("Wow! It's imposible. We have two winners!"); } } } else // Turn goes to another player { groupBox1.Enabled = !groupBox1.Enabled; groupBox2.Enabled = !groupBox2.Enabled; } firstCard = secondCard = -1; GameField_HideImages(); //TestGameField(); GameField_Enable(true); } }
private void FinishShortRest() { _form.Hide(); }