Example #1
0
 static void StartTests()
 {
     SIP testsSIP = new SIP(new ThreadStart(delegate()
     {
         Logging.Log("Starting System.Net.Tests");
         RunTests();
     }), ThreadPriority.Normal, "System.Net.Tests");
     testsSIP.Exited += delegate(object sender, EventArgs e)
     {
         Logging.Log("System.Net.Tests exited");
     };
     testsSIP.Start();
 }
Example #2
0
 static void StartProcessViewer()
 {
     SIP processViewerSIP = new SIP(new ThreadStart(delegate()
     {
         Logging.Log("Starting Process Viewer");
         new ProcessViewer().Start();
     }), ThreadPriority.Normal, "Process Viewer");
     processViewerSIP.Exited += delegate(object sender, EventArgs e)
     {
         Logging.Log("Process Viewer exited");
     };
     processViewerSIP.Start();
 }
Example #3
0
 private static void RunTestSuite()
 {
     SIP testSuiteSIP = new SIP(delegate()
     {
         Logging.Info("Starting XaeiOS.TestSuite");
         RunTests();
     }, ThreadPriority.Normal, "XaeiOS.TestSuite");
     testSuiteSIP.Exited += delegate(object sender, EventArgs e)
     {
         Logging.Info("XaeiOS.TestSuite process exited");
     };
     testSuiteSIP.Start();
 }
Example #4
0
 private static void RunProcessViewer()
 {
     SIP processViewerSIP = new SIP(delegate()
     {
         Logging.Info("Starting Process Viewer");
         ProcessViewer.ProcessViewer processViewer = new ProcessViewer.ProcessViewer();
         processViewer.UpdateInterval = 2000;
         processViewer.Start();
     }, ThreadPriority.Normal, "Process Viewer");
     processViewerSIP.Exited += delegate(object sender, EventArgs e)
     {
         Logging.Info("Process Viewer exited");
     };
     processViewerSIP.Start();
 }
Example #5
0
        private static void Main(string[] args)
        {
            SIP slideshowProcess = new SIP(delegate()
            {
                Photo[] photos = new Photo[]{
                    new Photo("Photos/michaelten-pow.jpg", "My two sisters, Kaya and Alicia, and me"),
                    new Photo("Photos/lounging_at_pool.jpg", "Lounging by the pool at the Planet Hollywood Hotel, Las Vegas"),
                    new Photo("Photos/coaster.jpg", "Autumn and me on the roller coaster at New York, New York, Las Vegas"),
                    new Photo("Photos/just_michael.jpg", "Just me"),
                    new Photo("Photos/paris_vegas.jpg", "Autumn and me at Paris, Las Vegas"),
                    new Photo("Photos/checking_in.jpg", "Checking into the Planet Hollywood Hotel, Las Vegas"),
                    new Photo("Photos/autumn_and_michael.jpg", "Autumn and me"),
                    new Photo("Photos/wii_at_earls.jpg", "Playing Wii Sports Golf at Earl's house"),
                    new Photo("Photos/packed_jeep.jpg", "My Jeep packed full of my cousin Michelle's belongings.  I was helping her move.")
                };

                _slideshow = new PhotoSlideshow(photos, 10 * 1000);
                SignalDaemon.Start();
                ExportDelegate("ShowNextPhoto", ExportedShowNextPhoto);
                ExportDelegate("ShowPreviousPhoto", ExportedShowPreviousPhoto);
                _slideshow.ShowPhoto(0);
                _slideshow.StartSlideshow();
            }, ThreadPriority.Normal, "Tenpow.Photos");

            // install a custom signal handler to call the appropriate method based upon the SlideshowSignal that we receive
            slideshowProcess.CustomSignal += delegate(int data)
            {
                SlideshowSignal signal = (SlideshowSignal)data;
                if (signal == SlideshowSignal.ShowNextPhoto)
                {
                    _slideshow.ShowNextPhoto();
                }
                else if (signal == SlideshowSignal.ShowPreviousPhoto)
                {
                    _slideshow.ShowPreviousPhoto();
                }
                else
                {
                    Console.WriteLine("Received unknown signal " + data);
                }
            };
            slideshowProcess.Start();
            _slideshowPid = slideshowProcess.ID;
        }
Example #6
0
 private static void CreateInitProcess()
 {
     SIP initProcess = new SIP(new ThreadStart(InvokeStaticConstructorsAndCallInitFunction), ThreadPriority.Normal, "XaeiOS.Init");
     initProcess.Exited += delegate(object sender, EventArgs e)
     {
         // TODO: What to do when init process exits? probably nothing. Maybe there should be a shutdown process that takes care of cleaning everything up
         Logging.Info("Process " + initProcess + " exited");
     };
     initProcess.Start(true);
     _booted = true;
 }