private void btnCalc_Click(object sender, EventArgs e) { tbFNV32.Text = "0x" + FNV32.GetHash(tbInput.Text).ToString("X8"); tbFNV64.Text = "0x" + FNV64.GetHash(tbInput.Text).ToString("X16"); tbCLIPIID.Text = "0x" + FNV64CLIP.GetHash(tbInput.Text).ToString("X16"); tbFVV24.Text = "0x" + FNV24.GetHash(tbInput.Text).ToString("X6"); }
private void tbClipName_TextChanged(object sender, EventArgs e) { tbIID.Text = string.Format("0x{0:X16}", FNV64CLIP.GetHash(tbClipName.Text)); }
private void btnOK_Click(object sender, EventArgs e) { try { folderBrowserDialog1.SelectedPath = CLIPexportAsNewName.Properties.Settings.Default.LastExportFolder; DialogResult dr = folderBrowserDialog1.ShowDialog(); if (dr != System.Windows.Forms.DialogResult.OK) { return; } CLIPexportAsNewName.Properties.Settings.Default.LastExportFolder = folderBrowserDialog1.SelectedPath; CLIPexportAsNewName.Properties.Settings.Default.Save(); string filename = Path.Combine(folderBrowserDialog1.SelectedPath, String.Format("S3_{0:X8}_{1:X8}_{2:X16}_{3}%%+CLIP.animation", 0x6B20C4F3, Program.CurrentGroup, FNV64CLIP.GetHash(tbClipName.Text), tbClipName.Text)); if (File.Exists(filename) && CopyableMessageBox.Show(String.Format("File '{0}' exists.\n\nReplace?", Path.GetFileName(filename)), "File exists", CopyableMessageBoxButtons.YesNo, CopyableMessageBoxIcon.Question, 1, 1) != 0) { return; } using (BinaryWriter w = new BinaryWriter(new FileStream(filename, FileMode.Create))) { w.Write(data); w.Close(); } Environment.ExitCode = 0; } finally { this.Close(); } }
private void btnCLIPIID_Click(object sender, EventArgs e) { tbInstance.Text = "0x" + FNV64CLIP.GetHash(tbName.Text).ToString("X16"); }