Ejemplo n.º 1
0
        private void button6_Click(object sender, EventArgs e)
        {
            OpenFileDialog open = new OpenFileDialog();
            open.AddExtension = true;
            open.Filter = "上下文文件(*.context)|*.context";
            open.DefaultExt = "context";
            open.RestoreDirectory = true;
            open.Multiselect = false;
            open.InitialDirectory = @"C:\Users\wsx\Documents\Visual Studio 2012\Projects";
            open.Title = "选择一个上下文文件";

            checkpoint check = new checkpoint();

            if (open.ShowDialog() == DialogResult.OK)
            {
                string path = open.FileName;
                int start = path.IndexOf('_');
                int end = path.IndexOf('.');
                int pid = Convert.ToInt32(path.Substring(start+1, end - start-1));
                check.ResumeProcState(pid, path);
            }
        }