private void ButtonSixBtn_Click(object sender, EventArgs e) { var _valueToAbsSS = ValueToAbsTxb.SelectionStart; if (Checked._checkedValueToAbs == true) { ValueToAbsTxb.Focus(); ValueToAbsTxb.Text = ValueToAbsTxb.Text.Insert(_valueToAbsSS, "6"); _valueToAbsSS++; ValueToAbsTxb.SelectionStart = _valueToAbsSS; } }
private void ButtonDivBtn_Click(object sender, EventArgs e) { var _valueToAbsSS = ValueToAbsTxb.SelectionStart; if (Checked._checkedValueToAbs == true) { ValueToAbsTxb.Focus(); ValueToAbsTxb.Text = ValueToAbsTxb.Text.Insert(_valueToAbsSS, "/"); _valueToAbsSS++; ValueToAbsTxb.SelectionStart = _valueToAbsSS; // _charChecker.IsCommaCheckerMethod(); // _charChecker.IsMinusCheckerMethod(); } }
/*private void IsCommaCheckerMethod() * { * var _valueToAbsSS = ValueToAbsTxb.SelectionStart; * _valueString = ValueToAbsTxb.Text; * _isComma = _valueString.Contains(CommaSymbol); * if (_isComma == true || ValueToAbsTxb.Text == "" || ValueToAbsTxb.Text == null || ValueToAbsTxb.Text == "-") * { * ButtonCommaBtn.Enabled = false; * } * else if (_isComma == false && ValueToAbsTxb.Text != null && _valueToAbsSS == 0) * { * ButtonCommaBtn.Enabled = false; * } * else if (_isComma == false && ValueToAbsTxb.Text != null && _valueToAbsSS > 0) * { * ButtonCommaBtn.Enabled = true; * } * }*/ /*private void IsMinusCheckerMethod() * { * var _valueToAbsSS = ValueToAbsTxb.SelectionStart; * _valueString = ValueToAbsTxb.Text; * _isMinus = _valueString.Contains(MinusSymbol); * if (_isMinus == true) * { * ButtonMinusBtn.Enabled = false; * } * else if (_isMinus == false || ValueToAbsTxb.Text != null) * { * ButtonMinusBtn.Enabled = true; * } * else if (_valueToAbsSS > 0 || ValueToAbsTxb.Text != null) * { * ButtonMinusBtn.Enabled = false; * } * else if (_isMinus == false && _valueToAbsSS == 0 && ValueToAbsTxb.Text != null) * { * ButtonMinusBtn.Enabled = true; * } * * }*/ private void ButtonOneBtn_Click(object sender, EventArgs e) { var _valueToAbsSS = ValueToAbsTxb.SelectionStart; //_valueString = ValueToAbsTxb.Text; //_isComma = _valueString.Contains(CommaSymbol); if (Checked._checkedValueToAbs == true) { ValueToAbsTxb.Focus(); ValueToAbsTxb.Text = ValueToAbsTxb.Text.Insert(_valueToAbsSS, "1"); _valueToAbsSS++; ValueToAbsTxb.SelectionStart = _valueToAbsSS; //_charChecker.IsCommaCheckerMethod(); // _charChecker.IsMinusCheckerMethod(); } }