12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace DllXqManager
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- panel2.Controls.Clear();
- int l = 30;
- int l1 = l + 1;
- long stime = DateTime.Now.Ticks;
- for (int i = 0; i < 30; i++)
- {
- for (int j = 0; j < 30; j++)
- {
- PictureBox aa = new PictureBox();
- aa.Size = new Size(l, l);
- aa.BackColor = Color.Red;
- aa.Location = new Point(i * l1, j * l1);
- panel2.Controls.Add(aa);
- }
- }
- long etime = DateTime.Now.Ticks;
- long diff = etime - stime;
- textBox1.Text = diff.ToString();
- }
- private void button2_Click(object sender, EventArgs e)
- {
- panel2.Controls.Clear();
- int l = 30;
- int l1 = l + 1;
- long stime = DateTime.Now.Ticks;
- for (int i = 0; i < 30; i++)
- {
- for (int j = 0; j < 30; j++)
- {
- TEntityControl aa = new TEntityControl(null);
- aa.BackColor = Color.Blue;
- aa.Size = new Size(l, l);
- aa.Location = new Point(i * l1, j * l1);
- panel2.Controls.Add(aa);
- }
- }
- long etime = DateTime.Now.Ticks;
- long diff = etime - stime;
- textBox1.Text = diff.ToString();
- }
- }
- }
|