예제 #1
0
 public TextFieldWidget(
     IValue value,
     QuestionStatement statement,
     GuiEnvironment guiEnvironment,
     WidgetStyle style)
     : base(value, statement, guiEnvironment)
 {
     this.CreateControls(statement, style);
 }
예제 #2
0
 public DatePickerWidget(
     DateValue value,
     QuestionStatement statement,
     GuiEnvironment guiEnvironment,
     WidgetStyle style)
     : base(value, statement, guiEnvironment)
 {
     this.CreateControls(statement, style);
 }
예제 #3
0
 public CheckBoxWidget(
     BooleanValue value,
     QuestionStatement statement,
     GuiEnvironment guiEnvironment,
     WidgetStyle style)
     : base(value, statement, guiEnvironment)
 {
     this.CreateControls(statement, style);
 }
예제 #4
0
        private void CreateControls(QuestionStatement statement, WidgetStyle style)
        {
            this.Input            = new CheckBox();
            this.Input.Checked   += (e, a) => this.UpdateValue();
            this.Input.Unchecked += (e, a) => this.UpdateValue();
            this.Input.IsEnabled  = !this.IsReadOnly();
            this.Input.IsChecked  = ((BooleanValue)this.Value).Value;

            this.CreateControls(this.Input, statement, style);
        }
 public ValidatedTextFieldWidget(
     IValue value,
     IValidator <string> validator,
     QuestionStatement statement,
     GuiEnvironment guiEnvironment,
     WidgetStyle style)
     : base(value, statement, guiEnvironment, style)
 {
     this.validator = validator;
 }
예제 #6
0
        private void CreateControls(QuestionStatement statement, WidgetStyle style)
        {
            this.Input = new DatePicker {
                SelectedDateFormat = DatePickerFormat.Short
            };
            this.Input.SelectedDateChanged += (e, a) => this.UpdateValue();
            this.Input.IsEnabled            = !this.IsReadOnly();
            this.Input.SelectedDate         = ((DateValue)this.Value).Value;

            this.CreateControls(this.Input, statement, style);
        }
예제 #7
0
        protected void CreateControls(QuestionStatement statement, WidgetStyle style)
        {
            var label = new Label {
                Content = statement.Label
            };

            this.Input           = new TextBox();
            this.Input.KeyUp    += (e, a) => this.UpdateValue();
            this.Input.IsEnabled = !this.IsReadOnly();
            this.Input.Text      = this.Value.ToString();

            this.CreateControls(this.Input, statement, style);
        }
예제 #8
0
        protected void CreateControls(QuestionStatement statement, WidgetStyle style)
        {
            var label = new Label {
                Content = statement.Label
            };

            this.Input        = new TextBox();
            this.Input.KeyUp += this.UpdateValue;

            style.Apply(label);
            style.Apply(this.Input);

            this.Controls.Add(label);
            this.Controls.Add(this.Input);
        }
예제 #9
0
        private void CreateControls(QuestionStatement statement, WidgetStyle style)
        {
            var label = new Label {
                Content = statement.Label
            };

            this.Input            = new CheckBox();
            this.Input.Checked   += this.UpdateValue;
            this.Input.Unchecked += this.UpdateValue;

            style.Apply(label);
            style.Apply(this.Input);

            this.Controls.Add(label);
            this.Controls.Add(this.Input);
        }
예제 #10
0
        private void CreateControls(QuestionStatement statement, WidgetStyle style)
        {
            var label = new Label {
                Content = statement.Label
            };

            this.Input = new DatePicker {
                SelectedDateFormat = DatePickerFormat.Short
            };
            this.Input.SelectedDateChanged += this.UpdateValue;

            style.Apply(label);
            style.Apply(this.Input);

            this.Controls.Add(label);
            this.Controls.Add(this.Input);
        }