Ejemplo n.º 1
0
 public static int GetInputMethod(EN_CH ench)
 {
     if (xmlDoc == null)
     {
         LoadConfig();
     }
     try
     {
         if (ench == EN_CH.CH)
         {
             return(Convert.ToInt32(xmlDoc.DocumentElement.SelectNodes("inputMethod")[0].Attributes["CH"].Value));
         }
         else if (ench == EN_CH.EN)
         {
             return(Convert.ToInt32(xmlDoc.DocumentElement.SelectNodes("inputMethod")[0].Attributes["EN"].Value));
         }
         else
         {
             return(-1);
         }
     }
     catch
     {
         return(-1);
     }
 }
 public static int GetInputMethod(EN_CH ench)
 {
     if (xmlDoc == null) LoadConfig();
     if (ench == EN_CH.CH)
         return Convert.ToInt32(xmlDoc.DocumentElement.SelectNodes("inputMethod")[0].Attributes["CH"].Value);
     else
         return Convert.ToInt32(xmlDoc.DocumentElement.SelectNodes("inputMethod")[0].Attributes["EN"].Value);
 }
Ejemplo n.º 3
0
        public void AddItem(Control _control, string _name, bool _required, string _invalidMessage, InvalidType _invalidType, string _invalidRules, EN_CH _inputMethod, object _defaultValue)
        {
            FormItem item = new FormItem();

            item.controlItem    = _control;
            item.controlName    = _name;
            item.required       = _required;
            item.invalidMessage = _invalidMessage;
            item.invalidType    = _invalidType;
            item.InvalidRules   = _invalidRules;
            item.inputMethod    = _inputMethod;
            item.defaultValue   = _defaultValue;

            _control.Enter += new EventHandler(_control_Enter);
            _control.KeyUp += new KeyEventHandler(_control_KeyUp);
            itemlist.Add(item);
        }