本文整理汇总了C#中IE.GetIEPassword方法的典型用法代码示例。如果您正苦于以下问题:C# IE.GetIEPassword方法的具体用法?C# IE.GetIEPassword怎么用?C# IE.GetIEPassword使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IE
的用法示例。
在下文中一共展示了IE.GetIEPassword方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DisplayPassword
/// <summary>
/// Get's the passwords for all the browser's
/// </summary>
private void DisplayPassword()
{
Chrome chrome = new Chrome();
IE ie = new IE();
// List of users/passes
SortableBindingList<LoginVisible> loginArray = new SortableBindingList<LoginVisible>();
// Variables
const string chromeBrowser = "Chrome";
const string IEBrowser = "IE";
// For each url in getpasswords, add a password
foreach (var url in chrome.GetPasswords())
{
loginArray.Add(new LoginVisible(url.UserName, url.Url, url.Password, url.visitDate, chromeBrowser));
}
foreach (var url in Firefox.getPasswords())
{
loginArray.Add(url);
}
foreach (var url in ie.GetIEPassword())
{
loginArray.Add(url);
}
// If the "show Passwords" checkbox is not checked, don't show the passwords
if (Settings.Default.showFullPassword == false)
{
// New list to hold values
SortableBindingList<LoginVisible> loginArrayNew = new SortableBindingList<LoginVisible>();
foreach (LoginVisible url in loginArray)
{
// Number of digits to replace
int length = url.Password.Length;
//Add a new login with DOTS instead of the password
loginArrayNew.Add(new LoginVisible(url.UserName, url.Url,
url.Password.Replace(url.Password,
string.Concat(Enumerable.Repeat("\u25CF",
length))),
url.visitDate, url.Browser));
}
// Sets the dataGridView source to logins
dataGridView1.AutoGenerateColumns = true;
this.dataGridView1.DataSource = this.loginBindingSource;
dataGridView1.DataSource = loginArrayNew;
}
else
{
// Sets the dataGridView source to logins
dataGridView1.AutoGenerateColumns = true;
this.dataGridView1.DataSource = this.loginBindingSource;
dataGridView1.DataSource = loginArray;
}
}