This is the blog of the founder of the Udevi community. Here we'll talk about how to develop a big piece of software or a really small project, we'll have discussions with some great technologists in different domains: Java, .NET, Scala, and others as well. Follow the podcasts and the entries on the blog to find out some more stuff.

a) Create a new WinForms app in Visual Studio (File -> New -> Project -> Windows Forms Application) and change the name of the project to ViewFile.

b) Delete the form Form1.cs from the solution.

c) Add a new form to the project and name it ViewFile

2nd minute

a) Open the ViewFile form in Designer mode. Add a textbox to this form and name it txtFileContent. Change it's 'Multiline' property to true, and 'ScrollBars' to 'Both'.

b) Change it's size to fit the form. After this change the 'Anchor' property to 'Top, Bottom, Left, Right'.

c) Add a button to the form and name it btnLoadFile and change it's 'Text' property to 'Load File'.

d) Add a button to the form and name it btnSaveFile and change it's 'Text' property to 'Save File'.

e) Add a label where we'll show the file name. Name it lblFileName and change it's 'Text' property to 'File Name'

f) In Program.cs change the following line so that your application runs the ViewFile form.

Application.Run(new ViewFile());

At this point you can run the User Interface of our app.

3rd minute

a) Create a private field _fileName where we'll store the name of the file we want to open. Create than a method where we'll initialize all the fields in our app and name it InitObjects. Initialize there _fileName to string.Empty. Also we'll make the filename label empty for now, because we don't have a file opened.

b) Double click the 'Load File' button and in the event generated by Visual Studio create an instance of OpenFileDialog. Set the properties of this instance: 'CheckFileExists' (verifies if the file exists) - true, 'Multiselect' (the ability to select multiple files in the dialog at once) - false. And call the method ShowDialog.

c) When the file is selected we'll show in the label only the name of the file which is stored in 'SafeFileName' property of the OpenFileDialog instance. Also save the full path to the file in _fileName field, and it is equal to 'FileName' property of the instance of the dialog.