Exemplo n.º 1
0
 private void LoadFile(FileInfo fInfo)
 {
     try
     {
         using var stream = fInfo.OpenRead();
         using var reader = new BinaryReader(stream);
         file_            = new SmxFile(reader);
     }
     catch (Exception e)
     {
         detailbox_.Text = Program.Translations.GetLanguage("ErrorFileLoadProc") + Environment.NewLine + Environment.NewLine + $"{Program.Translations.GetLanguage("Details")}: " + e.Message;
         return;
     }
     RenderFile();
 }
Exemplo n.º 2
0
        private void openFile(Stream stream)
        {
            try
            {
                using (stream)
                    using (var reader = new BinaryReader(stream))
                    {
                        file_ = new SmxFile(reader);
                    }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Could not parse file: " + ex.Message);
                return;
            }

            renderFile();
        }
Exemplo n.º 3
0
 private void LoadFile(FileInfo fInfo)
 {
     try
     {
         using (var stream = fInfo.OpenRead())
         {
             using (var reader = new BinaryReader(stream))
             {
                 file_ = new SmxFile(reader);
             }
         }
     }
     catch (Exception e)
     {
         detailbox_.Text = Program.Translations.ErrorFileLoadProc + Environment.NewLine + Environment.NewLine + $"{Program.Translations.Details}: " + e.Message;
         return;
     }
     renderFile();
 }
Exemplo n.º 4
0
 private void LoadFile(FileInfo fInfo)
 {
     try
     {
         using (var stream = fInfo.OpenRead())
         {
             using (var reader = new BinaryReader(stream))
             {
                 file_ = new SmxFile(reader);
             }
         }
     }
     catch (Exception e)
     {
         detailbox_.Text = "Error while loading and processing the file." + Environment.NewLine + Environment.NewLine + "Details: " + e.Message;
         return;
     }
     renderFile();
 }