Exemplo n.º 1
0
    }//END AddParameter method

    // ==================================================================================
    /// <summary>
    /// This method add a parameter to for the background colour
    /// </summary>
    /// <returns>Background_Colours emunerated value</returns>
    //  ---------------------------------------------------------------------------------
    public Background_Colours getDefaultBackgroundColor ( )
    {
      //
      // get the string value of the parameter list.
      //
      String value = this.GetParameter ( FieldParameterList.BG_Default );
      Background_Colours colour = Background_Colours.Default;

      //
      //if the value exists reset the colour
      //
      if ( value != String.Empty )
      {
        if ( Evado.Model.EvStatics.tryParseEnumValue<Background_Colours> ( value, out colour ) == true )
        {
          return colour;
        }
      }

      //
      // return the found colour
      //
      return Background_Colours.Default;

    }//END AddParameter method
Exemplo n.º 2
0
    }//END AddParameter method

    // ==================================================================================
    /// <summary>
    /// This method add a parameter to for the background colour
    /// </summary>
    /// <returns>Background_Colours emunerated value</returns>
    //  ---------------------------------------------------------------------------------
    public Background_Colours getMandatoryBackGroundColor (Background_Colours CurentColor )
    {
      //
      // get the string value of the parameter list.
      //
      String value = this.GetParameter ( FieldParameterList.BG_Mandatory );
      Background_Colours colour = Background_Colours.Red;

      //
      // If the field has a value it should have the default background.
      //
      if ( this._Value != String.Empty )
      {
        return CurentColor;
      }

      //
      //if the value exists reset the colour
      //
      if ( value != String.Empty )
      {
        if ( Evado.Model.EvStatics.tryParseEnumValue<Background_Colours> ( value, out colour ) == true )
        {
          return colour;
        }
      }

      //
      // return the found colour
      //
      return Background_Colours.Red;

    }//END AddParameter method
Exemplo n.º 3
0
    }//END AddParameter method
    // ==================================================================================
    /// <summary>
    /// This method add a parameter to for the background colour
    /// </summary>
    /// <param name="Name">CommandParameters: The name of the parameter.</param>
    /// <param name="Value">Background_Colours: the selected colour's enumerated value.</param>
    /// <remarks>
    /// This method consists of following steps.
    /// 
    /// 1. Iterate through the list paramater to determine of the parameter already exists and update it.
    /// 
    /// 2. If parameter Name is equal to CommandParameters name, return
    /// 
    /// 3. Add a new parameter to the list.
    /// 
    /// </remarks>
    //  ---------------------------------------------------------------------------------
    public void SetBackgroundColour ( CommandParameters Name, Background_Colours Value )
    {
      //
      // get the string value of the parameter list.
      //
      String value = Value.ToString ( );

      this.AddParameter ( Name, value );

    }//END AddParameter method
Exemplo n.º 4
0
    }//END AddParameter method

    // ==================================================================================
    /// <summary>
    /// This method add a parameter to for the background colour
    /// </summary>
    /// <param name="Value">Background_Colours: the selected colour's enumerated value.</param>
    /// <remarks>
    /// This method consists of following steps.
    /// 
    /// 1. Iterate through the list paramater to determine of the parameter already exists and update it.
    /// 
    /// 2. If parameter Name is equal to CommandParameters name, return
    /// 
    /// 3. Add a new parameter to the list.
    /// 
    /// </remarks>
    //  ---------------------------------------------------------------------------------
    public void SetBackgroundHighlightedColour ( Background_Colours Value )
    {
      //
      // Set the command parameter.
      //
      CommandParameters Name = CommandParameters.BG_Highlighted;  
      //
      // get the string value of the parameter list.
      //
      String value = Value.ToString ( );

      this.AddParameter ( Name, value );

    }//END AddParameter method
Exemplo n.º 5
0
    }//END AddParameter method

    // ==================================================================================
    /// <summary>
    /// This method add a parameter to for the background colour
    /// </summary>
    /// <param name="Value">Background_Colours: the selected colour's enumerated value.</param>
    //  ---------------------------------------------------------------------------------
    public void setMandatoryBackgroundColor ( 
      Background_Colours Value )
    {
      //
      // Exit if the parameter is not a background colour enumeration.
      //
      String name = FieldParameterList.BG_Mandatory.ToString ( );

      //
      // get the string value of the parameter list.
      //
      String value = Value.ToString ( );

      this.AddParameter ( name, value );


    }//END AddParameter method
Exemplo n.º 6
0
    }//END AddParameter method

    // ==================================================================================
    /// <summary>
    /// This method add a parameter to for the background colour
    /// </summary>
    /// <param name="Name">FieldParameterList: The name of the parameter.</param>
    //  ---------------------------------------------------------------------------------
    public Background_Colours GetBackgroundColor ( 
      FieldParameterList Name )
    {
      //
      // Exit if the parameter is not a background colour enumeration.
      //
      if ( Name != FieldParameterList.BG_Default
        && Name != FieldParameterList.BG_Mandatory
        && Name != FieldParameterList.BG_Validation
        && Name != FieldParameterList.BG_Alert
        && Name != FieldParameterList.BG_Normal )
      {
        return Background_Colours.Default;
      }

      //
      // get the string value of the parameter list.
      //
      String value = this.GetParameter( Name );
      Background_Colours colour = Background_Colours.Default;

      //
      //Iterate through the list paramater to determine of the parameter already exists and update it.
      //
      foreach ( Parameter parameter in this._ParameterList )
      {
        //
        //If parameter Name is equal to GroupParameterList Name, return
        //
        if (value != String.Empty )
        {
          colour = Evado.Model.EvStatics.parseEnumValue<Background_Colours> ( parameter.Value );

          return colour;
        }
      }//END parameter iteration

      //
      // return the found colour
      //
      return colour;

    }//END AddParameter method
Exemplo n.º 7
0
    // ==================================================================================
    /// <summary>
    /// This method sets the background colour value
    /// </summary>
    /// <param name="Name">FieldParameterList: The name of the parameter.</param>
    /// <param name="Value">Background_Colours: the selected colour's enumerated value.</param>
    //  ---------------------------------------------------------------------------------
    public void setBackgroundColor ( 
      FieldParameterList Name, 
      Background_Colours Value )
    {
      //
      // Exit if the parameter is not a background colour enumeration.
      //
      if ( Name != FieldParameterList.BG_Default
        && Name != FieldParameterList.BG_Mandatory
        && Name != FieldParameterList.BG_Validation
        && Name != FieldParameterList.BG_Alert
        && Name != FieldParameterList.BG_Normal )
      {
        return;
      }
      //
      // get the string value of the parameter list.
      //
      String value = Value.ToString ( );

      this.AddParameter ( Name, value );


    }//END AddParameter method