Exemple #1
0
        private void OptionsScreen_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (this.DialogResult == DialogResult.Cancel)
            {
                SelectedOptions = m_InitialOpts;
            }
            else
            {
                SelectedOptions                         = new Options();
                SelectedOptions.CodeXLPath              = txtCodeXL.Text;
                SelectedOptions.D3DCompilerPath         = txtD3DCompiler.Text;
                SelectedOptions.TempPath                = txtTemp.Text;
                SelectedOptions.PowerVRCompilerPath     = txtPowerVR.Text;
                SelectedOptions.DXXDriverPath           = txtDXX.Text;
                SelectedOptions.MaliSCRoot              = txtMali.Text;
                SelectedOptions.RGAPath                 = txtRGA.Text;
                SelectedOptions.DXILCompilerPath        = txtDXIL.Text;
                SelectedOptions.IntelShaderAnalyzerPath = txtIntelShaderAnalyzer.Text;

                for (int backendIndex = 0; backendIndex < lstBackends.Items.Count; backendIndex++)
                {
                    if (!lstBackends.GetItemChecked(backendIndex))
                    {
                        SelectedOptions.DisableBackend(lstBackends.Items[backendIndex].ToString());
                    }
                }

                for (int amdAsicIndex = 0; amdAsicIndex < lstAMDAsics.Items.Count; amdAsicIndex++)
                {
                    if (!lstAMDAsics.GetItemChecked(amdAsicIndex))
                    {
                        SelectedOptions.DisableAMDAsic(lstAMDAsics.Items[amdAsicIndex].ToString());
                    }
                }

                for (int codeXLAsicIndex = 0; codeXLAsicIndex < lstCodeXLAsics.Items.Count; codeXLAsicIndex++)
                {
                    if (!lstCodeXLAsics.GetItemChecked(codeXLAsicIndex))
                    {
                        SelectedOptions.DisableCodeXLAsic(lstCodeXLAsics.Items[codeXLAsicIndex].ToString());
                    }
                }

                for (int i = 0; i < lstRGAAsics.Items.Count; i++)
                {
                    if (!lstRGAAsics.GetItemChecked(i))
                    {
                        SelectedOptions.DisableRGAAsic(lstRGAAsics.Items[i].ToString());
                    }
                }

                foreach (string s in lstIncludes.Items)
                {
                    SelectedOptions.AddInclude(s);
                }
            }
        }
        private void OptionsScreen_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (this.DialogResult == DialogResult.Cancel)
            {
                SelectedOptions = m_InitialOpts;
            }
            else
            {
                SelectedOptions                     = new Options();
                SelectedOptions.CodeXLPath          = txtCodeXL.Text;
                SelectedOptions.D3DCompilerPath     = txtD3DCompiler.Text;
                SelectedOptions.TempPath            = txtTemp.Text;
                SelectedOptions.PowerVRCompilerPath = txtPowerVR.Text;
                SelectedOptions.DXXDriverPath       = txtDXX.Text;
                SelectedOptions.MaliSCRoot          = txtMali.Text;
                SelectedOptions.MysteryToolPath     = txtMystery.Text;

                for (int backendIndex = 0; backendIndex < lstBackends.Items.Count; backendIndex++)
                {
                    if (!lstBackends.GetItemChecked(backendIndex))
                    {
                        SelectedOptions.DisableBackend(lstBackends.Items[backendIndex].ToString());
                    }
                }

                for (int amdAsicIndex = 0; amdAsicIndex < lstAMDAsics.Items.Count; amdAsicIndex++)
                {
                    if (!lstAMDAsics.GetItemChecked(amdAsicIndex))
                    {
                        SelectedOptions.DisableAMDAsic(lstAMDAsics.Items[amdAsicIndex].ToString());
                    }
                }

                for (int codeXLAsicIndex = 0; codeXLAsicIndex < lstCodeXLAsics.Items.Count; codeXLAsicIndex++)
                {
                    if (!lstCodeXLAsics.GetItemChecked(codeXLAsicIndex))
                    {
                        SelectedOptions.DisableCodeXLAsic(lstCodeXLAsics.Items[codeXLAsicIndex].ToString());
                    }
                }
            }
        }
Exemple #3
0
        private void OptionsScreen_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (this.DialogResult == DialogResult.Cancel)
            {
                SelectedOptions = m_InitialOpts;
            }
            else
            {
                SelectedOptions = new Options();
                SelectedOptions.CodeXLPath = txtCodeXL.Text;
                SelectedOptions.D3DCompilerPath = txtD3DCompiler.Text;
                SelectedOptions.TempPath = txtTemp.Text;
                SelectedOptions.PowerVRCompilerPath = txtPowerVR.Text;
                SelectedOptions.DXXDriverPath = txtDXX.Text;
                SelectedOptions.MaliSCRoot = txtMali.Text ;

                for (int backendIndex = 0; backendIndex < lstBackends.Items.Count; backendIndex++)
                {
                    if (!lstBackends.GetItemChecked(backendIndex))
                        SelectedOptions.DisableBackend(lstBackends.Items[backendIndex].ToString());
                }

                for (int amdAsicIndex = 0; amdAsicIndex < lstAMDAsics.Items.Count; amdAsicIndex++)
                {
                    if (!lstAMDAsics.GetItemChecked(amdAsicIndex))
                    {
                        SelectedOptions.DisableAMDAsic(lstAMDAsics.Items[amdAsicIndex].ToString());
                    }
                }

                for (int codeXLAsicIndex = 0; codeXLAsicIndex < lstCodeXLAsics.Items.Count; codeXLAsicIndex++)
                {
                    if (!lstCodeXLAsics.GetItemChecked(codeXLAsicIndex))
                    {
                        SelectedOptions.DisableCodeXLAsic(lstCodeXLAsics.Items[codeXLAsicIndex].ToString());
                    }
                }
            }
        }