// ****************************************************** main void main ( string [ ] args ) { if ( !parse_arguments ( args ) ) { } else if ( !directory_processed ( directory_maybe ) ) { } else if ( !image_filename_list_generated ( directory, IMAGE_FILE_FILTERS, false ) ) { } else if ( !timing_filename_retrieved ( directory ) ) { } else if ( !timing_file_contents_to_dictionary ( ) ) { } else if ( !file_list_generated ( ) ) { } else { show_images ( ); } } // main
Q0) what does the user enter into the Console ? a Directory of files ?A0. The usage for the program is <pre>OPTIONS -D NUM Set delay between automatically changing slides. The default is ten seconds (i.e., -D 10) if <directory> contains a file with the extension '.tim', the contents of that file will be used to determine the delay for each slide, individually. However, any value supplied with the 'D' option will override the values in the timing file and will result in a constant delay. -1 Run the slideshow once (do not repeat the display loop). DEFAULT KEYS h Pause/continue slideshow n Go to next image p Go to previous image q Quit
// ****************************************************** main void main ( string [ ] args ) { if ( !parse_arguments ( args ) ) { } else if ( !directory_processed ( directory_maybe ) ) { } else if ( !image_filename_list_generated ( directory, IMAGE_FILE_FILTERS, false ) ) { } else if ( !timing_filename_retrieved ( directory ) ) { } else if ( !timing_file_contents_to_dictionary ( ) ) { } else if ( !file_list_generated ( ) ) { } else { show_images ( ); } } // main // ****************************************************** Main static void Main ( string [ ] args ) { Win_Feh p = new Win_Feh ( ); p.main ( args ); } // Main }
if ( choosen_numbers.at ( i ) < minimum ) { minimum = choosen_numbers.at(i); }
read number_of_students for each student { read the 3 scores compute the letter grade print the results }
for ( int i = 0; ( i < number_of_students ); i++ )
read_scores ( ) compute_letter_grades ( ) print_letter_grade ( )
// *********************************************** show_images void show_images ( ) { Screen screen = ( Screen.AllScreens.Length > 1 ) ? Screen.AllScreens [ 1 ] : Screen.PrimaryScreen; using ( Form form = new Form ( ) ) { PictureBox pb = new PictureBox ( ); form.FormBorderStyle = FormBorderStyle.None; form.Bounds = screen.Bounds; form.BackColor = Color.Black; pb.Dock = DockStyle.Fill; pb.SizeMode = PictureBoxSizeMode.Zoom; form.Controls.Add ( pb ); form.Show ( ); do { int i = 0; while ( !terminated ) { File_Entry file_entry = file_list [ i ]; string filename = file_entry.File_Name; int seconds = file_entry.Seconds; if ( File.Exists ( filename ) ) { pb.Load ( filename ); form.Refresh ( ); //Thread.Sleep ( 1000 * seconds ); Thread.Sleep ( 500 ); } i++; if ( i >= file_list.Count ) { i = 0; } } } while ( !( run_once || terminated ) ); } // using form } // show_images