Beispiel #1
0
        private void aAccountForm1_Load(object sender, EventArgs e)
        {
            AAccount temp = aAccountForm1.Value;

            Value.Withdraw(Value.CheckBalance());
            Value.Deposit(temp.CheckBalance());
            Value.Title       = temp.Title;
            Value.Description = temp.Description;
            OnValueChangedEvent();
        }
        public void ChangeBalanceTest()
        {
            AAccount a      = AAccount.CreateAccount("PLN", 0);
            float    change = 1;

            a.ChangeBalance(change);

            float expectedValue = 1;

            Assert.AreEqual(expectedValue, a.GetBalance());
        }
Beispiel #3
0
 override public void AddAccount(AAccount a)
 {
     accounts.Add(a);
 }
Beispiel #4
0
 private void numericUpDownInitialBalance_ValueChanged(object sender, EventArgs e)
 {
     Value = new AAccount((double)numericUpDownInitialBalance.Value);
     OnValueChangedEvent();
 }
Beispiel #5
0
 /// <summary>
 ///     <para>Check validation for send command</para>
 ///     <para>Optional for check validation</para>
 ///     <para>If use => don't use base of method because base of method force return true</para>
 /// </summary>
 /// <param name="account">Access to account</param>
 /// <param name="commandName">Name of command</param>
 /// <param name="commandData">Data for send</param>
 /// <param name="customRequestId">Specify custom request id</param>
 /// <param name="checkCommandExists">
 ///     If true, check command exists
 /// </param>
 /// <param name="checkCommandSendType">
 ///     If set true, check command send type
 /// </param>
 /// <returns>
 ///     <para>If return true, send command is valid and sending is done</para>
 ///     <para>if return false, send command is not valid and do not send</para>
 /// </returns>
 public virtual bool CheckValidationForSendCommand(AAccount account, string commandName, object commandData,
                                                   Guid?customRequestId, bool checkCommandExists, bool checkCommandSendType)
 {
     // Ignore valid if don't override
     return(true);
 }
Beispiel #6
0
 public abstract void AddAccount(AAccount a);
 public void ChangeAccountBalance(AAccount a, float p)
 {
     a.ChangeBalance(p);
 }
 public float GetAccountBalance(AAccount a)
 {
     return(a.GetBalance());
 }