C#无线传感器网络节点定位系统设计(12)_毕业论文

毕业论文移动版

毕业论文 > 计算机论文 >

C#无线传感器网络节点定位系统设计(12)


        {
            Label node = new Label();
            node.Name = "Node" + i.ToString();
            node.Text = "●";
            node.Size = new Size(6, 6);
            node.ForeColor = Color.Black;
            node.Location=point;
            node.Font = new Font("宋体", 3.55f);
            node.MouseHover += new EventHandler(node_MouseHover);
            node.MouseLeave += new EventHandler(node_MouseLeave);
            node.MouseClick += new MouseEventHandler(node_MouseClick);
            node.Tag = "未定位" ;
            this.Controls.Add(node);
            UKNodes.Add(node);
        }

        public void AddAnchors(Point point,int i)
        {
            Label anchor = new Label();
            anchor.Name = "Anchor" + i.ToString();
            anchor.Text = "▲";
            anchor.Size = new Size(8, 8);
            anchor.ForeColor = Color.Black;
            anchor.Location = point;
            anchor.Font = new Font("宋体", 5);
            anchor.MouseHover+=new EventHandler(anchor_MouseHover);
            anchor.MouseLeave+=new EventHandler(anchor_MouseLeave);
            anchor.Tag = "坐标:(" + point.X.ToString() + "," + point.Y.ToString() + ")";
            this.Controls.Add(anchor);
            Anchors.Add(anchor);
        }
private void 生成锚点和未知点ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int i = 0;
            DialogResult result;
            if (generate == true)
            {
                result = MessageBox.Show("此次节点生成会清空当前节点,是否继续?", "提示", MessageBoxButtons.OKCancel);
                if (result == DialogResult.OK)
                { (责任编辑:qin)