yy1717
2020-02-26 432b34202aed7b34d7c1719d4a056651b656ec62
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package safeluck.drive.evaluation.bean;
 
import android.content.Context;
 
import java.util.Random;
 
import safeluck.drive.evaluation.app;
import safeluck.drive.evaluation.util.SPUtils;
 
public class ExamPlatformData {
    private static final ExamPlatformData ourInstance = new ExamPlatformData();
 
    private int exam_id =12345;//考试唯一ID
 
    public static ExamPlatformData getInstance() {
        return ourInstance;
    }
 
    private ExamPlatformData() {
 
    }
 
    public String getPlatformIP(){
        return (String) SPUtils.get(app.getAppContext(),SPUtils.PLATFORM_IP,"");
    }
 
    public int getPlatformPort(){
        return (int) SPUtils.get(app.getAppContext(),SPUtils.PLATFORM_PORT,0);
    }
 
    /**
     * 插入平台IP地址
     * @param ip
     */
    public void insertPlatformIp(String ip){
        SPUtils.put(app.getAppContext(),SPUtils.PLATFORM_IP,ip);
 
    }
 
    /**
     * 插入平台端口号
     * @param port
     */
    public void insertPlatformPort(int port){
        SPUtils.put(app.getAppContext(),SPUtils.PLATFORM_PORT,port);
    }
 
    public int getExamUniqueID(){
 
 
 
        return exam_id;
    }
 
}