Beispiel #1
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            // Create OpenFileDialog

            Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();


            // Set filter for file extension and default file extension

            dlg.DefaultExt = ".srt";

            dlg.Filter = "Subtitles (.srt)|*.srt";


            // Display OpenFileDialog by calling ShowDialog method

            Nullable<bool> result = dlg.ShowDialog();


            // Get the selected file name and display in a TextBox

            if (result == true)
            {
                // Open document

                string filename = dlg.FileName;
                string name = System.IO.Path.GetFileName(filename);

                Window1 w = new Window1(filename, name);
                w.Show();
                Application.Current.MainWindow = w;
                this.Close();
            }
        }
Beispiel #2
0
 public SrtResynk(Window1 win)
 {
     this.TestContent = null;
     _window = win;
 }
Beispiel #3
0
 public SrtResynk(Window1 win)
 {
     this.TestContent = null;
     _window          = win;
 }