示例#1
0
        private void SaveV_Click(object sender, EventArgs e)
        {
            try
            {
                AX.Enabled = false;
                AY.Enabled = false;
                AZ.Enabled = false;

                BX.Enabled = false;
                BY.Enabled = false;
                BZ.Enabled = false;

                Point p1 = new Point(Int32.Parse(AX.Text), Int32.Parse(AY.Text), Int32.Parse(AZ.Text));
                Point p2 = new Point(Int32.Parse(BX.Text), Int32.Parse(BY.Text), Int32.Parse(BZ.Text));

                Vectors vectros = new Vectors(p1, p2);

                Calculate.AppendText(vectros.Calculate());
                Scalar.AppendText(p1.ScalarV(p2) + ";");
                Collinearity.AppendText(vectros.IsCollinearity());
            }
            catch (Exception exc)
            {
                MessageBox.Show(exc.Message);

                AX.Clear();
                AY.Clear();
                AZ.Clear();

                BX.Clear();
                BY.Clear();
                BZ.Clear();
            }
        }
            public void WithDraw(decimal Amount)
            {
                decimal crb = Balance;

                if (Balance >= Amount)
                {
                    Balance -= Amount;
                    Console.WriteLine($"{Amount} AZN Cixildi");
                }
                if (Balance < 1000)
                {
                    onBalancelow?.Invoke(this, new ATMARG {
                        CurrentBalance = Balance, Atime = DateTime.Now
                    });
                }
                if (Balance == 0)
                {
                    BZ?.Invoke(this, new ATMARG2 {
                        Atime = DateTime.Now, CurrenttBalance = crb
                    });
                }
            }
示例#3
0
        private void Reset_Click(object sender, EventArgs e)
        {
            AX.Clear();
            AY.Clear();
            AZ.Clear();

            BX.Clear();
            BY.Clear();
            BZ.Clear();

            Calculate.Clear();
            Scalar.Clear();
            Collinearity.Clear();

            AX.Enabled = true;
            AY.Enabled = true;
            AZ.Enabled = true;

            BX.Enabled = true;
            BY.Enabled = true;
            BZ.Enabled = true;
        }