Пример #1
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     try
     {
         if (showindex < ArrayFileInfo.Count)
         {
             string readpath = selectpath + "\\" + ArrayFileInfo[showindex++].ToString();
             ScanArrayJiYToDraw = WriteOrReadFiles.Readtxt(readpath, ScanDrawDataLength);// readtxt(readpath);
             main.Draw_JI(ScanArrayJiYToDraw);
             MethodInvoker mi = new MethodInvoker(show_index);
             this.BeginInvoke(mi);
         }
     }
     catch
     {
         return;
     }
 }
Пример #2
0
 private void btn_jump_Click(object sender, EventArgs e)
 {
     try
     {
         int fileindex  = Convert.ToInt32(txt_jump.Text);
         int arraycount = ArrayFileInfo.Count;
         if (fileindex < arraycount)
         {
             string readpath = selectpath + "\\" + ArrayFileInfo[fileindex].ToString();
             ScanArrayJiYToDraw = WriteOrReadFiles.Readtxt(readpath, ScanDrawDataLength);// readtxt(readpath);
             main.Draw_JI(ScanArrayJiYToDraw);
             showindex = fileindex;
         }
         else
         {
             MessageBox.Show("输入的索引值超过文件个数!!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     catch
     {
         return;
     }
 }