/// <summary>
/// Browse button even handler
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void buttonBrowse_Click(object sender, EventArgs e)
{
OpenFileDialog fd = new OpenFileDialog();
fd.Filter = "VCG files|*.vcg|All Files|*.*";
if (fd.ShowDialog() == DialogResult.OK)
{
textBoxInputFilePath.Text = fd.FileName;
selectedFilePath = fd.FileName;
if (selectedFilePath != "")
{
myLogicLayer.identifyLoops(selectedFilePath);
richTextBoxBasicBlock.Text = "";
richTextBoxBackEdgesInCfg.Text = "";
richTextBoxLoopInformation.Text = myLogicLayer.getLoops();
Regex r = new Regex("\\n");
String[] lines = r.Split(myLogicLayer.getIntermidiateCodeAsBasicBlocks());
//Next, I take each line and process its contents like so.
foreach (string l in lines)
{
ParseLine(l);
}
lines = r.Split(myLogicLayer.getBackEdges());
//Next, I take each line and process its contents like so.
foreach (string l in lines)
{
parseBackEdges(l);
}
}
}
}