/// <summary> /// Saves the rotation to the file at the specified <paramref name="path" />. /// </summary> /// <param name="path">The path.</param> /// <returns>True on success; False otherwise.</returns> private bool SaveToFile(string path) { try { File.WriteAllText(path, _mapRotation.ToString()); IsFileModified = false; return(true); } catch (Exception e) { MessageBox.Show(this, e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return(false); } }
/// <summary> /// Initializes a new instance of the <see cref="PlainTextExporterForm" /> class. /// </summary> /// <param name="rotation">The rotation.</param> public PlainTextExporterForm(MapRotation rotation) { InitializeComponent(); textBox.Text = rotation.ToString(); }