Example #1
0
        private long WhereWouldEndBe(long origFrame1, long origFrame2, VidkaClip clip)
        {
            var end = Math.Max(origFrame1, origFrame2);

            if (end > clip.FileLengthFrames)
            {
                end = clip.FileLengthFrames;
            }
            return(end);
        }
Example #2
0
 /// <summary>
 /// Uses proj.ClipsAudio.Contains(hoverClip) to determine which to set HoverAudio or HoverVideo
 /// </summary>
 public void SetHoverGeneric(VidkaClip hoverClip, VidkaProj proj)
 {
     if (proj.ClipsAudio.Contains(hoverClip))
     {
         SetHoverAudio((VidkaClipAudio)hoverClip);
     }
     else             // video!!!
     {
         SetHoverVideo((VidkaClipVideoAbstract)hoverClip);
     }
 }
Example #3
0
        public void OpenClipProperties(VidkaClip clip)
        {
            if (clip == null)
            {
                return;
            }
            VidkaClip newClip      = null;
            Form      windowDialog = null;

            if (clip is VidkaClipVideoAbstract)
            {
                var window = new ClipPropertiesWindowVideo
                {
                    Text = "Advanced clip properties",
                };
                windowDialog = window;
                if (clip is VidkaClipVideo)
                {
                    var vclip  = (VidkaClipVideo)clip;
                    var vclip2 = vclip.MakeCopy_VideoClip();
                    newClip = vclip2;
                    window.CommonPropertiesControl.SetParticulars(vclip2);
                    window.CommonCustomAudioControl.SetParticulars(vclip2, Logic.MetaGenerator, Logic.FileMapping, Logic.Proj);
                }
                else if (clip is VidkaClipImage)
                {
                    var vclip  = (VidkaClipImage)clip;
                    var vclip2 = vclip.MakeCopy_VideoClip();
                    newClip = vclip2;
                    window.CommonPropertiesControl.SetParticulars(vclip2);
                    window.CommonCustomAudioControl.SetParticulars(vclip2, Logic.MetaGenerator, Logic.FileMapping, Logic.Proj);
                    //window.AddImportantTab("");
                }
                else if (clip is VidkaClipTextSimple)
                {
                    var vclip  = (VidkaClipTextSimple)clip;
                    var vclip2 = (VidkaClipTextSimple)vclip.MakeCopy_VideoClip();
                    newClip = vclip2;
                    window.CommonPropertiesControl.SetParticulars(vclip2);
                    window.CommonCustomAudioControl.SetParticulars(vclip2, Logic.MetaGenerator, Logic.FileMapping, Logic.Proj);
                    var textCreationControl = new SimpleTextSettings();
                    textCreationControl.SetVideoClip(vclip2);
                    window.AddImportantTab("Text", textCreationControl);
                }
            }
            else if (clip is VidkaClipAudio)
            {
                var window = new ClipPropertiesWindowAudio
                {
                    Text = "Advanced clip properties",
                };
                windowDialog = window;
                var aclip  = (VidkaClipAudio)clip;
                var aclip2 = aclip.MakeCopy_AudioClip();
                newClip = aclip2;
                window.CommonPropertiesControl.SetParticulars(aclip2);
            }

            // use this dialog window to edit this clip
            if (newClip != null && windowDialog != null)
            {
                var result = windowDialog.ShowDialog();
                if (result == System.Windows.Forms.DialogResult.OK)
                {
                    Logic.ReplaceClip(clip, newClip);
                }
            }
        }