Beispiel #1
0
        private void loadVanillaButton_Click(object sender, EventArgs e)
        {
            ModViewer mv = new ModViewer(directoryToVanillaContent, true);

            Utilities.currentMods.Add(mv);
            mv.Show();
        }
Beispiel #2
0
        private void newModButton_Click(object sender, EventArgs e)
        {
            modFolderBrowserDialog.SelectedPath = currentDirectory;
            DialogResult dr = modFolderBrowserDialog.ShowDialog();

            if (dr == DialogResult.OK)
            {
                string    location = modFolderBrowserDialog.SelectedPath;
                ModViewer mv       = new ModViewer(true, location);
                Utilities.currentMods.Add(mv);
                Settings.settings["previousMod"] = mv.currentDirectory;
                mv.Show();
                Settings.saveSettings();
            }
        }
Beispiel #3
0
        private void openModButton_Click(object sender, EventArgs e)
        {
            modFolderBrowserDialog.SelectedPath = (Settings.settings["rememberPreviousMod"] != null && Settings.settings["rememberPreviousMod"].ToObject <bool>() && Settings.settings["previousMod"] != null) ? Settings.settings["previousMod"].ToString() : currentDirectory;
            DialogResult dr = modFolderBrowserDialog.ShowDialog();

            if (dr == DialogResult.OK)
            {
                string    location = modFolderBrowserDialog.SelectedPath;
                ModViewer mv       = new ModViewer(location, false);
                Utilities.currentMods.Add(mv);
                Settings.settings["previousMod"] = mv.currentDirectory;
                mv.Show();
                Settings.saveSettings();
            }
        }
Beispiel #4
0
        public MainForm()
        {
            InitializeComponent();

            if (File.Exists(currentDirectory + "csmt.settings.json"))
            {
                Settings.loadSettings(currentDirectory + "csmt.settings.json");
            }
            if (Settings.settings["openWithVanilla"] != null && Settings.settings["openWithVanilla"].ToObject <bool>())
            {
                ModViewer mv = new ModViewer(directoryToVanillaContent, true);
                Utilities.currentMods.Add(mv);
                mv.Show();
            }
            if (Settings.settings["rememberPreviousMod"] != null && Settings.settings["rememberPreviousMod"].ToObject <bool>())
            {
                ModViewer mv = new ModViewer(Settings.settings["previousMod"].ToString(), false);
                Utilities.currentMods.Add(mv);
                mv.Show();
            }
        }