/// <summary> /// Hide the notification window. /// </summary> public void Hide() { System.Diagnostics.Debug.WriteLine("Animation stopped."); System.Diagnostics.Debug.WriteLine("Wait timer stopped."); tmrAnimation.Stop(); tmrWait.Stop(); frmPopup.Hide(); }
/// <summary> /// Hide the notification window. /// </summary> public void Hide() { tmrAnimation.Stop(); tmrWait.Stop(); frmPopup.Hide(); if (markedForDisposed) { Dispose(); } }
private void timer1_Tick(object sender, EventArgs e) { timer1.Enabled = false; if (timelist.Count > 0) { for (int i = 0; i < timelist.Count; i++) { if (timelist[i] <= getcurrenttime()) { timelist.RemoveAt(i); message_cont.RemoveAt(i); message_type.RemoveAt(i); message_image.RemoveAt(i); i--; } } System.Diagnostics.Debug.WriteLine("Current timeout removed list count" + timelist.Count); int temp_count = 5 - timelist.Count; for (int j = 0; j < temp_count; j++) { if (timelist_wait.Count > 0) { timelist.Add(getcurrenttime() + pop_show_time); message_type.Add(message_cont_wait[0]); message_cont.Add(message_type_wait[0]); message_image.Add(message_image_wait[0]); System.Diagnostics.Debug.WriteLine("waiting list count" + timelist_wait.Count); System.Diagnostics.Debug.WriteLine(message_cont_wait[0]); timelist_wait.RemoveAt(0); message_cont_wait.RemoveAt(0); message_type_wait.RemoveAt(0); message_image_wait.RemoveAt(0); } else { break; } } if (timelist.Count > 0) { System.Diagnostics.Debug.WriteLine("showing list count" + timelist.Count); int temp = (int)(timelist[0] - getcurrenttime());; if (temp > 0) { System.Diagnostics.Debug.WriteLine("Next timeout of list update system" + temp); timer1.Interval = (temp * 1000); timer1.Enabled = true; } else { timer1.Interval = 1; timer1.Enabled = true; } } else { //none } } else { //none } frmPopup.cont_post = timelist.Count; frmPopup.timelist_data = timelist; frmPopup.message_cont_show = message_cont; frmPopup.message_type_show = message_type; frmPopup.message_image_show = message_image; System.Diagnostics.Debug.WriteLine("refresh from function called" + timelist.Count); refreshform(false); // while coming down downpart is cut and then bought down cause flicks // Clearing form // frmPopup.Show(); if (timelist.Count == 0) { animation_working = false; sw.Reset(); tmrAnimation.Stop(); do_once = true; frmPopup.Hide(); System.Diagnostics.Debug.WriteLine("from hide call"); isAppearing = false; } // listBox1.DataSource = null; // listBox1.DataSource = timelist; }