Exemple #1
0
        private void btnAddTrim_Click(object sender, EventArgs e)
        {
            var node = treeFiles.SelectedNode;

            if (node == null)
            {
                return;
            }

            if (node is VideoFileTrimNode)
            {
                node = node.Parent;
            }

            var file = node as VideoFileNode;

            if (file == null)
            {
                return;
            }

            using (var dlg = new EditTrimDialog(GetTrimNames()))
            {
                dlg.Text = "Add Trim";
                if (dlg.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
                {
                    var trim = new VideoFileTrimNode();
                    ApplyTrim(trim, dlg);
                    file.Nodes.Add(trim);
                    file.Expand();
                }
            }
        }
Exemple #2
0
        private void btnEditTrim_Click(object sender, EventArgs e)
        {
            var trim = treeFiles.SelectedNode as VideoFileTrimNode;

            if (trim == null)
            {
                return;
            }

            using (var dlg = new EditTrimDialog(GetTrimNames(trim)))
            {
                dlg.Text       = "Edit Trim";
                dlg.Start      = trim.Start;
                dlg.End        = trim.End;
                dlg.SpecifyEnd = trim.SpecifyEnd;
                dlg.TrimName   = trim.TrimName;

                if (dlg.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
                {
                    ApplyTrim(trim, dlg);
                }
            }
        }