private void Window_Closed(object sender, EventArgs e) { Instance = null; try { ProxyManagerWindow.Instance?.Close(); } catch { } }
public ProxyUiWindow() { Instance = this; //ServicePointManager.ServerCertificateValidationCallback += delegate { return true; }; //ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Ssl3; InitializeComponent(); try { cmbSearchType.ItemsSource = Enum.GetValues(typeof(UserSearchType)); DataContext = m_dc = new ProxyUiWindowViewModel(); } catch (Exception ex) { MessageBox.Show($"Fatal error during startup:\r\n{ex.Message}", "Fatal Error", MessageBoxButton.OK, MessageBoxImage.Error); throw; } }
private void Window_Closed(object sender, EventArgs e) { instance = null; }