Example #1
0
    private void OnBeginLoading(System.Object sender, Awesomium.Mono.BeginLoadingEventArgs args)
    {
        if (args.Url.Length < 1)
        {
            return;
        }

        if (IsBlackListedLoad(args.Url))
        {
            webView.GoBack();
            return;
        }

        if (HandleRedirectLoad(args.Url))
        {
            return;
        }

        SetToLoadingTexture();
        if (args.Url != lastURL)
        {
            lastURL = args.Url;
            RaiseLoadBeginEvent(args.Url);
        }
        else
        {
            VDebug.Log("skipping url: " + args.Url);
        }
        goingBack    = false;
        goingForward = false;
    }
Example #2
0
    private void OnBeginLoading(System.Object sender, Awesomium.Mono.BeginLoadingEventArgs args)
    {
        if (!CheckWebView())
        {
            return;
        }

        if (!args.Url.Contains("holdinginfo.php"))
        {
            // the url is expected to redirect to holdinginfo.php, so if it hasn't, assume there was an error
            InfoMessageManager.Display("* We're sorry, the business simulation is unavailable at this time *");
            Debug.LogError("Biz Sim Login Error: url didn't redirect: " + args.Url);
            return;
        }
        switch (stage)
        {
        case LoginStage.START:
            stage = LoginStage.IN_GAME;
            RaiseLoginCompleteEvent(args);
            break;
        }
    }