public string EA_Connect(EAAPI.Repository repository) { try { ServicePointManager.ServerCertificateValidationCallback = delegate { return(true); }; ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12; SimpleIoc.Default.Register <IConfigurationReaderWriter <SpecIfPluginConfiguration>, FileConfigurationReaderWriter <SpecIfPluginConfiguration> >(); IConfigurationReaderWriter <SpecIfPluginConfiguration> configurationReaderWriter = SimpleIoc.Default.GetInstance <IConfigurationReaderWriter <SpecIfPluginConfiguration> >(); if (configurationReaderWriter != null) { _configuration = configurationReaderWriter.GetConfiguration(); if (_configuration == null) { _configuration = new SpecIfPluginConfiguration(); configurationReaderWriter.StoreConfiguration(_configuration); } } _mainViewModel = new MainViewModel(repository); } catch (Exception exception) { MessageBox.Show(exception.ToString()); } return(""); }
private void ExecuteEditSettings() { if (_configurationReaderWriter != null) { PropertyDialog propertyDialog = new PropertyDialog(); SpecIfPluginConfiguration configuration = _configurationReaderWriter.GetConfiguration(); propertyDialog.SetPropertyData(configuration); propertyDialog.ShowDialog(); _configurationReaderWriter.StoreConfiguration(configuration); InitializeDataProviders(); } }