commit ada5d75de7439930ff073613aa2ceccdbc1d65a4
Author: 魏遇卿 <358614401@qq.com>
Date: Sun Jun 14 18:33:28 2020 +0800
Initial commit
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..dfe0770
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+# Auto detect text files and perform LF normalization
+* text=auto
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..81b2fd6
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,10 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
+# Zeppelin ignored files
+/ZeppelinRemoteNotebooks/
+# Editor-based HTTP Client requests
+/httpRequests/
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
new file mode 100644
index 0000000..a55e7a1
--- /dev/null
+++ b/.idea/codeStyles/codeStyleConfig.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/copyright/.xml b/.idea/copyright/.xml
new file mode 100644
index 0000000..188052d
--- /dev/null
+++ b/.idea/copyright/.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
new file mode 100644
index 0000000..6472829
--- /dev/null
+++ b/.idea/copyright/profiles_settings.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..6560a98
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..2a824a2
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..6314f82
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
new file mode 100644
index 0000000..e96534f
--- /dev/null
+++ b/.idea/uiDesigner.xml
@@ -0,0 +1,124 @@
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..40cfdfb
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fuckJavaGui.iml b/fuckJavaGui.iml
new file mode 100644
index 0000000..c90834f
--- /dev/null
+++ b/fuckJavaGui.iml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/out/production/fuckJavaGui/META-INF/fuckJavaGui.kotlin_module b/out/production/fuckJavaGui/META-INF/fuckJavaGui.kotlin_module
new file mode 100644
index 0000000..a49347a
Binary files /dev/null and b/out/production/fuckJavaGui/META-INF/fuckJavaGui.kotlin_module differ
diff --git a/out/production/fuckJavaGui/autoScore/mainDo.class b/out/production/fuckJavaGui/autoScore/mainDo.class
new file mode 100644
index 0000000..6d51151
Binary files /dev/null and b/out/production/fuckJavaGui/autoScore/mainDo.class differ
diff --git a/out/production/fuckJavaGui/autoScore/mainGUI.class b/out/production/fuckJavaGui/autoScore/mainGUI.class
new file mode 100644
index 0000000..0fb7a8e
Binary files /dev/null and b/out/production/fuckJavaGui/autoScore/mainGUI.class differ
diff --git a/out/production/fuckJavaGui/autoScore/question.class b/out/production/fuckJavaGui/autoScore/question.class
new file mode 100644
index 0000000..667d9d1
Binary files /dev/null and b/out/production/fuckJavaGui/autoScore/question.class differ
diff --git a/out/production/fuckJavaGui/autoScore/score.class b/out/production/fuckJavaGui/autoScore/score.class
new file mode 100644
index 0000000..0dfa3ea
Binary files /dev/null and b/out/production/fuckJavaGui/autoScore/score.class differ
diff --git a/out/production/fuckJavaGui/autoScore/useInDemo.class b/out/production/fuckJavaGui/autoScore/useInDemo.class
new file mode 100644
index 0000000..971e18e
Binary files /dev/null and b/out/production/fuckJavaGui/autoScore/useInDemo.class differ
diff --git a/out/production/fuckJavaGui/autoScore/userIn$1.class b/out/production/fuckJavaGui/autoScore/userIn$1.class
new file mode 100644
index 0000000..968a485
Binary files /dev/null and b/out/production/fuckJavaGui/autoScore/userIn$1.class differ
diff --git a/out/production/fuckJavaGui/autoScore/userIn$2.class b/out/production/fuckJavaGui/autoScore/userIn$2.class
new file mode 100644
index 0000000..3b36cf3
Binary files /dev/null and b/out/production/fuckJavaGui/autoScore/userIn$2.class differ
diff --git a/out/production/fuckJavaGui/autoScore/userIn$3.class b/out/production/fuckJavaGui/autoScore/userIn$3.class
new file mode 100644
index 0000000..cacf272
Binary files /dev/null and b/out/production/fuckJavaGui/autoScore/userIn$3.class differ
diff --git a/out/production/fuckJavaGui/autoScore/userIn.class b/out/production/fuckJavaGui/autoScore/userIn.class
new file mode 100644
index 0000000..739be47
Binary files /dev/null and b/out/production/fuckJavaGui/autoScore/userIn.class differ
diff --git a/src/autoScore/mainDo.java b/src/autoScore/mainDo.java
new file mode 100644
index 0000000..20feb1e
--- /dev/null
+++ b/src/autoScore/mainDo.java
@@ -0,0 +1,16 @@
+/*
+ * Copyright (c) 2020 魏遇卿 All Rights Reserved.
+ * FileName: asdf.java
+ * @author: 魏遇卿@date: 2020/6/11 下午4:50@version: 1.0
+ * E-mail:358614401@qq.com
+ * Code with UTF-8
+ */
+
+package autoScore;
+import autoScore.userIn;
+import autoScore.*;
+public class mainDo{
+ public static void main(String[] args) {
+ mainGUI gui=new mainGUI();
+ }
+}
\ No newline at end of file
diff --git a/src/autoScore/mainGUI.java b/src/autoScore/mainGUI.java
new file mode 100644
index 0000000..ae6f961
--- /dev/null
+++ b/src/autoScore/mainGUI.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2020 魏遇卿 All Rights Reserved.
+ * FileName: asdf.java
+ * @author: 魏遇卿@date: 2020/6/11 下午4:50@version: 1.0
+ * E-mail:358614401@qq.com
+ * Code with UTF-8
+ */
+
+package autoScore;
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+public class mainGUI extends JFrame implements ActionListener {
+ private JTextField question;
+ private JButton A,B,C,D;
+ Container c;//创建主容器
+ //构造方法
+ public mainGUI(){
+ //创建窗口容器
+ super("Auto score to exam");
+ /* this.setBounds(100,100,100,100);*/
+ //获取主容器并设置为网格组布局
+ c=this.getContentPane();
+ c.setLayout(null);
+ this.setVisible(true);
+ this.setSize(900,300);//设置窗口大小
+ this.setResizable(false);//设置窗口固定大小
+ this.setLocationRelativeTo(null);//设置窗口居中
+ this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//设置默认关闭操作
+
+ //网格组布局管理器
+
+ //创建问题显示位置
+ JLabel questionStudent = new JLabel("这是问题的位置andFuckJavaGUI");
+ GridBagLayout questtionText = new GridBagLayout();
+ questionStudent.setBounds(0,0,900,200);
+ questionStudent.setText("fuckJavaGUI");//更改标签内容
+ this.add(questionStudent);
+ //字体
+ questionStudent.setFont(new Font("微软雅黑",Font.BOLD,20));
+
+ // setLayout(null);
+
+ A = new JButton("A");
+ A.addActionListener(this);
+ this.add(A);
+ A.setBounds(100, 200, 100, 50);
+
+ B = new JButton("B");
+ this.add(B);
+ B.addActionListener(this);
+ B.setBounds(300, 200, 100, 50);
+
+ C = new JButton("C");
+ this.add(C);
+ C.addActionListener(this);
+ C.setBounds(500, 200, 100, 50);
+
+ D = new JButton("D");
+ D.addActionListener(this);
+ this.add(D);
+ D.setBounds(700, 200, 100, 50);
+ }
+
+ /*private class panelABCD extends JPanel implements ActionListener{
+
+ }*/
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ if(e.getActionCommand().equals("A")){
+ // return "A";
+ }
+ if (e.getActionCommand().equals("B")){
+ // return "B";
+ }
+ if (e.getActionCommand().equals("B")){
+ // return "C";
+ }
+ if (e.getActionCommand().equals("B")){
+ // return "D";
+ }
+
+
+ }
+ /*public static void main(String[] args) {
+ mainGUI mainGUI= new mainGUI();
+ }*/
+}
+
diff --git a/src/autoScore/question.java b/src/autoScore/question.java
new file mode 100644
index 0000000..941bccf
--- /dev/null
+++ b/src/autoScore/question.java
@@ -0,0 +1,39 @@
+package autoScore;
+
+import java.io.*;
+
+public class question {
+ public static File question(int i) {
+ File srcFile = new File("D:\\WindowsCToD\\fire\\GeneticsMultipleChoice\\Question");
+ File[] fileArr = srcFile.listFiles();
+ //System.out.println(fileArr[i]);
+ return fileArr[i];
+ }
+
+/* public static void questiontext() {
+ File fireName=question(0);
+ InputStream in;
+ InputStreamReader reader=new InputStreamReader(new FileInputStream(fireName));
+ }*/
+public static void readFile() {
+ File pathname = question(0);
+ try (FileReader reader = new FileReader(pathname);
+ BufferedReader br = new BufferedReader(reader) // 建立一个对象,它把文件内容转成计算机能读懂的语言
+ ) {
+ String line;
+ //网友推荐更加简洁的写法
+ while ((line = br.readLine()) != null) {
+ // 一次读入一行数据
+ System.out.println(line);
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+}
+
+ public static void main(String[] args) {
+ question(0);
+ System.out.println(question(0));
+ readFile();
+ }
+}
diff --git a/src/autoScore/score.java b/src/autoScore/score.java
new file mode 100644
index 0000000..79caf6d
--- /dev/null
+++ b/src/autoScore/score.java
@@ -0,0 +1,12 @@
+package autoScore;
+
+public class score {
+ public int getScore (int score,char choose,char anwser){
+ if (choose ==anwser ) {
+ score++;
+ return score;
+ }else {
+ return score;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/autoScore/useInDemo.java b/src/autoScore/useInDemo.java
new file mode 100644
index 0000000..d5ae7c9
--- /dev/null
+++ b/src/autoScore/useInDemo.java
@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) 2020 魏遇卿 All Rights Reserved.
+ * FileName: asdf.java
+ * @author: 魏遇卿@date: 2020/6/11 下午4:50@version: 1.0
+ * E-mail:358614401@qq.com
+ * Code with UTF-8
+ */
+
+package autoScore;
+
+public class useInDemo {
+ public static void main(String[] args) {
+ userIn GUI=new userIn();
+ }
+}
diff --git a/src/autoScore/userIn.java b/src/autoScore/userIn.java
new file mode 100644
index 0000000..a5a039e
--- /dev/null
+++ b/src/autoScore/userIn.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2020 魏遇卿 All Rights Reserved.
+ * FileName: asdf.java
+ * @author: 魏遇卿@date: 2020/6/11 下午4:50@version: 1.0
+ * E-mail:358614401@qq.com
+ * Code with UTF-8
+ */
+
+package autoScore;
+
+import javax.swing.*;
+import javax.swing.event.CaretEvent;
+import javax.swing.event.CaretListener;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+
+public class userIn extends JFrame implements ActionListener {
+ //设置组件
+ private JButton
+ //创建窗体
+ login = new JButton("login");
+ private JTextField
+ //创建组件
+ admin = new JTextField(),
+ password = new JTextField();
+ private JPanel contentPanel=new JPanel();
+
+ public userIn() {
+ super("Auto score to exam");
+ /* this.setBounds(100,100,100,100);*/
+ //获取主容器并设置为网格组布局
+ // contentPanel = this.getContentPane();
+ contentPanel.setLayout(null);
+ this.setVisible(true);
+ this.setSize(500, 350);//设置窗口大小
+ this.setResizable(false);//设置窗口固定大小
+ this.setLocationRelativeTo(null);//设置窗口居中
+ this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//设置默认关闭操作
+
+ admin.setText("学号");
+ password.setText("password");
+
+ //添加组件
+ contentPanel.setLayout(null);
+ add(admin);
+ add(password);
+ add(login);
+
+ //组件位置
+ admin.setBounds(95,130,300,25);
+ password.setBounds(95,154,300,25);
+ login.setBounds(315,225,90,20);
+ //显示组件
+ admin.setOpaque(false);
+ password.setOpaque(false);
+ login.setOpaque(false);
+
+ //设置监听(鼠标点击之后输入密码
+ admin.addMouseListener(new MouseAdapter(){
+ @Override
+ public void mouseClicked(MouseEvent e){
+ int c = e.getButton();
+ if(c == MouseEvent.BUTTON1 && admin.getText().equals("学号") &&e.getClickCount()==1) {
+ admin.setText(null);
+ /* password.setText("password");*/
+ }
+ }
+ });
+ admin.addCaretListener(new CaretListener(){
+ @Override
+ public void caretUpdate(CaretEvent e){
+
+ }
+ });
+ password.addMouseListener(new MouseAdapter(){
+ @Override
+ public void mouseClicked(MouseEvent e){
+ int c = e.getButton();
+ if(c == MouseEvent.BUTTON1 && password.getText().equals("password") &&e.getClickCount()==1) {
+ password.setText(null);
+ /* admin.setText("学号");*/
+ }
+ }
+ });
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+
+ }
+
+
+}