Ejemplo n.º 1
0
 private void button_open_Click(object sender, EventArgs e)
 {
     try
     {
         ti = this.GetFile();
         this.button_convert.Enabled = true;
     } catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Ejemplo n.º 2
0
        public TuringInfo GetFile()
        {
            TuringInfo ti = new TuringInfo();

            System.Windows.Forms.OpenFileDialog openfile = new System.Windows.Forms.OpenFileDialog();
            openfile.Filter = "EMT files|*.alg";
            var result = openfile.ShowDialog();

            if (result == System.Windows.Forms.DialogResult.OK)
            {
                ti = Контейнер.GetTuringInfo(openfile.FileName);
            }
            else
            {
                throw new FileLoadException("file weren't chosen");
            }
            return(ti);
        }