public override Field GetResult()
        {
            List< string > values = new List< string >() ;

            foreach ( UIElement element in _panel.Children )
            {
                CheckBox checkBox = element as CheckBox ;

                if ( checkBox != null && ( bool ) checkBox.IsChecked )
                {
                    values.Add( ( string )checkBox.DataContext ) ;
                }
            }

            Field field = new Field( Field.Var, null, Field.Type );
            field.SetValues( values.ToArray() ) ;

            return field ;
        }
Exemplo n.º 2
0
        public override Field GetResult()
        {
            Field field = new Field( Field.Var, null, Field.Type );

            if ( Field.Type == FieldType.Text_Multi
                || Field.Type == FieldType.Jid_Multi )
            {
                string [] values = new string[ _textBox.LineCount ];

                for ( int i = 0; i < _textBox.LineCount; i++ )
                {
                    values[ i ] = _textBox.GetLineText( i ) ;
                }

                field.SetValues( values ) ;
            }
            else
            {
                field.SetValue( _textBox.Text ) ;
            }

            return field ;
        }