Skip to content

Commit

Permalink
release version 0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zmcj21 committed Feb 12, 2022
1 parent 821fa8c commit 24392b1
Show file tree
Hide file tree
Showing 8 changed files with 179 additions and 30 deletions.
Binary file added res/images/FLASH TO EXE-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
115 changes: 114 additions & 1 deletion src/OpenSWF2EXE/OpenSWF2EXE/AboutForm.Designer.cs

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

43 changes: 33 additions & 10 deletions src/OpenSWF2EXE/OpenSWF2EXE/AboutForm.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,43 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Diagnostics;

namespace OpenSWF2EXE
{
public partial class AboutForm : Form
{
#region LocaleSetting

private string AuthorTextCN = "作者:";
private string AuthorTextEN = "Author:";

private string EmailTextCN = "邮箱:";
private string EmailTextEN = "Email:";

private string GithubTextCN = "Github:";
private string GithubTextEN = "Github:";

#endregion

public AboutForm()
{
InitializeComponent();
if (MainWindow.humanLanguage == HumanLanguage.Chinese)
{
AuthorText.Text = AuthorTextCN;
EmailText.Text = EmailTextCN;
GithubText.Text = GithubTextCN;
}
else if (MainWindow.humanLanguage == HumanLanguage.English)
{
AuthorText.Text = AuthorTextEN;
EmailText.Text = EmailTextEN;
GithubText.Text = GithubTextEN;
}
}

//ref:https://stackoverflow.com/questions/502199/how-to-open-a-web-page-from-my-application
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Process.Start(new ProcessStartInfo { FileName = githubLink.Text, UseShellExecute = true });
}
}
}
}
4 changes: 2 additions & 2 deletions src/OpenSWF2EXE/OpenSWF2EXE/MainWindow.Designer.cs

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

28 changes: 14 additions & 14 deletions src/OpenSWF2EXE/OpenSWF2EXE/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public enum SWF2EXE_Result

public partial class MainWindow : Form
{
private HumanLanguage humanLanguage;
public static HumanLanguage humanLanguage;

#region LocaleSetting

Expand Down Expand Up @@ -73,7 +73,7 @@ public partial class MainWindow : Form

private void SetLocale(HumanLanguage humanLanguage)
{
this.humanLanguage = humanLanguage;
MainWindow.humanLanguage = humanLanguage;
switch (humanLanguage)
{
case HumanLanguage.Chinese:
Expand Down Expand Up @@ -256,11 +256,11 @@ private void ConvertButton_Click(object sender, EventArgs e)

if (string.IsNullOrWhiteSpace(flashPlayerPath))
{
if (this.humanLanguage == HumanLanguage.Chinese)
if (MainWindow.humanLanguage == HumanLanguage.Chinese)
{
ConsoleWriteLine("FlashPlayer路径不能为空!!!");
}
else if (this.humanLanguage == HumanLanguage.English)
else if (MainWindow.humanLanguage == HumanLanguage.English)
{
ConsoleWriteLine("FlashPlayer's path can't be empty!!!");
}
Expand All @@ -269,11 +269,11 @@ private void ConvertButton_Click(object sender, EventArgs e)

if (string.IsNullOrWhiteSpace(flashSWFPath))
{
if (this.humanLanguage == HumanLanguage.Chinese)
if (MainWindow.humanLanguage == HumanLanguage.Chinese)
{
ConsoleWriteLine("swf文件路径不能为空!!!");
}
else if (this.humanLanguage == HumanLanguage.English)
else if (MainWindow.humanLanguage == HumanLanguage.English)
{
ConsoleWriteLine("swf file's path can't be empty!!!");
}
Expand All @@ -282,11 +282,11 @@ private void ConvertButton_Click(object sender, EventArgs e)

if (string.IsNullOrWhiteSpace(outputPath))
{
if (this.humanLanguage == HumanLanguage.Chinese)
if (MainWindow.humanLanguage == HumanLanguage.Chinese)
{
ConsoleWriteLine("输出路径必须被指定!!!");
}
else if (this.humanLanguage == HumanLanguage.English)
else if (MainWindow.humanLanguage == HumanLanguage.English)
{
ConsoleWriteLine("output folder must be specified!!!");
}
Expand All @@ -302,11 +302,11 @@ private void ConvertButton_Click(object sender, EventArgs e)
{
case SWF2EXE_Result.OK:
{
if (this.humanLanguage == HumanLanguage.Chinese)
if (MainWindow.humanLanguage == HumanLanguage.Chinese)
{
ConsoleWriteLine("转换成功。");
}
else if (this.humanLanguage == HumanLanguage.English)
else if (MainWindow.humanLanguage == HumanLanguage.English)
{
ConsoleWriteLine("Work Success.");
}
Expand All @@ -319,11 +319,11 @@ private void ConvertButton_Click(object sender, EventArgs e)
break;
case SWF2EXE_Result.FlashPlayerInvalid:
{
if (this.humanLanguage == HumanLanguage.Chinese)
if (MainWindow.humanLanguage == HumanLanguage.Chinese)
{
ConsoleWriteLine("FlashPlayer无效!!!");
}
else if (this.humanLanguage == HumanLanguage.English)
else if (MainWindow.humanLanguage == HumanLanguage.English)
{
ConsoleWriteLine("FlashPlayer invalid!!!");
}
Expand All @@ -332,11 +332,11 @@ private void ConvertButton_Click(object sender, EventArgs e)
break;
case SWF2EXE_Result.FlashSWFInvalid:
{
if (this.humanLanguage == HumanLanguage.Chinese)
if (MainWindow.humanLanguage == HumanLanguage.Chinese)
{
ConsoleWriteLine("Flash文件无效!!!");
}
else if (this.humanLanguage == HumanLanguage.English)
else if (MainWindow.humanLanguage == HumanLanguage.English)
{
ConsoleWriteLine("Flash File invalid!!!");
}
Expand Down
10 changes: 10 additions & 0 deletions src/OpenSWF2EXE/OpenSWF2EXE/Properties/Resources.Designer.cs

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

9 changes: 6 additions & 3 deletions src/OpenSWF2EXE/OpenSWF2EXE/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,16 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="FLASH TO EXE-3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\FLASH TO EXE-3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 24392b1

Please sign in to comment.