private static void clickDemo(jQueryEvent arg)
        {
            BaseDemo d = arg.Data as BaseDemo;

            if (d == ActiveDemo) return;

            if (ActiveDemo != null)
            {
                ActiveDemo.Hide();
                DemoContainer.RemoveChild(ActiveDemo.Container);
                ActiveDemo = null;
            }

            ActiveDemo = d;
            DemoContainer.AppendChild(ActiveDemo.Container);

            Action doShow = delegate
            {
                ActiveDemo.Show();
            };

            Window.SetTimeout(doShow, 500);
        }
 private void listClick(jQueryEvent e)
 {
     GeometryFunction f = e.Data as GeometryFunction;
     geometryIndex = functions.IndexOf(f);
     ShowGeometry();
 }
 private void Collapse(jQueryEvent e)
 {
     Window.Alert("On Collapse");
 }
 /// <summary>
 /// Execute all handlers and behaviors attached to the matched elements for the given event type.
 /// </summary>
 /// <param name="jqEvent">A jQuery.Event object.</param>
 /// <param name="extraParameters">Additional parameters to pass along to the event handler.</param>
 /// <returns>The jQuery instance</returns>
 public virtual jQuery Trigger(jQueryEvent jqEvent, params object[] extraParameters)
 {
     return null;
 }
 /// <summary>
 /// Execute all handlers and behaviors attached to the matched elements for the given event type.
 /// </summary>
 /// <param name="jqEvent">A jQuery.Event object.</param>
 /// <returns>The jQuery instance</returns>
 public virtual jQuery Trigger(jQueryEvent jqEvent)
 {
     return null;
 }
Exemple #6
0
        public static async void UpdateButton_Click(jQueryEvent e)
        {
            jQuery btn = null;
            var delay = 0;

            if (e != null)
            {
                btn = new jQuery(e.CurrentTarget);
                btn.ButtonLoading();
                delay = 2000;
            }

            // Delaying is to demonstrate the Button Loading state functionality of Bootstrap
            await Task.Delay(delay);

            jQuery.Ajax(
                new AjaxOptions()
                {
                    Url = Config.GET_SERVER_TIME_URL,
                    Cache = false,

                    Success = delegate(object data, string textStatus, jqXHR request)
                    {
                        if (btn != null)
                        {
                            btn.ButtonReset();
                        }

                        var val = JSON.Parse((string)data).As<string>();
                        var dateTime = DateTime.ParseExact(val, "yyyy-MM-ddTHH:mm:ss", System.Globalization.CultureInfo.InvariantCulture);

                        jQuery.Select("#dateTimeInput").Val(dateTime.ToString("yyyy-MM-dd HH:mm:ss"));
                    }
                }
                );
        }