Esempio n. 1
0
    public void deliverProduct(ISelectionButton button)
    {
        var index = this.selectionButtonToIndex[(SelectionButton)button];

        this.productName = this.hf.ProductKinds[index];
        this.hf.ProductRacks[index].DispenseProduct();
    }
Esempio n. 2
0
    public void SelectionMadeHandler(object sender, EventArgs e)
    {
        var index = this.selectionButtonToIndex[(SelectionButton)sender];

        this.productName   = this.hf.ProductKinds[index];
        this.productCost   = this.hf.ProductKinds[index].Cost;
        this.buttonPressed = (ISelectionButton)sender;

        this.SelectionMade(this, new EventArgs());
    }
Esempio n. 3
0
        protected override void AppendSpecificTypeProperties(StringBuilder builder)
        {
            base.AppendSpecificTypeProperties(builder);

            ISelectionButton select = _widget as ISelectionButton;

            builder.AppendFormat("\"isSelected\":{0},", select.IsSelected.ToString().ToLower());
            builder.AppendFormat("\"alignButton\":\"{0}\",", select.AlignButton.ToString().ToLower());

            if (_widget.WidgetType == WidgetType.RadioButton)
            {
                IRadioButton radio = _widget as IRadioButton;
                builder.AppendFormat("\"radioGroup\":\"{0}\",", JsHelper.ReplaceSpecialCharacters(radio.RadioGroup));
            }
        }