コード例 #1
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();
            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() + " ";
            }
        }
コード例 #2
0
ファイル: form1.cs プロジェクト: yashbajra/samples
        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;
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: kg1992/KgCodeBank
        // 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;
        }