public static string getGPU()
        {
            finalGPU = null;

            // show the form
            using (SelectGPU form = new SelectGPU()) {
                form.ShowDialog();
            }

            return(finalGPU); // return final value
        }
Example #2
0
        /// <summary>
        /// Ask operator for setting value, not to be confused with setSetting. Only called from setSetting.</summary>
        /// <param name="key"> Requested key name.</param>
        /// <seealso cref="SetSetting(string, string)"> Where settings are made.</seealso>
        public static void SetupSetting(string key)
        {
            string message = null;

            string[] value   = null;
            Boolean  special = false;

            switch (key)
            {
            // check for update
            case "Check for Updates":
                message = "Do you want to search for client updates?";
                value   = new string[] { "true", "false" };
                special = false;
                break;

            // desc
            case "Show Driver Description":
                message = "Do you want to see the driver description? (BETA)";
                value   = new string[] { "true", "false" };
                special = false;
                break;

            // the gpu
            case "GPU Name":
                message = "GPU Name";
                value   = new string[] { SelectGPU.getGPU() };
                special = true;
                break;


            // minimal installer maker
            case "Minimal install":
                message = "Do you want to perform a minimal install of the drivers? This will remove telemetry and other things you won't need, but requires WinRAR installed.";
                value   = new string[] { "true", "false" };
                special = false;
                break;

            default:
                MessageBox.Show("Unknown key '" + key + "'", "TinyNvidiaUpdateChecker", MessageBoxButtons.OK, MessageBoxIcon.Error);
                message = "Unknown";
                value   = null;
                special = false;
                break;
            }
            if (special)
            {
                SetSetting(key, value[0]);
            }
            else
            {
                DialogResult dialogUpdates = MessageBox.Show(message, "TinyNvidiaUpdateChecker", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (dialogUpdates == DialogResult.Yes)
                {
                    SetSetting(key, value[0]);
                }
                else
                {
                    SetSetting(key, value[1]);
                }
            }
        }