private void btnScriptSave_Click(object sender, EventArgs e) { var fg = new FormGetFileName(); if (cbProcedures.SelectedItem != null) { fg.FileName = cbProcedures.SelectedItem.ToString(); } if (fg.ShowDialog() == DialogResult.OK && fg.FileName + "" != "") { File.WriteAllText(Application.StartupPath + "/procedures/" + fg.FileName + ".lua", tbCommand.Text); LoadProcedures(); cbProcedures.SelectedItem = fg.FileName; } }
private void btnScriptSave_Click(object sender, EventArgs e) { var fg = new FormGetFileName(); if (cbProcedures.SelectedItem != null) fg.FileName = cbProcedures.SelectedItem.ToString(); if (fg.ShowDialog() == DialogResult.OK && fg.FileName + "" != "") { File.WriteAllText(Application.StartupPath + "/procedures/" + fg.FileName + ".lua", tbCommand.Text); LoadProcedures(); cbProcedures.SelectedItem = fg.FileName; } }