コード例 #1
0
        public void draw_class(string class_name, List <string> attributes, List <FunctionsInEachClass> func)
        {
            FlowChartForm formobj2 = new FlowChartForm();


            classz = new Rectangle(class_posx, class_posy, 100, (y + 20));
            formobj2.panelGraphics.DrawString(class_name, formobj2.drawFont, Brushes.Red, new Point(class_posx + 30, y + 20));
            y += 10;
            formobj2.panelGraphics.DrawLine(Pens.Yellow, new Point(classz.X, classz.Y + 20), new Point(classz.X + classz.Width, classz.Y + 20));

            y += 10;                                //attributes-------->
            for (int i = 0; i < func.Count; i++)
            {
                formobj2.panelGraphics.DrawString(attributes[i], formobj2.drawFont, Brushes.Red, new Point(class_posx + 30, y + 20));
                y += 10;
            }                                      //attributes<-----------

            formobj2.panelGraphics.DrawLine(Pens.Yellow, new Point(classz.X, classz.Y + 20), new Point(classz.X + classz.Width, classz.Y + 20));
            y += 10;
            for (int i = 0; i < func.Count; i++)
            {
                formobj2.panelGraphics.DrawString(func[i].FunctionName, formobj2.drawFont, Brushes.Red, new Point(class_posx + 30, y + 20));
                y += 10;
            }
            classz = new Rectangle(class_posx, class_posy, 100, (y + 20));
            formobj2.panelGraphics.DrawRectangle(Pens.Green, classz);
        }
コード例 #2
0
        private void btn_FlowChart_Click(object sender, EventArgs e)
        {
            StringAccessors accessor = StringAccessors.Instance;

            accessor.setCode(richTextBox1.Text.ToString());


            this.Hide();

            FlowChartForm flowChart = new FlowChartForm();

            flowChart.Show();
        }