public MSSvIR() { InitializeComponent(); ProgramToGraph globalCode = new ProgramToGraph(); classesList = globalCode.classes; HightLightCode(globalCode.GetFullCode(), outText); }
public SpenForm(string[] classes) { InitializeComponent(); code = new ProgramToGraph(); SpenClassSelect.DropDownStyle = ComboBoxStyle.DropDownList; foreach (string cl in classes) { SpenClassSelect.Items.Add(cl); } }
public MayersForm(string[] classes) { InitializeComponent(); code = new ProgramToGraph(); comboBoxClass.DropDownStyle = ComboBoxStyle.DropDownList; comboBoxFunction.DropDownStyle = ComboBoxStyle.DropDownList; foreach (string cl in classes) { comboBoxClass.Items.Add(cl); } comboBoxClass.SelectedIndex = 0; }
private int nodesCount; // количество вершин #endregion Fields #region Constructors public MayersForm(string[] classes) { InitializeComponent(); code = new ProgramToGraph(); comboBoxClass.DropDownStyle = ComboBoxStyle.DropDownList; comboBoxFunction.DropDownStyle = ComboBoxStyle.DropDownList; foreach (string cl in classes) { comboBoxClass.Items.Add(cl); } comboBoxClass.SelectedIndex = 0; }
private void SpenClassSelect_SelectedIndexChanged(object sender, EventArgs e) { Dictionary <string, int> variables = new Dictionary <string, int>(); source = code.GetFullCode(); // sourceCode.Text = ProgramToGraph.AddLineBreaks(code.GetClassBody(source, SpenClassSelect.SelectedItem.ToString())); MSSvIR.HightLightCode(ProgramToGraph.AddLineBreaks(code.GetClassBody(source, SpenClassSelect.SelectedItem.ToString())), sourceCode); variables = code.GetSpenMetrics(SpenClassSelect.SelectedItem.ToString()); dataGridView1.Rows.Clear(); foreach (KeyValuePair <string, int> a in variables) { Console.WriteLine("{0} : {1}", a.Key, a.Value); if (a.Value >= 0) { string[] row = { a.Key, a.Value.ToString() }; dataGridView1.Rows.Add(row); } } }