private void button_saveCode_Click(object sender, EventArgs e) { if (curCodeFile != null) { System.IO.File.WriteAllText(curCodeFile, this.richTextBox_Code.Text); ReFormat(); } }