Exemplo n.º 1
0
        //构造函数
        public NodeDescribePacket()
        {
            onFlag = 0x0000;
            //  angle = 0;
            nodeBtn              = new ToolStripButton();
            checkBox             = new CheckBox();
            nodeBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.ImageAndText;
            nodeBtn.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            port               = new string[10];
            portChecked        = new byte[10];
            dataLabel          = new Label();
            linkLabel          = new LinkLabel();
            dataLabel.AutoSize = true;
            linkLabel.Size     = new System.Drawing.Size(77, 22);
            dataLabel.Size     = new System.Drawing.Size(50, 22);
            linkLabel.Text     = "数据";
            //nodeBtn.ImageTransparentColor = System.Drawing.Color.Magenta;
            //初始化循环队列
            head = tail = 0;
            //初始化节点图标
            pictureBox = new System.Windows.Forms.PictureBox();
#if false
            clustAndCidList = new ClustAndCid();
#endif
            point         = new myPoint();
            virtualPoint  = new myPoint();
            used          = new bool[8]; //每个节点周围位置可用的标志
            virtualUsed   = new bool[8];
            indexNo       = new int[8];
            config        = new double[5];
            flag          = false;
            data          = new double[27];
            sum           = 0;
            avg           = 0;
            dataSaveCount = 1;
            status        = 0x00;
            packetCount   = 0;
            //  writeFaile = false;
            //初始化都不能使用
            for (int i = 0; i < 10; ++i)
            {
                portChecked[i] = 0x02;
            }
            for (int i = 0; i < 8; i++)
            {
                used[i]        = false;
                virtualUsed[i] = false;
                indexNo[i]     = 0;
            }
            //    isSave = false;
        }
Exemplo n.º 2
0
 //构造函数
 public NodeDescribePacket()
 {
     onFlag = 0x0000;
       //  angle = 0;
     nodeBtn = new ToolStripButton();
     checkBox = new CheckBox();
     nodeBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.ImageAndText;
     nodeBtn.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
     port = new string[10];
     portChecked = new byte[10];
     dataLabel = new Label();
     linkLabel = new LinkLabel();
     dataLabel.AutoSize = true;
     linkLabel.Size = new System.Drawing.Size(77, 22);
     dataLabel.Size = new System.Drawing.Size(50, 22);
     linkLabel.Text = "数据";
     //nodeBtn.ImageTransparentColor = System.Drawing.Color.Magenta;
     //初始化循环队列
     head = tail = 0;
     //初始化节点图标
     pictureBox = new System.Windows.Forms.PictureBox();
     #if false
     clustAndCidList = new ClustAndCid();
     #endif
     point = new myPoint();
     virtualPoint = new myPoint();
     used = new bool[8];  //每个节点周围位置可用的标志
     virtualUsed = new bool[8];
     indexNo = new int[8];
     config = new double[5];
     flag = false;
     data = new double[27];
     sum = 0;
     avg = 0;
     dataSaveCount = 1;
     status = 0x00;
     packetCount = 0;
       //  writeFaile = false;
     //初始化都不能使用
     for (int i = 0; i < 10; ++i)
         portChecked[i] = 0x02;
         for (int i = 0; i < 8; i++)
         {
             used[i] = false;
             virtualUsed[i] = false;
             indexNo[i] = 0;
         }
     //    isSave = false;
 }