public async Task ZoomThemeOutOnClick(MouseEventArgs e) { Zoom = 1; var newStruct = new AppBarStruct("Astrologie", true, Zoom); await AppStateServiceCore.ChangeStruct(newStruct); StateHasChanged(); }
public async Task ZoomThemeInOnClick(MouseEventArgs e) { this.Zoom += 1; var newStruct = new AppBarStruct("Astrologie", true, this.Zoom, this.LockBook); await this.AppStateServiceCore.ChangeStruct(newStruct); StateHasChanged(); }
protected override async Task OnInitializedAsync() { NavigationManager.LocationChanged += OnLocationChanges; var oldStruct = AppStateServiceCore.AppBarStruct; var newStruct = new AppBarStruct("Astrologie", true, oldStruct.AstroZoom); await AppStateServiceCore.ChangeStruct(newStruct); AppStateServiceCore.OnChange += OnStructChange; model.lat = "46.20222"; model.lng = "6.14569"; }
public async Task UnlockVerifPasswordOnClick() { var config = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("password.json").Build(); if (this.password == config.GetSection("password").Value) { this.swSecret = true; this.unlockDialogIsOpen = false; this.unlockDialogIsOpen2 = true; this.LockBook = true; var newStruct = new AppBarStruct("Astrologie", true, this.Zoom, this.LockBook); await this.AppStateServiceCore.ChangeStruct(newStruct); StateHasChanged(); } }
protected override async Task OnInitializedAsync() { // Init fields this.swLock = false; this.swLoaded = false; this.model = new ThemeAstralModel(); this.model.lat = "46.20222"; this.model.lng = "6.14569"; this.swSearch = false; this.search = new List <CityWithFlag>(); // Event this.NavigationManager.LocationChanged += OnLocationChanges; var oldStruct = this.AppStateServiceCore.AppBarStruct; var newStruct = new AppBarStruct("Astrologie", true, oldStruct.AstroZoom, oldStruct.LockBook); await this.AppStateServiceCore.ChangeStruct(newStruct); this.AppStateServiceCore.OnChange += OnStructChange; }
private async Task OnChangeStruct(AppBarStruct appBarStruct) { AppBarStruct = appBarStruct; await OnChange?.Invoke(appBarStruct); }
public async Task ChangeStruct(AppBarStruct appBarStruct) { await OnChangeStruct(appBarStruct); }
/// <summary> /// For detect zoom change /// </summary> /// <param name="appBarStruct">App bar struct</param> /// <returns></returns> #pragma warning disable 1998 private async Task OnStructChange(AppBarStruct appBarStruct) { this.AppStateServiceCore.AppBarStruct = appBarStruct; StateHasChanged(); }
protected override async Task OnInitializedAsync() { var oldStruct = AppStateServiceCore.AppBarStruct; var newStruct = new AppBarStruct("Commandes git", false, oldStruct.AstroZoom, oldStruct.LockBook); await AppStateServiceCore.ChangeStruct(newStruct); }
protected override async Task OnInitializedAsync() { var oldStruct = AppStateServiceCore.AppBarStruct; var newStruct = new AppBarStruct("Musique électronique", false, oldStruct.AstroZoom); await AppStateServiceCore.ChangeStruct(newStruct); }