Skip to content

Commit

Permalink
Update to 1.5.4
Browse files Browse the repository at this point in the history
See Releases for the changelog
  • Loading branch information
tiuub committed May 22, 2021
1 parent 8be4bbf commit 42090e7
Show file tree
Hide file tree
Showing 34 changed files with 1,078 additions and 750 deletions.
4 changes: 3 additions & 1 deletion Dependencies/KeeOtp/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# KeeOtp

**KeeOtp(1)** ([source](https://github.com/tiuub/KeeOtpMirror)/[archive](http://web.archive.org/web/20200621144226/https://bitbucket.org/devinmartin/keeotp/wiki/Home)) by [devinmartin](https://bitbucket.org/devinmartin) - License: [MIT](http://web.archive.org/web/20200621144226/https://bitbucket.org/devinmartin/keeotp/wiki/Home)
Dependencie | Source | NuGet | Author | License
--- | --- | --- | --- | ---
**KeeOtp(1)** | [source](https://github.com/tiuub/KeeOtpMirror)/[archive](http://web.archive.org/web/20200621144226/https://bitbucket.org/devinmartin/keeotp/wiki/Home) | - | [devinmartin](https://bitbucket.org/devinmartin) | [MIT](https://github.com/tiuub/KeeOtp2/blob/master/Dependencies/KeeOtp/LICENSE)
11 changes: 9 additions & 2 deletions Dependencies/MaterialDesignIcons/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Material design icons

**Material design icons** ([source](https://github.com/google/material-design-icons)/[direct](https://material.io/resources/icons)) by [Google](https://about.google) - License: [Apache License Version 2.0](https://github.com/google/material-design-icons/blob/master/LICENSE)
### Icons

Icons used: [info](https://material.io/resources/icons/?icon=info&style=baseline), [lock](https://material.io/resources/icons/?icon=lock&style=baseline), [qr_code](https://material.io/resources/icons/?icon=qr_code&style=baseline), [schedule](https://material.io/resources/icons/?icon=schedule&style=baseline), [settings](https://material.io/resources/icons/?icon=settings&style=baseline)
Icon | Source | Brand | Author | License
--- | --- | --- | --- | ---
**info** | [Google Fonts](https://material.io/resources/icons/?icon=info&style=baseline) | **Material design icons** | [Google](https://about.google) | [Apache License Version 2.0](https://github.com/tiuub/KeeOtp2/blob/master/Dependencies/MaterialDesignIcons/LICENSE)
**lock** | [Google Fonts](https://material.io/resources/icons/?icon=lock&style=baseline) | **Material design icons** | [Google](https://about.google) | [Apache License Version 2.0](https://github.com/tiuub/KeeOtp2/blob/master/Dependencies/MaterialDesignIcons/LICENSE)
**qr_code** | [Google Fonts](https://material.io/resources/icons/?icon=qr_code&style=baseline) | **Material design icons** | [Google](https://about.google) | [Apache License Version 2.0](https://github.com/tiuub/KeeOtp2/blob/master/Dependencies/MaterialDesignIcons/LICENSE)
**schedule** | [Google Fonts](https://material.io/resources/icons/?icon=schedule&style=baseline) | **Material design icons** | [Google](https://about.google) | [Apache License Version 2.0](https://github.com/tiuub/KeeOtp2/blob/master/Dependencies/MaterialDesignIcons/LICENSE)
**settings** | [Google Fonts](https://material.io/resources/icons/?icon=settings&style=baseline) | **Material design icons** | [Google](https://about.google) | [Apache License Version 2.0](https://github.com/tiuub/KeeOtp2/blob/master/Dependencies/MaterialDesignIcons/LICENSE)
**help** | [Google Fonts](https://material.io/resources/icons/?icon=help&style=baseline) | **Material design icons** | [Google](https://about.google) | [Apache License Version 2.0](https://github.com/tiuub/KeeOtp2/blob/master/Dependencies/MaterialDesignIcons/LICENSE)
4 changes: 3 additions & 1 deletion Dependencies/OtpSharp/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# OtpSharp

**OtpSharp** ([source](https://bitbucket.org/devinmartin/otp-sharp/wiki/Home)/[archive](http://web.archive.org/web/20200805171740/https://bitbucket.org/devinmartin/otp-sharp/wiki/Home) or [NuGet](https://www.nuget.org/packages/OtpSharp/)) by [devinmartin](https://bitbucket.org/devinmartin) - License: [MIT](https://s3.amazonaws.com/OtpSharp/LICENSE.txt)
Dependencie | Source | NuGet | Author | License
--- | --- | --- | --- | ---
**OtpSharp** | [source](https://bitbucket.org/devinmartin/otp-sharp/wiki/Home)/[archive](http://web.archive.org/web/20200805171740/https://bitbucket.org/devinmartin/otp-sharp/wiki/Home) | [NuGet](https://www.nuget.org/packages/OtpSharp/) | [devinmartin](https://bitbucket.org/devinmartin) | [MIT](https://github.com/tiuub/KeeOtp2/blob/master/Dependencies/OtpSharp/LICENSE)
4 changes: 3 additions & 1 deletion Dependencies/Yort.Ntp.Portable/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Yort.Ntp.Portable

**Yort.Ntp.Portable** ([source](https://github.com/Yortw/Yort.Ntp) or [NuGet](https://www.nuget.org/packages/Yort.Ntp.Portable/)) by [Yortw](https://github.com/Yortw) - License: [MIT](https://github.com/Yortw/Yort.Ntp/blob/master/LICENSE.md)
Dependencie | Source | NuGet | Author | License
--- | --- | --- | --- | ---
**Yort.Ntp.Portable** | [source](https://github.com/Yortw/Yort.Ntp) | [NuGet](https://www.nuget.org/packages/Yort.Ntp.Portable/) | [Yortw](https://github.com/Yortw) | [MIT](https://github.com/tiuub/KeeOtp2/blob/master/Dependencies/Yort.Ntp.Portable/LICENSE)
4 changes: 3 additions & 1 deletion Dependencies/ZXing.Net/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# ZXing.Net

**ZXing** ([source](https://github.com/micjahn/ZXing.Net/) or [NuGet](https://www.nuget.org/packages/ZXing.Net/)) by [micjahn](https://github.com/micjahn/) - License: [Apache 2.0](https://github.com/micjahn/ZXing.Net/blob/master/COPYING)
Dependencie | Source | NuGet | Author | License
--- | --- | --- | --- | ---
**ZXing.Net** | [source](https://github.com/micjahn/ZXing.Net/) | [NuGet](https://www.nuget.org/packages/ZXing.Net/) | [micjahn](https://github.com/micjahn/) | [Apache 2.0](https://github.com/tiuub/KeeOtp2/blob/master/Dependencies/ZXing.Net/LICENSE)
58 changes: 29 additions & 29 deletions KeeOtp2/Forms/About.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 37 additions & 19 deletions KeeOtp2/Forms/About.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,30 @@ public About(IPluginHost host)
pictureBoxBanner.Height,
KeePass.UI.BannerStyle.Default,
Resources.info_white,
"About",
"KeeOtp2 Plugin.");
KeeOtp2Statics.About,
KeeOtp2Statics.AboutSubline);

this.Icon = host.MainWindow.Icon;

this.host = host;
this.TopMost = host.MainWindow.TopMost;

groupBoxDependencies.Text = KeeOtp2Statics.Dependencies;
linkLabelGitHubRepository.Text = KeeOtp2Statics.GitHubRepository;
linkLabelDonate.Text = KeeOtp2Statics.Doante;
buttonOK.Text = KeeOtp2Statics.OK;
}

private void About_Load(object sender, EventArgs e)
{
this.Left = this.host.MainWindow.Left + 20;
this.Top = this.host.MainWindow.Top + 20;

groupBoxAbout.Text = KeeOtp2Statics.About;

Assembly assembly = Assembly.GetExecutingAssembly();
System.Diagnostics.FileVersionInfo fvi = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);

labelAbout.Text = new StringBuilder(labelAbout.Text).Replace("{VERSION}", fvi.FileVersion).ToString();
labelAbout.Text = String.Format(KeeOtp2Statics.AboutDisclaimer, fvi.FileVersion);

loadDependencies();
}
Expand All @@ -48,9 +54,9 @@ private void loadDependencies()
{
clv_Dependencies.Clear();

clv_Dependencies.Columns.Add("Package", 100);
clv_Dependencies.Columns.Add("Author", 80);
clv_Dependencies.Columns.Add("License", 80);
clv_Dependencies.Columns.Add(KeeOtp2Statics.Dependencie, 100);
clv_Dependencies.Columns.Add(KeeOtp2Statics.Author, 80);
clv_Dependencies.Columns.Add(KeeOtp2Statics.License, 80);

ListViewItem lvi = new ListViewItem("KeeOtp(1)");
lvi.SubItems.Add("devinmartin");
Expand Down Expand Up @@ -82,23 +88,35 @@ private void loadDependencies()
lvi.Tag = null;
clv_Dependencies.Items.Add(lvi);

lvi = new ListViewItem("NHotkey");
lvi.SubItems.Add("thomaslevesque");
lvi.SubItems.Add("Apache 2.0");
lvi.Tag = Resources.NHotkeyLICENSE;
clv_Dependencies.Items.Add(lvi);

lvi = new ListViewItem("NHotkey.WindowsForms");
lvi.SubItems.Add("thomaslevesque");
lvi.SubItems.Add("Apache 2.0");
lvi.Tag = Resources.NHotkeyWindowsFormsLICENSE;
clv_Dependencies.Items.Add(lvi);

lvi = new ListViewItem("Material Icons");
lvi.SubItems.Add("Google");
lvi.SubItems.Add("Apache License Version 2.0");
lvi.Tag = Resources.MaterialDesignIconsLICENSE;
clv_Dependencies.Items.Add(lvi);
}

private void llbl_Donate_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
private void linkLabelGitHubRepository_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5F5QB7744AD5G&source=url");
llbl_Donate.LinkVisited = true;
System.Diagnostics.Process.Start(KeeOtp2Statics.RepositoryLicenseLink);
linkLabelGitHubRepository.LinkVisited = true;
}

private void llbl_GitHubRepository_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
private void linkLabelDonate_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("https://github.com/tiuub/KeeOtp2");
llbl_GitHubRepository.LinkVisited = true;
System.Diagnostics.Process.Start(KeeOtp2Statics.DonateLink);
linkLabelDonate.LinkVisited = true;
}

private void clv_Dependencies_Click(object sender, EventArgs e)
Expand All @@ -110,8 +128,8 @@ private void clv_Dependencies_Click(object sender, EventArgs e)

if (columnindex < 2)
{
if (MessageBox.Show("The GitHub Repository will now be opened.\nYou can open the ReadMe and scroll down, until you see Dependencies. There you will find references to the source code, the author and the license of the dependencies.\n\nDo you want to continue?", "Dependencies", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
System.Diagnostics.Process.Start("https://github.com/tiuub/KeeOtp2");
if (MessageBox.Show(KeeOtp2Statics.AboutMessageBoxOpenRepository, KeeOtp2Statics.Dependencies, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
System.Diagnostics.Process.Start(KeeOtp2Statics.RepositoryLicenseLink);

}
else
Expand All @@ -120,21 +138,21 @@ private void clv_Dependencies_Click(object sender, EventArgs e)
hideLicense();
if (lvi.Tag != null)
{
showLicense(lvi.Text, lvi.Tag.ToString());
showLicense(lvi.Text, lvi.SubItems[1].Text, lvi.Tag.ToString());
}
else
MessageBox.Show(String.Format("Cant load license of {0}.\n\nJust try to open the GitHub Repository and scroll down, until Dependencies. There are all licenses!", lvi.Text), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show(String.Format(KeeOtp2Statics.AboutMessageBoxCantLoadLicense, lvi.Text), KeeOtp2Statics.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}

private void showLicense(string dependencie, string license)
private void showLicense(string dependencie, string author, string license)
{
groupBoxDependencies.Anchor -= AnchorStyles.Bottom;
int groupBoxLicenseHeight = 101;
this.Height = this.Height + groupBoxLicenseHeight + groupBoxDependencies.Margin.All * 2;

groupBoxLicense = new GroupBox();
groupBoxLicense.Text = "License - " + dependencie;
groupBoxLicense.Text = String.Format("{0} - {1} by {2}", KeeOtp2Statics.License, dependencie, author);
groupBoxLicense.Left = groupBoxDependencies.Left;
groupBoxLicense.Top = groupBoxDependencies.Bottom + groupBoxDependencies.Margin.All * 2;
groupBoxLicense.Width = groupBoxDependencies.Width;
Expand Down
Loading

0 comments on commit 42090e7

Please sign in to comment.