Exemplo n.º 1
0
 void StreamRoutine()
 {
     try
     {
         System.Diagnostics.Debug.WriteLine("StreamRoutine");
         using (var byteStreamer = new ByteStreamer(
                    LaunchOpts.StreamWidth,
                    LaunchOpts.StreamHeight))
             using (var pptView = new PptView(
                        LaunchOpts.RootPath,
                        LaunchOpts.SlideShowPath,
                        LaunchOpts.StartSlide))
             {
                 System.Diagnostics.Debug.WriteLine("Loop");
                 while (!Quit)
                 {
                     int width = 0, height = 0;
                     if (pptView.Render(ref SlidePixels, ref width, ref height) &&
                         byteStreamer.NeedData)
                     {
                         byteStreamer.PushBuffer(SlidePixels);
                     }
                     System.Diagnostics.Debug.WriteLine("Render");
                     Thread.Sleep(StreamDelay);
                 }
             }
     }
     catch (Exception)
     {
         System.Diagnostics.Debug.WriteLine("done");
         Quit = true;
         return;
     }
 }
Exemplo n.º 2
0
    void Update()
    {
        pptView.Render(ref pptTexture);

        if (Input.GetMouseButton(0))
        {
            Debug.LogFormat("Slide #: {0}", pptView.SlideNumber);
        }

        if (Input.GetKeyDown(KeyCode.RightArrow))
        {
            pptView.NextStep();
        }
        else if (Input.GetKeyDown(KeyCode.LeftArrow))
        {
            pptView.PreviousStep();
        }
    }