Beispiel #1
0
        private async void OnUserServiceSelectionIsEnabledChanged(object sender, IsEnabledChangedEventArgs e)
        {
            var userServices = new V1UserServices();

            foreach (var serviceSelection in m_userNetworkServices)
            {
                var service   = serviceSelection.Service;
                var isEnabled = serviceSelection.IsEnabled;
                userServices.Services.Add(new V1Service(service.Name, service.Protocol, service.Port, isEnabled));
            }
            await NetworkServiceConfigurator.WriteUserServicesAsync(userServices);
        }
 private async void OnUserServiceSelectionIsEnabledChanged(object sender, IsEnabledChangedEventArgs e)
 {
     var userServices = new V1UserServices();
     foreach (var serviceSelection in m_userNetworkServices)
     {
         var service = serviceSelection.Service;
         var isEnabled = serviceSelection.IsEnabled;
         userServices.Services.Add(new V1Service(service.Name, service.Protocol, service.Port, isEnabled));
     }
     await NetworkServiceConfigurator.WriteUserServicesAsync(userServices);
 }
Beispiel #3
0
        private async void OnPredefinedServiceSelectionIsEnabledChanged(object sender, IsEnabledChangedEventArgs e)
        {
            var disabledServices = new V1DisabledServices();

            disabledServices.Guids.AddRange(m_predefinedServiceSelections.Where(x => !x.IsEnabled).Select(x => x.Service.Guid));
            await NetworkServiceConfigurator.WriteDisabledServicesAsync(disabledServices);
        }
 private async void OnPredefinedServiceSelectionIsEnabledChanged(object sender, IsEnabledChangedEventArgs e)
 {
     var disabledServices = new V1DisabledServices();
     disabledServices.Guids.AddRange(m_predefinedServiceSelections.Where(x => !x.IsEnabled).Select(x => x.Service.Guid));
     await NetworkServiceConfigurator.WriteDisabledServicesAsync(disabledServices);
 }