Esempio n. 1
0
        /// <summary>
        /// Return (or create anew if it hasn't been yet) the KeyAssignmentSet class for the given language.
        /// </summary>
        public static KeyAssignmentSet For(WhichKeyboardLayout whichKeyboardLayout)
        {
            // Create the new set, if it hasn't been already.
            if (s_theKeyAssignmentSet == null || s_theKeyAssignmentSet.KeyboardLayout != whichKeyboardLayout)
            {
                switch (whichKeyboardLayout)
                {
                case WhichKeyboardLayout.Arabic:
                    s_theKeyAssignmentSet = new ArabicKeyAssignmentSet();
                    break;

                case WhichKeyboardLayout.French:
                    s_theKeyAssignmentSet = new FrenchKeyAssignmentSet();
                    break;

                case WhichKeyboardLayout.GermanAustrian:
                    s_theKeyAssignmentSet = new GermanKeyAssignmentSet();
                    break;

                case WhichKeyboardLayout.Italian:
                    break;

                case WhichKeyboardLayout.Mandarin:
                    break;

                case WhichKeyboardLayout.Russian:
                    s_theKeyAssignmentSet = new RussianKeyAssignmentSet();
                    break;

                case WhichKeyboardLayout.Spanish:
                    s_theKeyAssignmentSet = new SpanishKeyAssignmentSet();
                    break;

                case WhichKeyboardLayout.Sanskrit:
                    s_theKeyAssignmentSet = new SanskritKeyAssignmentSet();
                    break;

                case WhichKeyboardLayout.Tamil:
                    s_theKeyAssignmentSet = new TamilKeyAssignmentSet();
                    break;

                default:      // This defaults to English.
                    s_theKeyAssignmentSet = new KeyAssignmentSet();
                    break;
                }
            }
            return(s_theKeyAssignmentSet);
        }
 /// <summary>
 /// Return (or create anew if it hasn't been yet) the KeyAssignmentSet class for the given language.
 /// </summary>
 public static KeyAssignmentSet For(WhichKeyboardLayout whichKeyboardLayout)
 {
     // Create the new set, if it hasn't been already.
     if (s_theKeyAssignmentSet == null || s_theKeyAssignmentSet.KeyboardLayout != whichKeyboardLayout)
     {
         switch (whichKeyboardLayout)
         {
             case WhichKeyboardLayout.Arabic:
                 s_theKeyAssignmentSet = new ArabicKeyAssignmentSet();
                 break;
             case WhichKeyboardLayout.French:
                 s_theKeyAssignmentSet = new FrenchKeyAssignmentSet();
                 break;
             case WhichKeyboardLayout.GermanAustrian:
                 s_theKeyAssignmentSet = new GermanKeyAssignmentSet();
                 break;
             case WhichKeyboardLayout.Italian:
                 break;
             case WhichKeyboardLayout.Mandarin:
                 break;
             case WhichKeyboardLayout.Russian:
                 s_theKeyAssignmentSet = new RussianKeyAssignmentSet();
                 break;
             case WhichKeyboardLayout.Spanish:
                 s_theKeyAssignmentSet = new SpanishKeyAssignmentSet();
                 break;
             case WhichKeyboardLayout.Sanskrit:
                 s_theKeyAssignmentSet = new SanskritKeyAssignmentSet();
                 break;
             case WhichKeyboardLayout.Tamil:
                 s_theKeyAssignmentSet = new TamilKeyAssignmentSet();
                 break;
             default:  // This defaults to English.
                 s_theKeyAssignmentSet = new KeyAssignmentSet();
                 break;
         }
     }
     return s_theKeyAssignmentSet;
 }