From d59b1e82c718ed22a14b4499def42d9c78e17eb8 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 24 Jun 2012 03:45:56 +0000 Subject: [PATCH] As usual, I forgot to check in new winform files --- BizHawk.MultiClient/tools/HexFind.Designer.cs | 88 +++++++++++++ BizHawk.MultiClient/tools/HexFind.cs | 47 +++++++ BizHawk.MultiClient/tools/HexFind.resx | 120 ++++++++++++++++++ 3 files changed, 255 insertions(+) create mode 100644 BizHawk.MultiClient/tools/HexFind.Designer.cs create mode 100644 BizHawk.MultiClient/tools/HexFind.cs create mode 100644 BizHawk.MultiClient/tools/HexFind.resx diff --git a/BizHawk.MultiClient/tools/HexFind.Designer.cs b/BizHawk.MultiClient/tools/HexFind.Designer.cs new file mode 100644 index 0000000000..2aa9436506 --- /dev/null +++ b/BizHawk.MultiClient/tools/HexFind.Designer.cs @@ -0,0 +1,88 @@ +namespace BizHawk.MultiClient +{ + partial class HexFind + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.FindBox = new System.Windows.Forms.TextBox(); + this.Find_Prev = new System.Windows.Forms.Button(); + this.Find_Next = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // FindBox + // + this.FindBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper; + this.FindBox.Location = new System.Drawing.Point(13, 12); + this.FindBox.Name = "FindBox"; + this.FindBox.Size = new System.Drawing.Size(156, 20); + this.FindBox.TabIndex = 0; + // + // Find_Prev + // + this.Find_Prev.Location = new System.Drawing.Point(13, 39); + this.Find_Prev.Name = "Find_Prev"; + this.Find_Prev.Size = new System.Drawing.Size(75, 23); + this.Find_Prev.TabIndex = 1; + this.Find_Prev.Text = "Find Prev"; + this.Find_Prev.UseVisualStyleBackColor = true; + this.Find_Prev.Click += new System.EventHandler(this.Find_Prev_Click); + // + // Find_Next + // + this.Find_Next.Location = new System.Drawing.Point(94, 39); + this.Find_Next.Name = "Find_Next"; + this.Find_Next.Size = new System.Drawing.Size(75, 23); + this.Find_Next.TabIndex = 2; + this.Find_Next.Text = "Find Next"; + this.Find_Next.UseVisualStyleBackColor = true; + this.Find_Next.Click += new System.EventHandler(this.Find_Next_Click); + // + // HexFind + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(178, 77); + this.Controls.Add(this.Find_Next); + this.Controls.Add(this.Find_Prev); + this.Controls.Add(this.FindBox); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Name = "HexFind"; + this.ShowIcon = false; + this.Text = "Find"; + this.Load += new System.EventHandler(this.HexFind_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox FindBox; + private System.Windows.Forms.Button Find_Prev; + private System.Windows.Forms.Button Find_Next; + } +} \ No newline at end of file diff --git a/BizHawk.MultiClient/tools/HexFind.cs b/BizHawk.MultiClient/tools/HexFind.cs new file mode 100644 index 0000000000..604d3a9235 --- /dev/null +++ b/BizHawk.MultiClient/tools/HexFind.cs @@ -0,0 +1,47 @@ +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 BizHawk.MultiClient +{ + public partial class HexFind : Form + { + private Point location; + public HexFind() + { + InitializeComponent(); + } + + public void SetInitialValue(string value) + { + FindBox.Text = value; + } + + public void SetLocation(Point p) + { + location = p; + + } + + private void HexFind_Load(object sender, EventArgs e) + { + if (location.X > 0 && location.Y > 0) + this.Location = location; + } + + private void Find_Prev_Click(object sender, EventArgs e) + { + Global.MainForm.HexEditor1.FindPrev(FindBox.Text); + } + + private void Find_Next_Click(object sender, EventArgs e) + { + Global.MainForm.HexEditor1.FindNext(FindBox.Text); + } + } +} diff --git a/BizHawk.MultiClient/tools/HexFind.resx b/BizHawk.MultiClient/tools/HexFind.resx new file mode 100644 index 0000000000..29dcb1b3a3 --- /dev/null +++ b/BizHawk.MultiClient/tools/HexFind.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file