SlideshowTypeString() public method

public SlideshowTypeString ( ) : string
return string
Ejemplo n.º 1
0
        private void WorkloadFunc()
        {
            vMixMicroEvent vme;

            while (!exitApp)
            {
                PaintTime();
                if (Workload.TryTake(out vme, 1000))
                {
                    vMixEvent evnt = vme.with;

                    if (vme.what.Equals(vmMicroEventType.exit))
                    {
                        break;
                    }

                    switch (vme.what)
                    {
                    case vmMicroEventType.prepare:
                        evnt.state = 1;
                        if (evnt.EventType == vmEventType.input)
                        {
                            WebClient.GetGUID(evnt.Title, out evnt.GUID);
                        }
                        else if (evnt.EventType == vmEventType.black)
                        {
                            WebClient.AddInput("Colour", "black", evnt.GUID);
                        }
                        else if (evnt.HasMedia)
                        {
                            WebClient.AddInput(evnt.EventTypeString(), evnt.EventPath, evnt.GUID);
                        }
                        break;

                    case vmMicroEventType.setup:
                        if (evnt.EventType == vmEventType.photos)
                        {
                            WebClient.SetupSlideshow(evnt.SlideshowInterval, evnt.SlideshowTypeString(), evnt.SlideshowTransitionTime, evnt.GUID);
                        }
                        break;

                    case  vmMicroEventType.fastforward:
                        if (evnt.HasDuration)
                        {
                            int position = (int)(DateTime.Now - evnt.EventStart + evnt.EventInPoint).TotalMilliseconds;
                            WebClient.ForwardTo(evnt.GUID, position);
                        }
                        break;

                    case vmMicroEventType.transition:
                        evnt.state = 2;
                        if (evnt.EventType == vmEventType.input)
                        {
                            string type     = evnt.TransitionTypeString();
                            int    duration = evnt.EventTransitionTime;
                            WebClient.Transition(evnt.GUID, type, duration);
                        }
                        else if (evnt.HasMedia)
                        {
                            string type     = evnt.TransitionTypeString();
                            int    duration = evnt.EventTransitionTime;
                            WebClient.Transition(evnt.GUID, type, duration);
                        }
                        break;

                    case vmMicroEventType.remove:
                        if (evnt.EventType != vmEventType.input)
                        {
                            WebClient.CloseInput(evnt.GUID);
                        }
                        RemoveEvent(evnt);
                        break;
                    }
                }
            }
            CloseWindow();
        }