Skip to content

Commit

Permalink
push bookmark export to switch via noexs
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvita committed Oct 6, 2020
1 parent aec19c3 commit d507b5b
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 13 deletions.
35 changes: 24 additions & 11 deletions PointerSearcher/Form1.Designer.cs

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

41 changes: 39 additions & 2 deletions PointerSearcher/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private async void buttonRead_Click(object sender, EventArgs e)
buttonRead.Enabled = false;


IDumpDataReader reader = CreateDumpDataReader(dataGridView1.Rows[0], false);
IDumpDataReader reader = CreateDumpDataReader(dataGridView1.Rows[fileselect], false);
if (reader == null)
{
throw new Exception("Invalid input" + Environment.NewLine + "Check highlighted cell");
Expand Down Expand Up @@ -295,8 +295,9 @@ private async void buttonNarrowDown_Click(object sender, EventArgs e)
{
SetProgressBar(0);
Dictionary<IDumpDataReader, long> dumps = new Dictionary<IDumpDataReader, long>();
for (int i = 1; i < dataGridView1.Rows.Count; i++)
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
if (i == fileselect) continue;
DataGridViewRow row = dataGridView1.Rows[i];
ClearRowBackColor(row);
if (IsBlankRow(row))
Expand Down Expand Up @@ -1650,5 +1651,41 @@ private void button8_Click_1(object sender, EventArgs e)
catch { textBox10.Text = "err"; };
textBox8_TextChanged_1(sender, e);
}

private void button9_Click(object sender, EventArgs e)
{
button9.BackColor = System.Drawing.Color.White;
if (textBox2.Text == "") { MessageBox.Show("bookmark filename missing"); return; };
String filepath = textBox2.Text;
BinaryReader BM;
try
{
BM = new BinaryReader(new FileStream(filepath, FileMode.Open, FileAccess.Read));
BM.BaseStream.Seek(0, SeekOrigin.Begin);
int readSize = (int)(BM.BaseStream.Length);
byte[] buff;
buff = BM.ReadBytes(readSize);

if (!command_available()) return;
byte[] msg = { 0x1C }; //_putbookmark
int a = s.Send(msg);
while (s.Available < 4) ;
byte[] b = new byte[s.Available];
s.Receive(b);
if (!showerror(b))
{
byte[] fsize = BitConverter.GetBytes(readSize);
s.Send(fsize);
s.Send(buff);
while (s.Available < 4) ;
b = new byte[s.Available];
s.Receive(b);
if (!showerror(b))
{ button9.BackColor = System.Drawing.Color.LightGreen; }
} else { MessageBox.Show("Remote file not accessible"); }
BM.BaseStream.Close();
}
catch (IOException) { textBox1.Text = "Cannot Read file"; }
}
}
}
24 changes: 24 additions & 0 deletions PointerSearcher/Form1.resx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@
<metadata name="Address1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Address1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataSet1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="dataSet1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
Expand All @@ -156,6 +162,21 @@
<metadata name="LastValue.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Address.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Value.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="LastValue.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="From.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="To.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="From.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
Expand All @@ -165,6 +186,9 @@
<metadata name="Search.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>116, 17</value>
</metadata>
<metadata name="Search.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>116, 17</value>
</metadata>
<metadata name="pointers_candidates.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>204, 17</value>
</metadata>
Expand Down

0 comments on commit d507b5b

Please sign in to comment.