ModsDisabled() публичный статический Метод

public static ModsDisabled ( ) : bool
Результат bool
Пример #1
0
        private void formMain_Load(object sender, EventArgs e)
        {
            // Refresh button state
            panelContent.Controls.Add(noInstallNotice);
            panelContent.Controls.Add(log);
            panelContent.Controls.Add(modDescription);
            RefreshInstalledMods(true);
            foreach (Screen screen in Screen.AllScreens)
            {
                if (screen.WorkingArea.Contains(Properties.Settings.Default.formModsLocation))
                {
                    Location = Properties.Settings.Default.formModsLocation;
                }
                else
                {
                    Location = new Point(0, 0);
                }
            }
            Size = Properties.Settings.Default.formModsSize;

            if (Properties.Settings.Default.formModsMaximized == true)
            {
                WindowState = FormWindowState.Maximized;
            }

            menuItemSkipLauncher.Checked = Properties.Settings.Default.SkipLauncher;
            SetModsEnabled(!BackupManager.ModsDisabled());
            AdjustSize();

            Show();
        }
Пример #2
0
        private void UpdateModToggle()
        {
            bool enabled = !BackupManager.ModsDisabled();

            buttonInstallMod.Enabled   = enabled;
            buttonUninstallMod.Enabled = enabled;
            buttonWebInstall.Enabled   = enabled;
        }
Пример #3
0
        private void ShowConfiguration()
        {
            PlaySound("ui_select");
            formSettings Settings = new formSettings();

            Settings.Owner = this;
            Settings.ShowDialog();
            buttonMods.Enabled = !BackupManager.ModsDisabled();
        }
Пример #4
0
        private void menuItemOpenSettings_Click(object sender, EventArgs e)
        {
            formSettings Settings = new formSettings();

            Settings.Owner = this;
            Settings.ShowDialog();

            bool modsEnabled = !BackupManager.ModsDisabled();

            SetModsEnabled(modsEnabled);
        }
Пример #5
0
 private void picModToggle_Click(object sender, EventArgs e)
 {
     if (BackupManager.ModsDisabled())
     {
         ProgressWindow.Show("Working", "Enabling mods, please wait...", new Action(BackupManager.SwitchToMods), log);
     }
     else
     {
         ProgressWindow.Show("Working", "Disabling mods, please wait...", new Action(BackupManager.SwitchToOriginal), log);
     }
     UpdateModToggle();
 }
Пример #6
0
 private void picModToggle_Click(object sender, EventArgs e)
 {
     if (BackupManager.ModsDisabled())
     {
         ProgressWindow.Show("Working", "Enabling mods, please wait...", new Action(BackupManager.SwitchToMods));
     }
     else
     {
         ProgressWindow.Show("Working", "Disabling mods, please wait...\n\nNote:\n You will not have access to the Mod Menu\nwhile mods are disabled.", new Action(BackupManager.SwitchToOriginal));
     }
     UpdateModToggle();
 }
Пример #7
0
        private void formMain_Load(object sender, EventArgs e)
        {
            // Refresh button state
            UpdateModToggle();
            RefreshInstalledMods(true);

            // Show form before continuing
            this.Show();

            if (BackupManager.ModsDisabled())
            {
                MessageBox.Show("Mods are currently disabled. To install or uninstall mods, please click Enable Mods in the Settings menu.", "SnakeBite", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Пример #8
0
        private void UpdateModToggle()
        {
            // Enable/disable mods button

            if (BackupManager.ModsDisabled())
            {
                buttonMods.Enabled = false;
                picModToggle.Image = Properties.Resources.toggleoff;
            }
            else
            {
                buttonMods.Enabled = true;
                picModToggle.Image = Properties.Resources.toggleon;
            }
        }
Пример #9
0
        private void formLauncher_Load(object sender, EventArgs e)
        {
            textInfo = cultureInfo.TextInfo;

            // Retrieve and display version info
            var MGSVersionInfo = FileVersionInfo.GetVersionInfo(Properties.Settings.Default.InstallPath + "\\mgsvtpp.exe");

            string SBVersion  = Application.ProductVersion;
            string MGSVersion = MGSVersionInfo.ProductVersion;

            // Update version text
            string VersionText = String.Format("MGSV {0} / SB {1}", MGSVersion, SBVersion);

            labelVersion.Text = VersionText;
            UpdateVersionLabel();

            buttonMods.Enabled = !BackupManager.ModsDisabled();

            SetupTheme();

            // Fade in form
            Opacity = 0;
            int   duration = 100;//in milliseconds
            int   steps    = 30;
            Timer timer    = new Timer();

            timer.Interval = duration / steps;

            int currentStep = 0;

            timer.Tick += (arg1, arg2) =>
            {
                Opacity = ((double)currentStep) / steps;
                currentStep++;

                if (Opacity == 1)
                {
                    timer.Stop();
                    timer.Dispose();
                }
            };

            timer.Start();
        }
Пример #10
0
        private void formLauncher_Load(object sender, EventArgs e)
        {
            textInfo = cultureInfo.TextInfo;

            // Check for updates

            /* //tex OFF since topher has left it
             * Debug.LogLine("[Update] Checking for updates");
             * UpdateFile updater = new UpdateFile();
             * bool updateSuccess = updater.ReadXmlFromInterweb("http://www.xobanimot.com/snakebite/update/update.xml");
             * if (updateSuccess)
             * {
             *  if (updater.SnakeBite.Version.AsVersion() > ModManager.GetSBVersion())
             *  {
             *      Debug.LogLine(String.Format("Update found! Version {0} is available", updater.SnakeBite.Version.AsVersion()));
             *      labelUpdate.Text = String.Format("SnakeBite version {0} now available!", updater.SnakeBite.Version.AsString());
             *      labelUpdate.Show();
             *  } else
             *  {
             *      Debug.LogLine("No update found");
             *  }
             * } else {
             *  Debug.LogLine("Could not read update.xml");
             * }
             */

            // Retrieve and display version info
            var MGSVersionInfo = FileVersionInfo.GetVersionInfo(Properties.Settings.Default.InstallPath + "\\mgsvtpp.exe");

            string SBVersion  = Application.ProductVersion;
            string MGSVersion = MGSVersionInfo.ProductVersion;

            // Update version text
            string VersionText = String.Format("MGSV {0} / SB {1}", MGSVersion, SBVersion);

            labelVersion.Text = VersionText;
            UpdateVersionLabel();

            buttonMods.Enabled = !BackupManager.ModsDisabled();

            SetupTheme();

            // Fade in form
            Opacity = 0;
            int   duration = 100;//in milliseconds
            int   steps    = 30;
            Timer timer    = new Timer();

            timer.Interval = duration / steps;

            int currentStep = 0;

            timer.Tick += (arg1, arg2) =>
            {
                Opacity = ((double)currentStep) / steps;
                currentStep++;

                if (Opacity == 1)
                {
                    timer.Stop();
                    timer.Dispose();
                }
            };

            timer.Start();
        }