Beispiel #1
0
        public void AddCopy(string OriginalFileName, string ProjectFileName, string Name)
        {
            string ID = shortid.ShortId.Generate(false, false);

            var sound = new SoundControl(SoundControl.CreateJObject(OriginalFileName, ProjectFileName, ID, Name), tree, SoundPath, this);

            Panel.Children.Add(sound);
        }
Beispiel #2
0
        private void AddFile(string path)
        {
            string OriginalFileName = path;
            string ID              = shortid.ShortId.Generate(false, false);
            string Name            = System.IO.Path.GetFileNameWithoutExtension(path);
            string ProjectFileName = ID + System.IO.Path.GetExtension(path);

            var target = System.IO.Path.Combine(SoundPath, ProjectFileName);

            System.IO.File.Copy(path, target, true);

            var sound = new SoundControl(SoundControl.CreateJObject(OriginalFileName, ProjectFileName, ID, Name), tree, SoundPath, this);

            Panel.Children.Add(sound);
        }