Example #1
0
        /// <summary>
        /// ShowAllModifiedVehicles method.
        /// </summary>
        /// <remarks>
        /// Save the last modified vehicles in a file and then read all the saved vehicles 
        /// and show them on the screen.
        /// </remarks>
        /// <param name="imb"></param>
        private void ShowAllModifiedVehicles(IModifiable imb)
        {
            //save the last modivified vehicle
            autoshow.SaveNewCar(imb); 
            modlist = autoshow.ShowAll();

            //get each object in that list
            for (int i = 0; i < modlist.ListSize(); i++)        
            {
                imb = modlist.GetObjectFromList(i);
                //print the object in textbox.
                txtHistory.AppendText(imb.ToString());
                txtHistory.AppendText(Environment.NewLine);

            }

        }