//----< 3rd test for functionality to manage version numbering for all files >--------------------------------- void test3() { Thread.Sleep(500); Action checkIn = () => { Console.WriteLine("\n Demonstrating Requirement #2b - Functionality to Manage Version Numbering"); Console.WriteLine("\n Close the check-in for \"Sockets.h.1\""); Console.WriteLine("-------------------------------------------"); fileName1.Text = "Sockets.h"; Close.RaiseEvent(new RoutedEventArgs(Button.ClickEvent, Close)); Console.WriteLine("\n Check in \"Sockets.h\" for the Second Time"); Console.WriteLine("-----------------------------------------------"); author.Text = "Datan"; descp.Text = "Provides four classes wrap the Winsock API"; cat.Text = "cate2 cate3"; dependent.Text = ""; nameSpace.Text = "Sockets"; Checkin.RaiseEvent(new RoutedEventArgs(Button.ClickEvent, Checkin)); Refresh2.RaiseEvent(new RoutedEventArgs(Button.ClickEvent, Refresh2)); Thread.Sleep(500); Console.WriteLine("\n Check in \"Sockets.h\" for the Third Time, note that \"Sockets.h.2\" is Open"); Console.WriteLine("----------------------------------------------------------------------------------"); Checkin.RaiseEvent(new RoutedEventArgs(Button.ClickEvent, Checkin)); Refresh2.RaiseEvent(new RoutedEventArgs(Button.ClickEvent, Refresh2)); Console.WriteLine("\n \"Sockets.h.2\" with open check-in can be modified without altering its version number"); Console.WriteLine("----------------------------------------------------------------------------------------------"); }; Dispatcher.Invoke(checkIn, new Object[] { }); }
//----< 2nd test for functionality to check-in >--------------------------------- void test2() { Thread.Sleep(500); Action checkIn = () => { Console.WriteLine("\n Demonstrating Requirement #2a - Functionality to check-in"); Console.WriteLine("\n Check in \"Sockets.h\" for the First Time"); Console.WriteLine("----------------------------------------------"); fileName1.Text = "Sockets.h"; author.Text = "Datan"; descp.Text = "Four classes that wrap the Winsock API"; cat.Text = "cate1 cate2"; dependent.Text = ""; nameSpace.Text = "Sockets"; Checkin.RaiseEvent(new RoutedEventArgs(Button.ClickEvent, Checkin)); Thread.Sleep(500); Console.WriteLine("\n Check in \"Sockets.cpp\" for the First Time"); Console.WriteLine("----------------------------------------------"); fileName1.Text = "Sockets.cpp"; author.Text = "Datan"; descp.Text = "Server's client handler class"; cat.Text = "cate1 cate2"; FileList1.SelectedItems.Add(FileList1.Items[5]); nameSpace.Text = "Sockets"; Checkin.RaiseEvent(new RoutedEventArgs(Button.ClickEvent, Checkin)); Refresh2.RaiseEvent(new RoutedEventArgs(Button.ClickEvent, Refresh2)); Console.WriteLine("\n Meet the requirement for transfering source code text files from a local Client to Remote Code Repository."); Console.WriteLine("---------------------------------------------------------------------------------------------------------------"); }; Dispatcher.Invoke(checkIn, new Object[] { }); }
//----< 2nd test for check-in button >--------------------------------- void test2() { Thread.Sleep(500); Action showfile = () => { Checkin.RaiseEvent(new RoutedEventArgs(Button.ClickEvent, Checkin)); }; Dispatcher.Invoke(showfile, new Object[] { }); }