// Path: app/src/main/java/top/soyask/calendarii/entity/Symbol.java
// public enum Symbol {
//     RECT("rect", 1),
//     CIRCLE("circle", 2),
//     TRIANGLE("triangle", 3),
//     STAR("star", 4),
//     HEART("heart", 5),
//     ;
// 
//     public final String KEY;
//     public final int VALUE;
// 
//     Symbol(String key, int value) {
//         this.KEY = key;
//         this.VALUE = value;
//     }
// 
// }


import android.content.Context;
import android.content.SharedPreferences;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import top.soyask.calendarii.entity.Symbol;

    public static int day_size;
    public static float day_number_text_size;
    public static float day_lunar_text_size;
    public static float day_week_text_size;
    public static float day_holiday_text_size;
    public static Map<String, String> symbol_comment = new HashMap<>();
    public static int default_event_type;

    private static boolean isLoaded = false;

    public static void loadSetting(Context context) {
        if (isLoaded) {
            return;
        }
        SharedPreferences setting = context.getSharedPreferences(SETTING, Context.MODE_PRIVATE);
        Setting.theme = setting.getInt(Global.SETTING_THEME, 0);
        Setting.date_offset = setting.getInt(Global.SETTING_DATE_OFFSET, 0);

        Setting.white_widget_pic = setting.getString(Global.SETTING_WHITE_WIDGET_PIC, null);
        Setting.density_dpi = setting.getInt(Global.SETTING_DENSITY_DPI, -1);
        Setting.day_size = setting.getInt(Global.SETTING_DAY_SIZE, -1);
        Setting.day_number_text_size = setting.getInt(Global.SETTING_DAY_NUMBER_TEXT_SIZE, -1);
        Setting.day_lunar_text_size = setting.getInt(Global.SETTING_DAY_LUNAR_TEXT_SIZE, -1);
        Setting.day_week_text_size = setting.getInt(Global.SETTING_DAY_WEEK_TEXT_SIZE, -1);
        Setting.day_holiday_text_size = setting.getInt(Global.SETTING_DAY_HOLIDAY_TEXT_SIZE, -1);
        Setting.replenish = setting.getBoolean(Global.SETTING_REPLENISH, true);
        Setting.select_anim = setting.getBoolean(Global.SETTING_SELECT_ANIM, true);

        Setting.default_event_type = setting.getInt(Global.DEFAULT_EVENT_TYPE, 0);
// Path: app/src/main/java/top/soyask/calendarii/entity/Symbol.java
// public enum Symbol {
//     RECT("rect", 1),
//     CIRCLE("circle", 2),
//     TRIANGLE("triangle", 3),
//     STAR("star", 4),
//     HEART("heart", 5),
//     ;
// 
//     public final String KEY;
//     public final int VALUE;
// 
//     Symbol(String key, int value) {
//         this.KEY = key;
//         this.VALUE = value;
//     }
// 
// }


// Path: app/src/main/java/top/soyask/calendarii/global/Setting.java
import android.content.Context;
import android.content.SharedPreferences;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import top.soyask.calendarii.entity.Symbol;


    public static int day_size;
    public static float day_number_text_size;
    public static float day_lunar_text_size;
    public static float day_week_text_size;
    public static float day_holiday_text_size;
    public static Map<String, String> symbol_comment = new HashMap<>();
    public static int default_event_type;

    private static boolean isLoaded = false;

    public static void loadSetting(Context context) {
        if (isLoaded) {
            return;
        }
        SharedPreferences setting = context.getSharedPreferences(SETTING, Context.MODE_PRIVATE);
        Setting.theme = setting.getInt(Global.SETTING_THEME, 0);
        Setting.date_offset = setting.getInt(Global.SETTING_DATE_OFFSET, 0);

        Setting.white_widget_pic = setting.getString(Global.SETTING_WHITE_WIDGET_PIC, null);
        Setting.density_dpi = setting.getInt(Global.SETTING_DENSITY_DPI, -1);
        Setting.day_size = setting.getInt(Global.SETTING_DAY_SIZE, -1);
        Setting.day_number_text_size = setting.getInt(Global.SETTING_DAY_NUMBER_TEXT_SIZE, -1);
        Setting.day_lunar_text_size = setting.getInt(Global.SETTING_DAY_LUNAR_TEXT_SIZE, -1);
        Setting.day_week_text_size = setting.getInt(Global.SETTING_DAY_WEEK_TEXT_SIZE, -1);
        Setting.day_holiday_text_size = setting.getInt(Global.SETTING_DAY_HOLIDAY_TEXT_SIZE, -1);
        Setting.replenish = setting.getBoolean(Global.SETTING_REPLENISH, true);
        Setting.select_anim = setting.getBoolean(Global.SETTING_SELECT_ANIM, true);

        Setting.default_event_type = setting.getInt(Global.DEFAULT_EVENT_TYPE, 0);
        putEventType(setting, Symbol.STAR.KEY, "默认");