示例#1
0
        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");
        }
示例#2
0
        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]
                });
            }
        }
示例#3
0
        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();
        }