Dat151 progress

This commit is contained in:
dexy
2018-12-27 21:37:44 +11:00
Unverified
parent 2d77d76e0c
commit a4ca5f812d
14 changed files with 2264 additions and 191 deletions
+27
View File
@@ -47,6 +47,7 @@ namespace CodeWalker.Project.Panels
//DeleteButton.Enabled = false;
populatingui = true;
NameTextBox.Text = string.Empty;
HashesTextBox.Text = string.Empty;
populatingui = false;
}
@@ -58,6 +59,8 @@ namespace CodeWalker.Project.Panels
populatingui = true;
var zl = CurrentZoneList;
NameTextBox.Text = zl.NameHash.ToString();
StringBuilder sb = new StringBuilder();
if (zl.ZoneHashes != null)
{
@@ -87,6 +90,30 @@ namespace CodeWalker.Project.Panels
private void NameTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZoneList == null) return;
uint hash = 0;
string name = NameTextBox.Text;
if (!uint.TryParse(name, out hash))//don't re-hash hashes
{
hash = JenkHash.GenHash(name);
JenkIndex.Ensure(name);
}
//NameHashLabel.Text = "Hash: " + hash.ToString();
if (CurrentZoneList.NameHash != hash)
{
CurrentZoneList.Name = NameTextBox.Text;
CurrentZoneList.NameHash = hash;
ProjectItemChanged();
UpdateFormTitle();
}
}
private void HashesTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;