private void p_Click(object sender, EventArgs e) { try { fShowPoster fSP = new fShowPoster(); fSP.Tag = (sender as Control).Tag; fSP.ShowDialog(); } catch { MessageBox.Show("Щось пішло не так :("); } }
private void timer1_Tick(object sender, EventArgs e) { try { if (MessageList.Count == 0) { return; } fShowPoster fSP = new fShowPoster(); fSP.Tag = MessageList[kol]; fSP.ShowDialog(); kol++; if (kol == MessageList.Count) { kol = 0; } } catch { MessageBox.Show("Щось пішло не так :("); } }