Exemplo n.º 1
0
        public void restore_value()
        {
            m_type = m_default_type;
            switch (m_default_type)
            {
            case Variable_Type.Integer:
                m_value = Convert.ToInt32(m_generic_value);
                break;

            case Variable_Type.Double:
                m_value = Convert.ToDouble(m_generic_value);
                break;

            case Variable_Type.String:
                m_value = Convert.ToString(m_generic_value);
                break;

            case Variable_Type.Boolean:
                m_value = Convert.ToBoolean(m_generic_value);
                break;

            case Variable_Type.DateTime:
                m_value = Convert.ToDateTime(m_generic_value);
                break;
            }
        }
Exemplo n.º 2
0
 public void restore_type()
 {
     m_type = m_default_type;
     foreach (Value val in values)
     {
         val.restore_value();
     }
 }
Exemplo n.º 3
0
        public void set_default_type(Variable_Type type)
        {
            m_default_type = type;
            m_type         = type;

            foreach (Value val in values)
            {
                val.set_default_type(type);
            }
        }
Exemplo n.º 4
0
 private void set_types(int index, Variable_Type type)
 {
     Data[index].set_type(type);
 }
Exemplo n.º 5
0
 public void set_default_type(Variable_Type type)
 {
     m_default_type = type;
     m_type         = type;
     set_value();
 }
Exemplo n.º 6
0
 public void set_type(Variable_Type type)
 {
     m_type = type;
     update_values();
 }