mirror of
https://github.com/This-weiyuqing/javaAutoScore.git
synced 2026-10-18 03:03:42 +08:00
final2
add timetesk before final last
This commit is contained in:
1 parent
67e90a7679
commit
8c4a4a4cea
11 files changed
+30
-4
No files matched your search
Generated
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
<component name="CopyrightManager">
|
<component name="CopyrightManager">
|
||||||
<copyright>
|
<copyright>
|
||||||
<option name="notice" value="Copyright (c) 2020 魏遇卿 All Rights Reserved. FileName: &#36;file.fileName @author: 魏遇卿@date: &#36;today@version: 1.0 E-mail:358614401@qq.com Code with UTF-8" />
|
<option name="notice" value="Copyright (c) 2020 魏遇卿 All Rights Reserved. FileName: &#36;file.fileName author: 魏遇卿 date: &#36;today version: 1.0 E-mail:358614401@qq.com Code with UTF-8" />
|
||||||
<option name="myName" value="魏遇卿" />
|
<option name="myName" value="魏遇卿" />
|
||||||
</copyright>
|
</copyright>
|
||||||
</component>
|
</component>
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -7,17 +7,23 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package autoScore;
|
package autoScore;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.Timer;
|
||||||
|
import java.util.TimerTask;
|
||||||
|
|
||||||
public class mainDo{
|
public class mainDo{
|
||||||
public static void main(String[] args) throws IOException {
|
public static void main(String[] args) throws IOException {
|
||||||
//int score=0;
|
//int score=0;
|
||||||
mainGUI gui=new mainGUI();
|
mainGUI gui=new mainGUI();
|
||||||
/* new Timer().schedule(new TimerTask() {
|
//添加答题计时功能
|
||||||
|
new Timer().schedule(new TimerTask() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
System.out.println("stop question");
|
System.out.println("stop question");
|
||||||
|
System.exit(0);
|
||||||
}
|
}
|
||||||
},1000);*/
|
},10000);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -151,9 +151,11 @@ public class mainGUI extends JFrame implements ActionListener {
|
|||||||
//这里写最后结果被写入文件夹啊
|
//这里写最后结果被写入文件夹啊
|
||||||
try {
|
try {
|
||||||
String studetnNum=new String();
|
String studetnNum=new String();
|
||||||
|
|
||||||
scoreToTxt(userIn.getStudentNumber(),scoreUser);
|
scoreToTxt(userIn.getStudentNumber(),scoreUser);
|
||||||
System.out.println(userIn.getStudentNumber());
|
System.out.println(userIn.getStudentNumber());
|
||||||
|
//dispose();
|
||||||
|
//System.exit(0);
|
||||||
|
|
||||||
} catch (IOException ioException) {
|
} catch (IOException ioException) {
|
||||||
ioException.printStackTrace();
|
ioException.printStackTrace();
|
||||||
System.out.println("抛出异常1");
|
System.out.println("抛出异常1");
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020 魏遇卿 All Rights Reserved.
|
||||||
|
* FileName: a.java
|
||||||
|
* @author: 魏遇卿@date: 2020/6/19 下午8:02@version: 1.0
|
||||||
|
* E-mail:358614401@qq.com
|
||||||
|
* Code with UTF-8
|
||||||
|
*/
|
||||||
package autoScore;
|
package autoScore;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|||||||
@@ -8,9 +8,20 @@
|
|||||||
|
|
||||||
package autoScore;
|
package autoScore;
|
||||||
|
|
||||||
|
import java.util.Timer;
|
||||||
|
import java.util.TimerTask;
|
||||||
|
|
||||||
public class useInDemo {
|
public class useInDemo {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
userIn GUI=new userIn();
|
userIn GUI=new userIn();
|
||||||
//System.out.println(userIn.getStudentNumber());
|
//System.out.println(userIn.getStudentNumber());
|
||||||
|
//add timetask to set user time
|
||||||
|
new Timer().schedule(new TimerTask() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
System.out.println("stop question");
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
|
},6000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user