Skip to content

Commit

Permalink
Minor Improvements and Upgrades
Browse files Browse the repository at this point in the history
- Config.json cleaned
- Groups.json added (WIP)
- GUI.Main.cs about string corrected to reflect Archimedes
- GUI.RdbSearch.cs implemented for searching Arc instance data
- Structures.RdbStruct.cs (Arc) Search method and overloads/enums implemented to support searching instance data.
- Structures.Settings.cs several dead settings removed
- Tabs.Styles.RDB2.cs Filter() method implemented created to support Arc instance data searching
- Utilities.CryptoUtility.cs implemented for generating MD5 password hash
-
  • Loading branch information
iSmokeDrow committed Mar 10, 2022
1 parent 4fc720e commit 42bac15
Show file tree
Hide file tree
Showing 22 changed files with 900 additions and 87 deletions.
5 changes: 1 addition & 4 deletions Config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,14 @@
"SortColumn": "epic"
},
"DB": {
"Engine": 0,
"IP": "(local)",
"Port": 1433,
"Trusted": true,
"WorldName": "Arcadia",
"WorldUser": "",
"WorldPass": "",
"Backup": false,
"DropOnExport": false,
"ScriptsDirectory": ".\\Scripts",
"Timeout": 0
"ScriptsDirectory": ".\\Scripts"
},
"RDB": {
"Struct_AutoLoad": true,
Expand Down
37 changes: 31 additions & 6 deletions GUI/Main.Designer.cs

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

50 changes: 26 additions & 24 deletions GUI/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,16 +190,12 @@ private void Main_KeyDown(object sender, KeyEventArgs e)
break;
}
}
else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.F) // TODO: implement searching the Arc instance for data
else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.F)
{
//if (tManager.ArcInstance.RowCount > 0)
//{
// using (ListInput input = new ListInput("RDB Search", tManager.ArcInstance.VisibleCellNames))
// if (input.ShowDialog(this) == DialogResult.OK)
// tManager.RDBTab.Search(input.Field, input.Term);
//}
//else
// Log.Information("Cannot activate ListInput without loaded data!");
if (tManager.ArcInstance.RowCount > 0)
tManager.RDBTab.Filter();
else
Log.Warning("Cannot activate search without loaded data!");
}
else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.S)
{
Expand Down Expand Up @@ -250,13 +246,13 @@ private void aboutLbl_Click(object sender, EventArgs e)
{
string gVersion = System.Windows.Forms.Application.ProductVersion;
string dCore_Version = FileVersionInfo.GetVersionInfo("DataCore.dll").FileVersion;
string rCore_Version = FileVersionInfo.GetVersionInfo("Daedalus.dll").FileVersion;
string aboutStr = string.Format("Grimoire v{0}\nDataCore v{1}\nDaedalus v{2}\n\nWritten by: iSmokeDrow\n\n" +
//string rCore_Version = FileVersionInfo.GetVersionInfo("Daedalus.dll").FileVersion;
string aboutStr = $"Grimoire v{gVersion}\nDataCore v{dCore_Version}\nArchimedes v1.0.0\n\nWritten by: iSmokeDrow\n\n" +
"Third-Party Software:\n\t-Newtonsoft.JSON\n\t-SeriLog\n\t-MoonSharp\n\t-Be.HexBox\n\t-BrightIdeaSoftware.ObjectListView\n" +
"\n\nSpecial Thanks:\n\t- Glandu2\n\t- Gangor\n\t- InkDevil\n\t- XavierDeFawks\n\t- ThunderNikk\n\t- Exterminator\n\t"+
"- Medaion\n\t- AziaMafia\n\t- ADRENALINE\n\t- Musta2\n\t- OceanWisdom\n\t- Sandro\n\t- Smashley\n\t- Bernyy\n\n" +
"And a very special thanks to everyone who uses Grimoire! Please report bugs you may find to iSmokeDrow#3102 on Discord!",
gVersion, dCore_Version, rCore_Version);
"And a very special thanks to everyone who uses Grimoire! Please report bugs you may find to iSmokeDrow#3102 on Discord!";

MessageBox.Show(aboutStr, "About Me", MessageBoxButtons.OK, MessageBoxIcon.Information);
}

Expand Down Expand Up @@ -291,21 +287,27 @@ private void ts_xor_editor_Click(object sender, EventArgs e)

private void ts_test_btn_Click(object sender, EventArgs e)
{
tManager.Create(Style.RDB2);
//string structPath = $"{System.IO.Directory.GetCurrentDirectory()}\\Structures\\StringResource_TEST.lua";
//string rdbPath = $"{System.IO.Directory.GetCurrentDirectory()}\\Output\\db_string.rdb";

//Structures.StructureObject structObj = new Structures.StructureObject(structPath);

//Stopwatch sw = new Stopwatch();
//tManager.ArcInstance.Search("id", 910023, SearchReturn.Indicies);
}

//sw.Start();
private void ts_utilities_md5_Click(object sender, EventArgs e)
{
try
{
string salt = DialogUtility.RequestInput<string>("Input Required", "Enter salt (e.g. 2011)", DialogUtility.DialogType.Text);
string password = DialogUtility.RequestInput<string>("Input Required", "Enter your password", DialogUtility.DialogType.Text);

//structObj.Read(rdbPath);
string hashedStr = CryptoUtility.GenerateMD5Hash($"{salt}{password}");

//sw.Stop();
Clipboard.SetText(hashedStr);

//MessageBox.Show($"{structObj.Rows.Count} rows loaded in {StringExt.MilisecondsToString(sw.ElapsedMilliseconds)}");
LogUtility.MessageBoxAndLog($"{hashedStr} copied to clipboard!", "Hash Successful!", LogEventLevel.Information);
}
catch (Exception ex)
{
LogUtility.MessageBoxAndLog(ex, "generating an MD5 hash", "Hash Exception", LogEventLevel.Error);
return;
}
}
}
}
Loading

0 comments on commit 42bac15

Please sign in to comment.