Esempio n. 1
0
        /// <summary>
        /// Continuation of <see cref="UpdateTargetPath(string)"/>: only ran when selected path is valid.
        /// <para>
        /// Loads file blacklists, does active folder cleanup / mod file retrieval and compiles modlist.
        /// </para>
        /// Also displays certain popup windows. See: <see cref="PubstuntInfoPopup"/>, <see cref="MixmodsPopup"/>
        /// </summary>
        private void Setup()
        {
            Wood.WriteLine("Path valid, starting setup " + DateTime.UtcNow);
            PubstuntFound   = false;
            MixmodsFound    = false;
            metafiletracker = false;
            outrmixmods.Clear();
            Wood.Indent();
            try
            {
                PrepareModsFolder();
                //TODO: move csd init somewhere else
                Donkey.currentSourceDir = new DirectoryInfo(ModFolder);
                Donkey.CriticalSweep();
                Donkey.RetrieveLost();
                Donkey.TryLoadCargoAsync(new DirectoryInfo(ModFolder));
                Donkey.BringUpToDate();
                FillModList();
                Modlist.Enabled = true;
                //btnLaunch.Enabled = true;
                //targetSelectD.FileName = RootPath;//RootPath.EndsWith(".exe") ? RootPath : Directory.GetFiles(RootPath, "*.exe").FirstOrDefault() ?? RootPath;//Path.Combine(RootPath, "RainWorld.exe");

                if (PubstuntFound && firstshow)
                {
                    PubstuntInfoPopup popup;
                    popup = new PubstuntInfoPopup();
                    AddOwnedForm(popup);
                    popup.Show();
                }
                if (MixmodsFound)
                {
                    MixmodsPopup mixmodsPopup = new(outrmixmods);
                    AddOwnedForm(mixmodsPopup);
                    mixmodsPopup.Show();
                }
                buttonClearMeta.Visible = metafiletracker;
            }
            catch (Exception e)
            {
                Wood.WriteLine("\nUNHANDLED EXCEPTION DURING SETUP!!!");
                Wood.WriteLine(e, 1);
            }
            Wood.Unindent();
        }
Esempio n. 2
0
File: BOI.cs Progetto: thalber/BOI
        private void Setup()
        {
            Wood.WriteLine("Path valid, starting setup " + DateTime.Now);
            Wood.Indent();
            PubstuntFound   = false;
            MixmodsFound    = false;
            metafiletracker = false;
            ReadyForRefresh = false;
            Modlist.Items.Clear();
            outrmixmods.Clear();
            targetFiles.Clear();

            Rootout();
            PrepareModsFolder();
            ResolveBlacklists();
            RetrieveAllDlls();
            CompileModList();
            BringUpToDate();
            Modlist.Enabled           = true;
            btnLaunch.Enabled         = true;
            TargetSelect.SelectedPath = RootPath;
            if (PubstuntFound && firstshow)
            {
                PubstuntInfoPopup popup;
                popup = new PubstuntInfoPopup();
                AddOwnedForm(popup);
                popup.Show();
            }
            if (MixmodsFound)
            {
                MixmodsPopup mixmodsPopup = new Blep.MixmodsPopup(outrmixmods);
                AddOwnedForm(mixmodsPopup);
                mixmodsPopup.Show();
            }
            ReadyForRefresh         = true;
            buttonClearMeta.Visible = metafiletracker;
            Wood.Unindent();
        }