Inheritance: System.Windows.Forms.Form
示例#1
0
        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;
            }
        }
示例#2
0
 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;
     }
 }