Beispiel #1
0
    public SignSetting GetConfig(int sign_count, int level)
    {
        SignSetting rs = null;

        foreach (SignSetting setting in sign_setting)
        {
            if (setting.sign_count != sign_count)
            {
                continue;
            }

            if (setting.level > level)
            {
                continue;
            }

            if (rs == null)
            {
                rs = setting;
                continue;
            }

            if (rs.CompareTo(setting) < 0)
            {
                rs = setting;
            }
        }
        return(rs);
    }
Beispiel #2
0
    public int CompareTo(object obj)
    {
        SignSetting sign_ = obj as SignSetting;

        if (sign_count != sign_.sign_count)
        {
            return(sign_count.CompareTo(sign_.sign_count));
        }

        return(level.CompareTo(sign_.level));
    }