/// <summary>
 /// 打开文件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OpenFileMenuItemChild_Click(object sender, EventArgs e)
 {
     openFileDialog1.Filter = "脚本文件|*.psc|四元组文件|*.pas";
     if (openFileDialog1.ShowDialog() == DialogResult.OK)
     {
         filenamewithpath = openFileDialog1.FileName;
         //string ext = filenamewithpath.Substring(filenamewithpath.LastIndexOf(".") + 1);//获取文件格式
         safefilename = openFileDialog1.SafeFileName;
         using (FileStream fs = new FileStream(filenamewithpath, FileMode.Open, FileAccess.Read))
         {
             using (StreamReader sr = new StreamReader(fs, EncodeType))
             {
                 PapyrusCompilerTextBox.Text = sr.ReadToEnd();
                 this.Text = "Script Edit - " + safefilename;
             }
         }
     }
     else
     {
         PapyrusCompilerTextBox.Clear();
         this.Text = "Script Edit";
     }
 }
 /// <summary>
 /// 新建文件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void CreateMenuItemChild_Click(object sender, EventArgs e)
 {
     PapyrusCompilerTextBox.Clear();
     this.Text = "Script Edit - 未命名";
 }