コード例 #1
0
        private void RetrieveInterpreter()
        {
            string   storageFile     = Path.Combine(Environment.CurrentDirectory, "Interpreter.bin");
            FileInfo storageFileInfo = new FileInfo(storageFile);

            if (storageFileInfo.Exists == true)
            {
                Interpreter    terp    = new Interpreter();
                InterpreterMgr terpMgr = new InterpreterMgr();
                terp = terpMgr.RetrieveInterpreter(terp);

                lblInterpreter.Text = terp.Name;
            }
            else
            {
                lblInterpreter.Text = "No Interpreter Found. Create A New Interpreter File.";
            }
        }
コード例 #2
0
        private void btnRetrieve_Click(object sender, EventArgs e)
        {
            Interpreter    terp    = new Interpreter();
            InterpreterMgr terpMgr = new InterpreterMgr();

            terp = terpMgr.RetrieveInterpreter(terp);

            txtName.Text          = terp.Name;
            txtAddressOne.Text    = terp.Address1;
            txtAddressTwo.Text    = terp.Address2;
            txtCity.Text          = terp.City;
            txtState.Text         = terp.State;
            txtZip.Text           = terp.Zip;
            txtPhone.Text         = terp.Phone;
            txtEmail.Text         = terp.Email;
            txtYears.Text         = terp.YearsOfExperience.ToString();
            txtCertification.Text = terp.HighestLevelCertification;
        }