using SuperMap.Data;
using SuperMap.Mapping;
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 zudonghua0705
{
public partial class Form1 : Form
{
int xq = 1;
Dataset dataset0 = datasource.Datasets["yanmo"];
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void Timer1_Tick(object sender, EventArgs e)
{
if (xq < Convert.ToInt32(textBox1.Text))
{
//将数据集添加到此图层集合作为一个普通图层显示
Layer layer = m_mapControl.Map.Layers.Add(dataset, true);
m_mapControl.Map.Refresh();
//map.Open(workspace.Maps[xq]);
xq = xq + 1;
}
else
{
timer1.Stop();
timer1.Tick -= Timer1_Tick;
}
}
private void timer1_Tick(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
timer1.Interval = Convert.ToInt32(textBox2.Text);
timer1.Start();
timer1.Tick += Timer1_Tick;
}
private void button2_Click(object sender, EventArgs e)
{
timer1.Stop();
timer1.Tick -= Timer1_Tick;
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
}
}