Inheritance: System.Windows.Forms.UserControl
Exemple #1
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);
            }
        }
Exemple #2
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);
                }
            }
        }