Windows Form Web Control Frozen

48 views Asked by At

I'm using C# to make a windows form application. I have some Javascript that interacts with the C# to pass a string of JSON data when triggered by a certain user event. However, upon a random number of user events triggering this communication, the Web Control freezes completely.

Javascript

function userScroll() {

    var range = timeline.getVisibleChartRange();
    var left = range.start.getTime();
    var right = range.end.getTime();

    // Gets event data from C#
    var jsonData = window.external.HandleScroll(left, right);
}

This is bound to three events on a particular div, these events being mousedown, mouseup, and wheel.

C#

public string HandleScroll(long scLeft, long scRight)
{
    string jsonData;        

    // some math on inputs
    // generating JSON

    return jsonData;
}

Why is my web control freezing?

0

There are 0 answers