Пример #1
0
 private void xOpenSub_Click(object sender, EventArgs e)
 {
     xOpenFile.Filter = "Pliki napisów|*.txt|Wszystkie pliki|*.*";
     if (DialogResult.OK == xOpenFile.ShowDialog(this))
     {
         for (int i = 0; i < xOpenFile.FileNames.Length; i++)
         {
             //Convert2MicroDVD.Convert(xOpenFile.FileNames[i]);
             Convert2Srt.Convert(xOpenFile.FileNames[i]);
         }
         MessageBox.Show(this, "Zakoñczono konwersje");
     }
     else
     {
         MessageBox.Show(this, "Konwersja przerwana");
     }
 }
Пример #2
0
        static void Main(params string[] Arguments)
        {
            //Wywo³anie programu z menu kontekstowego
            if (Arguments.Length > 0)
            {
                string fp = Arguments[0];

                if (!fp.Equals("") & !fp.Equals(null))
                {
                    //Convert2MicroDVD.Convert(fp);
                    Convert2Srt.Convert(fp);

                    Application.Exit();
                }
            }
            //Normalne uruchomie programu z pliku exe
            else
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new Form1());
            }
        }