예제 #1
0
        private void btnRemove_Click(object sender, EventArgs e)
        {
            var filepath = ConfigurationProvider.VariableSettingsFile;

            var collection = new VariableInfoCollection();

            collection.Open(filepath);
            var cpuName = txtCpuName.Text;
            var names   = txtVariables.Lines;

            collection.RemoveRange(cpuName, names);
            collection.Save(filepath);
        }
예제 #2
0
        private void btnAddVariables_Click(object sender, EventArgs e)
        {
            var filepath = AppSettings.VariableSettingsFile;

            var collection = new VariableInfoCollection(new FileWrapper());

            collection.Open(filepath);
            var cpuName = txtCpuName.Text;
            var names   = txtVariables.Lines;

            collection.AddRange(cpuName, names);
            collection.Save(filepath);
        }