private void BtnSave_Click(object sender, RoutedEventArgs e) { var config = new Dictionary <string, string>(); foreach (var item in configValues) { config.Add(item.Name, item.Notes); } PFConfig.UpdateConfigValues(config); MessageBox.Show("Remember to copy the new config file over to the server and restart it"); }
public ConfigEditor() { configValues = new ObservableCollection <ListItemResult>(); this.DataContext = this; InitializeComponent(); var config = PFConfig.GetAllConfigValues(); foreach (var key in config.Keys) { configValues.Add(new ListItemResult() { Name = key, Notes = config[key] }); } }
public EditorWindow() { InitializeComponent(); if (System.ComponentModel.DesignerProperties.GetIsInDesignMode(this)) { return; } if (!PFConfig.ConfigExists()) { MessageBox.Show("Not configured - please run configuration tool in PFHelper"); Application.Current.Shutdown(); } LoadDBData(); }