Exemple #1
0
        public static StringBox ToUpperCase(StringBox source)
        {
            StringBox result = new StringBox();

            result.text = source.text.ToUpper();
            return(result);
        }
Exemple #2
0
        public static StringBox Concat(StringBox source1, StringBox source2)
        {
            StringBox result = new StringBox();

            result.text = source1.text + source2.text;
            return(result);
        }
Exemple #3
0
 public StringBoxControl(StringBox field)
     : base()
 {
     father  = field;
     this.ID = father.Name;
     if (father.text != null)
     {
         this.Text = father.text;
     }
 }
Exemple #4
0
 public StringBoxControl(StringBox field)
     : base()
 {
     father  = field;
     this.ID = String.IsNullOrEmpty(father.Name) ? "_stringBox" : father.Name;
     // for rollback..
     if (father.text != null)
     {
         this.Text = father.text;
     }
 }
Exemple #5
0
        public static IntBox Length(StringBox source)
        {
            IntBox      result = new IntBox();
            XmlDocument doc    = new XmlDocument();

            XmlNode nodeValue = doc.CreateElement("null");

            nodeValue.AppendChild(doc.CreateElement("Value"));
            nodeValue.FirstChild.InnerText = source.text.Length.ToString();

            result.Value = nodeValue;

            return(result);
        }
Exemple #6
0
        public static IntBox Length(StringBox source)
        {
            IntBox      result = new IntBox();
            XmlDocument doc    = new XmlDocument();

            XmlNode nodeValue = doc.CreateElement("null");

            nodeValue.AppendChild(doc.CreateElement("Value"));
            nodeValue.FirstChild.InnerText = source.text.Length.ToString();
            List <XmlNode> listres = new List <XmlNode>();

            listres.Add(nodeValue);
            result.SetValue(listres);

            return(result);
        }
Exemple #7
0
 public static bool IsSelected(RadioButtonList radio, StringBox str)
 {
     return(radio.text == str.text);
 }
Exemple #8
0
 public static bool IsEmpty(StringBox s)
 {
     return(s.text == null);
 }
Exemple #9
0
 public static bool RegexMatch(StringBox s1, StringBox pattern)
 {
     return(System.Text.RegularExpressions.Regex.IsMatch(s1.text, pattern.text));
 }
Exemple #10
0
 public static bool Equals(StringBox sBox1, StringBox sBox2)
 {
     return(sBox1.text.Equals(sBox2.text));
 }
Exemple #11
0
 public static bool IsEmpty(StringBox s)
 {
     return(String.IsNullOrEmpty(s.text));
 }
Exemple #12
0
 public static bool EndsWith(StringBox sBox, StringBox endBox)
 {
     return(sBox.text.EndsWith(endBox.text));
 }
Exemple #13
0
 public static bool StartsWith(StringBox sBox, StringBox startBox)
 {
     return(sBox.text.StartsWith(startBox.text));
 }
Exemple #14
0
 public static bool Contains(StringBox sBox, StringBox parBox)
 {
     return(sBox.text.Contains(parBox.text));
 }