SIL.Windows.Forms.Keyboarding/Windows/WinKeyboardAdaptor.cs
/// <summary>
/// Creates and returns a keyboard definition object based on the ID.
/// Note that this method is used when we do NOT have a matching available keyboard.
/// Therefore we can presume that the created one is NOT available.
/// </summary>
Creates and returns a keyboard definition object based on the ID.
Note that this method is used when we do NOT have a matching available keyboard.
Therefore we can presume that the created one is NOT available.
Creates and returns a keyboard definition object based on the ID . Note that this method is used when we do NOT have a matching available keyboard . Therefore we can presume that the created one is NOT available .
public KeyboardDescription CreateKeyboardDefinition(string id)
		{
			CheckDisposed();
			string[] parts = id.Split('_');
			string locale = parts[0];
			string layout = parts[1];
			IInputLanguage inputLanguage;
			string cultureName;
			try
			{
				var ci = new CultureInfo(locale);
				cultureName = ci.DisplayName;
				inputLanguage = new InputLanguageWrapper(ci, IntPtr.Zero, layout);
			}
			catch (CultureNotFoundException)
			{
				inputLanguage = null;
				cultureName = "[Unknown Language]";
			}
			return new WinKeyboardDescription(id, GetDisplayName(layout, cultureName), layout, locale, false, inputLanguage, this,
				GetDisplayName(layout, cultureName), new TfInputProcessorProfile());
		}
public KeyboardDescription CreateKeyboardDefinition ( string id ) { CheckDisposed ( ) ; string [ ] parts = id . Split ( ' ' ) ; string locale = parts [ 0 ] ; string layout = parts [ 1 ] ; IInputLanguage inputLanguage ; string cultureName ; try { var ci = new CultureInfo ( locale ) ; cultureName = ci . DisplayName ; inputLanguage = new InputLanguageWrapper ( ci , IntPtr . Zero , layout ) ; } catch ( CultureNotFoundException ) { inputLanguage = null ; cultureName = " " ; } return new WinKeyboardDescription ( id , GetDisplayName ( layout , cultureName ) , layout , locale , false , inputLanguage , this , GetDisplayName ( layout , cultureName ) , new TfInputProcessorProfile ( ) ) ; }
Creates and returns a keyboard definition object based on the ID.
Creates and returns a keyboard definition object based on the ID .
// ignore if we can't find a culture (this can happen e.g. when a language gets // removed that was previously assigned to a WS) - see LT-15333
id
string