Skip to content

Commit 385aeb9

Browse files
added more options
1 parent 181fda1 commit 385aeb9

File tree

3 files changed

+240
-37
lines changed

3 files changed

+240
-37
lines changed

TranslateFileNamesForm/Form1.Designer.cs

Lines changed: 42 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

TranslateFileNamesForm/Form1.cs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
using BrightIdeasSoftware;
1212
using System.ComponentModel;
1313
using System.Collections;
14+
using System.Security.Policy;
15+
using System;
1416

1517
namespace TranslateFileNamesForm
1618
{
@@ -129,6 +131,7 @@ public void UpdateProgressBar()
129131
private void ClearItemsOnList()
130132
{
131133
fastObjListView1.ClearObjects();
134+
FilterText.Clear();
132135
QtyFilesToCheck = 0;
133136
QtyFilesRenameCandidate = -1;
134137
pBar1.Visible = false;
@@ -467,6 +470,36 @@ private void RefreshList_Click(object sender, EventArgs e)
467470
{
468471
AddFilesToList(_path);
469472
}
473+
474+
private void linkLabelISO6391LangCode_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
475+
{
476+
string url = "https://wikipedia.org/wiki/List_of_ISO_639-1_codes";
477+
try
478+
{
479+
Process.Start(url);
480+
}
481+
catch
482+
{
483+
// hack because of this: https://github.com/dotnet/corefx/issues/10361
484+
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
485+
{
486+
url = url.Replace("&", "^&");
487+
Process.Start(new ProcessStartInfo(url) { UseShellExecute = true });
488+
}
489+
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
490+
{
491+
Process.Start("xdg-open", url);
492+
}
493+
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
494+
{
495+
Process.Start("open", url);
496+
}
497+
else
498+
{
499+
throw;
500+
}
501+
}
502+
}
470503
}
471504

472505
public class TranslateFilenamesFrm : TranslateFilenames

0 commit comments

Comments
 (0)