|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Configuration;
using System.Diagnostics;
namespace Test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
// Get configuration
Sample cnfg = SampleConfigurationManager.Data;
// Access configuration data
MessageBox.Show(String.Format("Configured screen width: {0}",
cnfg.Screen.Width));
// Alter configuration
cnfg.Screen.Width = 640;
cnfg.Screen.Height = 480;
// Save configuration
SampleConfigurationManager.Save();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Leon works as Chief Architect at SRL Group. He leads architectural design and development of various enterprise level projects.
You can meet him on user groups, conferences and forums dedicated to Architecture, ASP.NET, Team System etc. or join him for the next white water rafting adventure