protected override void OnInitialized() { BWHJsInterop.SetOnOrOff(true); BWHWindowHelper.OnScroll = OnScroll; BWHWindowHelper.OnResize = OnScroll; base.OnInitialized(); }
protected override void OnInitialized() { BWHJsInterop.SetOnOrOff(true); BWHKeyboardHelper.OnKeyDown += KeyDownFromJS; BWHKeyboardHelper.OnKeyUp += KeyUpFromJS; base.OnInitialized(); }
protected override void OnInitialized() { BWHWindowHelper.jsRuntime = jsRuntime; BWHJsInterop.SetOnOrOff(true); BWHKeyboardHelper.OnKeyUp += KeyUpFromBWH; base.OnInitialized(); }
protected async Task <bool> CheckCounterIsDisabled() { string result = await BWHJsInterop.LocalStorageGetItem("DisableCounters"); if (!string.IsNullOrEmpty(result)) { DisableCounters = result.Equals("1"); } return(true); }
protected override void OnInitialized() { if (!BWHJsInterop.IsReady) { BWHJsInterop.jsRuntime = jsRuntime; BWHJsInterop.IsReady = true; } BWHJsInterop.SetOnOrOff(true); BWHKeyboardHelper.OnKeyUp = KeyUpFromBWH; base.OnInitialized(); }
protected override void OnInitialized() { BWHJsInterop.SetOnOrOff(true); BWHKeyboardHelper.OnKeyDown = KeyDownFromJS; BWHKeyboardHelper.OnKeyUp = KeyUpFromJS; Game.points_Count = Game.x_Length * Game.y_Length; Game.point_Width = Math.Round(LocalData.CompWidth * 1.0 / Game.x_Length, 2); Game.point_Height = Math.Round(LocalData.CompHeight * 1.0 / Game.y_Length, 2); Game.reset(); base.OnInitialized(); }
protected override void OnAfterRender(bool firstRender) { if (firstRender) { if (LBDLocalData.ShouldCallPrintDialog) { BWHJsInterop.Print(); LBDLocalData.ShouldCallPrintDialog = false; } } base.OnAfterRender(firstRender); }
protected override async Task OnInitializedAsync() { WindowSize.H = (int)await BWHJsInterop.GetWindowHeight(); VHUnitInPixels = (int)(WindowSize.H * 0.01); visualParams.TreeIconBoxSize = WindowSize.H * 0.04; visualParams.SmalestSizeUnit = VHUnitInPixels; initializedata(); await base.OnInitializedAsync(); }
protected override async Task OnInitializedAsync() { LBDLocalData.mainLayout = this; LocalFunctions.navigationManager = navigationManager; CounterHelper.Initialize(); LocalFunctions.RedirectIfNeeded(navigationManager); LBDJsInterop.jsRuntime = jsRuntime; BWHJsInterop.jsRuntime = jsRuntime; await CheckCounterIsDisabled(); //if (WebApiFunctions.httpClient is null) //{ // WebApiFunctions.httpClient = httpClient; // WebApiFunctions.httpClient.BaseAddress = LocalData.WebApi_Uri; // WebApiFunctions.httpClient.Timeout = TimeSpan.FromMilliseconds(Timeout.Infinite); // WebApiFunctions.CmdGetVisitor(); //} //if (LocalData.IsDevelopmentMode) //{ // if (!BlazorWindowHelper.BWHJsInterop.IsReady) // { // BlazorWindowHelper.BWHJsInterop.jsRuntime = jsRuntime; // BlazorWindowHelper.BWHJsInterop.IsReady = true; // } //} if (LBDLocalData.TimezoneOffset == -99999) { LBDLocalData.TimezoneOffset = await BWHJsInterop.GetTimezoneOffset(); } await base.OnInitializedAsync(); return; }
protected override void OnInitialized() { BWHJsInterop.SetOnOrOff(true); BWHKeyboardHelper.OnKeyUp += KeyUpFromJS; ComponentSettings.compWidth = CompWidth; ComponentSettings.compHeight = CompHeight; ComponentSettings.h = ComponentSettings.compWidth / ComponentSettings.CountHorizontal; ComponentSettings.w = ComponentSettings.compHeight / ComponentSettings.CountVertical; ComponentSettings.r = ComponentSettings.w; if (ComponentSettings.r > ComponentSettings.h) { ComponentSettings.r = ComponentSettings.h; } ComponentSettings.r /= 2; ComponentSettings.r *= 0.65; }