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"); } }
public async void loadFileRegular() { log.Clear(); if (await _LocalJsInterop.HasFile("fileUpload")) { BWHTimeAnalyzer.Reset("Regular mode"); log.Add("started"); log.Add("js is loading file..."); StateHasChanged(); BWHTimeAnalyzer.Add("A1", MethodBase.GetCurrentMethod()); string a = await _LocalJsInterop.GetFile(_BinaryInfo.variableName, "fileUpload"); log.Add(a); log.Add(".net loaded " + a.Length + " bytes"); log.Add("done"); BWHTimeAnalyzer.LogAll(); StateHasChanged(); } else { await _LocalJsInterop.Alert("Please select file"); } }
public async void JsSendMessageFast() { if (!string.IsNullOrEmpty(JsMessage)) { ExpandData(); log.Add(JsMessage); BWHTimeAnalyzer.Reset(); BWHTimeAnalyzer.Add("A1", MethodBase.GetCurrentMethod()); JsFastDataExchanger.SetStringData("myTmpVar1", JsMessage); BWHTimeAnalyzer.Add("A2", MethodBase.GetCurrentMethod()); _LocalJsInterop.ProcessData("myTmpVar1"); BWHTimeAnalyzer.Add("A3", MethodBase.GetCurrentMethod()); log.Add(JsFastDataExchanger.GetStringData("myTmpVar1")); BWHTimeAnalyzer.LogAll(); JsMessage = string.Empty; } else { await _LocalJsInterop.Alert("Please input message"); } StateHasChanged(); }
private void _BinaryInfo_OnFinish() { _BinaryInfo.progressInfo = "done"; log.Add(".net loaded " + _BinaryInfo.dataLenght + " bytes"); log.Add("done"); BWHTimeAnalyzer.LogAll(); StateHasChanged(); }
//protected override void OnInitialized() //{ // base.OnInitialized(); //} public async void JsSendMessage() { if (!string.IsNullOrEmpty(JsMessage)) { await CounterHelper.CmdAddCounter(new TSCounter() { Source = navigationManager.Uri, Action = "ClickButtonRegular" }); ExpandData(); log.Add(JsMessage); BWHTimeAnalyzer.Reset(); BWHTimeAnalyzer.Add("set data", MethodBase.GetCurrentMethod()); await LBDJsInterop.SetData("myTmpVar1", JsMessage); BWHTimeAnalyzer.Add("process data", MethodBase.GetCurrentMethod()); LBDJsInterop.ProcessData("myTmpVar1"); BWHTimeAnalyzer.Add("get data", MethodBase.GetCurrentMethod()); log.Add(await LBDJsInterop.GetData("myTmpVar1")); BWHTimeAnalyzer.LogAll(); JsMessage = string.Empty; } else { await LBDJsInterop.Alert("Please input message"); } StateHasChanged(); }