Quote:
Originally Posted by pungvit
found it.. now what bin i must to edit..
damn.. how to show the pic in this forum
|
Check this gan simple view ...FYI each bin have dif format, use vrohan script as reference ..cmiiw
Reference :
simple view : itemcombination.bin
C# : add filedialog + datagridview + button
cpaste :
Code:
private void button_Click(object sender, EventArgs e)
{
openFileDialog1.ShowDialog();
string _str = openFileDialog1.FileName ;
if (_str != "")
{
using (FileStream fs = new FileStream(_str, FileMode.Open, FileAccess.Read))
{
using (DataTable dt = new DataTable())
{
dt.Columns.Add("No", typeof(int));
dt.Columns.Add("Pos", typeof(long));
dt.Columns.Add("value", typeof(string));
using (BinaryReader br = new BinaryReader(fs))
{
int _no = 1;
int bspos = 0;
br.BaseStream.Position = bspos;
while (br.BaseStream.Position < br.BaseStream.Length - bspos)
{
long _pos = br.BaseStream.Position;
int _val1 = br.ReadInt32();
dt.Rows.Add(_no, _pos,Convert.ToString( _val1));
_no += 1;
}
}
dataGridView1.DataSource = dt;
}
}
}
}