コード例 #1
0
ファイル: SoundGrid.xaml.cs プロジェクト: yvanvds/interact
        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);
        }
コード例 #2
0
ファイル: SoundGrid.xaml.cs プロジェクト: yvanvds/interact
        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);
        }