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

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

            result.text = source1.text + source2.text;
            return(result);
        }
Beispiel #3
0
 public StringBoxControl(StringBox field)
     : base()
 {
     father  = field;
     this.ID = father.Name;
     if (father.text != null)
     {
         this.Text = father.text;
     }
 }
Beispiel #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;
     }
 }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #7
0
 public static bool IsSelected(RadioButtonList radio, StringBox str)
 {
     return(radio.text == str.text);
 }
Beispiel #8
0
 public static bool IsEmpty(StringBox s)
 {
     return(s.text == null);
 }
Beispiel #9
0
 public static bool RegexMatch(StringBox s1, StringBox pattern)
 {
     return(System.Text.RegularExpressions.Regex.IsMatch(s1.text, pattern.text));
 }
Beispiel #10
0
 public static bool Equals(StringBox sBox1, StringBox sBox2)
 {
     return(sBox1.text.Equals(sBox2.text));
 }
Beispiel #11
0
 public static bool IsEmpty(StringBox s)
 {
     return(String.IsNullOrEmpty(s.text));
 }
Beispiel #12
0
 public static bool EndsWith(StringBox sBox, StringBox endBox)
 {
     return(sBox.text.EndsWith(endBox.text));
 }
Beispiel #13
0
 public static bool StartsWith(StringBox sBox, StringBox startBox)
 {
     return(sBox.text.StartsWith(startBox.text));
 }
Beispiel #14
0
 public static bool Contains(StringBox sBox, StringBox parBox)
 {
     return(sBox.text.Contains(parBox.text));
 }