package Web;

import Other.SomeCodes;

import java.util.Properties;

public class SettingInfo {
    public String[] AudioFiles;
    public String AudioFile1;
    public String AudioFile2;
    public String AudioFile3;
    public String AudioFile4;
    public String AudioFile5;
    public String CameraIP;
    public String CameraPort;
    public String CameraUsername;
    public String CameraPassword;
    public String LoginUsername;
    public String LoginPassword;

    public static SettingInfo getInstance() {
        SettingInfo settingInfo = new SettingInfo();
        Properties prop = SomeCodes.LoadProperties("config.properties");
        settingInfo.AudioFiles = SomeCodes.GetAudioFiles();
        settingInfo.AudioFile1 = prop.getProperty("AudioFile01","").trim();
        settingInfo.AudioFile2 = prop.getProperty("AudioFile02","").trim();
        settingInfo.AudioFile3 = prop.getProperty("AudioFile03","").trim();
        settingInfo.AudioFile4 = prop.getProperty("AudioFile04","").trim();
        settingInfo.AudioFile5 = prop.getProperty("AudioFile05","").trim();
        settingInfo.CameraIP = prop.getProperty("Camera_ip","").trim();
        settingInfo.CameraPort = prop.getProperty("Camera_port","").trim();
        settingInfo.CameraUsername = prop.getProperty("Camera_user","").trim();
        settingInfo.CameraPassword = prop.getProperty("Camera_password","").trim();
        settingInfo.LoginUsername = prop.getProperty("WebUsername","").trim();
        settingInfo.LoginPassword = prop.getProperty("WebPassword","").trim();
        return settingInfo;
    }
}
