Skip to content

Commit

Permalink
Release v1.00 beta
Browse files Browse the repository at this point in the history
  • Loading branch information
OtakuNekoP committed Dec 15, 2016
1 parent bd61d35 commit 72ed928
Show file tree
Hide file tree
Showing 29 changed files with 1,133 additions and 0 deletions.
Binary file not shown.
Binary file added sunxi-fex-tools-gui4win/bananalogo32.ico
Binary file not shown.
22 changes: 22 additions & 0 deletions sunxi-fex-tools-gui4win/sunxi-fex-tools-gui4win.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sunxi-fex-tools-gui4win", "sunxi-fex-tools-gui4win\sunxi-fex-tools-gui4win.csproj", "{B56E3DD3-F4B4-4916-ADDE-5F2237CA44E7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B56E3DD3-F4B4-4916-ADDE-5F2237CA44E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B56E3DD3-F4B4-4916-ADDE-5F2237CA44E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B56E3DD3-F4B4-4916-ADDE-5F2237CA44E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B56E3DD3-F4B4-4916-ADDE-5F2237CA44E7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions sunxi-fex-tools-gui4win/sunxi-fex-tools-gui4win/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>
217 changes: 217 additions & 0 deletions sunxi-fex-tools-gui4win/sunxi-fex-tools-gui4win/Form1.Designer.cs

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

143 changes: 143 additions & 0 deletions sunxi-fex-tools-gui4win/sunxi-fex-tools-gui4win/Form1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
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;//ADD
using System.IO;


namespace sunxi_fex_tools_gui4win
{
public partial class MainForm1 : Form
{
String Fexc = "bin\\sunxi-fexc.exe";
String Bin2fex = "-I bin -O fex ";
String Fex2bin = "-I fex -O bin ";
String Fex2binCmd;
String Bin2fexCmd;

public MainForm1()
{
InitializeComponent();
}

private void button2_Click(object sender, EventArgs e)
{
Bin2fexCmd = Bin2fex + PathBin.Text + " " + Path.GetDirectoryName(PathBin.Text) + "\\" + Path.GetFileNameWithoutExtension(PathBin.Text) + ".fex";
try
{
Process proc = Process.Start(Fexc, Bin2fexCmd);
if (proc != null)
{
proc.WaitForExit();
MessageBox.Show(String.Format("bin2fex转换成功!", this.Fexc), this.Text,
MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
catch (ArgumentException ex)
{
MessageBox.Show(ex.Message, this.Text,
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}

private void button6_Click(object sender, EventArgs e)
{
Fex2binCmd = Fex2bin + PathFex.Text + " " + Path.GetDirectoryName(PathFex.Text) + "\\" + Path.GetFileNameWithoutExtension(PathFex.Text) + ".bin";
try
{
Process proc = Process.Start(Fexc, Fex2binCmd);
if (proc != null)
{
proc.WaitForExit();
MessageBox.Show(String.Format("fex2bin转换成功!", this.Fexc), this.Text,
MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
catch (ArgumentException ex)
{
MessageBox.Show(ex.Message, this.Text,
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}

private void button4_Click(object sender, EventArgs e)
{
if (openBinDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
System.IO.StreamReader sr = new
System.IO.StreamReader(openBinDialog.FileName);
sr.Close();
PathBin.Text = openBinDialog.FileName;
}
}

private void button5_Click(object sender, EventArgs e)
{
if (openFexDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
System.IO.StreamReader sr = new
System.IO.StreamReader(openFexDialog.FileName);
sr.Close();
PathFex.Text = openFexDialog.FileName;
}
}


private void button1_Click(object sender, EventArgs e)
{

}

private void About_Click(object sender, EventArgs e)
{
MessageBox.Show("关于 Allwinner 配置档转换工具\n\n版本 v1.0 beta\n\nLicense:\nGPLv2\n\nOpen Source Components:\nsunxi-tools (https://github.com/linux-sunxi/sunxi-tools)\nCygwin (https://www.cygwin.com/)\n");
}

private void PathFex_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))
{
e.Effect = DragDropEffects.Link;
}
else
{
e.Effect = DragDropEffects.None;
}
}

private void PathFex_DragDrop(object sender, DragEventArgs e)
{
string path = ((System.Array)e.Data.GetData(DataFormats.FileDrop)).GetValue(0).ToString();
this.PathFex.Text = path;
}

private void PathBin_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))
{
e.Effect = DragDropEffects.Link;
}
else
{
e.Effect = DragDropEffects.None;
}
}

private void PathBin_DragDrop(object sender, DragEventArgs e)
{
string path = ((System.Array)e.Data.GetData(DataFormats.FileDrop)).GetValue(0).ToString();
this.PathBin.Text = path;
}

private void Exit_Click(object sender, EventArgs e)
{
Application.Exit();
}
}
}
Loading

0 comments on commit 72ed928

Please sign in to comment.