Exemplo n.º 1
0
		public bool Contains(InputLanguage value) {
			for (int i = 0; i < base.InnerList.Count; i++) {
				if ((this[i].Culture == value.Culture) && (this[i].LayoutName == value.LayoutName)) {
					return true;
				}
			}
			return false;
		}
Exemplo n.º 2
0
		public int IndexOf(InputLanguage value) {
			for (int i = 0; i < base.InnerList.Count; i++) {
				if ((this[i].Culture == value.Culture) && (this[i].LayoutName == value.LayoutName)) {
					return i;
				}
			}
			return -1;
		}
Exemplo n.º 3
0
 public void ChangeInputLanguage(InputLanguage InputLang)
 {
     // Check is this Language really installed. Raise exception to warn if it is not:
     if (InputLanguage.InstalledInputLanguages.IndexOf(InputLang) == -1)
         throw new ArgumentOutOfRangeException();
     // InputLAnguage changes here:
     InputLanguage.CurrentInputLanguage = InputLang;
 }
Exemplo n.º 4
0
        /// <include file='doc\InputLangChangeRequestEvent.uex' path='docs/doc[@for="InputLanguageChangingEventArgs.InputLanguageChangingEventArgs1"]/*' />
        /// <devdoc>
        ///    <para>
        ///       Initializes a new instance of the <see cref='System.Windows.Forms.InputLanguageChangingEventArgs'/> class with the
        ///       specified input language, character set, and acceptance of
        ///       a language change.
        ///    </para>
        /// </devdoc>
        public InputLanguageChangingEventArgs(InputLanguage inputLanguage, bool sysCharSet) {

            if (inputLanguage == null)
                throw new ArgumentNullException("inputLanguage");

            this.inputLanguage = inputLanguage;
            this.culture = inputLanguage.Culture;
            this.sysCharSet = sysCharSet;
        }
Exemplo n.º 5
0
 private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
 {
     foreach (InputLanguage language in InputLanguage.InstalledInputLanguages)
     {
         if (comboBox2.SelectedItem as string == language.Culture.EnglishName)
         {
             Console.WriteLine("22");
             langMeaning = language;
             break;
         }
     }
 }
        public static bool IsLanguageSupported(InputLanguage inputLanguage, Language language)
        {
            if(inputLanguage == null)
                throw new ArgumentNullException("inputLanguage");

            // TODO: support of other languages
            if(inputLanguage.LayoutName == "Strange Ukrainian" || inputLanguage.LayoutName == "Srange Ukrainian 1.6")
            {
                return language == Language.Russian || language == Language.Ukrainian;
            }
            return LanguageHelper.IsLanguageSupported(inputLanguage.Culture, language);
        }
Exemplo n.º 7
0
        public Form2(InputLanguage t_langPhrase, InputLanguage t_langMeaning)
        {
            InitializeComponent();

            langPhrase = t_langPhrase;
            langMeaning = t_langMeaning;

            foreach (InputLanguage language in InputLanguage.InstalledInputLanguages)
                comboBox1.Items.Add(language.Culture.EnglishName);

            foreach (InputLanguage language in InputLanguage.InstalledInputLanguages)
                comboBox2.Items.Add(language.Culture.EnglishName);

            comboBox1.SelectedItem = t_langPhrase.Culture.EnglishName;
            comboBox2.SelectedItem = t_langMeaning.Culture.EnglishName;
        }
Exemplo n.º 8
0
 private void t24_Enter(object sender, EventArgs e)
 {
     oldInput = InputLanguage.CurrentInputLanguage;
     InputLanguage.CurrentInputLanguage = null;
     L("�������ʽ��롰�����ʽ��롱�ı��ʡ����磺30.00%");
 }
Exemplo n.º 9
0
 private void t15_Enter(object sender, EventArgs e)
 {
     oldInput = InputLanguage.CurrentInputLanguage;
     InputLanguage.CurrentInputLanguage = null;
     L("�ǽ�����������˰ ���磺10.00%");
 }
Exemplo n.º 10
0
 private void t13_Enter(object sender, EventArgs e)
 {
     oldInput = InputLanguage.CurrentInputLanguage;
     InputLanguage.CurrentInputLanguage = null;
     L("����ȷ�ϳɱ����ñ����۾ɷ������ڼ��꿪ʼ��̬���١����磺4��");
 }
Exemplo n.º 11
0
 private void t11_Enter(object sender, EventArgs e)
 {
     oldInput = InputLanguage.CurrentInputLanguage;
     InputLanguage.CurrentInputLanguage = null;
     L("�ɱ�����������磺5.70%");
 }
Exemplo n.º 12
0
 private void vGridControl_FocusedRowChanged(object sender, DevExpress.XtraVerticalGrid.Events.FocusedRowChangedEventArgs e)
 {
     DevExpress.XtraEditors.Repository.RepositoryItemTextEdit edit = e.Row.Properties.RowEdit as DevExpress.XtraEditors.Repository.RepositoryItemTextEdit;
     if (edit != null && edit.Mask.MaskType == DevExpress.XtraEditors.Mask.MaskType.Numeric)
     {
         oldInput = InputLanguage.CurrentInputLanguage;
         InputLanguage.CurrentInputLanguage = null;
     }
     else
     {
         if (oldInput != null && oldInput != InputLanguage.CurrentInputLanguage)
         {
             InputLanguage.CurrentInputLanguage = oldInput;
         }
     }
 }
 /// <include file='doc\InputLanguageCollection.uex' path='docs/doc[@for="InputLanguageCollection.CopyTo"]/*' />
 /// <devdoc>
 /// <para>Copies the <see cref='System.Windows.Forms.InputLanguageCollection'/> values to a one-dimensional <see cref='System.Array'/> instance at the 
 ///    specified index.</para>
 /// </devdoc>
 public void CopyTo(InputLanguage[] array, int index) {
     InnerList.CopyTo(array, index);
 }
Exemplo n.º 14
0
 private void t9_Enter(object sender, EventArgs e)
 {
     oldInput = InputLanguage.CurrentInputLanguage;
     InputLanguage.CurrentInputLanguage = null;
     L("����˰�ʡ����磺33.00%");
 }
Exemplo n.º 15
0
 /// <include file='doc\InputLanguageCollection.uex' path='docs/doc[@for="InputLanguageCollection.IndexOf"]/*' />
 /// <devdoc>
 ///    <para>Returns the index of a <see cref='System.Windows.Forms.InputLanguage'/> in
 ///       the <see cref='System.Windows.Forms.InputLanguageCollection'/> .</para>
 /// </devdoc>
 public int IndexOf(InputLanguage value)
 {
     return(InnerList.IndexOf(value));
 }
Exemplo n.º 16
0
 /// <include file='doc\InputLanguageCollection.uex' path='docs/doc[@for="InputLanguageCollection.Contains"]/*' />
 /// <devdoc>
 /// <para>Gets a value indicating whether the
 ///    <see cref='System.Windows.Forms.InputLanguageCollection'/> contains the specified <see cref='System.Windows.Forms.InputLanguage'/>.</para>
 /// </devdoc>
 public bool Contains(InputLanguage value)
 {
     return(InnerList.Contains(value));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref='InputLanguageChangedEventArgs'/>class with the specified input language and
 /// character set.
 /// </summary>
 public InputLanguageChangedEventArgs(InputLanguage inputLanguage, byte charSet)
 {
     InputLanguage = inputLanguage ?? throw new ArgumentNullException(nameof(inputLanguage));
     Culture       = inputLanguage.Culture;
     CharSet       = charSet;
 }
 /// <summary>
 ///  Initializes a new instance of the <see cref='InputLanguageChangingEventArgs'/> class with the
 ///  specified input language, character set, and acceptance of a language change.
 /// </summary>
 public InputLanguageChangingEventArgs(InputLanguage inputLanguage, bool sysCharSet)
 {
     InputLanguage = inputLanguage ?? throw new ArgumentNullException(nameof(inputLanguage));
     Culture       = inputLanguage.Culture;
     SysCharSet    = sysCharSet;
 }
 /// <summary>
 ///  Initializes a new instance of the <see cref='InputLanguageChangingEventArgs'/> class with the
 ///  specified locale, character set, and acceptance.
 /// </summary>
 public InputLanguageChangingEventArgs(CultureInfo culture, bool sysCharSet)
 {
     InputLanguage = InputLanguage.FromCulture(culture);
     Culture       = culture;
     SysCharSet    = sysCharSet;
 }
Exemplo n.º 20
0
 /// <summary>
 ///  Initializes a new instance of the <see cref="InputLanguageChangingEventArgs"/> class with the
 ///  specified input language, character set, and acceptance of a language change.
 /// </summary>
 public InputLanguageChangingEventArgs(InputLanguage inputLanguage, bool sysCharSet)
 {
     InputLanguage = inputLanguage.OrThrowIfNull();
     Culture       = inputLanguage.Culture;
     SysCharSet    = sysCharSet;
 }
Exemplo n.º 21
0
 private void t3_Enter(object sender, EventArgs e)
 {
     oldInput = InputLanguage.CurrentInputLanguage;
     InputLanguage.CurrentInputLanguage = null;
     L("����������Ҫ��ʱ�䡣���磺10��");
 }
Exemplo n.º 22
0
 private void t7_Enter(object sender, EventArgs e)
 {
     oldInput = InputLanguage.CurrentInputLanguage;
     InputLanguage.CurrentInputLanguage = null;
     L("����Ӫ�ɱ����롰�̶��ʲ�ԭֵ���ı��ʡ����磺5%");
 }
 public InputLanguageChangedEventArgs(System.Globalization.CultureInfo culture, byte charSet)
 {
     this.culture        = culture;
     this.charset        = charSet;
     this.input_language = InputLanguage.FromCulture(culture);
 }
Exemplo n.º 24
0
 /**
  * @deprecated.  Use the other constructor instead.
  */
 /// <include file='doc\InputLangChangeEvent.uex' path='docs/doc[@for="InputLanguageChangedEventArgs.InputLanguageChangedEventArgs"]/*' />
 /// <internalonly/>
 /// <devdoc>
 ///    <para>
 ///       Initializes a new instance of the <see cref='System.Windows.Forms.InputLanguageChangedEventArgs'/> class with the
 ///       specified locale and character set.
 ///    </para>
 /// </devdoc>
 public InputLanguageChangedEventArgs(CultureInfo culture, byte charSet)
 {
     this.inputLanguage = System.Windows.Forms.InputLanguage.FromCulture(culture);
     this.culture       = culture;
     this.charSet       = charSet;
 }
 public InputLanguageChangedEventArgs(InputLanguage inputLanguage, byte charSet)
 {
     this.culture        = inputLanguage.Culture;
     this.charset        = charSet;
     this.input_language = inputLanguage;
 }
 /// <include file='doc\InputLanguageCollection.uex' path='docs/doc[@for="InputLanguageCollection.IndexOf"]/*' />
 /// <devdoc>
 ///    <para>Returns the index of a <see cref='System.Windows.Forms.InputLanguage'/> in 
 ///       the <see cref='System.Windows.Forms.InputLanguageCollection'/> .</para>
 /// </devdoc>
 public int IndexOf(InputLanguage value) {
     return InnerList.IndexOf(value);
 }
Exemplo n.º 27
0
        internal static InputLanguageChangingEventArgs CreateInputLanguageChangingEventArgs(Message m)
        {
            InputLanguage inputLanguage = new InputLanguage(m.LParam);

            return(new InputLanguageChangingEventArgs(inputLanguage, !(m.WParam == IntPtr.Zero)));
        }
Exemplo n.º 28
0
        /// <include file='doc\InputLanguage.uex' path='docs/doc[@for="InputLanguage.CreateInputLanguageChangingEventArgs"]/*' />
        /// <devdoc>
        ///     Creates an InputLanguageChangingEventArgs given a windows message.
        /// </devdoc>
        /// <internalonly/>
        internal static InputLanguageChangingEventArgs CreateInputLanguageChangingEventArgs(Message m) {
            InputLanguage inputLanguage = new InputLanguage(m.LParam);

            // NOTE: by default we should allow any locale switch
            //
            bool localeSupportedBySystem = !(m.WParam == IntPtr.Zero);
            return new InputLanguageChangingEventArgs(inputLanguage, localeSupportedBySystem);

        }
Exemplo n.º 29
0
 /// <devdoc>
 /// Initializes a new instance of the <see cref='System.Windows.Forms.InputLanguageChangedEventArgs'/> class with the
 /// specified locale and character set.
 /// </devdoc>
 public InputLanguageChangedEventArgs(CultureInfo culture, byte charSet)
 {
     InputLanguage = InputLanguage.FromCulture(culture);
     Culture       = culture;
     CharSet       = charSet;
 }
Exemplo n.º 30
0
 private void t12_Enter(object sender, EventArgs e)
 {
     oldInput = InputLanguage.CurrentInputLanguage;
     InputLanguage.CurrentInputLanguage = null;
     L("���д�����ʣ����ڼ��㾻�ֽ�������ֵ�����磺8%");
 }
Exemplo n.º 31
0
 /// <summary>
 ///  Initializes a new instance of the <see cref='InputLanguageChangedEventArgs'/> class with the specified input language and
 ///  character set.
 /// </summary>
 public InputLanguageChangedEventArgs(InputLanguage inputLanguage, byte charSet)
 {
     InputLanguage = inputLanguage.OrThrowIfNull();
     Culture       = inputLanguage.Culture;
     CharSet       = charSet;
 }
Exemplo n.º 32
0
 private void t14_Enter(object sender, EventArgs e)
 {
     oldInput = InputLanguage.CurrentInputLanguage;
     InputLanguage.CurrentInputLanguage = null;
     L("���̶��ʲ���ֵ���롰ԭ����ֵ���ı��ʡ����磺5.00%");
 }
Exemplo n.º 33
0
 public InputLanguageChangingEventArgs(InputLanguage inputLanguage, bool sysCharSet)
 {
     this.culture        = inputLanguage.Culture;
     this.system_charset = sysCharSet;
     this.input_language = inputLanguage;
 }
Exemplo n.º 34
0
 private void t21_Enter(object sender, EventArgs e)
 {
     oldInput = InputLanguage.CurrentInputLanguage;
     InputLanguage.CurrentInputLanguage = null;
     L("��̬Ͷ�ʷֶ���磺80.00%");
 }
Exemplo n.º 35
0
		public InputLanguageWrapper(InputLanguage lang)
		{
			Culture = lang.Culture;
			Handle = lang.Handle;
			LayoutName = lang.LayoutName;
		}
Exemplo n.º 36
0
 private void t25_Enter(object sender, EventArgs e)
 {
     oldInput = InputLanguage.CurrentInputLanguage;
     InputLanguage.CurrentInputLanguage = null;
     L("�������������֮�ȡ����磺50%");
 }
Exemplo n.º 37
0
 public InputLanguageChangingEventArgs(System.Globalization.CultureInfo culture, bool sysCharSet)
 {
     this.culture        = culture;
     this.system_charset = sysCharSet;
     this.input_language = InputLanguage.FromCulture(culture);
 }
Exemplo n.º 38
0
 private void t4_Enter(object sender, EventArgs e)
 {
     oldInput = InputLanguage.CurrentInputLanguage;
     InputLanguage.CurrentInputLanguage = null;
     L("��Ŀ�����ڡ����磺25��");
 }
 /// <include file='doc\InputLanguageCollection.uex' path='docs/doc[@for="InputLanguageCollection.InputLanguageCollection"]/*' />
 /// <devdoc>
 ///     <para>
 ///       Initializes a new instance of <see cref='System.Windows.Forms.InputLanguageCollection'/> containing any array of <see cref='System.Windows.Forms.InputLanguage'/> objects.
 ///    </para>
 /// </devdoc>
 internal InputLanguageCollection(InputLanguage[] value) {
     InnerList.AddRange(value);
 }
Exemplo n.º 40
0
 private void t8_Enter(object sender, EventArgs e)
 {
     oldInput = InputLanguage.CurrentInputLanguage;
     InputLanguage.CurrentInputLanguage = null;
     L("���۾ɶ�롰ԭ����ֵ���ı��ʡ����磺4.75%");
 }
 /// <include file='doc\InputLanguageCollection.uex' path='docs/doc[@for="InputLanguageCollection.Contains"]/*' />
 /// <devdoc>
 /// <para>Gets a value indicating whether the 
 ///    <see cref='System.Windows.Forms.InputLanguageCollection'/> contains the specified <see cref='System.Windows.Forms.InputLanguage'/>.</para>
 /// </devdoc>
 public bool Contains(InputLanguage value) {
     return InnerList.Contains(value);
 }
Exemplo n.º 42
0
 private void spinEdit3_Enter(object sender, EventArgs e)
 {
     oldInput = InputLanguage.CurrentInputLanguage;
     InputLanguage.CurrentInputLanguage = null;
 }
Exemplo n.º 43
0
 public InputLanguageChangedEventArgs(InputLanguage inputLanguage, byte charSet)
 {
     throw null;
 }
Exemplo n.º 44
0
 private void treeList1_FocusedColumnChanged(object sender, DevExpress.XtraTreeList.FocusedColumnChangedEventArgs e)
 {
     try
     {
         DevExpress.XtraEditors.Repository.RepositoryItemTextEdit edit = e.Column.ColumnEdit as DevExpress.XtraEditors.Repository.RepositoryItemTextEdit;
         if (edit != null && edit.Mask.MaskType == DevExpress.XtraEditors.Mask.MaskType.Numeric)
         {
             oldInput = InputLanguage.CurrentInputLanguage;
             InputLanguage.CurrentInputLanguage = null;
         }
         else
         {
             if (oldInput != null && oldInput != InputLanguage.CurrentInputLanguage)
             {
                 InputLanguage.CurrentInputLanguage = oldInput;
             }
         }
     }
     catch { }
 }
		public InputLanguageChangedEventArgs(InputLanguage inputLanguage, byte charSet) {
			this.culture = inputLanguage.Culture;
			this.charset = charSet;
			this.input_language = inputLanguage;
		}