private void butProxyRemove_Click(object sender, RoutedEventArgs e) { LvProxyItem lvi = ((LvProxyItem)lvProxy.SelectedItem); if (lvi != null) { infoManager.RemoveProxyByName(lvi.profileName); infoManager.updateProxiesList(); infoManager.saveProxiesList(); } }
private void butProxyEdit_Click(object sender, RoutedEventArgs e) { LvProxyItem lvi = ((LvProxyItem)lvProxy.SelectedItem); if (lvi != null) { ProxyInfo pi = (ProxyInfo)infoManager.GetProxyByName(lvi.profileName); tbProxyName.Text = pi.name; tbProxyIpAddress.Text = pi.ip; tbProxyPassword.Text = pi.password; tbProxyUsername.Text = pi.username; } }