TransitionTypeFromString() 공개 메소드

public TransitionTypeFromString ( string type ) : vmTransitionType
type string
리턴 vmTransitionType
예제 #1
0
        private void bn_add_photos_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog fbd = new FolderBrowserDialog();

            if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                string    path      = fbd.SelectedPath;
                TimeSpan  ts        = new TimeSpan(0, 3, 0);
                vMixEvent new_event = new vMixEvent(System.IO.Path.GetFileName(path),
                                                    path,
                                                    vmEventType.photos,
                                                    dtp_timetable.Value,
                                                    new TimeSpan(0),
                                                    ts,
                                                    ts,
                                                    false,
                                                    vmTransitionType.fade,
                                                    500,
                                                    false);

                if (new_event != null)
                {
                    new_event.EventTransition         = new_event.TransitionTypeFromString(lb_transition.Text);
                    new_event.EventTransitionTime     = (int)ud_transition_time.Value;
                    new_event.SlideshowInterval       = (int)ud_slideshow_interval.Value;
                    new_event.SlideshowTransition     = new_event.TransitionTypeFromString(lb_slideshow_transition.Text);
                    new_event.SlideshowTransitionTime = (int)ud_slideshow_transition.Value;
                    new_event.EventInfoText           = "slideshow";

                    int position;
                    if (ActiveEvent != null)
                    {
                        position = vMixEvents.IndexOf(ActiveEvent) + 1;
                    }
                    else
                    {
                        position = vMixEvents.Count;
                    }
                    vMixEvents.Insert(position, new_event);
                    ActiveEvent = new_event;
                    EventList.VirtualListSize = vMixEvents.Count;
                    EventList.SelectedIndices.Clear();
                    RebuildTimetable();
                    EventList.SelectedIndices.Add(position);
                    UpdateDisplay();
                }
            }
        }
예제 #2
0
        private void bn_add_audio_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Multiselect = true;
            if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                foreach (string file in ofd.FileNames)
                {
                    vMixEvent new_event = ParseAudioData(file);
                    if (new_event != null)
                    {
                        new_event.EventTransition     = new_event.TransitionTypeFromString(lb_transition.Text);
                        new_event.EventTransitionTime = (int)ud_transition_time.Value;
                        int position;
                        if (ActiveEvent != null)
                        {
                            position = vMixEvents.IndexOf(ActiveEvent) + 1;
                        }
                        else
                        {
                            position = vMixEvents.Count;
                        }
                        vMixEvents.Insert(position, new_event);
                        ActiveEvent = new_event;
                        EventList.VirtualListSize = vMixEvents.Count;
                        EventList.SelectedIndices.Clear();
                        RebuildTimetable();
                        EventList.SelectedIndices.Add(position);
                        UpdateDisplay();
                    }
                }
            }
        }
예제 #3
0
        private void bn_add_manual_Click(object sender, EventArgs e)
        {
            vMixEvent new_event = new vMixEvent(vmEventType.manual, dtp_timetable.Value, new TimeSpan(1, 0, 0));

            if (new_event != null)
            {
                new_event.EventTransition     = new_event.TransitionTypeFromString(lb_transition.Text);
                new_event.EventTransitionTime = (int)ud_transition_time.Value;
                int position;
                if (ActiveEvent != null)
                {
                    position = vMixEvents.IndexOf(ActiveEvent) + 1;
                }
                else
                {
                    position = vMixEvents.Count;
                }
                vMixEvents.Insert(position, new_event);
                ActiveEvent = new_event;
                EventList.VirtualListSize = vMixEvents.Count;
                EventList.SelectedIndices.Clear();
                RebuildTimetable();
                EventList.SelectedIndices.Add(position);
                UpdateDisplay();
            }
        }
예제 #4
0
 private void lb_transition_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (donotredraw)
     {
         return;
     }
     if (ActiveEvent != null)
     {
         ActiveEvent.EventTransition = ActiveEvent.TransitionTypeFromString(lb_transition.Text);
         if (ActiveEvent.EventTransition == vmTransitionType.cut)
         {
             ActiveEvent.EventTransitionTime = 0;
             RebuildTimetable();
         }
         UpdateDisplay();
     }
 }
예제 #5
0
 private void bn_add_black_Click(object sender, EventArgs e)
 {
     vMixEvent new_event = new vMixEvent (vmEventType.black, dtp_timetable.Value,new TimeSpan (0,0,10));
     if (new_event != null)
     {
         new_event.EventTransition = new_event.TransitionTypeFromString(lb_transition.Text);
         new_event.EventTransitionTime = (int)ud_transition_time.Value;
         int position;
         if (ActiveEvent != null)
             position = vMixEvents.IndexOf(ActiveEvent) + 1;
         else
             position = vMixEvents.Count;
         vMixEvents.Insert(position, new_event);
         ActiveEvent = new_event;
         EventList.VirtualListSize = vMixEvents.Count;
         EventList.SelectedIndices.Clear();
         RebuildTimetable();
         EventList.SelectedIndices.Add(position);
         UpdateDisplay();
     }
 }
예제 #6
0
        private void bn_add_photos_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog fbd = new FolderBrowserDialog();
            if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                string path = fbd.SelectedPath;
                TimeSpan ts = new TimeSpan(0, 3, 0);
                vMixEvent new_event = new vMixEvent(System.IO.Path.GetFileName (path),
                    path,
                    vmEventType.photos,
                    dtp_timetable.Value,
                    new TimeSpan(0),
                    ts,
                    ts,
                    false,
                    vmTransitionType.fade,
                    500,
                    false);

                if (new_event != null)
                {
                    new_event.EventTransition = new_event.TransitionTypeFromString(lb_transition.Text);
                    new_event.EventTransitionTime = (int)ud_transition_time.Value;
                    new_event.SlideshowInterval = (int)ud_slideshow_interval.Value;
                    new_event.SlideshowTransition = new_event.TransitionTypeFromString(lb_slideshow_transition.Text);
                    new_event.SlideshowTransitionTime = (int)ud_slideshow_transition.Value;
                    new_event.EventInfoText = "slideshow";

                    int position;
                    if (ActiveEvent != null)
                        position = vMixEvents.IndexOf(ActiveEvent) + 1;
                    else
                        position = vMixEvents.Count;
                    vMixEvents.Insert(position, new_event);
                    ActiveEvent = new_event;
                    EventList.VirtualListSize = vMixEvents.Count;
                    EventList.SelectedIndices.Clear();
                    RebuildTimetable();
                    EventList.SelectedIndices.Add(position);
                    UpdateDisplay();
                }
            }
        }