22.54 Офис
20-11-2007 22:01
к комментариям - к полной версии
- понравилось!
Сижу. Странное ощущение. По идее должен чувствовать голод, усталость.
Ощущения атрофировались.
Весь в мониторе. Вижу только Форму один. Наследованную от формы. Надо вывести список в CreatedPrim.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Collections;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
private string PrimList;
private char c = 'q';
ArrayList Prim_name = new ArrayList();
//Form2 AddPrim = new Form2();
public Form1()
{
InitializeComponent();
}
private void CreatedPrim_TextChanged(object sender, EventArgs e)
{
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
private void Create_Click(object sender, EventArgs e)
{
//-Triangle---
if (comboBox1.Text == "Triangle")
{
Triangle triangle = new Triangle();
Form2 AddPrim = new Form2();
Prim_name.Add(comboBox1.Text);
if (AddPrim.ShowDialog() == DialogResult.OK)
{
triangle.x_coor = AddPrim.x;
triangle.y_coor = AddPrim.y;
//CreatredPrim.Text = Prim_name+" "+triangle.x_coor.ToString()+"\n";
}
}
//-Point---
if (comboBox1.Text == "Point")
{
Point point = new Point();
Form2 AddPrim = new Form2();
Prim_name.Add(comboBox1.Text);
if (AddPrim.ShowDialog() == DialogResult.OK)
{
//point.x_coor = AddPrim.x;
//point.y_coor = AddPrim.y;
//CreatredPrim.Text = "Coordinates of point (" + point.x_coor + ", " + point.y_coor + ")";
}
}
PrimList = null;
for (int i = 0; i < Prim_name.Count; i++)//??????????????????????
{
PrimList = PrimList + Prim_name[i] + "\n" + c.ToString();
}
//CreatredPrim.Text = PrimList;
//CreatredPrim.Text = CreatredPrim.TextLength.ToString(); //str.Length.ToString();
}
}
}
вверх^
к полной версии
понравилось!
в evernote