Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Drawing;
- using System.Drawing.Drawing2D;
- using System.Drawing.Imaging;
- using System.IO;
- using System.Windows.Forms;
- using Microsoft.VisualBasic.CompilerServices;
- using System.Collections;
- using System.Runtime.CompilerServices;
- using System.Runtime.InteropServices;
- using System.Drawing.Text;
- namespace WinterTheme
- {
- internal abstract class ThemeContainer154 : ContainerControl
- {
- public ThemeContainer154()
- {
- this.Messages = new Message[9];
- this._SmartBounds = true;
- this._Movable = true;
- this._Sizable = true;
- this.Items = new Dictionary<string, Color>();
- this._Header = 24;
- this.SetStyle(ControlStyles.UserPaint | ControlStyles.Opaque | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
- this._ImageSize = Size.Empty;
- this.Font = new Font("Verdana", 8f);
- this.MeasureBitmap = new Bitmap(1, 1);
- this.MeasureGraphics = Graphics.FromImage(this.MeasureBitmap);
- this.DrawRadialPath = new GraphicsPath();
- this.InvalidateCustimization();
- }
- protected sealed override void OnHandleCreated(EventArgs e)
- {
- bool flag = this.DoneCreation;
- if (flag)
- {
- this.InitializeMessages();
- }
- this.InvalidateCustimization();
- this.ColorHook();
- flag = (this._LockWidth != 0);
- if (flag)
- {
- this.Width = this._LockWidth;
- }
- flag = (this._LockHeight != 0);
- if (flag)
- {
- this.Height = this._LockHeight;
- }
- flag = !this._ControlMode;
- if (flag)
- {
- base.Dock = DockStyle.Fill;
- }
- this.Transparent = this._Transparent;
- flag = (this._Transparent && this._BackColor);
- if (flag)
- {
- this.BackColor = Color.Transparent;
- }
- base.OnHandleCreated(e);
- }
- // Token: 0x06000013 RID: 19 RVA: 0x0000243C File Offset: 0x0000083C
- protected sealed override void OnParentChanged(EventArgs e)
- {
- base.OnParentChanged(e);
- bool flag = this.Parent == null;
- if (!flag)
- {
- this._IsParentForm = (this.Parent is Form);
- flag = !this._ControlMode;
- if (flag)
- {
- this.InitializeMessages();
- flag = this._IsParentForm;
- if (flag)
- {
- this.ParentForm.FormBorderStyle = this._BorderStyle;
- this.ParentForm.TransparencyKey = this._TransparencyKey;
- flag = !this.DesignMode;
- if (flag)
- {
- this.ParentForm.Shown += new EventHandler(this.FormShown);
- }
- }
- this.Parent.BackColor = this.BackColor;
- }
- this.OnCreation();
- this.DoneCreation = true;
- this.InvalidateTimer();
- }
- }
- // Token: 0x06000014 RID: 20 RVA: 0x0000250C File Offset: 0x0000090C
- private void DoAnimation(bool i)
- {
- this.OnAnimation();
- if (i)
- {
- this.Invalidate();
- }
- }
- // Token: 0x06000015 RID: 21 RVA: 0x00002530 File Offset: 0x00000930
- protected sealed override void OnPaint(PaintEventArgs e)
- {
- bool flag = this.Width == 0 || this.Height == 0;
- if (!flag)
- {
- flag = (this._Transparent && this._ControlMode);
- if (flag)
- {
- this.PaintHook();
- e.Graphics.DrawImage(this.B, 0, 0);
- }
- else
- {
- this.G = e.Graphics;
- this.PaintHook();
- }
- }
- }
- // Token: 0x06000016 RID: 22 RVA: 0x000025A8 File Offset: 0x000009A8
- protected override void OnHandleDestroyed(EventArgs e)
- {
- ThemeShare.RemoveAnimationCallback(new ThemeShare.AnimationDelegate(this.DoAnimation));
- base.OnHandleDestroyed(e);
- }
- // Token: 0x06000017 RID: 23 RVA: 0x000025C8 File Offset: 0x000009C8
- private void FormShown(object sender, EventArgs e)
- {
- bool flag = this._ControlMode || this.HasShown;
- if (!flag)
- {
- flag = (this._StartPosition == FormStartPosition.CenterParent || this._StartPosition == FormStartPosition.CenterScreen);
- if (flag)
- {
- Rectangle bounds = Screen.PrimaryScreen.Bounds;
- Rectangle bounds2 = this.ParentForm.Bounds;
- Form arg_88_0 = this.ParentForm;
- Point location = checked(new Point(bounds.Width / 2 - bounds2.Width / 2, bounds.Height / 2 - bounds2.Width / 2));
- arg_88_0.Location = location;
- }
- this.HasShown = true;
- }
- }
- // Token: 0x06000018 RID: 24 RVA: 0x0000266C File Offset: 0x00000A6C
- protected sealed override void OnSizeChanged(EventArgs e)
- {
- bool flag = this._Movable && !this._ControlMode;
- if (flag)
- {
- this.Frame = checked(new Rectangle(7, 7, this.Width - 14, this._Header - 7));
- }
- this.InvalidateBitmap();
- this.Invalidate();
- base.OnSizeChanged(e);
- }
- // Token: 0x06000019 RID: 25 RVA: 0x000026CC File Offset: 0x00000ACC
- protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
- {
- bool flag = this._LockWidth != 0;
- if (flag)
- {
- width = this._LockWidth;
- }
- flag = (this._LockHeight != 0);
- if (flag)
- {
- height = this._LockHeight;
- }
- base.SetBoundsCore(x, y, width, height, specified);
- }
- // Token: 0x0600001A RID: 26 RVA: 0x0000271C File Offset: 0x00000B1C
- private void SetState(MouseState current)
- {
- this.State = current;
- this.Invalidate();
- }
- // Token: 0x0600001B RID: 27 RVA: 0x00002730 File Offset: 0x00000B30
- protected override void OnMouseMove(MouseEventArgs e)
- {
- bool flag = !this._IsParentForm || this.ParentForm.WindowState != FormWindowState.Maximized;
- if (flag)
- {
- bool flag2 = this._Sizable && !this._ControlMode;
- if (flag2)
- {
- this.InvalidateMouse();
- }
- }
- base.OnMouseMove(e);
- }
- // Token: 0x0600001C RID: 28 RVA: 0x00002788 File Offset: 0x00000B88
- protected override void OnEnabledChanged(EventArgs e)
- {
- bool enabled = this.Enabled;
- if (enabled)
- {
- this.SetState(MouseState.None);
- }
- else
- {
- this.SetState(MouseState.Block);
- }
- base.OnEnabledChanged(e);
- }
- // Token: 0x0600001D RID: 29 RVA: 0x000027BC File Offset: 0x00000BBC
- protected override void OnMouseEnter(EventArgs e)
- {
- this.SetState(MouseState.Over);
- base.OnMouseEnter(e);
- }
- // Token: 0x0600001E RID: 30 RVA: 0x000027D0 File Offset: 0x00000BD0
- protected override void OnMouseUp(MouseEventArgs e)
- {
- this.SetState(MouseState.Over);
- base.OnMouseUp(e);
- }
- // Token: 0x0600001F RID: 31 RVA: 0x000027E4 File Offset: 0x00000BE4
- protected override void OnMouseLeave(EventArgs e)
- {
- this.SetState(MouseState.None);
- bool flag = this.GetChildAtPoint(this.PointToClient(Control.MousePosition)) != null;
- if (flag)
- {
- bool flag2 = this._Sizable && !this._ControlMode;
- if (flag2)
- {
- this.Cursor = Cursors.Default;
- this.Previous = 0;
- }
- }
- base.OnMouseLeave(e);
- }
- // Token: 0x06000020 RID: 32 RVA: 0x0000284C File Offset: 0x00000C4C
- protected override void OnMouseDown(MouseEventArgs e)
- {
- bool flag = e.Button == MouseButtons.Left;
- if (flag)
- {
- this.SetState(MouseState.Down);
- }
- flag = ((!this._IsParentForm || this.ParentForm.WindowState != FormWindowState.Maximized) && !this._ControlMode);
- if (flag)
- {
- bool flag2 = this._Movable && this.Frame.Contains(e.Location);
- if (flag2)
- {
- this.Capture = false;
- this.WM_LMBUTTONDOWN = true;
- this.DefWndProc(ref this.Messages[0]);
- }
- else
- {
- flag2 = (this._Sizable && this.Previous != 0);
- if (flag2)
- {
- this.Capture = false;
- this.WM_LMBUTTONDOWN = true;
- this.DefWndProc(ref this.Messages[this.Previous]);
- }
- }
- }
- base.OnMouseDown(e);
- }
- // Token: 0x06000021 RID: 33 RVA: 0x00002934 File Offset: 0x00000D34
- protected override void WndProc(ref Message m)
- {
- base.WndProc(ref m);
- bool flag = this.WM_LMBUTTONDOWN && m.Msg == 513;
- if (flag)
- {
- this.WM_LMBUTTONDOWN = false;
- this.SetState(MouseState.Over);
- flag = !this._SmartBounds;
- if (!flag)
- {
- flag = this.IsParentMdi;
- if (flag)
- {
- Rectangle bounds = new Rectangle(Point.Empty, this.Parent.Parent.Size);
- this.CorrectBounds(bounds);
- }
- else
- {
- this.CorrectBounds(Screen.FromControl(this.Parent).WorkingArea);
- }
- }
- }
- }
- // Token: 0x06000022 RID: 34 RVA: 0x000029D4 File Offset: 0x00000DD4
- private int GetIndex()
- {
- this.GetIndexPoint = this.PointToClient(Control.MousePosition);
- this.B1 = (this.GetIndexPoint.X < 7);
- checked
- {
- this.B2 = (this.GetIndexPoint.X > this.Width - 7);
- this.B3 = (this.GetIndexPoint.Y < 7);
- this.B4 = (this.GetIndexPoint.Y > this.Height - 7);
- bool flag = this.B1 && this.B3;
- int result;
- if (flag)
- {
- result = 4;
- }
- else
- {
- flag = (this.B1 && this.B4);
- if (flag)
- {
- result = 7;
- }
- else
- {
- flag = (this.B2 && this.B3);
- if (flag)
- {
- result = 5;
- }
- else
- {
- flag = (this.B2 && this.B4);
- if (flag)
- {
- result = 8;
- }
- else
- {
- flag = this.B1;
- if (flag)
- {
- result = 1;
- }
- else
- {
- flag = this.B2;
- if (flag)
- {
- result = 2;
- }
- else
- {
- flag = this.B3;
- if (flag)
- {
- result = 3;
- }
- else
- {
- flag = this.B4;
- if (flag)
- {
- result = 6;
- }
- else
- {
- result = 0;
- }
- }
- }
- }
- }
- }
- }
- }
- return result;
- }
- }
- // Token: 0x06000023 RID: 35 RVA: 0x00002B08 File Offset: 0x00000F08
- private void InvalidateMouse()
- {
- this.Current = this.GetIndex();
- bool flag = this.Current == this.Previous;
- if (!flag)
- {
- this.Previous = this.Current;
- switch (this.Previous)
- {
- case 0:
- this.Cursor = Cursors.Default;
- break;
- case 1:
- case 2:
- this.Cursor = Cursors.SizeWE;
- break;
- case 3:
- case 6:
- this.Cursor = Cursors.SizeNS;
- break;
- case 4:
- case 8:
- this.Cursor = Cursors.SizeNWSE;
- break;
- case 5:
- case 7:
- this.Cursor = Cursors.SizeNESW;
- break;
- }
- }
- }
- // Token: 0x06000024 RID: 36 RVA: 0x00002BC8 File Offset: 0x00000FC8
- private void InitializeMessages()
- {
- Message[] arg_31_0_cp_0 = this.Messages;
- int arg_31_0_cp_1 = 0;
- IntPtr arg_2C_0 = this.Parent.Handle;
- int arg_2C_1 = 161;
- IntPtr wparam = new IntPtr(2);
- arg_31_0_cp_0[arg_31_0_cp_1] = Message.Create(arg_2C_0, arg_2C_1, wparam, IntPtr.Zero);
- int num = 1;
- checked
- {
- int arg_79_0;
- int num2;
- do
- {
- Message[] arg_6B_0_cp_0 = this.Messages;
- int arg_6B_0_cp_1 = num;
- IntPtr arg_66_0 = this.Parent.Handle;
- int arg_66_1 = 161;
- wparam = new IntPtr(num + 9);
- arg_6B_0_cp_0[arg_6B_0_cp_1] = Message.Create(arg_66_0, arg_66_1, wparam, IntPtr.Zero);
- num++;
- arg_79_0 = num;
- num2 = 8;
- }
- while (arg_79_0 <= num2);
- }
- }
- // Token: 0x06000025 RID: 37 RVA: 0x00002C54 File Offset: 0x00001054
- private void CorrectBounds(Rectangle bounds)
- {
- bool flag = this.Parent.Width > bounds.Width;
- if (flag)
- {
- this.Parent.Width = bounds.Width;
- }
- flag = (this.Parent.Height > bounds.Height);
- if (flag)
- {
- this.Parent.Height = bounds.Height;
- }
- int num = this.Parent.Location.X;
- Point location = this.Parent.Location;
- int num2 = location.Y;
- flag = (num < bounds.X);
- if (flag)
- {
- num = bounds.X;
- }
- flag = (num2 < bounds.Y);
- if (flag)
- {
- num2 = bounds.Y;
- }
- checked
- {
- int num3 = bounds.X + bounds.Width;
- int num4 = bounds.Y + bounds.Height;
- flag = (num + this.Parent.Width > num3);
- if (flag)
- {
- num = num3 - this.Parent.Width;
- }
- flag = (num2 + this.Parent.Height > num4);
- if (flag)
- {
- num2 = num4 - this.Parent.Height;
- }
- Control arg_12F_0 = this.Parent;
- location = new Point(num, num2);
- arg_12F_0.Location = location;
- }
- }
- // Token: 0x17000006 RID: 6
- // (get) Token: 0x06000026 RID: 38 RVA: 0x00002D98 File Offset: 0x00001198
- // (set) Token: 0x06000027 RID: 39 RVA: 0x00002DB0 File Offset: 0x000011B0
- public override DockStyle Dock
- {
- get
- {
- return base.Dock;
- }
- set
- {
- bool flag = !this._ControlMode;
- if (!flag)
- {
- base.Dock = value;
- }
- }
- }
- // Token: 0x17000007 RID: 7
- // (get) Token: 0x06000028 RID: 40 RVA: 0x00002DD8 File Offset: 0x000011D8
- // (set) Token: 0x06000029 RID: 41 RVA: 0x00002DF0 File Offset: 0x000011F0
- [Category("Misc")]
- public override Color BackColor
- {
- get
- {
- return base.BackColor;
- }
- set
- {
- bool flag = value == base.BackColor;
- if (!flag)
- {
- flag = (!this.IsHandleCreated && this._ControlMode && value == Color.Transparent);
- if (flag)
- {
- this._BackColor = true;
- }
- else
- {
- base.BackColor = value;
- flag = (this.Parent != null);
- if (flag)
- {
- bool flag2 = !this._ControlMode;
- if (flag2)
- {
- this.Parent.BackColor = value;
- }
- this.ColorHook();
- }
- }
- }
- }
- }
- // Token: 0x17000008 RID: 8
- // (get) Token: 0x0600002A RID: 42 RVA: 0x00002E80 File Offset: 0x00001280
- // (set) Token: 0x0600002B RID: 43 RVA: 0x00002E98 File Offset: 0x00001298
- public override Size MinimumSize
- {
- get
- {
- return base.MinimumSize;
- }
- set
- {
- base.MinimumSize = value;
- bool flag = this.Parent != null;
- if (flag)
- {
- this.Parent.MinimumSize = value;
- }
- }
- }
- // Token: 0x17000009 RID: 9
- // (get) Token: 0x0600002C RID: 44 RVA: 0x00002ECC File Offset: 0x000012CC
- // (set) Token: 0x0600002D RID: 45 RVA: 0x00002EE4 File Offset: 0x000012E4
- public override Size MaximumSize
- {
- get
- {
- return base.MaximumSize;
- }
- set
- {
- base.MaximumSize = value;
- bool flag = this.Parent != null;
- if (flag)
- {
- this.Parent.MaximumSize = value;
- }
- }
- }
- // Token: 0x1700000A RID: 10
- // (get) Token: 0x0600002E RID: 46 RVA: 0x00002F18 File Offset: 0x00001318
- // (set) Token: 0x0600002F RID: 47 RVA: 0x00002F30 File Offset: 0x00001330
- public override string Text
- {
- get
- {
- return base.Text;
- }
- set
- {
- base.Text = value;
- this.Invalidate();
- }
- }
- // Token: 0x1700000B RID: 11
- // (get) Token: 0x06000030 RID: 48 RVA: 0x00002F44 File Offset: 0x00001344
- // (set) Token: 0x06000031 RID: 49 RVA: 0x00002F5C File Offset: 0x0000135C
- public override Font Font
- {
- get
- {
- return base.Font;
- }
- set
- {
- base.Font = value;
- this.Invalidate();
- }
- }
- // Token: 0x1700000C RID: 12
- // (get) Token: 0x06000032 RID: 50 RVA: 0x00002F70 File Offset: 0x00001370
- // (set) Token: 0x06000033 RID: 51 RVA: 0x00002F88 File Offset: 0x00001388
- [EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false)]
- public override Color ForeColor
- {
- get
- {
- return Color.Empty;
- }
- set
- {
- }
- }
- // Token: 0x1700000D RID: 13
- // (get) Token: 0x06000034 RID: 52 RVA: 0x00002F8C File Offset: 0x0000138C
- // (set) Token: 0x06000035 RID: 53 RVA: 0x00002FA0 File Offset: 0x000013A0
- [Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- public override Image BackgroundImage
- {
- get
- {
- return null;
- }
- set
- {
- }
- }
- // Token: 0x1700000E RID: 14
- // (get) Token: 0x06000036 RID: 54 RVA: 0x00002FA4 File Offset: 0x000013A4
- // (set) Token: 0x06000037 RID: 55 RVA: 0x00002FB8 File Offset: 0x000013B8
- [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
- public override ImageLayout BackgroundImageLayout
- {
- get
- {
- return ImageLayout.None;
- }
- set
- {
- }
- }
- // Token: 0x1700000F RID: 15
- // (get) Token: 0x06000038 RID: 56 RVA: 0x00002FBC File Offset: 0x000013BC
- // (set) Token: 0x06000039 RID: 57 RVA: 0x00002FD4 File Offset: 0x000013D4
- public bool SmartBounds
- {
- get
- {
- return this._SmartBounds;
- }
- set
- {
- this._SmartBounds = value;
- }
- }
- // Token: 0x17000010 RID: 16
- // (get) Token: 0x0600003A RID: 58 RVA: 0x00002FE0 File Offset: 0x000013E0
- // (set) Token: 0x0600003B RID: 59 RVA: 0x00002FF8 File Offset: 0x000013F8
- public bool Movable
- {
- get
- {
- return this._Movable;
- }
- set
- {
- this._Movable = value;
- }
- }
- // Token: 0x17000011 RID: 17
- // (get) Token: 0x0600003C RID: 60 RVA: 0x00003004 File Offset: 0x00001404
- // (set) Token: 0x0600003D RID: 61 RVA: 0x0000301C File Offset: 0x0000141C
- public bool Sizable
- {
- get
- {
- return this._Sizable;
- }
- set
- {
- this._Sizable = value;
- }
- }
- // Token: 0x17000012 RID: 18
- // (get) Token: 0x0600003E RID: 62 RVA: 0x00003028 File Offset: 0x00001428
- // (set) Token: 0x0600003F RID: 63 RVA: 0x0000306C File Offset: 0x0000146C
- public Color TransparencyKey
- {
- get
- {
- bool flag = this._IsParentForm && !this._ControlMode;
- Color transparencyKey;
- if (flag)
- {
- transparencyKey = this.ParentForm.TransparencyKey;
- }
- else
- {
- transparencyKey = this._TransparencyKey;
- }
- return transparencyKey;
- }
- set
- {
- bool flag = value == this._TransparencyKey;
- if (!flag)
- {
- this._TransparencyKey = value;
- flag = (this._IsParentForm && !this._ControlMode);
- if (flag)
- {
- this.ParentForm.TransparencyKey = value;
- this.ColorHook();
- }
- }
- }
- }
- // Token: 0x17000013 RID: 19
- // (get) Token: 0x06000040 RID: 64 RVA: 0x000030C4 File Offset: 0x000014C4
- // (set) Token: 0x06000041 RID: 65 RVA: 0x00003108 File Offset: 0x00001508
- public FormBorderStyle BorderStyle
- {
- get
- {
- bool flag = this._IsParentForm && !this._ControlMode;
- FormBorderStyle result;
- if (flag)
- {
- result = this.ParentForm.FormBorderStyle;
- }
- else
- {
- result = this._BorderStyle;
- }
- return result;
- }
- set
- {
- this._BorderStyle = value;
- bool flag = this._IsParentForm && !this._ControlMode;
- if (flag)
- {
- this.ParentForm.FormBorderStyle = value;
- flag = (value != FormBorderStyle.None);
- if (flag)
- {
- this.Movable = false;
- this.Sizable = false;
- }
- }
- }
- }
- // Token: 0x17000014 RID: 20
- // (get) Token: 0x06000042 RID: 66 RVA: 0x00003164 File Offset: 0x00001564
- // (set) Token: 0x06000043 RID: 67 RVA: 0x000031A8 File Offset: 0x000015A8
- public FormStartPosition StartPosition
- {
- get
- {
- bool flag = this._IsParentForm && !this._ControlMode;
- FormStartPosition startPosition;
- if (flag)
- {
- startPosition = this.ParentForm.StartPosition;
- }
- else
- {
- startPosition = this._StartPosition;
- }
- return startPosition;
- }
- set
- {
- this._StartPosition = value;
- bool flag = this._IsParentForm && !this._ControlMode;
- if (flag)
- {
- this.ParentForm.StartPosition = value;
- }
- }
- }
- // Token: 0x17000015 RID: 21
- // (get) Token: 0x06000044 RID: 68 RVA: 0x000031E8 File Offset: 0x000015E8
- // (set) Token: 0x06000045 RID: 69 RVA: 0x00003200 File Offset: 0x00001600
- public bool NoRounding
- {
- get
- {
- return this._NoRounding;
- }
- set
- {
- this._NoRounding = value;
- this.Invalidate();
- }
- }
- // Token: 0x17000016 RID: 22
- // (get) Token: 0x06000046 RID: 70 RVA: 0x00003214 File Offset: 0x00001614
- // (set) Token: 0x06000047 RID: 71 RVA: 0x0000322C File Offset: 0x0000162C
- public Image Image
- {
- get
- {
- return this._Image;
- }
- set
- {
- bool flag = value == null;
- if (flag)
- {
- this._ImageSize = Size.Empty;
- }
- else
- {
- this._ImageSize = value.Size;
- }
- this._Image = value;
- this.Invalidate();
- }
- }
- // Token: 0x17000017 RID: 23
- // (get) Token: 0x06000048 RID: 72 RVA: 0x0000326C File Offset: 0x0000166C
- // (set) Token: 0x06000049 RID: 73 RVA: 0x000032D8 File Offset: 0x000016D8
- public Bloom[] Colors
- {
- get
- {
- List<Bloom> list = new List<Bloom>();
- Dictionary<string, Color>.Enumerator enumerator = this.Items.GetEnumerator();
- while (enumerator.MoveNext())
- {
- List<Bloom> arg_3F_0 = list;
- KeyValuePair<string, Color> current = enumerator.Current;
- string arg_37_1 = current.Key;
- KeyValuePair<string, Color> current2 = enumerator.Current;
- Bloom item = new Bloom(arg_37_1, current2.Value);
- arg_3F_0.Add(item);
- }
- return list.ToArray();
- }
- set
- {
- checked
- {
- for (int i = 0; i < value.Length; i++)
- {
- Bloom bloom = value[i];
- bool flag = this.Items.ContainsKey(bloom.Name);
- if (flag)
- {
- this.Items[bloom.Name] = bloom.Value;
- }
- }
- this.InvalidateCustimization();
- this.ColorHook();
- this.Invalidate();
- }
- }
- }
- // Token: 0x17000018 RID: 24
- // (get) Token: 0x0600004A RID: 74 RVA: 0x00003354 File Offset: 0x00001754
- // (set) Token: 0x0600004B RID: 75 RVA: 0x0000336C File Offset: 0x0000176C
- public string Customization
- {
- get
- {
- return this._Customization;
- }
- set
- {
- bool flag = Operators.CompareString(value, this._Customization, false) == 0;
- checked
- {
- if (!flag)
- {
- Bloom[] colors = this.Colors;
- try
- {
- byte[] value2 = Convert.FromBase64String(value);
- int arg_30_0 = 0;
- int num = colors.Length - 1;
- int num2 = arg_30_0;
- while (true)
- {
- int arg_59_0 = num2;
- int num3 = num;
- if (arg_59_0 > num3)
- {
- break;
- }
- colors[num2].Value = Color.FromArgb(BitConverter.ToInt32(value2, num2 * 4));
- num2++;
- }
- }
- catch (Exception arg_5D_0)
- {
- ProjectData.SetProjectError(arg_5D_0);
- ProjectData.ClearProjectError();
- return;
- }
- this._Customization = value;
- this.Colors = colors;
- this.ColorHook();
- this.Invalidate();
- }
- }
- }
- }
- // Token: 0x17000019 RID: 25
- // (get) Token: 0x0600004C RID: 76 RVA: 0x0000341C File Offset: 0x0000181C
- // (set) Token: 0x0600004D RID: 77 RVA: 0x00003434 File Offset: 0x00001834
- public bool Transparent
- {
- get
- {
- return this._Transparent;
- }
- set
- {
- this._Transparent = value;
- bool flag = !this.IsHandleCreated && !this._ControlMode;
- if (!flag)
- {
- flag = (!value && this.BackColor.A != 255);
- if (flag)
- {
- throw new Exception("Unable to change value to false while a transparent BackColor is in use.");
- }
- this.SetStyle(ControlStyles.Opaque, !value);
- this.SetStyle(ControlStyles.SupportsTransparentBackColor, value);
- this.InvalidateBitmap();
- this.Invalidate();
- }
- }
- }
- // Token: 0x1700001A RID: 26
- // (get) Token: 0x0600004E RID: 78 RVA: 0x000034BC File Offset: 0x000018BC
- protected Size ImageSize
- {
- get
- {
- return this._ImageSize;
- }
- }
- // Token: 0x1700001B RID: 27
- // (get) Token: 0x0600004F RID: 79 RVA: 0x000034D4 File Offset: 0x000018D4
- protected bool IsParentForm
- {
- get
- {
- return this._IsParentForm;
- }
- }
- // Token: 0x1700001C RID: 28
- // (get) Token: 0x06000050 RID: 80 RVA: 0x000034EC File Offset: 0x000018EC
- protected bool IsParentMdi
- {
- get
- {
- bool flag = this.Parent == null;
- return !flag && this.Parent.Parent != null;
- }
- }
- // Token: 0x1700001D RID: 29
- // (get) Token: 0x06000051 RID: 81 RVA: 0x00003520 File Offset: 0x00001920
- // (set) Token: 0x06000052 RID: 82 RVA: 0x00003538 File Offset: 0x00001938
- protected int LockWidth
- {
- get
- {
- return this._LockWidth;
- }
- set
- {
- this._LockWidth = value;
- bool flag = this.LockWidth != 0 && this.IsHandleCreated;
- if (flag)
- {
- this.Width = this.LockWidth;
- }
- }
- }
- // Token: 0x1700001E RID: 30
- // (get) Token: 0x06000053 RID: 83 RVA: 0x00003578 File Offset: 0x00001978
- // (set) Token: 0x06000054 RID: 84 RVA: 0x00003590 File Offset: 0x00001990
- protected int LockHeight
- {
- get
- {
- return this._LockHeight;
- }
- set
- {
- this._LockHeight = value;
- bool flag = this.LockHeight != 0 && this.IsHandleCreated;
- if (flag)
- {
- this.Height = this.LockHeight;
- }
- }
- }
- // Token: 0x1700001F RID: 31
- // (get) Token: 0x06000055 RID: 85 RVA: 0x000035D0 File Offset: 0x000019D0
- // (set) Token: 0x06000056 RID: 86 RVA: 0x000035E8 File Offset: 0x000019E8
- protected int Header
- {
- get
- {
- return this._Header;
- }
- set
- {
- this._Header = value;
- bool flag = !this._ControlMode;
- if (flag)
- {
- this.Frame = checked(new Rectangle(7, 7, this.Width - 14, value - 7));
- this.Invalidate();
- }
- }
- }
- // Token: 0x17000020 RID: 32
- // (get) Token: 0x06000057 RID: 87 RVA: 0x00003630 File Offset: 0x00001A30
- // (set) Token: 0x06000058 RID: 88 RVA: 0x00003648 File Offset: 0x00001A48
- protected bool ControlMode
- {
- get
- {
- return this._ControlMode;
- }
- set
- {
- this._ControlMode = value;
- this.Transparent = this._Transparent;
- bool flag = this._Transparent && this._BackColor;
- if (flag)
- {
- this.BackColor = Color.Transparent;
- }
- this.InvalidateBitmap();
- this.Invalidate();
- }
- }
- // Token: 0x17000021 RID: 33
- // (get) Token: 0x06000059 RID: 89 RVA: 0x000036A0 File Offset: 0x00001AA0
- // (set) Token: 0x0600005A RID: 90 RVA: 0x000036B8 File Offset: 0x00001AB8
- protected bool IsAnimated
- {
- get
- {
- return this._IsAnimated;
- }
- set
- {
- this._IsAnimated = value;
- this.InvalidateTimer();
- }
- }
- // Token: 0x0600005B RID: 91 RVA: 0x000036CC File Offset: 0x00001ACC
- protected Pen GetPen(string name)
- {
- return new Pen(this.Items[name]);
- }
- // Token: 0x0600005C RID: 92 RVA: 0x000036F0 File Offset: 0x00001AF0
- protected Pen GetPen(string name, float width)
- {
- return new Pen(this.Items[name], width);
- }
- // Token: 0x0600005D RID: 93 RVA: 0x00003714 File Offset: 0x00001B14
- protected SolidBrush GetBrush(string name)
- {
- return new SolidBrush(this.Items[name]);
- }
- // Token: 0x0600005E RID: 94 RVA: 0x00003738 File Offset: 0x00001B38
- protected Color GetColor(string name)
- {
- return this.Items[name];
- }
- // Token: 0x0600005F RID: 95 RVA: 0x00003758 File Offset: 0x00001B58
- protected void SetColor(string name, Color value)
- {
- bool flag = this.Items.ContainsKey(name);
- if (flag)
- {
- this.Items[name] = value;
- }
- else
- {
- this.Items.Add(name, value);
- }
- }
- // Token: 0x06000060 RID: 96 RVA: 0x00003798 File Offset: 0x00001B98
- protected void SetColor(string name, byte r, byte g, byte b)
- {
- this.SetColor(name, Color.FromArgb((int)r, (int)g, (int)b));
- }
- // Token: 0x06000061 RID: 97 RVA: 0x000037B0 File Offset: 0x00001BB0
- protected void SetColor(string name, byte a, byte r, byte g, byte b)
- {
- this.SetColor(name, Color.FromArgb((int)a, (int)r, (int)g, (int)b));
- }
- // Token: 0x06000062 RID: 98 RVA: 0x000037C8 File Offset: 0x00001BC8
- protected void SetColor(string name, byte a, Color value)
- {
- this.SetColor(name, Color.FromArgb((int)a, value));
- }
- // Token: 0x06000063 RID: 99 RVA: 0x000037DC File Offset: 0x00001BDC
- private void InvalidateBitmap()
- {
- bool flag = this._Transparent && this._ControlMode;
- if (flag)
- {
- bool flag2 = this.Width == 0 || this.Height == 0;
- if (!flag2)
- {
- this.B = new Bitmap(this.Width, this.Height, PixelFormat.Format32bppPArgb);
- this.G = Graphics.FromImage(this.B);
- }
- }
- else
- {
- this.G = null;
- this.B = null;
- }
- }
- // Token: 0x06000064 RID: 100 RVA: 0x00003864 File Offset: 0x00001C64
- private void InvalidateCustimization()
- {
- checked
- {
- MemoryStream memoryStream = new MemoryStream(this.Items.Count * 4);
- Bloom[] colors = this.Colors;
- for (int i = 0; i < colors.Length; i++)
- {
- Bloom bloom = colors[i];
- memoryStream.Write(BitConverter.GetBytes(bloom.Value.ToArgb()), 0, 4);
- }
- memoryStream.Close();
- this._Customization = Convert.ToBase64String(memoryStream.ToArray());
- }
- }
- // Token: 0x06000065 RID: 101 RVA: 0x000038E8 File Offset: 0x00001CE8
- private void InvalidateTimer()
- {
- bool flag = this.DesignMode || !this.DoneCreation;
- if (!flag)
- {
- flag = this._IsAnimated;
- if (flag)
- {
- ThemeShare.AddAnimationCallback(new ThemeShare.AnimationDelegate(this.DoAnimation));
- }
- else
- {
- ThemeShare.RemoveAnimationCallback(new ThemeShare.AnimationDelegate(this.DoAnimation));
- }
- }
- }
- // Token: 0x06000066 RID: 102
- protected abstract void ColorHook();
- // Token: 0x06000067 RID: 103
- protected abstract void PaintHook();
- // Token: 0x06000068 RID: 104 RVA: 0x00003948 File Offset: 0x00001D48
- protected virtual void OnCreation()
- {
- }
- // Token: 0x06000069 RID: 105 RVA: 0x0000394C File Offset: 0x00001D4C
- protected virtual void OnAnimation()
- {
- }
- // Token: 0x0600006A RID: 106 RVA: 0x00003950 File Offset: 0x00001D50
- protected Rectangle Offset(Rectangle r, int amount)
- {
- this.OffsetReturnRectangle = checked(new Rectangle(r.X + amount, r.Y + amount, r.Width - amount * 2, r.Height - amount * 2));
- return this.OffsetReturnRectangle;
- }
- // Token: 0x0600006B RID: 107 RVA: 0x0000399C File Offset: 0x00001D9C
- protected Size Offset(Size s, int amount)
- {
- this.OffsetReturnSize = checked(new Size(s.Width + amount, s.Height + amount));
- return this.OffsetReturnSize;
- }
- // Token: 0x0600006C RID: 108 RVA: 0x000039D4 File Offset: 0x00001DD4
- protected Point Offset(Point p, int amount)
- {
- this.OffsetReturnPoint = checked(new Point(p.X + amount, p.Y + amount));
- return this.OffsetReturnPoint;
- }
- // Token: 0x0600006D RID: 109 RVA: 0x00003A0C File Offset: 0x00001E0C
- protected Point Center(Rectangle p, Rectangle c)
- {
- this.CenterReturn = checked(new Point(p.Width / 2 - c.Width / 2 + p.X + c.X, p.Height / 2 - c.Height / 2 + p.Y + c.Y));
- return this.CenterReturn;
- }
- // Token: 0x0600006E RID: 110 RVA: 0x00003A78 File Offset: 0x00001E78
- protected Point Center(Rectangle p, Size c)
- {
- this.CenterReturn = checked(new Point(p.Width / 2 - c.Width / 2 + p.X, p.Height / 2 - c.Height / 2 + p.Y));
- return this.CenterReturn;
- }
- // Token: 0x0600006F RID: 111 RVA: 0x00003AD4 File Offset: 0x00001ED4
- protected Point Center(Rectangle child)
- {
- return this.Center(this.Width, this.Height, child.Width, child.Height);
- }
- // Token: 0x06000070 RID: 112 RVA: 0x00003B08 File Offset: 0x00001F08
- protected Point Center(Size child)
- {
- return this.Center(this.Width, this.Height, child.Width, child.Height);
- }
- // Token: 0x06000071 RID: 113 RVA: 0x00003B3C File Offset: 0x00001F3C
- protected Point Center(int childWidth, int childHeight)
- {
- return this.Center(this.Width, this.Height, childWidth, childHeight);
- }
- // Token: 0x06000072 RID: 114 RVA: 0x00003B64 File Offset: 0x00001F64
- protected Point Center(Size p, Size c)
- {
- return this.Center(p.Width, p.Height, c.Width, c.Height);
- }
- // Token: 0x06000073 RID: 115 RVA: 0x00003B98 File Offset: 0x00001F98
- protected Point Center(int pWidth, int pHeight, int cWidth, int cHeight)
- {
- this.CenterReturn = checked(new Point(pWidth / 2 - cWidth / 2, pHeight / 2 - cHeight / 2));
- return this.CenterReturn;
- }
- // Token: 0x06000074 RID: 116 RVA: 0x00003BCC File Offset: 0x00001FCC
- protected Size Measure()
- {
- Graphics measureGraphics = this.MeasureGraphics;
- Size result;
- lock (measureGraphics)
- {
- result = this.MeasureGraphics.MeasureString(this.Text, this.Font, this.Width).ToSize();
- }
- return result;
- }
- // Token: 0x06000075 RID: 117 RVA: 0x00003C30 File Offset: 0x00002030
- protected Size Measure(string text)
- {
- Graphics measureGraphics = this.MeasureGraphics;
- Size result;
- lock (measureGraphics)
- {
- result = this.MeasureGraphics.MeasureString(text, this.Font, this.Width).ToSize();
- }
- return result;
- }
- // Token: 0x06000076 RID: 118 RVA: 0x00003C90 File Offset: 0x00002090
- protected void DrawPixel(Color c1, int x, int y)
- {
- bool transparent = this._Transparent;
- if (transparent)
- {
- this.B.SetPixel(x, y, c1);
- }
- else
- {
- this.DrawPixelBrush = new SolidBrush(c1);
- this.G.FillRectangle(this.DrawPixelBrush, x, y, 1, 1);
- }
- }
- // Token: 0x06000077 RID: 119 RVA: 0x00003CE0 File Offset: 0x000020E0
- protected void DrawCorners(Color c1, int offset)
- {
- this.DrawCorners(c1, 0, 0, this.Width, this.Height, offset);
- }
- // Token: 0x06000078 RID: 120 RVA: 0x00003CFC File Offset: 0x000020FC
- protected void DrawCorners(Color c1, Rectangle r1, int offset)
- {
- this.DrawCorners(c1, r1.X, r1.Y, r1.Width, r1.Height, offset);
- }
- // Token: 0x06000079 RID: 121 RVA: 0x00003D28 File Offset: 0x00002128
- protected void DrawCorners(Color c1, int x, int y, int width, int height, int offset)
- {
- checked
- {
- this.DrawCorners(c1, x + offset, y + offset, width - offset * 2, height - offset * 2);
- }
- }
- // Token: 0x0600007A RID: 122 RVA: 0x00003D4C File Offset: 0x0000214C
- protected void DrawCorners(Color c1)
- {
- this.DrawCorners(c1, 0, 0, this.Width, this.Height);
- }
- // Token: 0x0600007B RID: 123 RVA: 0x00003D68 File Offset: 0x00002168
- protected void DrawCorners(Color c1, Rectangle r1)
- {
- this.DrawCorners(c1, r1.X, r1.Y, r1.Width, r1.Height);
- }
- // Token: 0x0600007C RID: 124 RVA: 0x00003D90 File Offset: 0x00002190
- protected void DrawCorners(Color c1, int x, int y, int width, int height)
- {
- bool flag = this._NoRounding;
- checked
- {
- if (!flag)
- {
- flag = this._Transparent;
- if (flag)
- {
- this.B.SetPixel(x, y, c1);
- this.B.SetPixel(x + (width - 1), y, c1);
- this.B.SetPixel(x, y + (height - 1), c1);
- this.B.SetPixel(x + (width - 1), y + (height - 1), c1);
- }
- else
- {
- this.DrawCornersBrush = new SolidBrush(c1);
- this.G.FillRectangle(this.DrawCornersBrush, x, y, 1, 1);
- this.G.FillRectangle(this.DrawCornersBrush, x + (width - 1), y, 1, 1);
- this.G.FillRectangle(this.DrawCornersBrush, x, y + (height - 1), 1, 1);
- this.G.FillRectangle(this.DrawCornersBrush, x + (width - 1), y + (height - 1), 1, 1);
- }
- }
- }
- }
- // Token: 0x0600007D RID: 125 RVA: 0x00003E88 File Offset: 0x00002288
- protected void DrawBorders(Pen p1, int offset)
- {
- this.DrawBorders(p1, 0, 0, this.Width, this.Height, offset);
- }
- // Token: 0x0600007E RID: 126 RVA: 0x00003EA4 File Offset: 0x000022A4
- protected void DrawBorders(Pen p1, Rectangle r, int offset)
- {
- this.DrawBorders(p1, r.X, r.Y, r.Width, r.Height, offset);
- }
- // Token: 0x0600007F RID: 127 RVA: 0x00003ED0 File Offset: 0x000022D0
- protected void DrawBorders(Pen p1, int x, int y, int width, int height, int offset)
- {
- checked
- {
- this.DrawBorders(p1, x + offset, y + offset, width - offset * 2, height - offset * 2);
- }
- }
- // Token: 0x06000080 RID: 128 RVA: 0x00003EF4 File Offset: 0x000022F4
- protected void DrawBorders(Pen p1)
- {
- this.DrawBorders(p1, 0, 0, this.Width, this.Height);
- }
- // Token: 0x06000081 RID: 129 RVA: 0x00003F10 File Offset: 0x00002310
- protected void DrawBorders(Pen p1, Rectangle r)
- {
- this.DrawBorders(p1, r.X, r.Y, r.Width, r.Height);
- }
- // Token: 0x06000082 RID: 130 RVA: 0x00003F38 File Offset: 0x00002338
- protected void DrawBorders(Pen p1, int x, int y, int width, int height)
- {
- checked
- {
- this.G.DrawRectangle(p1, x, y, width - 1, height - 1);
- }
- }
- // Token: 0x06000083 RID: 131 RVA: 0x00003F54 File Offset: 0x00002354
- protected void DrawText(Brush b1, HorizontalAlignment a, int x, int y)
- {
- this.DrawText(b1, this.Text, a, x, y);
- }
- // Token: 0x06000084 RID: 132 RVA: 0x00003F6C File Offset: 0x0000236C
- protected void DrawText(Brush b1, string text, HorizontalAlignment a, int x, int y)
- {
- bool flag = text.Length == 0;
- checked
- {
- if (!flag)
- {
- this.DrawTextSize = this.Measure(text);
- this.DrawTextPoint = new Point(this.Width / 2 - this.DrawTextSize.Width / 2, this.Header / 2 - this.DrawTextSize.Height / 2);
- switch (a)
- {
- case HorizontalAlignment.Left:
- this.G.DrawString(text, this.Font, b1, (float)x, (float)(this.DrawTextPoint.Y + y));
- break;
- case HorizontalAlignment.Right:
- this.G.DrawString(text, this.Font, b1, (float)(this.Width - this.DrawTextSize.Width - x), (float)(this.DrawTextPoint.Y + y));
- break;
- case HorizontalAlignment.Center:
- this.G.DrawString(text, this.Font, b1, (float)(this.DrawTextPoint.X + x), (float)(this.DrawTextPoint.Y + y));
- break;
- }
- }
- }
- }
- // Token: 0x06000085 RID: 133 RVA: 0x00004088 File Offset: 0x00002488
- protected void DrawText(Brush b1, Point p1)
- {
- bool flag = this.Text.Length == 0;
- if (!flag)
- {
- this.G.DrawString(this.Text, this.Font, b1, p1);
- }
- }
- // Token: 0x06000086 RID: 134 RVA: 0x000040CC File Offset: 0x000024CC
- protected void DrawText(Brush b1, int x, int y)
- {
- bool flag = this.Text.Length == 0;
- if (!flag)
- {
- this.G.DrawString(this.Text, this.Font, b1, (float)x, (float)y);
- }
- }
- // Token: 0x06000087 RID: 135 RVA: 0x00004110 File Offset: 0x00002510
- protected void DrawImage(HorizontalAlignment a, int x, int y)
- {
- this.DrawImage(this._Image, a, x, y);
- }
- // Token: 0x06000088 RID: 136 RVA: 0x00004124 File Offset: 0x00002524
- protected void DrawImage(Image image, HorizontalAlignment a, int x, int y)
- {
- bool flag = image == null;
- checked
- {
- if (!flag)
- {
- this.DrawImagePoint = new Point(this.Width / 2 - image.Width / 2, this.Header / 2 - image.Height / 2);
- switch (a)
- {
- case HorizontalAlignment.Left:
- this.G.DrawImage(image, x, this.DrawImagePoint.Y + y, image.Width, image.Height);
- break;
- case HorizontalAlignment.Right:
- this.G.DrawImage(image, this.Width - image.Width - x, this.DrawImagePoint.Y + y, image.Width, image.Height);
- break;
- case HorizontalAlignment.Center:
- this.G.DrawImage(image, this.DrawImagePoint.X + x, this.DrawImagePoint.Y + y, image.Width, image.Height);
- break;
- }
- }
- }
- }
- // Token: 0x06000089 RID: 137 RVA: 0x00004224 File Offset: 0x00002624
- protected void DrawImage(Point p1)
- {
- this.DrawImage(this._Image, p1.X, p1.Y);
- }
- // Token: 0x0600008A RID: 138 RVA: 0x00004244 File Offset: 0x00002644
- protected void DrawImage(int x, int y)
- {
- this.DrawImage(this._Image, x, y);
- }
- // Token: 0x0600008B RID: 139 RVA: 0x00004258 File Offset: 0x00002658
- protected void DrawImage(Image image, Point p1)
- {
- this.DrawImage(image, p1.X, p1.Y);
- }
- // Token: 0x0600008C RID: 140 RVA: 0x00004274 File Offset: 0x00002674
- protected void DrawImage(Image image, int x, int y)
- {
- bool flag = image == null;
- if (!flag)
- {
- this.G.DrawImage(image, x, y, image.Width, image.Height);
- }
- }
- // Token: 0x0600008D RID: 141 RVA: 0x000042AC File Offset: 0x000026AC
- protected void DrawGradient(ColorBlend blend, int x, int y, int width, int height)
- {
- this.DrawGradientRectangle = new Rectangle(x, y, width, height);
- this.DrawGradient(blend, this.DrawGradientRectangle);
- }
- // Token: 0x0600008E RID: 142 RVA: 0x000042D0 File Offset: 0x000026D0
- protected void DrawGradient(ColorBlend blend, int x, int y, int width, int height, float angle)
- {
- this.DrawGradientRectangle = new Rectangle(x, y, width, height);
- this.DrawGradient(blend, this.DrawGradientRectangle, angle);
- }
- // Token: 0x0600008F RID: 143 RVA: 0x000042F8 File Offset: 0x000026F8
- protected void DrawGradient(ColorBlend blend, Rectangle r)
- {
- this.DrawGradientBrush = new LinearGradientBrush(r, Color.Empty, Color.Empty, 90f);
- this.DrawGradientBrush.InterpolationColors = blend;
- this.G.FillRectangle(this.DrawGradientBrush, r);
- }
- // Token: 0x06000090 RID: 144 RVA: 0x00004338 File Offset: 0x00002738
- protected void DrawGradient(ColorBlend blend, Rectangle r, float angle)
- {
- this.DrawGradientBrush = new LinearGradientBrush(r, Color.Empty, Color.Empty, angle);
- this.DrawGradientBrush.InterpolationColors = blend;
- this.G.FillRectangle(this.DrawGradientBrush, r);
- }
- // Token: 0x06000091 RID: 145 RVA: 0x00004374 File Offset: 0x00002774
- protected void DrawGradient(Color c1, Color c2, int x, int y, int width, int height)
- {
- this.DrawGradientRectangle = new Rectangle(x, y, width, height);
- this.DrawGradient(c1, c2, this.DrawGradientRectangle);
- }
- // Token: 0x06000092 RID: 146 RVA: 0x0000439C File Offset: 0x0000279C
- protected void DrawGradient(Color c1, Color c2, int x, int y, int width, int height, float angle)
- {
- this.DrawGradientRectangle = new Rectangle(x, y, width, height);
- this.DrawGradient(c1, c2, this.DrawGradientRectangle, angle);
- }
- // Token: 0x06000093 RID: 147 RVA: 0x000043C4 File Offset: 0x000027C4
- protected void DrawGradient(Color c1, Color c2, Rectangle r)
- {
- this.DrawGradientBrush = new LinearGradientBrush(r, c1, c2, 90f);
- this.G.FillRectangle(this.DrawGradientBrush, r);
- }
- // Token: 0x06000094 RID: 148 RVA: 0x000043F0 File Offset: 0x000027F0
- protected void DrawGradient(Color c1, Color c2, Rectangle r, float angle)
- {
- this.DrawGradientBrush = new LinearGradientBrush(r, c1, c2, angle);
- this.G.FillRectangle(this.DrawGradientBrush, r);
- }
- // Token: 0x06000095 RID: 149 RVA: 0x00004418 File Offset: 0x00002818
- public void DrawRadial(ColorBlend blend, int x, int y, int width, int height)
- {
- this.DrawRadialRectangle = new Rectangle(x, y, width, height);
- this.DrawRadial(blend, this.DrawRadialRectangle, width / 2, height / 2);
- }
- // Token: 0x06000096 RID: 150 RVA: 0x00004444 File Offset: 0x00002844
- public void DrawRadial(ColorBlend blend, int x, int y, int width, int height, Point center)
- {
- this.DrawRadialRectangle = new Rectangle(x, y, width, height);
- this.DrawRadial(blend, this.DrawRadialRectangle, center.X, center.Y);
- }
- // Token: 0x06000097 RID: 151 RVA: 0x00004478 File Offset: 0x00002878
- public void DrawRadial(ColorBlend blend, int x, int y, int width, int height, int cx, int cy)
- {
- this.DrawRadialRectangle = new Rectangle(x, y, width, height);
- this.DrawRadial(blend, this.DrawRadialRectangle, cx, cy);
- }
- // Token: 0x06000098 RID: 152 RVA: 0x000044A0 File Offset: 0x000028A0
- public void DrawRadial(ColorBlend blend, Rectangle r)
- {
- this.DrawRadial(blend, r, r.Width / 2, r.Height / 2);
- }
- // Token: 0x06000099 RID: 153 RVA: 0x000044C0 File Offset: 0x000028C0
- public void DrawRadial(ColorBlend blend, Rectangle r, Point center)
- {
- this.DrawRadial(blend, r, center.X, center.Y);
- }
- // Token: 0x0600009A RID: 154 RVA: 0x000044DC File Offset: 0x000028DC
- public void DrawRadial(ColorBlend blend, Rectangle r, int cx, int cy)
- {
- this.DrawRadialPath.Reset();
- checked
- {
- this.DrawRadialPath.AddEllipse(r.X, r.Y, r.Width - 1, r.Height - 1);
- this.DrawRadialBrush1 = new PathGradientBrush(this.DrawRadialPath);
- PathGradientBrush arg_71_0 = this.DrawRadialBrush1;
- Point p = new Point(r.X + cx, r.Y + cy);
- arg_71_0.CenterPoint = p;
- this.DrawRadialBrush1.InterpolationColors = blend;
- bool flag = this.G.SmoothingMode == SmoothingMode.AntiAlias;
- if (flag)
- {
- this.G.FillEllipse(this.DrawRadialBrush1, r.X + 1, r.Y + 1, r.Width - 3, r.Height - 3);
- }
- else
- {
- this.G.FillEllipse(this.DrawRadialBrush1, r);
- }
- }
- }
- // Token: 0x0600009B RID: 155 RVA: 0x000045D0 File Offset: 0x000029D0
- protected void DrawRadial(Color c1, Color c2, int x, int y, int width, int height)
- {
- this.DrawRadialRectangle = new Rectangle(x, y, width, height);
- this.DrawRadial(c1, c2, this.DrawGradientRectangle);
- }
- // Token: 0x0600009C RID: 156 RVA: 0x000045F8 File Offset: 0x000029F8
- protected void DrawRadial(Color c1, Color c2, int x, int y, int width, int height, float angle)
- {
- this.DrawRadialRectangle = new Rectangle(x, y, width, height);
- this.DrawRadial(c1, c2, this.DrawGradientRectangle, angle);
- }
- // Token: 0x0600009D RID: 157 RVA: 0x00004620 File Offset: 0x00002A20
- protected void DrawRadial(Color c1, Color c2, Rectangle r)
- {
- this.DrawRadialBrush2 = new LinearGradientBrush(r, c1, c2, 90f);
- this.G.FillRectangle(this.DrawGradientBrush, r);
- }
- // Token: 0x0600009E RID: 158 RVA: 0x0000464C File Offset: 0x00002A4C
- protected void DrawRadial(Color c1, Color c2, Rectangle r, float angle)
- {
- this.DrawRadialBrush2 = new LinearGradientBrush(r, c1, c2, angle);
- this.G.FillEllipse(this.DrawGradientBrush, r);
- }
- // Token: 0x0600009F RID: 159 RVA: 0x00004674 File Offset: 0x00002A74
- public GraphicsPath CreateRound(int x, int y, int width, int height, int slope)
- {
- this.CreateRoundRectangle = new Rectangle(x, y, width, height);
- return this.CreateRound(this.CreateRoundRectangle, slope);
- }
- // Token: 0x060000A0 RID: 160 RVA: 0x000046A8 File Offset: 0x00002AA8
- public GraphicsPath CreateRound(Rectangle r, int slope)
- {
- this.CreateRoundPath = new GraphicsPath(FillMode.Winding);
- this.CreateRoundPath.AddArc(r.X, r.Y, slope, slope, 180f, 90f);
- checked
- {
- this.CreateRoundPath.AddArc(r.Right - slope, r.Y, slope, slope, 270f, 90f);
- this.CreateRoundPath.AddArc(r.Right - slope, r.Bottom - slope, slope, slope, 0f, 90f);
- this.CreateRoundPath.AddArc(r.X, r.Bottom - slope, slope, slope, 90f, 90f);
- this.CreateRoundPath.CloseFigure();
- return this.CreateRoundPath;
- }
- }
- // Token: 0x04000006 RID: 6
- protected Graphics G;
- // Token: 0x04000007 RID: 7
- protected Bitmap B;
- // Token: 0x04000008 RID: 8
- private bool DoneCreation;
- // Token: 0x04000009 RID: 9
- private bool HasShown;
- // Token: 0x0400000A RID: 10
- private Rectangle Frame;
- // Token: 0x0400000B RID: 11
- protected MouseState State;
- // Token: 0x0400000C RID: 12
- private bool WM_LMBUTTONDOWN;
- // Token: 0x0400000D RID: 13
- private Point GetIndexPoint;
- // Token: 0x0400000E RID: 14
- private bool B1;
- // Token: 0x0400000F RID: 15
- private bool B2;
- // Token: 0x04000010 RID: 16
- private bool B3;
- // Token: 0x04000011 RID: 17
- private bool B4;
- // Token: 0x04000012 RID: 18
- private int Current;
- // Token: 0x04000013 RID: 19
- private int Previous;
- // Token: 0x04000014 RID: 20
- private Message[] Messages;
- // Token: 0x04000015 RID: 21
- private bool _BackColor;
- // Token: 0x04000016 RID: 22
- private bool _SmartBounds;
- // Token: 0x04000017 RID: 23
- private bool _Movable;
- // Token: 0x04000018 RID: 24
- private bool _Sizable;
- // Token: 0x04000019 RID: 25
- private Color _TransparencyKey;
- // Token: 0x0400001A RID: 26
- private FormBorderStyle _BorderStyle;
- // Token: 0x0400001B RID: 27
- private FormStartPosition _StartPosition;
- // Token: 0x0400001C RID: 28
- private bool _NoRounding;
- // Token: 0x0400001D RID: 29
- private Image _Image;
- // Token: 0x0400001E RID: 30
- private Dictionary<string, Color> Items;
- // Token: 0x0400001F RID: 31
- private string _Customization;
- // Token: 0x04000020 RID: 32
- private bool _Transparent;
- // Token: 0x04000021 RID: 33
- private Size _ImageSize;
- // Token: 0x04000022 RID: 34
- private bool _IsParentForm;
- // Token: 0x04000023 RID: 35
- private int _LockWidth;
- // Token: 0x04000024 RID: 36
- private int _LockHeight;
- // Token: 0x04000025 RID: 37
- private int _Header;
- // Token: 0x04000026 RID: 38
- private bool _ControlMode;
- // Token: 0x04000027 RID: 39
- private bool _IsAnimated;
- // Token: 0x04000028 RID: 40
- private Rectangle OffsetReturnRectangle;
- // Token: 0x04000029 RID: 41
- private Size OffsetReturnSize;
- // Token: 0x0400002A RID: 42
- private Point OffsetReturnPoint;
- // Token: 0x0400002B RID: 43
- private Point CenterReturn;
- // Token: 0x0400002C RID: 44
- private Bitmap MeasureBitmap;
- // Token: 0x0400002D RID: 45
- private Graphics MeasureGraphics;
- // Token: 0x0400002E RID: 46
- private SolidBrush DrawPixelBrush;
- // Token: 0x0400002F RID: 47
- private SolidBrush DrawCornersBrush;
- // Token: 0x04000030 RID: 48
- private Point DrawTextPoint;
- // Token: 0x04000031 RID: 49
- private Size DrawTextSize;
- // Token: 0x04000032 RID: 50
- private Point DrawImagePoint;
- // Token: 0x04000033 RID: 51
- private LinearGradientBrush DrawGradientBrush;
- // Token: 0x04000034 RID: 52
- private Rectangle DrawGradientRectangle;
- // Token: 0x04000035 RID: 53
- private GraphicsPath DrawRadialPath;
- // Token: 0x04000036 RID: 54
- private PathGradientBrush DrawRadialBrush1;
- // Token: 0x04000037 RID: 55
- private LinearGradientBrush DrawRadialBrush2;
- // Token: 0x04000038 RID: 56
- private Rectangle DrawRadialRectangle;
- // Token: 0x04000039 RID: 57
- private GraphicsPath CreateRoundPath;
- // Token: 0x0400003A RID: 58
- private Rectangle CreateRoundRectangle;
- }
- internal abstract class ThemeControl154 : Control
- {
- // Token: 0x060000A1 RID: 161 RVA: 0x00004778 File Offset: 0x00002B78
- public ThemeControl154()
- {
- this.Items = new Dictionary<string, Color>();
- this.SetStyle(ControlStyles.UserPaint | ControlStyles.Opaque | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
- this._ImageSize = Size.Empty;
- this.Font = new Font("Verdana", 8f);
- this.MeasureBitmap = new Bitmap(1, 1);
- this.MeasureGraphics = Graphics.FromImage(this.MeasureBitmap);
- this.DrawRadialPath = new GraphicsPath();
- this.InvalidateCustimization();
- }
- // Token: 0x060000A2 RID: 162 RVA: 0x000047F8 File Offset: 0x00002BF8
- protected sealed override void OnHandleCreated(EventArgs e)
- {
- this.InvalidateCustimization();
- this.ColorHook();
- bool flag = this._LockWidth != 0;
- if (flag)
- {
- this.Width = this._LockWidth;
- }
- flag = (this._LockHeight != 0);
- if (flag)
- {
- this.Height = this._LockHeight;
- }
- this.Transparent = this._Transparent;
- flag = (this._Transparent && this._BackColor);
- if (flag)
- {
- this.BackColor = Color.Transparent;
- }
- base.OnHandleCreated(e);
- }
- // Token: 0x060000A3 RID: 163 RVA: 0x0000488C File Offset: 0x00002C8C
- protected sealed override void OnParentChanged(EventArgs e)
- {
- bool flag = this.Parent != null;
- if (flag)
- {
- this.OnCreation();
- this.DoneCreation = true;
- this.InvalidateTimer();
- }
- base.OnParentChanged(e);
- }
- // Token: 0x060000A4 RID: 164 RVA: 0x000048CC File Offset: 0x00002CCC
- private void DoAnimation(bool i)
- {
- this.OnAnimation();
- if (i)
- {
- this.Invalidate();
- }
- }
- // Token: 0x060000A5 RID: 165 RVA: 0x000048F0 File Offset: 0x00002CF0
- protected sealed override void OnPaint(PaintEventArgs e)
- {
- bool flag = this.Width == 0 || this.Height == 0;
- if (!flag)
- {
- flag = this._Transparent;
- if (flag)
- {
- this.PaintHook();
- e.Graphics.DrawImage(this.B, 0, 0);
- }
- else
- {
- this.G = e.Graphics;
- this.PaintHook();
- }
- }
- }
- // Token: 0x060000A6 RID: 166 RVA: 0x0000495C File Offset: 0x00002D5C
- protected override void OnHandleDestroyed(EventArgs e)
- {
- ThemeShare.RemoveAnimationCallback(new ThemeShare.AnimationDelegate(this.DoAnimation));
- base.OnHandleDestroyed(e);
- }
- // Token: 0x060000A7 RID: 167 RVA: 0x0000497C File Offset: 0x00002D7C
- protected sealed override void OnSizeChanged(EventArgs e)
- {
- bool transparent = this._Transparent;
- if (transparent)
- {
- this.InvalidateBitmap();
- }
- this.Invalidate();
- base.OnSizeChanged(e);
- }
- // Token: 0x060000A8 RID: 168 RVA: 0x000049AC File Offset: 0x00002DAC
- protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
- {
- bool flag = this._LockWidth != 0;
- if (flag)
- {
- width = this._LockWidth;
- }
- flag = (this._LockHeight != 0);
- if (flag)
- {
- height = this._LockHeight;
- }
- base.SetBoundsCore(x, y, width, height, specified);
- }
- // Token: 0x060000A9 RID: 169 RVA: 0x000049FC File Offset: 0x00002DFC
- protected override void OnMouseEnter(EventArgs e)
- {
- this.InPosition = true;
- this.SetState(MouseState.Over);
- base.OnMouseEnter(e);
- }
- // Token: 0x060000AA RID: 170 RVA: 0x00004A18 File Offset: 0x00002E18
- protected override void OnMouseUp(MouseEventArgs e)
- {
- bool inPosition = this.InPosition;
- if (inPosition)
- {
- this.SetState(MouseState.Over);
- }
- base.OnMouseUp(e);
- }
- // Token: 0x060000AB RID: 171 RVA: 0x00004A44 File Offset: 0x00002E44
- protected override void OnMouseDown(MouseEventArgs e)
- {
- bool flag = e.Button == MouseButtons.Left;
- if (flag)
- {
- this.SetState(MouseState.Down);
- }
- base.OnMouseDown(e);
- }
- // Token: 0x060000AC RID: 172 RVA: 0x00004A74 File Offset: 0x00002E74
- protected override void OnMouseLeave(EventArgs e)
- {
- this.InPosition = false;
- this.SetState(MouseState.None);
- base.OnMouseLeave(e);
- }
- // Token: 0x060000AD RID: 173 RVA: 0x00004A90 File Offset: 0x00002E90
- protected override void OnEnabledChanged(EventArgs e)
- {
- bool enabled = this.Enabled;
- if (enabled)
- {
- this.SetState(MouseState.None);
- }
- else
- {
- this.SetState(MouseState.Block);
- }
- base.OnEnabledChanged(e);
- }
- // Token: 0x060000AE RID: 174 RVA: 0x00004AC4 File Offset: 0x00002EC4
- private void SetState(MouseState current)
- {
- this.State = current;
- this.Invalidate();
- }
- // Token: 0x17000022 RID: 34
- // (get) Token: 0x060000AF RID: 175 RVA: 0x00004AD8 File Offset: 0x00002ED8
- // (set) Token: 0x060000B0 RID: 176 RVA: 0x00004AF0 File Offset: 0x00002EF0
- [EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false)]
- public override Color ForeColor
- {
- get
- {
- return Color.Empty;
- }
- set
- {
- }
- }
- // Token: 0x17000023 RID: 35
- // (get) Token: 0x060000B1 RID: 177 RVA: 0x00004AF4 File Offset: 0x00002EF4
- // (set) Token: 0x060000B2 RID: 178 RVA: 0x00004B08 File Offset: 0x00002F08
- [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
- public override Image BackgroundImage
- {
- get
- {
- return null;
- }
- set
- {
- }
- }
- // Token: 0x17000024 RID: 36
- // (get) Token: 0x060000B3 RID: 179 RVA: 0x00004B0C File Offset: 0x00002F0C
- // (set) Token: 0x060000B4 RID: 180 RVA: 0x00004B20 File Offset: 0x00002F20
- [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
- public override ImageLayout BackgroundImageLayout
- {
- get
- {
- return ImageLayout.None;
- }
- set
- {
- }
- }
- // Token: 0x17000025 RID: 37
- // (get) Token: 0x060000B5 RID: 181 RVA: 0x00004B24 File Offset: 0x00002F24
- // (set) Token: 0x060000B6 RID: 182 RVA: 0x00004B3C File Offset: 0x00002F3C
- public override string Text
- {
- get
- {
- return base.Text;
- }
- set
- {
- base.Text = value;
- this.Invalidate();
- }
- }
- // Token: 0x17000026 RID: 38
- // (get) Token: 0x060000B7 RID: 183 RVA: 0x00004B50 File Offset: 0x00002F50
- // (set) Token: 0x060000B8 RID: 184 RVA: 0x00004B68 File Offset: 0x00002F68
- public override Font Font
- {
- get
- {
- return base.Font;
- }
- set
- {
- base.Font = value;
- this.Invalidate();
- }
- }
- // Token: 0x17000027 RID: 39
- // (get) Token: 0x060000B9 RID: 185 RVA: 0x00004B7C File Offset: 0x00002F7C
- // (set) Token: 0x060000BA RID: 186 RVA: 0x00004B94 File Offset: 0x00002F94
- [Category("Misc")]
- public override Color BackColor
- {
- get
- {
- return base.BackColor;
- }
- set
- {
- bool flag = !this.IsHandleCreated && value == Color.Transparent;
- if (flag)
- {
- this._BackColor = true;
- }
- else
- {
- base.BackColor = value;
- flag = (this.Parent != null);
- if (flag)
- {
- this.ColorHook();
- }
- }
- }
- }
- // Token: 0x17000028 RID: 40
- // (get) Token: 0x060000BB RID: 187 RVA: 0x00004BEC File Offset: 0x00002FEC
- // (set) Token: 0x060000BC RID: 188 RVA: 0x00004C04 File Offset: 0x00003004
- public bool NoRounding
- {
- get
- {
- return this._NoRounding;
- }
- set
- {
- this._NoRounding = value;
- this.Invalidate();
- }
- }
- // Token: 0x17000029 RID: 41
- // (get) Token: 0x060000BD RID: 189 RVA: 0x00004C18 File Offset: 0x00003018
- // (set) Token: 0x060000BE RID: 190 RVA: 0x00004C30 File Offset: 0x00003030
- public Image Image
- {
- get
- {
- return this._Image;
- }
- set
- {
- bool flag = value == null;
- if (flag)
- {
- this._ImageSize = Size.Empty;
- }
- else
- {
- this._ImageSize = value.Size;
- }
- this._Image = value;
- this.Invalidate();
- }
- }
- // Token: 0x1700002A RID: 42
- // (get) Token: 0x060000BF RID: 191 RVA: 0x00004C70 File Offset: 0x00003070
- // (set) Token: 0x060000C0 RID: 192 RVA: 0x00004C88 File Offset: 0x00003088
- public bool Transparent
- {
- get
- {
- return this._Transparent;
- }
- set
- {
- this._Transparent = value;
- bool flag = !this.IsHandleCreated;
- if (!flag)
- {
- flag = (!value && this.BackColor.A != 255);
- if (flag)
- {
- throw new Exception("Unable to change value to false while a transparent BackColor is in use.");
- }
- this.SetStyle(ControlStyles.Opaque, !value);
- this.SetStyle(ControlStyles.SupportsTransparentBackColor, value);
- if (value)
- {
- this.InvalidateBitmap();
- }
- else
- {
- this.B = null;
- }
- this.Invalidate();
- }
- }
- }
- // Token: 0x1700002B RID: 43
- // (get) Token: 0x060000C1 RID: 193 RVA: 0x00004D14 File Offset: 0x00003114
- // (set) Token: 0x060000C2 RID: 194 RVA: 0x00004D80 File Offset: 0x00003180
- public Bloom[] Colors
- {
- get
- {
- List<Bloom> list = new List<Bloom>();
- Dictionary<string, Color>.Enumerator enumerator = this.Items.GetEnumerator();
- while (enumerator.MoveNext())
- {
- List<Bloom> arg_3F_0 = list;
- KeyValuePair<string, Color> current = enumerator.Current;
- string arg_37_1 = current.Key;
- KeyValuePair<string, Color> current2 = enumerator.Current;
- Bloom item = new Bloom(arg_37_1, current2.Value);
- arg_3F_0.Add(item);
- }
- return list.ToArray();
- }
- set
- {
- checked
- {
- for (int i = 0; i < value.Length; i++)
- {
- Bloom bloom = value[i];
- bool flag = this.Items.ContainsKey(bloom.Name);
- if (flag)
- {
- this.Items[bloom.Name] = bloom.Value;
- }
- }
- this.InvalidateCustimization();
- this.ColorHook();
- this.Invalidate();
- }
- }
- }
- // Token: 0x1700002C RID: 44
- // (get) Token: 0x060000C3 RID: 195 RVA: 0x00004DFC File Offset: 0x000031FC
- // (set) Token: 0x060000C4 RID: 196 RVA: 0x00004E14 File Offset: 0x00003214
- public string Customization
- {
- get
- {
- return this._Customization;
- }
- set
- {
- bool flag = Operators.CompareString(value, this._Customization, false) == 0;
- checked
- {
- if (!flag)
- {
- Bloom[] colors = this.Colors;
- try
- {
- byte[] value2 = Convert.FromBase64String(value);
- int arg_30_0 = 0;
- int num = colors.Length - 1;
- int num2 = arg_30_0;
- while (true)
- {
- int arg_59_0 = num2;
- int num3 = num;
- if (arg_59_0 > num3)
- {
- break;
- }
- colors[num2].Value = Color.FromArgb(BitConverter.ToInt32(value2, num2 * 4));
- num2++;
- }
- }
- catch (Exception arg_5D_0)
- {
- ProjectData.SetProjectError(arg_5D_0);
- ProjectData.ClearProjectError();
- return;
- }
- this._Customization = value;
- this.Colors = colors;
- this.ColorHook();
- this.Invalidate();
- }
- }
- }
- }
- // Token: 0x1700002D RID: 45
- // (get) Token: 0x060000C5 RID: 197 RVA: 0x00004EC4 File Offset: 0x000032C4
- protected Size ImageSize
- {
- get
- {
- return this._ImageSize;
- }
- }
- // Token: 0x1700002E RID: 46
- // (get) Token: 0x060000C6 RID: 198 RVA: 0x00004EDC File Offset: 0x000032DC
- // (set) Token: 0x060000C7 RID: 199 RVA: 0x00004EF4 File Offset: 0x000032F4
- protected int LockWidth
- {
- get
- {
- return this._LockWidth;
- }
- set
- {
- this._LockWidth = value;
- bool flag = this.LockWidth != 0 && this.IsHandleCreated;
- if (flag)
- {
- this.Width = this.LockWidth;
- }
- }
- }
- // Token: 0x1700002F RID: 47
- // (get) Token: 0x060000C8 RID: 200 RVA: 0x00004F34 File Offset: 0x00003334
- // (set) Token: 0x060000C9 RID: 201 RVA: 0x00004F4C File Offset: 0x0000334C
- protected int LockHeight
- {
- get
- {
- return this._LockHeight;
- }
- set
- {
- this._LockHeight = value;
- bool flag = this.LockHeight != 0 && this.IsHandleCreated;
- if (flag)
- {
- this.Height = this.LockHeight;
- }
- }
- }
- // Token: 0x17000030 RID: 48
- // (get) Token: 0x060000CA RID: 202 RVA: 0x00004F8C File Offset: 0x0000338C
- // (set) Token: 0x060000CB RID: 203 RVA: 0x00004FA4 File Offset: 0x000033A4
- protected bool IsAnimated
- {
- get
- {
- return this._IsAnimated;
- }
- set
- {
- this._IsAnimated = value;
- this.InvalidateTimer();
- }
- }
- // Token: 0x060000CC RID: 204 RVA: 0x00004FB8 File Offset: 0x000033B8
- protected Pen GetPen(string name)
- {
- return new Pen(this.Items[name]);
- }
- // Token: 0x060000CD RID: 205 RVA: 0x00004FDC File Offset: 0x000033DC
- protected Pen GetPen(string name, float width)
- {
- return new Pen(this.Items[name], width);
- }
- // Token: 0x060000CE RID: 206 RVA: 0x00005000 File Offset: 0x00003400
- protected SolidBrush GetBrush(string name)
- {
- return new SolidBrush(this.Items[name]);
- }
- // Token: 0x060000CF RID: 207 RVA: 0x00005024 File Offset: 0x00003424
- protected Color GetColor(string name)
- {
- return this.Items[name];
- }
- // Token: 0x060000D0 RID: 208 RVA: 0x00005044 File Offset: 0x00003444
- protected void SetColor(string name, Color value)
- {
- bool flag = this.Items.ContainsKey(name);
- if (flag)
- {
- this.Items[name] = value;
- }
- else
- {
- this.Items.Add(name, value);
- }
- }
- // Token: 0x060000D1 RID: 209 RVA: 0x00005084 File Offset: 0x00003484
- protected void SetColor(string name, byte r, byte g, byte b)
- {
- this.SetColor(name, Color.FromArgb((int)r, (int)g, (int)b));
- }
- // Token: 0x060000D2 RID: 210 RVA: 0x0000509C File Offset: 0x0000349C
- protected void SetColor(string name, byte a, byte r, byte g, byte b)
- {
- this.SetColor(name, Color.FromArgb((int)a, (int)r, (int)g, (int)b));
- }
- // Token: 0x060000D3 RID: 211 RVA: 0x000050B4 File Offset: 0x000034B4
- protected void SetColor(string name, byte a, Color value)
- {
- this.SetColor(name, Color.FromArgb((int)a, value));
- }
- // Token: 0x060000D4 RID: 212 RVA: 0x000050C8 File Offset: 0x000034C8
- private void InvalidateBitmap()
- {
- bool flag = this.Width == 0 || this.Height == 0;
- if (!flag)
- {
- this.B = new Bitmap(this.Width, this.Height, PixelFormat.Format32bppPArgb);
- this.G = Graphics.FromImage(this.B);
- }
- }
- // Token: 0x060000D5 RID: 213 RVA: 0x00005124 File Offset: 0x00003524
- private void InvalidateCustimization()
- {
- checked
- {
- MemoryStream memoryStream = new MemoryStream(this.Items.Count * 4);
- Bloom[] colors = this.Colors;
- for (int i = 0; i < colors.Length; i++)
- {
- Bloom bloom = colors[i];
- memoryStream.Write(BitConverter.GetBytes(bloom.Value.ToArgb()), 0, 4);
- }
- memoryStream.Close();
- this._Customization = Convert.ToBase64String(memoryStream.ToArray());
- }
- }
- // Token: 0x060000D6 RID: 214 RVA: 0x000051A8 File Offset: 0x000035A8
- private void InvalidateTimer()
- {
- bool flag = this.DesignMode || !this.DoneCreation;
- if (!flag)
- {
- flag = this._IsAnimated;
- if (flag)
- {
- ThemeShare.AddAnimationCallback(new ThemeShare.AnimationDelegate(this.DoAnimation));
- }
- else
- {
- ThemeShare.RemoveAnimationCallback(new ThemeShare.AnimationDelegate(this.DoAnimation));
- }
- }
- }
- // Token: 0x060000D7 RID: 215
- protected abstract void ColorHook();
- // Token: 0x060000D8 RID: 216
- protected abstract void PaintHook();
- // Token: 0x060000D9 RID: 217 RVA: 0x00005208 File Offset: 0x00003608
- protected virtual void OnCreation()
- {
- }
- // Token: 0x060000DA RID: 218 RVA: 0x0000520C File Offset: 0x0000360C
- protected virtual void OnAnimation()
- {
- }
- // Token: 0x060000DB RID: 219 RVA: 0x00005210 File Offset: 0x00003610
- protected Rectangle Offset(Rectangle r, int amount)
- {
- this.OffsetReturnRectangle = checked(new Rectangle(r.X + amount, r.Y + amount, r.Width - amount * 2, r.Height - amount * 2));
- return this.OffsetReturnRectangle;
- }
- // Token: 0x060000DC RID: 220 RVA: 0x0000525C File Offset: 0x0000365C
- protected Size Offset(Size s, int amount)
- {
- this.OffsetReturnSize = checked(new Size(s.Width + amount, s.Height + amount));
- return this.OffsetReturnSize;
- }
- // Token: 0x060000DD RID: 221 RVA: 0x00005294 File Offset: 0x00003694
- protected Point Offset(Point p, int amount)
- {
- this.OffsetReturnPoint = checked(new Point(p.X + amount, p.Y + amount));
- return this.OffsetReturnPoint;
- }
- // Token: 0x060000DE RID: 222 RVA: 0x000052CC File Offset: 0x000036CC
- protected Point Center(Rectangle p, Rectangle c)
- {
- this.CenterReturn = checked(new Point(p.Width / 2 - c.Width / 2 + p.X + c.X, p.Height / 2 - c.Height / 2 + p.Y + c.Y));
- return this.CenterReturn;
- }
- // Token: 0x060000DF RID: 223 RVA: 0x00005338 File Offset: 0x00003738
- protected Point Center(Rectangle p, Size c)
- {
- this.CenterReturn = checked(new Point(p.Width / 2 - c.Width / 2 + p.X, p.Height / 2 - c.Height / 2 + p.Y));
- return this.CenterReturn;
- }
- // Token: 0x060000E0 RID: 224 RVA: 0x00005394 File Offset: 0x00003794
- protected Point Center(Rectangle child)
- {
- return this.Center(this.Width, this.Height, child.Width, child.Height);
- }
- // Token: 0x060000E1 RID: 225 RVA: 0x000053C8 File Offset: 0x000037C8
- protected Point Center(Size child)
- {
- return this.Center(this.Width, this.Height, child.Width, child.Height);
- }
- // Token: 0x060000E2 RID: 226 RVA: 0x000053FC File Offset: 0x000037FC
- protected Point Center(int childWidth, int childHeight)
- {
- return this.Center(this.Width, this.Height, childWidth, childHeight);
- }
- // Token: 0x060000E3 RID: 227 RVA: 0x00005424 File Offset: 0x00003824
- protected Point Center(Size p, Size c)
- {
- return this.Center(p.Width, p.Height, c.Width, c.Height);
- }
- // Token: 0x060000E4 RID: 228 RVA: 0x00005458 File Offset: 0x00003858
- protected Point Center(int pWidth, int pHeight, int cWidth, int cHeight)
- {
- this.CenterReturn = checked(new Point(pWidth / 2 - cWidth / 2, pHeight / 2 - cHeight / 2));
- return this.CenterReturn;
- }
- // Token: 0x060000E5 RID: 229 RVA: 0x0000548C File Offset: 0x0000388C
- protected Size Measure()
- {
- return this.MeasureGraphics.MeasureString(this.Text, this.Font, this.Width).ToSize();
- }
- // Token: 0x060000E6 RID: 230 RVA: 0x000054C4 File Offset: 0x000038C4
- protected Size Measure(string text)
- {
- return this.MeasureGraphics.MeasureString(text, this.Font, this.Width).ToSize();
- }
- // Token: 0x060000E7 RID: 231 RVA: 0x000054F8 File Offset: 0x000038F8
- protected void DrawPixel(Color c1, int x, int y)
- {
- bool transparent = this._Transparent;
- if (transparent)
- {
- this.B.SetPixel(x, y, c1);
- }
- else
- {
- this.DrawPixelBrush = new SolidBrush(c1);
- this.G.FillRectangle(this.DrawPixelBrush, x, y, 1, 1);
- }
- }
- // Token: 0x060000E8 RID: 232 RVA: 0x00005548 File Offset: 0x00003948
- protected void DrawCorners(Color c1, int offset)
- {
- this.DrawCorners(c1, 0, 0, this.Width, this.Height, offset);
- }
- // Token: 0x060000E9 RID: 233 RVA: 0x00005564 File Offset: 0x00003964
- protected void DrawCorners(Color c1, Rectangle r1, int offset)
- {
- this.DrawCorners(c1, r1.X, r1.Y, r1.Width, r1.Height, offset);
- }
- // Token: 0x060000EA RID: 234 RVA: 0x00005590 File Offset: 0x00003990
- protected void DrawCorners(Color c1, int x, int y, int width, int height, int offset)
- {
- checked
- {
- this.DrawCorners(c1, x + offset, y + offset, width - offset * 2, height - offset * 2);
- }
- }
- // Token: 0x060000EB RID: 235 RVA: 0x000055B4 File Offset: 0x000039B4
- protected void DrawCorners(Color c1)
- {
- this.DrawCorners(c1, 0, 0, this.Width, this.Height);
- }
- // Token: 0x060000EC RID: 236 RVA: 0x000055D0 File Offset: 0x000039D0
- protected void DrawCorners(Color c1, Rectangle r1)
- {
- this.DrawCorners(c1, r1.X, r1.Y, r1.Width, r1.Height);
- }
- // Token: 0x060000ED RID: 237 RVA: 0x000055F8 File Offset: 0x000039F8
- protected void DrawCorners(Color c1, int x, int y, int width, int height)
- {
- bool flag = this._NoRounding;
- checked
- {
- if (!flag)
- {
- flag = this._Transparent;
- if (flag)
- {
- this.B.SetPixel(x, y, c1);
- this.B.SetPixel(x + (width - 1), y, c1);
- this.B.SetPixel(x, y + (height - 1), c1);
- this.B.SetPixel(x + (width - 1), y + (height - 1), c1);
- }
- else
- {
- this.DrawCornersBrush = new SolidBrush(c1);
- this.G.FillRectangle(this.DrawCornersBrush, x, y, 1, 1);
- this.G.FillRectangle(this.DrawCornersBrush, x + (width - 1), y, 1, 1);
- this.G.FillRectangle(this.DrawCornersBrush, x, y + (height - 1), 1, 1);
- this.G.FillRectangle(this.DrawCornersBrush, x + (width - 1), y + (height - 1), 1, 1);
- }
- }
- }
- }
- // Token: 0x060000EE RID: 238 RVA: 0x000056F0 File Offset: 0x00003AF0
- protected void DrawBorders(Pen p1, int offset)
- {
- this.DrawBorders(p1, 0, 0, this.Width, this.Height, offset);
- }
- // Token: 0x060000EF RID: 239 RVA: 0x0000570C File Offset: 0x00003B0C
- protected void DrawBorders(Pen p1, Rectangle r, int offset)
- {
- this.DrawBorders(p1, r.X, r.Y, r.Width, r.Height, offset);
- }
- // Token: 0x060000F0 RID: 240 RVA: 0x00005738 File Offset: 0x00003B38
- protected void DrawBorders(Pen p1, int x, int y, int width, int height, int offset)
- {
- checked
- {
- this.DrawBorders(p1, x + offset, y + offset, width - offset * 2, height - offset * 2);
- }
- }
- // Token: 0x060000F1 RID: 241 RVA: 0x0000575C File Offset: 0x00003B5C
- protected void DrawBorders(Pen p1)
- {
- this.DrawBorders(p1, 0, 0, this.Width, this.Height);
- }
- // Token: 0x060000F2 RID: 242 RVA: 0x00005778 File Offset: 0x00003B78
- protected void DrawBorders(Pen p1, Rectangle r)
- {
- this.DrawBorders(p1, r.X, r.Y, r.Width, r.Height);
- }
- // Token: 0x060000F3 RID: 243 RVA: 0x000057A0 File Offset: 0x00003BA0
- protected void DrawBorders(Pen p1, int x, int y, int width, int height)
- {
- checked
- {
- this.G.DrawRectangle(p1, x, y, width - 1, height - 1);
- }
- }
- // Token: 0x060000F4 RID: 244 RVA: 0x000057BC File Offset: 0x00003BBC
- protected void DrawText(Brush b1, HorizontalAlignment a, int x, int y)
- {
- this.DrawText(b1, this.Text, a, x, y);
- }
- // Token: 0x060000F5 RID: 245 RVA: 0x000057D4 File Offset: 0x00003BD4
- protected void DrawText(Brush b1, string text, HorizontalAlignment a, int x, int y)
- {
- bool flag = text.Length == 0;
- checked
- {
- if (!flag)
- {
- this.DrawTextSize = this.Measure(text);
- this.DrawTextPoint = this.Center(this.DrawTextSize);
- switch (a)
- {
- case HorizontalAlignment.Left:
- this.G.DrawString(text, this.Font, b1, (float)x, (float)(this.DrawTextPoint.Y + y));
- break;
- case HorizontalAlignment.Right:
- this.G.DrawString(text, this.Font, b1, (float)(this.Width - this.DrawTextSize.Width - x), (float)(this.DrawTextPoint.Y + y));
- break;
- case HorizontalAlignment.Center:
- this.G.DrawString(text, this.Font, b1, (float)(this.DrawTextPoint.X + x), (float)(this.DrawTextPoint.Y + y));
- break;
- }
- }
- }
- }
- // Token: 0x060000F6 RID: 246 RVA: 0x000058C8 File Offset: 0x00003CC8
- protected void DrawText(Brush b1, Point p1)
- {
- bool flag = this.Text.Length == 0;
- if (!flag)
- {
- this.G.DrawString(this.Text, this.Font, b1, p1);
- }
- }
- // Token: 0x060000F7 RID: 247 RVA: 0x0000590C File Offset: 0x00003D0C
- protected void DrawText(Brush b1, int x, int y)
- {
- bool flag = this.Text.Length == 0;
- if (!flag)
- {
- this.G.DrawString(this.Text, this.Font, b1, (float)x, (float)y);
- }
- }
- // Token: 0x060000F8 RID: 248 RVA: 0x00005950 File Offset: 0x00003D50
- protected void DrawImage(HorizontalAlignment a, int x, int y)
- {
- this.DrawImage(this._Image, a, x, y);
- }
- // Token: 0x060000F9 RID: 249 RVA: 0x00005964 File Offset: 0x00003D64
- protected void DrawImage(Image image, HorizontalAlignment a, int x, int y)
- {
- bool flag = image == null;
- checked
- {
- if (!flag)
- {
- this.DrawImagePoint = this.Center(image.Size);
- switch (a)
- {
- case HorizontalAlignment.Left:
- this.G.DrawImage(image, x, this.DrawImagePoint.Y + y, image.Width, image.Height);
- break;
- case HorizontalAlignment.Right:
- this.G.DrawImage(image, this.Width - image.Width - x, this.DrawImagePoint.Y + y, image.Width, image.Height);
- break;
- case HorizontalAlignment.Center:
- this.G.DrawImage(image, this.DrawImagePoint.X + x, this.DrawImagePoint.Y + y, image.Width, image.Height);
- break;
- }
- }
- }
- }
- // Token: 0x060000FA RID: 250 RVA: 0x00005A48 File Offset: 0x00003E48
- protected void DrawImage(Point p1)
- {
- this.DrawImage(this._Image, p1.X, p1.Y);
- }
- // Token: 0x060000FB RID: 251 RVA: 0x00005A68 File Offset: 0x00003E68
- protected void DrawImage(int x, int y)
- {
- this.DrawImage(this._Image, x, y);
- }
- // Token: 0x060000FC RID: 252 RVA: 0x00005A7C File Offset: 0x00003E7C
- protected void DrawImage(Image image, Point p1)
- {
- this.DrawImage(image, p1.X, p1.Y);
- }
- // Token: 0x060000FD RID: 253 RVA: 0x00005A98 File Offset: 0x00003E98
- protected void DrawImage(Image image, int x, int y)
- {
- bool flag = image == null;
- if (!flag)
- {
- this.G.DrawImage(image, x, y, image.Width, image.Height);
- }
- }
- // Token: 0x060000FE RID: 254 RVA: 0x00005AD0 File Offset: 0x00003ED0
- protected void DrawGradient(ColorBlend blend, int x, int y, int width, int height)
- {
- this.DrawGradientRectangle = new Rectangle(x, y, width, height);
- this.DrawGradient(blend, this.DrawGradientRectangle);
- }
- // Token: 0x060000FF RID: 255 RVA: 0x00005AF4 File Offset: 0x00003EF4
- protected void DrawGradient(ColorBlend blend, int x, int y, int width, int height, float angle)
- {
- this.DrawGradientRectangle = new Rectangle(x, y, width, height);
- this.DrawGradient(blend, this.DrawGradientRectangle, angle);
- }
- // Token: 0x06000100 RID: 256 RVA: 0x00005B1C File Offset: 0x00003F1C
- protected void DrawGradient(ColorBlend blend, Rectangle r)
- {
- this.DrawGradientBrush = new LinearGradientBrush(r, Color.Empty, Color.Empty, 90f);
- this.DrawGradientBrush.InterpolationColors = blend;
- this.G.FillRectangle(this.DrawGradientBrush, r);
- }
- // Token: 0x06000101 RID: 257 RVA: 0x00005B5C File Offset: 0x00003F5C
- protected void DrawGradient(ColorBlend blend, Rectangle r, float angle)
- {
- this.DrawGradientBrush = new LinearGradientBrush(r, Color.Empty, Color.Empty, angle);
- this.DrawGradientBrush.InterpolationColors = blend;
- this.G.FillRectangle(this.DrawGradientBrush, r);
- }
- // Token: 0x06000102 RID: 258 RVA: 0x00005B98 File Offset: 0x00003F98
- protected void DrawGradient(Color c1, Color c2, int x, int y, int width, int height)
- {
- this.DrawGradientRectangle = new Rectangle(x, y, width, height);
- this.DrawGradient(c1, c2, this.DrawGradientRectangle);
- }
- // Token: 0x06000103 RID: 259 RVA: 0x00005BC0 File Offset: 0x00003FC0
- protected void DrawGradient(Color c1, Color c2, int x, int y, int width, int height, float angle)
- {
- this.DrawGradientRectangle = new Rectangle(x, y, width, height);
- this.DrawGradient(c1, c2, this.DrawGradientRectangle, angle);
- }
- // Token: 0x06000104 RID: 260 RVA: 0x00005BE8 File Offset: 0x00003FE8
- protected void DrawGradient(Color c1, Color c2, Rectangle r)
- {
- this.DrawGradientBrush = new LinearGradientBrush(r, c1, c2, 90f);
- this.G.FillRectangle(this.DrawGradientBrush, r);
- }
- // Token: 0x06000105 RID: 261 RVA: 0x00005C14 File Offset: 0x00004014
- protected void DrawGradient(Color c1, Color c2, Rectangle r, float angle)
- {
- this.DrawGradientBrush = new LinearGradientBrush(r, c1, c2, angle);
- this.G.FillRectangle(this.DrawGradientBrush, r);
- }
- // Token: 0x06000106 RID: 262 RVA: 0x00005C3C File Offset: 0x0000403C
- public void DrawRadial(ColorBlend blend, int x, int y, int width, int height)
- {
- this.DrawRadialRectangle = new Rectangle(x, y, width, height);
- this.DrawRadial(blend, this.DrawRadialRectangle, width / 2, height / 2);
- }
- // Token: 0x06000107 RID: 263 RVA: 0x00005C68 File Offset: 0x00004068
- public void DrawRadial(ColorBlend blend, int x, int y, int width, int height, Point center)
- {
- this.DrawRadialRectangle = new Rectangle(x, y, width, height);
- this.DrawRadial(blend, this.DrawRadialRectangle, center.X, center.Y);
- }
- // Token: 0x06000108 RID: 264 RVA: 0x00005C9C File Offset: 0x0000409C
- public void DrawRadial(ColorBlend blend, int x, int y, int width, int height, int cx, int cy)
- {
- this.DrawRadialRectangle = new Rectangle(x, y, width, height);
- this.DrawRadial(blend, this.DrawRadialRectangle, cx, cy);
- }
- // Token: 0x06000109 RID: 265 RVA: 0x00005CC4 File Offset: 0x000040C4
- public void DrawRadial(ColorBlend blend, Rectangle r)
- {
- this.DrawRadial(blend, r, r.Width / 2, r.Height / 2);
- }
- // Token: 0x0600010A RID: 266 RVA: 0x00005CE4 File Offset: 0x000040E4
- public void DrawRadial(ColorBlend blend, Rectangle r, Point center)
- {
- this.DrawRadial(blend, r, center.X, center.Y);
- }
- // Token: 0x0600010B RID: 267 RVA: 0x00005D00 File Offset: 0x00004100
- public void DrawRadial(ColorBlend blend, Rectangle r, int cx, int cy)
- {
- this.DrawRadialPath.Reset();
- checked
- {
- this.DrawRadialPath.AddEllipse(r.X, r.Y, r.Width - 1, r.Height - 1);
- this.DrawRadialBrush1 = new PathGradientBrush(this.DrawRadialPath);
- PathGradientBrush arg_71_0 = this.DrawRadialBrush1;
- Point p = new Point(r.X + cx, r.Y + cy);
- arg_71_0.CenterPoint = p;
- this.DrawRadialBrush1.InterpolationColors = blend;
- bool flag = this.G.SmoothingMode == SmoothingMode.AntiAlias;
- if (flag)
- {
- this.G.FillEllipse(this.DrawRadialBrush1, r.X + 1, r.Y + 1, r.Width - 3, r.Height - 3);
- }
- else
- {
- this.G.FillEllipse(this.DrawRadialBrush1, r);
- }
- }
- }
- // Token: 0x0600010C RID: 268 RVA: 0x00005DF4 File Offset: 0x000041F4
- protected void DrawRadial(Color c1, Color c2, int x, int y, int width, int height)
- {
- this.DrawRadialRectangle = new Rectangle(x, y, width, height);
- this.DrawRadial(c1, c2, this.DrawRadialRectangle);
- }
- // Token: 0x0600010D RID: 269 RVA: 0x00005E1C File Offset: 0x0000421C
- protected void DrawRadial(Color c1, Color c2, int x, int y, int width, int height, float angle)
- {
- this.DrawRadialRectangle = new Rectangle(x, y, width, height);
- this.DrawRadial(c1, c2, this.DrawRadialRectangle, angle);
- }
- // Token: 0x0600010E RID: 270 RVA: 0x00005E44 File Offset: 0x00004244
- protected void DrawRadial(Color c1, Color c2, Rectangle r)
- {
- this.DrawRadialBrush2 = new LinearGradientBrush(r, c1, c2, 90f);
- this.G.FillEllipse(this.DrawRadialBrush2, r);
- }
- // Token: 0x0600010F RID: 271 RVA: 0x00005E70 File Offset: 0x00004270
- protected void DrawRadial(Color c1, Color c2, Rectangle r, float angle)
- {
- this.DrawRadialBrush2 = new LinearGradientBrush(r, c1, c2, angle);
- this.G.FillEllipse(this.DrawRadialBrush2, r);
- }
- // Token: 0x06000110 RID: 272 RVA: 0x00005E98 File Offset: 0x00004298
- public GraphicsPath CreateRound(int x, int y, int width, int height, int slope)
- {
- this.CreateRoundRectangle = new Rectangle(x, y, width, height);
- return this.CreateRound(this.CreateRoundRectangle, slope);
- }
- // Token: 0x06000111 RID: 273 RVA: 0x00005ECC File Offset: 0x000042CC
- public GraphicsPath CreateRound(Rectangle r, int slope)
- {
- this.CreateRoundPath = new GraphicsPath(FillMode.Winding);
- this.CreateRoundPath.AddArc(r.X, r.Y, slope, slope, 180f, 90f);
- checked
- {
- this.CreateRoundPath.AddArc(r.Right - slope, r.Y, slope, slope, 270f, 90f);
- this.CreateRoundPath.AddArc(r.Right - slope, r.Bottom - slope, slope, slope, 0f, 90f);
- this.CreateRoundPath.AddArc(r.X, r.Bottom - slope, slope, slope, 90f, 90f);
- this.CreateRoundPath.CloseFigure();
- return this.CreateRoundPath;
- }
- }
- // Token: 0x0400003B RID: 59
- protected Graphics G;
- // Token: 0x0400003C RID: 60
- protected Bitmap B;
- // Token: 0x0400003D RID: 61
- private bool DoneCreation;
- // Token: 0x0400003E RID: 62
- private bool InPosition;
- // Token: 0x0400003F RID: 63
- protected MouseState State;
- // Token: 0x04000040 RID: 64
- private bool _BackColor;
- // Token: 0x04000041 RID: 65
- private bool _NoRounding;
- // Token: 0x04000042 RID: 66
- private Image _Image;
- // Token: 0x04000043 RID: 67
- private bool _Transparent;
- // Token: 0x04000044 RID: 68
- private Dictionary<string, Color> Items;
- // Token: 0x04000045 RID: 69
- private string _Customization;
- // Token: 0x04000046 RID: 70
- private Size _ImageSize;
- // Token: 0x04000047 RID: 71
- private int _LockWidth;
- // Token: 0x04000048 RID: 72
- private int _LockHeight;
- // Token: 0x04000049 RID: 73
- private bool _IsAnimated;
- // Token: 0x0400004A RID: 74
- private Rectangle OffsetReturnRectangle;
- // Token: 0x0400004B RID: 75
- private Size OffsetReturnSize;
- // Token: 0x0400004C RID: 76
- private Point OffsetReturnPoint;
- // Token: 0x0400004D RID: 77
- private Point CenterReturn;
- // Token: 0x0400004E RID: 78
- private Bitmap MeasureBitmap;
- // Token: 0x0400004F RID: 79
- private Graphics MeasureGraphics;
- // Token: 0x04000050 RID: 80
- private SolidBrush DrawPixelBrush;
- // Token: 0x04000051 RID: 81
- private SolidBrush DrawCornersBrush;
- // Token: 0x04000052 RID: 82
- private Point DrawTextPoint;
- // Token: 0x04000053 RID: 83
- private Size DrawTextSize;
- // Token: 0x04000054 RID: 84
- private Point DrawImagePoint;
- // Token: 0x04000055 RID: 85
- private LinearGradientBrush DrawGradientBrush;
- // Token: 0x04000056 RID: 86
- private Rectangle DrawGradientRectangle;
- // Token: 0x04000057 RID: 87
- private GraphicsPath DrawRadialPath;
- // Token: 0x04000058 RID: 88
- private PathGradientBrush DrawRadialBrush1;
- // Token: 0x04000059 RID: 89
- private LinearGradientBrush DrawRadialBrush2;
- // Token: 0x0400005A RID: 90
- private Rectangle DrawRadialRectangle;
- // Token: 0x0400005B RID: 91
- private GraphicsPath CreateRoundPath;
- // Token: 0x0400005C RID: 92
- private Rectangle CreateRoundRectangle;
- }
- internal class TwitchTextBox : ThemeControl154
- {
- public HorizontalAlignment TextAlign
- {
- get
- {
- return this._TextAlign;
- }
- set
- {
- this._TextAlign = value;
- bool flag = this.Base != null;
- if (flag)
- {
- this.Base.TextAlign = value;
- }
- }
- }
- public int MaxLength
- {
- get
- {
- return this._MaxLength;
- }
- set
- {
- this._MaxLength = value;
- bool flag = this.Base != null;
- if (flag)
- {
- this.Base.MaxLength = value;
- }
- }
- }
- public bool ReadOnly
- {
- get
- {
- return this._ReadOnly;
- }
- set
- {
- this._ReadOnly = value;
- bool flag = this.Base != null;
- if (flag)
- {
- this.Base.ReadOnly = value;
- }
- }
- }
- public bool UseSystemPasswordChar
- {
- get
- {
- return this._UseSystemPasswordChar;
- }
- set
- {
- this._UseSystemPasswordChar = value;
- bool flag = this.Base != null;
- if (flag)
- {
- this.Base.UseSystemPasswordChar = value;
- }
- }
- }
- public bool Multiline
- {
- get
- {
- return this._Multiline;
- }
- set
- {
- this._Multiline = value;
- bool flag = this.Base != null;
- checked
- {
- if (flag)
- {
- this.Base.Multiline = value;
- if (value)
- {
- this.LockHeight = 0;
- this.Base.Height = this.Height - 11;
- }
- else
- {
- this.LockHeight = this.Base.Height + 11;
- }
- }
- }
- }
- }
- public override string Text
- {
- get
- {
- return base.Text;
- }
- set
- {
- base.Text = value;
- bool flag = this.Base != null;
- if (flag)
- {
- this.Base.Text = value;
- }
- }
- }
- public override Font Font
- {
- get
- {
- return base.Font;
- }
- set
- {
- base.Font = value;
- bool flag = this.Base != null;
- checked
- {
- if (flag)
- {
- this.Base.Font = value;
- Control arg_37_0 = this.Base;
- Point location = new Point(3, 5);
- arg_37_0.Location = location;
- this.Base.Width = this.Width - 6;
- flag = !this._Multiline;
- if (flag)
- {
- this.LockHeight = this.Base.Height + 11;
- }
- }
- }
- }
- }
- protected override void OnCreation()
- {
- bool flag = !this.Controls.Contains(this.Base);
- if (flag)
- {
- this.Controls.Add(this.Base);
- }
- }
- public TwitchTextBox()
- {
- this._TextAlign = HorizontalAlignment.Left;
- this._MaxLength = 32767;
- this.Base = new TextBox();
- Size size = new Size(245, 4);
- this.Size = size;
- this.Base.Font = this.Font;
- this.Base.Text = this.Text;
- this.Base.MaxLength = this._MaxLength;
- this.Base.Multiline = this._Multiline;
- this.Base.ReadOnly = this._ReadOnly;
- this.Base.UseSystemPasswordChar = this._UseSystemPasswordChar;
- this.Base.BorderStyle = BorderStyle.None;
- Control arg_C5_0 = this.Base;
- Point location = new Point(5, 5);
- arg_C5_0.Location = location;
- checked
- {
- this.Base.Width = this.Width - 10;
- bool multiline = this._Multiline;
- if (multiline)
- {
- this.Base.Height = this.Height - 11;
- }
- else
- {
- this.LockHeight = this.Base.Height + 11;
- }
- this.Base.TextChanged += new EventHandler(this.OnBaseTextChanged);
- this.Base.KeyDown += new KeyEventHandler(this.OnBaseKeyDown);
- this.SetColor("Text", Color.White);
- this.SetColor("Back", 0, 0, 0);
- this.SetColor("Border1", Color.FromArgb(30, 30, 30));
- this.SetColor("Border2", Color.FromArgb(30, 30, 30));
- }
- }
- protected override void ColorHook()
- {
- this.C1 = Color.FromArgb(50, 50, 50);
- this.P1 = this.GetPen("Border1");
- this.P2 = this.GetPen("Border2");
- this.Base.ForeColor = Color.White;
- this.Base.BackColor = this.C1;
- }
- protected override void PaintHook()
- {
- this.G.Clear(this.C1);
- this.SetColor("Text", Color.White);
- this.DrawBorders(this.P1, 1);
- }
- private void OnBaseTextChanged(object s, EventArgs e)
- {
- this.Text = this.Base.Text;
- }
- private void OnBaseKeyDown(object s, KeyEventArgs e)
- {
- bool flag = e.Control && e.KeyCode == Keys.A;
- if (flag)
- {
- this.Base.SelectAll();
- e.SuppressKeyPress = true;
- }
- }
- protected override void OnResize(EventArgs e)
- {
- Control arg_12_0 = this.Base;
- Point location = new Point(5, 5);
- arg_12_0.Location = location;
- checked
- {
- this.Base.Width = this.Width - 10;
- bool multiline = this._Multiline;
- if (multiline)
- {
- this.Base.Height = this.Height - 11;
- }
- base.OnResize(e);
- }
- }
- private HorizontalAlignment _TextAlign;
- private int _MaxLength;
- private bool _ReadOnly;
- private bool _UseSystemPasswordChar;
- private bool _Multiline;
- private TextBox Base;
- private Color C1;
- private Pen P1;
- private Pen P2;
- }
- internal class TwitchWhiteTextBox : ThemeControl154
- {
- // Token: 0x17000043 RID: 67
- // (get) Token: 0x0600015D RID: 349 RVA: 0x00008670 File Offset: 0x00006A70
- // (set) Token: 0x0600015E RID: 350 RVA: 0x00008688 File Offset: 0x00006A88
- public HorizontalAlignment TextAlign
- {
- get
- {
- return this._TextAlign;
- }
- set
- {
- this._TextAlign = value;
- bool flag = this.Base != null;
- if (flag)
- {
- this.Base.TextAlign = value;
- }
- }
- }
- // Token: 0x17000044 RID: 68
- // (get) Token: 0x0600015F RID: 351 RVA: 0x000086BC File Offset: 0x00006ABC
- // (set) Token: 0x06000160 RID: 352 RVA: 0x000086D4 File Offset: 0x00006AD4
- public int MaxLength
- {
- get
- {
- return this._MaxLength;
- }
- set
- {
- this._MaxLength = value;
- bool flag = this.Base != null;
- if (flag)
- {
- this.Base.MaxLength = value;
- }
- }
- }
- // Token: 0x17000045 RID: 69
- // (get) Token: 0x06000161 RID: 353 RVA: 0x00008708 File Offset: 0x00006B08
- // (set) Token: 0x06000162 RID: 354 RVA: 0x00008720 File Offset: 0x00006B20
- public bool ReadOnly
- {
- get
- {
- return this._ReadOnly;
- }
- set
- {
- this._ReadOnly = value;
- bool flag = this.Base != null;
- if (flag)
- {
- this.Base.ReadOnly = value;
- }
- }
- }
- // Token: 0x17000046 RID: 70
- // (get) Token: 0x06000163 RID: 355 RVA: 0x00008754 File Offset: 0x00006B54
- // (set) Token: 0x06000164 RID: 356 RVA: 0x0000876C File Offset: 0x00006B6C
- public bool UseSystemPasswordChar
- {
- get
- {
- return this._UseSystemPasswordChar;
- }
- set
- {
- this._UseSystemPasswordChar = value;
- bool flag = this.Base != null;
- if (flag)
- {
- this.Base.UseSystemPasswordChar = value;
- }
- }
- }
- // Token: 0x17000047 RID: 71
- // (get) Token: 0x06000165 RID: 357 RVA: 0x000087A0 File Offset: 0x00006BA0
- // (set) Token: 0x06000166 RID: 358 RVA: 0x000087B8 File Offset: 0x00006BB8
- public bool Multiline
- {
- get
- {
- return this._Multiline;
- }
- set
- {
- this._Multiline = value;
- bool flag = this.Base != null;
- checked
- {
- if (flag)
- {
- this.Base.Multiline = value;
- if (value)
- {
- this.LockHeight = 0;
- this.Base.Height = this.Height - 11;
- }
- else
- {
- this.LockHeight = this.Base.Height + 11;
- }
- }
- }
- }
- }
- // Token: 0x17000048 RID: 72
- // (get) Token: 0x06000167 RID: 359 RVA: 0x00008828 File Offset: 0x00006C28
- // (set) Token: 0x06000168 RID: 360 RVA: 0x00008840 File Offset: 0x00006C40
- public override string Text
- {
- get
- {
- return base.Text;
- }
- set
- {
- base.Text = value;
- bool flag = this.Base != null;
- if (flag)
- {
- this.Base.Text = value;
- }
- }
- }
- // Token: 0x17000049 RID: 73
- // (get) Token: 0x06000169 RID: 361 RVA: 0x00008878 File Offset: 0x00006C78
- // (set) Token: 0x0600016A RID: 362 RVA: 0x00008890 File Offset: 0x00006C90
- public override Font Font
- {
- get
- {
- return base.Font;
- }
- set
- {
- base.Font = value;
- bool flag = this.Base != null;
- checked
- {
- if (flag)
- {
- this.Base.Font = value;
- Control arg_37_0 = this.Base;
- Point location = new Point(3, 5);
- arg_37_0.Location = location;
- this.Base.Width = this.Width - 6;
- flag = !this._Multiline;
- if (flag)
- {
- this.LockHeight = this.Base.Height + 11;
- }
- }
- }
- }
- }
- protected override void OnCreation()
- {
- bool flag = !this.Controls.Contains(this.Base);
- if (flag)
- {
- this.Controls.Add(this.Base);
- }
- }
- public string GhostText
- {
- get
- {
- return this._GhostText;
- }
- set
- {
- this._GhostText = value;
- }
- }
- public TwitchWhiteTextBox()
- {
- this._TextAlign = HorizontalAlignment.Left;
- this._MaxLength = 32767;
- this.Base = new TextBox();
- Size size = new Size(245, 4);
- this.Size = size;
- this.Base.Font = this.Font;
- this.Base.Text = this.Text;
- this.Base.MaxLength = this._MaxLength;
- this.Base.Multiline = this._Multiline;
- this.Base.ReadOnly = this._ReadOnly;
- this.Base.UseSystemPasswordChar = this._UseSystemPasswordChar;
- this.Base.BorderStyle = BorderStyle.None;
- Control arg_C5_0 = this.Base;
- Point location = new Point(5, 5);
- arg_C5_0.Location = location;
- checked
- {
- this.Base.Width = this.Width - 10;
- bool multiline = this._Multiline;
- if (multiline)
- {
- this.Base.Height = this.Height - 11;
- }
- else
- {
- this.LockHeight = this.Base.Height + 11;
- }
- this.Base.TextChanged += new EventHandler(this.OnBaseTextChanged);
- this.Base.KeyDown += new KeyEventHandler(this.OnBaseKeyDown);
- this.SetColor("Text", Color.FromArgb(73, 73, 73));
- this.SetColor("Back", 0, 0, 0);
- this.SetColor("Border1", Color.FromArgb(100, 65, 165));
- this.SetColor("Border2", Color.FromArgb(100, 65, 165));
- }
- }
- // Token: 0x0600016F RID: 367 RVA: 0x00008B28 File Offset: 0x00006F28
- protected override void ColorHook()
- {
- this.C1 = Color.White;
- this.P1 = this.GetPen("Border1");
- this.P2 = this.GetPen("Border2");
- this.Base.ForeColor = Color.FromArgb(73, 73, 73);
- this.Base.BackColor = this.C1;
- }
- // Token: 0x06000170 RID: 368 RVA: 0x00008B90 File Offset: 0x00006F90
- protected override void PaintHook()
- {
- this.G.Clear(this.C1);
- this.SetColor("Text", Color.FromArgb(73, 73, 73));
- this.DrawBorders(this.P1, 1);
- this.G.DrawString(this.GhostText, this.Font, Brushes.Gray, 10f, 5f);
- }
- // Token: 0x06000171 RID: 369 RVA: 0x00008C00 File Offset: 0x00007000
- private void OnBaseTextChanged(object s, EventArgs e)
- {
- this.Text = this.Base.Text;
- }
- // Token: 0x06000172 RID: 370 RVA: 0x00008C18 File Offset: 0x00007018
- private void OnBaseKeyDown(object s, KeyEventArgs e)
- {
- bool flag = e.Control && e.KeyCode == Keys.A;
- if (flag)
- {
- this.Base.SelectAll();
- e.SuppressKeyPress = true;
- }
- }
- // Token: 0x06000173 RID: 371 RVA: 0x00008C58 File Offset: 0x00007058
- protected override void OnResize(EventArgs e)
- {
- Control arg_12_0 = this.Base;
- Point location = new Point(5, 5);
- arg_12_0.Location = location;
- checked
- {
- this.Base.Width = this.Width - 10;
- bool multiline = this._Multiline;
- if (multiline)
- {
- this.Base.Height = this.Height - 11;
- }
- base.OnResize(e);
- }
- }
- // Token: 0x04000083 RID: 131
- private HorizontalAlignment _TextAlign;
- // Token: 0x04000084 RID: 132
- private int _MaxLength;
- // Token: 0x04000085 RID: 133
- private bool _ReadOnly;
- // Token: 0x04000086 RID: 134
- private bool _UseSystemPasswordChar;
- // Token: 0x04000087 RID: 135
- private bool _Multiline;
- private string _GhostText;
- // Token: 0x04000089 RID: 137
- private TextBox Base;
- // Token: 0x0400008A RID: 138
- private Color C1;
- private Pen P1;
- private Pen P2;
- }
- internal class TwitchRadiobutton : ThemeControl154
- {
- private static void __ENCAddToList(object value)
- {
- List<WeakReference> _ENCList = TwitchRadiobutton.__ENCList;
- checked
- {
- lock (_ENCList)
- {
- bool flag = TwitchRadiobutton.__ENCList.Count == TwitchRadiobutton.__ENCList.Capacity;
- if (flag)
- {
- int num = 0;
- int arg_3F_0 = 0;
- int num2 = TwitchRadiobutton.__ENCList.Count - 1;
- int num3 = arg_3F_0;
- while (true)
- {
- int arg_90_0 = num3;
- int num4 = num2;
- if (arg_90_0 > num4)
- {
- break;
- }
- WeakReference weakReference = TwitchRadiobutton.__ENCList[num3];
- flag = weakReference.IsAlive;
- if (flag)
- {
- bool flag2 = num3 != num;
- if (flag2)
- {
- TwitchRadiobutton.__ENCList[num] = TwitchRadiobutton.__ENCList[num3];
- }
- num++;
- }
- num3++;
- }
- TwitchRadiobutton.__ENCList.RemoveRange(num, TwitchRadiobutton.__ENCList.Count - num);
- TwitchRadiobutton.__ENCList.Capacity = TwitchRadiobutton.__ENCList.Count;
- }
- TwitchRadiobutton.__ENCList.Add(new WeakReference(RuntimeHelpers.GetObjectValue(value)));
- }
- }
- }
- // Token: 0x1700004F RID: 79
- // (get) Token: 0x06000194 RID: 404 RVA: 0x00009C28 File Offset: 0x00008028
- // (set) Token: 0x06000195 RID: 405 RVA: 0x00009C40 File Offset: 0x00008040
- public bool Checked
- {
- get
- {
- return this._Checked;
- }
- set
- {
- this._Checked = value;
- this.InvalidateControls();
- TwitchRadiobutton.CheckedChangedEventHandler checkedChangedEvent = this.CheckedChangedEvent;
- bool flag = checkedChangedEvent != null;
- if (flag)
- {
- checkedChangedEvent(this);
- }
- this.Invalidate();
- }
- }
- // Token: 0x14000001 RID: 1
- // (add) Token: 0x06000196 RID: 406 RVA: 0x00009C80 File Offset: 0x00008080
- // (remove) Token: 0x06000197 RID: 407 RVA: 0x00009C9C File Offset: 0x0000809C
- public event TwitchRadiobutton.CheckedChangedEventHandler CheckedChanged
- {
- add
- {
- this.CheckedChangedEvent = (TwitchRadiobutton.CheckedChangedEventHandler)Delegate.Combine(this.CheckedChangedEvent, value);
- }
- remove
- {
- this.CheckedChangedEvent = (TwitchRadiobutton.CheckedChangedEventHandler)Delegate.Remove(this.CheckedChangedEvent, value);
- }
- }
- // Token: 0x06000198 RID: 408 RVA: 0x00009CB8 File Offset: 0x000080B8
- protected override void OnCreation()
- {
- this.InvalidateControls();
- }
- // Token: 0x06000199 RID: 409 RVA: 0x00009CC4 File Offset: 0x000080C4
- private void InvalidateControls()
- {
- bool flag = !this.IsHandleCreated || !this._Checked;
- if (!flag)
- {
- try
- {
- IEnumerator enumerator = this.Parent.Controls.GetEnumerator();
- while (enumerator.MoveNext())
- {
- Control control = (Control)enumerator.Current;
- flag = (control != this && control is TwitchRadiobutton);
- if (flag)
- {
- ((TwitchRadiobutton)control).Checked = false;
- }
- }
- }
- finally
- {
- IEnumerator enumerator = this.Parent.Controls.GetEnumerator();
- flag = (enumerator is IDisposable);
- if (flag)
- {
- (enumerator as IDisposable).Dispose();
- }
- }
- }
- }
- // Token: 0x0600019A RID: 410 RVA: 0x00009D70 File Offset: 0x00008170
- protected override void OnMouseDown(MouseEventArgs e)
- {
- bool flag = !this._Checked;
- if (flag)
- {
- this.Checked = true;
- }
- base.OnMouseDown(e);
- }
- // Token: 0x0600019B RID: 411 RVA: 0x00009D9C File Offset: 0x0000819C
- protected override void OnMouseMove(MouseEventArgs e)
- {
- base.OnMouseMove(e);
- this.X = e.X;
- this.Invalidate();
- }
- // Token: 0x0600019C RID: 412 RVA: 0x00009DBC File Offset: 0x000081BC
- protected override void ColorHook()
- {
- this.textcolor = this.GetBrush("Text");
- this.circlecolor = this.GetPen("Circle");
- }
- // Token: 0x0600019D RID: 413 RVA: 0x00009DE4 File Offset: 0x000081E4
- protected override void OnTextChanged(EventArgs e)
- {
- base.OnTextChanged(e);
- }
- // Token: 0x0600019E RID: 414 RVA: 0x00009DF0 File Offset: 0x000081F0
- protected override void PaintHook()
- {
- this.G.Clear(this.BackColor);
- this.G.SmoothingMode = SmoothingMode.HighQuality;
- bool @checked = this._Checked;
- checked
- {
- if (@checked)
- {
- Graphics arg_63_0 = this.G;
- Brush arg_63_1 = new SolidBrush(Color.FromArgb(195, 195, 195));
- Rectangle rectangle = new Rectangle(0, 0, this.Width, this.Height);
- arg_63_0.FillRectangle(arg_63_1, rectangle);
- Graphics arg_A8_0 = this.G;
- Pen arg_A8_1 = new Pen(new SolidBrush(Color.FromArgb(150, 150, 150)));
- rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
- arg_A8_0.DrawRectangle(arg_A8_1, rectangle);
- this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Center, 0, 0);
- }
- else
- {
- Color arg_10D_1 = Color.FromArgb(242, 242, 242);
- Color arg_10D_2 = Color.FromArgb(223, 223, 223);
- Rectangle rectangle = new Rectangle(0, 0, this.Width, this.Height);
- this.DrawGradient(arg_10D_1, arg_10D_2, rectangle, 90f);
- Graphics arg_152_0 = this.G;
- Pen arg_152_1 = new Pen(new SolidBrush(Color.FromArgb(150, 150, 150)));
- rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
- arg_152_0.DrawRectangle(arg_152_1, rectangle);
- this.DrawText(new SolidBrush(Color.FromArgb(30, 30, 30)), HorizontalAlignment.Center, 0, 0);
- }
- }
- }
- // Token: 0x0600019F RID: 415 RVA: 0x00009F74 File Offset: 0x00008374
- public TwitchRadiobutton()
- {
- TwitchRadiobutton.__ENCAddToList(this);
- this.SetColor("Text", Color.Black);
- this.SetColor("Circle", Color.FromArgb(0, 239, 255));
- Point p = new Point(147, 29);
- this.Size = (Size)p;
- this.Cursor = Cursors.Hand;
- }
- // Token: 0x04000094 RID: 148
- private static List<WeakReference> __ENCList = new List<WeakReference>();
- // Token: 0x04000095 RID: 149
- private int X;
- // Token: 0x04000096 RID: 150
- private bool _Checked;
- // Token: 0x04000097 RID: 151
- private TwitchRadiobutton.CheckedChangedEventHandler CheckedChangedEvent;
- // Token: 0x04000098 RID: 152
- private Brush textcolor;
- // Token: 0x04000099 RID: 153
- private Pen circlecolor;
- // Token: 0x02000020 RID: 32
- // (Invoke) Token: 0x060001B5 RID: 437
- public delegate void CheckedChangedEventHandler(object sender);
- }
- internal class TwitchTabControl : TabControl
- {
- private static void __ENCAddToList(object value)
- {
- List<WeakReference> _ENCList = TwitchTabControl.__ENCList;
- checked
- {
- lock (_ENCList)
- {
- bool flag = TwitchTabControl.__ENCList.Count == TwitchTabControl.__ENCList.Capacity;
- if (flag)
- {
- int num = 0;
- int arg_3F_0 = 0;
- int num2 = TwitchTabControl.__ENCList.Count - 1;
- int num3 = arg_3F_0;
- while (true)
- {
- int arg_90_0 = num3;
- int num4 = num2;
- if (arg_90_0 > num4)
- {
- break;
- }
- WeakReference weakReference = TwitchTabControl.__ENCList[num3];
- flag = weakReference.IsAlive;
- if (flag)
- {
- bool flag2 = num3 != num;
- if (flag2)
- {
- TwitchTabControl.__ENCList[num] = TwitchTabControl.__ENCList[num3];
- }
- num++;
- }
- num3++;
- }
- TwitchTabControl.__ENCList.RemoveRange(num, TwitchTabControl.__ENCList.Count - num);
- TwitchTabControl.__ENCList.Capacity = TwitchTabControl.__ENCList.Count;
- }
- TwitchTabControl.__ENCList.Add(new WeakReference(RuntimeHelpers.GetObjectValue(value)));
- }
- }
- }
- public Color Color
- {
- get
- {
- return this._Color;
- }
- set
- {
- this._Color = value;
- }
- }
- public TwitchTabControl()
- {
- TwitchTabControl.__ENCAddToList(this);
- Color color = Color.FromArgb(40, 40, 40);
- this.Color = color;
- this.SetStyle(ControlStyles.UserPaint | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
- this.DoubleBuffered = true;
- this.SizeMode = TabSizeMode.Fixed;
- Size itemSize = new Size(5, 5);
- this.ItemSize = itemSize;
- try
- {
- IEnumerator enumerator = this.TabPages.GetEnumerator();
- while (enumerator.MoveNext())
- {
- TabPage tabPage = (TabPage)enumerator.Current;
- tabPage.BackColor = Color.FromArgb(40, 40, 40);
- }
- }
- finally
- {
- IEnumerator enumerator = this.Parent.Controls.GetEnumerator();
- bool flag = enumerator is IDisposable;
- if (flag)
- {
- (enumerator as IDisposable).Dispose();
- }
- }
- }
- protected override void CreateHandle()
- {
- base.CreateHandle();
- this.Alignment = TabAlignment.Left;
- }
- protected override void OnPaint(PaintEventArgs e)
- {
- Bitmap bitmap = new Bitmap(this.Width, this.Height);
- Graphics graphics = Graphics.FromImage(bitmap);
- graphics.Clear(this.Color);
- bool flag = this.DesignMode;
- checked
- {
- if (flag)
- {
- int arg_3E_0 = 0;
- int num = this.TabCount - 1;
- int num2 = arg_3E_0;
- while (true)
- {
- int arg_9B_0 = num2;
- int num3 = num;
- if (arg_9B_0 > num3)
- {
- break;
- }
- Rectangle tabRect = this.GetTabRect(num2);
- flag = (num2 == this.SelectedIndex);
- if (flag)
- {
- graphics.FillRectangle(new SolidBrush(Color.FromArgb(100, 65, 165)), tabRect);
- }
- else
- {
- graphics.FillRectangle(new SolidBrush(Color.FromArgb(30, 30, 30)), tabRect);
- }
- num2++;
- }
- }
- NewLateBinding.LateCall(e.Graphics, null, "DrawImage", new object[]
- {
- RuntimeHelpers.GetObjectValue(bitmap.Clone()),
- 0,
- 0
- }, null, null, null, true);
- graphics.Dispose();
- bitmap.Dispose();
- base.OnPaint(e);
- }
- }
- private static List<WeakReference> __ENCList = new List<WeakReference>();
- private Color _Color;
- }
- internal class TwitchTrackBar : ThemeControl154
- {
- // Token: 0x06000177 RID: 375 RVA: 0x00008D2C File Offset: 0x0000712C
- public TwitchTrackBar()
- {
- this.Width = 100;
- this.Height = 10;
- this.Transparent = true;
- this.BackColor = Color.Transparent;
- this.Cursor = Cursors.Hand;
- Size size = new Size(125, 30);
- this.Size = size;
- }
- // Token: 0x06000178 RID: 376 RVA: 0x00008D88 File Offset: 0x00007188
- protected override void ColorHook()
- {
- }
- // Token: 0x06000179 RID: 377 RVA: 0x00008D8C File Offset: 0x0000718C
- protected override void PaintHook()
- {
- this.G.Clear(this.BackColor);
- checked
- {
- switch (this.State)
- {
- case MouseState.None:
- {
- Color arg_148_1 = Color.FromArgb(222, 209, 246);
- Color arg_148_2 = Color.FromArgb(171, 134, 231);
- Rectangle rectangle = new Rectangle(0, 10, this.Width, 10);
- this.DrawGradient(arg_148_1, arg_148_2, rectangle);
- Graphics arg_16D_0 = this.G;
- Pen arg_16D_1 = Pens.Black;
- rectangle = new Rectangle(0, 10, this.Width, 10);
- arg_16D_0.DrawRectangle(arg_16D_1, rectangle);
- Color arg_1B1_1 = Color.FromArgb(207, 207, 207);
- Color arg_1B1_2 = Color.FromArgb(150, 150, 150);
- rectangle = new Rectangle(this.Width - 7, 6, 7, 17);
- this.DrawGradient(arg_1B1_1, arg_1B1_2, rectangle);
- Graphics arg_1D7_0 = this.G;
- Pen arg_1D7_1 = Pens.Black;
- rectangle = new Rectangle(this.Width - 7, 6, 7, 17);
- arg_1D7_0.DrawRectangle(arg_1D7_1, rectangle);
- break;
- }
- case MouseState.Over:
- {
- Color arg_70_1 = Color.FromArgb(222, 209, 246);
- Color arg_70_2 = Color.FromArgb(171, 134, 231);
- Rectangle rectangle = new Rectangle(0, 10, this.Width, 10);
- this.DrawGradient(arg_70_1, arg_70_2, rectangle);
- Graphics arg_95_0 = this.G;
- Pen arg_95_1 = Pens.Black;
- rectangle = new Rectangle(0, 10, this.Width, 10);
- arg_95_0.DrawRectangle(arg_95_1, rectangle);
- Color arg_D9_1 = Color.FromArgb(245, 245, 245);
- Color arg_D9_2 = Color.FromArgb(206, 206, 206);
- rectangle = new Rectangle(this.Width - 7, 6, 7, 17);
- this.DrawGradient(arg_D9_1, arg_D9_2, rectangle);
- Graphics arg_FF_0 = this.G;
- Pen arg_FF_1 = Pens.Black;
- rectangle = new Rectangle(this.Width - 7, 6, 7, 17);
- arg_FF_0.DrawRectangle(arg_FF_1, rectangle);
- break;
- }
- case MouseState.Down:
- {
- Color arg_220_1 = Color.FromArgb(222, 209, 246);
- Color arg_220_2 = Color.FromArgb(171, 134, 231);
- Rectangle rectangle = new Rectangle(0, 10, this.Width, 10);
- this.DrawGradient(arg_220_1, arg_220_2, rectangle);
- Graphics arg_245_0 = this.G;
- Pen arg_245_1 = Pens.Black;
- rectangle = new Rectangle(0, 10, this.Width, 10);
- arg_245_0.DrawRectangle(arg_245_1, rectangle);
- Color arg_280_1 = Color.FromArgb(144, 144, 144);
- Color arg_280_2 = Color.FromArgb(100, 100, 100);
- rectangle = new Rectangle(this.Width - 7, 6, 7, 17);
- this.DrawGradient(arg_280_1, arg_280_2, rectangle);
- Graphics arg_2A6_0 = this.G;
- Pen arg_2A6_1 = Pens.Black;
- rectangle = new Rectangle(this.Width - 7, 6, 7, 17);
- arg_2A6_0.DrawRectangle(arg_2A6_1, rectangle);
- break;
- }
- default:
- {
- Color arg_2EF_1 = Color.FromArgb(222, 209, 246);
- Color arg_2EF_2 = Color.FromArgb(171, 134, 231);
- Rectangle rectangle = new Rectangle(0, 10, this.Width, 10);
- this.DrawGradient(arg_2EF_1, arg_2EF_2, rectangle);
- Graphics arg_314_0 = this.G;
- Pen arg_314_1 = Pens.Black;
- rectangle = new Rectangle(0, 10, this.Width, 10);
- arg_314_0.DrawRectangle(arg_314_1, rectangle);
- Color arg_358_1 = Color.FromArgb(207, 207, 207);
- Color arg_358_2 = Color.FromArgb(150, 150, 150);
- rectangle = new Rectangle(this.Width - 7, 6, 7, 17);
- this.DrawGradient(arg_358_1, arg_358_2, rectangle);
- Graphics arg_37E_0 = this.G;
- Pen arg_37E_1 = Pens.Black;
- rectangle = new Rectangle(this.Width - 7, 6, 7, 17);
- arg_37E_0.DrawRectangle(arg_37E_1, rectangle);
- break;
- }
- }
- }
- }
- }
- internal class TwitchTheme : ThemeContainer154
- {
- public bool Fill
- {
- get
- {
- return this._Fill;
- }
- set
- {
- this._Fill = value;
- }
- }
- public TwitchTheme()
- {
- this.TransparencyKey = Color.Fuchsia;
- this.BackColor = Color.Red;
- this.Font = new Font("Segoe UI", 9f);
- this.SetColor("Border", this.BackColor);
- this.Fill = true;
- }
- protected override void ColorHook()
- {
- this.Border = this.GetColor("Border");
- this.BackColor = Color.White;
- }
- protected override void PaintHook()
- {
- this.G.Clear(this.Border);
- Graphics arg_35_0 = this.G;
- Brush arg_35_1 = Brushes.White;
- Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
- arg_35_0.FillRectangle(arg_35_1, rect);
- Graphics arg_64_0 = this.G;
- Brush arg_64_1 = new SolidBrush(Color.FromArgb(40, 40, 40));
- rect = new Rectangle(0, 0, this.Width, 30);
- arg_64_0.FillRectangle(arg_64_1, rect);
- Graphics arg_9F_0 = this.G;
- Brush arg_9F_1 = new SolidBrush(Color.FromArgb(40, 40, 40));
- checked
- {
- rect = new Rectangle(this.Width - 10, 30, 10, this.Height - 30);
- arg_9F_0.FillRectangle(arg_9F_1, rect);
- Graphics arg_D6_0 = this.G;
- Brush arg_D6_1 = new SolidBrush(Color.FromArgb(40, 40, 40));
- rect = new Rectangle(0, this.Height - 10, this.Width, 10);
- arg_D6_0.FillRectangle(arg_D6_1, rect);
- this.DrawCorners(Color.Fuchsia);
- this.G.DrawString(this.FindForm().Text, this.Font, Brushes.White, 5f, 6f);
- bool fill = this.Fill;
- if (fill)
- {
- Graphics arg_14B_0 = this.G;
- Brush arg_14B_1 = new SolidBrush(Color.FromArgb(40, 40, 40));
- rect = new Rectangle(0, 0, this.Width, this.Height);
- arg_14B_0.FillRectangle(arg_14B_1, rect);
- this.DrawCorners(Color.Fuchsia);
- this.G.DrawString(this.FindForm().Text, this.Font, Brushes.White, 5f, 6f);
- }
- }
- }
- private bool _Fill;
- private Color Border;
- }
- internal struct Bloom
- {
- public string Name
- {
- get
- {
- return this._Name;
- }
- }
- public Color Value
- {
- get
- {
- return this._Value;
- }
- set
- {
- this._Value = value;
- }
- }
- public string ValueHex
- {
- get
- {
- return "#" + this._Value.R.ToString("X2", null) + this._Value.G.ToString("X2", null) + this._Value.B.ToString("X2", null);
- }
- set
- {
- try
- {
- this._Value = ColorTranslator.FromHtml(value);
- }
- catch (Exception arg_10_0)
- {
- ProjectData.SetProjectError(arg_10_0);
- ProjectData.ClearProjectError();
- }
- }
- }
- public Bloom(string name, Color value)
- {
- this = default(Bloom);
- this._Name = name;
- this._Value = value;
- }
- public string _Name;
- private Color _Value;
- }
- internal sealed class ThemeShare
- {
- private static void HandleCallbacks(IntPtr state, bool reserve)
- {
- ThemeShare.Invalidate = (ThemeShare.Frames >= 50);
- bool invalidate = ThemeShare.Invalidate;
- if (invalidate)
- {
- ThemeShare.Frames = 0;
- }
- List<ThemeShare.AnimationDelegate> callbacks = ThemeShare.Callbacks;
- checked
- {
- lock (callbacks)
- {
- int arg_3E_0 = 0;
- int num = ThemeShare.Callbacks.Count - 1;
- int num2 = arg_3E_0;
- while (true)
- {
- int arg_62_0 = num2;
- int num3 = num;
- if (arg_62_0 > num3)
- {
- break;
- }
- ThemeShare.Callbacks[num2](ThemeShare.Invalidate);
- num2++;
- }
- }
- ThemeShare.Frames += 10;
- }
- }
- private static void InvalidateThemeTimer()
- {
- bool flag = ThemeShare.Callbacks.Count == 0;
- if (flag)
- {
- ThemeShare.ThemeTimer.Delete();
- }
- else
- {
- ThemeShare.ThemeTimer.Create(0u, 10u, new PrecisionTimer.TimerDelegate(ThemeShare.HandleCallbacks));
- }
- }
- public static void AddAnimationCallback(ThemeShare.AnimationDelegate callback)
- {
- List<ThemeShare.AnimationDelegate> callbacks = ThemeShare.Callbacks;
- lock (callbacks)
- {
- bool flag = ThemeShare.Callbacks.Contains(callback);
- if (!flag)
- {
- ThemeShare.Callbacks.Add(callback);
- ThemeShare.InvalidateThemeTimer();
- }
- }
- }
- // Token: 0x06000116 RID: 278 RVA: 0x000060FC File Offset: 0x000044FC
- public static void RemoveAnimationCallback(ThemeShare.AnimationDelegate callback)
- {
- List<ThemeShare.AnimationDelegate> callbacks = ThemeShare.Callbacks;
- lock (callbacks)
- {
- bool flag = !ThemeShare.Callbacks.Contains(callback);
- if (!flag)
- {
- ThemeShare.Callbacks.Remove(callback);
- ThemeShare.InvalidateThemeTimer();
- }
- }
- }
- // Token: 0x0400005D RID: 93
- private static int Frames;
- // Token: 0x0400005E RID: 94
- private static bool Invalidate;
- // Token: 0x0400005F RID: 95
- public static PrecisionTimer ThemeTimer = new PrecisionTimer();
- // Token: 0x04000060 RID: 96
- private const int FPS = 50;
- // Token: 0x04000061 RID: 97
- private const int Rate = 10;
- // Token: 0x04000062 RID: 98
- private static List<ThemeShare.AnimationDelegate> Callbacks = new List<ThemeShare.AnimationDelegate>();
- // Token: 0x0200001E RID: 30
- // (Invoke) Token: 0x060001AD RID: 429
- public delegate void AnimationDelegate(bool invalidate);
- }
- internal sealed class Draw
- {
- // Token: 0x06000125 RID: 293 RVA: 0x00006378 File Offset: 0x00004778
- public static GraphicsPath RoundRect(Rectangle Rectangle, int Curve)
- {
- GraphicsPath graphicsPath = new GraphicsPath();
- checked
- {
- int num = Curve * 2;
- GraphicsPath arg_2F_0 = graphicsPath;
- Rectangle rect = new Rectangle(Rectangle.X, Rectangle.Y, num, num);
- arg_2F_0.AddArc(rect, -180f, 90f);
- GraphicsPath arg_63_0 = graphicsPath;
- rect = new Rectangle(Rectangle.Width - num + Rectangle.X, Rectangle.Y, num, num);
- arg_63_0.AddArc(rect, -90f, 90f);
- GraphicsPath arg_A1_0 = graphicsPath;
- rect = new Rectangle(Rectangle.Width - num + Rectangle.X, Rectangle.Height - num + Rectangle.Y, num, num);
- arg_A1_0.AddArc(rect, 0f, 90f);
- GraphicsPath arg_D5_0 = graphicsPath;
- rect = new Rectangle(Rectangle.X, Rectangle.Height - num + Rectangle.Y, num, num);
- arg_D5_0.AddArc(rect, 90f, 90f);
- GraphicsPath arg_118_0 = graphicsPath;
- Point point = new Point(Rectangle.X, Rectangle.Height - num + Rectangle.Y);
- Point arg_118_1 = point;
- Point pt = new Point(Rectangle.X, Curve + Rectangle.Y);
- arg_118_0.AddLine(arg_118_1, pt);
- return graphicsPath;
- }
- }
- // Token: 0x06000126 RID: 294 RVA: 0x000064A8 File Offset: 0x000048A8
- public static GraphicsPath RoundRect(int X, int Y, int Width, int Height, int Curve)
- {
- Rectangle rectangle = new Rectangle(X, Y, Width, Height);
- GraphicsPath graphicsPath = new GraphicsPath();
- checked
- {
- int num = Curve * 2;
- GraphicsPath arg_3D_0 = graphicsPath;
- Rectangle rect = new Rectangle(rectangle.X, rectangle.Y, num, num);
- arg_3D_0.AddArc(rect, -180f, 90f);
- GraphicsPath arg_72_0 = graphicsPath;
- rect = new Rectangle(rectangle.Width - num + rectangle.X, rectangle.Y, num, num);
- arg_72_0.AddArc(rect, -90f, 90f);
- GraphicsPath arg_B1_0 = graphicsPath;
- rect = new Rectangle(rectangle.Width - num + rectangle.X, rectangle.Height - num + rectangle.Y, num, num);
- arg_B1_0.AddArc(rect, 0f, 90f);
- GraphicsPath arg_E6_0 = graphicsPath;
- rect = new Rectangle(rectangle.X, rectangle.Height - num + rectangle.Y, num, num);
- arg_E6_0.AddArc(rect, 90f, 90f);
- GraphicsPath arg_12A_0 = graphicsPath;
- Point point = new Point(rectangle.X, rectangle.Height - num + rectangle.Y);
- Point arg_12A_1 = point;
- Point pt = new Point(rectangle.X, Curve + rectangle.Y);
- arg_12A_0.AddLine(arg_12A_1, pt);
- return graphicsPath;
- }
- }
- private static Image ImageFromCode(ref string str)
- {
- byte[] array = Convert.FromBase64String(str);
- MemoryStream memoryStream = new MemoryStream(array, 0, array.Length);
- memoryStream.Write(array, 0, array.Length);
- return Image.FromStream(memoryStream, true);
- }
- public static TextureBrush TiledTextureFromCode(string str)
- {
- return new TextureBrush(Draw.ImageFromCode(ref str), WrapMode.Tile);
- }
- }
- internal class Methods
- {
- public Methods()
- {
- }
- public static void SelectTab(int Num, TwitchTabControl Control)
- {
- Control.SelectedIndex = checked(Num - 1);
- }
- }
- internal enum MouseState : byte
- {
- None,
- Over,
- Down,
- Block
- }
- internal class PrecisionTimer : IDisposable
- {
- // Token: 0x0600011D RID: 285 RVA: 0x00006264 File Offset: 0x00004664
- public PrecisionTimer()
- {
- }
- public bool Enabled
- {
- get
- {
- return this._Enabled;
- }
- }
- [DllImport("kernel32.dll")]
- private static extern bool CreateTimerQueueTimer(ref IntPtr handle, IntPtr queue, PrecisionTimer.TimerDelegate callback, IntPtr state, uint dueTime, uint period, uint flags);
- [DllImport("kernel32.dll")]
- private static extern bool DeleteTimerQueueTimer(IntPtr queue, IntPtr handle, IntPtr callback);
- public void Create(uint dueTime, uint period, PrecisionTimer.TimerDelegate callback)
- {
- bool flag = this._Enabled;
- if (!flag)
- {
- this.TimerCallback = callback;
- bool flag2 = PrecisionTimer.CreateTimerQueueTimer(ref this.Handle, IntPtr.Zero, this.TimerCallback, IntPtr.Zero, dueTime, period, 0u);
- flag = !flag2;
- if (flag)
- {
- this.ThrowNewException("CreateTimerQueueTimer");
- }
- this._Enabled = flag2;
- }
- }
- public void Delete()
- {
- bool flag = !this._Enabled;
- if (!flag)
- {
- bool flag2 = PrecisionTimer.DeleteTimerQueueTimer(IntPtr.Zero, this.Handle, IntPtr.Zero);
- flag = (!flag2 && Marshal.GetLastWin32Error() != 997);
- if (flag)
- {
- this.ThrowNewException("DeleteTimerQueueTimer");
- }
- this._Enabled = !flag2;
- }
- }
- // Token: 0x06000123 RID: 291 RVA: 0x0000634C File Offset: 0x0000474C
- private void ThrowNewException(string name)
- {
- throw new Exception(string.Format("{0} failed. Win32Error: {1}", name, Marshal.GetLastWin32Error()));
- }
- // Token: 0x06000124 RID: 292 RVA: 0x0000636C File Offset: 0x0000476C
- public void Dispose()
- {
- this.Delete();
- }
- // Token: 0x0400006A RID: 106
- private bool _Enabled;
- // Token: 0x0400006B RID: 107
- private IntPtr Handle;
- // Token: 0x0400006C RID: 108
- private PrecisionTimer.TimerDelegate TimerCallback;
- public delegate void TimerDelegate(IntPtr r1, bool r2);
- }
- public class RedemptionControlBox : Control
- {
- private static void __ENCAddToList(object value)
- {
- List<WeakReference> _ENCList = RedemptionControlBox.__ENCList;
- checked
- {
- lock (_ENCList)
- {
- bool flag = RedemptionControlBox.__ENCList.Count == RedemptionControlBox.__ENCList.Capacity;
- if (flag)
- {
- int num = 0;
- int arg_3F_0 = 0;
- int num2 = RedemptionControlBox.__ENCList.Count - 1;
- int num3 = arg_3F_0;
- while (true)
- {
- int arg_90_0 = num3;
- int num4 = num2;
- if (arg_90_0 > num4)
- {
- break;
- }
- WeakReference weakReference = RedemptionControlBox.__ENCList[num3];
- flag = weakReference.IsAlive;
- if (flag)
- {
- bool flag2 = num3 != num;
- if (flag2)
- {
- RedemptionControlBox.__ENCList[num] = RedemptionControlBox.__ENCList[num3];
- }
- num++;
- }
- num3++;
- }
- RedemptionControlBox.__ENCList.RemoveRange(num, RedemptionControlBox.__ENCList.Count - num);
- RedemptionControlBox.__ENCList.Capacity = RedemptionControlBox.__ENCList.Count;
- }
- RedemptionControlBox.__ENCList.Add(new WeakReference(RuntimeHelpers.GetObjectValue(value)));
- }
- }
- }
- // Token: 0x060001A2 RID: 418 RVA: 0x0000A0FC File Offset: 0x000084FC
- public RedemptionControlBox()
- {
- RedemptionControlBox.__ENCAddToList(this);
- this.ButtonState = RedemptionControlBox.ButtonHover.None;
- this.DoubleBuffered = true;
- this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
- this.SetStyle(ControlStyles.UserPaint, true);
- this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
- this.SetStyle(ControlStyles.ResizeRedraw, true);
- this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
- this.ForeColor = Color.White;
- this.BackColor = Color.Transparent;
- this.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
- }
- // Token: 0x060001A3 RID: 419 RVA: 0x0000A184 File Offset: 0x00008584
- protected override void OnResize(EventArgs e)
- {
- base.OnResize(e);
- Size size = new Size(60, 25);
- this.Size = size;
- }
- // Token: 0x060001A4 RID: 420 RVA: 0x0000A1B0 File Offset: 0x000085B0
- protected override void OnMouseMove(MouseEventArgs e)
- {
- base.OnMouseMove(e);
- int x = e.Location.X;
- int y = e.Location.Y;
- bool flag = y > 0 && y < checked(this.Height - 2);
- if (flag)
- {
- bool flag2 = x > 0 && x < 30;
- if (flag2)
- {
- this.ButtonState = RedemptionControlBox.ButtonHover.Minimize;
- }
- else
- {
- flag2 = (x > 31 && x < this.Width);
- if (flag2)
- {
- this.ButtonState = RedemptionControlBox.ButtonHover.Close;
- }
- else
- {
- this.ButtonState = RedemptionControlBox.ButtonHover.None;
- }
- }
- }
- else
- {
- this.ButtonState = RedemptionControlBox.ButtonHover.None;
- }
- this.Invalidate();
- }
- // Token: 0x060001A5 RID: 421 RVA: 0x0000A258 File Offset: 0x00008658
- protected override void OnPaint(PaintEventArgs e)
- {
- Bitmap bitmap = new Bitmap(this.Width, this.Height);
- Graphics graphics = Graphics.FromImage(bitmap);
- graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
- base.OnPaint(e);
- graphics.Clear(this.BackColor);
- Font font = new Font("Marlett", 10f);
- Graphics arg_91_0 = graphics;
- string arg_91_1 = "r";
- Font arg_91_2 = font;
- Brush arg_91_3 = new SolidBrush(Color.FromArgb(200, 200, 200));
- checked
- {
- Point point = new Point(this.Width - 16, 7);
- arg_91_0.DrawString(arg_91_1, arg_91_2, arg_91_3, point, new StringFormat
- {
- Alignment = StringAlignment.Center
- });
- Graphics arg_DA_0 = graphics;
- string arg_DA_1 = "0";
- Font arg_DA_2 = font;
- Brush arg_DA_3 = new SolidBrush(Color.FromArgb(200, 200, 200));
- point = new Point(20, 7);
- arg_DA_0.DrawString(arg_DA_1, arg_DA_2, arg_DA_3, point, new StringFormat
- {
- Alignment = StringAlignment.Center
- });
- switch (this.ButtonState)
- {
- case RedemptionControlBox.ButtonHover.Minimize:
- {
- Graphics arg_133_0 = graphics;
- string arg_133_1 = "0";
- Font arg_133_2 = font;
- Brush arg_133_3 = new SolidBrush(Color.White);
- point = new Point(20, 7);
- arg_133_0.DrawString(arg_133_1, arg_133_2, arg_133_3, point, new StringFormat
- {
- Alignment = StringAlignment.Center
- });
- break;
- }
- case RedemptionControlBox.ButtonHover.Close:
- {
- Graphics arg_177_0 = graphics;
- string arg_177_1 = "r";
- Font arg_177_2 = font;
- Brush arg_177_3 = new SolidBrush(Color.White);
- point = new Point(this.Width - 16, 7);
- arg_177_0.DrawString(arg_177_1, arg_177_2, arg_177_3, point, new StringFormat
- {
- Alignment = StringAlignment.Center
- });
- break;
- }
- }
- Graphics arg_190_0 = e.Graphics;
- Image arg_190_1 = bitmap;
- point = new Point(0, 0);
- arg_190_0.DrawImage(arg_190_1, point);
- graphics.Dispose();
- bitmap.Dispose();
- }
- }
- // Token: 0x060001A6 RID: 422 RVA: 0x0000A40C File Offset: 0x0000880C
- protected override void OnMouseUp(MouseEventArgs e)
- {
- base.OnMouseDown(e);
- switch (this.ButtonState)
- {
- case RedemptionControlBox.ButtonHover.Minimize:
- this.Parent.FindForm().WindowState = FormWindowState.Minimized;
- break;
- case RedemptionControlBox.ButtonHover.Maximize:
- this.Parent.FindForm().WindowState = FormWindowState.Maximized;
- break;
- case RedemptionControlBox.ButtonHover.Close:
- this.Parent.FindForm().Close();
- break;
- }
- this.Invalidate();
- }
- // Token: 0x060001A7 RID: 423 RVA: 0x0000A484 File Offset: 0x00008884
- protected override void OnMouseLeave(EventArgs e)
- {
- base.OnMouseLeave(e);
- this.ButtonState = RedemptionControlBox.ButtonHover.None;
- this.Invalidate();
- }
- // Token: 0x0400009A RID: 154
- private static List<WeakReference> __ENCList = new List<WeakReference>();
- // Token: 0x0400009B RID: 155
- private RedemptionControlBox.ButtonHover ButtonState;
- // Token: 0x02000021 RID: 33
- public enum ButtonHover
- {
- // Token: 0x0400009D RID: 157
- Minimize,
- // Token: 0x0400009E RID: 158
- Maximize,
- // Token: 0x0400009F RID: 159
- Close,
- // Token: 0x040000A0 RID: 160
- None
- }
- }
- internal class TwitchBigButton : ThemeControl154
- {
- // Token: 0x1700003F RID: 63
- // (get) Token: 0x0600014E RID: 334 RVA: 0x00007A38 File Offset: 0x00005E38
- // (set) Token: 0x0600014F RID: 335 RVA: 0x00007A50 File Offset: 0x00005E50
- public int twTabPageNumber
- {
- get
- {
- return this._twTabPageNumber;
- }
- set
- {
- this._twTabPageNumber = value;
- }
- }
- // Token: 0x17000040 RID: 64
- // (get) Token: 0x06000150 RID: 336 RVA: 0x00007A5C File Offset: 0x00005E5C
- // (set) Token: 0x06000151 RID: 337 RVA: 0x00007A74 File Offset: 0x00005E74
- public TwitchTabControl twTabPage
- {
- get
- {
- return this._twTabPage;
- }
- set
- {
- this._twTabPage = value;
- }
- }
- // Token: 0x17000041 RID: 65
- // (get) Token: 0x06000152 RID: 338 RVA: 0x00007A80 File Offset: 0x00005E80
- // (set) Token: 0x06000153 RID: 339 RVA: 0x00007A98 File Offset: 0x00005E98
- public bool twDoesTurnPurple
- {
- get
- {
- return this._twDoesTurnPurple;
- }
- set
- {
- this._twDoesTurnPurple = value;
- }
- }
- // Token: 0x17000042 RID: 66
- // (get) Token: 0x06000154 RID: 340 RVA: 0x00007AA4 File Offset: 0x00005EA4
- // (set) Token: 0x06000155 RID: 341 RVA: 0x00007ABC File Offset: 0x00005EBC
- public bool twStarred
- {
- get
- {
- return this._twStarred;
- }
- set
- {
- this._twStarred = value;
- }
- }
- // Token: 0x06000156 RID: 342 RVA: 0x00007AC8 File Offset: 0x00005EC8
- public TwitchBigButton()
- {
- this.StarBase64 = "iVBORw0KGgoAAAANSUhEUgAAABQAAAAVCAYAAABG1c6oAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAApNJREFUeNqs1F+IjFEYx/HvOeedd/7YGbIW28iSQiFZaUOScuHCBUltblZKknKlrNRMMyn37lAuFMpSbpQLd6RobZQkf5NYrGV27ezMO3Pe87iYndlprVg89Xbq7byf3t85zzlKROhasfekUvoU/1AijmoYoESEdDrN1qW9Oa28zNSJSqnaiJr8GKFqAzzjN945cZQro5MgwI7lpxuoUgqlNIraWEcFYbxcYFlnnBcDReJ+EhHBiaNUGUEDeJ4HwK3nJ7JObF4pjVYGrQxGexOPQWuN1gb8EvuObKbqio0/F3EANXAqCpLXdchE0NpQtIMUw0HG7SDrtqSJxQ2rNiygJJ8pyxBlGULE1SJ3dHQ01sJaC8Cu1Wdyno5mtDZYG9CS/s6eg50sWtpKEARUKxWisRiRSIS3L4foO3efd8+//ww2o3vXns15JpbR2lAsf2O09In129rpPryRL0OfSSaTXDvfz/3b74j5SRzVycjNVY/f9/hQVkHe6AiJaApP+3x8P0ylEtA6rw2lFF+HR9BG4XtRFGp6sBm9PNCTBcnHoymiXgvbd6+h/85rensu0X/nNdt2rsY3s/AjiVpXTBd5uvg9XVdzI+GrzOKVCR7dfY/vxRgPxujckubN0wKmMpdiUPg92Iwe2HQ996nwKhOPtJCIzqVQ/MBY6RtzWtI4V2WsNPzryNPFv3BvTzYVn5+fPasdrQypxEJSiTYQaZwg/adntY5eebg/W7VB3olDxBGLJNHaIBOonskFUEcvPujOWlvOOxfiJEQmcBE3M3Dq7ttwAnUhTtzMIv+qT62rxxdE/hJsRm88OZq14SSq/+VSraM3nx3Lhq6SB/6sD39X1lpEhK1LjudUfbv/V2n+c/0YACoUPoqk6OEIAAAAAElFTkSuQmCC";
- this.Cursor = Cursors.Hand;
- Size size = new Size(245, 30);
- this.Size = size;
- this.Click += new EventHandler(this.Clicked);
- this.Transparent = true;
- this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
- this.BackColor = Color.Transparent;
- this.twDoesTurnPurple = false;
- this.twStarred = false;
- this.twTabPageNumber = 1;
- this.Tag = "black";
- }
- // Token: 0x06000157 RID: 343 RVA: 0x00007B68 File Offset: 0x00005F68
- private void Clicked(object sender, EventArgs e)
- {
- bool twDoesTurnPurple = this.twDoesTurnPurple;
- bool flag2;
- if (twDoesTurnPurple)
- {
- try
- {
- IEnumerator enumerator = this.Parent.Controls.GetEnumerator();
- while (enumerator.MoveNext())
- {
- Control control = (Control)enumerator.Current;
- bool flag = control != this && control is TwitchBigButton;
- if (flag)
- {
- object tag = control.Tag;
- flag2 = Operators.ConditionalCompareObjectEqual(tag, "purple", false);
- if (flag2)
- {
- ((TwitchBigButton)control).Tag = "black";
- }
- else
- {
- flag2 = Operators.ConditionalCompareObjectEqual(tag, "purplebottom", false);
- if (flag2)
- {
- ((TwitchBigButton)control).Tag = "blackbottom";
- }
- }
- control.Invalidate();
- }
- }
- }
- finally
- {
- IEnumerator enumerator = this.Parent.Controls.GetEnumerator();
- flag2 = (enumerator is IDisposable);
- if (flag2)
- {
- (enumerator as IDisposable).Dispose();
- }
- }
- object tag2 = this.Tag;
- flag2 = Operators.ConditionalCompareObjectEqual(tag2, "black", false);
- if (flag2)
- {
- this.Tag = "purple";
- }
- else
- {
- flag2 = Operators.ConditionalCompareObjectEqual(tag2, "blackbottom", false);
- if (flag2)
- {
- this.Tag = "purplebottom";
- }
- }
- }
- flag2 = (this.twTabPageNumber != 0);
- if (flag2)
- {
- try
- {
- Methods.SelectTab(this.twTabPageNumber, this.twTabPage);
- }
- catch (Exception expr_149)
- {
- ProjectData.SetProjectError(expr_149);
- ProjectData.ClearProjectError();
- }
- }
- }
- // Token: 0x06000158 RID: 344 RVA: 0x00007CEC File Offset: 0x000060EC
- protected override void ColorHook()
- {
- }
- // Token: 0x06000159 RID: 345 RVA: 0x00007CF0 File Offset: 0x000060F0
- protected override void PaintHook()
- {
- this.G.Clear(this.BackColor);
- object tag = this.Tag;
- bool flag = Operators.ConditionalCompareObjectEqual(tag, "black", false);
- checked
- {
- if (flag)
- {
- switch (this.State)
- {
- case MouseState.None:
- {
- Graphics arg_83_0 = this.G;
- Brush arg_83_1 = new SolidBrush(Color.FromArgb(30, 30, 30));
- Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
- arg_83_0.FillRectangle(arg_83_1, rect);
- this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
- Graphics arg_D8_0 = this.G;
- Pen arg_D8_1 = new Pen(Color.FromArgb(38, 38, 38));
- Point point = new Point(1, 1);
- Point arg_D8_2 = point;
- Point point2 = new Point(this.Width - 2, 1);
- arg_D8_0.DrawLine(arg_D8_1, arg_D8_2, point2);
- this.DrawText(new SolidBrush(Color.FromArgb(170, 170, 170)), HorizontalAlignment.Left, 30, 0);
- break;
- }
- case MouseState.Over:
- {
- Graphics arg_136_0 = this.G;
- Brush arg_136_1 = new SolidBrush(Color.FromArgb(35, 35, 35));
- Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
- arg_136_0.FillRectangle(arg_136_1, rect);
- this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
- Graphics arg_18B_0 = this.G;
- Pen arg_18B_1 = new Pen(Color.FromArgb(38, 38, 38));
- Point point2 = new Point(1, 1);
- Point arg_18B_2 = point2;
- Point point = new Point(this.Width - 2, 1);
- arg_18B_0.DrawLine(arg_18B_1, arg_18B_2, point);
- this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Left, 30, 0);
- break;
- }
- case MouseState.Down:
- {
- Graphics arg_1D7_0 = this.G;
- Brush arg_1D7_1 = new SolidBrush(Color.FromArgb(25, 25, 25));
- Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
- arg_1D7_0.FillRectangle(arg_1D7_1, rect);
- this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
- this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Left, 30, 0);
- break;
- }
- }
- flag = this.twStarred;
- if (flag)
- {
- byte[] array = Convert.FromBase64String(this.StarBase64);
- MemoryStream stream = new MemoryStream(array, 0, array.Length);
- Image image = Image.FromStream(stream, true);
- this.G.DrawImage(image, this.Width - 20, 0, image.Width, image.Height);
- }
- }
- else
- {
- flag = Operators.ConditionalCompareObjectEqual(tag, "purple", false);
- if (flag)
- {
- this.G.Clear(this.BackColor);
- Graphics arg_2B8_0 = this.G;
- Brush arg_2B8_1 = new SolidBrush(Color.FromArgb(100, 65, 165));
- Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
- arg_2B8_0.FillRectangle(arg_2B8_1, rect);
- this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
- this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Left, 30, 0);
- }
- else
- {
- flag = Operators.ConditionalCompareObjectEqual(tag, "blackbottom", false);
- if (flag)
- {
- switch (this.State)
- {
- case MouseState.None:
- {
- Graphics arg_359_0 = this.G;
- Brush arg_359_1 = new SolidBrush(Color.FromArgb(30, 30, 30));
- Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
- arg_359_0.FillRectangle(arg_359_1, rect);
- this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
- this.G.DrawLine(Pens.Black, 0, this.Height - 1, this.Width, this.Height - 1);
- Graphics arg_3D6_0 = this.G;
- Pen arg_3D6_1 = new Pen(Color.FromArgb(38, 38, 38));
- Point point2 = new Point(1, 1);
- Point arg_3D6_2 = point2;
- Point point = new Point(this.Width - 2, 1);
- arg_3D6_0.DrawLine(arg_3D6_1, arg_3D6_2, point);
- this.DrawText(new SolidBrush(Color.FromArgb(170, 170, 170)), HorizontalAlignment.Left, 30, 0);
- break;
- }
- case MouseState.Over:
- {
- Graphics arg_434_0 = this.G;
- Brush arg_434_1 = new SolidBrush(Color.FromArgb(35, 35, 35));
- Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
- arg_434_0.FillRectangle(arg_434_1, rect);
- this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
- this.G.DrawLine(Pens.Black, 0, this.Height - 1, this.Width, this.Height - 1);
- Graphics arg_4B1_0 = this.G;
- Pen arg_4B1_1 = new Pen(Color.FromArgb(38, 38, 38));
- Point point2 = new Point(1, 1);
- Point arg_4B1_2 = point2;
- Point point = new Point(this.Width - 2, 1);
- arg_4B1_0.DrawLine(arg_4B1_1, arg_4B1_2, point);
- this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Left, 30, 0);
- break;
- }
- case MouseState.Down:
- {
- Graphics arg_500_0 = this.G;
- Brush arg_500_1 = new SolidBrush(Color.FromArgb(25, 25, 25));
- Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
- arg_500_0.FillRectangle(arg_500_1, rect);
- this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
- this.G.DrawLine(Pens.Black, 0, this.Height - 1, this.Width, this.Height - 1);
- this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Left, 30, 0);
- break;
- }
- }
- flag = this.twStarred;
- if (flag)
- {
- byte[] array2 = Convert.FromBase64String(this.StarBase64);
- MemoryStream stream2 = new MemoryStream(array2, 0, array2.Length);
- Image image2 = Image.FromStream(stream2, true);
- this.G.DrawImage(image2, this.Width - 20, 0, image2.Width, image2.Height);
- }
- }
- else
- {
- flag = Operators.ConditionalCompareObjectEqual(tag, "purplebottom", false);
- if (flag)
- {
- Graphics arg_600_0 = this.G;
- Brush arg_600_1 = new SolidBrush(Color.FromArgb(100, 65, 165));
- Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
- arg_600_0.FillRectangle(arg_600_1, rect);
- this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
- this.G.DrawLine(Pens.Black, 0, this.Height - 1, this.Width, this.Height - 1);
- this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Left, 30, 0);
- }
- else
- {
- switch (this.State)
- {
- case MouseState.None:
- {
- Graphics arg_6B3_0 = this.G;
- Brush arg_6B3_1 = new SolidBrush(Color.FromArgb(30, 30, 30));
- Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
- arg_6B3_0.FillRectangle(arg_6B3_1, rect);
- this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
- this.DrawText(new SolidBrush(Color.FromArgb(170, 170, 170)), HorizontalAlignment.Left, 30, 0);
- break;
- }
- case MouseState.Over:
- {
- Graphics arg_72B_0 = this.G;
- Brush arg_72B_1 = new SolidBrush(Color.FromArgb(35, 35, 35));
- Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
- arg_72B_0.FillRectangle(arg_72B_1, rect);
- this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
- this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Left, 30, 0);
- break;
- }
- case MouseState.Down:
- {
- Graphics arg_791_0 = this.G;
- Brush arg_791_1 = new SolidBrush(Color.FromArgb(25, 25, 25));
- Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
- arg_791_0.FillRectangle(arg_791_1, rect);
- this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
- this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Left, 30, 0);
- break;
- }
- }
- flag = this.twStarred;
- if (flag)
- {
- byte[] array3 = Convert.FromBase64String(this.StarBase64);
- MemoryStream stream3 = new MemoryStream(array3, 0, array3.Length);
- Image image3 = Image.FromStream(stream3, true);
- this.G.DrawImage(image3, this.Width - 20, 0, image3.Width, image3.Height);
- }
- }
- }
- }
- }
- flag = (this.Image != null);
- if (flag)
- {
- this.G.DrawImage(this.Image, 10, 7, 16, 16);
- }
- }
- }
- private int _twTabPageNumber;
- private TwitchTabControl _twTabPage;
- private bool _twDoesTurnPurple;
- private bool _twStarred;
- private string StarBase64;
- }
- internal class TwitchButton : ThemeControl154
- {
- public bool twNoRounding
- {
- get
- {
- return this._twNoRounding;
- }
- set
- {
- this._twNoRounding = value;
- }
- }
- // Token: 0x0600014B RID: 331 RVA: 0x0000734C File Offset: 0x0000574C
- public TwitchButton()
- {
- this.Cursor = Cursors.Hand;
- Size size = new Size(105, 31);
- this.Size = size;
- this.Tag = "purple";
- this.Transparent = true;
- this.BackColor = Color.Transparent;
- this.Font = new Font("Verdana", 8f, FontStyle.Regular);
- this.twNoRounding = false;
- }
- // Token: 0x0600014C RID: 332 RVA: 0x000073C4 File Offset: 0x000057C4
- protected override void ColorHook()
- {
- }
- // Token: 0x0600014D RID: 333 RVA: 0x000073C8 File Offset: 0x000057C8
- protected override void PaintHook()
- {
- this.G.SmoothingMode = SmoothingMode.HighQuality;
- this.G.Clear(this.BackColor);
- object tag = this.Tag;
- bool flag = Operators.ConditionalCompareObjectEqual(tag, "purple", false);
- checked
- {
- if (flag)
- {
- MouseState state = this.State;
- bool flag2 = state == MouseState.Down;
- if (flag2)
- {
- bool flag3 = this.twNoRounding;
- if (flag3)
- {
- Color arg_9A_1 = Color.FromArgb(80, 56, 129);
- Color arg_9A_2 = Color.FromArgb(58, 37, 103);
- Rectangle rectangle = new Rectangle(0, 0, this.Width, this.Height);
- this.DrawGradient(arg_9A_1, arg_9A_2, rectangle, 90f);
- Graphics arg_C7_0 = this.G;
- Pen arg_C7_1 = Pens.Black;
- rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
- arg_C7_0.DrawRectangle(arg_C7_1, rectangle);
- this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Center, 0, 0);
- }
- else
- {
- Rectangle rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
- LinearGradientBrush linearGradientBrush = new LinearGradientBrush(rectangle, Color.FromArgb(80, 56, 129), Color.FromArgb(58, 37, 103), 90f);
- Graphics arg_150_0 = this.G;
- Brush arg_150_1 = linearGradientBrush;
- rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
- arg_150_0.FillPath(arg_150_1, Draw.RoundRect(rectangle, 4));
- Graphics arg_183_0 = this.G;
- Pen arg_183_1 = Pens.Black;
- rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
- arg_183_0.DrawPath(arg_183_1, Draw.RoundRect(rectangle, 4));
- }
- this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Center, 0, 0);
- }
- else
- {
- bool flag3 = this.twNoRounding;
- if (flag3)
- {
- Color arg_1ED_1 = Color.FromArgb(124, 96, 176);
- Color arg_1ED_2 = Color.FromArgb(87, 59, 139);
- Rectangle rectangle = new Rectangle(0, 0, this.Width, this.Height);
- this.DrawGradient(arg_1ED_1, arg_1ED_2, rectangle, 90f);
- Graphics arg_21A_0 = this.G;
- Pen arg_21A_1 = Pens.Black;
- rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
- arg_21A_0.DrawRectangle(arg_21A_1, rectangle);
- this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Center, 0, 0);
- }
- else
- {
- Rectangle rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
- LinearGradientBrush linearGradientBrush2 = new LinearGradientBrush(rectangle, Color.FromArgb(124, 96, 176), Color.FromArgb(87, 59, 139), 90f);
- Graphics arg_2A6_0 = this.G;
- Brush arg_2A6_1 = linearGradientBrush2;
- rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
- arg_2A6_0.FillPath(arg_2A6_1, Draw.RoundRect(rectangle, 4));
- Graphics arg_2D9_0 = this.G;
- Pen arg_2D9_1 = Pens.Black;
- rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
- arg_2D9_0.DrawPath(arg_2D9_1, Draw.RoundRect(rectangle, 4));
- this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Center, 0, 0);
- }
- }
- }
- else
- {
- bool flag3 = Operators.ConditionalCompareObjectEqual(tag, "white", false);
- if (flag3)
- {
- switch (this.State)
- {
- case MouseState.None:
- {
- Color arg_378_1 = Color.FromArgb(242, 242, 242);
- Color arg_378_2 = Color.FromArgb(225, 225, 225);
- Rectangle rectangle = new Rectangle(0, 0, this.Width, this.Height);
- this.DrawGradient(arg_378_1, arg_378_2, rectangle, 90f);
- Graphics arg_3BE_0 = this.G;
- Pen arg_3BE_1 = new Pen(new SolidBrush(Color.FromArgb(158, 158, 158)));
- rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
- arg_3BE_0.DrawRectangle(arg_3BE_1, rectangle);
- this.DrawText(new SolidBrush(Color.FromArgb(124, 124, 124)), HorizontalAlignment.Center, 0, 0);
- break;
- }
- case MouseState.Over:
- {
- Color arg_4D3_1 = Color.FromArgb(242, 242, 242);
- Color arg_4D3_2 = Color.FromArgb(223, 223, 223);
- Rectangle rectangle = new Rectangle(0, 0, this.Width, this.Height);
- this.DrawGradient(arg_4D3_1, arg_4D3_2, rectangle, 90f);
- Graphics arg_519_0 = this.G;
- Pen arg_519_1 = new Pen(new SolidBrush(Color.FromArgb(158, 158, 158)));
- rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
- arg_519_0.DrawRectangle(arg_519_1, rectangle);
- this.DrawText(new SolidBrush(Color.FromArgb(124, 124, 124)), HorizontalAlignment.Center, 0, 0);
- break;
- }
- case MouseState.Down:
- {
- Color arg_42A_1 = Color.FromArgb(213, 213, 213);
- Color arg_42A_2 = Color.FromArgb(188, 188, 188);
- Rectangle rectangle = new Rectangle(0, 0, this.Width, this.Height);
- this.DrawGradient(arg_42A_1, arg_42A_2, rectangle, 90f);
- Graphics arg_467_0 = this.G;
- Pen arg_467_1 = new Pen(new SolidBrush(Color.FromArgb(121, 121, 121)));
- rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
- arg_467_0.DrawRectangle(arg_467_1, rectangle);
- this.DrawText(new SolidBrush(Color.FromArgb(124, 124, 124)), HorizontalAlignment.Center, 0, 0);
- break;
- }
- }
- }
- else
- {
- MouseState state2 = this.State;
- flag3 = (state2 == MouseState.Down);
- if (flag3)
- {
- Color arg_58F_1 = Color.FromArgb(80, 56, 129);
- Color arg_58F_2 = Color.FromArgb(58, 37, 103);
- Rectangle rectangle = new Rectangle(0, 0, this.Width, this.Height);
- this.DrawGradient(arg_58F_1, arg_58F_2, rectangle, 90f);
- Graphics arg_5BC_0 = this.G;
- Pen arg_5BC_1 = Pens.Black;
- rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
- arg_5BC_0.DrawRectangle(arg_5BC_1, rectangle);
- this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Center, 0, 0);
- }
- else
- {
- Color arg_616_1 = Color.FromArgb(124, 96, 176);
- Color arg_616_2 = Color.FromArgb(87, 59, 139);
- Rectangle rectangle = new Rectangle(0, 0, this.Width, this.Height);
- this.DrawGradient(arg_616_1, arg_616_2, rectangle, 90f);
- Graphics arg_643_0 = this.G;
- Pen arg_643_1 = Pens.Black;
- rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
- arg_643_0.DrawRectangle(arg_643_1, rectangle);
- this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Center, 0, 0);
- }
- }
- }
- }
- }
- // Token: 0x0400007D RID: 125
- private bool _twNoRounding;
- }
- internal class TwitchButtonWithTag : ThemeControl154
- {
- // Token: 0x06000184 RID: 388 RVA: 0x000095A0 File Offset: 0x000079A0
- public TwitchButtonWithTag()
- {
- this.Cursor = Cursors.Hand;
- Size size = new Size(105, 31);
- this.Size = size;
- this.Tag = "$4.99";
- this.Text = "Subscribe";
- this.Transparent = true;
- this.BackColor = Color.Transparent;
- this.Font = new Font("Verdana", 8f, FontStyle.Regular);
- }
- // Token: 0x06000185 RID: 389 RVA: 0x0000961C File Offset: 0x00007A1C
- protected override void ColorHook()
- {
- }
- protected override void PaintHook()
- {
- MouseState state = this.State;
- bool flag = state == MouseState.None;
- if (flag)
- {
- Color arg_4E_1 = Color.FromArgb(124, 96, 176);
- Color arg_4E_2 = Color.FromArgb(87, 59, 139);
- Rectangle rectangle = new Rectangle(0, 0, this.Width, this.Height);
- this.DrawGradient(arg_4E_1, arg_4E_2, rectangle, 90f);
- Color arg_B9_1 = Color.FromArgb(45, 31, 71);
- Color arg_B9_2 = Color.FromArgb(44, 33, 63);
- checked
- {
- rectangle = new Rectangle((int)Math.Round((double)(unchecked(this.G.MeasureString(this.Text, this.Font).Width + 15f))), 5, this.Width - 82, this.Height - 10);
- this.DrawGradient(arg_B9_1, arg_B9_2, rectangle, 90f);
- Graphics arg_E5_0 = this.G;
- Pen arg_E5_1 = Pens.Black;
- rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
- arg_E5_0.DrawRectangle(arg_E5_1, rectangle);
- this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Left, 10, 0);
- }
- this.G.DrawString(Conversions.ToString(this.Tag), this.Font, Brushes.White, this.G.MeasureString(this.Text, this.Font).Width + 20f, 8f);
- }
- }
- }
- internal class TwitchCollapseBox : ThemeContainer154
- {
- public bool twIsCollapsable
- {
- get
- {
- return this._twIsCollapsable;
- }
- set
- {
- this._twIsCollapsable = value;
- }
- }
- public TwitchCollapseBox()
- {
- this.ControlMode = true;
- this.SetColor("Border", Color.Red);
- this.SetColor("Header", Color.Red);
- this.SetColor("Text", Color.Red);
- this.Cursor = Cursors.Hand;
- this.Click += new EventHandler(this.BoxClicked);
- Size size = new Size(245, 188);
- this.Size = size;
- this.twIsCollapsable = true;
- }
- // Token: 0x06000131 RID: 305 RVA: 0x00006948 File Offset: 0x00004D48
- private void BoxClicked(object sender, EventArgs e)
- {
- bool twIsCollapsable = this.twIsCollapsable;
- if (twIsCollapsable)
- {
- bool flag = Operators.ConditionalCompareObjectGreater(NewLateBinding.LateGet(sender, null, "Height", new object[0], null, null, null), 25, false);
- if (flag)
- {
- this.hgt = Conversions.ToInteger(NewLateBinding.LateGet(sender, null, "Height", new object[0], null, null, null));
- try
- {
- IEnumerator enumerator = ((IEnumerable)NewLateBinding.LateGet(sender, null, "Controls", new object[0], null, null, null)).GetEnumerator();
- while (enumerator.MoveNext())
- {
- Control control = (Control)enumerator.Current;
- control.Visible = false;
- }
- }
- finally
- {
- IEnumerator enumerator = this.Parent.Controls.GetEnumerator();
- flag = (enumerator is IDisposable);
- if (flag)
- {
- (enumerator as IDisposable).Dispose();
- }
- }
- NewLateBinding.LateSet(sender, null, "Height", new object[]
- {
- 25
- }, null, null);
- }
- else
- {
- NewLateBinding.LateSet(sender, null, "Height", new object[]
- {
- this.hgt
- }, null, null);
- try
- {
- IEnumerator enumerator2 = ((IEnumerable)NewLateBinding.LateGet(sender, null, "Controls", new object[0], null, null, null)).GetEnumerator();
- while (enumerator2.MoveNext())
- {
- Control control2 = (Control)enumerator2.Current;
- control2.Visible = true;
- }
- }
- finally
- {
- IEnumerator enumerator2 = this.Parent.Controls.GetEnumerator();
- flag = (enumerator2 is IDisposable);
- if (flag)
- {
- (enumerator2 as IDisposable).Dispose();
- }
- }
- }
- }
- }
- // Token: 0x06000132 RID: 306 RVA: 0x00006AF0 File Offset: 0x00004EF0
- protected override void ColorHook()
- {
- this.border = this.GetPen("Border");
- this.headercolor = this.GetBrush("Header");
- this.textcolor = this.GetBrush("Text");
- }
- // Token: 0x06000133 RID: 307 RVA: 0x00006B28 File Offset: 0x00004F28
- protected override void PaintHook()
- {
- this.G.Clear(this.BackColor);
- Graphics arg_3A_0 = this.G;
- Pen arg_3A_1 = this.border;
- checked
- {
- Rectangle rect = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
- arg_3A_0.DrawRectangle(arg_3A_1, rect);
- Graphics arg_71_0 = this.G;
- Brush arg_71_1 = new SolidBrush(Color.FromArgb(40, 40, 40));
- rect = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
- arg_71_0.FillRectangle(arg_71_1, rect);
- Graphics arg_A4_0 = this.G;
- Brush arg_A4_1 = new SolidBrush(Color.FromArgb(40, 40, 40));
- rect = new Rectangle(0, 0, this.Width, this.Height);
- arg_A4_0.FillRectangle(arg_A4_1, rect);
- this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
- this.DrawText(new SolidBrush(Color.FromArgb(87, 87, 87)), HorizontalAlignment.Left, 4, 0);
- this.G.DrawLine(Pens.Black, 0, this.Height, this.Width, this.Height);
- this.G.DrawLine(Pens.Black, 0, 24, this.Width, 24);
- bool twIsCollapsable = this.twIsCollapsable;
- if (twIsCollapsable)
- {
- try
- {
- IEnumerator enumerator = this.Controls.GetEnumerator();
- while (enumerator.MoveNext())
- {
- Control control = (Control)enumerator.Current;
- bool flag = !control.Visible;
- if (flag)
- {
- this.G.DrawString("v", this.Font, new SolidBrush(Color.FromArgb(87, 87, 87)), (float)(this.Width - 20), 6f);
- }
- else
- {
- this.G.DrawString("^", this.Font, new SolidBrush(Color.FromArgb(87, 87, 87)), (float)(this.Width - 20), 8f);
- }
- }
- }
- finally
- {
- IEnumerator enumerator = this.Parent.Controls.GetEnumerator();
- bool flag = enumerator is IDisposable;
- if (flag)
- {
- (enumerator as IDisposable).Dispose();
- }
- }
- }
- }
- }
- // Token: 0x0400006F RID: 111
- [CompilerGenerated]
- private bool _twIsCollapsable;
- // Token: 0x04000070 RID: 112
- private int hgt;
- // Token: 0x04000071 RID: 113
- private Pen border;
- // Token: 0x04000072 RID: 114
- private Brush headercolor;
- // Token: 0x04000073 RID: 115
- private Brush textcolor;
- }
- internal class TwitchColorSpace : ThemeContainer154
- {
- // Token: 0x06000174 RID: 372 RVA: 0x00008CBC File Offset: 0x000070BC
- public TwitchColorSpace()
- {
- this.ControlMode = true;
- this.BackColor = Color.White;
- }
- // Token: 0x06000175 RID: 373 RVA: 0x00008CE8 File Offset: 0x000070E8
- protected override void ColorHook()
- {
- }
- // Token: 0x06000176 RID: 374 RVA: 0x00008CEC File Offset: 0x000070EC
- protected override void PaintHook()
- {
- Graphics arg_29_0 = this.G;
- Brush arg_29_1 = new SolidBrush(this.BackColor);
- Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
- arg_29_0.FillRectangle(arg_29_1, rect);
- }
- }
- internal class TwitchGroupBox : ThemeContainer154
- {
- // Token: 0x0600015A RID: 346 RVA: 0x0000854C File Offset: 0x0000694C
- public TwitchGroupBox()
- {
- this.ControlMode = true;
- this.Cursor = Cursors.Default;
- Size size = new Size(129, 23);
- this.Size = size;
- }
- // Token: 0x0600015B RID: 347 RVA: 0x00008590 File Offset: 0x00006990
- protected override void ColorHook()
- {
- }
- // Token: 0x0600015C RID: 348 RVA: 0x00008594 File Offset: 0x00006994
- protected override void PaintHook()
- {
- this.G.Clear(this.BackColor);
- Graphics arg_40_0 = this.G;
- Brush arg_40_1 = new SolidBrush(Color.FromArgb(40, 40, 40));
- Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
- arg_40_0.FillRectangle(arg_40_1, rect);
- Graphics arg_6F_0 = this.G;
- Brush arg_6F_1 = new SolidBrush(Color.FromArgb(25, 25, 25));
- rect = new Rectangle(0, 0, this.Width, 24);
- arg_6F_0.FillRectangle(arg_6F_1, rect);
- this.G.DrawLine(Pens.Black, 0, 24, this.Width, 24);
- Graphics arg_B7_0 = this.G;
- Pen arg_B7_1 = Pens.Black;
- rect = checked(new Rectangle(0, 0, this.Width - 1, this.Height - 1));
- arg_B7_0.DrawRectangle(arg_B7_1, rect);
- this.DrawText(Brushes.White, HorizontalAlignment.Center, 0, 0);
- }
- }
- internal class TwitchLabel : Label
- {
- // Token: 0x0600017B RID: 379 RVA: 0x00009130 File Offset: 0x00007530
- private static void __ENCAddToList(object value)
- {
- List<WeakReference> _ENCList = TwitchLabel.__ENCList;
- checked
- {
- lock (_ENCList)
- {
- bool flag = TwitchLabel.__ENCList.Count == TwitchLabel.__ENCList.Capacity;
- if (flag)
- {
- int num = 0;
- int arg_3F_0 = 0;
- int num2 = TwitchLabel.__ENCList.Count - 1;
- int num3 = arg_3F_0;
- while (true)
- {
- int arg_90_0 = num3;
- int num4 = num2;
- if (arg_90_0 > num4)
- {
- break;
- }
- WeakReference weakReference = TwitchLabel.__ENCList[num3];
- flag = weakReference.IsAlive;
- if (flag)
- {
- bool flag2 = num3 != num;
- if (flag2)
- {
- TwitchLabel.__ENCList[num] = TwitchLabel.__ENCList[num3];
- }
- num++;
- }
- num3++;
- }
- TwitchLabel.__ENCList.RemoveRange(num, TwitchLabel.__ENCList.Count - num);
- TwitchLabel.__ENCList.Capacity = TwitchLabel.__ENCList.Count;
- }
- TwitchLabel.__ENCList.Add(new WeakReference(RuntimeHelpers.GetObjectValue(value)));
- }
- }
- }
- public TwitchLabel()
- {
- TwitchLabel.__ENCAddToList(this);
- this.BackColor = Color.Transparent;
- this.ForeColor = Color.FromArgb(153, 153, 153);
- }
- private static List<WeakReference> __ENCList = new List<WeakReference>();
- }
- public class TwitchProgressBar : Control
- {
- // Token: 0x06000188 RID: 392 RVA: 0x0000978C File Offset: 0x00007B8C
- private static void __ENCAddToList(object value)
- {
- List<WeakReference> _ENCList = TwitchProgressBar.__ENCList;
- checked
- {
- lock (_ENCList)
- {
- bool flag = TwitchProgressBar.__ENCList.Count == TwitchProgressBar.__ENCList.Capacity;
- if (flag)
- {
- int num = 0;
- int arg_3F_0 = 0;
- int num2 = TwitchProgressBar.__ENCList.Count - 1;
- int num3 = arg_3F_0;
- while (true)
- {
- int arg_90_0 = num3;
- int num4 = num2;
- if (arg_90_0 > num4)
- {
- break;
- }
- WeakReference weakReference = TwitchProgressBar.__ENCList[num3];
- flag = weakReference.IsAlive;
- if (flag)
- {
- bool flag2 = num3 != num;
- if (flag2)
- {
- TwitchProgressBar.__ENCList[num] = TwitchProgressBar.__ENCList[num3];
- }
- num++;
- }
- num3++;
- }
- TwitchProgressBar.__ENCList.RemoveRange(num, TwitchProgressBar.__ENCList.Count - num);
- TwitchProgressBar.__ENCList.Capacity = TwitchProgressBar.__ENCList.Count;
- }
- TwitchProgressBar.__ENCList.Add(new WeakReference(RuntimeHelpers.GetObjectValue(value)));
- }
- }
- }
- // Token: 0x1700004C RID: 76
- // (get) Token: 0x06000189 RID: 393 RVA: 0x00009890 File Offset: 0x00007C90
- // (set) Token: 0x0600018A RID: 394 RVA: 0x000098A8 File Offset: 0x00007CA8
- public int Value
- {
- get
- {
- return this._Value;
- }
- set
- {
- bool flag = value > this._Maximum || value < this._Minimum;
- if (flag)
- {
- throw new Exception("Property value is not valid.");
- }
- this._Value = value;
- this.Invalidate();
- }
- }
- // Token: 0x1700004D RID: 77
- // (get) Token: 0x0600018B RID: 395 RVA: 0x000098EC File Offset: 0x00007CEC
- // (set) Token: 0x0600018C RID: 396 RVA: 0x00009904 File Offset: 0x00007D04
- public int Minimum
- {
- get
- {
- return this._Minimum;
- }
- set
- {
- bool flag = value < 0;
- if (flag)
- {
- throw new Exception("Property value is not valid.");
- }
- this._Minimum = value;
- flag = (value > this._Value);
- if (flag)
- {
- this._Value = value;
- }
- flag = (value > this._Maximum);
- if (flag)
- {
- this._Maximum = value;
- }
- this.Invalidate();
- }
- }
- // Token: 0x1700004E RID: 78
- // (get) Token: 0x0600018D RID: 397 RVA: 0x00009960 File Offset: 0x00007D60
- // (set) Token: 0x0600018E RID: 398 RVA: 0x00009978 File Offset: 0x00007D78
- public int Maximum
- {
- get
- {
- return this._Maximum;
- }
- set
- {
- bool flag = value < 0;
- if (flag)
- {
- throw new Exception("Property value is not valid.");
- }
- this._Maximum = value;
- flag = (value < this._Value);
- if (flag)
- {
- this._Value = value;
- }
- flag = (value < this._Minimum);
- if (flag)
- {
- this._Minimum = value;
- }
- this.Invalidate();
- }
- }
- // Token: 0x0600018F RID: 399 RVA: 0x000099D4 File Offset: 0x00007DD4
- public void Increment(int amount)
- {
- checked
- {
- this.Value += amount;
- }
- }
- // Token: 0x06000190 RID: 400 RVA: 0x000099E8 File Offset: 0x00007DE8
- public TwitchProgressBar()
- {
- TwitchProgressBar.__ENCAddToList(this);
- this._Value = 0;
- this._Minimum = 0;
- this._Maximum = 100;
- Size size = new Size(309, 10);
- this.Size = size;
- this.BackColor = Color.FromArgb(51, 51, 51);
- }
- // Token: 0x06000191 RID: 401 RVA: 0x00009A44 File Offset: 0x00007E44
- protected override void OnPaint(PaintEventArgs e)
- {
- Bitmap bitmap = new Bitmap(this.Width, this.Height);
- Graphics graphics = Graphics.FromImage(bitmap);
- graphics.SmoothingMode = SmoothingMode.HighQuality;
- checked
- {
- int num = (int)Math.Round(unchecked(checked((double)(this._Value - this._Minimum) / (double)(this._Maximum - this._Minimum)) * (double)this.Width));
- base.OnPaint(e);
- graphics.Clear(this.BackColor);
- Graphics arg_93_0 = graphics;
- Brush arg_93_1 = new SolidBrush(Color.FromArgb(185, 155, 235));
- Rectangle rect = new Rectangle(0, 0, num - 1, this.Height - 1);
- arg_93_0.FillRectangle(arg_93_1, rect);
- Graphics arg_AC_0 = e.Graphics;
- Image arg_AC_1 = bitmap;
- Point point = new Point(0, 0);
- arg_AC_0.DrawImage(arg_AC_1, point);
- graphics.Dispose();
- bitmap.Dispose();
- }
- }
- private static List<WeakReference> __ENCList = new List<WeakReference>();
- private int _Value;
- private int _Minimum;
- private int _Maximum;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement