private void Ap_Closing(object sender, System.ComponentModel.CancelEventArgs e) { Trace.WriteLine("CLOSE WIN AUTOPING"); LongtaskPingCANCELING.analiz_closing_thread(_ping, _pingPREPARE); winap = null; ap.stop(); ap.Dispose(); ap = null; Update_collection(typefilter.last); }
/// <summary> /// AUTO PING /// </summary> /// <param name="parameter"></param> async void key_AUTOPING(object parameter) { if (Wait.IsOpen) { return; } if (LongtaskPingCANCELING.isENABLE()) { return; } if (myLISTbase == null) { return; } if (myLISTbase.Count == 0) { return; } if (winap != null) { return; } _ping = new PING(); _pingPREPARE = new PING_prepare(_ping); ap = new AUTOPING(_ping, _pingPREPARE); winap = new WindowPING { Title = "АВТО ПИНГ", Topmost = true, WindowStyle = WindowStyle.ThreeDBorderWindow,//WindowStyle.ToolWindow, Name = "winPING" }; winap.Closing += Ap_Closing; winap.Show(); await ap.start(); //winap.Owner = MainWindow.header; }