Пример #1
0
        private void Invalidate()
        {
            InvalidateOptions invalidateOptions = new InvalidateOptions();
            invalidateOptions.Time = 100;
            invalidateOptions.Callback = delegate()
            {
                //do something
            };

            Chameleon.Invalidate();
            jQuery.Select(".someDiv").Html("new contents").Plugin<ChameleonUiObject>().ChameleonInvalidate(invalidateOptions);
        }
Пример #2
0
        private static void ApplySwitchState(SwitchType switch_type, string new_state, Action callback)
        {
            if(switch_type.State != new_state)
            {
                Chameleon.Invalidate();

                InvalidateOptions options = new InvalidateOptions();
                options.Time = 100;
                options.Callback = callback;

                string class_state_suffix="";
                if(switch_type.State != null)
                    class_state_suffix="-"+switch_type.State;

                string current_class = switch_type.ClassName + class_state_suffix;
                string new_class = switch_type.ClassName + "-" + new_state;

                jQuery.Select("." + current_class).RemoveClass("switch-" + switch_type.State).AddClass("switch-" + new_state);
                jQuery.Select("." + current_class).RemoveClass(current_class).AddClass(new_class)
                    .Plugin<ChameleonUiObject>().ChameleonInvalidate(options);

                switch_type.State = new_state;

                Chameleon.InvalidateTwo();
            }
        }
 public extern void ChameleonInvalidate(InvalidateOptions options);
Пример #4
0
 public extern void ChameleonInvalidate(InvalidateOptions options);