Пример #1
0
        private void HoldoutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FAddNewMap form = new FAddNewMap(LGames[2], 3);

            form.ShowDialog();
            if (form.DialogResult == DialogResult.OK)
            {
                LGames[2] = form.Game;

                var           path2 = Path.Combine(Directory.GetCurrentDirectory() + @"\" + "payday2");
                DirectoryInfo d     = new DirectoryInfo(path2);
                foreach (var file in d.GetFiles())
                {
                    if (file.Name == "3_Holdout.txt")
                    {
                        var CoA = LGames[2].categories[3];
                        File.WriteAllText(file.FullName, JsonConvert.SerializeObject(CoA));
                    }
                }
            }
        }
Пример #2
0
        private void kF2ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FAddNewMap form = new FAddNewMap(LGames[1], 0);

            form.ShowDialog();
            if (form.DialogResult == DialogResult.OK)
            {
                LGames[1] = form.Game;

                var           path2 = Path.Combine(Directory.GetCurrentDirectory() + @"\" + "killingfloor2");
                DirectoryInfo d     = new DirectoryInfo(path2);
                foreach (var file in d.GetFiles())
                {
                    if (file.Name == "0_MapsDifficulty.txt")
                    {
                        var CoA = LGames[1].categories[0];
                        File.WriteAllText(file.FullName, JsonConvert.SerializeObject(CoA));
                    }
                }
            }
        }