Esempio n. 1
0
        public static void ApplyThemeToStream(Stream stream, bool reverse = false)
        {
            IsReverseMode = reverse;

            if (stream != null)
            {
                OnPatchStart?.Invoke(null, EventArgs.Empty);

                ChangeThemeByte(stream);

                stream.Dispose();
            }
        }
Esempio n. 2
0
        static void ChangeThemeByte(Stream stream)
        {
            if (ThemeByteOffset != -1)
            {
                OnPatchStart?.Invoke(null, EventArgs.Empty);

                stream.Position = ThemeByteOffset;
                stream.WriteByte(IsReverseMode ? LightByte : DarkByte);

                OnComplete?.Invoke(null, IsReverseMode);
            }
            else
            {
                throw new OffsetNotFoundException();
            }
        }