コード例 #1
0
        private void Reload()
        {
            var gcMain     = GraphicsConfig.FromFile(_mainFile.FullName);
            var gcOverride = GraphicsConfig.FromFile(_overrideFile.FullName);

            if (gcMain == null)
            {
                return;
            }

            if (gcOverride == null && _overrideFile.Exists)
            {
                return;
            }

            gcMain.OverrideWith(gcOverride);

            Changed?.Invoke(this, gcMain);
        }
コード例 #2
0
        private void Reload()
        {
            var gcMain = FileOperations.RetryIfNull(
                () => GraphicsConfig.FromFile(_mainFile.FullName),
                _reloadRetries);

            var gcOverride = FileOperations.RetryIfNull(
                () => GraphicsConfig.FromFile(_overrideFile.FullName),
                _reloadRetries);

            if (gcMain == null)
            {
                return;
            }

            if (gcOverride != null)
            {
                gcMain.OverrideWith(gcOverride);
            }

            Changed?.Invoke(this, gcMain);
        }
コード例 #3
0
ファイル: GraphicsConfig.cs プロジェクト: poveden/EliteChroma
 /// <summary>
 /// Updates this instance with values from another graphics configuration instance.
 /// </summary>
 /// <param name="other">The graphics configuration to override this instance with.</param>
 /// <remarks>
 /// Currently, only <c>GUIColour</c> settings are overriden.
 /// </remarks>
 public void OverrideWith(GraphicsConfig other)
 {
     GuiColour.OverrideWith(other?.GuiColour);
 }