Esempio n. 1
0
        protected async Task DisableScan()
        {
            ScanProfile.Enable = false;

            Repositories.ScanProfiles.Update(ScanProfile);

            Telemetry.TrackEvent("Disable scan", ScanProfile.TrackProperties);

            SvxLinkService.ActivateChannel(SvxLinkService.ChannelId);

            await ShowSuccessToastAsync("Désactivé", $"le scan a bien été désactivé.");
        }
Esempio n. 2
0
        protected async Task HandleValidSubmitAsync()
        {
            Repositories.ScanProfiles.Update(ScanProfile);

            Telemetry.TrackEvent("Update scan profile", ScanProfile.TrackProperties);

            SvxLinkService.ActivateChannel(SvxLinkService.ChannelId);

            IsChanged = false;

            await ShowSuccessToastAsync("Modifié", $"le scan profil {ScanProfile.Name} a bien été modifié.");
        }
Esempio n. 3
0
        public async Task StopAsync(int id)
        {
            var reflector = Repositories.Reflectors.Get(id);

            reflector.Enable = false;
            Repositories.Reflectors.Update(reflector);

            Telemetry.TrackEvent("Stop reflector", reflector.TrackProperties);
            SvxLinkService.StopReflector(reflector);

            await ShowSuccessToastAsync($"{reflector.Name} arreté.", $"Le reflecteur {reflector.Name} a bien été arreté.");

            Replace(Reflectors, reflector);
        }
Esempio n. 4
0
        override protected async Task HandleValidSubmitAsync()
        {
            Repositories.Repository <Models.Reflector>().Update(Reflector);

            Telemetry.TrackEvent("Update reflector", Reflector.TrackProperties);

            await ShowSuccessToastAsync("Modifié", $"le reflecteur {Reflector.Name} a bien été modifié.");

            if (Reflector.Enable)
            {
                SvxLinkService.RestartReflector(Reflector);
                await ShowSuccessToastAsync("Redémarrage", $"le reflecteur {Reflector.Name} a bien été redémarré.");
            }

            NavigationManager.NavigateTo("Reflector/Manage");
        }
Esempio n. 5
0
        public async Task ApplyAsync(int id)
        {
            var profile = Repositories.RadioProfiles.Get(id);

            if (profile.HasSa818)
            {
                Sa818Service.WriteRadioProfile(profile);
            }

            profile.Enable = true;
            Repositories.RadioProfiles.Update(profile);

            Telemetry.TrackEvent("Apply radio profile", profile.TrackProperties);

            if (SvxLinkService.ChannelId > 0)
            {
                SvxLinkService.ActivateChannel(SvxLinkService.ChannelId);
            }

            await ShowSuccessToastAsync($"{profile.Name} appliqué.", $"Le profil radio {profile.Name} a bien été appliqué.");

            NavigationManager.NavigateTo("/RadioProfile/Manage", true);
        }