private void Form1_Load(object sender, EventArgs e)
        {
            //测试数据
            nowShowingPanel = mainPanel.mle;


            //整理界面
            panel_CRC.Location = new Point(0, 0);
            panel_flooding.Location = new Point(0, 0);
            panel_mle.Location = new Point(0, 0);
            panel_csmaca.Location = new Point(0, 0);

            //界面美化            
            func_showSideMenu();
            int sidemenu_number = 0;
            Point firstTest = new Point(23, 60);
            for (int i = 0; i < panel_sideMenu.Controls.Count; i++)
            {
                Control temp_control = panel_sideMenu.Controls[i];
                if (temp_control is Label && temp_control.Name != "label_title")
                {
                    temp_control.Location = new Point(firstTest.X, firstTest.Y + (30 * sidemenu_number++));
                }
            }



            //初始化尺寸
            func_resetSize();
            panel_sideMenu.Location = new Point(0, 0);
            //切换堆叠顺序
            panel_sideMenu.BringToFront();
            pictureBox_showSideMenu.BringToFront();

            //点击缩回侧边栏
            foreach (Control temp_control in this.Controls)
            {
                Click_hideSideMenu(temp_control);
            }

            #region flooding

            textBox_flooding_areaSize.Text = panel_flooding_mainArea.Width + "x" + panel_flooding_mainArea.Height;
            label_flooding_areaSize.Text = "当前区域大小:" + textBox_flooding_areaSize.Text;
            Click_FloodingAreaSize(panel_flooding);

            #endregion

            #region csmaca

            pictureBox_csmaca.Size = panel_csmaca.Size;
            func_clickAndAdd_csmacaStep(panel_csmacaPlay);

            #endregion

            #region mle

            panel_mle_mainArea.Paint += event_Panel_mle_mainArea_Paint;

            #endregion

            #region crc
           
            crc_typeName.Add("CRC-4", "3");
            crc_typeName.Add("CRC-8", "31");
            crc_typeName.Add("CRC-12", "80F");
            crc_typeName.Add("CRC-16", "8005");
            crc_typeName.Add("CRC-ITU", "1021");
            crc_typeName.Add("CRC-32", "04C11DB7");
            crc_typeName.Add("CRC-32c", "1EDC6F41");
            foreach (string temp_s in crc_typeName.Keys)
                comboBox_crc_type.Items.Add(temp_s);
            comboBox_crc_type.SelectedIndex = 0;
            #endregion
        }
 private void label_rc5_Click(object sender, EventArgs e)
 {
     nowShowingPanel = mainPanel.RC5;
     func_takeFirst(panel_RC5);
     func_hideSideMenu();
 }
 private void label_flooding_Click(object sender, EventArgs e)
 {
     nowShowingPanel = mainPanel.flooding;
     func_takeFirst(panel_flooding);
     func_hideSideMenu();
 }
 private void label_title_Click(object sender, EventArgs e)
 {
     func_takeFirst(panel1);
     nowShowingPanel = mainPanel.title;
     func_hideSideMenu();
 }
 private void label_zigbee_Click(object sender, EventArgs e)
 {
     nowShowingPanel = mainPanel.zigbee;
     func_takeFirst(panel_zigbee);
     func_hideSideMenu();
 }
 private void label_csmaca_Click(object sender, EventArgs e)
 {
     csmaca_step = 0;
     func_takeFirst(panel_csmaca);
     nowShowingPanel = mainPanel.CSMACA;            
     func_hideSideMenu();
 }
 private void pictureBox_csmaca_Click(object sender, EventArgs e)
 {
     
     func_takeFirst(panel_csmacaPlay);
     nowShowingPanel = mainPanel.CSMACAplay;
     csmaca_step = 0;
 }