﻿function onSourceDownloadProgressChanged(sender, eventArgs) {
    var myHost = document.getElementById("Xaml1");
    var c = myHost.content.findName("c");
    var p = myHost.content.findName("p");
    var l = myHost.content.findName("l");
    var dash = myHost.content.findName("dash");
    var e = myHost.content.findName("e");
    var l2 = myHost.content.findName("l2");
    var e2 = myHost.content.findName("e2");
    var a = myHost.content.findName("a");
    var r = myHost.content.findName("r");
    var n = myHost.content.findName("n");
    var i = myHost.content.findName("i");
    var n2 = myHost.content.findName("n2");
    var g = myHost.content.findName("g");
    var T = myHost.content.findName("T");
    var M = myHost.content.findName("M");

    if (eventArgs.progress) {
        if (eventArgs.progress > 0.98) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
            e.Width = 22.9649;
            dash.Width = 12.3138;
            l2.Width = 4.57333;
            e2.Width = 22.9649;
            a.Width = 20.9394;
            r.Width = 12.8348;
            n.Width = 21.8751;
            i.Width = 4.72882;
            n2.Width = 21.8751;
            g.Width = 24.3684;
            T.Width = 4.59512;
            M.Width = 5.4231;
        }
        else if (eventArgs.progress > 0.91) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
            e.Width = 22.9649;
            dash.Width = 12.3138;
            l2.Width = 4.57333;
            e2.Width = 22.9649;
            a.Width = 20.9394;
            r.Width = 12.8348;
            n.Width = 21.8751;
            i.Width = 4.72882;
            n2.Width = 21.8751;
            g.Width = 24.3684;
        }
        else if (eventArgs.progress > 0.84) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
            e.Width = 22.9649;
            dash.Width = 12.3138;
            l2.Width = 4.57333;
            e2.Width = 22.9649;
            a.Width = 20.9394;
            r.Width = 12.8348;
            n.Width = 21.8751;
            i.Width = 4.72882;
            n2.Width = 21.8751;
        }
        else if (eventArgs.progress > 0.77) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
            e.Width = 22.9649;
            dash.Width = 12.3138;
            l2.Width = 4.57333;
            e2.Width = 22.9649;
            a.Width = 20.9394;
            r.Width = 12.8348;
            n.Width = 21.8751;
            i.Width = 4.72882;
        }
        else if (eventArgs.progress > 0.70) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
            e.Width = 22.9649;
            dash.Width = 12.3138;
            l2.Width = 4.57333;
            e2.Width = 22.9649;
            a.Width = 20.9394;
            r.Width = 12.8348;
            n.Width = 21.8751;
        }
        else if (eventArgs.progress > 0.63) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
            e.Width = 22.9649;
            dash.Width = 12.3138;
            l2.Width = 4.57333;
            e2.Width = 22.9649;
            a.Width = 20.9394;
            r.Width = 12.8348;
        }
        else if (eventArgs.progress > 0.56) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
            e.Width = 22.9649;
            dash.Width = 12.3138;
            l2.Width = 4.57333;
            e2.Width = 22.9649;
            a.Width = 20.9394;
        }
        else if (eventArgs.progress > 0.49) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
            e.Width = 22.9649;
            dash.Width = 12.3138;
            l2.Width = 4.57333;
            e2.Width = 22.9649;
        }
        else if (eventArgs.progress > 0.42) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
            e.Width = 22.9649;
            dash.Width = 12.3138;
            l2.Width = 4.57333;
        }
        else if (eventArgs.progress > 0.35) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
            e.Width = 22.9649;
            dash.Width = 12.3138;
        }
        else if (eventArgs.progress > 0.28) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
            e.Width = 22.9649;
        }
        else if (eventArgs.progress > 0.21) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
        }
        else if (eventArgs.progress > 0.14) {
            c.Width = 18.6616;
            p.Width = 22.0524;
        }
        else if (eventArgs.progress > 0.07) {
            c.Width = 18.6616;
        }
        else {
            c.Width = 0;
            p.Width = 0;
            l.Width = 0;
            e.Width = 0;
            dash.Width = 0;
            l2.Width = 0;
            e2.Width = 0;
            a.Width = 0;
            r.Width = 0;
            n.Width = 0;
            i.Width = 0;
            n2.Width = 0;
            g.Width = 0;
            T.Width = 0;
            M.Width = 0;
        }
    }
    else {
        if (eventArgs.get_progress() > 0.98) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
            e.Width = 22.9649;
            dash.Width = 12.3138;
            l2.Width = 4.57333;
            e2.Width = 22.9649;
            a.Width = 20.9394;
            r.Width = 12.8348;
            n.Width = 21.8751;
            i.Width = 4.72882;
            n2.Width = 21.8751;
            g.Width = 24.3684;
            T.Width = 4.59512;
            M.Width = 5.4231;
        }
        else if (eventArgs.get_progress() > 0.91) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
            e.Width = 22.9649;
            dash.Width = 12.3138;
            l2.Width = 4.57333;
            e2.Width = 22.9649;
            a.Width = 20.9394;
            r.Width = 12.8348;
            n.Width = 21.8751;
            i.Width = 4.72882;
            n2.Width = 21.8751;
            g.Width = 24.3684;
        }
        else if (eventArgs.get_progress() > 0.84) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
            e.Width = 22.9649;
            dash.Width = 12.3138;
            l2.Width = 4.57333;
            e2.Width = 22.9649;
            a.Width = 20.9394;
            r.Width = 12.8348;
            n.Width = 21.8751;
            i.Width = 4.72882;
            n2.Width = 21.8751;
        }
        else if (eventArgs.get_progress() > 0.77) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
            e.Width = 22.9649;
            dash.Width = 12.3138;
            l2.Width = 4.57333;
            e2.Width = 22.9649;
            a.Width = 20.9394;
            r.Width = 12.8348;
            n.Width = 21.8751;
            i.Width = 4.72882;
        }
        else if (eventArgs.get_progress() > 0.70) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
            e.Width = 22.9649;
            dash.Width = 12.3138;
            l2.Width = 4.57333;
            e2.Width = 22.9649;
            a.Width = 20.9394;
            r.Width = 12.8348;
            n.Width = 21.8751;
        }
        else if (eventArgs.get_progress() > 0.63) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
            e.Width = 22.9649;
            dash.Width = 12.3138;
            l2.Width = 4.57333;
            e2.Width = 22.9649;
            a.Width = 20.9394;
            r.Width = 12.8348;
        }
        else if (eventArgs.get_progress() > 0.56) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
            e.Width = 22.9649;
            dash.Width = 12.3138;
            l2.Width = 4.57333;
            e2.Width = 22.9649;
            a.Width = 20.9394;
        }
        else if (eventArgs.get_progress() > 0.49) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
            e.Width = 22.9649;
            dash.Width = 12.3138;
            l2.Width = 4.57333;
            e2.Width = 22.9649;
        }
        else if (eventArgs.get_progress() > 0.42) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
            e.Width = 22.9649;
            dash.Width = 12.3138;
            l2.Width = 4.57333;
        }
        else if (eventArgs.get_progress() > 0.35) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
            e.Width = 22.9649;
            dash.Width = 12.3138;
        }
        else if (eventArgs.get_progress() > 0.28) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
            e.Width = 22.9649;
        }
        else if (eventArgs.get_progress() > 0.21) {
            c.Width = 18.6616;
            p.Width = 22.0524;
            l.Width = 4.58835;
        }
        else if (eventArgs.get_progress() > 0.14) {
            c.Width = 18.6616;
            p.Width = 22.0524;
        }
        else if (eventArgs.get_progress() > 0.07) {
            c.Width = 18.6616;
        }
        else {
            c.Width = 0;
            p.Width = 0;
            l.Width = 0;
            e.Width = 0;
            dash.Width = 0;
            l2.Width = 0;
            e2.Width = 0;
            a.Width = 0;
            r.Width = 0;
            n.Width = 0;
            i.Width = 0;
            n2.Width = 0;
            g.Width = 0;
            T.Width = 0;
            M.Width = 0;
        }
    }
}
