Skip to content

Commit

Permalink
Making the ReadFile method accessible to the user, to discover event …
Browse files Browse the repository at this point in the history
…commands to scan for.
  • Loading branch information
masonwheeler committed Nov 18, 2015
1 parent 96a0007 commit f00010b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
13 changes: 13 additions & 0 deletions MainForm.Designer.boo
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ partial class MainForm(System.Windows.Forms.Form):
self.comboBox1 = System.Windows.Forms.ComboBox()
self.label3 = System.Windows.Forms.Label()
self.chkShowAllValues = System.Windows.Forms.CheckBox()
self.chkReadFile = System.Windows.Forms.CheckBox()
cast(System.ComponentModel.ISupportInitialize,self.txtItemID).BeginInit()
self.SuspendLayout()
#
Expand Down Expand Up @@ -130,12 +131,23 @@ partial class MainForm(System.Windows.Forms.Form):
self.chkShowAllValues.Text = "Show All Values"
self.chkShowAllValues.UseVisualStyleBackColor = true
#
# chkReadFile
#
self.chkReadFile.Location = System.Drawing.Point(650, 28)
self.chkReadFile.Name = "chkReadFile"
self.chkReadFile.Size = System.Drawing.Size(156, 24)
self.chkReadFile.TabIndex = 15
self.chkReadFile.Text = "Decode file data"
self.chkReadFile.UseVisualStyleBackColor = true
self.chkReadFile.Click += self.chkReadFileClick as System.EventHandler
#
# MainForm
#
self.AutoScaleDimensions = System.Drawing.SizeF(8, 16)
self.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
self.ClientSize = System.Drawing.Size(1002, 474)
self.Controls.Add(self.chkShowAllValues)
self.Controls.Add(self.chkReadFile)
self.Controls.Add(self.label3)
self.Controls.Add(self.comboBox1)
self.Controls.Add(self.txtItemID)
Expand All @@ -156,6 +168,7 @@ partial class MainForm(System.Windows.Forms.Form):
private dlgRMLocation as System.Windows.Forms.OpenFileDialog
private button1 as System.Windows.Forms.Button
private chkShowAllValues as System.Windows.Forms.CheckBox
private chkReadFile as System.Windows.Forms.CheckBox
private label3 as System.Windows.Forms.Label
private comboBox1 as System.Windows.Forms.ComboBox
private txtItemID as System.Windows.Forms.NumericUpDown
Expand Down
12 changes: 10 additions & 2 deletions MainForm.boo
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,22 @@ AddFilter as System.Action[of string, System.Func[of TURBU.RubyMarshal.XPEventCo
self.comboBox1.Items.Add(name)
self._filters.Add(name, handler)

private def chkReadFileClick(sender as object, e as System.EventArgs):
if chkReadFile.Checked:
button1.Enabled = not string.IsNullOrEmpty(self.txtRMProject.Text)
else:
button1.Enabled = not string.IsNullOrEmpty(comboBox1.Text)

private def BtnRMProjectClick(sender as object, e as System.EventArgs):
if dlgRMLocation.ShowDialog() == DialogResult.OK:
self.txtRMProject.Text = dlgRMLocation.FileName
button1.Enabled = true if chkReadFile.Checked

private def Button1Click(sender as object, e as System.EventArgs):
unless string.IsNullOrEmpty(txtRMProject.Text):
//ReadFile()
ScanProject()
if chkReadFile.Checked:
ReadFile()
else: ScanProject()

private def ReadFile():
marshal = RubyMarshal()
Expand Down

0 comments on commit f00010b

Please sign in to comment.