Example #1
0
        private static void loadJunk(string url, Action ready)
        {
            var scriptLoader = new ScriptLoader();

            ScriptLoader.LoadCss(url + "lib/jquery-ui.css");
            ScriptLoader.LoadCss(url + "lib/codemirror/lib/codemirror.css");
            ScriptLoader.LoadCss(url + "lib/codemirror/theme/night.css");
            ScriptLoader.LoadCss(url + "lib/site.css");

            Action stepThree = () => scriptLoader.Load(new[]
                                                       {
                                                           url + "lib/RawDeflate.js",
                                                       },
                true,
                ready);
            Action stepTwo = () => scriptLoader.Load(new[]
                                                     {
                                                         url + "lib/codemirror/mode/javascript/javascript.js",
                                                         url + "lib/WorkerConsole.js",
                                                         url + "lib/FunctionWorker.js",
                                                         url + "lib/Stats.js",
                                                         url + "lib/keyboardjs.js",
                                                     },
                false,
                stepThree);
            scriptLoader.Load(new[]
                              {
                                  url + "lib/linq.js",
                                  url + "lib/tween.js",
                                  url + "lib/socket.io.js",
                                  url + "lib/codemirror/lib/codemirror.js",
                              },
                false,
                stepTwo);
        }
Example #2
0
        private static void loadJunk(string url, Action ready)
        {
            ScriptLoader scriptLoader = new ScriptLoader();

            ScriptLoader.LoadCss(url + "lib/jquery-ui-1.8.20.custom.css");
            ScriptLoader.LoadCss(url + "lib/codemirror/lib/codemirror.css");
            ScriptLoader.LoadCss(url + "lib/codemirror/theme/night.css");
            ScriptLoader.LoadCss(url + "lib/jqwidgets/styles/jqx.base.css");
            ScriptLoader.LoadCss(url + "lib/site.css");

            Action stepFour = () => scriptLoader.Load(new[] {
                                                                    url + "lib/RawDeflate.js",
                                                            },
                                                      true,
                                                      ready);

            Action stepThree = () => scriptLoader.Load(new[] {
                                                                     url + "ClientLibs.js",
                                                                     url + "CommonLibraries.js",
                                                                     url + "ShuffleGameLibrary.js",
                                                                     url + "Models.js",
                                                             },
                                                       true,
                                                       stepFour);
            Action stepTwo = () => scriptLoader.Load(new[] {
                                                                   url + "lib/codemirror/mode/javascript/javascript.js",
                                                                   url + "lib/WorkerConsole.js",
                                                                   url + "lib/FunctionWorker.js",
                                                                   url + "lib/Stats.js",
                                                                   url + "lib/keyboardjs.js",
                                                                   url + "lib/Dialog.js",
                                                           },
                                                     false,
                                                     stepThree);
            Action stepOne = () => scriptLoader.Load(new[] {
                                                                   url + "lib/jqwidgets/jqxbuttons.js",
                                                                   url + "lib/jqwidgets/jqxscrollbar.js",
                                                                   url + "lib/linq.js",
                                                                   url + "lib/tween.js",
                                                                   url + "lib/socket.io.js",
                                                                   url + "lib/codemirror/lib/codemirror.js",
                                                                   url + "lib/jqwidgets/jqxlistbox.js"
                                                           },
                                                     false,
                                                     stepTwo);
            scriptLoader.LoadSync(new[] {
                                                url + "lib/jquery-1.7.2.min.js",
                                                url + "lib/jquery-ui-1.8.20.custom.min.js",
                                                url + "lib/jqwidgets/scripts/gettheme.js",
                                                url + "lib/jqwidgets/jqxcore.js"
                                        },
                                  stepOne);
        }