Example #1
0
        public MainForm(Settings settings)
        {
            //
            InitializeComponent();

            // Settings
            SteamAPIWrapper.InitSafe();
            Settings = settings;

            // Restore states
            showHiddenModsToolStripMenuItem.Checked = settings.ShowHiddenElements;

            // Hide WotC and Challenge Mode buttons if necessary
            if (settings.GamePath != "")
            {
                runWarOfTheChosenToolStripMenuItem.Visible = Directory.Exists(settings.GamePath + @"\XCom2-WarOfTheChosen");
                runChallengeModeToolStripMenuItem.Visible  = Directory.Exists(settings.GamePath + @"\XCom2-WarOfTheChosen");
            }

            // Init interface
            InitObjectListView();
            UpdateInterface();
            RegisterEvents();

            //Other intialization
            InitializeTabImages();

            // Init the argument checkboxes
            LogLaunchArgument.Settings          = settings;
            NoRedscreensLaunchArgument.Settings = settings;

#if !DEBUG
            // Check for Updates
            CheckSteamForUpdates();
#endif

            // Run callbacks
            var t1 = new Timer();
            t1.Tick    += (sender, e) => { SteamAPIWrapper.RunCallbacks(); };
            t1.Interval = 10;
            t1.Start();

            // Check for running downloads
#if DEBUG
            if (Settings.GetWorkshopPath() != null)
            {
                CheckSteamForNewMods();

                var t2 = new Timer();
                t2.Tick    += (sender, e) => { CheckSteamForNewMods(); };
                t2.Interval = 30000;
                t2.Start();
            }
#endif
        }
Example #2
0
        public MainForm(Settings settings)
        {
            //
            InitializeComponent();

            // Settings
            SteamAPIWrapper.InitSafe();
            Settings = settings;

            // Restore states
            showHiddenModsToolStripMenuItem.Checked = settings.ShowHiddenElements;

            // Init interface
            InitObjectListView();
            UpdateInterface();
            RegisterEvents();

            //Other intialization
            InitializeTabImages();

#if !DEBUG
            // Check for Updates
            CheckSteamForUpdates();
#endif

            // Run callbacks
            var t1 = new Timer();
            t1.Tick    += (sender, e) => { SteamAPIWrapper.RunCallbacks(); };
            t1.Interval = 10;
            t1.Start();

            // Check for running downloads
#if DEBUG
            if (Settings.GetWorkshopPath() != null)
            {
                CheckSteamForNewMods();

                var t2 = new Timer();
                t2.Tick    += (sender, e) => { CheckSteamForNewMods(); };
                t2.Interval = 30000;
                t2.Start();
            }
#endif
        }
        public MainForm(Settings settings)
        {
            //
            InitializeComponent();

            // Settings
            SteamAPIWrapper.InitSafe();
            Settings = settings;

            // Restore states
            showHiddenModsToolStripMenuItem.Checked = settings.ShowHiddenElements;

#if !DEBUG
            // hide config tab
            modinfo_config_tab.Parent.Controls.Remove(modinfo_config_tab);
#endif

            // Init interface
            InitObjectListView();
            UpdateInterface();
            RegisterEvents();

            //Other intialization
            InitializeTabImages();

            // Check for Updates
            CheckSteamForUpdates();

            // Check for running downloads
#if DEBUG
            if (Settings.GetWorkshopPath() != null)
            {
                CheckSteamForNewMods();

                var t = new Timer();
                t.Tick    += (sender, e) => { CheckSteamForNewMods(); };
                t.Interval = 30000;
                t.Start();
            }
#endif
        }