// -- FILE ------------------------------------------------------------------ // name : MainForm.cs // project : Itenso String Resources // created : Jani Giannoudis - 2011.09.09 // language : c# // environment: .NET 4.0 // copyright : (c) 2004-2011 by Itenso GmbH, Switzerland // -------------------------------------------------------------------------- using System; using System.Windows.Forms; using Itenso.Community.StringResources.SampleLibrary; namespace Itenso.Community.StringResources.SampleApplication { // ------------------------------------------------------------------------ public partial class MainForm : Form { // ---------------------------------------------------------------------- public MainForm() { InitializeComponent(); SetupControls(); UpdateControls(); } // MainForm // ---------------------------------------------------------------------- private void StatusList_SelectedIndexChanged( object sender, EventArgs e ) { UpdateControls(); } // StatusList_SelectedIndexChanged // ---------------------------------------------------------------------- private void SetupControls() { ApplicationInfoLabel.Text = Strings.ApplicationInfoLabel; ApplicationInfo.Text = Strings.ApplicationInfo; StatusLabel.Text = Strings.StatusNameLabel; StatusList.DataSource = StatusHelper.StatusItems; StatusList.DisplayMember = "Description"; StatusList.ValueMember = "Value"; StatusList.SelectedItem = StatusHelper.StatusItems[ Status.Info ]; SelectedStatusLabel.Text = Strings.SelectedStatusNameLabel; MediaDurationLabel.Text = Strings.MediaDurationLabel; MediaDuration.Text = Strings.MediaDuration( new TimeSpan( 0, 8, 45 ) ); } // SetupControls // ---------------------------------------------------------------------- private void UpdateControls() { SelectedStatus.Text = StatusList.SelectedItem.ToString(); } // UpdateControls } // class MainForm } // namespace Itenso.Community.StringResources.SampleApplication // -- EOF -------------------------------------------------------------------
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.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)