Exemple #1
0
        public async void loadFileFast()
        {
            ResetBinaryInfo();

            if (await LBDJsInterop.HasFile("fileUpload"))
            {
                await CounterHelper.CmdAddCounter(new TSCounter()
                {
                    Source = navigationManager.Uri, Action = "ClickButtonFast"
                });


                _BinaryInfo.progressInfo = "started";
                log.Add("started");
                BWHTimeAnalyzer.Reset("Fast mode");
                BWHTimeAnalyzer.Add("reading in js", MethodBase.GetCurrentMethod());

                _BinaryInfo.progressInfo = "js is loading file...";
                log.Add("js is loading file...");
                StateHasChanged();

                await LBDJsInterop.ReadFile(_BinaryInfo.variableName, "fileUpload");
            }
            else
            {
                await LBDJsInterop.Alert("Please select file");
            }
        }
Exemple #2
0
        public async void loadFileRegular()
        {
            log.Clear();

            if (await LBDJsInterop.HasFile("fileUpload"))
            {
                await CounterHelper.CmdAddCounter(new TSCounter()
                {
                    Source = navigationManager.Uri, Action = "ClickButtonRegular"
                });


                BWHTimeAnalyzer.Reset("Regular mode");

                log.Add("started");
                log.Add("js is loading file...");
                StateHasChanged();

                BWHTimeAnalyzer.Add("set data", MethodBase.GetCurrentMethod());

                string a = await LBDJsInterop.GetFile(_BinaryInfo.variableName, "fileUpload");

                log.Add(a);

                log.Add(".net loaded " + a.Length + " bytes");
                log.Add("done");

                BWHTimeAnalyzer.LogAll();
                StateHasChanged();
            }
            else
            {
                await LBDJsInterop.Alert("Please select file");
            }
        }