private void saveToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(filename))
     {
         saveAsToolStripMenuItem_Click(sender, e);
     }
     else
     {
         using (PaddingDialog dlg = new PaddingDialog(file.Padding))
         {
             if (dlg.ShowDialog(this) != DialogResult.OK)
             {
                 return;
             }
             file.Padding = (int)dlg.numericUpDown1.Value;
         }
         file.Save(filename);
         if (MessageBox.Show(this, "Generate ARL file?", "Generations Archive Editor", MessageBoxButtons.YesNo) == DialogResult.Yes)
         {
             new Thread(() => {
                 Ar00File.GenerateArlFile(filename);
             }).Start();
         }
     }
 }
 private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (CommonSaveFileDialog a = new CommonSaveFileDialog {
         Filters = { arFiles, allFiles }
     })
     {
         if (a.ShowDialog() == CommonFileDialogResult.Ok)
         {
             using (PaddingDialog dlg = new PaddingDialog(file.Padding))
             {
                 if (dlg.ShowDialog(this) != DialogResult.OK)
                 {
                     return;
                 }
                 file.Padding = (int)dlg.numericUpDown1.Value;
             }
             file.Save(a.FileName);
             filename = a.FileName;
             if (MessageBox.Show(this,
                                 "Generate ARL file?",
                                 "Generations Archive Editor",
                                 MessageBoxButtons.YesNo) ==
                 DialogResult.Yes)
             {
                 string filename = a.FileName;
                 new Thread(() => {
                     Ar00File.GenerateArlFile(filename);
                 }).Start();
             }
         }
     }
 }