BiliRanking.WPF.View.VideoClip.buttonLoad_Click C# (CSharp) 메소드

buttonLoad_Click() 개인적인 메소드

private buttonLoad_Click ( object sender, RoutedEventArgs e ) : void
sender object
e System.Windows.RoutedEventArgs
리턴 void
        private void buttonLoad_Click(object sender, RoutedEventArgs e)
        {
            var openfiles = new OpenFileDialog();
            if (openfiles.ShowDialog() == true)
            {
                Player.Stop();
                Player.LoadMedia(openfiles.FileName);
                Player.Play();
            }
            return;

            //String pathString = path.Text;

            //Uri uri = null;
            //if (!Uri.TryCreate(pathString, UriKind.Absolute, out uri)) return;

            //Player.Stop();
            //Player.LoadMedia(uri);
            //if you pass a string instead of a Uri, LoadMedia will see if it is an absolute Uri, else will treat it as a file path
            //Player.Play();
        }