예제 #1
0
        //商品数量
        private void numericUpDown1_ValueChanged(object sender, EventArgs e)
        {
            tempsplus        = Int32.Parse(this.numericUpDown1.Value.ToString());
            this.label3.Text = "¥" + Convert.ToDecimal((float.Parse(Wprice) * tempsplus).ToString()).ToString("F2");

            OnCheckedChanged?.Invoke(sender, e);
        }
예제 #2
0
    //加号
    protected void Button2_Click(object sender, EventArgs e)
    {
        this.TextBox1.Text = (int.Parse(this.TextBox1.Text.ToString()) + 1).ToString();
        tempSplus          = this.TextBox1.Text.ToString();
        this.Label3.Text   = $"¥{int.Parse(tempSplus) * tempPric:F2}";

        OnCheckedChanged?.Invoke(sender, e);
    }
예제 #3
0
        private void frontPanel_Click(object sender, EventArgs e)
        {
            clicks++;
            isChecked = false;
            OnCheckedChanged?.Invoke(false);

            CheckClicks();
        }
예제 #4
0
        private void backPanel_Click(object sender, EventArgs e)
        {
            clicks++;
            isChecked = true;
            OnCheckedChanged?.Invoke(true);

            CheckClicks();
        }
예제 #5
0
 public virtual void Checked(GameTime time)
 {
     if (!Enabled)
     {
         return;
     }
     IsChecked = !IsChecked;
     OnCheckedChanged?.Invoke(this, EventArgs.Empty);
 }
예제 #6
0
        private void Lb_ItemCheck(object sender, ItemCheckEventArgs e)
        {
            Enum changedItem = (Enum)lb.Items[e.Index];

            if (e.NewValue == CheckState.Checked)
            {
                _value = _value.SetFlags(changedItem);
            }
            else
            {
                _value = _value.ClearFlags(changedItem);
            }
            OnCheckedChanged?.Invoke(this, changedItem);
            textbox.Text = _value.ToString();
        }
예제 #7
0
 //减号
 protected void Button1_Click(object sender, EventArgs e)
 {
     if (int.Parse(this.TextBox1.Text.ToString()) > 1)
     {
         this.TextBox1.Text = (int.Parse(this.TextBox1.Text.ToString()) - 1).ToString();
     }
     else
     {
         this.TextBox1.Text = "1";
     }
     //int temnum = int.Parse(this.TextBox1.Text.ToString());
     tempSplus        = this.TextBox1.Text.ToString();
     this.Label3.Text = $"¥{int.Parse(tempSplus) * tempPric:F2}";
     OnCheckedChanged?.Invoke(sender, e);
 }
예제 #8
0
    public WidgetCheckbox(int x, int y,
                          [CallerFilePath]
                          string filePath = null, [CallerLineNumber]
                          int lineNumber  = -1)
        : base(new Rectangle(x, y, 0, 0), filePath, lineNumber)
    {
        _checkedImage = new WidgetImage("art/interface/options_ui/checkbox_on.tga");
        AddContent(_checkedImage);

        _uncheckedImage = new WidgetImage("art/interface/options_ui/checkbox_off.tga");
        AddContent(_uncheckedImage);

        SetClickHandler(() =>
        {
            Checked = !Checked;
            OnCheckedChanged?.Invoke(Checked);
        });

        SetSize(_checkedImage.GetPreferredSize());
    }
예제 #9
0
 //选择状态改变
 private void checkBox1_CheckedChanged(object sender, EventArgs e)
 {
     OnCheckedChanged?.Invoke(sender, e);
     //if (OnCheckedChanged != null) OnCheckedChanged(sender, e);
 }
예제 #10
0
 protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
 {
     OnCheckedChanged?.Invoke(sender, e);
 }