Ejemplo n.º 1
0
        private void AddFilesToNode(VNode node, IEnumerable <string> files)
        {
            foreach (string f in files)
            {
                VNode tn = new VNode();
                tn.Text = Path.GetFileName(f);
                //tn.Tag  = f;
                tn.name = f;
                //tn.ForeColor = FileColor;
                tn.isFile    = true;
                tn.ForeColor = FileColor;
                tn.BackColor = Colors.backColor;
                //tn.StateImageIndex = audioFileImadeIndex;
                node.Nodes.Add(tn);
                fileLoader.AddMusicFile(f);
            }
            //causing VNode.clone implementation to fail.  not all that surprising

            /*
             * Parallel.ForEach(files, f =>
             * {
             *  VNode tn = new VNode();
             *  tn.Text = Path.GetFileName(f);
             *  tn.Tag = f;
             *  tn.ForeColor = Color.LightYellow;
             *  node.Nodes.Add(tn);
             * });
             */
        }