void do多边形_Click(object sender, EventArgs e) { this.do圆形.ForeColor = Color.White; this.do矩形.ForeColor = Color.White; this.do多边形.ForeColor = Color.Yellow; 清除(); 当前方式 = E圈选方式.多边形; }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); this.do矩形.ForeColor = Color.Yellow; 当前方式 = E圈选方式.矩形; this.do矩形.Click += do矩形_Click; this.do圆形.Click += do圆形_Click; this.do多边形.Click += do多边形_Click; this.do关闭.Click += do关闭_Click; _I地图.MouseDown += out地图_MouseDown; _I地图.MouseMove += out地图_MouseMove; _I地图.MouseUp += out地图_MouseUp; _I地图.MouseDoubleClick += out地图_MouseDoubleClick; this.do保存.Click += do保存_Click; this.do取消.Click += do取消_Click; }