public void LaunchHalo() { try { new Eula().Inject(); Halo haloInstace = new XmlSerialisation <Halo>().GetDeserialisedInstance("Halo_Settings.User.xml"); new Launch(haloInstace).Start(); } catch (FileNotFoundException) { MessageBox.Show("Hmmm, seems like there is no haloce.exe here."); } catch (IOException) { MessageBox.Show("Cannot inject EULA. Please run as an administrator!"); } }
public void SaveConfiguration() { OpenSauce openSauce = new OpenSauce { Camera = new Camera { FieldOfView = FieldOfView, IgnoreFovChangeInCinematics = IsCinematicsFovIgnored, IgnoreFovChangeInMainMenu = IsMenuFovIgnored }, Rasterizer = new Rasterizer { ShaderExtensions = new ShaderExtensions { IsEnabled = UseShader, ShaderObject = new ShaderObject { IsDetailNormalMaps = UseDetailMaps, IsNormalMaps = UseNormalMaps, IsSpecularLighting = UseSpecularLighting, IsSpecularMaps = UseSpecularMaps }, Environment = new Environment { DiffuseDirectionalLightmaps = IsDiffuseDirectionalLightMaps, SpecularDirectionalLightmaps = IsSpecularDirectionalLightMaps }, Effect = new Effect { IsDepthFadeEnabled = UseDepthFade } }, PostProcessing = new PostProcessing { MotionBlur = new MotionBlur { IsEnabled = UseMotionBlur }, Bloom = new Bloom { IsEnabled = UseBloom }, AntiAliasing = new AntiAliasing { IsEnabled = UseAntiAliasing }, ExternalEffects = new ExternalEffects { IsEnabled = UseExternalEffects }, MapEffects = new MapEffects { IsEnabled = UseMapEffects } } } }; XmlSerialisation <OpenSauce> osXmlSerialisation = new XmlSerialisation <OpenSauce>(); osXmlSerialisation.SerialiseNewXml(openSauce, _osXml.GetConfigurationFilename()); }
public void GetConfiguration() { XmlSerialisation <Halo> haloXmlSerialisation = new XmlSerialisation <Halo>(); if (!File.Exists(_haloXml.GetConfigurationFilename())) { haloXmlSerialisation.SerialiseNewXml(new Halo(), _haloXml.GetConfigurationFilename()); } Halo deserialisedHalo = haloXmlSerialisation.GetDeserialisedInstance(_haloXml.GetConfigurationFilename()); GetValuesFromInstance(deserialisedHalo); }
public void GetConfiguration() { XmlSerialisation <OpenSauce> osXmlSerialisation = new XmlSerialisation <OpenSauce>(); if (!File.Exists(_osXml.GetConfigurationFilename())) { _osXml.CreateConfigurationDirectory(); osXmlSerialisation.SerialiseNewXml(new OpenSauce(), _osXml.GetConfigurationFilename()); } OpenSauce deserialisedOpenSauce = osXmlSerialisation.GetDeserialisedInstance(_osXml.GetConfigurationFilename()); GetValuesFromInstance(deserialisedOpenSauce); }
public void SaveConfiguration() { Halo halo = new Halo { VideoResolution = new VideoResolution { Width = SelectedVideoResolution.Width, Height = SelectedVideoResolution.Height }, VideoRefreshRate = new VideoRefreshRate { Rate = SelectedVideoRefreshRate.Rate }, VideoAdapter = new VideoAdapter { Index = SelectedAdapterIndex + 1 }, IsWindow = IsWindow, IsSafeMode = IsSafeMode, IsFixedMode = IsFixedMode }; XmlSerialisation <Halo> haloXmlSerialisation = new XmlSerialisation <Halo>(); haloXmlSerialisation.SerialiseNewXml(halo, _haloXml.GetConfigurationFilename()); }