Beispiel #1
0
        private void ResortCameraFileList()
        {
            _camRoot.SortBy(_cameraFileSortType);
            CameraTreeView.Nodes.Clear();
            IngressTreeNode dummyRoot = new IngressTreeNode("dummy", null);

            TraverseDirTree(CameraTreeView, _camRoot, 0, ref dummyRoot);
            CameraTreeView.ExpandAll();
        }
Beispiel #2
0
        protected void UpdateTreeView()
        {
            _jobDir  = this.JobDirTextBox.Text;
            _jobRoot = new DirectoryOrFile();
            LoadDirTree(ref _jobRoot, _jobDir, null, DirectoryOrFile.DOF_Type.DIR);
            EnableButtons();

            JobTreeView.Nodes.Clear();
            IngressTreeNode dummyRoot = new IngressTreeNode("dummy", null);

            TraverseDirTree(JobTreeView, _jobRoot, 0, ref dummyRoot);

            JobTreeView.ExpandAll();
        }
Beispiel #3
0
        private void LoadCameraPath(string path, bool ClearLists, int camNum, bool doGuess, int numMovieFilesToGuess)
        {
            _previousCamRoot = _camRoot;
            _previousCamera  = camNum;

            _camRoot = new DirectoryOrFile();
            LoadDirTree(ref _camRoot, path, null, DirectoryOrFile.DOF_Type.DIR);

            CameraTreeView.Nodes.Clear();
            IngressTreeNode dummyRoot = new IngressTreeNode("dummy", null);

            TraverseDirTree(CameraTreeView, _camRoot, 0, ref dummyRoot);

            CameraTreeView.ExpandAll();

            if (_sources != null)
            {
                //                        _previousSources = new List<DirectoryOrFile>();
                _previousSources = _sources;
                //                        _previousDestinationScenes = new List<string>();
                _previousDestinationScenes = _destinationScenes;
                _previousCamera            = camNum;
                _previousSourceCams        = _sourceCams;
            }

            if (ClearLists)
            {
                _sources = new List <DirectoryOrFile>();
                SourceListBox.Items.Clear();
                _destinationScenes = new List <string>();
                _sourceCams        = new List <int>();
            }

            if (doGuess)
            {
                if (_guessType == tGuessType.GUESS_BY_ORDER)
                {
                    MakeCopyGuessBySortOrder(camNum);
                }
                else if (_guessType == tGuessType.GUESS_BY_DATE)
                {
                    MakeCopyGuessByDate(camNum, numMovieFilesToGuess);
                }
            }
        }
Beispiel #4
0
        private void CameraTreeView_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            IngressTreeNode ie = (IngressTreeNode)(e.Node);

            try
            {
                // Look for a file extension.
                if (ie.DorF.Path().Contains("."))
                {
                    System.Diagnostics.Process.Start(ie.DorF.Path());
                }
            }
            // If the file is not found, handle the exception and inform the user.
            catch (System.ComponentModel.Win32Exception)
            {
                MessageBox.Show("\"" + ie.DorF.Path() + "\" File not found.");
            }
        }
Beispiel #5
0
        //protected void TraverseDirTree(DirectoryOrFile node, int level, ref TreeStore store, TreeIter iter)
        protected void TraverseDirTree(TreeView tv, DirectoryOrFile node, int level, ref IngressTreeNode tree_node) //ref TreeStore store, TreeIter iter)
        {
            IngressTreeNode thisNodeIter = new IngressTreeNode(node.Name(), node);

            if (level == 0)
            {
                tv.Nodes.Add(thisNodeIter); //           store.AppendValues(node.Name());
            }
            else
            {
                tree_node.Nodes.Add(thisNodeIter); // store.AppendValues(iter, node.Name());
            }
            //for (int i = 0; i < level; i++)
            //    Console.Write("   ");
            //Console.WriteLine("{0} = {1} ({2})", node.Name(), node.Path(), node.Type() == DirectoryOrFile.DOF_Type.DIR ? "D" : (node.Type() == DirectoryOrFile.DOF_Type.FILE ? "F" : "U"));

            for (int i = 0; i < node.NumChildren(); i++)
            {
                //TraverseDirTree(node.Child(i), level + 1, ref store, thisNodeIter);
                TraverseDirTree(tv, node.Child(i), level + 1, ref thisNodeIter);
            }
        }
Beispiel #6
0
 private void CameraTreeView_AfterSelect(object sender, TreeViewEventArgs e)
 {
     _selectedCamNode = (IngressTreeNode)(e.Node);
     EnableAddCopyButton();
 }