Skip to content

Commit

Permalink
CheckBoxList replaced with ListView, group actions added. Release can…
Browse files Browse the repository at this point in the history
…dindate #2.
  • Loading branch information
ClusterM committed Oct 6, 2017
1 parent 2f3c362 commit a45674a
Show file tree
Hide file tree
Showing 16 changed files with 1,337 additions and 2,183 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ driver/usb_driver/
obj/
*.csproj.user
*.pfx
Properties/Resources*.cs
8 changes: 3 additions & 5 deletions Apps/NesMiniApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -539,11 +539,7 @@ public long Size(string path = null)
DirectoryInfo dir = new DirectoryInfo(path);

if (!dir.Exists)
{
throw new DirectoryNotFoundException(
"Source directory does not exist or could not be found: "
+ path);
}
return 0;

DirectoryInfo[] dirs = dir.GetDirectories();
FileInfo[] files = dir.GetFiles();
Expand Down Expand Up @@ -604,6 +600,7 @@ public static Bitmap LoadBitmap(string path)

public string[] CompressPossible()
{
if (!Directory.Exists(GamePath)) return new string[0];
var result = new List<string>();
var exec = Regex.Replace(Command, "['/\\\"]", " ") + " ";
var files = Directory.GetFiles(GamePath, "*.*", SearchOption.TopDirectoryOnly);
Expand All @@ -621,6 +618,7 @@ public string[] CompressPossible()

public string[] DecompressPossible()
{
if (!Directory.Exists(GamePath)) return new string[0];
var result = new List<string>();
var exec = Regex.Replace(Command, "['/\\\"]", " ") + " ";
var files = Directory.GetFiles(GamePath, "*.7z", SearchOption.TopDirectoryOnly);
Expand Down
8 changes: 4 additions & 4 deletions ConfigIni.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace com.clusterrr.hakchi_gui
{
public class ConfigIni
{
public static bool FirstRun = true;
public static int RunCount = 0;
public static string SelectedGamesNes = "default";
public static string SelectedGamesSnes = "default";
public static string HiddenGamesNes = "";
Expand Down Expand Up @@ -245,8 +245,8 @@ public static void Load()
case "usefont":
UseFont = !value.ToLower().Equals("false");
break;
case "firstrun":
FirstRun = !value.ToLower().Equals("false");
case "runcount":
RunCount = int.Parse(value);
break;
case "antiarmetlevel":
AntiArmetLevel = byte.Parse(value);
Expand Down Expand Up @@ -318,7 +318,6 @@ public static void Save()
configLines.Add(string.Format("ResetHack={0}", ResetHack));
configLines.Add(string.Format("AutofireHack={0}", AutofireHack));
configLines.Add(string.Format("AutofireXYHack={0}", AutofireXYHack));
configLines.Add(string.Format("FirstRun={0}", FirstRun));
configLines.Add(string.Format("AntiArmetLevel={0}", AntiArmetLevel));
configLines.Add(string.Format("ResetCombination={0}", (byte)ResetCombination));
configLines.Add(string.Format("ConsoleType={0}", (byte)ConsoleType));
Expand All @@ -329,6 +328,7 @@ public static void Save()
configLines.Add(string.Format("Compress={0}", Compress));
configLines.Add(string.Format("FtpServer={0}", FtpServer));
configLines.Add(string.Format("TelnetServer={0}", TelnetServer));
configLines.Add(string.Format("RunCount={0}", RunCount));

configLines.Add("");
configLines.Add("[Presets]");
Expand Down
98 changes: 98 additions & 0 deletions ConsoleSelectDialog.Designer.cs

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

43 changes: 43 additions & 0 deletions ConsoleSelectDialog.cs
Original file line number Diff line number Diff line change
@@ -0,0 +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.Windows.Forms;

namespace com.clusterrr.hakchi_gui
{
public partial class ConsoleSelectDialog : Form
{
public ConsoleSelectDialog()
{
InitializeComponent();
}

private void buttonNes_Click(object sender, EventArgs e)
{
ConfigIni.ConsoleType = MainForm.ConsoleType.NES;
Close();
}

private void buttonFamicom_Click(object sender, EventArgs e)
{
ConfigIni.ConsoleType = MainForm.ConsoleType.Famicom;
Close();
}

private void buttonSnes_Click(object sender, EventArgs e)
{
ConfigIni.ConsoleType = MainForm.ConsoleType.SNES;
Close();
}

private void buttonSuperFamicom_Click(object sender, EventArgs e)
{
ConfigIni.ConsoleType = MainForm.ConsoleType.SuperFamicom;
Close();
}
}
}
Loading

0 comments on commit a45674a

Please sign in to comment.