Esempio n. 1
0
 private void saveToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     if (visibilityFunctions.OpenVisibilityFile != null)
     {
         VisibilityFunctions.SaveHeroesVisibilityFile(visibilityFunctions.ChunkList, visibilityFunctions.OpenVisibilityFile);
     }
     else
     {
         saveAsToolStripMenuItem1_Click(sender, e);
     }
 }
Esempio n. 2
0
        private void saveAsToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            SaveFileDialog saveFileDialog = new SaveFileDialog()
            {
                Filter           = "BIN files|*.bin",
                FileName         = Path.GetFileName(visibilityFunctions.OpenVisibilityFile),
                AddExtension     = true,
                DefaultExt       = "bin",
                InitialDirectory = Path.GetDirectoryName(visibilityFunctions.OpenVisibilityFile)
            };

            if (saveFileDialog.ShowDialog() == DialogResult.OK)
            {
                visibilityFunctions.OpenVisibilityFile = saveFileDialog.FileName;
                VisibilityFunctions.SaveHeroesVisibilityFile(visibilityFunctions.ChunkList, visibilityFunctions.OpenVisibilityFile);
                labelLoadedBLK.Text = "Loaded " + visibilityFunctions.OpenVisibilityFile;
            }
        }