Exemplo n.º 1
0
    public override void AddValidatorSettingsView(Control parentCtrl)
    {
      int minLength = 0;
      bool minExist = TryGetProperty("MinimumLength", ref minLength);

      int maxLength = 0;
      bool maxExist = TryGetProperty("MaximumLength", ref maxLength);

      if (minExist)
      {
        Portal.API.Controls.Label lbl = new Portal.API.Controls.Label();
        lbl.LanguageRef = "MinimumLength";
        parentCtrl.Controls.Add(lbl);

        Label val = new Label();
        val.Text = minLength.ToString();
        parentCtrl.Controls.Add(val);

        if (maxExist)
          parentCtrl.Controls.Add(new LiteralControl("</br>"));
      }

      if (maxExist)
      {
        Portal.API.Controls.Label lbl = new Portal.API.Controls.Label();
        lbl.LanguageRef = "MaximumLength";
        parentCtrl.Controls.Add(lbl);

        Label val = new Label();
        val.Text = maxLength.ToString();
        parentCtrl.Controls.Add(val);
      }
    }
Exemplo n.º 2
0
        public override void AddValidatorSettingsView(Control parentCtrl)
        {
            int  minLength = 0;
            bool minExist  = TryGetProperty("MinimumLength", ref minLength);

            int  maxLength = 0;
            bool maxExist  = TryGetProperty("MaximumLength", ref maxLength);

            if (minExist)
            {
                Portal.API.Controls.Label lbl = new Portal.API.Controls.Label();
                lbl.LanguageRef = "MinimumLength";
                parentCtrl.Controls.Add(lbl);

                Label val = new Label();
                val.Text = minLength.ToString();
                parentCtrl.Controls.Add(val);

                if (maxExist)
                {
                    parentCtrl.Controls.Add(new LiteralControl("</br>"));
                }
            }

            if (maxExist)
            {
                Portal.API.Controls.Label lbl = new Portal.API.Controls.Label();
                lbl.LanguageRef = "MaximumLength";
                parentCtrl.Controls.Add(lbl);

                Label val = new Label();
                val.Text = maxLength.ToString();
                parentCtrl.Controls.Add(val);
            }
        }
Exemplo n.º 3
0
    public override void AddValidatorSettingsEdit(Control parentCtrl)
    {
      Portal.API.Controls.Label lbl = new Portal.API.Controls.Label();
      lbl.LanguageRef = "MinimumLength";
      parentCtrl.Controls.Add(lbl);

      // Minimale Länge.
      TextBox lengthBox = new TextBox();
      lengthBox.ID = "_minLength";
      int length = 0;
      if(TryGetProperty("MinimumLength", ref length))
        lengthBox.Text = length.ToString();

      parentCtrl.Controls.Add(lengthBox);

      parentCtrl.Controls.Add(new LiteralControl("</br>"));

      // Maximale Länge.
      lbl = new Portal.API.Controls.Label();
      lbl.LanguageRef = "MaximumLength";
      parentCtrl.Controls.Add(lbl);

      lengthBox = new TextBox();
      lengthBox.ID = "_maxLength";
      if (TryGetProperty("MaximumLength", ref length))
        lengthBox.Text = length.ToString();
        
      parentCtrl.Controls.Add(lengthBox);
    }
    public override void AddValidatorSettingsView(Control parentCtrl)
    {
      int minimum = 0;
      bool minExist = TryGetProperty("MinimumValue", ref minimum);

      int maximum = 0;
      bool maxExist = TryGetProperty("Maximum", ref maximum);

      if (minExist)
      {
        Portal.API.Controls.Label desc = new Portal.API.Controls.Label();
        desc.LanguageRef = "Minimum";
        parentCtrl.Controls.Add(desc);

        Label val = new Label();
        val.Text = minimum.ToString();
        parentCtrl.Controls.Add(val);

        if (maxExist)
          parentCtrl.Controls.Add(new LiteralControl("</br>"));
      }

      if (maxExist)
      {
        Portal.API.Controls.Label desc = new Portal.API.Controls.Label();
        desc.LanguageRef = "Maximum";
        parentCtrl.Controls.Add(desc);

        Label val = new Label();
        val.Text = maximum.ToString();
        parentCtrl.Controls.Add(val);
      }
    }
Exemplo n.º 5
0
        public override void AddValidatorSettingsEdit(Control parentCtrl)
        {
            Portal.API.Controls.Label lbl = new Portal.API.Controls.Label();
            lbl.LanguageRef = "MinimumLength";
            parentCtrl.Controls.Add(lbl);

            // Minimale Länge.
            TextBox lengthBox = new TextBox();

            lengthBox.ID = "_minLength";
            int length = 0;

            if (TryGetProperty("MinimumLength", ref length))
            {
                lengthBox.Text = length.ToString();
            }

            parentCtrl.Controls.Add(lengthBox);

            parentCtrl.Controls.Add(new LiteralControl("</br>"));

            // Maximale Länge.
            lbl             = new Portal.API.Controls.Label();
            lbl.LanguageRef = "MaximumLength";
            parentCtrl.Controls.Add(lbl);

            lengthBox    = new TextBox();
            lengthBox.ID = "_maxLength";
            if (TryGetProperty("MaximumLength", ref length))
            {
                lengthBox.Text = length.ToString();
            }

            parentCtrl.Controls.Add(lengthBox);
        }
Exemplo n.º 6
0
        public override void AddValidatorSettingsEdit(Control parentCtrl)
        {
            Portal.API.Controls.Label lbl = new Portal.API.Controls.Label();
            lbl.LanguageRef = "Expression";
            parentCtrl.Controls.Add(lbl);

            // Ausdruck.
            TextBox expressionBox = new TextBox();

            expressionBox.ID = "_expression";
            string expression = "";

            if (TryGetProperty("Regex", ref expression))
            {
                expressionBox.Text = expression;
            }
            parentCtrl.Controls.Add(expressionBox);

            HyperLink info = new HyperLink();

            info.ImageUrl    = "~/PortalImages/help.gif";
            info.NavigateUrl = "http://msdn2.microsoft.com/en-us/library/hs600312.aspx";
            info.Target      = "_blank";
            parentCtrl.Controls.Add(info);
        }
    public override void AddValidatorSettingsEdit(Control parentCtrl)
    {
      // Minimum
      Portal.API.Controls.Label lbl = new Portal.API.Controls.Label();
      lbl.LanguageRef = "Minimum";
      parentCtrl.Controls.Add(lbl);

      TextBox minimumBox = new TextBox();
      minimumBox.ID = "_minimum";
      int minimum = 0;
      if (TryGetProperty("MinimumValue", ref minimum))
        minimumBox.Text = minimum.ToString();
      parentCtrl.Controls.Add(minimumBox);

      parentCtrl.Controls.Add(new LiteralControl("</br>"));

      // Maximum.
      lbl = new Portal.API.Controls.Label();
      lbl.LanguageRef = "Maximum";
      parentCtrl.Controls.Add(lbl);

      TextBox maximumBox = new TextBox();
      maximumBox.ID = "_maximum";
      int maximum = 0;
      if (TryGetProperty("MaximumValue", ref maximum))
        maximumBox.Text = maximum.ToString();
      parentCtrl.Controls.Add(maximumBox);
    }
Exemplo n.º 8
0
        public override void AddValidatorSettingsView(Control parentCtrl)
        {
            int  minimum  = 0;
            bool minExist = TryGetProperty("MinimumValue", ref minimum);

            int  maximum  = 0;
            bool maxExist = TryGetProperty("Maximum", ref maximum);

            if (minExist)
            {
                Portal.API.Controls.Label desc = new Portal.API.Controls.Label();
                desc.LanguageRef = "Minimum";
                parentCtrl.Controls.Add(desc);

                Label val = new Label();
                val.Text = minimum.ToString();
                parentCtrl.Controls.Add(val);

                if (maxExist)
                {
                    parentCtrl.Controls.Add(new LiteralControl("</br>"));
                }
            }

            if (maxExist)
            {
                Portal.API.Controls.Label desc = new Portal.API.Controls.Label();
                desc.LanguageRef = "Maximum";
                parentCtrl.Controls.Add(desc);

                Label val = new Label();
                val.Text = maximum.ToString();
                parentCtrl.Controls.Add(val);
            }
        }
Exemplo n.º 9
0
    public override void AddValidatorSettingsView(Control parentCtrl)
    {    
      Portal.API.Controls.Label lbl = new Portal.API.Controls.Label();
      lbl.LanguageRef = "Expression";
      parentCtrl.Controls.Add(lbl);

      string expression = "";
      if (TryGetProperty("Regex", ref expression))
      {
        Label val = new Label();
        val.Text = expression;
        parentCtrl.Controls.Add(val);
      }
    }
Exemplo n.º 10
0
        public override void AddValidatorSettingsView(Control parentCtrl)
        {
            Portal.API.Controls.Label lbl = new Portal.API.Controls.Label();
            lbl.LanguageRef = "Expression";
            parentCtrl.Controls.Add(lbl);

            string expression = "";

            if (TryGetProperty("Regex", ref expression))
            {
                Label val = new Label();
                val.Text = expression;
                parentCtrl.Controls.Add(val);
            }
        }
Exemplo n.º 11
0
    public override void AddValidatorSettingsEdit(Control parentCtrl)
    {
      Portal.API.Controls.Label lbl = new Portal.API.Controls.Label();
      lbl.LanguageRef = "Expression";
      parentCtrl.Controls.Add(lbl);

      // Ausdruck.
      TextBox expressionBox = new TextBox();
      expressionBox.ID = "_expression";
      string expression = "";
      if (TryGetProperty("Regex", ref expression))
        expressionBox.Text = expression;
      parentCtrl.Controls.Add(expressionBox);

      HyperLink info = new HyperLink();
      info.ImageUrl = "~/PortalImages/help.gif";
      info.NavigateUrl = "http://msdn2.microsoft.com/en-us/library/hs600312.aspx";
      info.Target = "_blank";
      parentCtrl.Controls.Add(info);
    }
Exemplo n.º 12
0
        public override void AddValidatorSettingsEdit(Control parentCtrl)
        {
            // Minimum
            Portal.API.Controls.Label lbl = new Portal.API.Controls.Label();
            lbl.LanguageRef = "Minimum";
            parentCtrl.Controls.Add(lbl);

            TextBox minimumBox = new TextBox();

            minimumBox.ID = "_minimum";
            int minimum = 0;

            if (TryGetProperty("MinimumValue", ref minimum))
            {
                minimumBox.Text = minimum.ToString();
            }
            parentCtrl.Controls.Add(minimumBox);

            parentCtrl.Controls.Add(new LiteralControl("</br>"));

            // Maximum.
            lbl             = new Portal.API.Controls.Label();
            lbl.LanguageRef = "Maximum";
            parentCtrl.Controls.Add(lbl);

            TextBox maximumBox = new TextBox();

            maximumBox.ID = "_maximum";
            int maximum = 0;

            if (TryGetProperty("MaximumValue", ref maximum))
            {
                maximumBox.Text = maximum.ToString();
            }
            parentCtrl.Controls.Add(maximumBox);
        }