示例#1
0
        static void Main(String[] args)
        {
            Program.args           = args;
            Program.adapterIndexes = new List <int>();

            //Change this to true if you card is not in the list.
            //You can also add the parameter "/overwriteSecurityChecks"
            overwriteSecurityChecks = false;

            for (int i = 0; i < args.Length; i++)
            {
                if (args[i].Equals("overwriteSecurityChecks"))
                {
                    overwriteSecurityChecks = true;
                }
            }

            int gpuCountNda = 0;

            if (_NDA.NDA_Initialize())
            {
                bool canGetGpuCount = _NDA.NDA_GetGPUCounts(out gpuCountNda);
                if (canGetGpuCount == false)
                {
                    return;
                }
                if (gpuCountNda > 0 && InitializeNvidiaAdapters(gpuCountNda))
                {
                    manufacturer = Manufacturer.Nvidia;
                }
            }


            if (gpuCountNda == 0 && _ADL.ADL_Initialize())
            {
                int  gpuCountAdl;
                bool canGetGpuCount = _ADL.ADL_GetGPUCounts(out gpuCountAdl);
                if (canGetGpuCount == false)
                {
                    return;
                }
                if (gpuCountAdl > 0 && InitializeAmdAdapters(gpuCountAdl))
                {
                    manufacturer = Manufacturer.AMD;
                }
            }


            ledManager = new LedManager_Common(manufacturer, animationType);
            ledManager.InitLedManagers();
            ledManager.StartAll();
            ledManager.UpdateAll(ledColor, animationType);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());


            ledManager.StopAll();
        }
示例#2
0
        static void Main()
        {
            Program.adapterIndexes          = new List <int>();
            Program.overwriteSecurityChecks = false;

            if (_ADL.ADL_Initialize())
            {
                int  gpuCountAdl;
                bool canGetGpuCount = _ADL.ADL_GetGPUCounts(out gpuCountAdl);
                if (canGetGpuCount == false)
                {
                    return;
                }

                if (gpuCountAdl > 0 && InitializeAmdAdapters(gpuCountAdl))
                {
                    manufacturer = Manufacturer.AMD;
                }
            }
            else
            {
                return;
            }


            ledManager = new LedManager_Common(manufacturer, animationType);
            ledManager.InitLedManagers();
            ledManager.StartAll();
            ledManager.UpdateAll(ledColor, animationType);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());


            ledManager.StopAll();
        }
示例#3
0
        static void Main(String[] args)
        {
            if (Properties.Settings.Default["Color"] is Color)
            {
                Program.ledColor = (Color)Properties.Settings.Default["Color"];
            }

            if (Properties.Settings.Default["Mode"] is int)
            {
                Program.animationType = (AnimationType)Properties.Settings.Default["Mode"];
            }

            if (Properties.Settings.Default["TempMin"] is int)
            {
                Program.tempMin = (int)Properties.Settings.Default["TempMin"];
            }

            if (Properties.Settings.Default["TempMax"] is int)
            {
                Program.tempMax = (int)Properties.Settings.Default["TempMax"];
            }

            Program.args           = args;
            Program.adapterIndexes = new List <int>();
            //DO NOT MODIFY HERE. USE PARAMETER !!
            //You can also add the parameter "/overwriteSecurityChecks"
            overwriteSecurityChecks = false;
            for (int i = 0; i < args.Length; i++)
            {
                if (args[i].Equals("overwriteSecurityChecks"))
                {
                    overwriteSecurityChecks = true;
                }
                else if (args[i].Equals("updateAll"))
                {
                    updateAll = true;
                }
            }

            int gpuCountNda = 0;

            if (_NDA.NDA_Initialize())
            {
                bool canGetGpuCount = _NDA.NDA_GetGPUCounts(out gpuCountNda);
                if (canGetGpuCount == false)
                {
                    return;
                }
                if (gpuCountNda > 0 && InitializeNvidiaAdapters(gpuCountNda))
                {
                    manufacturer = Manufacturer.Nvidia;
                }
            }


            if (gpuCountNda == 0 && _ADL.ADL_Initialize())
            {
                int  gpuCountAdl;
                bool canGetGpuCount = _ADL.ADL_GetGPUCounts(out gpuCountAdl);
                if (canGetGpuCount == false)
                {
                    return;
                }
                if (gpuCountAdl > 0 && InitializeAmdAdapters(gpuCountAdl))
                {
                    manufacturer = Manufacturer.AMD;
                }
            }


            ledManager = new LedManager_Common(manufacturer, animationType);
            ledManager.InitLedManagers();
            ledManager.StartAll();
            ledManager.UpdateAll(ledColor, animationType, tempMin, tempMax);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1(updateAll));

            ledManager.StopAll();
        }