Advertisement
illusion_reality

TwitchTheme C# Version By RaStA_ToXiC_91

Oct 6th, 2017
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 223.21 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Drawing.Drawing2D;
  6. using System.Drawing.Imaging;
  7. using System.IO;
  8. using System.Windows.Forms;
  9. using Microsoft.VisualBasic.CompilerServices;
  10. using System.Collections;
  11. using System.Runtime.CompilerServices;
  12. using System.Runtime.InteropServices;
  13. using System.Drawing.Text;
  14.  
  15. namespace WinterTheme
  16. {
  17.     internal abstract class ThemeContainer154 : ContainerControl
  18.     {
  19.         public ThemeContainer154()
  20.         {
  21.             this.Messages = new Message[9];
  22.             this._SmartBounds = true;
  23.             this._Movable = true;
  24.             this._Sizable = true;
  25.             this.Items = new Dictionary<string, Color>();
  26.             this._Header = 24;
  27.             this.SetStyle(ControlStyles.UserPaint | ControlStyles.Opaque | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
  28.             this._ImageSize = Size.Empty;
  29.             this.Font = new Font("Verdana", 8f);
  30.             this.MeasureBitmap = new Bitmap(1, 1);
  31.             this.MeasureGraphics = Graphics.FromImage(this.MeasureBitmap);
  32.             this.DrawRadialPath = new GraphicsPath();
  33.             this.InvalidateCustimization();
  34.         }
  35.  
  36.         protected sealed override void OnHandleCreated(EventArgs e)
  37.         {
  38.             bool flag = this.DoneCreation;
  39.             if (flag)
  40.             {
  41.                 this.InitializeMessages();
  42.             }
  43.             this.InvalidateCustimization();
  44.             this.ColorHook();
  45.             flag = (this._LockWidth != 0);
  46.             if (flag)
  47.             {
  48.                 this.Width = this._LockWidth;
  49.             }
  50.             flag = (this._LockHeight != 0);
  51.             if (flag)
  52.             {
  53.                 this.Height = this._LockHeight;
  54.             }
  55.             flag = !this._ControlMode;
  56.             if (flag)
  57.             {
  58.                 base.Dock = DockStyle.Fill;
  59.             }
  60.             this.Transparent = this._Transparent;
  61.             flag = (this._Transparent && this._BackColor);
  62.             if (flag)
  63.             {
  64.                 this.BackColor = Color.Transparent;
  65.             }
  66.             base.OnHandleCreated(e);
  67.         }
  68.  
  69.         // Token: 0x06000013 RID: 19 RVA: 0x0000243C File Offset: 0x0000083C
  70.         protected sealed override void OnParentChanged(EventArgs e)
  71.         {
  72.             base.OnParentChanged(e);
  73.             bool flag = this.Parent == null;
  74.             if (!flag)
  75.             {
  76.                 this._IsParentForm = (this.Parent is Form);
  77.                 flag = !this._ControlMode;
  78.                 if (flag)
  79.                 {
  80.                     this.InitializeMessages();
  81.                     flag = this._IsParentForm;
  82.                     if (flag)
  83.                     {
  84.                         this.ParentForm.FormBorderStyle = this._BorderStyle;
  85.                         this.ParentForm.TransparencyKey = this._TransparencyKey;
  86.                         flag = !this.DesignMode;
  87.                         if (flag)
  88.                         {
  89.                             this.ParentForm.Shown += new EventHandler(this.FormShown);
  90.                         }
  91.                     }
  92.                     this.Parent.BackColor = this.BackColor;
  93.                 }
  94.                 this.OnCreation();
  95.                 this.DoneCreation = true;
  96.                 this.InvalidateTimer();
  97.             }
  98.         }
  99.  
  100.         // Token: 0x06000014 RID: 20 RVA: 0x0000250C File Offset: 0x0000090C
  101.         private void DoAnimation(bool i)
  102.         {
  103.             this.OnAnimation();
  104.             if (i)
  105.             {
  106.                 this.Invalidate();
  107.             }
  108.         }
  109.  
  110.         // Token: 0x06000015 RID: 21 RVA: 0x00002530 File Offset: 0x00000930
  111.         protected sealed override void OnPaint(PaintEventArgs e)
  112.         {
  113.             bool flag = this.Width == 0 || this.Height == 0;
  114.             if (!flag)
  115.             {
  116.                 flag = (this._Transparent && this._ControlMode);
  117.                 if (flag)
  118.                 {
  119.                     this.PaintHook();
  120.                     e.Graphics.DrawImage(this.B, 0, 0);
  121.                 }
  122.                 else
  123.                 {
  124.                     this.G = e.Graphics;
  125.                     this.PaintHook();
  126.                 }
  127.             }
  128.         }
  129.  
  130.         // Token: 0x06000016 RID: 22 RVA: 0x000025A8 File Offset: 0x000009A8
  131.         protected override void OnHandleDestroyed(EventArgs e)
  132.         {
  133.             ThemeShare.RemoveAnimationCallback(new ThemeShare.AnimationDelegate(this.DoAnimation));
  134.             base.OnHandleDestroyed(e);
  135.         }
  136.  
  137.         // Token: 0x06000017 RID: 23 RVA: 0x000025C8 File Offset: 0x000009C8
  138.         private void FormShown(object sender, EventArgs e)
  139.         {
  140.             bool flag = this._ControlMode || this.HasShown;
  141.             if (!flag)
  142.             {
  143.                 flag = (this._StartPosition == FormStartPosition.CenterParent || this._StartPosition == FormStartPosition.CenterScreen);
  144.                 if (flag)
  145.                 {
  146.                     Rectangle bounds = Screen.PrimaryScreen.Bounds;
  147.                     Rectangle bounds2 = this.ParentForm.Bounds;
  148.                     Form arg_88_0 = this.ParentForm;
  149.                     Point location = checked(new Point(bounds.Width / 2 - bounds2.Width / 2, bounds.Height / 2 - bounds2.Width / 2));
  150.                     arg_88_0.Location = location;
  151.                 }
  152.                 this.HasShown = true;
  153.             }
  154.         }
  155.  
  156.         // Token: 0x06000018 RID: 24 RVA: 0x0000266C File Offset: 0x00000A6C
  157.         protected sealed override void OnSizeChanged(EventArgs e)
  158.         {
  159.             bool flag = this._Movable && !this._ControlMode;
  160.             if (flag)
  161.             {
  162.                 this.Frame = checked(new Rectangle(7, 7, this.Width - 14, this._Header - 7));
  163.             }
  164.             this.InvalidateBitmap();
  165.             this.Invalidate();
  166.             base.OnSizeChanged(e);
  167.         }
  168.  
  169.         // Token: 0x06000019 RID: 25 RVA: 0x000026CC File Offset: 0x00000ACC
  170.         protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
  171.         {
  172.             bool flag = this._LockWidth != 0;
  173.             if (flag)
  174.             {
  175.                 width = this._LockWidth;
  176.             }
  177.             flag = (this._LockHeight != 0);
  178.             if (flag)
  179.             {
  180.                 height = this._LockHeight;
  181.             }
  182.             base.SetBoundsCore(x, y, width, height, specified);
  183.         }
  184.  
  185.         // Token: 0x0600001A RID: 26 RVA: 0x0000271C File Offset: 0x00000B1C
  186.         private void SetState(MouseState current)
  187.         {
  188.             this.State = current;
  189.             this.Invalidate();
  190.         }
  191.  
  192.         // Token: 0x0600001B RID: 27 RVA: 0x00002730 File Offset: 0x00000B30
  193.         protected override void OnMouseMove(MouseEventArgs e)
  194.         {
  195.             bool flag = !this._IsParentForm || this.ParentForm.WindowState != FormWindowState.Maximized;
  196.             if (flag)
  197.             {
  198.                 bool flag2 = this._Sizable && !this._ControlMode;
  199.                 if (flag2)
  200.                 {
  201.                     this.InvalidateMouse();
  202.                 }
  203.             }
  204.             base.OnMouseMove(e);
  205.         }
  206.  
  207.         // Token: 0x0600001C RID: 28 RVA: 0x00002788 File Offset: 0x00000B88
  208.         protected override void OnEnabledChanged(EventArgs e)
  209.         {
  210.             bool enabled = this.Enabled;
  211.             if (enabled)
  212.             {
  213.                 this.SetState(MouseState.None);
  214.             }
  215.             else
  216.             {
  217.                 this.SetState(MouseState.Block);
  218.             }
  219.             base.OnEnabledChanged(e);
  220.         }
  221.  
  222.         // Token: 0x0600001D RID: 29 RVA: 0x000027BC File Offset: 0x00000BBC
  223.         protected override void OnMouseEnter(EventArgs e)
  224.         {
  225.             this.SetState(MouseState.Over);
  226.             base.OnMouseEnter(e);
  227.         }
  228.  
  229.         // Token: 0x0600001E RID: 30 RVA: 0x000027D0 File Offset: 0x00000BD0
  230.         protected override void OnMouseUp(MouseEventArgs e)
  231.         {
  232.             this.SetState(MouseState.Over);
  233.             base.OnMouseUp(e);
  234.         }
  235.  
  236.         // Token: 0x0600001F RID: 31 RVA: 0x000027E4 File Offset: 0x00000BE4
  237.         protected override void OnMouseLeave(EventArgs e)
  238.         {
  239.             this.SetState(MouseState.None);
  240.             bool flag = this.GetChildAtPoint(this.PointToClient(Control.MousePosition)) != null;
  241.             if (flag)
  242.             {
  243.                 bool flag2 = this._Sizable && !this._ControlMode;
  244.                 if (flag2)
  245.                 {
  246.                     this.Cursor = Cursors.Default;
  247.                     this.Previous = 0;
  248.                 }
  249.             }
  250.             base.OnMouseLeave(e);
  251.         }
  252.  
  253.         // Token: 0x06000020 RID: 32 RVA: 0x0000284C File Offset: 0x00000C4C
  254.         protected override void OnMouseDown(MouseEventArgs e)
  255.         {
  256.             bool flag = e.Button == MouseButtons.Left;
  257.             if (flag)
  258.             {
  259.                 this.SetState(MouseState.Down);
  260.             }
  261.             flag = ((!this._IsParentForm || this.ParentForm.WindowState != FormWindowState.Maximized) && !this._ControlMode);
  262.             if (flag)
  263.             {
  264.                 bool flag2 = this._Movable && this.Frame.Contains(e.Location);
  265.                 if (flag2)
  266.                 {
  267.                     this.Capture = false;
  268.                     this.WM_LMBUTTONDOWN = true;
  269.                     this.DefWndProc(ref this.Messages[0]);
  270.                 }
  271.                 else
  272.                 {
  273.                     flag2 = (this._Sizable && this.Previous != 0);
  274.                     if (flag2)
  275.                     {
  276.                         this.Capture = false;
  277.                         this.WM_LMBUTTONDOWN = true;
  278.                         this.DefWndProc(ref this.Messages[this.Previous]);
  279.                     }
  280.                 }
  281.             }
  282.             base.OnMouseDown(e);
  283.         }
  284.  
  285.         // Token: 0x06000021 RID: 33 RVA: 0x00002934 File Offset: 0x00000D34
  286.         protected override void WndProc(ref Message m)
  287.         {
  288.             base.WndProc(ref m);
  289.             bool flag = this.WM_LMBUTTONDOWN && m.Msg == 513;
  290.             if (flag)
  291.             {
  292.                 this.WM_LMBUTTONDOWN = false;
  293.                 this.SetState(MouseState.Over);
  294.                 flag = !this._SmartBounds;
  295.                 if (!flag)
  296.                 {
  297.                     flag = this.IsParentMdi;
  298.                     if (flag)
  299.                     {
  300.                         Rectangle bounds = new Rectangle(Point.Empty, this.Parent.Parent.Size);
  301.                         this.CorrectBounds(bounds);
  302.                     }
  303.                     else
  304.                     {
  305.                         this.CorrectBounds(Screen.FromControl(this.Parent).WorkingArea);
  306.                     }
  307.                 }
  308.             }
  309.         }
  310.  
  311.         // Token: 0x06000022 RID: 34 RVA: 0x000029D4 File Offset: 0x00000DD4
  312.         private int GetIndex()
  313.         {
  314.             this.GetIndexPoint = this.PointToClient(Control.MousePosition);
  315.             this.B1 = (this.GetIndexPoint.X < 7);
  316.             checked
  317.             {
  318.                 this.B2 = (this.GetIndexPoint.X > this.Width - 7);
  319.                 this.B3 = (this.GetIndexPoint.Y < 7);
  320.                 this.B4 = (this.GetIndexPoint.Y > this.Height - 7);
  321.                 bool flag = this.B1 && this.B3;
  322.                 int result;
  323.                 if (flag)
  324.                 {
  325.                     result = 4;
  326.                 }
  327.                 else
  328.                 {
  329.                     flag = (this.B1 && this.B4);
  330.                     if (flag)
  331.                     {
  332.                         result = 7;
  333.                     }
  334.                     else
  335.                     {
  336.                         flag = (this.B2 && this.B3);
  337.                         if (flag)
  338.                         {
  339.                             result = 5;
  340.                         }
  341.                         else
  342.                         {
  343.                             flag = (this.B2 && this.B4);
  344.                             if (flag)
  345.                             {
  346.                                 result = 8;
  347.                             }
  348.                             else
  349.                             {
  350.                                 flag = this.B1;
  351.                                 if (flag)
  352.                                 {
  353.                                     result = 1;
  354.                                 }
  355.                                 else
  356.                                 {
  357.                                     flag = this.B2;
  358.                                     if (flag)
  359.                                     {
  360.                                         result = 2;
  361.                                     }
  362.                                     else
  363.                                     {
  364.                                         flag = this.B3;
  365.                                         if (flag)
  366.                                         {
  367.                                             result = 3;
  368.                                         }
  369.                                         else
  370.                                         {
  371.                                             flag = this.B4;
  372.                                             if (flag)
  373.                                             {
  374.                                                 result = 6;
  375.                                             }
  376.                                             else
  377.                                             {
  378.                                                 result = 0;
  379.                                             }
  380.                                         }
  381.                                     }
  382.                                 }
  383.                             }
  384.                         }
  385.                     }
  386.                 }
  387.                 return result;
  388.             }
  389.         }
  390.  
  391.         // Token: 0x06000023 RID: 35 RVA: 0x00002B08 File Offset: 0x00000F08
  392.         private void InvalidateMouse()
  393.         {
  394.             this.Current = this.GetIndex();
  395.             bool flag = this.Current == this.Previous;
  396.             if (!flag)
  397.             {
  398.                 this.Previous = this.Current;
  399.                 switch (this.Previous)
  400.                 {
  401.                     case 0:
  402.                         this.Cursor = Cursors.Default;
  403.                         break;
  404.                     case 1:
  405.                     case 2:
  406.                         this.Cursor = Cursors.SizeWE;
  407.                         break;
  408.                     case 3:
  409.                     case 6:
  410.                         this.Cursor = Cursors.SizeNS;
  411.                         break;
  412.                     case 4:
  413.                     case 8:
  414.                         this.Cursor = Cursors.SizeNWSE;
  415.                         break;
  416.                     case 5:
  417.                     case 7:
  418.                         this.Cursor = Cursors.SizeNESW;
  419.                         break;
  420.                 }
  421.             }
  422.         }
  423.  
  424.         // Token: 0x06000024 RID: 36 RVA: 0x00002BC8 File Offset: 0x00000FC8
  425.         private void InitializeMessages()
  426.         {
  427.             Message[] arg_31_0_cp_0 = this.Messages;
  428.             int arg_31_0_cp_1 = 0;
  429.             IntPtr arg_2C_0 = this.Parent.Handle;
  430.             int arg_2C_1 = 161;
  431.             IntPtr wparam = new IntPtr(2);
  432.             arg_31_0_cp_0[arg_31_0_cp_1] = Message.Create(arg_2C_0, arg_2C_1, wparam, IntPtr.Zero);
  433.             int num = 1;
  434.             checked
  435.             {
  436.                 int arg_79_0;
  437.                 int num2;
  438.                 do
  439.                 {
  440.                     Message[] arg_6B_0_cp_0 = this.Messages;
  441.                     int arg_6B_0_cp_1 = num;
  442.                     IntPtr arg_66_0 = this.Parent.Handle;
  443.                     int arg_66_1 = 161;
  444.                     wparam = new IntPtr(num + 9);
  445.                     arg_6B_0_cp_0[arg_6B_0_cp_1] = Message.Create(arg_66_0, arg_66_1, wparam, IntPtr.Zero);
  446.                     num++;
  447.                     arg_79_0 = num;
  448.                     num2 = 8;
  449.                 }
  450.                 while (arg_79_0 <= num2);
  451.             }
  452.         }
  453.  
  454.         // Token: 0x06000025 RID: 37 RVA: 0x00002C54 File Offset: 0x00001054
  455.         private void CorrectBounds(Rectangle bounds)
  456.         {
  457.             bool flag = this.Parent.Width > bounds.Width;
  458.             if (flag)
  459.             {
  460.                 this.Parent.Width = bounds.Width;
  461.             }
  462.             flag = (this.Parent.Height > bounds.Height);
  463.             if (flag)
  464.             {
  465.                 this.Parent.Height = bounds.Height;
  466.             }
  467.             int num = this.Parent.Location.X;
  468.             Point location = this.Parent.Location;
  469.             int num2 = location.Y;
  470.             flag = (num < bounds.X);
  471.             if (flag)
  472.             {
  473.                 num = bounds.X;
  474.             }
  475.             flag = (num2 < bounds.Y);
  476.             if (flag)
  477.             {
  478.                 num2 = bounds.Y;
  479.             }
  480.             checked
  481.             {
  482.                 int num3 = bounds.X + bounds.Width;
  483.                 int num4 = bounds.Y + bounds.Height;
  484.                 flag = (num + this.Parent.Width > num3);
  485.                 if (flag)
  486.                 {
  487.                     num = num3 - this.Parent.Width;
  488.                 }
  489.                 flag = (num2 + this.Parent.Height > num4);
  490.                 if (flag)
  491.                 {
  492.                     num2 = num4 - this.Parent.Height;
  493.                 }
  494.                 Control arg_12F_0 = this.Parent;
  495.                 location = new Point(num, num2);
  496.                 arg_12F_0.Location = location;
  497.             }
  498.         }
  499.  
  500.         // Token: 0x17000006 RID: 6
  501.         // (get) Token: 0x06000026 RID: 38 RVA: 0x00002D98 File Offset: 0x00001198
  502.         // (set) Token: 0x06000027 RID: 39 RVA: 0x00002DB0 File Offset: 0x000011B0
  503.         public override DockStyle Dock
  504.         {
  505.             get
  506.             {
  507.                 return base.Dock;
  508.             }
  509.             set
  510.             {
  511.                 bool flag = !this._ControlMode;
  512.                 if (!flag)
  513.                 {
  514.                     base.Dock = value;
  515.                 }
  516.             }
  517.         }
  518.  
  519.         // Token: 0x17000007 RID: 7
  520.         // (get) Token: 0x06000028 RID: 40 RVA: 0x00002DD8 File Offset: 0x000011D8
  521.         // (set) Token: 0x06000029 RID: 41 RVA: 0x00002DF0 File Offset: 0x000011F0
  522.         [Category("Misc")]
  523.         public override Color BackColor
  524.         {
  525.             get
  526.             {
  527.                 return base.BackColor;
  528.             }
  529.             set
  530.             {
  531.                 bool flag = value == base.BackColor;
  532.                 if (!flag)
  533.                 {
  534.                     flag = (!this.IsHandleCreated && this._ControlMode && value == Color.Transparent);
  535.                     if (flag)
  536.                     {
  537.                         this._BackColor = true;
  538.                     }
  539.                     else
  540.                     {
  541.                         base.BackColor = value;
  542.                         flag = (this.Parent != null);
  543.                         if (flag)
  544.                         {
  545.                             bool flag2 = !this._ControlMode;
  546.                             if (flag2)
  547.                             {
  548.                                 this.Parent.BackColor = value;
  549.                             }
  550.                             this.ColorHook();
  551.                         }
  552.                     }
  553.                 }
  554.             }
  555.         }
  556.  
  557.         // Token: 0x17000008 RID: 8
  558.         // (get) Token: 0x0600002A RID: 42 RVA: 0x00002E80 File Offset: 0x00001280
  559.         // (set) Token: 0x0600002B RID: 43 RVA: 0x00002E98 File Offset: 0x00001298
  560.         public override Size MinimumSize
  561.         {
  562.             get
  563.             {
  564.                 return base.MinimumSize;
  565.             }
  566.             set
  567.             {
  568.                 base.MinimumSize = value;
  569.                 bool flag = this.Parent != null;
  570.                 if (flag)
  571.                 {
  572.                     this.Parent.MinimumSize = value;
  573.                 }
  574.             }
  575.         }
  576.  
  577.         // Token: 0x17000009 RID: 9
  578.         // (get) Token: 0x0600002C RID: 44 RVA: 0x00002ECC File Offset: 0x000012CC
  579.         // (set) Token: 0x0600002D RID: 45 RVA: 0x00002EE4 File Offset: 0x000012E4
  580.         public override Size MaximumSize
  581.         {
  582.             get
  583.             {
  584.                 return base.MaximumSize;
  585.             }
  586.             set
  587.             {
  588.                 base.MaximumSize = value;
  589.                 bool flag = this.Parent != null;
  590.                 if (flag)
  591.                 {
  592.                     this.Parent.MaximumSize = value;
  593.                 }
  594.             }
  595.         }
  596.  
  597.         // Token: 0x1700000A RID: 10
  598.         // (get) Token: 0x0600002E RID: 46 RVA: 0x00002F18 File Offset: 0x00001318
  599.         // (set) Token: 0x0600002F RID: 47 RVA: 0x00002F30 File Offset: 0x00001330
  600.         public override string Text
  601.         {
  602.             get
  603.             {
  604.                 return base.Text;
  605.             }
  606.             set
  607.             {
  608.                 base.Text = value;
  609.                 this.Invalidate();
  610.             }
  611.         }
  612.  
  613.         // Token: 0x1700000B RID: 11
  614.         // (get) Token: 0x06000030 RID: 48 RVA: 0x00002F44 File Offset: 0x00001344
  615.         // (set) Token: 0x06000031 RID: 49 RVA: 0x00002F5C File Offset: 0x0000135C
  616.         public override Font Font
  617.         {
  618.             get
  619.             {
  620.                 return base.Font;
  621.             }
  622.             set
  623.             {
  624.                 base.Font = value;
  625.                 this.Invalidate();
  626.             }
  627.         }
  628.  
  629.         // Token: 0x1700000C RID: 12
  630.         // (get) Token: 0x06000032 RID: 50 RVA: 0x00002F70 File Offset: 0x00001370
  631.         // (set) Token: 0x06000033 RID: 51 RVA: 0x00002F88 File Offset: 0x00001388
  632.         [EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false)]
  633.         public override Color ForeColor
  634.         {
  635.             get
  636.             {
  637.                 return Color.Empty;
  638.             }
  639.             set
  640.             {
  641.             }
  642.         }
  643.  
  644.         // Token: 0x1700000D RID: 13
  645.         // (get) Token: 0x06000034 RID: 52 RVA: 0x00002F8C File Offset: 0x0000138C
  646.         // (set) Token: 0x06000035 RID: 53 RVA: 0x00002FA0 File Offset: 0x000013A0
  647.         [Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
  648.         public override Image BackgroundImage
  649.         {
  650.             get
  651.             {
  652.                 return null;
  653.             }
  654.             set
  655.             {
  656.             }
  657.         }
  658.  
  659.         // Token: 0x1700000E RID: 14
  660.         // (get) Token: 0x06000036 RID: 54 RVA: 0x00002FA4 File Offset: 0x000013A4
  661.         // (set) Token: 0x06000037 RID: 55 RVA: 0x00002FB8 File Offset: 0x000013B8
  662.         [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
  663.         public override ImageLayout BackgroundImageLayout
  664.         {
  665.             get
  666.             {
  667.                 return ImageLayout.None;
  668.             }
  669.             set
  670.             {
  671.             }
  672.         }
  673.  
  674.         // Token: 0x1700000F RID: 15
  675.         // (get) Token: 0x06000038 RID: 56 RVA: 0x00002FBC File Offset: 0x000013BC
  676.         // (set) Token: 0x06000039 RID: 57 RVA: 0x00002FD4 File Offset: 0x000013D4
  677.         public bool SmartBounds
  678.         {
  679.             get
  680.             {
  681.                 return this._SmartBounds;
  682.             }
  683.             set
  684.             {
  685.                 this._SmartBounds = value;
  686.             }
  687.         }
  688.  
  689.         // Token: 0x17000010 RID: 16
  690.         // (get) Token: 0x0600003A RID: 58 RVA: 0x00002FE0 File Offset: 0x000013E0
  691.         // (set) Token: 0x0600003B RID: 59 RVA: 0x00002FF8 File Offset: 0x000013F8
  692.         public bool Movable
  693.         {
  694.             get
  695.             {
  696.                 return this._Movable;
  697.             }
  698.             set
  699.             {
  700.                 this._Movable = value;
  701.             }
  702.         }
  703.  
  704.         // Token: 0x17000011 RID: 17
  705.         // (get) Token: 0x0600003C RID: 60 RVA: 0x00003004 File Offset: 0x00001404
  706.         // (set) Token: 0x0600003D RID: 61 RVA: 0x0000301C File Offset: 0x0000141C
  707.         public bool Sizable
  708.         {
  709.             get
  710.             {
  711.                 return this._Sizable;
  712.             }
  713.             set
  714.             {
  715.                 this._Sizable = value;
  716.             }
  717.         }
  718.  
  719.         // Token: 0x17000012 RID: 18
  720.         // (get) Token: 0x0600003E RID: 62 RVA: 0x00003028 File Offset: 0x00001428
  721.         // (set) Token: 0x0600003F RID: 63 RVA: 0x0000306C File Offset: 0x0000146C
  722.         public Color TransparencyKey
  723.         {
  724.             get
  725.             {
  726.                 bool flag = this._IsParentForm && !this._ControlMode;
  727.                 Color transparencyKey;
  728.                 if (flag)
  729.                 {
  730.                     transparencyKey = this.ParentForm.TransparencyKey;
  731.                 }
  732.                 else
  733.                 {
  734.                     transparencyKey = this._TransparencyKey;
  735.                 }
  736.                 return transparencyKey;
  737.             }
  738.             set
  739.             {
  740.                 bool flag = value == this._TransparencyKey;
  741.                 if (!flag)
  742.                 {
  743.                     this._TransparencyKey = value;
  744.                     flag = (this._IsParentForm && !this._ControlMode);
  745.                     if (flag)
  746.                     {
  747.                         this.ParentForm.TransparencyKey = value;
  748.                         this.ColorHook();
  749.                     }
  750.                 }
  751.             }
  752.         }
  753.  
  754.         // Token: 0x17000013 RID: 19
  755.         // (get) Token: 0x06000040 RID: 64 RVA: 0x000030C4 File Offset: 0x000014C4
  756.         // (set) Token: 0x06000041 RID: 65 RVA: 0x00003108 File Offset: 0x00001508
  757.         public FormBorderStyle BorderStyle
  758.         {
  759.             get
  760.             {
  761.                 bool flag = this._IsParentForm && !this._ControlMode;
  762.                 FormBorderStyle result;
  763.                 if (flag)
  764.                 {
  765.                     result = this.ParentForm.FormBorderStyle;
  766.                 }
  767.                 else
  768.                 {
  769.                     result = this._BorderStyle;
  770.                 }
  771.                 return result;
  772.             }
  773.             set
  774.             {
  775.                 this._BorderStyle = value;
  776.                 bool flag = this._IsParentForm && !this._ControlMode;
  777.                 if (flag)
  778.                 {
  779.                     this.ParentForm.FormBorderStyle = value;
  780.                     flag = (value != FormBorderStyle.None);
  781.                     if (flag)
  782.                     {
  783.                         this.Movable = false;
  784.                         this.Sizable = false;
  785.                     }
  786.                 }
  787.             }
  788.         }
  789.  
  790.         // Token: 0x17000014 RID: 20
  791.         // (get) Token: 0x06000042 RID: 66 RVA: 0x00003164 File Offset: 0x00001564
  792.         // (set) Token: 0x06000043 RID: 67 RVA: 0x000031A8 File Offset: 0x000015A8
  793.         public FormStartPosition StartPosition
  794.         {
  795.             get
  796.             {
  797.                 bool flag = this._IsParentForm && !this._ControlMode;
  798.                 FormStartPosition startPosition;
  799.                 if (flag)
  800.                 {
  801.                     startPosition = this.ParentForm.StartPosition;
  802.                 }
  803.                 else
  804.                 {
  805.                     startPosition = this._StartPosition;
  806.                 }
  807.                 return startPosition;
  808.             }
  809.             set
  810.             {
  811.                 this._StartPosition = value;
  812.                 bool flag = this._IsParentForm && !this._ControlMode;
  813.                 if (flag)
  814.                 {
  815.                     this.ParentForm.StartPosition = value;
  816.                 }
  817.             }
  818.         }
  819.  
  820.         // Token: 0x17000015 RID: 21
  821.         // (get) Token: 0x06000044 RID: 68 RVA: 0x000031E8 File Offset: 0x000015E8
  822.         // (set) Token: 0x06000045 RID: 69 RVA: 0x00003200 File Offset: 0x00001600
  823.         public bool NoRounding
  824.         {
  825.             get
  826.             {
  827.                 return this._NoRounding;
  828.             }
  829.             set
  830.             {
  831.                 this._NoRounding = value;
  832.                 this.Invalidate();
  833.             }
  834.         }
  835.  
  836.         // Token: 0x17000016 RID: 22
  837.         // (get) Token: 0x06000046 RID: 70 RVA: 0x00003214 File Offset: 0x00001614
  838.         // (set) Token: 0x06000047 RID: 71 RVA: 0x0000322C File Offset: 0x0000162C
  839.         public Image Image
  840.         {
  841.             get
  842.             {
  843.                 return this._Image;
  844.             }
  845.             set
  846.             {
  847.                 bool flag = value == null;
  848.                 if (flag)
  849.                 {
  850.                     this._ImageSize = Size.Empty;
  851.                 }
  852.                 else
  853.                 {
  854.                     this._ImageSize = value.Size;
  855.                 }
  856.                 this._Image = value;
  857.                 this.Invalidate();
  858.             }
  859.         }
  860.  
  861.         // Token: 0x17000017 RID: 23
  862.         // (get) Token: 0x06000048 RID: 72 RVA: 0x0000326C File Offset: 0x0000166C
  863.         // (set) Token: 0x06000049 RID: 73 RVA: 0x000032D8 File Offset: 0x000016D8
  864.         public Bloom[] Colors
  865.         {
  866.             get
  867.             {
  868.                 List<Bloom> list = new List<Bloom>();
  869.                 Dictionary<string, Color>.Enumerator enumerator = this.Items.GetEnumerator();
  870.                 while (enumerator.MoveNext())
  871.                 {
  872.                     List<Bloom> arg_3F_0 = list;
  873.                     KeyValuePair<string, Color> current = enumerator.Current;
  874.                     string arg_37_1 = current.Key;
  875.                     KeyValuePair<string, Color> current2 = enumerator.Current;
  876.                     Bloom item = new Bloom(arg_37_1, current2.Value);
  877.                     arg_3F_0.Add(item);
  878.                 }
  879.                 return list.ToArray();
  880.             }
  881.             set
  882.             {
  883.                 checked
  884.                 {
  885.                     for (int i = 0; i < value.Length; i++)
  886.                     {
  887.                         Bloom bloom = value[i];
  888.                         bool flag = this.Items.ContainsKey(bloom.Name);
  889.                         if (flag)
  890.                         {
  891.                             this.Items[bloom.Name] = bloom.Value;
  892.                         }
  893.                     }
  894.                     this.InvalidateCustimization();
  895.                     this.ColorHook();
  896.                     this.Invalidate();
  897.                 }
  898.             }
  899.         }
  900.  
  901.         // Token: 0x17000018 RID: 24
  902.         // (get) Token: 0x0600004A RID: 74 RVA: 0x00003354 File Offset: 0x00001754
  903.         // (set) Token: 0x0600004B RID: 75 RVA: 0x0000336C File Offset: 0x0000176C
  904.         public string Customization
  905.         {
  906.             get
  907.             {
  908.                 return this._Customization;
  909.             }
  910.             set
  911.             {
  912.                 bool flag = Operators.CompareString(value, this._Customization, false) == 0;
  913.                 checked
  914.                 {
  915.                     if (!flag)
  916.                     {
  917.                         Bloom[] colors = this.Colors;
  918.                         try
  919.                         {
  920.                             byte[] value2 = Convert.FromBase64String(value);
  921.                             int arg_30_0 = 0;
  922.                             int num = colors.Length - 1;
  923.                             int num2 = arg_30_0;
  924.                             while (true)
  925.                             {
  926.                                 int arg_59_0 = num2;
  927.                                 int num3 = num;
  928.                                 if (arg_59_0 > num3)
  929.                                 {
  930.                                     break;
  931.                                 }
  932.                                 colors[num2].Value = Color.FromArgb(BitConverter.ToInt32(value2, num2 * 4));
  933.                                 num2++;
  934.                             }
  935.                         }
  936.                         catch (Exception arg_5D_0)
  937.                         {
  938.                             ProjectData.SetProjectError(arg_5D_0);
  939.                             ProjectData.ClearProjectError();
  940.                             return;
  941.                         }
  942.                         this._Customization = value;
  943.                         this.Colors = colors;
  944.                         this.ColorHook();
  945.                         this.Invalidate();
  946.                     }
  947.                 }
  948.             }
  949.         }
  950.  
  951.         // Token: 0x17000019 RID: 25
  952.         // (get) Token: 0x0600004C RID: 76 RVA: 0x0000341C File Offset: 0x0000181C
  953.         // (set) Token: 0x0600004D RID: 77 RVA: 0x00003434 File Offset: 0x00001834
  954.         public bool Transparent
  955.         {
  956.             get
  957.             {
  958.                 return this._Transparent;
  959.             }
  960.             set
  961.             {
  962.                 this._Transparent = value;
  963.                 bool flag = !this.IsHandleCreated && !this._ControlMode;
  964.                 if (!flag)
  965.                 {
  966.                     flag = (!value && this.BackColor.A != 255);
  967.                     if (flag)
  968.                     {
  969.                         throw new Exception("Unable to change value to false while a transparent BackColor is in use.");
  970.                     }
  971.                     this.SetStyle(ControlStyles.Opaque, !value);
  972.                     this.SetStyle(ControlStyles.SupportsTransparentBackColor, value);
  973.                     this.InvalidateBitmap();
  974.                     this.Invalidate();
  975.                 }
  976.             }
  977.         }
  978.  
  979.         // Token: 0x1700001A RID: 26
  980.         // (get) Token: 0x0600004E RID: 78 RVA: 0x000034BC File Offset: 0x000018BC
  981.         protected Size ImageSize
  982.         {
  983.             get
  984.             {
  985.                 return this._ImageSize;
  986.             }
  987.         }
  988.  
  989.         // Token: 0x1700001B RID: 27
  990.         // (get) Token: 0x0600004F RID: 79 RVA: 0x000034D4 File Offset: 0x000018D4
  991.         protected bool IsParentForm
  992.         {
  993.             get
  994.             {
  995.                 return this._IsParentForm;
  996.             }
  997.         }
  998.  
  999.         // Token: 0x1700001C RID: 28
  1000.         // (get) Token: 0x06000050 RID: 80 RVA: 0x000034EC File Offset: 0x000018EC
  1001.         protected bool IsParentMdi
  1002.         {
  1003.             get
  1004.             {
  1005.                 bool flag = this.Parent == null;
  1006.                 return !flag && this.Parent.Parent != null;
  1007.             }
  1008.         }
  1009.  
  1010.         // Token: 0x1700001D RID: 29
  1011.         // (get) Token: 0x06000051 RID: 81 RVA: 0x00003520 File Offset: 0x00001920
  1012.         // (set) Token: 0x06000052 RID: 82 RVA: 0x00003538 File Offset: 0x00001938
  1013.         protected int LockWidth
  1014.         {
  1015.             get
  1016.             {
  1017.                 return this._LockWidth;
  1018.             }
  1019.             set
  1020.             {
  1021.                 this._LockWidth = value;
  1022.                 bool flag = this.LockWidth != 0 && this.IsHandleCreated;
  1023.                 if (flag)
  1024.                 {
  1025.                     this.Width = this.LockWidth;
  1026.                 }
  1027.             }
  1028.         }
  1029.  
  1030.         // Token: 0x1700001E RID: 30
  1031.         // (get) Token: 0x06000053 RID: 83 RVA: 0x00003578 File Offset: 0x00001978
  1032.         // (set) Token: 0x06000054 RID: 84 RVA: 0x00003590 File Offset: 0x00001990
  1033.         protected int LockHeight
  1034.         {
  1035.             get
  1036.             {
  1037.                 return this._LockHeight;
  1038.             }
  1039.             set
  1040.             {
  1041.                 this._LockHeight = value;
  1042.                 bool flag = this.LockHeight != 0 && this.IsHandleCreated;
  1043.                 if (flag)
  1044.                 {
  1045.                     this.Height = this.LockHeight;
  1046.                 }
  1047.             }
  1048.         }
  1049.  
  1050.         // Token: 0x1700001F RID: 31
  1051.         // (get) Token: 0x06000055 RID: 85 RVA: 0x000035D0 File Offset: 0x000019D0
  1052.         // (set) Token: 0x06000056 RID: 86 RVA: 0x000035E8 File Offset: 0x000019E8
  1053.         protected int Header
  1054.         {
  1055.             get
  1056.             {
  1057.                 return this._Header;
  1058.             }
  1059.             set
  1060.             {
  1061.                 this._Header = value;
  1062.                 bool flag = !this._ControlMode;
  1063.                 if (flag)
  1064.                 {
  1065.                     this.Frame = checked(new Rectangle(7, 7, this.Width - 14, value - 7));
  1066.                     this.Invalidate();
  1067.                 }
  1068.             }
  1069.         }
  1070.  
  1071.         // Token: 0x17000020 RID: 32
  1072.         // (get) Token: 0x06000057 RID: 87 RVA: 0x00003630 File Offset: 0x00001A30
  1073.         // (set) Token: 0x06000058 RID: 88 RVA: 0x00003648 File Offset: 0x00001A48
  1074.         protected bool ControlMode
  1075.         {
  1076.             get
  1077.             {
  1078.                 return this._ControlMode;
  1079.             }
  1080.             set
  1081.             {
  1082.                 this._ControlMode = value;
  1083.                 this.Transparent = this._Transparent;
  1084.                 bool flag = this._Transparent && this._BackColor;
  1085.                 if (flag)
  1086.                 {
  1087.                     this.BackColor = Color.Transparent;
  1088.                 }
  1089.                 this.InvalidateBitmap();
  1090.                 this.Invalidate();
  1091.             }
  1092.         }
  1093.  
  1094.         // Token: 0x17000021 RID: 33
  1095.         // (get) Token: 0x06000059 RID: 89 RVA: 0x000036A0 File Offset: 0x00001AA0
  1096.         // (set) Token: 0x0600005A RID: 90 RVA: 0x000036B8 File Offset: 0x00001AB8
  1097.         protected bool IsAnimated
  1098.         {
  1099.             get
  1100.             {
  1101.                 return this._IsAnimated;
  1102.             }
  1103.             set
  1104.             {
  1105.                 this._IsAnimated = value;
  1106.                 this.InvalidateTimer();
  1107.             }
  1108.         }
  1109.  
  1110.         // Token: 0x0600005B RID: 91 RVA: 0x000036CC File Offset: 0x00001ACC
  1111.         protected Pen GetPen(string name)
  1112.         {
  1113.             return new Pen(this.Items[name]);
  1114.         }
  1115.  
  1116.         // Token: 0x0600005C RID: 92 RVA: 0x000036F0 File Offset: 0x00001AF0
  1117.         protected Pen GetPen(string name, float width)
  1118.         {
  1119.             return new Pen(this.Items[name], width);
  1120.         }
  1121.  
  1122.         // Token: 0x0600005D RID: 93 RVA: 0x00003714 File Offset: 0x00001B14
  1123.         protected SolidBrush GetBrush(string name)
  1124.         {
  1125.             return new SolidBrush(this.Items[name]);
  1126.         }
  1127.  
  1128.         // Token: 0x0600005E RID: 94 RVA: 0x00003738 File Offset: 0x00001B38
  1129.         protected Color GetColor(string name)
  1130.         {
  1131.             return this.Items[name];
  1132.         }
  1133.  
  1134.         // Token: 0x0600005F RID: 95 RVA: 0x00003758 File Offset: 0x00001B58
  1135.         protected void SetColor(string name, Color value)
  1136.         {
  1137.             bool flag = this.Items.ContainsKey(name);
  1138.             if (flag)
  1139.             {
  1140.                 this.Items[name] = value;
  1141.             }
  1142.             else
  1143.             {
  1144.                 this.Items.Add(name, value);
  1145.             }
  1146.         }
  1147.  
  1148.         // Token: 0x06000060 RID: 96 RVA: 0x00003798 File Offset: 0x00001B98
  1149.         protected void SetColor(string name, byte r, byte g, byte b)
  1150.         {
  1151.             this.SetColor(name, Color.FromArgb((int)r, (int)g, (int)b));
  1152.         }
  1153.  
  1154.         // Token: 0x06000061 RID: 97 RVA: 0x000037B0 File Offset: 0x00001BB0
  1155.         protected void SetColor(string name, byte a, byte r, byte g, byte b)
  1156.         {
  1157.             this.SetColor(name, Color.FromArgb((int)a, (int)r, (int)g, (int)b));
  1158.         }
  1159.  
  1160.         // Token: 0x06000062 RID: 98 RVA: 0x000037C8 File Offset: 0x00001BC8
  1161.         protected void SetColor(string name, byte a, Color value)
  1162.         {
  1163.             this.SetColor(name, Color.FromArgb((int)a, value));
  1164.         }
  1165.  
  1166.         // Token: 0x06000063 RID: 99 RVA: 0x000037DC File Offset: 0x00001BDC
  1167.         private void InvalidateBitmap()
  1168.         {
  1169.             bool flag = this._Transparent && this._ControlMode;
  1170.             if (flag)
  1171.             {
  1172.                 bool flag2 = this.Width == 0 || this.Height == 0;
  1173.                 if (!flag2)
  1174.                 {
  1175.                     this.B = new Bitmap(this.Width, this.Height, PixelFormat.Format32bppPArgb);
  1176.                     this.G = Graphics.FromImage(this.B);
  1177.                 }
  1178.             }
  1179.             else
  1180.             {
  1181.                 this.G = null;
  1182.                 this.B = null;
  1183.             }
  1184.         }
  1185.  
  1186.         // Token: 0x06000064 RID: 100 RVA: 0x00003864 File Offset: 0x00001C64
  1187.         private void InvalidateCustimization()
  1188.         {
  1189.             checked
  1190.             {
  1191.                 MemoryStream memoryStream = new MemoryStream(this.Items.Count * 4);
  1192.                 Bloom[] colors = this.Colors;
  1193.                 for (int i = 0; i < colors.Length; i++)
  1194.                 {
  1195.                     Bloom bloom = colors[i];
  1196.                     memoryStream.Write(BitConverter.GetBytes(bloom.Value.ToArgb()), 0, 4);
  1197.                 }
  1198.                 memoryStream.Close();
  1199.                 this._Customization = Convert.ToBase64String(memoryStream.ToArray());
  1200.             }
  1201.         }
  1202.  
  1203.         // Token: 0x06000065 RID: 101 RVA: 0x000038E8 File Offset: 0x00001CE8
  1204.         private void InvalidateTimer()
  1205.         {
  1206.             bool flag = this.DesignMode || !this.DoneCreation;
  1207.             if (!flag)
  1208.             {
  1209.                 flag = this._IsAnimated;
  1210.                 if (flag)
  1211.                 {
  1212.                     ThemeShare.AddAnimationCallback(new ThemeShare.AnimationDelegate(this.DoAnimation));
  1213.                 }
  1214.                 else
  1215.                 {
  1216.                     ThemeShare.RemoveAnimationCallback(new ThemeShare.AnimationDelegate(this.DoAnimation));
  1217.                 }
  1218.             }
  1219.         }
  1220.  
  1221.         // Token: 0x06000066 RID: 102
  1222.         protected abstract void ColorHook();
  1223.  
  1224.         // Token: 0x06000067 RID: 103
  1225.         protected abstract void PaintHook();
  1226.  
  1227.         // Token: 0x06000068 RID: 104 RVA: 0x00003948 File Offset: 0x00001D48
  1228.         protected virtual void OnCreation()
  1229.         {
  1230.         }
  1231.  
  1232.         // Token: 0x06000069 RID: 105 RVA: 0x0000394C File Offset: 0x00001D4C
  1233.         protected virtual void OnAnimation()
  1234.         {
  1235.         }
  1236.  
  1237.         // Token: 0x0600006A RID: 106 RVA: 0x00003950 File Offset: 0x00001D50
  1238.         protected Rectangle Offset(Rectangle r, int amount)
  1239.         {
  1240.             this.OffsetReturnRectangle = checked(new Rectangle(r.X + amount, r.Y + amount, r.Width - amount * 2, r.Height - amount * 2));
  1241.             return this.OffsetReturnRectangle;
  1242.         }
  1243.  
  1244.         // Token: 0x0600006B RID: 107 RVA: 0x0000399C File Offset: 0x00001D9C
  1245.         protected Size Offset(Size s, int amount)
  1246.         {
  1247.             this.OffsetReturnSize = checked(new Size(s.Width + amount, s.Height + amount));
  1248.             return this.OffsetReturnSize;
  1249.         }
  1250.  
  1251.         // Token: 0x0600006C RID: 108 RVA: 0x000039D4 File Offset: 0x00001DD4
  1252.         protected Point Offset(Point p, int amount)
  1253.         {
  1254.             this.OffsetReturnPoint = checked(new Point(p.X + amount, p.Y + amount));
  1255.             return this.OffsetReturnPoint;
  1256.         }
  1257.  
  1258.         // Token: 0x0600006D RID: 109 RVA: 0x00003A0C File Offset: 0x00001E0C
  1259.         protected Point Center(Rectangle p, Rectangle c)
  1260.         {
  1261.             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));
  1262.             return this.CenterReturn;
  1263.         }
  1264.  
  1265.         // Token: 0x0600006E RID: 110 RVA: 0x00003A78 File Offset: 0x00001E78
  1266.         protected Point Center(Rectangle p, Size c)
  1267.         {
  1268.             this.CenterReturn = checked(new Point(p.Width / 2 - c.Width / 2 + p.X, p.Height / 2 - c.Height / 2 + p.Y));
  1269.             return this.CenterReturn;
  1270.         }
  1271.  
  1272.         // Token: 0x0600006F RID: 111 RVA: 0x00003AD4 File Offset: 0x00001ED4
  1273.         protected Point Center(Rectangle child)
  1274.         {
  1275.             return this.Center(this.Width, this.Height, child.Width, child.Height);
  1276.         }
  1277.  
  1278.         // Token: 0x06000070 RID: 112 RVA: 0x00003B08 File Offset: 0x00001F08
  1279.         protected Point Center(Size child)
  1280.         {
  1281.             return this.Center(this.Width, this.Height, child.Width, child.Height);
  1282.         }
  1283.  
  1284.         // Token: 0x06000071 RID: 113 RVA: 0x00003B3C File Offset: 0x00001F3C
  1285.         protected Point Center(int childWidth, int childHeight)
  1286.         {
  1287.             return this.Center(this.Width, this.Height, childWidth, childHeight);
  1288.         }
  1289.  
  1290.         // Token: 0x06000072 RID: 114 RVA: 0x00003B64 File Offset: 0x00001F64
  1291.         protected Point Center(Size p, Size c)
  1292.         {
  1293.             return this.Center(p.Width, p.Height, c.Width, c.Height);
  1294.         }
  1295.  
  1296.         // Token: 0x06000073 RID: 115 RVA: 0x00003B98 File Offset: 0x00001F98
  1297.         protected Point Center(int pWidth, int pHeight, int cWidth, int cHeight)
  1298.         {
  1299.             this.CenterReturn = checked(new Point(pWidth / 2 - cWidth / 2, pHeight / 2 - cHeight / 2));
  1300.             return this.CenterReturn;
  1301.         }
  1302.  
  1303.         // Token: 0x06000074 RID: 116 RVA: 0x00003BCC File Offset: 0x00001FCC
  1304.         protected Size Measure()
  1305.         {
  1306.             Graphics measureGraphics = this.MeasureGraphics;
  1307.             Size result;
  1308.             lock (measureGraphics)
  1309.             {
  1310.                 result = this.MeasureGraphics.MeasureString(this.Text, this.Font, this.Width).ToSize();
  1311.             }
  1312.             return result;
  1313.         }
  1314.  
  1315.         // Token: 0x06000075 RID: 117 RVA: 0x00003C30 File Offset: 0x00002030
  1316.         protected Size Measure(string text)
  1317.         {
  1318.             Graphics measureGraphics = this.MeasureGraphics;
  1319.             Size result;
  1320.             lock (measureGraphics)
  1321.             {
  1322.                 result = this.MeasureGraphics.MeasureString(text, this.Font, this.Width).ToSize();
  1323.             }
  1324.             return result;
  1325.         }
  1326.  
  1327.         // Token: 0x06000076 RID: 118 RVA: 0x00003C90 File Offset: 0x00002090
  1328.         protected void DrawPixel(Color c1, int x, int y)
  1329.         {
  1330.             bool transparent = this._Transparent;
  1331.             if (transparent)
  1332.             {
  1333.                 this.B.SetPixel(x, y, c1);
  1334.             }
  1335.             else
  1336.             {
  1337.                 this.DrawPixelBrush = new SolidBrush(c1);
  1338.                 this.G.FillRectangle(this.DrawPixelBrush, x, y, 1, 1);
  1339.             }
  1340.         }
  1341.  
  1342.         // Token: 0x06000077 RID: 119 RVA: 0x00003CE0 File Offset: 0x000020E0
  1343.         protected void DrawCorners(Color c1, int offset)
  1344.         {
  1345.             this.DrawCorners(c1, 0, 0, this.Width, this.Height, offset);
  1346.         }
  1347.  
  1348.         // Token: 0x06000078 RID: 120 RVA: 0x00003CFC File Offset: 0x000020FC
  1349.         protected void DrawCorners(Color c1, Rectangle r1, int offset)
  1350.         {
  1351.             this.DrawCorners(c1, r1.X, r1.Y, r1.Width, r1.Height, offset);
  1352.         }
  1353.  
  1354.         // Token: 0x06000079 RID: 121 RVA: 0x00003D28 File Offset: 0x00002128
  1355.         protected void DrawCorners(Color c1, int x, int y, int width, int height, int offset)
  1356.         {
  1357.             checked
  1358.             {
  1359.                 this.DrawCorners(c1, x + offset, y + offset, width - offset * 2, height - offset * 2);
  1360.             }
  1361.         }
  1362.  
  1363.         // Token: 0x0600007A RID: 122 RVA: 0x00003D4C File Offset: 0x0000214C
  1364.         protected void DrawCorners(Color c1)
  1365.         {
  1366.             this.DrawCorners(c1, 0, 0, this.Width, this.Height);
  1367.         }
  1368.  
  1369.         // Token: 0x0600007B RID: 123 RVA: 0x00003D68 File Offset: 0x00002168
  1370.         protected void DrawCorners(Color c1, Rectangle r1)
  1371.         {
  1372.             this.DrawCorners(c1, r1.X, r1.Y, r1.Width, r1.Height);
  1373.         }
  1374.  
  1375.         // Token: 0x0600007C RID: 124 RVA: 0x00003D90 File Offset: 0x00002190
  1376.         protected void DrawCorners(Color c1, int x, int y, int width, int height)
  1377.         {
  1378.             bool flag = this._NoRounding;
  1379.             checked
  1380.             {
  1381.                 if (!flag)
  1382.                 {
  1383.                     flag = this._Transparent;
  1384.                     if (flag)
  1385.                     {
  1386.                         this.B.SetPixel(x, y, c1);
  1387.                         this.B.SetPixel(x + (width - 1), y, c1);
  1388.                         this.B.SetPixel(x, y + (height - 1), c1);
  1389.                         this.B.SetPixel(x + (width - 1), y + (height - 1), c1);
  1390.                     }
  1391.                     else
  1392.                     {
  1393.                         this.DrawCornersBrush = new SolidBrush(c1);
  1394.                         this.G.FillRectangle(this.DrawCornersBrush, x, y, 1, 1);
  1395.                         this.G.FillRectangle(this.DrawCornersBrush, x + (width - 1), y, 1, 1);
  1396.                         this.G.FillRectangle(this.DrawCornersBrush, x, y + (height - 1), 1, 1);
  1397.                         this.G.FillRectangle(this.DrawCornersBrush, x + (width - 1), y + (height - 1), 1, 1);
  1398.                     }
  1399.                 }
  1400.             }
  1401.         }
  1402.  
  1403.         // Token: 0x0600007D RID: 125 RVA: 0x00003E88 File Offset: 0x00002288
  1404.         protected void DrawBorders(Pen p1, int offset)
  1405.         {
  1406.             this.DrawBorders(p1, 0, 0, this.Width, this.Height, offset);
  1407.         }
  1408.  
  1409.         // Token: 0x0600007E RID: 126 RVA: 0x00003EA4 File Offset: 0x000022A4
  1410.         protected void DrawBorders(Pen p1, Rectangle r, int offset)
  1411.         {
  1412.             this.DrawBorders(p1, r.X, r.Y, r.Width, r.Height, offset);
  1413.         }
  1414.  
  1415.         // Token: 0x0600007F RID: 127 RVA: 0x00003ED0 File Offset: 0x000022D0
  1416.         protected void DrawBorders(Pen p1, int x, int y, int width, int height, int offset)
  1417.         {
  1418.             checked
  1419.             {
  1420.                 this.DrawBorders(p1, x + offset, y + offset, width - offset * 2, height - offset * 2);
  1421.             }
  1422.         }
  1423.  
  1424.         // Token: 0x06000080 RID: 128 RVA: 0x00003EF4 File Offset: 0x000022F4
  1425.         protected void DrawBorders(Pen p1)
  1426.         {
  1427.             this.DrawBorders(p1, 0, 0, this.Width, this.Height);
  1428.         }
  1429.  
  1430.         // Token: 0x06000081 RID: 129 RVA: 0x00003F10 File Offset: 0x00002310
  1431.         protected void DrawBorders(Pen p1, Rectangle r)
  1432.         {
  1433.             this.DrawBorders(p1, r.X, r.Y, r.Width, r.Height);
  1434.         }
  1435.  
  1436.         // Token: 0x06000082 RID: 130 RVA: 0x00003F38 File Offset: 0x00002338
  1437.         protected void DrawBorders(Pen p1, int x, int y, int width, int height)
  1438.         {
  1439.             checked
  1440.             {
  1441.                 this.G.DrawRectangle(p1, x, y, width - 1, height - 1);
  1442.             }
  1443.         }
  1444.  
  1445.         // Token: 0x06000083 RID: 131 RVA: 0x00003F54 File Offset: 0x00002354
  1446.         protected void DrawText(Brush b1, HorizontalAlignment a, int x, int y)
  1447.         {
  1448.             this.DrawText(b1, this.Text, a, x, y);
  1449.         }
  1450.  
  1451.         // Token: 0x06000084 RID: 132 RVA: 0x00003F6C File Offset: 0x0000236C
  1452.         protected void DrawText(Brush b1, string text, HorizontalAlignment a, int x, int y)
  1453.         {
  1454.             bool flag = text.Length == 0;
  1455.             checked
  1456.             {
  1457.                 if (!flag)
  1458.                 {
  1459.                     this.DrawTextSize = this.Measure(text);
  1460.                     this.DrawTextPoint = new Point(this.Width / 2 - this.DrawTextSize.Width / 2, this.Header / 2 - this.DrawTextSize.Height / 2);
  1461.                     switch (a)
  1462.                     {
  1463.                         case HorizontalAlignment.Left:
  1464.                             this.G.DrawString(text, this.Font, b1, (float)x, (float)(this.DrawTextPoint.Y + y));
  1465.                             break;
  1466.                         case HorizontalAlignment.Right:
  1467.                             this.G.DrawString(text, this.Font, b1, (float)(this.Width - this.DrawTextSize.Width - x), (float)(this.DrawTextPoint.Y + y));
  1468.                             break;
  1469.                         case HorizontalAlignment.Center:
  1470.                             this.G.DrawString(text, this.Font, b1, (float)(this.DrawTextPoint.X + x), (float)(this.DrawTextPoint.Y + y));
  1471.                             break;
  1472.                     }
  1473.                 }
  1474.             }
  1475.         }
  1476.  
  1477.         // Token: 0x06000085 RID: 133 RVA: 0x00004088 File Offset: 0x00002488
  1478.         protected void DrawText(Brush b1, Point p1)
  1479.         {
  1480.             bool flag = this.Text.Length == 0;
  1481.             if (!flag)
  1482.             {
  1483.                 this.G.DrawString(this.Text, this.Font, b1, p1);
  1484.             }
  1485.         }
  1486.  
  1487.         // Token: 0x06000086 RID: 134 RVA: 0x000040CC File Offset: 0x000024CC
  1488.         protected void DrawText(Brush b1, int x, int y)
  1489.         {
  1490.             bool flag = this.Text.Length == 0;
  1491.             if (!flag)
  1492.             {
  1493.                 this.G.DrawString(this.Text, this.Font, b1, (float)x, (float)y);
  1494.             }
  1495.         }
  1496.  
  1497.         // Token: 0x06000087 RID: 135 RVA: 0x00004110 File Offset: 0x00002510
  1498.         protected void DrawImage(HorizontalAlignment a, int x, int y)
  1499.         {
  1500.             this.DrawImage(this._Image, a, x, y);
  1501.         }
  1502.  
  1503.         // Token: 0x06000088 RID: 136 RVA: 0x00004124 File Offset: 0x00002524
  1504.         protected void DrawImage(Image image, HorizontalAlignment a, int x, int y)
  1505.         {
  1506.             bool flag = image == null;
  1507.             checked
  1508.             {
  1509.                 if (!flag)
  1510.                 {
  1511.                     this.DrawImagePoint = new Point(this.Width / 2 - image.Width / 2, this.Header / 2 - image.Height / 2);
  1512.                     switch (a)
  1513.                     {
  1514.                         case HorizontalAlignment.Left:
  1515.                             this.G.DrawImage(image, x, this.DrawImagePoint.Y + y, image.Width, image.Height);
  1516.                             break;
  1517.                         case HorizontalAlignment.Right:
  1518.                             this.G.DrawImage(image, this.Width - image.Width - x, this.DrawImagePoint.Y + y, image.Width, image.Height);
  1519.                             break;
  1520.                         case HorizontalAlignment.Center:
  1521.                             this.G.DrawImage(image, this.DrawImagePoint.X + x, this.DrawImagePoint.Y + y, image.Width, image.Height);
  1522.                             break;
  1523.                     }
  1524.                 }
  1525.             }
  1526.         }
  1527.  
  1528.         // Token: 0x06000089 RID: 137 RVA: 0x00004224 File Offset: 0x00002624
  1529.         protected void DrawImage(Point p1)
  1530.         {
  1531.             this.DrawImage(this._Image, p1.X, p1.Y);
  1532.         }
  1533.  
  1534.         // Token: 0x0600008A RID: 138 RVA: 0x00004244 File Offset: 0x00002644
  1535.         protected void DrawImage(int x, int y)
  1536.         {
  1537.             this.DrawImage(this._Image, x, y);
  1538.         }
  1539.  
  1540.         // Token: 0x0600008B RID: 139 RVA: 0x00004258 File Offset: 0x00002658
  1541.         protected void DrawImage(Image image, Point p1)
  1542.         {
  1543.             this.DrawImage(image, p1.X, p1.Y);
  1544.         }
  1545.  
  1546.         // Token: 0x0600008C RID: 140 RVA: 0x00004274 File Offset: 0x00002674
  1547.         protected void DrawImage(Image image, int x, int y)
  1548.         {
  1549.             bool flag = image == null;
  1550.             if (!flag)
  1551.             {
  1552.                 this.G.DrawImage(image, x, y, image.Width, image.Height);
  1553.             }
  1554.         }
  1555.  
  1556.         // Token: 0x0600008D RID: 141 RVA: 0x000042AC File Offset: 0x000026AC
  1557.         protected void DrawGradient(ColorBlend blend, int x, int y, int width, int height)
  1558.         {
  1559.             this.DrawGradientRectangle = new Rectangle(x, y, width, height);
  1560.             this.DrawGradient(blend, this.DrawGradientRectangle);
  1561.         }
  1562.  
  1563.         // Token: 0x0600008E RID: 142 RVA: 0x000042D0 File Offset: 0x000026D0
  1564.         protected void DrawGradient(ColorBlend blend, int x, int y, int width, int height, float angle)
  1565.         {
  1566.             this.DrawGradientRectangle = new Rectangle(x, y, width, height);
  1567.             this.DrawGradient(blend, this.DrawGradientRectangle, angle);
  1568.         }
  1569.  
  1570.         // Token: 0x0600008F RID: 143 RVA: 0x000042F8 File Offset: 0x000026F8
  1571.         protected void DrawGradient(ColorBlend blend, Rectangle r)
  1572.         {
  1573.             this.DrawGradientBrush = new LinearGradientBrush(r, Color.Empty, Color.Empty, 90f);
  1574.             this.DrawGradientBrush.InterpolationColors = blend;
  1575.             this.G.FillRectangle(this.DrawGradientBrush, r);
  1576.         }
  1577.  
  1578.         // Token: 0x06000090 RID: 144 RVA: 0x00004338 File Offset: 0x00002738
  1579.         protected void DrawGradient(ColorBlend blend, Rectangle r, float angle)
  1580.         {
  1581.             this.DrawGradientBrush = new LinearGradientBrush(r, Color.Empty, Color.Empty, angle);
  1582.             this.DrawGradientBrush.InterpolationColors = blend;
  1583.             this.G.FillRectangle(this.DrawGradientBrush, r);
  1584.         }
  1585.  
  1586.         // Token: 0x06000091 RID: 145 RVA: 0x00004374 File Offset: 0x00002774
  1587.         protected void DrawGradient(Color c1, Color c2, int x, int y, int width, int height)
  1588.         {
  1589.             this.DrawGradientRectangle = new Rectangle(x, y, width, height);
  1590.             this.DrawGradient(c1, c2, this.DrawGradientRectangle);
  1591.         }
  1592.  
  1593.         // Token: 0x06000092 RID: 146 RVA: 0x0000439C File Offset: 0x0000279C
  1594.         protected void DrawGradient(Color c1, Color c2, int x, int y, int width, int height, float angle)
  1595.         {
  1596.             this.DrawGradientRectangle = new Rectangle(x, y, width, height);
  1597.             this.DrawGradient(c1, c2, this.DrawGradientRectangle, angle);
  1598.         }
  1599.  
  1600.         // Token: 0x06000093 RID: 147 RVA: 0x000043C4 File Offset: 0x000027C4
  1601.         protected void DrawGradient(Color c1, Color c2, Rectangle r)
  1602.         {
  1603.             this.DrawGradientBrush = new LinearGradientBrush(r, c1, c2, 90f);
  1604.             this.G.FillRectangle(this.DrawGradientBrush, r);
  1605.         }
  1606.  
  1607.         // Token: 0x06000094 RID: 148 RVA: 0x000043F0 File Offset: 0x000027F0
  1608.         protected void DrawGradient(Color c1, Color c2, Rectangle r, float angle)
  1609.         {
  1610.             this.DrawGradientBrush = new LinearGradientBrush(r, c1, c2, angle);
  1611.             this.G.FillRectangle(this.DrawGradientBrush, r);
  1612.         }
  1613.  
  1614.         // Token: 0x06000095 RID: 149 RVA: 0x00004418 File Offset: 0x00002818
  1615.         public void DrawRadial(ColorBlend blend, int x, int y, int width, int height)
  1616.         {
  1617.             this.DrawRadialRectangle = new Rectangle(x, y, width, height);
  1618.             this.DrawRadial(blend, this.DrawRadialRectangle, width / 2, height / 2);
  1619.         }
  1620.  
  1621.         // Token: 0x06000096 RID: 150 RVA: 0x00004444 File Offset: 0x00002844
  1622.         public void DrawRadial(ColorBlend blend, int x, int y, int width, int height, Point center)
  1623.         {
  1624.             this.DrawRadialRectangle = new Rectangle(x, y, width, height);
  1625.             this.DrawRadial(blend, this.DrawRadialRectangle, center.X, center.Y);
  1626.         }
  1627.  
  1628.         // Token: 0x06000097 RID: 151 RVA: 0x00004478 File Offset: 0x00002878
  1629.         public void DrawRadial(ColorBlend blend, int x, int y, int width, int height, int cx, int cy)
  1630.         {
  1631.             this.DrawRadialRectangle = new Rectangle(x, y, width, height);
  1632.             this.DrawRadial(blend, this.DrawRadialRectangle, cx, cy);
  1633.         }
  1634.  
  1635.         // Token: 0x06000098 RID: 152 RVA: 0x000044A0 File Offset: 0x000028A0
  1636.         public void DrawRadial(ColorBlend blend, Rectangle r)
  1637.         {
  1638.             this.DrawRadial(blend, r, r.Width / 2, r.Height / 2);
  1639.         }
  1640.  
  1641.         // Token: 0x06000099 RID: 153 RVA: 0x000044C0 File Offset: 0x000028C0
  1642.         public void DrawRadial(ColorBlend blend, Rectangle r, Point center)
  1643.         {
  1644.             this.DrawRadial(blend, r, center.X, center.Y);
  1645.         }
  1646.  
  1647.         // Token: 0x0600009A RID: 154 RVA: 0x000044DC File Offset: 0x000028DC
  1648.         public void DrawRadial(ColorBlend blend, Rectangle r, int cx, int cy)
  1649.         {
  1650.             this.DrawRadialPath.Reset();
  1651.             checked
  1652.             {
  1653.                 this.DrawRadialPath.AddEllipse(r.X, r.Y, r.Width - 1, r.Height - 1);
  1654.                 this.DrawRadialBrush1 = new PathGradientBrush(this.DrawRadialPath);
  1655.                 PathGradientBrush arg_71_0 = this.DrawRadialBrush1;
  1656.                 Point p = new Point(r.X + cx, r.Y + cy);
  1657.                 arg_71_0.CenterPoint = p;
  1658.                 this.DrawRadialBrush1.InterpolationColors = blend;
  1659.                 bool flag = this.G.SmoothingMode == SmoothingMode.AntiAlias;
  1660.                 if (flag)
  1661.                 {
  1662.                     this.G.FillEllipse(this.DrawRadialBrush1, r.X + 1, r.Y + 1, r.Width - 3, r.Height - 3);
  1663.                 }
  1664.                 else
  1665.                 {
  1666.                     this.G.FillEllipse(this.DrawRadialBrush1, r);
  1667.                 }
  1668.             }
  1669.         }
  1670.  
  1671.         // Token: 0x0600009B RID: 155 RVA: 0x000045D0 File Offset: 0x000029D0
  1672.         protected void DrawRadial(Color c1, Color c2, int x, int y, int width, int height)
  1673.         {
  1674.             this.DrawRadialRectangle = new Rectangle(x, y, width, height);
  1675.             this.DrawRadial(c1, c2, this.DrawGradientRectangle);
  1676.         }
  1677.  
  1678.         // Token: 0x0600009C RID: 156 RVA: 0x000045F8 File Offset: 0x000029F8
  1679.         protected void DrawRadial(Color c1, Color c2, int x, int y, int width, int height, float angle)
  1680.         {
  1681.             this.DrawRadialRectangle = new Rectangle(x, y, width, height);
  1682.             this.DrawRadial(c1, c2, this.DrawGradientRectangle, angle);
  1683.         }
  1684.  
  1685.         // Token: 0x0600009D RID: 157 RVA: 0x00004620 File Offset: 0x00002A20
  1686.         protected void DrawRadial(Color c1, Color c2, Rectangle r)
  1687.         {
  1688.             this.DrawRadialBrush2 = new LinearGradientBrush(r, c1, c2, 90f);
  1689.             this.G.FillRectangle(this.DrawGradientBrush, r);
  1690.         }
  1691.  
  1692.         // Token: 0x0600009E RID: 158 RVA: 0x0000464C File Offset: 0x00002A4C
  1693.         protected void DrawRadial(Color c1, Color c2, Rectangle r, float angle)
  1694.         {
  1695.             this.DrawRadialBrush2 = new LinearGradientBrush(r, c1, c2, angle);
  1696.             this.G.FillEllipse(this.DrawGradientBrush, r);
  1697.         }
  1698.  
  1699.         // Token: 0x0600009F RID: 159 RVA: 0x00004674 File Offset: 0x00002A74
  1700.         public GraphicsPath CreateRound(int x, int y, int width, int height, int slope)
  1701.         {
  1702.             this.CreateRoundRectangle = new Rectangle(x, y, width, height);
  1703.             return this.CreateRound(this.CreateRoundRectangle, slope);
  1704.         }
  1705.  
  1706.         // Token: 0x060000A0 RID: 160 RVA: 0x000046A8 File Offset: 0x00002AA8
  1707.         public GraphicsPath CreateRound(Rectangle r, int slope)
  1708.         {
  1709.             this.CreateRoundPath = new GraphicsPath(FillMode.Winding);
  1710.             this.CreateRoundPath.AddArc(r.X, r.Y, slope, slope, 180f, 90f);
  1711.             checked
  1712.             {
  1713.                 this.CreateRoundPath.AddArc(r.Right - slope, r.Y, slope, slope, 270f, 90f);
  1714.                 this.CreateRoundPath.AddArc(r.Right - slope, r.Bottom - slope, slope, slope, 0f, 90f);
  1715.                 this.CreateRoundPath.AddArc(r.X, r.Bottom - slope, slope, slope, 90f, 90f);
  1716.                 this.CreateRoundPath.CloseFigure();
  1717.                 return this.CreateRoundPath;
  1718.             }
  1719.         }
  1720.  
  1721.         // Token: 0x04000006 RID: 6
  1722.         protected Graphics G;
  1723.  
  1724.         // Token: 0x04000007 RID: 7
  1725.         protected Bitmap B;
  1726.  
  1727.         // Token: 0x04000008 RID: 8
  1728.         private bool DoneCreation;
  1729.  
  1730.         // Token: 0x04000009 RID: 9
  1731.         private bool HasShown;
  1732.  
  1733.         // Token: 0x0400000A RID: 10
  1734.         private Rectangle Frame;
  1735.  
  1736.         // Token: 0x0400000B RID: 11
  1737.         protected MouseState State;
  1738.  
  1739.         // Token: 0x0400000C RID: 12
  1740.         private bool WM_LMBUTTONDOWN;
  1741.  
  1742.         // Token: 0x0400000D RID: 13
  1743.         private Point GetIndexPoint;
  1744.  
  1745.         // Token: 0x0400000E RID: 14
  1746.         private bool B1;
  1747.  
  1748.         // Token: 0x0400000F RID: 15
  1749.         private bool B2;
  1750.  
  1751.         // Token: 0x04000010 RID: 16
  1752.         private bool B3;
  1753.  
  1754.         // Token: 0x04000011 RID: 17
  1755.         private bool B4;
  1756.  
  1757.         // Token: 0x04000012 RID: 18
  1758.         private int Current;
  1759.  
  1760.         // Token: 0x04000013 RID: 19
  1761.         private int Previous;
  1762.  
  1763.         // Token: 0x04000014 RID: 20
  1764.         private Message[] Messages;
  1765.  
  1766.         // Token: 0x04000015 RID: 21
  1767.         private bool _BackColor;
  1768.  
  1769.         // Token: 0x04000016 RID: 22
  1770.         private bool _SmartBounds;
  1771.  
  1772.         // Token: 0x04000017 RID: 23
  1773.         private bool _Movable;
  1774.  
  1775.         // Token: 0x04000018 RID: 24
  1776.         private bool _Sizable;
  1777.  
  1778.         // Token: 0x04000019 RID: 25
  1779.         private Color _TransparencyKey;
  1780.  
  1781.         // Token: 0x0400001A RID: 26
  1782.         private FormBorderStyle _BorderStyle;
  1783.  
  1784.         // Token: 0x0400001B RID: 27
  1785.         private FormStartPosition _StartPosition;
  1786.  
  1787.         // Token: 0x0400001C RID: 28
  1788.         private bool _NoRounding;
  1789.  
  1790.         // Token: 0x0400001D RID: 29
  1791.         private Image _Image;
  1792.  
  1793.         // Token: 0x0400001E RID: 30
  1794.         private Dictionary<string, Color> Items;
  1795.  
  1796.         // Token: 0x0400001F RID: 31
  1797.         private string _Customization;
  1798.  
  1799.         // Token: 0x04000020 RID: 32
  1800.         private bool _Transparent;
  1801.  
  1802.         // Token: 0x04000021 RID: 33
  1803.         private Size _ImageSize;
  1804.  
  1805.         // Token: 0x04000022 RID: 34
  1806.         private bool _IsParentForm;
  1807.  
  1808.         // Token: 0x04000023 RID: 35
  1809.         private int _LockWidth;
  1810.  
  1811.         // Token: 0x04000024 RID: 36
  1812.         private int _LockHeight;
  1813.  
  1814.         // Token: 0x04000025 RID: 37
  1815.         private int _Header;
  1816.  
  1817.         // Token: 0x04000026 RID: 38
  1818.         private bool _ControlMode;
  1819.  
  1820.         // Token: 0x04000027 RID: 39
  1821.         private bool _IsAnimated;
  1822.  
  1823.         // Token: 0x04000028 RID: 40
  1824.         private Rectangle OffsetReturnRectangle;
  1825.  
  1826.         // Token: 0x04000029 RID: 41
  1827.         private Size OffsetReturnSize;
  1828.  
  1829.         // Token: 0x0400002A RID: 42
  1830.         private Point OffsetReturnPoint;
  1831.  
  1832.         // Token: 0x0400002B RID: 43
  1833.         private Point CenterReturn;
  1834.  
  1835.         // Token: 0x0400002C RID: 44
  1836.         private Bitmap MeasureBitmap;
  1837.  
  1838.         // Token: 0x0400002D RID: 45
  1839.         private Graphics MeasureGraphics;
  1840.  
  1841.         // Token: 0x0400002E RID: 46
  1842.         private SolidBrush DrawPixelBrush;
  1843.  
  1844.         // Token: 0x0400002F RID: 47
  1845.         private SolidBrush DrawCornersBrush;
  1846.  
  1847.         // Token: 0x04000030 RID: 48
  1848.         private Point DrawTextPoint;
  1849.  
  1850.         // Token: 0x04000031 RID: 49
  1851.         private Size DrawTextSize;
  1852.  
  1853.         // Token: 0x04000032 RID: 50
  1854.         private Point DrawImagePoint;
  1855.  
  1856.         // Token: 0x04000033 RID: 51
  1857.         private LinearGradientBrush DrawGradientBrush;
  1858.  
  1859.         // Token: 0x04000034 RID: 52
  1860.         private Rectangle DrawGradientRectangle;
  1861.  
  1862.         // Token: 0x04000035 RID: 53
  1863.         private GraphicsPath DrawRadialPath;
  1864.  
  1865.         // Token: 0x04000036 RID: 54
  1866.         private PathGradientBrush DrawRadialBrush1;
  1867.  
  1868.         // Token: 0x04000037 RID: 55
  1869.         private LinearGradientBrush DrawRadialBrush2;
  1870.  
  1871.         // Token: 0x04000038 RID: 56
  1872.         private Rectangle DrawRadialRectangle;
  1873.  
  1874.         // Token: 0x04000039 RID: 57
  1875.         private GraphicsPath CreateRoundPath;
  1876.  
  1877.         // Token: 0x0400003A RID: 58
  1878.         private Rectangle CreateRoundRectangle;
  1879.     }
  1880.     internal abstract class ThemeControl154 : Control
  1881.     {
  1882.         // Token: 0x060000A1 RID: 161 RVA: 0x00004778 File Offset: 0x00002B78
  1883.         public ThemeControl154()
  1884.         {
  1885.             this.Items = new Dictionary<string, Color>();
  1886.             this.SetStyle(ControlStyles.UserPaint | ControlStyles.Opaque | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
  1887.             this._ImageSize = Size.Empty;
  1888.             this.Font = new Font("Verdana", 8f);
  1889.             this.MeasureBitmap = new Bitmap(1, 1);
  1890.             this.MeasureGraphics = Graphics.FromImage(this.MeasureBitmap);
  1891.             this.DrawRadialPath = new GraphicsPath();
  1892.             this.InvalidateCustimization();
  1893.         }
  1894.  
  1895.         // Token: 0x060000A2 RID: 162 RVA: 0x000047F8 File Offset: 0x00002BF8
  1896.         protected sealed override void OnHandleCreated(EventArgs e)
  1897.         {
  1898.             this.InvalidateCustimization();
  1899.             this.ColorHook();
  1900.             bool flag = this._LockWidth != 0;
  1901.             if (flag)
  1902.             {
  1903.                 this.Width = this._LockWidth;
  1904.             }
  1905.             flag = (this._LockHeight != 0);
  1906.             if (flag)
  1907.             {
  1908.                 this.Height = this._LockHeight;
  1909.             }
  1910.             this.Transparent = this._Transparent;
  1911.             flag = (this._Transparent && this._BackColor);
  1912.             if (flag)
  1913.             {
  1914.                 this.BackColor = Color.Transparent;
  1915.             }
  1916.             base.OnHandleCreated(e);
  1917.         }
  1918.  
  1919.         // Token: 0x060000A3 RID: 163 RVA: 0x0000488C File Offset: 0x00002C8C
  1920.         protected sealed override void OnParentChanged(EventArgs e)
  1921.         {
  1922.             bool flag = this.Parent != null;
  1923.             if (flag)
  1924.             {
  1925.                 this.OnCreation();
  1926.                 this.DoneCreation = true;
  1927.                 this.InvalidateTimer();
  1928.             }
  1929.             base.OnParentChanged(e);
  1930.         }
  1931.  
  1932.         // Token: 0x060000A4 RID: 164 RVA: 0x000048CC File Offset: 0x00002CCC
  1933.         private void DoAnimation(bool i)
  1934.         {
  1935.             this.OnAnimation();
  1936.             if (i)
  1937.             {
  1938.                 this.Invalidate();
  1939.             }
  1940.         }
  1941.  
  1942.         // Token: 0x060000A5 RID: 165 RVA: 0x000048F0 File Offset: 0x00002CF0
  1943.         protected sealed override void OnPaint(PaintEventArgs e)
  1944.         {
  1945.             bool flag = this.Width == 0 || this.Height == 0;
  1946.             if (!flag)
  1947.             {
  1948.                 flag = this._Transparent;
  1949.                 if (flag)
  1950.                 {
  1951.                     this.PaintHook();
  1952.                     e.Graphics.DrawImage(this.B, 0, 0);
  1953.                 }
  1954.                 else
  1955.                 {
  1956.                     this.G = e.Graphics;
  1957.                     this.PaintHook();
  1958.                 }
  1959.             }
  1960.         }
  1961.  
  1962.         // Token: 0x060000A6 RID: 166 RVA: 0x0000495C File Offset: 0x00002D5C
  1963.         protected override void OnHandleDestroyed(EventArgs e)
  1964.         {
  1965.             ThemeShare.RemoveAnimationCallback(new ThemeShare.AnimationDelegate(this.DoAnimation));
  1966.             base.OnHandleDestroyed(e);
  1967.         }
  1968.  
  1969.         // Token: 0x060000A7 RID: 167 RVA: 0x0000497C File Offset: 0x00002D7C
  1970.         protected sealed override void OnSizeChanged(EventArgs e)
  1971.         {
  1972.             bool transparent = this._Transparent;
  1973.             if (transparent)
  1974.             {
  1975.                 this.InvalidateBitmap();
  1976.             }
  1977.             this.Invalidate();
  1978.             base.OnSizeChanged(e);
  1979.         }
  1980.  
  1981.         // Token: 0x060000A8 RID: 168 RVA: 0x000049AC File Offset: 0x00002DAC
  1982.         protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
  1983.         {
  1984.             bool flag = this._LockWidth != 0;
  1985.             if (flag)
  1986.             {
  1987.                 width = this._LockWidth;
  1988.             }
  1989.             flag = (this._LockHeight != 0);
  1990.             if (flag)
  1991.             {
  1992.                 height = this._LockHeight;
  1993.             }
  1994.             base.SetBoundsCore(x, y, width, height, specified);
  1995.         }
  1996.  
  1997.         // Token: 0x060000A9 RID: 169 RVA: 0x000049FC File Offset: 0x00002DFC
  1998.         protected override void OnMouseEnter(EventArgs e)
  1999.         {
  2000.             this.InPosition = true;
  2001.             this.SetState(MouseState.Over);
  2002.             base.OnMouseEnter(e);
  2003.         }
  2004.  
  2005.         // Token: 0x060000AA RID: 170 RVA: 0x00004A18 File Offset: 0x00002E18
  2006.         protected override void OnMouseUp(MouseEventArgs e)
  2007.         {
  2008.             bool inPosition = this.InPosition;
  2009.             if (inPosition)
  2010.             {
  2011.                 this.SetState(MouseState.Over);
  2012.             }
  2013.             base.OnMouseUp(e);
  2014.         }
  2015.  
  2016.         // Token: 0x060000AB RID: 171 RVA: 0x00004A44 File Offset: 0x00002E44
  2017.         protected override void OnMouseDown(MouseEventArgs e)
  2018.         {
  2019.             bool flag = e.Button == MouseButtons.Left;
  2020.             if (flag)
  2021.             {
  2022.                 this.SetState(MouseState.Down);
  2023.             }
  2024.             base.OnMouseDown(e);
  2025.         }
  2026.  
  2027.         // Token: 0x060000AC RID: 172 RVA: 0x00004A74 File Offset: 0x00002E74
  2028.         protected override void OnMouseLeave(EventArgs e)
  2029.         {
  2030.             this.InPosition = false;
  2031.             this.SetState(MouseState.None);
  2032.             base.OnMouseLeave(e);
  2033.         }
  2034.  
  2035.         // Token: 0x060000AD RID: 173 RVA: 0x00004A90 File Offset: 0x00002E90
  2036.         protected override void OnEnabledChanged(EventArgs e)
  2037.         {
  2038.             bool enabled = this.Enabled;
  2039.             if (enabled)
  2040.             {
  2041.                 this.SetState(MouseState.None);
  2042.             }
  2043.             else
  2044.             {
  2045.                 this.SetState(MouseState.Block);
  2046.             }
  2047.             base.OnEnabledChanged(e);
  2048.         }
  2049.  
  2050.         // Token: 0x060000AE RID: 174 RVA: 0x00004AC4 File Offset: 0x00002EC4
  2051.         private void SetState(MouseState current)
  2052.         {
  2053.             this.State = current;
  2054.             this.Invalidate();
  2055.         }
  2056.  
  2057.         // Token: 0x17000022 RID: 34
  2058.         // (get) Token: 0x060000AF RID: 175 RVA: 0x00004AD8 File Offset: 0x00002ED8
  2059.         // (set) Token: 0x060000B0 RID: 176 RVA: 0x00004AF0 File Offset: 0x00002EF0
  2060.         [EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false)]
  2061.         public override Color ForeColor
  2062.         {
  2063.             get
  2064.             {
  2065.                 return Color.Empty;
  2066.             }
  2067.             set
  2068.             {
  2069.             }
  2070.         }
  2071.  
  2072.         // Token: 0x17000023 RID: 35
  2073.         // (get) Token: 0x060000B1 RID: 177 RVA: 0x00004AF4 File Offset: 0x00002EF4
  2074.         // (set) Token: 0x060000B2 RID: 178 RVA: 0x00004B08 File Offset: 0x00002F08
  2075.         [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
  2076.         public override Image BackgroundImage
  2077.         {
  2078.             get
  2079.             {
  2080.                 return null;
  2081.             }
  2082.             set
  2083.             {
  2084.             }
  2085.         }
  2086.  
  2087.         // Token: 0x17000024 RID: 36
  2088.         // (get) Token: 0x060000B3 RID: 179 RVA: 0x00004B0C File Offset: 0x00002F0C
  2089.         // (set) Token: 0x060000B4 RID: 180 RVA: 0x00004B20 File Offset: 0x00002F20
  2090.         [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
  2091.         public override ImageLayout BackgroundImageLayout
  2092.         {
  2093.             get
  2094.             {
  2095.                 return ImageLayout.None;
  2096.             }
  2097.             set
  2098.             {
  2099.             }
  2100.         }
  2101.  
  2102.         // Token: 0x17000025 RID: 37
  2103.         // (get) Token: 0x060000B5 RID: 181 RVA: 0x00004B24 File Offset: 0x00002F24
  2104.         // (set) Token: 0x060000B6 RID: 182 RVA: 0x00004B3C File Offset: 0x00002F3C
  2105.         public override string Text
  2106.         {
  2107.             get
  2108.             {
  2109.                 return base.Text;
  2110.             }
  2111.             set
  2112.             {
  2113.                 base.Text = value;
  2114.                 this.Invalidate();
  2115.             }
  2116.         }
  2117.  
  2118.         // Token: 0x17000026 RID: 38
  2119.         // (get) Token: 0x060000B7 RID: 183 RVA: 0x00004B50 File Offset: 0x00002F50
  2120.         // (set) Token: 0x060000B8 RID: 184 RVA: 0x00004B68 File Offset: 0x00002F68
  2121.         public override Font Font
  2122.         {
  2123.             get
  2124.             {
  2125.                 return base.Font;
  2126.             }
  2127.             set
  2128.             {
  2129.                 base.Font = value;
  2130.                 this.Invalidate();
  2131.             }
  2132.         }
  2133.  
  2134.         // Token: 0x17000027 RID: 39
  2135.         // (get) Token: 0x060000B9 RID: 185 RVA: 0x00004B7C File Offset: 0x00002F7C
  2136.         // (set) Token: 0x060000BA RID: 186 RVA: 0x00004B94 File Offset: 0x00002F94
  2137.         [Category("Misc")]
  2138.         public override Color BackColor
  2139.         {
  2140.             get
  2141.             {
  2142.                 return base.BackColor;
  2143.             }
  2144.             set
  2145.             {
  2146.                 bool flag = !this.IsHandleCreated && value == Color.Transparent;
  2147.                 if (flag)
  2148.                 {
  2149.                     this._BackColor = true;
  2150.                 }
  2151.                 else
  2152.                 {
  2153.                     base.BackColor = value;
  2154.                     flag = (this.Parent != null);
  2155.                     if (flag)
  2156.                     {
  2157.                         this.ColorHook();
  2158.                     }
  2159.                 }
  2160.             }
  2161.         }
  2162.  
  2163.         // Token: 0x17000028 RID: 40
  2164.         // (get) Token: 0x060000BB RID: 187 RVA: 0x00004BEC File Offset: 0x00002FEC
  2165.         // (set) Token: 0x060000BC RID: 188 RVA: 0x00004C04 File Offset: 0x00003004
  2166.         public bool NoRounding
  2167.         {
  2168.             get
  2169.             {
  2170.                 return this._NoRounding;
  2171.             }
  2172.             set
  2173.             {
  2174.                 this._NoRounding = value;
  2175.                 this.Invalidate();
  2176.             }
  2177.         }
  2178.  
  2179.         // Token: 0x17000029 RID: 41
  2180.         // (get) Token: 0x060000BD RID: 189 RVA: 0x00004C18 File Offset: 0x00003018
  2181.         // (set) Token: 0x060000BE RID: 190 RVA: 0x00004C30 File Offset: 0x00003030
  2182.         public Image Image
  2183.         {
  2184.             get
  2185.             {
  2186.                 return this._Image;
  2187.             }
  2188.             set
  2189.             {
  2190.                 bool flag = value == null;
  2191.                 if (flag)
  2192.                 {
  2193.                     this._ImageSize = Size.Empty;
  2194.                 }
  2195.                 else
  2196.                 {
  2197.                     this._ImageSize = value.Size;
  2198.                 }
  2199.                 this._Image = value;
  2200.                 this.Invalidate();
  2201.             }
  2202.         }
  2203.  
  2204.         // Token: 0x1700002A RID: 42
  2205.         // (get) Token: 0x060000BF RID: 191 RVA: 0x00004C70 File Offset: 0x00003070
  2206.         // (set) Token: 0x060000C0 RID: 192 RVA: 0x00004C88 File Offset: 0x00003088
  2207.         public bool Transparent
  2208.         {
  2209.             get
  2210.             {
  2211.                 return this._Transparent;
  2212.             }
  2213.             set
  2214.             {
  2215.                 this._Transparent = value;
  2216.                 bool flag = !this.IsHandleCreated;
  2217.                 if (!flag)
  2218.                 {
  2219.                     flag = (!value && this.BackColor.A != 255);
  2220.                     if (flag)
  2221.                     {
  2222.                         throw new Exception("Unable to change value to false while a transparent BackColor is in use.");
  2223.                     }
  2224.                     this.SetStyle(ControlStyles.Opaque, !value);
  2225.                     this.SetStyle(ControlStyles.SupportsTransparentBackColor, value);
  2226.                     if (value)
  2227.                     {
  2228.                         this.InvalidateBitmap();
  2229.                     }
  2230.                     else
  2231.                     {
  2232.                         this.B = null;
  2233.                     }
  2234.                     this.Invalidate();
  2235.                 }
  2236.             }
  2237.         }
  2238.  
  2239.         // Token: 0x1700002B RID: 43
  2240.         // (get) Token: 0x060000C1 RID: 193 RVA: 0x00004D14 File Offset: 0x00003114
  2241.         // (set) Token: 0x060000C2 RID: 194 RVA: 0x00004D80 File Offset: 0x00003180
  2242.         public Bloom[] Colors
  2243.         {
  2244.             get
  2245.             {
  2246.                 List<Bloom> list = new List<Bloom>();
  2247.                 Dictionary<string, Color>.Enumerator enumerator = this.Items.GetEnumerator();
  2248.                 while (enumerator.MoveNext())
  2249.                 {
  2250.                     List<Bloom> arg_3F_0 = list;
  2251.                     KeyValuePair<string, Color> current = enumerator.Current;
  2252.                     string arg_37_1 = current.Key;
  2253.                     KeyValuePair<string, Color> current2 = enumerator.Current;
  2254.                     Bloom item = new Bloom(arg_37_1, current2.Value);
  2255.                     arg_3F_0.Add(item);
  2256.                 }
  2257.                 return list.ToArray();
  2258.             }
  2259.             set
  2260.             {
  2261.                 checked
  2262.                 {
  2263.                     for (int i = 0; i < value.Length; i++)
  2264.                     {
  2265.                         Bloom bloom = value[i];
  2266.                         bool flag = this.Items.ContainsKey(bloom.Name);
  2267.                         if (flag)
  2268.                         {
  2269.                             this.Items[bloom.Name] = bloom.Value;
  2270.                         }
  2271.                     }
  2272.                     this.InvalidateCustimization();
  2273.                     this.ColorHook();
  2274.                     this.Invalidate();
  2275.                 }
  2276.             }
  2277.         }
  2278.  
  2279.         // Token: 0x1700002C RID: 44
  2280.         // (get) Token: 0x060000C3 RID: 195 RVA: 0x00004DFC File Offset: 0x000031FC
  2281.         // (set) Token: 0x060000C4 RID: 196 RVA: 0x00004E14 File Offset: 0x00003214
  2282.         public string Customization
  2283.         {
  2284.             get
  2285.             {
  2286.                 return this._Customization;
  2287.             }
  2288.             set
  2289.             {
  2290.                 bool flag = Operators.CompareString(value, this._Customization, false) == 0;
  2291.                 checked
  2292.                 {
  2293.                     if (!flag)
  2294.                     {
  2295.                         Bloom[] colors = this.Colors;
  2296.                         try
  2297.                         {
  2298.                             byte[] value2 = Convert.FromBase64String(value);
  2299.                             int arg_30_0 = 0;
  2300.                             int num = colors.Length - 1;
  2301.                             int num2 = arg_30_0;
  2302.                             while (true)
  2303.                             {
  2304.                                 int arg_59_0 = num2;
  2305.                                 int num3 = num;
  2306.                                 if (arg_59_0 > num3)
  2307.                                 {
  2308.                                     break;
  2309.                                 }
  2310.                                 colors[num2].Value = Color.FromArgb(BitConverter.ToInt32(value2, num2 * 4));
  2311.                                 num2++;
  2312.                             }
  2313.                         }
  2314.                         catch (Exception arg_5D_0)
  2315.                         {
  2316.                             ProjectData.SetProjectError(arg_5D_0);
  2317.                             ProjectData.ClearProjectError();
  2318.                             return;
  2319.                         }
  2320.                         this._Customization = value;
  2321.                         this.Colors = colors;
  2322.                         this.ColorHook();
  2323.                         this.Invalidate();
  2324.                     }
  2325.                 }
  2326.             }
  2327.         }
  2328.  
  2329.         // Token: 0x1700002D RID: 45
  2330.         // (get) Token: 0x060000C5 RID: 197 RVA: 0x00004EC4 File Offset: 0x000032C4
  2331.         protected Size ImageSize
  2332.         {
  2333.             get
  2334.             {
  2335.                 return this._ImageSize;
  2336.             }
  2337.         }
  2338.  
  2339.         // Token: 0x1700002E RID: 46
  2340.         // (get) Token: 0x060000C6 RID: 198 RVA: 0x00004EDC File Offset: 0x000032DC
  2341.         // (set) Token: 0x060000C7 RID: 199 RVA: 0x00004EF4 File Offset: 0x000032F4
  2342.         protected int LockWidth
  2343.         {
  2344.             get
  2345.             {
  2346.                 return this._LockWidth;
  2347.             }
  2348.             set
  2349.             {
  2350.                 this._LockWidth = value;
  2351.                 bool flag = this.LockWidth != 0 && this.IsHandleCreated;
  2352.                 if (flag)
  2353.                 {
  2354.                     this.Width = this.LockWidth;
  2355.                 }
  2356.             }
  2357.         }
  2358.  
  2359.         // Token: 0x1700002F RID: 47
  2360.         // (get) Token: 0x060000C8 RID: 200 RVA: 0x00004F34 File Offset: 0x00003334
  2361.         // (set) Token: 0x060000C9 RID: 201 RVA: 0x00004F4C File Offset: 0x0000334C
  2362.         protected int LockHeight
  2363.         {
  2364.             get
  2365.             {
  2366.                 return this._LockHeight;
  2367.             }
  2368.             set
  2369.             {
  2370.                 this._LockHeight = value;
  2371.                 bool flag = this.LockHeight != 0 && this.IsHandleCreated;
  2372.                 if (flag)
  2373.                 {
  2374.                     this.Height = this.LockHeight;
  2375.                 }
  2376.             }
  2377.         }
  2378.  
  2379.         // Token: 0x17000030 RID: 48
  2380.         // (get) Token: 0x060000CA RID: 202 RVA: 0x00004F8C File Offset: 0x0000338C
  2381.         // (set) Token: 0x060000CB RID: 203 RVA: 0x00004FA4 File Offset: 0x000033A4
  2382.         protected bool IsAnimated
  2383.         {
  2384.             get
  2385.             {
  2386.                 return this._IsAnimated;
  2387.             }
  2388.             set
  2389.             {
  2390.                 this._IsAnimated = value;
  2391.                 this.InvalidateTimer();
  2392.             }
  2393.         }
  2394.  
  2395.         // Token: 0x060000CC RID: 204 RVA: 0x00004FB8 File Offset: 0x000033B8
  2396.         protected Pen GetPen(string name)
  2397.         {
  2398.             return new Pen(this.Items[name]);
  2399.         }
  2400.  
  2401.         // Token: 0x060000CD RID: 205 RVA: 0x00004FDC File Offset: 0x000033DC
  2402.         protected Pen GetPen(string name, float width)
  2403.         {
  2404.             return new Pen(this.Items[name], width);
  2405.         }
  2406.  
  2407.         // Token: 0x060000CE RID: 206 RVA: 0x00005000 File Offset: 0x00003400
  2408.         protected SolidBrush GetBrush(string name)
  2409.         {
  2410.             return new SolidBrush(this.Items[name]);
  2411.         }
  2412.  
  2413.         // Token: 0x060000CF RID: 207 RVA: 0x00005024 File Offset: 0x00003424
  2414.         protected Color GetColor(string name)
  2415.         {
  2416.             return this.Items[name];
  2417.         }
  2418.  
  2419.         // Token: 0x060000D0 RID: 208 RVA: 0x00005044 File Offset: 0x00003444
  2420.         protected void SetColor(string name, Color value)
  2421.         {
  2422.             bool flag = this.Items.ContainsKey(name);
  2423.             if (flag)
  2424.             {
  2425.                 this.Items[name] = value;
  2426.             }
  2427.             else
  2428.             {
  2429.                 this.Items.Add(name, value);
  2430.             }
  2431.         }
  2432.  
  2433.         // Token: 0x060000D1 RID: 209 RVA: 0x00005084 File Offset: 0x00003484
  2434.         protected void SetColor(string name, byte r, byte g, byte b)
  2435.         {
  2436.             this.SetColor(name, Color.FromArgb((int)r, (int)g, (int)b));
  2437.         }
  2438.  
  2439.         // Token: 0x060000D2 RID: 210 RVA: 0x0000509C File Offset: 0x0000349C
  2440.         protected void SetColor(string name, byte a, byte r, byte g, byte b)
  2441.         {
  2442.             this.SetColor(name, Color.FromArgb((int)a, (int)r, (int)g, (int)b));
  2443.         }
  2444.  
  2445.         // Token: 0x060000D3 RID: 211 RVA: 0x000050B4 File Offset: 0x000034B4
  2446.         protected void SetColor(string name, byte a, Color value)
  2447.         {
  2448.             this.SetColor(name, Color.FromArgb((int)a, value));
  2449.         }
  2450.  
  2451.         // Token: 0x060000D4 RID: 212 RVA: 0x000050C8 File Offset: 0x000034C8
  2452.         private void InvalidateBitmap()
  2453.         {
  2454.             bool flag = this.Width == 0 || this.Height == 0;
  2455.             if (!flag)
  2456.             {
  2457.                 this.B = new Bitmap(this.Width, this.Height, PixelFormat.Format32bppPArgb);
  2458.                 this.G = Graphics.FromImage(this.B);
  2459.             }
  2460.         }
  2461.  
  2462.         // Token: 0x060000D5 RID: 213 RVA: 0x00005124 File Offset: 0x00003524
  2463.         private void InvalidateCustimization()
  2464.         {
  2465.             checked
  2466.             {
  2467.                 MemoryStream memoryStream = new MemoryStream(this.Items.Count * 4);
  2468.                 Bloom[] colors = this.Colors;
  2469.                 for (int i = 0; i < colors.Length; i++)
  2470.                 {
  2471.                     Bloom bloom = colors[i];
  2472.                     memoryStream.Write(BitConverter.GetBytes(bloom.Value.ToArgb()), 0, 4);
  2473.                 }
  2474.                 memoryStream.Close();
  2475.                 this._Customization = Convert.ToBase64String(memoryStream.ToArray());
  2476.             }
  2477.         }
  2478.  
  2479.         // Token: 0x060000D6 RID: 214 RVA: 0x000051A8 File Offset: 0x000035A8
  2480.         private void InvalidateTimer()
  2481.         {
  2482.             bool flag = this.DesignMode || !this.DoneCreation;
  2483.             if (!flag)
  2484.             {
  2485.                 flag = this._IsAnimated;
  2486.                 if (flag)
  2487.                 {
  2488.                     ThemeShare.AddAnimationCallback(new ThemeShare.AnimationDelegate(this.DoAnimation));
  2489.                 }
  2490.                 else
  2491.                 {
  2492.                     ThemeShare.RemoveAnimationCallback(new ThemeShare.AnimationDelegate(this.DoAnimation));
  2493.                 }
  2494.             }
  2495.         }
  2496.  
  2497.         // Token: 0x060000D7 RID: 215
  2498.         protected abstract void ColorHook();
  2499.  
  2500.         // Token: 0x060000D8 RID: 216
  2501.         protected abstract void PaintHook();
  2502.  
  2503.         // Token: 0x060000D9 RID: 217 RVA: 0x00005208 File Offset: 0x00003608
  2504.         protected virtual void OnCreation()
  2505.         {
  2506.         }
  2507.  
  2508.         // Token: 0x060000DA RID: 218 RVA: 0x0000520C File Offset: 0x0000360C
  2509.         protected virtual void OnAnimation()
  2510.         {
  2511.         }
  2512.  
  2513.         // Token: 0x060000DB RID: 219 RVA: 0x00005210 File Offset: 0x00003610
  2514.         protected Rectangle Offset(Rectangle r, int amount)
  2515.         {
  2516.             this.OffsetReturnRectangle = checked(new Rectangle(r.X + amount, r.Y + amount, r.Width - amount * 2, r.Height - amount * 2));
  2517.             return this.OffsetReturnRectangle;
  2518.         }
  2519.  
  2520.         // Token: 0x060000DC RID: 220 RVA: 0x0000525C File Offset: 0x0000365C
  2521.         protected Size Offset(Size s, int amount)
  2522.         {
  2523.             this.OffsetReturnSize = checked(new Size(s.Width + amount, s.Height + amount));
  2524.             return this.OffsetReturnSize;
  2525.         }
  2526.  
  2527.         // Token: 0x060000DD RID: 221 RVA: 0x00005294 File Offset: 0x00003694
  2528.         protected Point Offset(Point p, int amount)
  2529.         {
  2530.             this.OffsetReturnPoint = checked(new Point(p.X + amount, p.Y + amount));
  2531.             return this.OffsetReturnPoint;
  2532.         }
  2533.  
  2534.         // Token: 0x060000DE RID: 222 RVA: 0x000052CC File Offset: 0x000036CC
  2535.         protected Point Center(Rectangle p, Rectangle c)
  2536.         {
  2537.             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));
  2538.             return this.CenterReturn;
  2539.         }
  2540.  
  2541.         // Token: 0x060000DF RID: 223 RVA: 0x00005338 File Offset: 0x00003738
  2542.         protected Point Center(Rectangle p, Size c)
  2543.         {
  2544.             this.CenterReturn = checked(new Point(p.Width / 2 - c.Width / 2 + p.X, p.Height / 2 - c.Height / 2 + p.Y));
  2545.             return this.CenterReturn;
  2546.         }
  2547.  
  2548.         // Token: 0x060000E0 RID: 224 RVA: 0x00005394 File Offset: 0x00003794
  2549.         protected Point Center(Rectangle child)
  2550.         {
  2551.             return this.Center(this.Width, this.Height, child.Width, child.Height);
  2552.         }
  2553.  
  2554.         // Token: 0x060000E1 RID: 225 RVA: 0x000053C8 File Offset: 0x000037C8
  2555.         protected Point Center(Size child)
  2556.         {
  2557.             return this.Center(this.Width, this.Height, child.Width, child.Height);
  2558.         }
  2559.  
  2560.         // Token: 0x060000E2 RID: 226 RVA: 0x000053FC File Offset: 0x000037FC
  2561.         protected Point Center(int childWidth, int childHeight)
  2562.         {
  2563.             return this.Center(this.Width, this.Height, childWidth, childHeight);
  2564.         }
  2565.  
  2566.         // Token: 0x060000E3 RID: 227 RVA: 0x00005424 File Offset: 0x00003824
  2567.         protected Point Center(Size p, Size c)
  2568.         {
  2569.             return this.Center(p.Width, p.Height, c.Width, c.Height);
  2570.         }
  2571.  
  2572.         // Token: 0x060000E4 RID: 228 RVA: 0x00005458 File Offset: 0x00003858
  2573.         protected Point Center(int pWidth, int pHeight, int cWidth, int cHeight)
  2574.         {
  2575.             this.CenterReturn = checked(new Point(pWidth / 2 - cWidth / 2, pHeight / 2 - cHeight / 2));
  2576.             return this.CenterReturn;
  2577.         }
  2578.  
  2579.         // Token: 0x060000E5 RID: 229 RVA: 0x0000548C File Offset: 0x0000388C
  2580.         protected Size Measure()
  2581.         {
  2582.             return this.MeasureGraphics.MeasureString(this.Text, this.Font, this.Width).ToSize();
  2583.         }
  2584.  
  2585.         // Token: 0x060000E6 RID: 230 RVA: 0x000054C4 File Offset: 0x000038C4
  2586.         protected Size Measure(string text)
  2587.         {
  2588.             return this.MeasureGraphics.MeasureString(text, this.Font, this.Width).ToSize();
  2589.         }
  2590.  
  2591.         // Token: 0x060000E7 RID: 231 RVA: 0x000054F8 File Offset: 0x000038F8
  2592.         protected void DrawPixel(Color c1, int x, int y)
  2593.         {
  2594.             bool transparent = this._Transparent;
  2595.             if (transparent)
  2596.             {
  2597.                 this.B.SetPixel(x, y, c1);
  2598.             }
  2599.             else
  2600.             {
  2601.                 this.DrawPixelBrush = new SolidBrush(c1);
  2602.                 this.G.FillRectangle(this.DrawPixelBrush, x, y, 1, 1);
  2603.             }
  2604.         }
  2605.  
  2606.         // Token: 0x060000E8 RID: 232 RVA: 0x00005548 File Offset: 0x00003948
  2607.         protected void DrawCorners(Color c1, int offset)
  2608.         {
  2609.             this.DrawCorners(c1, 0, 0, this.Width, this.Height, offset);
  2610.         }
  2611.  
  2612.         // Token: 0x060000E9 RID: 233 RVA: 0x00005564 File Offset: 0x00003964
  2613.         protected void DrawCorners(Color c1, Rectangle r1, int offset)
  2614.         {
  2615.             this.DrawCorners(c1, r1.X, r1.Y, r1.Width, r1.Height, offset);
  2616.         }
  2617.  
  2618.         // Token: 0x060000EA RID: 234 RVA: 0x00005590 File Offset: 0x00003990
  2619.         protected void DrawCorners(Color c1, int x, int y, int width, int height, int offset)
  2620.         {
  2621.             checked
  2622.             {
  2623.                 this.DrawCorners(c1, x + offset, y + offset, width - offset * 2, height - offset * 2);
  2624.             }
  2625.         }
  2626.  
  2627.         // Token: 0x060000EB RID: 235 RVA: 0x000055B4 File Offset: 0x000039B4
  2628.         protected void DrawCorners(Color c1)
  2629.         {
  2630.             this.DrawCorners(c1, 0, 0, this.Width, this.Height);
  2631.         }
  2632.  
  2633.         // Token: 0x060000EC RID: 236 RVA: 0x000055D0 File Offset: 0x000039D0
  2634.         protected void DrawCorners(Color c1, Rectangle r1)
  2635.         {
  2636.             this.DrawCorners(c1, r1.X, r1.Y, r1.Width, r1.Height);
  2637.         }
  2638.  
  2639.         // Token: 0x060000ED RID: 237 RVA: 0x000055F8 File Offset: 0x000039F8
  2640.         protected void DrawCorners(Color c1, int x, int y, int width, int height)
  2641.         {
  2642.             bool flag = this._NoRounding;
  2643.             checked
  2644.             {
  2645.                 if (!flag)
  2646.                 {
  2647.                     flag = this._Transparent;
  2648.                     if (flag)
  2649.                     {
  2650.                         this.B.SetPixel(x, y, c1);
  2651.                         this.B.SetPixel(x + (width - 1), y, c1);
  2652.                         this.B.SetPixel(x, y + (height - 1), c1);
  2653.                         this.B.SetPixel(x + (width - 1), y + (height - 1), c1);
  2654.                     }
  2655.                     else
  2656.                     {
  2657.                         this.DrawCornersBrush = new SolidBrush(c1);
  2658.                         this.G.FillRectangle(this.DrawCornersBrush, x, y, 1, 1);
  2659.                         this.G.FillRectangle(this.DrawCornersBrush, x + (width - 1), y, 1, 1);
  2660.                         this.G.FillRectangle(this.DrawCornersBrush, x, y + (height - 1), 1, 1);
  2661.                         this.G.FillRectangle(this.DrawCornersBrush, x + (width - 1), y + (height - 1), 1, 1);
  2662.                     }
  2663.                 }
  2664.             }
  2665.         }
  2666.  
  2667.         // Token: 0x060000EE RID: 238 RVA: 0x000056F0 File Offset: 0x00003AF0
  2668.         protected void DrawBorders(Pen p1, int offset)
  2669.         {
  2670.             this.DrawBorders(p1, 0, 0, this.Width, this.Height, offset);
  2671.         }
  2672.  
  2673.         // Token: 0x060000EF RID: 239 RVA: 0x0000570C File Offset: 0x00003B0C
  2674.         protected void DrawBorders(Pen p1, Rectangle r, int offset)
  2675.         {
  2676.             this.DrawBorders(p1, r.X, r.Y, r.Width, r.Height, offset);
  2677.         }
  2678.  
  2679.         // Token: 0x060000F0 RID: 240 RVA: 0x00005738 File Offset: 0x00003B38
  2680.         protected void DrawBorders(Pen p1, int x, int y, int width, int height, int offset)
  2681.         {
  2682.             checked
  2683.             {
  2684.                 this.DrawBorders(p1, x + offset, y + offset, width - offset * 2, height - offset * 2);
  2685.             }
  2686.         }
  2687.  
  2688.         // Token: 0x060000F1 RID: 241 RVA: 0x0000575C File Offset: 0x00003B5C
  2689.         protected void DrawBorders(Pen p1)
  2690.         {
  2691.             this.DrawBorders(p1, 0, 0, this.Width, this.Height);
  2692.         }
  2693.  
  2694.         // Token: 0x060000F2 RID: 242 RVA: 0x00005778 File Offset: 0x00003B78
  2695.         protected void DrawBorders(Pen p1, Rectangle r)
  2696.         {
  2697.             this.DrawBorders(p1, r.X, r.Y, r.Width, r.Height);
  2698.         }
  2699.  
  2700.         // Token: 0x060000F3 RID: 243 RVA: 0x000057A0 File Offset: 0x00003BA0
  2701.         protected void DrawBorders(Pen p1, int x, int y, int width, int height)
  2702.         {
  2703.             checked
  2704.             {
  2705.                 this.G.DrawRectangle(p1, x, y, width - 1, height - 1);
  2706.             }
  2707.         }
  2708.  
  2709.         // Token: 0x060000F4 RID: 244 RVA: 0x000057BC File Offset: 0x00003BBC
  2710.         protected void DrawText(Brush b1, HorizontalAlignment a, int x, int y)
  2711.         {
  2712.             this.DrawText(b1, this.Text, a, x, y);
  2713.         }
  2714.  
  2715.         // Token: 0x060000F5 RID: 245 RVA: 0x000057D4 File Offset: 0x00003BD4
  2716.         protected void DrawText(Brush b1, string text, HorizontalAlignment a, int x, int y)
  2717.         {
  2718.             bool flag = text.Length == 0;
  2719.             checked
  2720.             {
  2721.                 if (!flag)
  2722.                 {
  2723.                     this.DrawTextSize = this.Measure(text);
  2724.                     this.DrawTextPoint = this.Center(this.DrawTextSize);
  2725.                     switch (a)
  2726.                     {
  2727.                         case HorizontalAlignment.Left:
  2728.                             this.G.DrawString(text, this.Font, b1, (float)x, (float)(this.DrawTextPoint.Y + y));
  2729.                             break;
  2730.                         case HorizontalAlignment.Right:
  2731.                             this.G.DrawString(text, this.Font, b1, (float)(this.Width - this.DrawTextSize.Width - x), (float)(this.DrawTextPoint.Y + y));
  2732.                             break;
  2733.                         case HorizontalAlignment.Center:
  2734.                             this.G.DrawString(text, this.Font, b1, (float)(this.DrawTextPoint.X + x), (float)(this.DrawTextPoint.Y + y));
  2735.                             break;
  2736.                     }
  2737.                 }
  2738.             }
  2739.         }
  2740.  
  2741.         // Token: 0x060000F6 RID: 246 RVA: 0x000058C8 File Offset: 0x00003CC8
  2742.         protected void DrawText(Brush b1, Point p1)
  2743.         {
  2744.             bool flag = this.Text.Length == 0;
  2745.             if (!flag)
  2746.             {
  2747.                 this.G.DrawString(this.Text, this.Font, b1, p1);
  2748.             }
  2749.         }
  2750.  
  2751.         // Token: 0x060000F7 RID: 247 RVA: 0x0000590C File Offset: 0x00003D0C
  2752.         protected void DrawText(Brush b1, int x, int y)
  2753.         {
  2754.             bool flag = this.Text.Length == 0;
  2755.             if (!flag)
  2756.             {
  2757.                 this.G.DrawString(this.Text, this.Font, b1, (float)x, (float)y);
  2758.             }
  2759.         }
  2760.  
  2761.         // Token: 0x060000F8 RID: 248 RVA: 0x00005950 File Offset: 0x00003D50
  2762.         protected void DrawImage(HorizontalAlignment a, int x, int y)
  2763.         {
  2764.             this.DrawImage(this._Image, a, x, y);
  2765.         }
  2766.  
  2767.         // Token: 0x060000F9 RID: 249 RVA: 0x00005964 File Offset: 0x00003D64
  2768.         protected void DrawImage(Image image, HorizontalAlignment a, int x, int y)
  2769.         {
  2770.             bool flag = image == null;
  2771.             checked
  2772.             {
  2773.                 if (!flag)
  2774.                 {
  2775.                     this.DrawImagePoint = this.Center(image.Size);
  2776.                     switch (a)
  2777.                     {
  2778.                         case HorizontalAlignment.Left:
  2779.                             this.G.DrawImage(image, x, this.DrawImagePoint.Y + y, image.Width, image.Height);
  2780.                             break;
  2781.                         case HorizontalAlignment.Right:
  2782.                             this.G.DrawImage(image, this.Width - image.Width - x, this.DrawImagePoint.Y + y, image.Width, image.Height);
  2783.                             break;
  2784.                         case HorizontalAlignment.Center:
  2785.                             this.G.DrawImage(image, this.DrawImagePoint.X + x, this.DrawImagePoint.Y + y, image.Width, image.Height);
  2786.                             break;
  2787.                     }
  2788.                 }
  2789.             }
  2790.         }
  2791.  
  2792.         // Token: 0x060000FA RID: 250 RVA: 0x00005A48 File Offset: 0x00003E48
  2793.         protected void DrawImage(Point p1)
  2794.         {
  2795.             this.DrawImage(this._Image, p1.X, p1.Y);
  2796.         }
  2797.  
  2798.         // Token: 0x060000FB RID: 251 RVA: 0x00005A68 File Offset: 0x00003E68
  2799.         protected void DrawImage(int x, int y)
  2800.         {
  2801.             this.DrawImage(this._Image, x, y);
  2802.         }
  2803.  
  2804.         // Token: 0x060000FC RID: 252 RVA: 0x00005A7C File Offset: 0x00003E7C
  2805.         protected void DrawImage(Image image, Point p1)
  2806.         {
  2807.             this.DrawImage(image, p1.X, p1.Y);
  2808.         }
  2809.  
  2810.         // Token: 0x060000FD RID: 253 RVA: 0x00005A98 File Offset: 0x00003E98
  2811.         protected void DrawImage(Image image, int x, int y)
  2812.         {
  2813.             bool flag = image == null;
  2814.             if (!flag)
  2815.             {
  2816.                 this.G.DrawImage(image, x, y, image.Width, image.Height);
  2817.             }
  2818.         }
  2819.  
  2820.         // Token: 0x060000FE RID: 254 RVA: 0x00005AD0 File Offset: 0x00003ED0
  2821.         protected void DrawGradient(ColorBlend blend, int x, int y, int width, int height)
  2822.         {
  2823.             this.DrawGradientRectangle = new Rectangle(x, y, width, height);
  2824.             this.DrawGradient(blend, this.DrawGradientRectangle);
  2825.         }
  2826.  
  2827.         // Token: 0x060000FF RID: 255 RVA: 0x00005AF4 File Offset: 0x00003EF4
  2828.         protected void DrawGradient(ColorBlend blend, int x, int y, int width, int height, float angle)
  2829.         {
  2830.             this.DrawGradientRectangle = new Rectangle(x, y, width, height);
  2831.             this.DrawGradient(blend, this.DrawGradientRectangle, angle);
  2832.         }
  2833.  
  2834.         // Token: 0x06000100 RID: 256 RVA: 0x00005B1C File Offset: 0x00003F1C
  2835.         protected void DrawGradient(ColorBlend blend, Rectangle r)
  2836.         {
  2837.             this.DrawGradientBrush = new LinearGradientBrush(r, Color.Empty, Color.Empty, 90f);
  2838.             this.DrawGradientBrush.InterpolationColors = blend;
  2839.             this.G.FillRectangle(this.DrawGradientBrush, r);
  2840.         }
  2841.  
  2842.         // Token: 0x06000101 RID: 257 RVA: 0x00005B5C File Offset: 0x00003F5C
  2843.         protected void DrawGradient(ColorBlend blend, Rectangle r, float angle)
  2844.         {
  2845.             this.DrawGradientBrush = new LinearGradientBrush(r, Color.Empty, Color.Empty, angle);
  2846.             this.DrawGradientBrush.InterpolationColors = blend;
  2847.             this.G.FillRectangle(this.DrawGradientBrush, r);
  2848.         }
  2849.  
  2850.         // Token: 0x06000102 RID: 258 RVA: 0x00005B98 File Offset: 0x00003F98
  2851.         protected void DrawGradient(Color c1, Color c2, int x, int y, int width, int height)
  2852.         {
  2853.             this.DrawGradientRectangle = new Rectangle(x, y, width, height);
  2854.             this.DrawGradient(c1, c2, this.DrawGradientRectangle);
  2855.         }
  2856.  
  2857.         // Token: 0x06000103 RID: 259 RVA: 0x00005BC0 File Offset: 0x00003FC0
  2858.         protected void DrawGradient(Color c1, Color c2, int x, int y, int width, int height, float angle)
  2859.         {
  2860.             this.DrawGradientRectangle = new Rectangle(x, y, width, height);
  2861.             this.DrawGradient(c1, c2, this.DrawGradientRectangle, angle);
  2862.         }
  2863.  
  2864.         // Token: 0x06000104 RID: 260 RVA: 0x00005BE8 File Offset: 0x00003FE8
  2865.         protected void DrawGradient(Color c1, Color c2, Rectangle r)
  2866.         {
  2867.             this.DrawGradientBrush = new LinearGradientBrush(r, c1, c2, 90f);
  2868.             this.G.FillRectangle(this.DrawGradientBrush, r);
  2869.         }
  2870.  
  2871.         // Token: 0x06000105 RID: 261 RVA: 0x00005C14 File Offset: 0x00004014
  2872.         protected void DrawGradient(Color c1, Color c2, Rectangle r, float angle)
  2873.         {
  2874.             this.DrawGradientBrush = new LinearGradientBrush(r, c1, c2, angle);
  2875.             this.G.FillRectangle(this.DrawGradientBrush, r);
  2876.         }
  2877.  
  2878.         // Token: 0x06000106 RID: 262 RVA: 0x00005C3C File Offset: 0x0000403C
  2879.         public void DrawRadial(ColorBlend blend, int x, int y, int width, int height)
  2880.         {
  2881.             this.DrawRadialRectangle = new Rectangle(x, y, width, height);
  2882.             this.DrawRadial(blend, this.DrawRadialRectangle, width / 2, height / 2);
  2883.         }
  2884.  
  2885.         // Token: 0x06000107 RID: 263 RVA: 0x00005C68 File Offset: 0x00004068
  2886.         public void DrawRadial(ColorBlend blend, int x, int y, int width, int height, Point center)
  2887.         {
  2888.             this.DrawRadialRectangle = new Rectangle(x, y, width, height);
  2889.             this.DrawRadial(blend, this.DrawRadialRectangle, center.X, center.Y);
  2890.         }
  2891.  
  2892.         // Token: 0x06000108 RID: 264 RVA: 0x00005C9C File Offset: 0x0000409C
  2893.         public void DrawRadial(ColorBlend blend, int x, int y, int width, int height, int cx, int cy)
  2894.         {
  2895.             this.DrawRadialRectangle = new Rectangle(x, y, width, height);
  2896.             this.DrawRadial(blend, this.DrawRadialRectangle, cx, cy);
  2897.         }
  2898.  
  2899.         // Token: 0x06000109 RID: 265 RVA: 0x00005CC4 File Offset: 0x000040C4
  2900.         public void DrawRadial(ColorBlend blend, Rectangle r)
  2901.         {
  2902.             this.DrawRadial(blend, r, r.Width / 2, r.Height / 2);
  2903.         }
  2904.  
  2905.         // Token: 0x0600010A RID: 266 RVA: 0x00005CE4 File Offset: 0x000040E4
  2906.         public void DrawRadial(ColorBlend blend, Rectangle r, Point center)
  2907.         {
  2908.             this.DrawRadial(blend, r, center.X, center.Y);
  2909.         }
  2910.  
  2911.         // Token: 0x0600010B RID: 267 RVA: 0x00005D00 File Offset: 0x00004100
  2912.         public void DrawRadial(ColorBlend blend, Rectangle r, int cx, int cy)
  2913.         {
  2914.             this.DrawRadialPath.Reset();
  2915.             checked
  2916.             {
  2917.                 this.DrawRadialPath.AddEllipse(r.X, r.Y, r.Width - 1, r.Height - 1);
  2918.                 this.DrawRadialBrush1 = new PathGradientBrush(this.DrawRadialPath);
  2919.                 PathGradientBrush arg_71_0 = this.DrawRadialBrush1;
  2920.                 Point p = new Point(r.X + cx, r.Y + cy);
  2921.                 arg_71_0.CenterPoint = p;
  2922.                 this.DrawRadialBrush1.InterpolationColors = blend;
  2923.                 bool flag = this.G.SmoothingMode == SmoothingMode.AntiAlias;
  2924.                 if (flag)
  2925.                 {
  2926.                     this.G.FillEllipse(this.DrawRadialBrush1, r.X + 1, r.Y + 1, r.Width - 3, r.Height - 3);
  2927.                 }
  2928.                 else
  2929.                 {
  2930.                     this.G.FillEllipse(this.DrawRadialBrush1, r);
  2931.                 }
  2932.             }
  2933.         }
  2934.  
  2935.         // Token: 0x0600010C RID: 268 RVA: 0x00005DF4 File Offset: 0x000041F4
  2936.         protected void DrawRadial(Color c1, Color c2, int x, int y, int width, int height)
  2937.         {
  2938.             this.DrawRadialRectangle = new Rectangle(x, y, width, height);
  2939.             this.DrawRadial(c1, c2, this.DrawRadialRectangle);
  2940.         }
  2941.  
  2942.         // Token: 0x0600010D RID: 269 RVA: 0x00005E1C File Offset: 0x0000421C
  2943.         protected void DrawRadial(Color c1, Color c2, int x, int y, int width, int height, float angle)
  2944.         {
  2945.             this.DrawRadialRectangle = new Rectangle(x, y, width, height);
  2946.             this.DrawRadial(c1, c2, this.DrawRadialRectangle, angle);
  2947.         }
  2948.  
  2949.         // Token: 0x0600010E RID: 270 RVA: 0x00005E44 File Offset: 0x00004244
  2950.         protected void DrawRadial(Color c1, Color c2, Rectangle r)
  2951.         {
  2952.             this.DrawRadialBrush2 = new LinearGradientBrush(r, c1, c2, 90f);
  2953.             this.G.FillEllipse(this.DrawRadialBrush2, r);
  2954.         }
  2955.  
  2956.         // Token: 0x0600010F RID: 271 RVA: 0x00005E70 File Offset: 0x00004270
  2957.         protected void DrawRadial(Color c1, Color c2, Rectangle r, float angle)
  2958.         {
  2959.             this.DrawRadialBrush2 = new LinearGradientBrush(r, c1, c2, angle);
  2960.             this.G.FillEllipse(this.DrawRadialBrush2, r);
  2961.         }
  2962.  
  2963.         // Token: 0x06000110 RID: 272 RVA: 0x00005E98 File Offset: 0x00004298
  2964.         public GraphicsPath CreateRound(int x, int y, int width, int height, int slope)
  2965.         {
  2966.             this.CreateRoundRectangle = new Rectangle(x, y, width, height);
  2967.             return this.CreateRound(this.CreateRoundRectangle, slope);
  2968.         }
  2969.  
  2970.         // Token: 0x06000111 RID: 273 RVA: 0x00005ECC File Offset: 0x000042CC
  2971.         public GraphicsPath CreateRound(Rectangle r, int slope)
  2972.         {
  2973.             this.CreateRoundPath = new GraphicsPath(FillMode.Winding);
  2974.             this.CreateRoundPath.AddArc(r.X, r.Y, slope, slope, 180f, 90f);
  2975.             checked
  2976.             {
  2977.                 this.CreateRoundPath.AddArc(r.Right - slope, r.Y, slope, slope, 270f, 90f);
  2978.                 this.CreateRoundPath.AddArc(r.Right - slope, r.Bottom - slope, slope, slope, 0f, 90f);
  2979.                 this.CreateRoundPath.AddArc(r.X, r.Bottom - slope, slope, slope, 90f, 90f);
  2980.                 this.CreateRoundPath.CloseFigure();
  2981.                 return this.CreateRoundPath;
  2982.             }
  2983.         }
  2984.  
  2985.         // Token: 0x0400003B RID: 59
  2986.         protected Graphics G;
  2987.  
  2988.         // Token: 0x0400003C RID: 60
  2989.         protected Bitmap B;
  2990.  
  2991.         // Token: 0x0400003D RID: 61
  2992.         private bool DoneCreation;
  2993.  
  2994.         // Token: 0x0400003E RID: 62
  2995.         private bool InPosition;
  2996.  
  2997.         // Token: 0x0400003F RID: 63
  2998.         protected MouseState State;
  2999.  
  3000.         // Token: 0x04000040 RID: 64
  3001.         private bool _BackColor;
  3002.  
  3003.         // Token: 0x04000041 RID: 65
  3004.         private bool _NoRounding;
  3005.  
  3006.         // Token: 0x04000042 RID: 66
  3007.         private Image _Image;
  3008.  
  3009.         // Token: 0x04000043 RID: 67
  3010.         private bool _Transparent;
  3011.  
  3012.         // Token: 0x04000044 RID: 68
  3013.         private Dictionary<string, Color> Items;
  3014.  
  3015.         // Token: 0x04000045 RID: 69
  3016.         private string _Customization;
  3017.  
  3018.         // Token: 0x04000046 RID: 70
  3019.         private Size _ImageSize;
  3020.  
  3021.         // Token: 0x04000047 RID: 71
  3022.         private int _LockWidth;
  3023.  
  3024.         // Token: 0x04000048 RID: 72
  3025.         private int _LockHeight;
  3026.  
  3027.         // Token: 0x04000049 RID: 73
  3028.         private bool _IsAnimated;
  3029.  
  3030.         // Token: 0x0400004A RID: 74
  3031.         private Rectangle OffsetReturnRectangle;
  3032.  
  3033.         // Token: 0x0400004B RID: 75
  3034.         private Size OffsetReturnSize;
  3035.  
  3036.         // Token: 0x0400004C RID: 76
  3037.         private Point OffsetReturnPoint;
  3038.  
  3039.         // Token: 0x0400004D RID: 77
  3040.         private Point CenterReturn;
  3041.  
  3042.         // Token: 0x0400004E RID: 78
  3043.         private Bitmap MeasureBitmap;
  3044.  
  3045.         // Token: 0x0400004F RID: 79
  3046.         private Graphics MeasureGraphics;
  3047.  
  3048.         // Token: 0x04000050 RID: 80
  3049.         private SolidBrush DrawPixelBrush;
  3050.  
  3051.         // Token: 0x04000051 RID: 81
  3052.         private SolidBrush DrawCornersBrush;
  3053.  
  3054.         // Token: 0x04000052 RID: 82
  3055.         private Point DrawTextPoint;
  3056.  
  3057.         // Token: 0x04000053 RID: 83
  3058.         private Size DrawTextSize;
  3059.  
  3060.         // Token: 0x04000054 RID: 84
  3061.         private Point DrawImagePoint;
  3062.  
  3063.         // Token: 0x04000055 RID: 85
  3064.         private LinearGradientBrush DrawGradientBrush;
  3065.  
  3066.         // Token: 0x04000056 RID: 86
  3067.         private Rectangle DrawGradientRectangle;
  3068.  
  3069.         // Token: 0x04000057 RID: 87
  3070.         private GraphicsPath DrawRadialPath;
  3071.  
  3072.         // Token: 0x04000058 RID: 88
  3073.         private PathGradientBrush DrawRadialBrush1;
  3074.  
  3075.         // Token: 0x04000059 RID: 89
  3076.         private LinearGradientBrush DrawRadialBrush2;
  3077.  
  3078.         // Token: 0x0400005A RID: 90
  3079.         private Rectangle DrawRadialRectangle;
  3080.  
  3081.         // Token: 0x0400005B RID: 91
  3082.         private GraphicsPath CreateRoundPath;
  3083.  
  3084.         // Token: 0x0400005C RID: 92
  3085.         private Rectangle CreateRoundRectangle;
  3086.     }
  3087.     internal class TwitchTextBox : ThemeControl154
  3088.     {
  3089.  
  3090.         public HorizontalAlignment TextAlign
  3091.         {
  3092.             get
  3093.             {
  3094.                 return this._TextAlign;
  3095.             }
  3096.             set
  3097.             {
  3098.                 this._TextAlign = value;
  3099.                 bool flag = this.Base != null;
  3100.                 if (flag)
  3101.                 {
  3102.                     this.Base.TextAlign = value;
  3103.                 }
  3104.             }
  3105.         }
  3106.  
  3107.         public int MaxLength
  3108.         {
  3109.             get
  3110.             {
  3111.                 return this._MaxLength;
  3112.             }
  3113.             set
  3114.             {
  3115.                 this._MaxLength = value;
  3116.                 bool flag = this.Base != null;
  3117.                 if (flag)
  3118.                 {
  3119.                     this.Base.MaxLength = value;
  3120.                 }
  3121.             }
  3122.         }
  3123.  
  3124.  
  3125.         public bool ReadOnly
  3126.         {
  3127.             get
  3128.             {
  3129.                 return this._ReadOnly;
  3130.             }
  3131.             set
  3132.             {
  3133.                 this._ReadOnly = value;
  3134.                 bool flag = this.Base != null;
  3135.                 if (flag)
  3136.                 {
  3137.                     this.Base.ReadOnly = value;
  3138.                 }
  3139.             }
  3140.         }
  3141.  
  3142.  
  3143.         public bool UseSystemPasswordChar
  3144.         {
  3145.             get
  3146.             {
  3147.                 return this._UseSystemPasswordChar;
  3148.             }
  3149.             set
  3150.             {
  3151.                 this._UseSystemPasswordChar = value;
  3152.                 bool flag = this.Base != null;
  3153.                 if (flag)
  3154.                 {
  3155.                     this.Base.UseSystemPasswordChar = value;
  3156.                 }
  3157.             }
  3158.         }
  3159.  
  3160.  
  3161.         public bool Multiline
  3162.         {
  3163.             get
  3164.             {
  3165.                 return this._Multiline;
  3166.             }
  3167.             set
  3168.             {
  3169.                 this._Multiline = value;
  3170.                 bool flag = this.Base != null;
  3171.                 checked
  3172.                 {
  3173.                     if (flag)
  3174.                     {
  3175.                         this.Base.Multiline = value;
  3176.                         if (value)
  3177.                         {
  3178.                             this.LockHeight = 0;
  3179.                             this.Base.Height = this.Height - 11;
  3180.                         }
  3181.                         else
  3182.                         {
  3183.                             this.LockHeight = this.Base.Height + 11;
  3184.                         }
  3185.                     }
  3186.                 }
  3187.             }
  3188.         }
  3189.  
  3190.  
  3191.         public override string Text
  3192.         {
  3193.             get
  3194.             {
  3195.                 return base.Text;
  3196.             }
  3197.             set
  3198.             {
  3199.                 base.Text = value;
  3200.                 bool flag = this.Base != null;
  3201.                 if (flag)
  3202.                 {
  3203.                     this.Base.Text = value;
  3204.                 }
  3205.             }
  3206.         }
  3207.  
  3208.         public override Font Font
  3209.         {
  3210.             get
  3211.             {
  3212.                 return base.Font;
  3213.             }
  3214.             set
  3215.             {
  3216.                 base.Font = value;
  3217.                 bool flag = this.Base != null;
  3218.                 checked
  3219.                 {
  3220.                     if (flag)
  3221.                     {
  3222.                         this.Base.Font = value;
  3223.                         Control arg_37_0 = this.Base;
  3224.                         Point location = new Point(3, 5);
  3225.                         arg_37_0.Location = location;
  3226.                         this.Base.Width = this.Width - 6;
  3227.                         flag = !this._Multiline;
  3228.                         if (flag)
  3229.                         {
  3230.                             this.LockHeight = this.Base.Height + 11;
  3231.                         }
  3232.                     }
  3233.                 }
  3234.             }
  3235.         }
  3236.  
  3237.         protected override void OnCreation()
  3238.         {
  3239.             bool flag = !this.Controls.Contains(this.Base);
  3240.             if (flag)
  3241.             {
  3242.                 this.Controls.Add(this.Base);
  3243.             }
  3244.         }
  3245.  
  3246.         public TwitchTextBox()
  3247.         {
  3248.             this._TextAlign = HorizontalAlignment.Left;
  3249.             this._MaxLength = 32767;
  3250.             this.Base = new TextBox();
  3251.             Size size = new Size(245, 4);
  3252.             this.Size = size;
  3253.             this.Base.Font = this.Font;
  3254.             this.Base.Text = this.Text;
  3255.             this.Base.MaxLength = this._MaxLength;
  3256.             this.Base.Multiline = this._Multiline;
  3257.             this.Base.ReadOnly = this._ReadOnly;
  3258.             this.Base.UseSystemPasswordChar = this._UseSystemPasswordChar;
  3259.             this.Base.BorderStyle = BorderStyle.None;
  3260.             Control arg_C5_0 = this.Base;
  3261.             Point location = new Point(5, 5);
  3262.             arg_C5_0.Location = location;
  3263.             checked
  3264.             {
  3265.                 this.Base.Width = this.Width - 10;
  3266.                 bool multiline = this._Multiline;
  3267.                 if (multiline)
  3268.                 {
  3269.                     this.Base.Height = this.Height - 11;
  3270.                 }
  3271.                 else
  3272.                 {
  3273.                     this.LockHeight = this.Base.Height + 11;
  3274.                 }
  3275.                 this.Base.TextChanged += new EventHandler(this.OnBaseTextChanged);
  3276.                 this.Base.KeyDown += new KeyEventHandler(this.OnBaseKeyDown);
  3277.                 this.SetColor("Text", Color.White);
  3278.                 this.SetColor("Back", 0, 0, 0);
  3279.                 this.SetColor("Border1", Color.FromArgb(30, 30, 30));
  3280.                 this.SetColor("Border2", Color.FromArgb(30, 30, 30));
  3281.             }
  3282.         }
  3283.  
  3284.         protected override void ColorHook()
  3285.         {
  3286.             this.C1 = Color.FromArgb(50, 50, 50);
  3287.             this.P1 = this.GetPen("Border1");
  3288.             this.P2 = this.GetPen("Border2");
  3289.             this.Base.ForeColor = Color.White;
  3290.             this.Base.BackColor = this.C1;
  3291.         }
  3292.  
  3293.         protected override void PaintHook()
  3294.         {
  3295.             this.G.Clear(this.C1);
  3296.             this.SetColor("Text", Color.White);
  3297.             this.DrawBorders(this.P1, 1);
  3298.         }
  3299.  
  3300.         private void OnBaseTextChanged(object s, EventArgs e)
  3301.         {
  3302.             this.Text = this.Base.Text;
  3303.         }
  3304.  
  3305.         private void OnBaseKeyDown(object s, KeyEventArgs e)
  3306.         {
  3307.             bool flag = e.Control && e.KeyCode == Keys.A;
  3308.             if (flag)
  3309.             {
  3310.                 this.Base.SelectAll();
  3311.                 e.SuppressKeyPress = true;
  3312.             }
  3313.         }
  3314.  
  3315.         protected override void OnResize(EventArgs e)
  3316.         {
  3317.             Control arg_12_0 = this.Base;
  3318.             Point location = new Point(5, 5);
  3319.             arg_12_0.Location = location;
  3320.             checked
  3321.             {
  3322.                 this.Base.Width = this.Width - 10;
  3323.                 bool multiline = this._Multiline;
  3324.                 if (multiline)
  3325.                 {
  3326.                     this.Base.Height = this.Height - 11;
  3327.                 }
  3328.                 base.OnResize(e);
  3329.             }
  3330.         }
  3331.  
  3332.         private HorizontalAlignment _TextAlign;
  3333.  
  3334.         private int _MaxLength;
  3335.  
  3336.         private bool _ReadOnly;
  3337.  
  3338.         private bool _UseSystemPasswordChar;
  3339.  
  3340.         private bool _Multiline;
  3341.  
  3342.         private TextBox Base;
  3343.  
  3344.         private Color C1;
  3345.  
  3346.         private Pen P1;
  3347.         private Pen P2;
  3348.     }
  3349.     internal class TwitchWhiteTextBox : ThemeControl154
  3350.     {
  3351.         // Token: 0x17000043 RID: 67
  3352.         // (get) Token: 0x0600015D RID: 349 RVA: 0x00008670 File Offset: 0x00006A70
  3353.         // (set) Token: 0x0600015E RID: 350 RVA: 0x00008688 File Offset: 0x00006A88
  3354.         public HorizontalAlignment TextAlign
  3355.         {
  3356.             get
  3357.             {
  3358.                 return this._TextAlign;
  3359.             }
  3360.             set
  3361.             {
  3362.                 this._TextAlign = value;
  3363.                 bool flag = this.Base != null;
  3364.                 if (flag)
  3365.                 {
  3366.                     this.Base.TextAlign = value;
  3367.                 }
  3368.             }
  3369.         }
  3370.  
  3371.         // Token: 0x17000044 RID: 68
  3372.         // (get) Token: 0x0600015F RID: 351 RVA: 0x000086BC File Offset: 0x00006ABC
  3373.         // (set) Token: 0x06000160 RID: 352 RVA: 0x000086D4 File Offset: 0x00006AD4
  3374.         public int MaxLength
  3375.         {
  3376.             get
  3377.             {
  3378.                 return this._MaxLength;
  3379.             }
  3380.             set
  3381.             {
  3382.                 this._MaxLength = value;
  3383.                 bool flag = this.Base != null;
  3384.                 if (flag)
  3385.                 {
  3386.                     this.Base.MaxLength = value;
  3387.                 }
  3388.             }
  3389.         }
  3390.  
  3391.         // Token: 0x17000045 RID: 69
  3392.         // (get) Token: 0x06000161 RID: 353 RVA: 0x00008708 File Offset: 0x00006B08
  3393.         // (set) Token: 0x06000162 RID: 354 RVA: 0x00008720 File Offset: 0x00006B20
  3394.         public bool ReadOnly
  3395.         {
  3396.             get
  3397.             {
  3398.                 return this._ReadOnly;
  3399.             }
  3400.             set
  3401.             {
  3402.                 this._ReadOnly = value;
  3403.                 bool flag = this.Base != null;
  3404.                 if (flag)
  3405.                 {
  3406.                     this.Base.ReadOnly = value;
  3407.                 }
  3408.             }
  3409.         }
  3410.  
  3411.         // Token: 0x17000046 RID: 70
  3412.         // (get) Token: 0x06000163 RID: 355 RVA: 0x00008754 File Offset: 0x00006B54
  3413.         // (set) Token: 0x06000164 RID: 356 RVA: 0x0000876C File Offset: 0x00006B6C
  3414.         public bool UseSystemPasswordChar
  3415.         {
  3416.             get
  3417.             {
  3418.                 return this._UseSystemPasswordChar;
  3419.             }
  3420.             set
  3421.             {
  3422.                 this._UseSystemPasswordChar = value;
  3423.                 bool flag = this.Base != null;
  3424.                 if (flag)
  3425.                 {
  3426.                     this.Base.UseSystemPasswordChar = value;
  3427.                 }
  3428.             }
  3429.         }
  3430.  
  3431.         // Token: 0x17000047 RID: 71
  3432.         // (get) Token: 0x06000165 RID: 357 RVA: 0x000087A0 File Offset: 0x00006BA0
  3433.         // (set) Token: 0x06000166 RID: 358 RVA: 0x000087B8 File Offset: 0x00006BB8
  3434.         public bool Multiline
  3435.         {
  3436.             get
  3437.             {
  3438.                 return this._Multiline;
  3439.             }
  3440.             set
  3441.             {
  3442.                 this._Multiline = value;
  3443.                 bool flag = this.Base != null;
  3444.                 checked
  3445.                 {
  3446.                     if (flag)
  3447.                     {
  3448.                         this.Base.Multiline = value;
  3449.                         if (value)
  3450.                         {
  3451.                             this.LockHeight = 0;
  3452.                             this.Base.Height = this.Height - 11;
  3453.                         }
  3454.                         else
  3455.                         {
  3456.                             this.LockHeight = this.Base.Height + 11;
  3457.                         }
  3458.                     }
  3459.                 }
  3460.             }
  3461.         }
  3462.  
  3463.         // Token: 0x17000048 RID: 72
  3464.         // (get) Token: 0x06000167 RID: 359 RVA: 0x00008828 File Offset: 0x00006C28
  3465.         // (set) Token: 0x06000168 RID: 360 RVA: 0x00008840 File Offset: 0x00006C40
  3466.         public override string Text
  3467.         {
  3468.             get
  3469.             {
  3470.                 return base.Text;
  3471.             }
  3472.             set
  3473.             {
  3474.                 base.Text = value;
  3475.                 bool flag = this.Base != null;
  3476.                 if (flag)
  3477.                 {
  3478.                     this.Base.Text = value;
  3479.                 }
  3480.             }
  3481.         }
  3482.  
  3483.         // Token: 0x17000049 RID: 73
  3484.         // (get) Token: 0x06000169 RID: 361 RVA: 0x00008878 File Offset: 0x00006C78
  3485.         // (set) Token: 0x0600016A RID: 362 RVA: 0x00008890 File Offset: 0x00006C90
  3486.         public override Font Font
  3487.         {
  3488.             get
  3489.             {
  3490.                 return base.Font;
  3491.             }
  3492.             set
  3493.             {
  3494.                 base.Font = value;
  3495.                 bool flag = this.Base != null;
  3496.                 checked
  3497.                 {
  3498.                     if (flag)
  3499.                     {
  3500.                         this.Base.Font = value;
  3501.                         Control arg_37_0 = this.Base;
  3502.                         Point location = new Point(3, 5);
  3503.                         arg_37_0.Location = location;
  3504.                         this.Base.Width = this.Width - 6;
  3505.                         flag = !this._Multiline;
  3506.                         if (flag)
  3507.                         {
  3508.                             this.LockHeight = this.Base.Height + 11;
  3509.                         }
  3510.                     }
  3511.                 }
  3512.             }
  3513.         }
  3514.  
  3515.         protected override void OnCreation()
  3516.         {
  3517.             bool flag = !this.Controls.Contains(this.Base);
  3518.             if (flag)
  3519.             {
  3520.                 this.Controls.Add(this.Base);
  3521.             }
  3522.         }
  3523.         public string GhostText
  3524.         {
  3525.             get
  3526.             {
  3527.                 return this._GhostText;
  3528.             }
  3529.             set
  3530.             {
  3531.                 this._GhostText = value;
  3532.             }
  3533.         }
  3534.         public TwitchWhiteTextBox()
  3535.         {
  3536.             this._TextAlign = HorizontalAlignment.Left;
  3537.             this._MaxLength = 32767;
  3538.             this.Base = new TextBox();
  3539.             Size size = new Size(245, 4);
  3540.             this.Size = size;
  3541.             this.Base.Font = this.Font;
  3542.             this.Base.Text = this.Text;
  3543.             this.Base.MaxLength = this._MaxLength;
  3544.             this.Base.Multiline = this._Multiline;
  3545.             this.Base.ReadOnly = this._ReadOnly;
  3546.             this.Base.UseSystemPasswordChar = this._UseSystemPasswordChar;
  3547.             this.Base.BorderStyle = BorderStyle.None;
  3548.             Control arg_C5_0 = this.Base;
  3549.             Point location = new Point(5, 5);
  3550.             arg_C5_0.Location = location;
  3551.             checked
  3552.             {
  3553.                 this.Base.Width = this.Width - 10;
  3554.                 bool multiline = this._Multiline;
  3555.                 if (multiline)
  3556.                 {
  3557.                     this.Base.Height = this.Height - 11;
  3558.                 }
  3559.                 else
  3560.                 {
  3561.                     this.LockHeight = this.Base.Height + 11;
  3562.                 }
  3563.                 this.Base.TextChanged += new EventHandler(this.OnBaseTextChanged);
  3564.                 this.Base.KeyDown += new KeyEventHandler(this.OnBaseKeyDown);
  3565.                 this.SetColor("Text", Color.FromArgb(73, 73, 73));
  3566.                 this.SetColor("Back", 0, 0, 0);
  3567.                 this.SetColor("Border1", Color.FromArgb(100, 65, 165));
  3568.                 this.SetColor("Border2", Color.FromArgb(100, 65, 165));
  3569.             }
  3570.         }
  3571.  
  3572.         // Token: 0x0600016F RID: 367 RVA: 0x00008B28 File Offset: 0x00006F28
  3573.         protected override void ColorHook()
  3574.         {
  3575.             this.C1 = Color.White;
  3576.             this.P1 = this.GetPen("Border1");
  3577.             this.P2 = this.GetPen("Border2");
  3578.             this.Base.ForeColor = Color.FromArgb(73, 73, 73);
  3579.             this.Base.BackColor = this.C1;
  3580.         }
  3581.  
  3582.         // Token: 0x06000170 RID: 368 RVA: 0x00008B90 File Offset: 0x00006F90
  3583.         protected override void PaintHook()
  3584.         {
  3585.             this.G.Clear(this.C1);
  3586.             this.SetColor("Text", Color.FromArgb(73, 73, 73));
  3587.             this.DrawBorders(this.P1, 1);
  3588.             this.G.DrawString(this.GhostText, this.Font, Brushes.Gray, 10f, 5f);
  3589.         }
  3590.  
  3591.         // Token: 0x06000171 RID: 369 RVA: 0x00008C00 File Offset: 0x00007000
  3592.         private void OnBaseTextChanged(object s, EventArgs e)
  3593.         {
  3594.             this.Text = this.Base.Text;
  3595.         }
  3596.  
  3597.         // Token: 0x06000172 RID: 370 RVA: 0x00008C18 File Offset: 0x00007018
  3598.         private void OnBaseKeyDown(object s, KeyEventArgs e)
  3599.         {
  3600.             bool flag = e.Control && e.KeyCode == Keys.A;
  3601.             if (flag)
  3602.             {
  3603.                 this.Base.SelectAll();
  3604.                 e.SuppressKeyPress = true;
  3605.             }
  3606.         }
  3607.  
  3608.         // Token: 0x06000173 RID: 371 RVA: 0x00008C58 File Offset: 0x00007058
  3609.         protected override void OnResize(EventArgs e)
  3610.         {
  3611.             Control arg_12_0 = this.Base;
  3612.             Point location = new Point(5, 5);
  3613.             arg_12_0.Location = location;
  3614.             checked
  3615.             {
  3616.                 this.Base.Width = this.Width - 10;
  3617.                 bool multiline = this._Multiline;
  3618.                 if (multiline)
  3619.                 {
  3620.                     this.Base.Height = this.Height - 11;
  3621.                 }
  3622.                 base.OnResize(e);
  3623.             }
  3624.         }
  3625.  
  3626.         // Token: 0x04000083 RID: 131
  3627.         private HorizontalAlignment _TextAlign;
  3628.  
  3629.         // Token: 0x04000084 RID: 132
  3630.         private int _MaxLength;
  3631.  
  3632.         // Token: 0x04000085 RID: 133
  3633.         private bool _ReadOnly;
  3634.  
  3635.         // Token: 0x04000086 RID: 134
  3636.         private bool _UseSystemPasswordChar;
  3637.  
  3638.         // Token: 0x04000087 RID: 135
  3639.         private bool _Multiline;
  3640.  
  3641.         private string _GhostText;
  3642.  
  3643.         // Token: 0x04000089 RID: 137
  3644.         private TextBox Base;
  3645.  
  3646.         // Token: 0x0400008A RID: 138
  3647.         private Color C1;
  3648.  
  3649.         private Pen P1;
  3650.  
  3651.         private Pen P2;
  3652.     }
  3653.     internal class TwitchRadiobutton : ThemeControl154
  3654.     {
  3655.         private static void __ENCAddToList(object value)
  3656.         {
  3657.             List<WeakReference> _ENCList = TwitchRadiobutton.__ENCList;
  3658.             checked
  3659.             {
  3660.                 lock (_ENCList)
  3661.                 {
  3662.                     bool flag = TwitchRadiobutton.__ENCList.Count == TwitchRadiobutton.__ENCList.Capacity;
  3663.                     if (flag)
  3664.                     {
  3665.                         int num = 0;
  3666.                         int arg_3F_0 = 0;
  3667.                         int num2 = TwitchRadiobutton.__ENCList.Count - 1;
  3668.                         int num3 = arg_3F_0;
  3669.                         while (true)
  3670.                         {
  3671.                             int arg_90_0 = num3;
  3672.                             int num4 = num2;
  3673.                             if (arg_90_0 > num4)
  3674.                             {
  3675.                                 break;
  3676.                             }
  3677.                             WeakReference weakReference = TwitchRadiobutton.__ENCList[num3];
  3678.                             flag = weakReference.IsAlive;
  3679.                             if (flag)
  3680.                             {
  3681.                                 bool flag2 = num3 != num;
  3682.                                 if (flag2)
  3683.                                 {
  3684.                                     TwitchRadiobutton.__ENCList[num] = TwitchRadiobutton.__ENCList[num3];
  3685.                                 }
  3686.                                 num++;
  3687.                             }
  3688.                             num3++;
  3689.                         }
  3690.                         TwitchRadiobutton.__ENCList.RemoveRange(num, TwitchRadiobutton.__ENCList.Count - num);
  3691.                         TwitchRadiobutton.__ENCList.Capacity = TwitchRadiobutton.__ENCList.Count;
  3692.                     }
  3693.                     TwitchRadiobutton.__ENCList.Add(new WeakReference(RuntimeHelpers.GetObjectValue(value)));
  3694.                 }
  3695.             }
  3696.         }
  3697.  
  3698.         // Token: 0x1700004F RID: 79
  3699.         // (get) Token: 0x06000194 RID: 404 RVA: 0x00009C28 File Offset: 0x00008028
  3700.         // (set) Token: 0x06000195 RID: 405 RVA: 0x00009C40 File Offset: 0x00008040
  3701.         public bool Checked
  3702.         {
  3703.             get
  3704.             {
  3705.                 return this._Checked;
  3706.             }
  3707.             set
  3708.             {
  3709.                 this._Checked = value;
  3710.                 this.InvalidateControls();
  3711.                 TwitchRadiobutton.CheckedChangedEventHandler checkedChangedEvent = this.CheckedChangedEvent;
  3712.                 bool flag = checkedChangedEvent != null;
  3713.                 if (flag)
  3714.                 {
  3715.                     checkedChangedEvent(this);
  3716.                 }
  3717.                 this.Invalidate();
  3718.             }
  3719.         }
  3720.  
  3721.         // Token: 0x14000001 RID: 1
  3722.         // (add) Token: 0x06000196 RID: 406 RVA: 0x00009C80 File Offset: 0x00008080
  3723.         // (remove) Token: 0x06000197 RID: 407 RVA: 0x00009C9C File Offset: 0x0000809C
  3724.         public event TwitchRadiobutton.CheckedChangedEventHandler CheckedChanged
  3725.         {
  3726.            
  3727.             add
  3728.             {
  3729.                 this.CheckedChangedEvent = (TwitchRadiobutton.CheckedChangedEventHandler)Delegate.Combine(this.CheckedChangedEvent, value);
  3730.             }
  3731.            
  3732.             remove
  3733.             {
  3734.                 this.CheckedChangedEvent = (TwitchRadiobutton.CheckedChangedEventHandler)Delegate.Remove(this.CheckedChangedEvent, value);
  3735.             }
  3736.         }
  3737.  
  3738.         // Token: 0x06000198 RID: 408 RVA: 0x00009CB8 File Offset: 0x000080B8
  3739.         protected override void OnCreation()
  3740.         {
  3741.             this.InvalidateControls();
  3742.         }
  3743.  
  3744.         // Token: 0x06000199 RID: 409 RVA: 0x00009CC4 File Offset: 0x000080C4
  3745.         private void InvalidateControls()
  3746.         {
  3747.             bool flag = !this.IsHandleCreated || !this._Checked;
  3748.             if (!flag)
  3749.             {
  3750.                 try
  3751.                 {
  3752.                     IEnumerator enumerator = this.Parent.Controls.GetEnumerator();
  3753.                     while (enumerator.MoveNext())
  3754.                     {
  3755.                         Control control = (Control)enumerator.Current;
  3756.                         flag = (control != this && control is TwitchRadiobutton);
  3757.                         if (flag)
  3758.                         {
  3759.                             ((TwitchRadiobutton)control).Checked = false;
  3760.                         }
  3761.                     }
  3762.                 }
  3763.                 finally
  3764.                 {
  3765.                     IEnumerator enumerator = this.Parent.Controls.GetEnumerator();
  3766.                     flag = (enumerator is IDisposable);
  3767.                     if (flag)
  3768.                     {
  3769.                         (enumerator as IDisposable).Dispose();
  3770.                     }
  3771.                 }
  3772.             }
  3773.         }
  3774.  
  3775.         // Token: 0x0600019A RID: 410 RVA: 0x00009D70 File Offset: 0x00008170
  3776.         protected override void OnMouseDown(MouseEventArgs e)
  3777.         {
  3778.             bool flag = !this._Checked;
  3779.             if (flag)
  3780.             {
  3781.                 this.Checked = true;
  3782.             }
  3783.             base.OnMouseDown(e);
  3784.         }
  3785.  
  3786.         // Token: 0x0600019B RID: 411 RVA: 0x00009D9C File Offset: 0x0000819C
  3787.         protected override void OnMouseMove(MouseEventArgs e)
  3788.         {
  3789.             base.OnMouseMove(e);
  3790.             this.X = e.X;
  3791.             this.Invalidate();
  3792.         }
  3793.  
  3794.         // Token: 0x0600019C RID: 412 RVA: 0x00009DBC File Offset: 0x000081BC
  3795.         protected override void ColorHook()
  3796.         {
  3797.             this.textcolor = this.GetBrush("Text");
  3798.             this.circlecolor = this.GetPen("Circle");
  3799.         }
  3800.  
  3801.         // Token: 0x0600019D RID: 413 RVA: 0x00009DE4 File Offset: 0x000081E4
  3802.         protected override void OnTextChanged(EventArgs e)
  3803.         {
  3804.             base.OnTextChanged(e);
  3805.         }
  3806.  
  3807.         // Token: 0x0600019E RID: 414 RVA: 0x00009DF0 File Offset: 0x000081F0
  3808.         protected override void PaintHook()
  3809.         {
  3810.             this.G.Clear(this.BackColor);
  3811.             this.G.SmoothingMode = SmoothingMode.HighQuality;
  3812.             bool @checked = this._Checked;
  3813.             checked
  3814.             {
  3815.                 if (@checked)
  3816.                 {
  3817.                     Graphics arg_63_0 = this.G;
  3818.                     Brush arg_63_1 = new SolidBrush(Color.FromArgb(195, 195, 195));
  3819.                     Rectangle rectangle = new Rectangle(0, 0, this.Width, this.Height);
  3820.                     arg_63_0.FillRectangle(arg_63_1, rectangle);
  3821.                     Graphics arg_A8_0 = this.G;
  3822.                     Pen arg_A8_1 = new Pen(new SolidBrush(Color.FromArgb(150, 150, 150)));
  3823.                     rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
  3824.                     arg_A8_0.DrawRectangle(arg_A8_1, rectangle);
  3825.                     this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Center, 0, 0);
  3826.                 }
  3827.                 else
  3828.                 {
  3829.                     Color arg_10D_1 = Color.FromArgb(242, 242, 242);
  3830.                     Color arg_10D_2 = Color.FromArgb(223, 223, 223);
  3831.                     Rectangle rectangle = new Rectangle(0, 0, this.Width, this.Height);
  3832.                     this.DrawGradient(arg_10D_1, arg_10D_2, rectangle, 90f);
  3833.                     Graphics arg_152_0 = this.G;
  3834.                     Pen arg_152_1 = new Pen(new SolidBrush(Color.FromArgb(150, 150, 150)));
  3835.                     rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
  3836.                     arg_152_0.DrawRectangle(arg_152_1, rectangle);
  3837.                     this.DrawText(new SolidBrush(Color.FromArgb(30, 30, 30)), HorizontalAlignment.Center, 0, 0);
  3838.                 }
  3839.             }
  3840.         }
  3841.  
  3842.         // Token: 0x0600019F RID: 415 RVA: 0x00009F74 File Offset: 0x00008374
  3843.         public TwitchRadiobutton()
  3844.         {
  3845.             TwitchRadiobutton.__ENCAddToList(this);
  3846.             this.SetColor("Text", Color.Black);
  3847.             this.SetColor("Circle", Color.FromArgb(0, 239, 255));
  3848.             Point p = new Point(147, 29);
  3849.             this.Size = (Size)p;
  3850.             this.Cursor = Cursors.Hand;
  3851.         }
  3852.  
  3853.         // Token: 0x04000094 RID: 148
  3854.         private static List<WeakReference> __ENCList = new List<WeakReference>();
  3855.  
  3856.         // Token: 0x04000095 RID: 149
  3857.         private int X;
  3858.  
  3859.         // Token: 0x04000096 RID: 150
  3860.         private bool _Checked;
  3861.  
  3862.         // Token: 0x04000097 RID: 151
  3863.         private TwitchRadiobutton.CheckedChangedEventHandler CheckedChangedEvent;
  3864.  
  3865.         // Token: 0x04000098 RID: 152
  3866.         private Brush textcolor;
  3867.  
  3868.         // Token: 0x04000099 RID: 153
  3869.         private Pen circlecolor;
  3870.  
  3871.         // Token: 0x02000020 RID: 32
  3872.         // (Invoke) Token: 0x060001B5 RID: 437
  3873.         public delegate void CheckedChangedEventHandler(object sender);
  3874.     }
  3875.     internal class TwitchTabControl : TabControl
  3876.     {
  3877.         private static void __ENCAddToList(object value)
  3878.         {
  3879.             List<WeakReference> _ENCList = TwitchTabControl.__ENCList;
  3880.             checked
  3881.             {
  3882.                 lock (_ENCList)
  3883.                 {
  3884.                     bool flag = TwitchTabControl.__ENCList.Count == TwitchTabControl.__ENCList.Capacity;
  3885.                     if (flag)
  3886.                     {
  3887.                         int num = 0;
  3888.                         int arg_3F_0 = 0;
  3889.                         int num2 = TwitchTabControl.__ENCList.Count - 1;
  3890.                         int num3 = arg_3F_0;
  3891.                         while (true)
  3892.                         {
  3893.                             int arg_90_0 = num3;
  3894.                             int num4 = num2;
  3895.                             if (arg_90_0 > num4)
  3896.                             {
  3897.                                 break;
  3898.                             }
  3899.                             WeakReference weakReference = TwitchTabControl.__ENCList[num3];
  3900.                             flag = weakReference.IsAlive;
  3901.                             if (flag)
  3902.                             {
  3903.                                 bool flag2 = num3 != num;
  3904.                                 if (flag2)
  3905.                                 {
  3906.                                     TwitchTabControl.__ENCList[num] = TwitchTabControl.__ENCList[num3];
  3907.                                 }
  3908.                                 num++;
  3909.                             }
  3910.                             num3++;
  3911.                         }
  3912.                         TwitchTabControl.__ENCList.RemoveRange(num, TwitchTabControl.__ENCList.Count - num);
  3913.                         TwitchTabControl.__ENCList.Capacity = TwitchTabControl.__ENCList.Count;
  3914.                     }
  3915.                     TwitchTabControl.__ENCList.Add(new WeakReference(RuntimeHelpers.GetObjectValue(value)));
  3916.                 }
  3917.             }
  3918.         }
  3919.         public Color Color
  3920.         {
  3921.             get
  3922.             {
  3923.                 return this._Color;
  3924.             }
  3925.             set
  3926.             {
  3927.                 this._Color = value;
  3928.             }
  3929.         }
  3930.  
  3931.         public TwitchTabControl()
  3932.         {
  3933.             TwitchTabControl.__ENCAddToList(this);
  3934.             Color color = Color.FromArgb(40, 40, 40);
  3935.             this.Color = color;
  3936.             this.SetStyle(ControlStyles.UserPaint | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
  3937.             this.DoubleBuffered = true;
  3938.             this.SizeMode = TabSizeMode.Fixed;
  3939.             Size itemSize = new Size(5, 5);
  3940.             this.ItemSize = itemSize;
  3941.             try
  3942.             {
  3943.                 IEnumerator enumerator = this.TabPages.GetEnumerator();
  3944.                 while (enumerator.MoveNext())
  3945.                 {
  3946.                     TabPage tabPage = (TabPage)enumerator.Current;
  3947.                     tabPage.BackColor = Color.FromArgb(40, 40, 40);
  3948.                 }
  3949.             }
  3950.             finally
  3951.             {
  3952.                 IEnumerator enumerator = this.Parent.Controls.GetEnumerator();
  3953.                 bool flag = enumerator is IDisposable;
  3954.                 if (flag)
  3955.                 {
  3956.                     (enumerator as IDisposable).Dispose();
  3957.                 }
  3958.             }
  3959.         }
  3960.  
  3961.         protected override void CreateHandle()
  3962.         {
  3963.             base.CreateHandle();
  3964.             this.Alignment = TabAlignment.Left;
  3965.         }
  3966.  
  3967.         protected override void OnPaint(PaintEventArgs e)
  3968.         {
  3969.             Bitmap bitmap = new Bitmap(this.Width, this.Height);
  3970.             Graphics graphics = Graphics.FromImage(bitmap);
  3971.             graphics.Clear(this.Color);
  3972.             bool flag = this.DesignMode;
  3973.             checked
  3974.             {
  3975.                 if (flag)
  3976.                 {
  3977.                     int arg_3E_0 = 0;
  3978.                     int num = this.TabCount - 1;
  3979.                     int num2 = arg_3E_0;
  3980.                     while (true)
  3981.                     {
  3982.                         int arg_9B_0 = num2;
  3983.                         int num3 = num;
  3984.                         if (arg_9B_0 > num3)
  3985.                         {
  3986.                             break;
  3987.                         }
  3988.                         Rectangle tabRect = this.GetTabRect(num2);
  3989.                         flag = (num2 == this.SelectedIndex);
  3990.                         if (flag)
  3991.                         {
  3992.                             graphics.FillRectangle(new SolidBrush(Color.FromArgb(100, 65, 165)), tabRect);
  3993.                         }
  3994.                         else
  3995.                         {
  3996.                             graphics.FillRectangle(new SolidBrush(Color.FromArgb(30, 30, 30)), tabRect);
  3997.                         }
  3998.                         num2++;
  3999.                     }
  4000.                 }
  4001.                 NewLateBinding.LateCall(e.Graphics, null, "DrawImage", new object[]
  4002.                 {
  4003.                     RuntimeHelpers.GetObjectValue(bitmap.Clone()),
  4004.                     0,
  4005.                     0
  4006.                 }, null, null, null, true);
  4007.                 graphics.Dispose();
  4008.                 bitmap.Dispose();
  4009.                 base.OnPaint(e);
  4010.             }
  4011.         }
  4012.  
  4013.         private static List<WeakReference> __ENCList = new List<WeakReference>();
  4014.  
  4015.         private Color _Color;
  4016.     }
  4017.     internal class TwitchTrackBar : ThemeControl154
  4018.     {
  4019.         // Token: 0x06000177 RID: 375 RVA: 0x00008D2C File Offset: 0x0000712C
  4020.         public TwitchTrackBar()
  4021.         {
  4022.             this.Width = 100;
  4023.             this.Height = 10;
  4024.             this.Transparent = true;
  4025.             this.BackColor = Color.Transparent;
  4026.             this.Cursor = Cursors.Hand;
  4027.             Size size = new Size(125, 30);
  4028.             this.Size = size;
  4029.         }
  4030.  
  4031.         // Token: 0x06000178 RID: 376 RVA: 0x00008D88 File Offset: 0x00007188
  4032.         protected override void ColorHook()
  4033.         {
  4034.         }
  4035.  
  4036.         // Token: 0x06000179 RID: 377 RVA: 0x00008D8C File Offset: 0x0000718C
  4037.         protected override void PaintHook()
  4038.         {
  4039.             this.G.Clear(this.BackColor);
  4040.             checked
  4041.             {
  4042.                 switch (this.State)
  4043.                 {
  4044.                     case MouseState.None:
  4045.                         {
  4046.                             Color arg_148_1 = Color.FromArgb(222, 209, 246);
  4047.                             Color arg_148_2 = Color.FromArgb(171, 134, 231);
  4048.                             Rectangle rectangle = new Rectangle(0, 10, this.Width, 10);
  4049.                             this.DrawGradient(arg_148_1, arg_148_2, rectangle);
  4050.                             Graphics arg_16D_0 = this.G;
  4051.                             Pen arg_16D_1 = Pens.Black;
  4052.                             rectangle = new Rectangle(0, 10, this.Width, 10);
  4053.                             arg_16D_0.DrawRectangle(arg_16D_1, rectangle);
  4054.                             Color arg_1B1_1 = Color.FromArgb(207, 207, 207);
  4055.                             Color arg_1B1_2 = Color.FromArgb(150, 150, 150);
  4056.                             rectangle = new Rectangle(this.Width - 7, 6, 7, 17);
  4057.                             this.DrawGradient(arg_1B1_1, arg_1B1_2, rectangle);
  4058.                             Graphics arg_1D7_0 = this.G;
  4059.                             Pen arg_1D7_1 = Pens.Black;
  4060.                             rectangle = new Rectangle(this.Width - 7, 6, 7, 17);
  4061.                             arg_1D7_0.DrawRectangle(arg_1D7_1, rectangle);
  4062.                             break;
  4063.                         }
  4064.                     case MouseState.Over:
  4065.                         {
  4066.                             Color arg_70_1 = Color.FromArgb(222, 209, 246);
  4067.                             Color arg_70_2 = Color.FromArgb(171, 134, 231);
  4068.                             Rectangle rectangle = new Rectangle(0, 10, this.Width, 10);
  4069.                             this.DrawGradient(arg_70_1, arg_70_2, rectangle);
  4070.                             Graphics arg_95_0 = this.G;
  4071.                             Pen arg_95_1 = Pens.Black;
  4072.                             rectangle = new Rectangle(0, 10, this.Width, 10);
  4073.                             arg_95_0.DrawRectangle(arg_95_1, rectangle);
  4074.                             Color arg_D9_1 = Color.FromArgb(245, 245, 245);
  4075.                             Color arg_D9_2 = Color.FromArgb(206, 206, 206);
  4076.                             rectangle = new Rectangle(this.Width - 7, 6, 7, 17);
  4077.                             this.DrawGradient(arg_D9_1, arg_D9_2, rectangle);
  4078.                             Graphics arg_FF_0 = this.G;
  4079.                             Pen arg_FF_1 = Pens.Black;
  4080.                             rectangle = new Rectangle(this.Width - 7, 6, 7, 17);
  4081.                             arg_FF_0.DrawRectangle(arg_FF_1, rectangle);
  4082.                             break;
  4083.                         }
  4084.                     case MouseState.Down:
  4085.                         {
  4086.                             Color arg_220_1 = Color.FromArgb(222, 209, 246);
  4087.                             Color arg_220_2 = Color.FromArgb(171, 134, 231);
  4088.                             Rectangle rectangle = new Rectangle(0, 10, this.Width, 10);
  4089.                             this.DrawGradient(arg_220_1, arg_220_2, rectangle);
  4090.                             Graphics arg_245_0 = this.G;
  4091.                             Pen arg_245_1 = Pens.Black;
  4092.                             rectangle = new Rectangle(0, 10, this.Width, 10);
  4093.                             arg_245_0.DrawRectangle(arg_245_1, rectangle);
  4094.                             Color arg_280_1 = Color.FromArgb(144, 144, 144);
  4095.                             Color arg_280_2 = Color.FromArgb(100, 100, 100);
  4096.                             rectangle = new Rectangle(this.Width - 7, 6, 7, 17);
  4097.                             this.DrawGradient(arg_280_1, arg_280_2, rectangle);
  4098.                             Graphics arg_2A6_0 = this.G;
  4099.                             Pen arg_2A6_1 = Pens.Black;
  4100.                             rectangle = new Rectangle(this.Width - 7, 6, 7, 17);
  4101.                             arg_2A6_0.DrawRectangle(arg_2A6_1, rectangle);
  4102.                             break;
  4103.                         }
  4104.                     default:
  4105.                         {
  4106.                             Color arg_2EF_1 = Color.FromArgb(222, 209, 246);
  4107.                             Color arg_2EF_2 = Color.FromArgb(171, 134, 231);
  4108.                             Rectangle rectangle = new Rectangle(0, 10, this.Width, 10);
  4109.                             this.DrawGradient(arg_2EF_1, arg_2EF_2, rectangle);
  4110.                             Graphics arg_314_0 = this.G;
  4111.                             Pen arg_314_1 = Pens.Black;
  4112.                             rectangle = new Rectangle(0, 10, this.Width, 10);
  4113.                             arg_314_0.DrawRectangle(arg_314_1, rectangle);
  4114.                             Color arg_358_1 = Color.FromArgb(207, 207, 207);
  4115.                             Color arg_358_2 = Color.FromArgb(150, 150, 150);
  4116.                             rectangle = new Rectangle(this.Width - 7, 6, 7, 17);
  4117.                             this.DrawGradient(arg_358_1, arg_358_2, rectangle);
  4118.                             Graphics arg_37E_0 = this.G;
  4119.                             Pen arg_37E_1 = Pens.Black;
  4120.                             rectangle = new Rectangle(this.Width - 7, 6, 7, 17);
  4121.                             arg_37E_0.DrawRectangle(arg_37E_1, rectangle);
  4122.                             break;
  4123.                         }
  4124.                 }
  4125.             }
  4126.         }
  4127.     }
  4128.     internal class TwitchTheme : ThemeContainer154
  4129.     {
  4130.        
  4131.         public bool Fill
  4132.         {
  4133.             get
  4134.             {
  4135.                 return this._Fill;
  4136.             }
  4137.             set
  4138.             {
  4139.                 this._Fill = value;
  4140.             }
  4141.         }
  4142.  
  4143.         public TwitchTheme()
  4144.         {
  4145.             this.TransparencyKey = Color.Fuchsia;
  4146.             this.BackColor = Color.Red;
  4147.             this.Font = new Font("Segoe UI", 9f);
  4148.             this.SetColor("Border", this.BackColor);
  4149.             this.Fill = true;
  4150.         }
  4151.  
  4152.         protected override void ColorHook()
  4153.         {
  4154.             this.Border = this.GetColor("Border");
  4155.             this.BackColor = Color.White;
  4156.         }
  4157.  
  4158.         protected override void PaintHook()
  4159.         {
  4160.             this.G.Clear(this.Border);
  4161.             Graphics arg_35_0 = this.G;
  4162.             Brush arg_35_1 = Brushes.White;
  4163.             Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
  4164.             arg_35_0.FillRectangle(arg_35_1, rect);
  4165.             Graphics arg_64_0 = this.G;
  4166.             Brush arg_64_1 = new SolidBrush(Color.FromArgb(40, 40, 40));
  4167.             rect = new Rectangle(0, 0, this.Width, 30);
  4168.             arg_64_0.FillRectangle(arg_64_1, rect);
  4169.             Graphics arg_9F_0 = this.G;
  4170.             Brush arg_9F_1 = new SolidBrush(Color.FromArgb(40, 40, 40));
  4171.             checked
  4172.             {
  4173.                 rect = new Rectangle(this.Width - 10, 30, 10, this.Height - 30);
  4174.                 arg_9F_0.FillRectangle(arg_9F_1, rect);
  4175.                 Graphics arg_D6_0 = this.G;
  4176.                 Brush arg_D6_1 = new SolidBrush(Color.FromArgb(40, 40, 40));
  4177.                 rect = new Rectangle(0, this.Height - 10, this.Width, 10);
  4178.                 arg_D6_0.FillRectangle(arg_D6_1, rect);
  4179.                 this.DrawCorners(Color.Fuchsia);
  4180.                 this.G.DrawString(this.FindForm().Text, this.Font, Brushes.White, 5f, 6f);
  4181.                 bool fill = this.Fill;
  4182.                 if (fill)
  4183.                 {
  4184.                     Graphics arg_14B_0 = this.G;
  4185.                     Brush arg_14B_1 = new SolidBrush(Color.FromArgb(40, 40, 40));
  4186.                     rect = new Rectangle(0, 0, this.Width, this.Height);
  4187.                     arg_14B_0.FillRectangle(arg_14B_1, rect);
  4188.                     this.DrawCorners(Color.Fuchsia);
  4189.                     this.G.DrawString(this.FindForm().Text, this.Font, Brushes.White, 5f, 6f);
  4190.                 }
  4191.             }
  4192.         }
  4193.  
  4194.         private bool _Fill;
  4195.         private Color Border;
  4196.     }
  4197.     internal struct Bloom
  4198.     {
  4199.      
  4200.         public string Name
  4201.         {
  4202.             get
  4203.             {
  4204.                 return this._Name;
  4205.             }
  4206.         }
  4207.  
  4208.      
  4209.         public Color Value
  4210.         {
  4211.             get
  4212.             {
  4213.                 return this._Value;
  4214.             }
  4215.             set
  4216.             {
  4217.                 this._Value = value;
  4218.             }
  4219.         }
  4220.         public string ValueHex
  4221.         {
  4222.             get
  4223.             {
  4224.                 return "#" + this._Value.R.ToString("X2", null) + this._Value.G.ToString("X2", null) + this._Value.B.ToString("X2", null);
  4225.             }
  4226.             set
  4227.             {
  4228.                 try
  4229.                 {
  4230.                     this._Value = ColorTranslator.FromHtml(value);
  4231.                 }
  4232.                 catch (Exception arg_10_0)
  4233.                 {
  4234.                     ProjectData.SetProjectError(arg_10_0);
  4235.                     ProjectData.ClearProjectError();
  4236.                 }
  4237.             }
  4238.         }
  4239.  
  4240.         public Bloom(string name, Color value)
  4241.         {
  4242.             this = default(Bloom);
  4243.             this._Name = name;
  4244.             this._Value = value;
  4245.         }
  4246.  
  4247.         public string _Name;
  4248.  
  4249.         private Color _Value;
  4250.     }
  4251.     internal sealed class ThemeShare
  4252.     {
  4253.         private static void HandleCallbacks(IntPtr state, bool reserve)
  4254.         {
  4255.             ThemeShare.Invalidate = (ThemeShare.Frames >= 50);
  4256.             bool invalidate = ThemeShare.Invalidate;
  4257.             if (invalidate)
  4258.             {
  4259.                 ThemeShare.Frames = 0;
  4260.             }
  4261.             List<ThemeShare.AnimationDelegate> callbacks = ThemeShare.Callbacks;
  4262.             checked
  4263.             {
  4264.                 lock (callbacks)
  4265.                 {
  4266.                     int arg_3E_0 = 0;
  4267.                     int num = ThemeShare.Callbacks.Count - 1;
  4268.                     int num2 = arg_3E_0;
  4269.                     while (true)
  4270.                     {
  4271.                         int arg_62_0 = num2;
  4272.                         int num3 = num;
  4273.                         if (arg_62_0 > num3)
  4274.                         {
  4275.                             break;
  4276.                         }
  4277.                         ThemeShare.Callbacks[num2](ThemeShare.Invalidate);
  4278.                         num2++;
  4279.                     }
  4280.                 }
  4281.                 ThemeShare.Frames += 10;
  4282.             }
  4283.         }
  4284.  
  4285.         private static void InvalidateThemeTimer()
  4286.         {
  4287.             bool flag = ThemeShare.Callbacks.Count == 0;
  4288.             if (flag)
  4289.             {
  4290.                 ThemeShare.ThemeTimer.Delete();
  4291.             }
  4292.             else
  4293.             {
  4294.                 ThemeShare.ThemeTimer.Create(0u, 10u, new PrecisionTimer.TimerDelegate(ThemeShare.HandleCallbacks));
  4295.             }
  4296.         }
  4297.  
  4298.         public static void AddAnimationCallback(ThemeShare.AnimationDelegate callback)
  4299.         {
  4300.             List<ThemeShare.AnimationDelegate> callbacks = ThemeShare.Callbacks;
  4301.             lock (callbacks)
  4302.             {
  4303.                 bool flag = ThemeShare.Callbacks.Contains(callback);
  4304.                 if (!flag)
  4305.                 {
  4306.                     ThemeShare.Callbacks.Add(callback);
  4307.                     ThemeShare.InvalidateThemeTimer();
  4308.                 }
  4309.             }
  4310.         }
  4311.  
  4312.         // Token: 0x06000116 RID: 278 RVA: 0x000060FC File Offset: 0x000044FC
  4313.         public static void RemoveAnimationCallback(ThemeShare.AnimationDelegate callback)
  4314.         {
  4315.             List<ThemeShare.AnimationDelegate> callbacks = ThemeShare.Callbacks;
  4316.             lock (callbacks)
  4317.             {
  4318.                 bool flag = !ThemeShare.Callbacks.Contains(callback);
  4319.                 if (!flag)
  4320.                 {
  4321.                     ThemeShare.Callbacks.Remove(callback);
  4322.                     ThemeShare.InvalidateThemeTimer();
  4323.                 }
  4324.             }
  4325.         }
  4326.  
  4327.         // Token: 0x0400005D RID: 93
  4328.         private static int Frames;
  4329.  
  4330.         // Token: 0x0400005E RID: 94
  4331.         private static bool Invalidate;
  4332.  
  4333.         // Token: 0x0400005F RID: 95
  4334.         public static PrecisionTimer ThemeTimer = new PrecisionTimer();
  4335.  
  4336.         // Token: 0x04000060 RID: 96
  4337.         private const int FPS = 50;
  4338.  
  4339.         // Token: 0x04000061 RID: 97
  4340.         private const int Rate = 10;
  4341.  
  4342.         // Token: 0x04000062 RID: 98
  4343.         private static List<ThemeShare.AnimationDelegate> Callbacks = new List<ThemeShare.AnimationDelegate>();
  4344.  
  4345.         // Token: 0x0200001E RID: 30
  4346.         // (Invoke) Token: 0x060001AD RID: 429
  4347.         public delegate void AnimationDelegate(bool invalidate);
  4348.     }
  4349.     internal sealed class Draw
  4350.     {
  4351.         // Token: 0x06000125 RID: 293 RVA: 0x00006378 File Offset: 0x00004778
  4352.         public static GraphicsPath RoundRect(Rectangle Rectangle, int Curve)
  4353.         {
  4354.             GraphicsPath graphicsPath = new GraphicsPath();
  4355.             checked
  4356.             {
  4357.                 int num = Curve * 2;
  4358.                 GraphicsPath arg_2F_0 = graphicsPath;
  4359.                 Rectangle rect = new Rectangle(Rectangle.X, Rectangle.Y, num, num);
  4360.                 arg_2F_0.AddArc(rect, -180f, 90f);
  4361.                 GraphicsPath arg_63_0 = graphicsPath;
  4362.                 rect = new Rectangle(Rectangle.Width - num + Rectangle.X, Rectangle.Y, num, num);
  4363.                 arg_63_0.AddArc(rect, -90f, 90f);
  4364.                 GraphicsPath arg_A1_0 = graphicsPath;
  4365.                 rect = new Rectangle(Rectangle.Width - num + Rectangle.X, Rectangle.Height - num + Rectangle.Y, num, num);
  4366.                 arg_A1_0.AddArc(rect, 0f, 90f);
  4367.                 GraphicsPath arg_D5_0 = graphicsPath;
  4368.                 rect = new Rectangle(Rectangle.X, Rectangle.Height - num + Rectangle.Y, num, num);
  4369.                 arg_D5_0.AddArc(rect, 90f, 90f);
  4370.                 GraphicsPath arg_118_0 = graphicsPath;
  4371.                 Point point = new Point(Rectangle.X, Rectangle.Height - num + Rectangle.Y);
  4372.                 Point arg_118_1 = point;
  4373.                 Point pt = new Point(Rectangle.X, Curve + Rectangle.Y);
  4374.                 arg_118_0.AddLine(arg_118_1, pt);
  4375.                 return graphicsPath;
  4376.             }
  4377.         }
  4378.  
  4379.         // Token: 0x06000126 RID: 294 RVA: 0x000064A8 File Offset: 0x000048A8
  4380.         public static GraphicsPath RoundRect(int X, int Y, int Width, int Height, int Curve)
  4381.         {
  4382.             Rectangle rectangle = new Rectangle(X, Y, Width, Height);
  4383.             GraphicsPath graphicsPath = new GraphicsPath();
  4384.             checked
  4385.             {
  4386.                 int num = Curve * 2;
  4387.                 GraphicsPath arg_3D_0 = graphicsPath;
  4388.                 Rectangle rect = new Rectangle(rectangle.X, rectangle.Y, num, num);
  4389.                 arg_3D_0.AddArc(rect, -180f, 90f);
  4390.                 GraphicsPath arg_72_0 = graphicsPath;
  4391.                 rect = new Rectangle(rectangle.Width - num + rectangle.X, rectangle.Y, num, num);
  4392.                 arg_72_0.AddArc(rect, -90f, 90f);
  4393.                 GraphicsPath arg_B1_0 = graphicsPath;
  4394.                 rect = new Rectangle(rectangle.Width - num + rectangle.X, rectangle.Height - num + rectangle.Y, num, num);
  4395.                 arg_B1_0.AddArc(rect, 0f, 90f);
  4396.                 GraphicsPath arg_E6_0 = graphicsPath;
  4397.                 rect = new Rectangle(rectangle.X, rectangle.Height - num + rectangle.Y, num, num);
  4398.                 arg_E6_0.AddArc(rect, 90f, 90f);
  4399.                 GraphicsPath arg_12A_0 = graphicsPath;
  4400.                 Point point = new Point(rectangle.X, rectangle.Height - num + rectangle.Y);
  4401.                 Point arg_12A_1 = point;
  4402.                 Point pt = new Point(rectangle.X, Curve + rectangle.Y);
  4403.                 arg_12A_0.AddLine(arg_12A_1, pt);
  4404.                 return graphicsPath;
  4405.             }
  4406.         }
  4407.  
  4408.         private static Image ImageFromCode(ref string str)
  4409.         {
  4410.             byte[] array = Convert.FromBase64String(str);
  4411.             MemoryStream memoryStream = new MemoryStream(array, 0, array.Length);
  4412.             memoryStream.Write(array, 0, array.Length);
  4413.             return Image.FromStream(memoryStream, true);
  4414.         }
  4415.         public static TextureBrush TiledTextureFromCode(string str)
  4416.         {
  4417.             return new TextureBrush(Draw.ImageFromCode(ref str), WrapMode.Tile);
  4418.         }
  4419.     }
  4420.     internal class Methods
  4421.     {
  4422.  
  4423.         public Methods()
  4424.         {
  4425.         }
  4426.  
  4427.         public static void SelectTab(int Num, TwitchTabControl Control)
  4428.         {
  4429.             Control.SelectedIndex = checked(Num - 1);
  4430.         }
  4431.     }
  4432.     internal enum MouseState : byte
  4433.     {
  4434.         None,
  4435.         Over,
  4436.         Down,
  4437.         Block
  4438.     }
  4439.     internal class PrecisionTimer : IDisposable
  4440.     {
  4441.         // Token: 0x0600011D RID: 285 RVA: 0x00006264 File Offset: 0x00004664
  4442.         public PrecisionTimer()
  4443.         {
  4444.         }
  4445.  
  4446.    
  4447.         public bool Enabled
  4448.         {
  4449.             get
  4450.             {
  4451.                 return this._Enabled;
  4452.             }
  4453.         }
  4454.  
  4455.         [DllImport("kernel32.dll")]
  4456.         private static extern bool CreateTimerQueueTimer(ref IntPtr handle, IntPtr queue, PrecisionTimer.TimerDelegate callback, IntPtr state, uint dueTime, uint period, uint flags);
  4457.  
  4458.         [DllImport("kernel32.dll")]
  4459.         private static extern bool DeleteTimerQueueTimer(IntPtr queue, IntPtr handle, IntPtr callback);
  4460.  
  4461.         public void Create(uint dueTime, uint period, PrecisionTimer.TimerDelegate callback)
  4462.         {
  4463.             bool flag = this._Enabled;
  4464.             if (!flag)
  4465.             {
  4466.                 this.TimerCallback = callback;
  4467.                 bool flag2 = PrecisionTimer.CreateTimerQueueTimer(ref this.Handle, IntPtr.Zero, this.TimerCallback, IntPtr.Zero, dueTime, period, 0u);
  4468.                 flag = !flag2;
  4469.                 if (flag)
  4470.                 {
  4471.                     this.ThrowNewException("CreateTimerQueueTimer");
  4472.                 }
  4473.                 this._Enabled = flag2;
  4474.             }
  4475.         }
  4476.  
  4477.         public void Delete()
  4478.         {
  4479.             bool flag = !this._Enabled;
  4480.             if (!flag)
  4481.             {
  4482.                 bool flag2 = PrecisionTimer.DeleteTimerQueueTimer(IntPtr.Zero, this.Handle, IntPtr.Zero);
  4483.                 flag = (!flag2 && Marshal.GetLastWin32Error() != 997);
  4484.                 if (flag)
  4485.                 {
  4486.                     this.ThrowNewException("DeleteTimerQueueTimer");
  4487.                 }
  4488.                 this._Enabled = !flag2;
  4489.             }
  4490.         }
  4491.  
  4492.         // Token: 0x06000123 RID: 291 RVA: 0x0000634C File Offset: 0x0000474C
  4493.         private void ThrowNewException(string name)
  4494.         {
  4495.             throw new Exception(string.Format("{0} failed. Win32Error: {1}", name, Marshal.GetLastWin32Error()));
  4496.         }
  4497.  
  4498.         // Token: 0x06000124 RID: 292 RVA: 0x0000636C File Offset: 0x0000476C
  4499.         public void Dispose()
  4500.         {
  4501.             this.Delete();
  4502.         }
  4503.  
  4504.         // Token: 0x0400006A RID: 106
  4505.         private bool _Enabled;
  4506.  
  4507.         // Token: 0x0400006B RID: 107
  4508.         private IntPtr Handle;
  4509.  
  4510.         // Token: 0x0400006C RID: 108
  4511.         private PrecisionTimer.TimerDelegate TimerCallback;
  4512.  
  4513.         public delegate void TimerDelegate(IntPtr r1, bool r2);
  4514.     }
  4515.     public class RedemptionControlBox : Control
  4516.     {
  4517.         private static void __ENCAddToList(object value)
  4518.         {
  4519.             List<WeakReference> _ENCList = RedemptionControlBox.__ENCList;
  4520.             checked
  4521.             {
  4522.                 lock (_ENCList)
  4523.                 {
  4524.                     bool flag = RedemptionControlBox.__ENCList.Count == RedemptionControlBox.__ENCList.Capacity;
  4525.                     if (flag)
  4526.                     {
  4527.                         int num = 0;
  4528.                         int arg_3F_0 = 0;
  4529.                         int num2 = RedemptionControlBox.__ENCList.Count - 1;
  4530.                         int num3 = arg_3F_0;
  4531.                         while (true)
  4532.                         {
  4533.                             int arg_90_0 = num3;
  4534.                             int num4 = num2;
  4535.                             if (arg_90_0 > num4)
  4536.                             {
  4537.                                 break;
  4538.                             }
  4539.                             WeakReference weakReference = RedemptionControlBox.__ENCList[num3];
  4540.                             flag = weakReference.IsAlive;
  4541.                             if (flag)
  4542.                             {
  4543.                                 bool flag2 = num3 != num;
  4544.                                 if (flag2)
  4545.                                 {
  4546.                                     RedemptionControlBox.__ENCList[num] = RedemptionControlBox.__ENCList[num3];
  4547.                                 }
  4548.                                 num++;
  4549.                             }
  4550.                             num3++;
  4551.                         }
  4552.                         RedemptionControlBox.__ENCList.RemoveRange(num, RedemptionControlBox.__ENCList.Count - num);
  4553.                         RedemptionControlBox.__ENCList.Capacity = RedemptionControlBox.__ENCList.Count;
  4554.                     }
  4555.                     RedemptionControlBox.__ENCList.Add(new WeakReference(RuntimeHelpers.GetObjectValue(value)));
  4556.                 }
  4557.             }
  4558.         }
  4559.  
  4560.         // Token: 0x060001A2 RID: 418 RVA: 0x0000A0FC File Offset: 0x000084FC
  4561.         public RedemptionControlBox()
  4562.         {
  4563.             RedemptionControlBox.__ENCAddToList(this);
  4564.             this.ButtonState = RedemptionControlBox.ButtonHover.None;
  4565.             this.DoubleBuffered = true;
  4566.             this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
  4567.             this.SetStyle(ControlStyles.UserPaint, true);
  4568.             this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
  4569.             this.SetStyle(ControlStyles.ResizeRedraw, true);
  4570.             this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
  4571.             this.ForeColor = Color.White;
  4572.             this.BackColor = Color.Transparent;
  4573.             this.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
  4574.         }
  4575.  
  4576.         // Token: 0x060001A3 RID: 419 RVA: 0x0000A184 File Offset: 0x00008584
  4577.         protected override void OnResize(EventArgs e)
  4578.         {
  4579.             base.OnResize(e);
  4580.             Size size = new Size(60, 25);
  4581.             this.Size = size;
  4582.         }
  4583.  
  4584.         // Token: 0x060001A4 RID: 420 RVA: 0x0000A1B0 File Offset: 0x000085B0
  4585.         protected override void OnMouseMove(MouseEventArgs e)
  4586.         {
  4587.             base.OnMouseMove(e);
  4588.             int x = e.Location.X;
  4589.             int y = e.Location.Y;
  4590.             bool flag = y > 0 && y < checked(this.Height - 2);
  4591.             if (flag)
  4592.             {
  4593.                 bool flag2 = x > 0 && x < 30;
  4594.                 if (flag2)
  4595.                 {
  4596.                     this.ButtonState = RedemptionControlBox.ButtonHover.Minimize;
  4597.                 }
  4598.                 else
  4599.                 {
  4600.                     flag2 = (x > 31 && x < this.Width);
  4601.                     if (flag2)
  4602.                     {
  4603.                         this.ButtonState = RedemptionControlBox.ButtonHover.Close;
  4604.                     }
  4605.                     else
  4606.                     {
  4607.                         this.ButtonState = RedemptionControlBox.ButtonHover.None;
  4608.                     }
  4609.                 }
  4610.             }
  4611.             else
  4612.             {
  4613.                 this.ButtonState = RedemptionControlBox.ButtonHover.None;
  4614.             }
  4615.             this.Invalidate();
  4616.         }
  4617.  
  4618.         // Token: 0x060001A5 RID: 421 RVA: 0x0000A258 File Offset: 0x00008658
  4619.         protected override void OnPaint(PaintEventArgs e)
  4620.         {
  4621.             Bitmap bitmap = new Bitmap(this.Width, this.Height);
  4622.             Graphics graphics = Graphics.FromImage(bitmap);
  4623.             graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
  4624.             base.OnPaint(e);
  4625.             graphics.Clear(this.BackColor);
  4626.             Font font = new Font("Marlett", 10f);
  4627.             Graphics arg_91_0 = graphics;
  4628.             string arg_91_1 = "r";
  4629.             Font arg_91_2 = font;
  4630.             Brush arg_91_3 = new SolidBrush(Color.FromArgb(200, 200, 200));
  4631.             checked
  4632.             {
  4633.                 Point point = new Point(this.Width - 16, 7);
  4634.                 arg_91_0.DrawString(arg_91_1, arg_91_2, arg_91_3, point, new StringFormat
  4635.                 {
  4636.                     Alignment = StringAlignment.Center
  4637.                 });
  4638.                 Graphics arg_DA_0 = graphics;
  4639.                 string arg_DA_1 = "0";
  4640.                 Font arg_DA_2 = font;
  4641.                 Brush arg_DA_3 = new SolidBrush(Color.FromArgb(200, 200, 200));
  4642.                 point = new Point(20, 7);
  4643.                 arg_DA_0.DrawString(arg_DA_1, arg_DA_2, arg_DA_3, point, new StringFormat
  4644.                 {
  4645.                     Alignment = StringAlignment.Center
  4646.                 });
  4647.                 switch (this.ButtonState)
  4648.                 {
  4649.                     case RedemptionControlBox.ButtonHover.Minimize:
  4650.                         {
  4651.                             Graphics arg_133_0 = graphics;
  4652.                             string arg_133_1 = "0";
  4653.                             Font arg_133_2 = font;
  4654.                             Brush arg_133_3 = new SolidBrush(Color.White);
  4655.                             point = new Point(20, 7);
  4656.                             arg_133_0.DrawString(arg_133_1, arg_133_2, arg_133_3, point, new StringFormat
  4657.                             {
  4658.                                 Alignment = StringAlignment.Center
  4659.                             });
  4660.                             break;
  4661.                         }
  4662.                     case RedemptionControlBox.ButtonHover.Close:
  4663.                         {
  4664.                             Graphics arg_177_0 = graphics;
  4665.                             string arg_177_1 = "r";
  4666.                             Font arg_177_2 = font;
  4667.                             Brush arg_177_3 = new SolidBrush(Color.White);
  4668.                             point = new Point(this.Width - 16, 7);
  4669.                             arg_177_0.DrawString(arg_177_1, arg_177_2, arg_177_3, point, new StringFormat
  4670.                             {
  4671.                                 Alignment = StringAlignment.Center
  4672.                             });
  4673.                             break;
  4674.                         }
  4675.                 }
  4676.                 Graphics arg_190_0 = e.Graphics;
  4677.                 Image arg_190_1 = bitmap;
  4678.                 point = new Point(0, 0);
  4679.                 arg_190_0.DrawImage(arg_190_1, point);
  4680.                 graphics.Dispose();
  4681.                 bitmap.Dispose();
  4682.             }
  4683.         }
  4684.  
  4685.         // Token: 0x060001A6 RID: 422 RVA: 0x0000A40C File Offset: 0x0000880C
  4686.         protected override void OnMouseUp(MouseEventArgs e)
  4687.         {
  4688.             base.OnMouseDown(e);
  4689.             switch (this.ButtonState)
  4690.             {
  4691.                 case RedemptionControlBox.ButtonHover.Minimize:
  4692.                     this.Parent.FindForm().WindowState = FormWindowState.Minimized;
  4693.                     break;
  4694.                 case RedemptionControlBox.ButtonHover.Maximize:
  4695.                     this.Parent.FindForm().WindowState = FormWindowState.Maximized;
  4696.                     break;
  4697.                 case RedemptionControlBox.ButtonHover.Close:
  4698.                     this.Parent.FindForm().Close();
  4699.                     break;
  4700.             }
  4701.             this.Invalidate();
  4702.         }
  4703.  
  4704.         // Token: 0x060001A7 RID: 423 RVA: 0x0000A484 File Offset: 0x00008884
  4705.         protected override void OnMouseLeave(EventArgs e)
  4706.         {
  4707.             base.OnMouseLeave(e);
  4708.             this.ButtonState = RedemptionControlBox.ButtonHover.None;
  4709.             this.Invalidate();
  4710.         }
  4711.  
  4712.         // Token: 0x0400009A RID: 154
  4713.         private static List<WeakReference> __ENCList = new List<WeakReference>();
  4714.  
  4715.         // Token: 0x0400009B RID: 155
  4716.         private RedemptionControlBox.ButtonHover ButtonState;
  4717.  
  4718.         // Token: 0x02000021 RID: 33
  4719.         public enum ButtonHover
  4720.         {
  4721.             // Token: 0x0400009D RID: 157
  4722.             Minimize,
  4723.             // Token: 0x0400009E RID: 158
  4724.             Maximize,
  4725.             // Token: 0x0400009F RID: 159
  4726.             Close,
  4727.             // Token: 0x040000A0 RID: 160
  4728.             None
  4729.         }
  4730.     }
  4731.     internal class TwitchBigButton : ThemeControl154
  4732.     {
  4733.         // Token: 0x1700003F RID: 63
  4734.         // (get) Token: 0x0600014E RID: 334 RVA: 0x00007A38 File Offset: 0x00005E38
  4735.         // (set) Token: 0x0600014F RID: 335 RVA: 0x00007A50 File Offset: 0x00005E50
  4736.         public int twTabPageNumber
  4737.         {
  4738.             get
  4739.             {
  4740.                 return this._twTabPageNumber;
  4741.             }
  4742.             set
  4743.             {
  4744.                 this._twTabPageNumber = value;
  4745.             }
  4746.         }
  4747.  
  4748.         // Token: 0x17000040 RID: 64
  4749.         // (get) Token: 0x06000150 RID: 336 RVA: 0x00007A5C File Offset: 0x00005E5C
  4750.         // (set) Token: 0x06000151 RID: 337 RVA: 0x00007A74 File Offset: 0x00005E74
  4751.         public TwitchTabControl twTabPage
  4752.         {
  4753.             get
  4754.             {
  4755.                 return this._twTabPage;
  4756.             }
  4757.             set
  4758.             {
  4759.                 this._twTabPage = value;
  4760.             }
  4761.         }
  4762.  
  4763.         // Token: 0x17000041 RID: 65
  4764.         // (get) Token: 0x06000152 RID: 338 RVA: 0x00007A80 File Offset: 0x00005E80
  4765.         // (set) Token: 0x06000153 RID: 339 RVA: 0x00007A98 File Offset: 0x00005E98
  4766.         public bool twDoesTurnPurple
  4767.         {
  4768.             get
  4769.             {
  4770.                 return this._twDoesTurnPurple;
  4771.             }
  4772.             set
  4773.             {
  4774.                 this._twDoesTurnPurple = value;
  4775.             }
  4776.         }
  4777.  
  4778.         // Token: 0x17000042 RID: 66
  4779.         // (get) Token: 0x06000154 RID: 340 RVA: 0x00007AA4 File Offset: 0x00005EA4
  4780.         // (set) Token: 0x06000155 RID: 341 RVA: 0x00007ABC File Offset: 0x00005EBC
  4781.         public bool twStarred
  4782.         {
  4783.             get
  4784.             {
  4785.                 return this._twStarred;
  4786.             }
  4787.             set
  4788.             {
  4789.                 this._twStarred = value;
  4790.             }
  4791.         }
  4792.  
  4793.         // Token: 0x06000156 RID: 342 RVA: 0x00007AC8 File Offset: 0x00005EC8
  4794.         public TwitchBigButton()
  4795.         {
  4796.             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";
  4797.             this.Cursor = Cursors.Hand;
  4798.             Size size = new Size(245, 30);
  4799.             this.Size = size;
  4800.             this.Click += new EventHandler(this.Clicked);
  4801.             this.Transparent = true;
  4802.             this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
  4803.             this.BackColor = Color.Transparent;
  4804.             this.twDoesTurnPurple = false;
  4805.             this.twStarred = false;
  4806.             this.twTabPageNumber = 1;
  4807.             this.Tag = "black";
  4808.         }
  4809.  
  4810.         // Token: 0x06000157 RID: 343 RVA: 0x00007B68 File Offset: 0x00005F68
  4811.         private void Clicked(object sender, EventArgs e)
  4812.         {
  4813.             bool twDoesTurnPurple = this.twDoesTurnPurple;
  4814.             bool flag2;
  4815.             if (twDoesTurnPurple)
  4816.             {
  4817.                 try
  4818.                 {
  4819.                     IEnumerator enumerator = this.Parent.Controls.GetEnumerator();
  4820.                     while (enumerator.MoveNext())
  4821.                     {
  4822.                         Control control = (Control)enumerator.Current;
  4823.                         bool flag = control != this && control is TwitchBigButton;
  4824.                         if (flag)
  4825.                         {
  4826.                             object tag = control.Tag;
  4827.                             flag2 = Operators.ConditionalCompareObjectEqual(tag, "purple", false);
  4828.                             if (flag2)
  4829.                             {
  4830.                                 ((TwitchBigButton)control).Tag = "black";
  4831.                             }
  4832.                             else
  4833.                             {
  4834.                                 flag2 = Operators.ConditionalCompareObjectEqual(tag, "purplebottom", false);
  4835.                                 if (flag2)
  4836.                                 {
  4837.                                     ((TwitchBigButton)control).Tag = "blackbottom";
  4838.                                 }
  4839.                             }
  4840.                             control.Invalidate();
  4841.                         }
  4842.                     }
  4843.                 }
  4844.                 finally
  4845.                 {
  4846.                     IEnumerator enumerator = this.Parent.Controls.GetEnumerator();
  4847.                     flag2 = (enumerator is IDisposable);
  4848.                     if (flag2)
  4849.                     {
  4850.                         (enumerator as IDisposable).Dispose();
  4851.                     }
  4852.                 }
  4853.                 object tag2 = this.Tag;
  4854.                 flag2 = Operators.ConditionalCompareObjectEqual(tag2, "black", false);
  4855.                 if (flag2)
  4856.                 {
  4857.                     this.Tag = "purple";
  4858.                 }
  4859.                 else
  4860.                 {
  4861.                     flag2 = Operators.ConditionalCompareObjectEqual(tag2, "blackbottom", false);
  4862.                     if (flag2)
  4863.                     {
  4864.                         this.Tag = "purplebottom";
  4865.                     }
  4866.                 }
  4867.             }
  4868.             flag2 = (this.twTabPageNumber != 0);
  4869.             if (flag2)
  4870.             {
  4871.                 try
  4872.                 {
  4873.                     Methods.SelectTab(this.twTabPageNumber, this.twTabPage);
  4874.                 }
  4875.                 catch (Exception expr_149)
  4876.                 {
  4877.                     ProjectData.SetProjectError(expr_149);
  4878.                     ProjectData.ClearProjectError();
  4879.                 }
  4880.             }
  4881.         }
  4882.  
  4883.         // Token: 0x06000158 RID: 344 RVA: 0x00007CEC File Offset: 0x000060EC
  4884.         protected override void ColorHook()
  4885.         {
  4886.         }
  4887.  
  4888.         // Token: 0x06000159 RID: 345 RVA: 0x00007CF0 File Offset: 0x000060F0
  4889.         protected override void PaintHook()
  4890.         {
  4891.             this.G.Clear(this.BackColor);
  4892.             object tag = this.Tag;
  4893.             bool flag = Operators.ConditionalCompareObjectEqual(tag, "black", false);
  4894.             checked
  4895.             {
  4896.                 if (flag)
  4897.                 {
  4898.                     switch (this.State)
  4899.                     {
  4900.                         case MouseState.None:
  4901.                             {
  4902.                                 Graphics arg_83_0 = this.G;
  4903.                                 Brush arg_83_1 = new SolidBrush(Color.FromArgb(30, 30, 30));
  4904.                                 Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
  4905.                                 arg_83_0.FillRectangle(arg_83_1, rect);
  4906.                                 this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
  4907.                                 Graphics arg_D8_0 = this.G;
  4908.                                 Pen arg_D8_1 = new Pen(Color.FromArgb(38, 38, 38));
  4909.                                 Point point = new Point(1, 1);
  4910.                                 Point arg_D8_2 = point;
  4911.                                 Point point2 = new Point(this.Width - 2, 1);
  4912.                                 arg_D8_0.DrawLine(arg_D8_1, arg_D8_2, point2);
  4913.                                 this.DrawText(new SolidBrush(Color.FromArgb(170, 170, 170)), HorizontalAlignment.Left, 30, 0);
  4914.                                 break;
  4915.                             }
  4916.                         case MouseState.Over:
  4917.                             {
  4918.                                 Graphics arg_136_0 = this.G;
  4919.                                 Brush arg_136_1 = new SolidBrush(Color.FromArgb(35, 35, 35));
  4920.                                 Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
  4921.                                 arg_136_0.FillRectangle(arg_136_1, rect);
  4922.                                 this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
  4923.                                 Graphics arg_18B_0 = this.G;
  4924.                                 Pen arg_18B_1 = new Pen(Color.FromArgb(38, 38, 38));
  4925.                                 Point point2 = new Point(1, 1);
  4926.                                 Point arg_18B_2 = point2;
  4927.                                 Point point = new Point(this.Width - 2, 1);
  4928.                                 arg_18B_0.DrawLine(arg_18B_1, arg_18B_2, point);
  4929.                                 this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Left, 30, 0);
  4930.                                 break;
  4931.                             }
  4932.                         case MouseState.Down:
  4933.                             {
  4934.                                 Graphics arg_1D7_0 = this.G;
  4935.                                 Brush arg_1D7_1 = new SolidBrush(Color.FromArgb(25, 25, 25));
  4936.                                 Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
  4937.                                 arg_1D7_0.FillRectangle(arg_1D7_1, rect);
  4938.                                 this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
  4939.                                 this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Left, 30, 0);
  4940.                                 break;
  4941.                             }
  4942.                     }
  4943.                     flag = this.twStarred;
  4944.                     if (flag)
  4945.                     {
  4946.                         byte[] array = Convert.FromBase64String(this.StarBase64);
  4947.                         MemoryStream stream = new MemoryStream(array, 0, array.Length);
  4948.                         Image image = Image.FromStream(stream, true);
  4949.                         this.G.DrawImage(image, this.Width - 20, 0, image.Width, image.Height);
  4950.                     }
  4951.                 }
  4952.                 else
  4953.                 {
  4954.                     flag = Operators.ConditionalCompareObjectEqual(tag, "purple", false);
  4955.                     if (flag)
  4956.                     {
  4957.                         this.G.Clear(this.BackColor);
  4958.                         Graphics arg_2B8_0 = this.G;
  4959.                         Brush arg_2B8_1 = new SolidBrush(Color.FromArgb(100, 65, 165));
  4960.                         Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
  4961.                         arg_2B8_0.FillRectangle(arg_2B8_1, rect);
  4962.                         this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
  4963.                         this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Left, 30, 0);
  4964.                     }
  4965.                     else
  4966.                     {
  4967.                         flag = Operators.ConditionalCompareObjectEqual(tag, "blackbottom", false);
  4968.                         if (flag)
  4969.                         {
  4970.                             switch (this.State)
  4971.                             {
  4972.                                 case MouseState.None:
  4973.                                     {
  4974.                                         Graphics arg_359_0 = this.G;
  4975.                                         Brush arg_359_1 = new SolidBrush(Color.FromArgb(30, 30, 30));
  4976.                                         Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
  4977.                                         arg_359_0.FillRectangle(arg_359_1, rect);
  4978.                                         this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
  4979.                                         this.G.DrawLine(Pens.Black, 0, this.Height - 1, this.Width, this.Height - 1);
  4980.                                         Graphics arg_3D6_0 = this.G;
  4981.                                         Pen arg_3D6_1 = new Pen(Color.FromArgb(38, 38, 38));
  4982.                                         Point point2 = new Point(1, 1);
  4983.                                         Point arg_3D6_2 = point2;
  4984.                                         Point point = new Point(this.Width - 2, 1);
  4985.                                         arg_3D6_0.DrawLine(arg_3D6_1, arg_3D6_2, point);
  4986.                                         this.DrawText(new SolidBrush(Color.FromArgb(170, 170, 170)), HorizontalAlignment.Left, 30, 0);
  4987.                                         break;
  4988.                                     }
  4989.                                 case MouseState.Over:
  4990.                                     {
  4991.                                         Graphics arg_434_0 = this.G;
  4992.                                         Brush arg_434_1 = new SolidBrush(Color.FromArgb(35, 35, 35));
  4993.                                         Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
  4994.                                         arg_434_0.FillRectangle(arg_434_1, rect);
  4995.                                         this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
  4996.                                         this.G.DrawLine(Pens.Black, 0, this.Height - 1, this.Width, this.Height - 1);
  4997.                                         Graphics arg_4B1_0 = this.G;
  4998.                                         Pen arg_4B1_1 = new Pen(Color.FromArgb(38, 38, 38));
  4999.                                         Point point2 = new Point(1, 1);
  5000.                                         Point arg_4B1_2 = point2;
  5001.                                         Point point = new Point(this.Width - 2, 1);
  5002.                                         arg_4B1_0.DrawLine(arg_4B1_1, arg_4B1_2, point);
  5003.                                         this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Left, 30, 0);
  5004.                                         break;
  5005.                                     }
  5006.                                 case MouseState.Down:
  5007.                                     {
  5008.                                         Graphics arg_500_0 = this.G;
  5009.                                         Brush arg_500_1 = new SolidBrush(Color.FromArgb(25, 25, 25));
  5010.                                         Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
  5011.                                         arg_500_0.FillRectangle(arg_500_1, rect);
  5012.                                         this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
  5013.                                         this.G.DrawLine(Pens.Black, 0, this.Height - 1, this.Width, this.Height - 1);
  5014.                                         this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Left, 30, 0);
  5015.                                         break;
  5016.                                     }
  5017.                             }
  5018.                             flag = this.twStarred;
  5019.                             if (flag)
  5020.                             {
  5021.                                 byte[] array2 = Convert.FromBase64String(this.StarBase64);
  5022.                                 MemoryStream stream2 = new MemoryStream(array2, 0, array2.Length);
  5023.                                 Image image2 = Image.FromStream(stream2, true);
  5024.                                 this.G.DrawImage(image2, this.Width - 20, 0, image2.Width, image2.Height);
  5025.                             }
  5026.                         }
  5027.                         else
  5028.                         {
  5029.                             flag = Operators.ConditionalCompareObjectEqual(tag, "purplebottom", false);
  5030.                             if (flag)
  5031.                             {
  5032.                                 Graphics arg_600_0 = this.G;
  5033.                                 Brush arg_600_1 = new SolidBrush(Color.FromArgb(100, 65, 165));
  5034.                                 Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
  5035.                                 arg_600_0.FillRectangle(arg_600_1, rect);
  5036.                                 this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
  5037.                                 this.G.DrawLine(Pens.Black, 0, this.Height - 1, this.Width, this.Height - 1);
  5038.                                 this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Left, 30, 0);
  5039.                             }
  5040.                             else
  5041.                             {
  5042.                                 switch (this.State)
  5043.                                 {
  5044.                                     case MouseState.None:
  5045.                                         {
  5046.                                             Graphics arg_6B3_0 = this.G;
  5047.                                             Brush arg_6B3_1 = new SolidBrush(Color.FromArgb(30, 30, 30));
  5048.                                             Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
  5049.                                             arg_6B3_0.FillRectangle(arg_6B3_1, rect);
  5050.                                             this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
  5051.                                             this.DrawText(new SolidBrush(Color.FromArgb(170, 170, 170)), HorizontalAlignment.Left, 30, 0);
  5052.                                             break;
  5053.                                         }
  5054.                                     case MouseState.Over:
  5055.                                         {
  5056.                                             Graphics arg_72B_0 = this.G;
  5057.                                             Brush arg_72B_1 = new SolidBrush(Color.FromArgb(35, 35, 35));
  5058.                                             Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
  5059.                                             arg_72B_0.FillRectangle(arg_72B_1, rect);
  5060.                                             this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
  5061.                                             this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Left, 30, 0);
  5062.                                             break;
  5063.                                         }
  5064.                                     case MouseState.Down:
  5065.                                         {
  5066.                                             Graphics arg_791_0 = this.G;
  5067.                                             Brush arg_791_1 = new SolidBrush(Color.FromArgb(25, 25, 25));
  5068.                                             Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
  5069.                                             arg_791_0.FillRectangle(arg_791_1, rect);
  5070.                                             this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
  5071.                                             this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Left, 30, 0);
  5072.                                             break;
  5073.                                         }
  5074.                                 }
  5075.                                 flag = this.twStarred;
  5076.                                 if (flag)
  5077.                                 {
  5078.                                     byte[] array3 = Convert.FromBase64String(this.StarBase64);
  5079.                                     MemoryStream stream3 = new MemoryStream(array3, 0, array3.Length);
  5080.                                     Image image3 = Image.FromStream(stream3, true);
  5081.                                     this.G.DrawImage(image3, this.Width - 20, 0, image3.Width, image3.Height);
  5082.                                 }
  5083.                             }
  5084.                         }
  5085.                     }
  5086.                 }
  5087.                 flag = (this.Image != null);
  5088.                 if (flag)
  5089.                 {
  5090.                     this.G.DrawImage(this.Image, 10, 7, 16, 16);
  5091.                 }
  5092.             }
  5093.         }
  5094.  
  5095.      
  5096.         private int _twTabPageNumber;
  5097.  
  5098.        
  5099.         private TwitchTabControl _twTabPage;
  5100.  
  5101.         private bool _twDoesTurnPurple;
  5102.  
  5103.         private bool _twStarred;
  5104.  
  5105.        
  5106.         private string StarBase64;
  5107.     }
  5108.     internal class TwitchButton : ThemeControl154
  5109.     {
  5110.        
  5111.         public bool twNoRounding
  5112.         {
  5113.             get
  5114.             {
  5115.                 return this._twNoRounding;
  5116.             }
  5117.             set
  5118.             {
  5119.                 this._twNoRounding = value;
  5120.             }
  5121.         }
  5122.  
  5123.         // Token: 0x0600014B RID: 331 RVA: 0x0000734C File Offset: 0x0000574C
  5124.         public TwitchButton()
  5125.         {
  5126.             this.Cursor = Cursors.Hand;
  5127.             Size size = new Size(105, 31);
  5128.             this.Size = size;
  5129.             this.Tag = "purple";
  5130.             this.Transparent = true;
  5131.             this.BackColor = Color.Transparent;
  5132.             this.Font = new Font("Verdana", 8f, FontStyle.Regular);
  5133.             this.twNoRounding = false;
  5134.         }
  5135.  
  5136.         // Token: 0x0600014C RID: 332 RVA: 0x000073C4 File Offset: 0x000057C4
  5137.         protected override void ColorHook()
  5138.         {
  5139.         }
  5140.  
  5141.         // Token: 0x0600014D RID: 333 RVA: 0x000073C8 File Offset: 0x000057C8
  5142.         protected override void PaintHook()
  5143.         {
  5144.             this.G.SmoothingMode = SmoothingMode.HighQuality;
  5145.             this.G.Clear(this.BackColor);
  5146.             object tag = this.Tag;
  5147.             bool flag = Operators.ConditionalCompareObjectEqual(tag, "purple", false);
  5148.             checked
  5149.             {
  5150.                 if (flag)
  5151.                 {
  5152.                     MouseState state = this.State;
  5153.                     bool flag2 = state == MouseState.Down;
  5154.                     if (flag2)
  5155.                     {
  5156.                         bool flag3 = this.twNoRounding;
  5157.                         if (flag3)
  5158.                         {
  5159.                             Color arg_9A_1 = Color.FromArgb(80, 56, 129);
  5160.                             Color arg_9A_2 = Color.FromArgb(58, 37, 103);
  5161.                             Rectangle rectangle = new Rectangle(0, 0, this.Width, this.Height);
  5162.                             this.DrawGradient(arg_9A_1, arg_9A_2, rectangle, 90f);
  5163.                             Graphics arg_C7_0 = this.G;
  5164.                             Pen arg_C7_1 = Pens.Black;
  5165.                             rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
  5166.                             arg_C7_0.DrawRectangle(arg_C7_1, rectangle);
  5167.                             this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Center, 0, 0);
  5168.                         }
  5169.                         else
  5170.                         {
  5171.                             Rectangle rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
  5172.                             LinearGradientBrush linearGradientBrush = new LinearGradientBrush(rectangle, Color.FromArgb(80, 56, 129), Color.FromArgb(58, 37, 103), 90f);
  5173.                             Graphics arg_150_0 = this.G;
  5174.                             Brush arg_150_1 = linearGradientBrush;
  5175.                             rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
  5176.                             arg_150_0.FillPath(arg_150_1, Draw.RoundRect(rectangle, 4));
  5177.                             Graphics arg_183_0 = this.G;
  5178.                             Pen arg_183_1 = Pens.Black;
  5179.                             rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
  5180.                             arg_183_0.DrawPath(arg_183_1, Draw.RoundRect(rectangle, 4));
  5181.                         }
  5182.                         this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Center, 0, 0);
  5183.                     }
  5184.                     else
  5185.                     {
  5186.                         bool flag3 = this.twNoRounding;
  5187.                         if (flag3)
  5188.                         {
  5189.                             Color arg_1ED_1 = Color.FromArgb(124, 96, 176);
  5190.                             Color arg_1ED_2 = Color.FromArgb(87, 59, 139);
  5191.                             Rectangle rectangle = new Rectangle(0, 0, this.Width, this.Height);
  5192.                             this.DrawGradient(arg_1ED_1, arg_1ED_2, rectangle, 90f);
  5193.                             Graphics arg_21A_0 = this.G;
  5194.                             Pen arg_21A_1 = Pens.Black;
  5195.                             rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
  5196.                             arg_21A_0.DrawRectangle(arg_21A_1, rectangle);
  5197.                             this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Center, 0, 0);
  5198.                         }
  5199.                         else
  5200.                         {
  5201.                             Rectangle rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
  5202.                             LinearGradientBrush linearGradientBrush2 = new LinearGradientBrush(rectangle, Color.FromArgb(124, 96, 176), Color.FromArgb(87, 59, 139), 90f);
  5203.                             Graphics arg_2A6_0 = this.G;
  5204.                             Brush arg_2A6_1 = linearGradientBrush2;
  5205.                             rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
  5206.                             arg_2A6_0.FillPath(arg_2A6_1, Draw.RoundRect(rectangle, 4));
  5207.                             Graphics arg_2D9_0 = this.G;
  5208.                             Pen arg_2D9_1 = Pens.Black;
  5209.                             rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
  5210.                             arg_2D9_0.DrawPath(arg_2D9_1, Draw.RoundRect(rectangle, 4));
  5211.                             this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Center, 0, 0);
  5212.                         }
  5213.                     }
  5214.                 }
  5215.                 else
  5216.                 {
  5217.                     bool flag3 = Operators.ConditionalCompareObjectEqual(tag, "white", false);
  5218.                     if (flag3)
  5219.                     {
  5220.                         switch (this.State)
  5221.                         {
  5222.                             case MouseState.None:
  5223.                                 {
  5224.                                     Color arg_378_1 = Color.FromArgb(242, 242, 242);
  5225.                                     Color arg_378_2 = Color.FromArgb(225, 225, 225);
  5226.                                     Rectangle rectangle = new Rectangle(0, 0, this.Width, this.Height);
  5227.                                     this.DrawGradient(arg_378_1, arg_378_2, rectangle, 90f);
  5228.                                     Graphics arg_3BE_0 = this.G;
  5229.                                     Pen arg_3BE_1 = new Pen(new SolidBrush(Color.FromArgb(158, 158, 158)));
  5230.                                     rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
  5231.                                     arg_3BE_0.DrawRectangle(arg_3BE_1, rectangle);
  5232.                                     this.DrawText(new SolidBrush(Color.FromArgb(124, 124, 124)), HorizontalAlignment.Center, 0, 0);
  5233.                                     break;
  5234.                                 }
  5235.                             case MouseState.Over:
  5236.                                 {
  5237.                                     Color arg_4D3_1 = Color.FromArgb(242, 242, 242);
  5238.                                     Color arg_4D3_2 = Color.FromArgb(223, 223, 223);
  5239.                                     Rectangle rectangle = new Rectangle(0, 0, this.Width, this.Height);
  5240.                                     this.DrawGradient(arg_4D3_1, arg_4D3_2, rectangle, 90f);
  5241.                                     Graphics arg_519_0 = this.G;
  5242.                                     Pen arg_519_1 = new Pen(new SolidBrush(Color.FromArgb(158, 158, 158)));
  5243.                                     rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
  5244.                                     arg_519_0.DrawRectangle(arg_519_1, rectangle);
  5245.                                     this.DrawText(new SolidBrush(Color.FromArgb(124, 124, 124)), HorizontalAlignment.Center, 0, 0);
  5246.                                     break;
  5247.                                 }
  5248.                             case MouseState.Down:
  5249.                                 {
  5250.                                     Color arg_42A_1 = Color.FromArgb(213, 213, 213);
  5251.                                     Color arg_42A_2 = Color.FromArgb(188, 188, 188);
  5252.                                     Rectangle rectangle = new Rectangle(0, 0, this.Width, this.Height);
  5253.                                     this.DrawGradient(arg_42A_1, arg_42A_2, rectangle, 90f);
  5254.                                     Graphics arg_467_0 = this.G;
  5255.                                     Pen arg_467_1 = new Pen(new SolidBrush(Color.FromArgb(121, 121, 121)));
  5256.                                     rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
  5257.                                     arg_467_0.DrawRectangle(arg_467_1, rectangle);
  5258.                                     this.DrawText(new SolidBrush(Color.FromArgb(124, 124, 124)), HorizontalAlignment.Center, 0, 0);
  5259.                                     break;
  5260.                                 }
  5261.                         }
  5262.                     }
  5263.                     else
  5264.                     {
  5265.                         MouseState state2 = this.State;
  5266.                         flag3 = (state2 == MouseState.Down);
  5267.                         if (flag3)
  5268.                         {
  5269.                             Color arg_58F_1 = Color.FromArgb(80, 56, 129);
  5270.                             Color arg_58F_2 = Color.FromArgb(58, 37, 103);
  5271.                             Rectangle rectangle = new Rectangle(0, 0, this.Width, this.Height);
  5272.                             this.DrawGradient(arg_58F_1, arg_58F_2, rectangle, 90f);
  5273.                             Graphics arg_5BC_0 = this.G;
  5274.                             Pen arg_5BC_1 = Pens.Black;
  5275.                             rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
  5276.                             arg_5BC_0.DrawRectangle(arg_5BC_1, rectangle);
  5277.                             this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Center, 0, 0);
  5278.                         }
  5279.                         else
  5280.                         {
  5281.                             Color arg_616_1 = Color.FromArgb(124, 96, 176);
  5282.                             Color arg_616_2 = Color.FromArgb(87, 59, 139);
  5283.                             Rectangle rectangle = new Rectangle(0, 0, this.Width, this.Height);
  5284.                             this.DrawGradient(arg_616_1, arg_616_2, rectangle, 90f);
  5285.                             Graphics arg_643_0 = this.G;
  5286.                             Pen arg_643_1 = Pens.Black;
  5287.                             rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
  5288.                             arg_643_0.DrawRectangle(arg_643_1, rectangle);
  5289.                             this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Center, 0, 0);
  5290.                         }
  5291.                     }
  5292.                 }
  5293.             }
  5294.         }
  5295.  
  5296.         // Token: 0x0400007D RID: 125
  5297.         private bool _twNoRounding;
  5298.     }
  5299.     internal class TwitchButtonWithTag : ThemeControl154
  5300.     {
  5301.         // Token: 0x06000184 RID: 388 RVA: 0x000095A0 File Offset: 0x000079A0
  5302.         public TwitchButtonWithTag()
  5303.         {
  5304.             this.Cursor = Cursors.Hand;
  5305.             Size size = new Size(105, 31);
  5306.             this.Size = size;
  5307.             this.Tag = "$4.99";
  5308.             this.Text = "Subscribe";
  5309.             this.Transparent = true;
  5310.             this.BackColor = Color.Transparent;
  5311.             this.Font = new Font("Verdana", 8f, FontStyle.Regular);
  5312.         }
  5313.  
  5314.         // Token: 0x06000185 RID: 389 RVA: 0x0000961C File Offset: 0x00007A1C
  5315.         protected override void ColorHook()
  5316.         {
  5317.         }
  5318.  
  5319.         protected override void PaintHook()
  5320.         {
  5321.             MouseState state = this.State;
  5322.             bool flag = state == MouseState.None;
  5323.             if (flag)
  5324.             {
  5325.                 Color arg_4E_1 = Color.FromArgb(124, 96, 176);
  5326.                 Color arg_4E_2 = Color.FromArgb(87, 59, 139);
  5327.                 Rectangle rectangle = new Rectangle(0, 0, this.Width, this.Height);
  5328.                 this.DrawGradient(arg_4E_1, arg_4E_2, rectangle, 90f);
  5329.                 Color arg_B9_1 = Color.FromArgb(45, 31, 71);
  5330.                 Color arg_B9_2 = Color.FromArgb(44, 33, 63);
  5331.                 checked
  5332.                 {
  5333.                     rectangle = new Rectangle((int)Math.Round((double)(unchecked(this.G.MeasureString(this.Text, this.Font).Width + 15f))), 5, this.Width - 82, this.Height - 10);
  5334.                     this.DrawGradient(arg_B9_1, arg_B9_2, rectangle, 90f);
  5335.                     Graphics arg_E5_0 = this.G;
  5336.                     Pen arg_E5_1 = Pens.Black;
  5337.                     rectangle = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
  5338.                     arg_E5_0.DrawRectangle(arg_E5_1, rectangle);
  5339.                     this.DrawText(new SolidBrush(Color.White), HorizontalAlignment.Left, 10, 0);
  5340.                 }
  5341.                 this.G.DrawString(Conversions.ToString(this.Tag), this.Font, Brushes.White, this.G.MeasureString(this.Text, this.Font).Width + 20f, 8f);
  5342.             }
  5343.         }
  5344.     }
  5345.     internal class TwitchCollapseBox : ThemeContainer154
  5346.     {
  5347.      
  5348.         public bool twIsCollapsable
  5349.         {
  5350.             get
  5351.             {
  5352.                 return this._twIsCollapsable;
  5353.             }
  5354.             set
  5355.             {
  5356.                 this._twIsCollapsable = value;
  5357.             }
  5358.         }
  5359.  
  5360.         public TwitchCollapseBox()
  5361.         {
  5362.             this.ControlMode = true;
  5363.             this.SetColor("Border", Color.Red);
  5364.             this.SetColor("Header", Color.Red);
  5365.             this.SetColor("Text", Color.Red);
  5366.             this.Cursor = Cursors.Hand;
  5367.             this.Click += new EventHandler(this.BoxClicked);
  5368.             Size size = new Size(245, 188);
  5369.             this.Size = size;
  5370.             this.twIsCollapsable = true;
  5371.         }
  5372.  
  5373.         // Token: 0x06000131 RID: 305 RVA: 0x00006948 File Offset: 0x00004D48
  5374.         private void BoxClicked(object sender, EventArgs e)
  5375.         {
  5376.             bool twIsCollapsable = this.twIsCollapsable;
  5377.             if (twIsCollapsable)
  5378.             {
  5379.                 bool flag = Operators.ConditionalCompareObjectGreater(NewLateBinding.LateGet(sender, null, "Height", new object[0], null, null, null), 25, false);
  5380.                 if (flag)
  5381.                 {
  5382.                     this.hgt = Conversions.ToInteger(NewLateBinding.LateGet(sender, null, "Height", new object[0], null, null, null));
  5383.                     try
  5384.                     {
  5385.                         IEnumerator enumerator = ((IEnumerable)NewLateBinding.LateGet(sender, null, "Controls", new object[0], null, null, null)).GetEnumerator();
  5386.                         while (enumerator.MoveNext())
  5387.                         {
  5388.                             Control control = (Control)enumerator.Current;
  5389.                             control.Visible = false;
  5390.                         }
  5391.                     }
  5392.                     finally
  5393.                     {
  5394.                         IEnumerator enumerator = this.Parent.Controls.GetEnumerator();
  5395.                         flag = (enumerator is IDisposable);
  5396.                         if (flag)
  5397.                         {
  5398.                             (enumerator as IDisposable).Dispose();
  5399.                         }
  5400.                     }
  5401.                     NewLateBinding.LateSet(sender, null, "Height", new object[]
  5402.                     {
  5403.                         25
  5404.                     }, null, null);
  5405.                 }
  5406.                 else
  5407.                 {
  5408.                     NewLateBinding.LateSet(sender, null, "Height", new object[]
  5409.                     {
  5410.                         this.hgt
  5411.                     }, null, null);
  5412.                     try
  5413.                     {
  5414.                         IEnumerator enumerator2 = ((IEnumerable)NewLateBinding.LateGet(sender, null, "Controls", new object[0], null, null, null)).GetEnumerator();
  5415.                         while (enumerator2.MoveNext())
  5416.                         {
  5417.                             Control control2 = (Control)enumerator2.Current;
  5418.                             control2.Visible = true;
  5419.                         }
  5420.                     }
  5421.                     finally
  5422.                     {
  5423.                         IEnumerator enumerator2 = this.Parent.Controls.GetEnumerator();
  5424.                         flag = (enumerator2 is IDisposable);
  5425.                         if (flag)
  5426.                         {
  5427.                             (enumerator2 as IDisposable).Dispose();
  5428.                         }
  5429.                     }
  5430.                 }
  5431.             }
  5432.         }
  5433.  
  5434.         // Token: 0x06000132 RID: 306 RVA: 0x00006AF0 File Offset: 0x00004EF0
  5435.         protected override void ColorHook()
  5436.         {
  5437.             this.border = this.GetPen("Border");
  5438.             this.headercolor = this.GetBrush("Header");
  5439.             this.textcolor = this.GetBrush("Text");
  5440.         }
  5441.  
  5442.         // Token: 0x06000133 RID: 307 RVA: 0x00006B28 File Offset: 0x00004F28
  5443.         protected override void PaintHook()
  5444.         {
  5445.             this.G.Clear(this.BackColor);
  5446.             Graphics arg_3A_0 = this.G;
  5447.             Pen arg_3A_1 = this.border;
  5448.             checked
  5449.             {
  5450.                 Rectangle rect = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
  5451.                 arg_3A_0.DrawRectangle(arg_3A_1, rect);
  5452.                 Graphics arg_71_0 = this.G;
  5453.                 Brush arg_71_1 = new SolidBrush(Color.FromArgb(40, 40, 40));
  5454.                 rect = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
  5455.                 arg_71_0.FillRectangle(arg_71_1, rect);
  5456.                 Graphics arg_A4_0 = this.G;
  5457.                 Brush arg_A4_1 = new SolidBrush(Color.FromArgb(40, 40, 40));
  5458.                 rect = new Rectangle(0, 0, this.Width, this.Height);
  5459.                 arg_A4_0.FillRectangle(arg_A4_1, rect);
  5460.                 this.G.DrawLine(Pens.Black, 0, 0, this.Width, 0);
  5461.                 this.DrawText(new SolidBrush(Color.FromArgb(87, 87, 87)), HorizontalAlignment.Left, 4, 0);
  5462.                 this.G.DrawLine(Pens.Black, 0, this.Height, this.Width, this.Height);
  5463.                 this.G.DrawLine(Pens.Black, 0, 24, this.Width, 24);
  5464.                 bool twIsCollapsable = this.twIsCollapsable;
  5465.                 if (twIsCollapsable)
  5466.                 {
  5467.                     try
  5468.                     {
  5469.                         IEnumerator enumerator = this.Controls.GetEnumerator();
  5470.                         while (enumerator.MoveNext())
  5471.                         {
  5472.                             Control control = (Control)enumerator.Current;
  5473.                             bool flag = !control.Visible;
  5474.                             if (flag)
  5475.                             {
  5476.                                 this.G.DrawString("v", this.Font, new SolidBrush(Color.FromArgb(87, 87, 87)), (float)(this.Width - 20), 6f);
  5477.                             }
  5478.                             else
  5479.                             {
  5480.                                 this.G.DrawString("^", this.Font, new SolidBrush(Color.FromArgb(87, 87, 87)), (float)(this.Width - 20), 8f);
  5481.                             }
  5482.                         }
  5483.                     }
  5484.                     finally
  5485.                     {
  5486.                         IEnumerator enumerator = this.Parent.Controls.GetEnumerator();
  5487.                         bool flag = enumerator is IDisposable;
  5488.                         if (flag)
  5489.                         {
  5490.                             (enumerator as IDisposable).Dispose();
  5491.                         }
  5492.                     }
  5493.                 }
  5494.             }
  5495.         }
  5496.  
  5497.         // Token: 0x0400006F RID: 111
  5498.         [CompilerGenerated]
  5499.         private bool _twIsCollapsable;
  5500.  
  5501.         // Token: 0x04000070 RID: 112
  5502.         private int hgt;
  5503.  
  5504.         // Token: 0x04000071 RID: 113
  5505.         private Pen border;
  5506.  
  5507.         // Token: 0x04000072 RID: 114
  5508.         private Brush headercolor;
  5509.  
  5510.         // Token: 0x04000073 RID: 115
  5511.         private Brush textcolor;
  5512.     }
  5513.     internal class TwitchColorSpace : ThemeContainer154
  5514.     {
  5515.         // Token: 0x06000174 RID: 372 RVA: 0x00008CBC File Offset: 0x000070BC
  5516.         public TwitchColorSpace()
  5517.         {
  5518.             this.ControlMode = true;
  5519.             this.BackColor = Color.White;
  5520.         }
  5521.  
  5522.         // Token: 0x06000175 RID: 373 RVA: 0x00008CE8 File Offset: 0x000070E8
  5523.         protected override void ColorHook()
  5524.         {
  5525.         }
  5526.  
  5527.         // Token: 0x06000176 RID: 374 RVA: 0x00008CEC File Offset: 0x000070EC
  5528.         protected override void PaintHook()
  5529.         {
  5530.             Graphics arg_29_0 = this.G;
  5531.             Brush arg_29_1 = new SolidBrush(this.BackColor);
  5532.             Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
  5533.             arg_29_0.FillRectangle(arg_29_1, rect);
  5534.         }
  5535.     }
  5536.     internal class TwitchGroupBox : ThemeContainer154
  5537.     {
  5538.         // Token: 0x0600015A RID: 346 RVA: 0x0000854C File Offset: 0x0000694C
  5539.         public TwitchGroupBox()
  5540.         {
  5541.             this.ControlMode = true;
  5542.             this.Cursor = Cursors.Default;
  5543.             Size size = new Size(129, 23);
  5544.             this.Size = size;
  5545.         }
  5546.  
  5547.         // Token: 0x0600015B RID: 347 RVA: 0x00008590 File Offset: 0x00006990
  5548.         protected override void ColorHook()
  5549.         {
  5550.         }
  5551.  
  5552.         // Token: 0x0600015C RID: 348 RVA: 0x00008594 File Offset: 0x00006994
  5553.         protected override void PaintHook()
  5554.         {
  5555.             this.G.Clear(this.BackColor);
  5556.             Graphics arg_40_0 = this.G;
  5557.             Brush arg_40_1 = new SolidBrush(Color.FromArgb(40, 40, 40));
  5558.             Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
  5559.             arg_40_0.FillRectangle(arg_40_1, rect);
  5560.             Graphics arg_6F_0 = this.G;
  5561.             Brush arg_6F_1 = new SolidBrush(Color.FromArgb(25, 25, 25));
  5562.             rect = new Rectangle(0, 0, this.Width, 24);
  5563.             arg_6F_0.FillRectangle(arg_6F_1, rect);
  5564.             this.G.DrawLine(Pens.Black, 0, 24, this.Width, 24);
  5565.             Graphics arg_B7_0 = this.G;
  5566.             Pen arg_B7_1 = Pens.Black;
  5567.             rect = checked(new Rectangle(0, 0, this.Width - 1, this.Height - 1));
  5568.             arg_B7_0.DrawRectangle(arg_B7_1, rect);
  5569.             this.DrawText(Brushes.White, HorizontalAlignment.Center, 0, 0);
  5570.         }
  5571.     }
  5572.     internal class TwitchLabel : Label
  5573.     {
  5574.         // Token: 0x0600017B RID: 379 RVA: 0x00009130 File Offset: 0x00007530
  5575.         private static void __ENCAddToList(object value)
  5576.         {
  5577.             List<WeakReference> _ENCList = TwitchLabel.__ENCList;
  5578.             checked
  5579.             {
  5580.                 lock (_ENCList)
  5581.                 {
  5582.                     bool flag = TwitchLabel.__ENCList.Count == TwitchLabel.__ENCList.Capacity;
  5583.                     if (flag)
  5584.                     {
  5585.                         int num = 0;
  5586.                         int arg_3F_0 = 0;
  5587.                         int num2 = TwitchLabel.__ENCList.Count - 1;
  5588.                         int num3 = arg_3F_0;
  5589.                         while (true)
  5590.                         {
  5591.                             int arg_90_0 = num3;
  5592.                             int num4 = num2;
  5593.                             if (arg_90_0 > num4)
  5594.                             {
  5595.                                 break;
  5596.                             }
  5597.                             WeakReference weakReference = TwitchLabel.__ENCList[num3];
  5598.                             flag = weakReference.IsAlive;
  5599.                             if (flag)
  5600.                             {
  5601.                                 bool flag2 = num3 != num;
  5602.                                 if (flag2)
  5603.                                 {
  5604.                                     TwitchLabel.__ENCList[num] = TwitchLabel.__ENCList[num3];
  5605.                                 }
  5606.                                 num++;
  5607.                             }
  5608.                             num3++;
  5609.                         }
  5610.                         TwitchLabel.__ENCList.RemoveRange(num, TwitchLabel.__ENCList.Count - num);
  5611.                         TwitchLabel.__ENCList.Capacity = TwitchLabel.__ENCList.Count;
  5612.                     }
  5613.                     TwitchLabel.__ENCList.Add(new WeakReference(RuntimeHelpers.GetObjectValue(value)));
  5614.                 }
  5615.             }
  5616.         }
  5617.  
  5618.         public TwitchLabel()
  5619.         {
  5620.             TwitchLabel.__ENCAddToList(this);
  5621.             this.BackColor = Color.Transparent;
  5622.             this.ForeColor = Color.FromArgb(153, 153, 153);
  5623.         }
  5624.  
  5625.         private static List<WeakReference> __ENCList = new List<WeakReference>();
  5626.     }
  5627.     public class TwitchProgressBar : Control
  5628.     {
  5629.         // Token: 0x06000188 RID: 392 RVA: 0x0000978C File Offset: 0x00007B8C
  5630.         private static void __ENCAddToList(object value)
  5631.         {
  5632.             List<WeakReference> _ENCList = TwitchProgressBar.__ENCList;
  5633.             checked
  5634.             {
  5635.                 lock (_ENCList)
  5636.                 {
  5637.                     bool flag = TwitchProgressBar.__ENCList.Count == TwitchProgressBar.__ENCList.Capacity;
  5638.                     if (flag)
  5639.                     {
  5640.                         int num = 0;
  5641.                         int arg_3F_0 = 0;
  5642.                         int num2 = TwitchProgressBar.__ENCList.Count - 1;
  5643.                         int num3 = arg_3F_0;
  5644.                         while (true)
  5645.                         {
  5646.                             int arg_90_0 = num3;
  5647.                             int num4 = num2;
  5648.                             if (arg_90_0 > num4)
  5649.                             {
  5650.                                 break;
  5651.                             }
  5652.                             WeakReference weakReference = TwitchProgressBar.__ENCList[num3];
  5653.                             flag = weakReference.IsAlive;
  5654.                             if (flag)
  5655.                             {
  5656.                                 bool flag2 = num3 != num;
  5657.                                 if (flag2)
  5658.                                 {
  5659.                                     TwitchProgressBar.__ENCList[num] = TwitchProgressBar.__ENCList[num3];
  5660.                                 }
  5661.                                 num++;
  5662.                             }
  5663.                             num3++;
  5664.                         }
  5665.                         TwitchProgressBar.__ENCList.RemoveRange(num, TwitchProgressBar.__ENCList.Count - num);
  5666.                         TwitchProgressBar.__ENCList.Capacity = TwitchProgressBar.__ENCList.Count;
  5667.                     }
  5668.                     TwitchProgressBar.__ENCList.Add(new WeakReference(RuntimeHelpers.GetObjectValue(value)));
  5669.                 }
  5670.             }
  5671.         }
  5672.  
  5673.         // Token: 0x1700004C RID: 76
  5674.         // (get) Token: 0x06000189 RID: 393 RVA: 0x00009890 File Offset: 0x00007C90
  5675.         // (set) Token: 0x0600018A RID: 394 RVA: 0x000098A8 File Offset: 0x00007CA8
  5676.         public int Value
  5677.         {
  5678.             get
  5679.             {
  5680.                 return this._Value;
  5681.             }
  5682.             set
  5683.             {
  5684.                 bool flag = value > this._Maximum || value < this._Minimum;
  5685.                 if (flag)
  5686.                 {
  5687.                     throw new Exception("Property value is not valid.");
  5688.                 }
  5689.                 this._Value = value;
  5690.                 this.Invalidate();
  5691.             }
  5692.         }
  5693.  
  5694.         // Token: 0x1700004D RID: 77
  5695.         // (get) Token: 0x0600018B RID: 395 RVA: 0x000098EC File Offset: 0x00007CEC
  5696.         // (set) Token: 0x0600018C RID: 396 RVA: 0x00009904 File Offset: 0x00007D04
  5697.         public int Minimum
  5698.         {
  5699.             get
  5700.             {
  5701.                 return this._Minimum;
  5702.             }
  5703.             set
  5704.             {
  5705.                 bool flag = value < 0;
  5706.                 if (flag)
  5707.                 {
  5708.                     throw new Exception("Property value is not valid.");
  5709.                 }
  5710.                 this._Minimum = value;
  5711.                 flag = (value > this._Value);
  5712.                 if (flag)
  5713.                 {
  5714.                     this._Value = value;
  5715.                 }
  5716.                 flag = (value > this._Maximum);
  5717.                 if (flag)
  5718.                 {
  5719.                     this._Maximum = value;
  5720.                 }
  5721.                 this.Invalidate();
  5722.             }
  5723.         }
  5724.  
  5725.         // Token: 0x1700004E RID: 78
  5726.         // (get) Token: 0x0600018D RID: 397 RVA: 0x00009960 File Offset: 0x00007D60
  5727.         // (set) Token: 0x0600018E RID: 398 RVA: 0x00009978 File Offset: 0x00007D78
  5728.         public int Maximum
  5729.         {
  5730.             get
  5731.             {
  5732.                 return this._Maximum;
  5733.             }
  5734.             set
  5735.             {
  5736.                 bool flag = value < 0;
  5737.                 if (flag)
  5738.                 {
  5739.                     throw new Exception("Property value is not valid.");
  5740.                 }
  5741.                 this._Maximum = value;
  5742.                 flag = (value < this._Value);
  5743.                 if (flag)
  5744.                 {
  5745.                     this._Value = value;
  5746.                 }
  5747.                 flag = (value < this._Minimum);
  5748.                 if (flag)
  5749.                 {
  5750.                     this._Minimum = value;
  5751.                 }
  5752.                 this.Invalidate();
  5753.             }
  5754.         }
  5755.  
  5756.         // Token: 0x0600018F RID: 399 RVA: 0x000099D4 File Offset: 0x00007DD4
  5757.         public void Increment(int amount)
  5758.         {
  5759.             checked
  5760.             {
  5761.                 this.Value += amount;
  5762.             }
  5763.         }
  5764.  
  5765.         // Token: 0x06000190 RID: 400 RVA: 0x000099E8 File Offset: 0x00007DE8
  5766.         public TwitchProgressBar()
  5767.         {
  5768.             TwitchProgressBar.__ENCAddToList(this);
  5769.             this._Value = 0;
  5770.             this._Minimum = 0;
  5771.             this._Maximum = 100;
  5772.             Size size = new Size(309, 10);
  5773.             this.Size = size;
  5774.             this.BackColor = Color.FromArgb(51, 51, 51);
  5775.         }
  5776.  
  5777.         // Token: 0x06000191 RID: 401 RVA: 0x00009A44 File Offset: 0x00007E44
  5778.         protected override void OnPaint(PaintEventArgs e)
  5779.         {
  5780.             Bitmap bitmap = new Bitmap(this.Width, this.Height);
  5781.             Graphics graphics = Graphics.FromImage(bitmap);
  5782.             graphics.SmoothingMode = SmoothingMode.HighQuality;
  5783.             checked
  5784.             {
  5785.                 int num = (int)Math.Round(unchecked(checked((double)(this._Value - this._Minimum) / (double)(this._Maximum - this._Minimum)) * (double)this.Width));
  5786.                 base.OnPaint(e);
  5787.                 graphics.Clear(this.BackColor);
  5788.                 Graphics arg_93_0 = graphics;
  5789.                 Brush arg_93_1 = new SolidBrush(Color.FromArgb(185, 155, 235));
  5790.                 Rectangle rect = new Rectangle(0, 0, num - 1, this.Height - 1);
  5791.                 arg_93_0.FillRectangle(arg_93_1, rect);
  5792.                 Graphics arg_AC_0 = e.Graphics;
  5793.                 Image arg_AC_1 = bitmap;
  5794.                 Point point = new Point(0, 0);
  5795.                 arg_AC_0.DrawImage(arg_AC_1, point);
  5796.                 graphics.Dispose();
  5797.                 bitmap.Dispose();
  5798.             }
  5799.         }
  5800.  
  5801.        
  5802.         private static List<WeakReference> __ENCList = new List<WeakReference>();
  5803.  
  5804.        
  5805.         private int _Value;
  5806.  
  5807.        
  5808.         private int _Minimum;
  5809.  
  5810.        
  5811.         private int _Maximum;
  5812.     }
  5813. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement