Beispiel #1
0
        /// <summary>
        /// 历史菜单栏导入->邻居小区历史信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void neighborZoneToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NeighborZone_Info NeighborXml = new NeighborZone_Info();

            NeighborXml.MdiParent = this;

            openFileDialog2.Title            = "导出历史记录文件";
            openFileDialog2.Filter           = "当前小区信息历史记录文件(*.xml)|*.xml|All files(*.*)|*.*";
            openFileDialog2.InitialDirectory = @"c:\";
            openFileDialog2.ShowDialog();

            recorder.infoRecorder.neighborFilePath = openFileDialog2.FileName.ToString();

            string[,] neighborTemp;
            string neighborTime;

            int i, j, k = 0;

            while (recorder.infoRecorder.getNextNeighborData(out neighborTemp, out neighborTime) != 1)
            {
                DataRow Neighborrow = NeighborXml.dt.NewRow();


                NeighborXml.dt.Rows.Add(Neighborrow);
                Neighborrow["Time"] = neighborTime;

                Neighborrow["Cell Num"] = ++k;
                for (j = 0; j < 6; j++)
                {
                    for (i = 0; i <= recorder.infoRecorder.neighborDetail.GetLength(0) - 1; i++)
                    {
                        Neighborrow[recorder.infoRecorder.neighborDetail[i]] = neighborTemp[j, i];
                    }
                    Thread.Sleep(200);
                }
            }
            NeighborXml.Show();
        }
Beispiel #2
0
        /// <summary>
        /// 历史菜单栏导入->邻居小区历史信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void neighborZoneToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NeighborZone_Info NeighborXml = new NeighborZone_Info();
            NeighborXml.MdiParent = this;

            openFileDialog2.Title = "导出历史记录文件";
            openFileDialog2.Filter = "当前小区信息历史记录文件(*.xml)|*.xml|All files(*.*)|*.*";
            openFileDialog2.InitialDirectory = @"c:\";
            openFileDialog2.ShowDialog();

            recorder.infoRecorder.neighborFilePath = openFileDialog2.FileName.ToString();

            string[,] neighborTemp;
            string neighborTime;

            int i, j, k = 0;

            while (recorder.infoRecorder.getNextNeighborData(out neighborTemp, out neighborTime) != 1)
            {

                DataRow Neighborrow = NeighborXml.dt.NewRow();

                NeighborXml.dt.Rows.Add(Neighborrow);
                Neighborrow["Time"] = neighborTime;

                Neighborrow["Cell Num"] = ++k;
                for (j = 0; j < 6; j++)
                {
                    for (i = 0; i <= recorder.infoRecorder.neighborDetail.GetLength(0) - 1; i++)
                    {
                        Neighborrow[recorder.infoRecorder.neighborDetail[i]] = neighborTemp[j, i];
                    }
                    Thread.Sleep(200);
                }
            }
            NeighborXml.Show();
        }