Exemple #1
0
 public MSSvIR()
 {
     InitializeComponent();
     ProgramToGraph globalCode = new ProgramToGraph();
     classesList = globalCode.classes;
     HightLightCode(globalCode.GetFullCode(), outText);
 }
Exemple #2
0
        public MSSvIR()
        {
            InitializeComponent();
            ProgramToGraph globalCode = new ProgramToGraph();

            classesList = globalCode.classes;
            HightLightCode(globalCode.GetFullCode(), outText);
        }
Exemple #3
0
        public SpenForm(string[] classes)
        {
            InitializeComponent();
            code = new ProgramToGraph();
            SpenClassSelect.DropDownStyle = ComboBoxStyle.DropDownList;

            foreach (string cl in classes)
            {
                SpenClassSelect.Items.Add(cl);
            }
        }
Exemple #4
0
        public SpenForm(string[] classes)
        {
            InitializeComponent();
            code = new ProgramToGraph();
            SpenClassSelect.DropDownStyle = ComboBoxStyle.DropDownList;

            foreach (string cl in classes)
            {
                SpenClassSelect.Items.Add(cl);
            }
        }
Exemple #5
0
        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;
        }
Exemple #6
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;
        }
Exemple #7
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);
                }
            }
        }