コード例 #1
0
        private static string GenerateSingleCondition(SmartCondition condition, SAIType type, int entryorguid, int id, int else_group)
        {
            object data = new
            {
                source_type  = 22, // SMART_EVENT
                source_group = (id + 1).ToString(),
                source_entry = entryorguid.ToString(),
                source_id    = ((int)type).ToString(),

                else_group = else_group.ToString(),

                condition_id = condition.ID.ToString(),
                target       = ((int)condition.target).ToString(),

                param1 = condition.parameters[0].GetValue().ToString(),
                param2 = condition.parameters[1].GetValue().ToString(),
                param3 = condition.parameters[2].GetValue().ToString(),

                inversed = (condition.invert?"1":"0"),

                error_text_id = "",
                script_name   = "",
                comment       = condition.ToString()
            };

            return(SmartFormat.Smart.Format(COND_SQL, data));
        }
コード例 #2
0
        private static string GenerateSingleCondition(SmartCondition condition, SAIType type, int entryorguid, int id, int else_group)
        {
            object data = new
            {
                source_type = 22, // SMART_EVENT
                source_group = (id+1).ToString(),
                source_entry = entryorguid.ToString(),
                source_id = ((int)type).ToString(),

                else_group = else_group.ToString(),

                condition_id = condition.ID.ToString(),
                target = ((int)condition.target).ToString(),

                param1 = condition.parameters[0].GetValue().ToString(),
                param2 = condition.parameters[1].GetValue().ToString(),
                param3 = condition.parameters[2].GetValue().ToString(),

                inversed = (condition.invert?"1":"0"),

                error_text_id = "",
                script_name = "",
                comment = condition.ToString()
            };

            return SmartFormat.Smart.Format(COND_SQL, data);
        }