public void LoadDataFromFile(string filename, SymbolCollection symbols)
{
_fileName = filename;
_lastFilename = _fileName;
m_symbolcollection = symbols;
FileInfo fi = new FileInfo(filename);
m_currentfile_size = (int)fi.Length;
OpenFile(filename);
// ???
// CloseFile();
/*
FileInfo fi = new FileInfo(filename);
long numberoflines = fi.Length/16;
StringBuilder sb = new StringBuilder();
StringBuilder sbascii = new StringBuilder();
using (BinaryReader br = new BinaryReader(new FileStream(filename, FileMode.Open)))
{
int current_address = 0;
for (int lcount = 0; lcount < numberoflines; lcount++)
{
byte[] readbytes = br.ReadBytes(16);
string line = current_address.ToString("X6") + " ";
for (int bcount = 0; bcount < readbytes.Length; bcount++)
{
byte b = (byte)readbytes.GetValue(bcount);
line += b.ToString("X2") + " ";
}
string line_ascii = string.Empty;
for (int bcount = 0; bcount < readbytes.Length; bcount++)
{
byte b = (byte)readbytes.GetValue(bcount);
if (b >= 0x20 && b <= 0x7f)
{
line_ascii += Convert.ToChar( b);
}
else
{
line_ascii += ".";
}
}
sb.AppendLine(line);
sbascii.AppendLine(line_ascii);
current_address += 16;
}
}
richTextBox1.Text = sb.ToString();
richTextBox2.Text = sbascii.ToString();
//MessageBox.Show(richTextBox1.Find("ox1_filt_coef").ToString());*/
}