Пример #1
0
        private void InitializeTabLaunch()
        {
            try
            {
                SelectedRenderApiParam = RenderApiParams.First(x => x.Key == RegistrySaver.ReadStringValue(RegistrySaver.RegCategoryParamsList, RegistrySaver.RegParamsRenderApiName));
            }
            catch (Exception)
            {
                SelectedRenderApiParam = RenderApiParams.SingleOrDefault(x => x.Key == "DirectX 11");
            }

            try
            {
                SelectedRenderModeParam = RenderModeParams.First(x => x.Key == RegistrySaver.ReadStringValue(RegistrySaver.RegCategoryParamsList, RegistrySaver.RegParamsRenderModeName));
            }
            catch (Exception)
            {
                SelectedRenderApiParam = RenderModeParams.SingleOrDefault(x => x.Key == "Mono");
            }

            CustomCommonParams   = RegistrySaver.ReadStringValue(RegistrySaver.RegCategoryParamsList, RegistrySaver.RegParamsAdditionalParamsName);
            IsUseAllCores        = RegistrySaver.ReadBoolValue(RegistrySaver.RegCategoryParamsList, RegistrySaver.RegParamsIsAllCoresName);
            IsNotextureStreaming = RegistrySaver.ReadBoolValue(RegistrySaver.RegCategoryParamsList, RegistrySaver.RegParamsIsNoTexStreamingName);

            Applications = RegistrySaver.ReadStringsFromRegistry(RegistrySaver.RegCategoryAppList);
            SetSelectedApp();

            Configs = RegistrySaver.ReadStringsFromRegistry(RegistrySaver.RegCategoryConfigList);
            SetSelectedConfig();
        }
Пример #2
0
        private void InitializeOptions()
        {
            try
            {
                SelectedRenderApiParam = RenderApiParams.First(x => x.Key == RegistrySaver.ReadStringValue(RegistrySaver.RegParamsList, RegistrySaver.RegRenderApiName));
            }
            catch (Exception)
            {
                SelectedRenderApiParam = RenderApiParams.SingleOrDefault(x => x.Key == "OpenGL3");
            }

            try
            {
                SelectedRenderModeParam = RenderModeParams.First(x => x.Key == RegistrySaver.ReadStringValue(RegistrySaver.RegParamsList, RegistrySaver.RegRenderModeName));
            }
            catch (Exception)
            {
                SelectedRenderApiParam = RenderModeParams.SingleOrDefault(x => x.Key == "Mono");
            }

            CustomCommonParams   = RegistrySaver.ReadStringValue(RegistrySaver.RegParamsList, RegistrySaver.RegAdditionalParamsName);
            IsUseAllCores        = RegistrySaver.ReadBoolValue(RegistrySaver.RegParamsList, RegistrySaver.RegIsAllCoresName);
            IsNotextureStreaming = RegistrySaver.ReadBoolValue(RegistrySaver.RegParamsList, RegistrySaver.RegIsNoTextureStreamingName);
            AppLogger.Add("Application Options initialized");
        }