private void RefreshFile(ArtFile newFile) { _file = newFile; Text = string.Format("ARDUBOY Art Studio - {0}", _file.Name); paneExplorer.File = _file; paneDebug.File = _file; }
private void menuOpen_Click(object sender, EventArgs e) { ArtFile newFile; if (myOpenDialog.ShowDialog() == DialogResult.OK) { try { newFile = ArtFile.Load(myOpenDialog.FileName); } catch (Exception ex) { MessageBox.Show(String.Format( "The file '{0}' cannot be loaded.", myOpenDialog.FileName)); #if DEBUG Debug.WriteLine(ex.ToString()); #endif return; } RefreshFile(newFile); } }