示例#1
0
        private void showConfirmationPopUp(object sender, EventArgs e)
        {
            _getDataAmount    = _firstNumber.Text + _decimalPointVisibility.Text + _secondNumber.Text + _thirdNumber.Text + _fourthNumber.Text;
            _dataAmountDouble = Double.Parse(_getDataAmount);
            _getDataUnit      = _dataUnitsToGB.Text;

            try
            {
                _requestAmount = _dataAmountDouble;
                if (_getDataUnit == StringConstants.Localizable.MBUnit)
                {
                    _requestAmount = _dataAmountDouble / 1000.0;
                }

                if (_requestAmount != 0)
                {
                    Dialog requestDialog = DialogHelper.ConfirmRequest(this, _dataAmountDouble.ToString(), _getDataUnit, _selectedUser.Text, showSuccessMessage);
                    requestDialog.Show();
                }
                else
                {
                    Dialog zerAmountDialog = DialogHelper.ZeroAmount(this);
                    zerAmountDialog.Show();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                Dialog selectUserDialog = DialogHelper.SelectUser(this);
                selectUserDialog.Show();
            }
        }