Mercurial > repos > IBBoard.Windows.Forms
changeset 15:7c459ebc4210
* Code clean-up and documentation
no-open-ticket
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 18 Apr 2010 15:04:21 +0000 |
parents | 774fd3daefe1 |
children | 7ddfbe85c8d9 |
files | IBBoard.Windows.Forms.csproj Windows/Forms/I18N/ControlTranslator.cs |
diffstat | 2 files changed, 13 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/IBBoard.Windows.Forms.csproj Wed Apr 14 19:40:40 2010 +0000 +++ b/IBBoard.Windows.Forms.csproj Sun Apr 18 15:04:21 2010 +0000 @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <ProjectType>Local</ProjectType> @@ -7,13 +7,9 @@ <ProjectGuid>{E3790268-2082-4975-B1A3-C70B37842CE8}</ProjectGuid> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ApplicationIcon> - </ApplicationIcon> <AssemblyKeyContainerName> </AssemblyKeyContainerName> <AssemblyName>IBBoardWF</AssemblyName> - <AssemblyOriginatorKeyFile> - </AssemblyOriginatorKeyFile> <DefaultClientScript>JScript</DefaultClientScript> <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> <DefaultTargetSchema>IE50</DefaultTargetSchema> @@ -21,8 +17,6 @@ <OutputType>Library</OutputType> <RootNamespace>IBBoard</RootNamespace> <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> - <StartupObject> - </StartupObject> <FileUpgradeFlags> </FileUpgradeFlags> <UpgradeBackupLocation>
--- a/Windows/Forms/I18N/ControlTranslator.cs Wed Apr 14 19:40:40 2010 +0000 +++ b/Windows/Forms/I18N/ControlTranslator.cs Sun Apr 18 15:04:21 2010 +0000 @@ -11,6 +11,12 @@ namespace IBBoard.Windows.Forms.I18N { + /// <summary> + /// A custom cascading translator. It take any widget type (controls or components) and translates them + /// if they implement <see>ITranslatable</see> and optionally cascades the process to translate all children. + /// + /// Note: Translations <strong>will not</strong> cascade into MdiClient controls + /// </summary> public class ControlTranslator { /// <summary> @@ -21,7 +27,11 @@ { foreach (Control ctrl in controls) { - ControlTranslator.TranslateControl(ctrl); + if (!(ctrl is MdiClient)) + { + //Client windows must translate themselves + ControlTranslator.TranslateControl(ctrl); + } } } @@ -78,10 +88,7 @@ } else { - foreach (Control subctr in ctrl.Controls) - { - TranslateControl(subctr, true, replacements); - } + TranslateControls(ctrl.Controls); } }