private void Form1_Load(object sender, EventArgs e)
        {
            if (File.Exists(FileName))
            {
                Stream          TestFileStream = File.OpenRead(FileName);
                BinaryFormatter deserializer   = new BinaryFormatter();
                TestLoan = (LoanClass.Loan)deserializer.Deserialize(TestFileStream);
                TestFileStream.Close();
            }

            TestLoan.PropertyChanged += this.CustomerPropertyChanged;

            textBox1.Text = TestLoan.LoanAmount.ToString();
            textBox5.Text = ConvertBytes2String(BitConverter.GetBytes(TestLoan.LoanAmount));
            textBox2.Text = TestLoan.InterestRate.ToString();
            textBox6.Text = ConvertBytes2String(BitConverter.GetBytes(TestLoan.InterestRate));
            textBox3.Text = TestLoan.Term.ToString();
            textBox7.Text = ConvertBytes2String(BitConverter.GetBytes(TestLoan.Term));
            textBox4.Text = TestLoan.Customer;
            textBox8.Text = ConvertBytes2String(BitConverter.GetBytes(TestLoan.Customer.Length));
            textBox9.Text = "";
            foreach (int item in TestLoan.IntArray)
            {
                textBox9.Text += item.ToString() + " ";
            }
        }
Exemple #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            if (File.Exists(FileName))
            {
                Stream          TestFileStream = File.OpenRead(FileName);
                BinaryFormatter deserializer   = new BinaryFormatter();
                TestLoan = (LoanClass.Loan)deserializer.Deserialize(TestFileStream);
                TestFileStream.Close();
            }

            TestLoan.PropertyChanged += this.CustomerPropertyChanged;

            textBox1.Text = TestLoan.LoanAmount.ToString();
            textBox2.Text = TestLoan.InterestRate.ToString();
            textBox3.Text = TestLoan.Term.ToString();
            textBox4.Text = TestLoan.Customer;
        }
Exemple #3
0
        // Form Load
        public void Form1_Load( object sender, EventArgs e )
        {
            if (File.Exists(FileName))
            {
                Stream TestFileStream = File.OpenRead(FileName);
                BinaryFormatter deserializer = new BinaryFormatter();
                TestLoan = (LoanClass.Loan)deserializer.Deserialize(TestFileStream);
                TestFileStream.Close();
            }

            TestLoan.PropertyChanged += this.CustomerPropertyChanged;

            textBox1.Text = TestLoan.LoanAmount.ToString();
            textBox2.Text = TestLoan.InterestRate.ToString();
            textBox3.Text = TestLoan.Term.ToString();
            textBox4.Text = TestLoan.Customer;
        }