public void AddUldControl(JwLayout p) { _uldTypeVisibilityWrapper = VmUiBuilder.MakeVisibilityWrappedValidationErrorPictureBox(); _uldNumberVisibilityWrapper = VmUiBuilder.MakeVisibilityWrappedValidationErrorPictureBox(); _uldOwnerVisibilityWrapper = VmUiBuilder.MakeVisibilityWrappedValidationErrorPictureBox(); JwVerticalLayout v = new JwVerticalLayout(); v.Gap = 0; v.ControlWidth.BeFill(); v.Add(MakeUldLabel()); v.Add(MakeUldWidgets()); p.Add(v); }
public override Control GetControl() { JwVerticalLayout e = new JwVerticalLayout(); JwButton showButton, hideButton; e = new JwVerticalLayout(); showButton = new JwButton(); showButton.Text = "Show"; showButton.Click += new EventHandler(ShowLabel); hideButton = new JwButton(); hideButton.Text = "Hide"; hideButton.Click += new EventHandler(HideLabel); wrapper = new JwVisibilityWrapper(new JwLabel("dog"), true); e.Add(showButton); e.Add(wrapper); e.Add(hideButton); return e; }
public Control MakeNestSubpanel() { JwHorizontalLayout left = new JwHorizontalLayout(); left.Gap = 1; left.AlignBottom(); _pieceCountLabel = VmUiBuilder.MakeValueLabel("XXXXXXXX"); _pieceCountLabel.SetPreferredSize(_pieceCountLabel.GetPreferredSize()); _pieceCountLabel.AlignLeft(); String piecesText = VmLanguage.Default.GetPieces() + ":"; JwLabel pieceUnitLabel = VmUiBuilder.MakeIdentifierLabel(piecesText); left.Add(pieceUnitLabel); left.Add(_pieceCountLabel); String unit = VmProperties.Default.ShouldUseMetric() ? "Kg" : "Lb"; _weightLabel = VmUiBuilder.MakeValueLabel("XXXXXXXXX"); _weightLabel.SetPreferredSize(_weightLabel.GetPreferredSize()); _weightLabel.AlignRight(); JwLabel weightUnitLabel = VmUiBuilder.MakeIdentifierLabel(unit); JwHorizontalLayout right = new JwHorizontalLayout(); right.Gap = 1; right.AlignBottom(); right.Add(_weightLabel); right.Add(weightUnitLabel); JwLeftRightLayout p = new JwLeftRightLayout(); p.LeftControl = left; p.RightControl = right; _statiticsVisibilityWrapper = new JwVisibilityWrapper(p, true); return _statiticsVisibilityWrapper; }
public Control MakeTrainingModelPanel() { PictureBox pb = VmUiUtility.MakePictureButton(VmImageManager.Default.GetTrainingImage(), TrainingModeClicked); _trainingImageVisibilityWrapper = new JwVisibilityWrapper(pb, true); return _trainingImageVisibilityWrapper; }
/** * In cases, scan input actually comes from a keyboard wedge. It * appears that for the key input to be forwarded correctly from * the Operating System to the application, an applicable control * must be focused. * * This field provides for that control. **/ public Control MakeScanArea() { _scanTextBox = VmUiBuilder.MakeScanHackTextBox(); _scanTextBox.GotFocus += new EventHandler(ScanTextBoxGotFocus); _scanTextBox.LostFocus += new EventHandler(ScanTextBoxLostFocus); _inputControlManager.Add(_scanTextBox, 0); JwVerticalLayout v = new JwVerticalLayout(); v.Add(MakeFocusTextBox()); v.Add(_scanTextBox); JwVisibilityWrapper vw = new JwVisibilityWrapper(v, false); return vw; }
public Control MakeEnterTrainingModeLabel() { if( ! VmProperties.Default.ShouldAllowTrainingMode() ) return null; JwLabel ll = VmUiBuilder.MakeLinkedLabel( // kludge (err) - language "Train", StartTrainingMode); ll.AlignRight(); _startTrainingVisibilityWrapper = new JwVisibilityWrapper(ll, true); JwLeftRightLayout lr = new JwLeftRightLayout(); lr.RightControl = _startTrainingVisibilityWrapper; return lr; }
public void AddTextBox( JwTextBox control, int tabOrderIndex, JwInputControlModel.ValidateDelegateType validateDelegate, JwVisibilityWrapper validationVisibilityWrapper) { Add( control, tabOrderIndex, JwTextBox.GetValue, validateDelegate, (JwPictureBox)validationVisibilityWrapper.GetControl(), validationVisibilityWrapper); }
public void AddComboBox( JwComboBox control, int tabOrderIndex, JwVisibilityWrapper visibilityWrapper, String modelName, String fieldName) { Add( control, tabOrderIndex, JwComboBox.GetValue, GetValidateComboBoxRequiredDelegate(modelName, fieldName), (JwPictureBox)visibilityWrapper.GetControl(), visibilityWrapper); }
//# __________ PROTOCOL :: PUBLIC (CREATION)__________ #// public void Add( Control c, int tabOrderIndex, JwInputControlModel.GetValueDelegateType getValueDelegate, JwInputControlModel.ValidateDelegateType validateDelegate, JwPictureBox validationPictureBox, JwVisibilityWrapper validationVisibilityWrapper) { JwInputControlModel m = new JwInputControlModel(); m.Control = c; m.GetValueDelegate = getValueDelegate; m.ValidateDelegate = validateDelegate; m.ValidationPictureBox = validationPictureBox; m.ValidationVisibilityWrapper = validationVisibilityWrapper; _controls.Add(m); _tabOrder.Add(c, tabOrderIndex); validationPictureBox.Click += new EventHandler(ValidationButtonClick); }
public Control MakeLabelPanel() { JwHorizontalLayout p = new JwHorizontalLayout(); p.AlignLeft(); p.AlignBottom(); p.Gap = 1; _visibilityWrapper = new JwVisibilityWrapper(_pictureBox, false); p.Add(_visibilityWrapper); p.Add(_label); if( _linkLabel == null ) return p; JwLeftRightLayout lr = new JwLeftRightLayout(); lr.LeftControl = p; lr.RightControl = _linkLabel; return lr; }