public void UdateSettings(NetworkScannerSettingsModel settingsModel)
        {
            var json = JsonConvert.SerializeObject(settingsModel);

            Properties.Settings.Default.AppSetting = json;
            Properties.Settings.Default.Save();
            SettingsUpdated?.Invoke();
        }
Esempio n. 2
0
 public FormPageViewModel()
 {
     NetworkRange     = new NetworkRangeModel();
     scanner          = new NetworkPing();
     _settingsService = IoC.Get <ISettingsService>();
     AppSetings       = _settingsService.GetSettings();
     _settingsService.SettingsUpdated += SettingsUpdatedEvent;
     SetIpRangeBasedOnActiveInterfaceAdapter();
     ClearListOfActiveNetworkIpAddresses();
     scanner.ScanNetworkFoundDelegateAsync       += ScanIpAddressAsync;
     scanner.ScanNetworkCurrentIpAddressDelegate += UpdateInformationWithCurrentIpAddress;
     Title = "Form";
     SetCommands();
 }