Alex-Trader

Untitled

Jul 26th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using Microsoft.VisualBasic;
  2. using Microsoft.VisualBasic.CompilerServices;
  3. using System;
  4. using System.Collections;
  5. using System.ComponentModel;
  6. using System.Diagnostics;
  7. using System.Drawing;
  8. using System.Drawing.Drawing2D;
  9. using System.Drawing.Text;
  10. using System.Globalization;
  11. using System.IO;
  12. using System.Runtime.CompilerServices;
  13. using System.Threading;
  14. using System.Windows.Forms;
  15.  
  16. // Xylos Theme.
  17. // Made by AeroRev9.
  18. // 9 Controls.
  19.  
  20. internal sealed class Helpers
  21. {
  22.     public enum RoundingStyle : byte
  23.     {
  24.         All,
  25.         Top,
  26.         Bottom,
  27.         Left,
  28.         Right,
  29.         TopRight,
  30.         BottomRight
  31.     }
  32.  
  33.     public static void CenterString(Graphics G, string T, Font F, Color C, Rectangle R)
  34.     {
  35.         SizeF sizeF = G.MeasureString(T, F);
  36.         using (SolidBrush solidBrush = new SolidBrush(C))
  37.         {
  38.             G.DrawString(T, F, solidBrush, checked(new Point((int)Math.Round(unchecked((double)R.Width / 2.0 - (double)(sizeF.Width / 2f))), (int)Math.Round(unchecked((double)R.Height / 2.0 - (double)(sizeF.Height / 2f))))));
  39.         }
  40.     }
  41.  
  42.     public static Color ColorFromHex(string Hex)
  43.     {
  44.         return Color.FromArgb(checked((int)long.Parse(string.Format("FFFFFFFFFF{0}", Hex.Substring(1)), NumberStyles.HexNumber)));
  45.     }
  46.  
  47.     public static Rectangle FullRectangle(Size S, bool Subtract)
  48.     {
  49.         Rectangle result;
  50.         if (Subtract)
  51.         {
  52.             result = checked(new Rectangle(0, 0, S.Width - 1, S.Height - 1));
  53.         }
  54.         else
  55.         {
  56.             result = new Rectangle(0, 0, S.Width, S.Height);
  57.         }
  58.         return result;
  59.     }
  60.  
  61.     public static GraphicsPath RoundRect(Rectangle Rect, int Rounding, Helpers.RoundingStyle Style = Helpers.RoundingStyle.All)
  62.     {
  63.         GraphicsPath graphicsPath = new GraphicsPath();
  64.         checked
  65.         {
  66.             int num = Rounding * 2;
  67.             graphicsPath.StartFigure();
  68.             bool flag = Rounding == 0;
  69.             GraphicsPath result;
  70.             if (flag)
  71.             {
  72.                 graphicsPath.AddRectangle(Rect);
  73.                 graphicsPath.CloseAllFigures();
  74.                 result = graphicsPath;
  75.             }
  76.             else
  77.             {
  78.                 switch (Style)
  79.                 {
  80.                     case Helpers.RoundingStyle.All:
  81.                         graphicsPath.AddArc(new Rectangle(Rect.X, Rect.Y, num, num), -180f, 90f);
  82.                         graphicsPath.AddArc(new Rectangle(Rect.Width - num + Rect.X, Rect.Y, num, num), -90f, 90f);
  83.                         graphicsPath.AddArc(new Rectangle(Rect.Width - num + Rect.X, Rect.Height - num + Rect.Y, num, num), 0f, 90f);
  84.                         graphicsPath.AddArc(new Rectangle(Rect.X, Rect.Height - num + Rect.Y, num, num), 90f, 90f);
  85.                         break;
  86.                     case Helpers.RoundingStyle.Top:
  87.                         graphicsPath.AddArc(new Rectangle(Rect.X, Rect.Y, num, num), -180f, 90f);
  88.                         graphicsPath.AddArc(new Rectangle(Rect.Width - num + Rect.X, Rect.Y, num, num), -90f, 90f);
  89.                         graphicsPath.AddLine(new Point(Rect.X + Rect.Width, Rect.Y + Rect.Height), new Point(Rect.X, Rect.Y + Rect.Height));
  90.                         break;
  91.                     case Helpers.RoundingStyle.Bottom:
  92.                         graphicsPath.AddLine(new Point(Rect.X, Rect.Y), new Point(Rect.X + Rect.Width, Rect.Y));
  93.                         graphicsPath.AddArc(new Rectangle(Rect.Width - num + Rect.X, Rect.Height - num + Rect.Y, num, num), 0f, 90f);
  94.                         graphicsPath.AddArc(new Rectangle(Rect.X, Rect.Height - num + Rect.Y, num, num), 90f, 90f);
  95.                         break;
  96.                     case Helpers.RoundingStyle.Left:
  97.                         graphicsPath.AddArc(new Rectangle(Rect.X, Rect.Y, num, num), -180f, 90f);
  98.                         graphicsPath.AddLine(new Point(Rect.X + Rect.Width, Rect.Y), new Point(Rect.X + Rect.Width, Rect.Y + Rect.Height));
  99.                         graphicsPath.AddArc(new Rectangle(Rect.X, Rect.Height - num + Rect.Y, num, num), 90f, 90f);
  100.                         break;
  101.                     case Helpers.RoundingStyle.Right:
  102.                         graphicsPath.AddLine(new Point(Rect.X, Rect.Y + Rect.Height), new Point(Rect.X, Rect.Y));
  103.                         graphicsPath.AddArc(new Rectangle(Rect.Width - num + Rect.X, Rect.Y, num, num), -90f, 90f);
  104.                         graphicsPath.AddArc(new Rectangle(Rect.Width - num + Rect.X, Rect.Height - num + Rect.Y, num, num), 0f, 90f);
  105.                         break;
  106.                     case Helpers.RoundingStyle.TopRight:
  107.                         graphicsPath.AddLine(new Point(Rect.X, Rect.Y + 1), new Point(Rect.X, Rect.Y));
  108.                         graphicsPath.AddArc(new Rectangle(Rect.Width - num + Rect.X, Rect.Y, num, num), -90f, 90f);
  109.                         graphicsPath.AddLine(new Point(Rect.X + Rect.Width, Rect.Y + Rect.Height - 1), new Point(Rect.X + Rect.Width, Rect.Y + Rect.Height));
  110.                         graphicsPath.AddLine(new Point(Rect.X + 1, Rect.Y + Rect.Height), new Point(Rect.X, Rect.Y + Rect.Height));
  111.                         break;
  112.                     case Helpers.RoundingStyle.BottomRight:
  113.                         graphicsPath.AddLine(new Point(Rect.X, Rect.Y + 1), new Point(Rect.X, Rect.Y));
  114.                         graphicsPath.AddLine(new Point(Rect.X + Rect.Width - 1, Rect.Y), new Point(Rect.X + Rect.Width, Rect.Y));
  115.                         graphicsPath.AddArc(new Rectangle(Rect.Width - num + Rect.X, Rect.Height - num + Rect.Y, num, num), 0f, 90f);
  116.                         graphicsPath.AddLine(new Point(Rect.X + 1, Rect.Y + Rect.Height), new Point(Rect.X, Rect.Y + Rect.Height));
  117.                         break;
  118.                 }
  119.                 graphicsPath.CloseAllFigures();
  120.                 result = graphicsPath;
  121.             }
  122.             return result;
  123.         }
  124.     }
  125. }
  126. public class XylosTabControl : TabControl
  127. {
  128.     private Graphics G;
  129.  
  130.     private Rectangle Rect;
  131.  
  132.     private int _OverIndex;
  133.    
  134.     private bool _FirstHeaderBorder;
  135.  
  136.     public bool FirstHeaderBorder
  137.     {
  138.         get;
  139.         set;
  140.     }
  141.  
  142.     private int OverIndex
  143.     {
  144.         get
  145.         {
  146.             return this._OverIndex;
  147.         }
  148.         set
  149.         {
  150.             this._OverIndex = value;
  151.             base.Invalidate();
  152.         }
  153.     }
  154.  
  155.     public XylosTabControl()
  156.     {
  157.         this._OverIndex = -1;
  158.         this.DoubleBuffered = true;
  159.         base.Alignment = TabAlignment.Left;
  160.         base.SizeMode = TabSizeMode.Fixed;
  161.         base.ItemSize = new Size(40, 180);
  162.     }
  163.  
  164.     protected override void OnCreateControl()
  165.     {
  166.         base.OnCreateControl();
  167.         base.SetStyle(ControlStyles.UserPaint, true);
  168.     }
  169.  
  170.     protected override void OnControlAdded(ControlEventArgs e)
  171.     {
  172.         base.OnControlAdded(e);
  173.         e.Control.BackColor = Color.White;
  174.         e.Control.ForeColor = Helpers.ColorFromHex("#7C858E");
  175.         e.Control.Font = new Font("Segoe UI", 9f);
  176.     }
  177.  
  178.     protected override void OnPaint(PaintEventArgs e)
  179.     {
  180.         this.G = e.Graphics;
  181.         this.G.SmoothingMode = SmoothingMode.HighQuality;
  182.         this.G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
  183.         base.OnPaint(e);
  184.         this.G.Clear(Helpers.ColorFromHex("#33373B"));
  185.         checked
  186.         {
  187.             int num = base.TabPages.Count - 1;
  188.             for (int i = 0; i <= num; i++)
  189.             {
  190.                 this.Rect = base.GetTabRect(i);
  191.                 bool flag = string.IsNullOrEmpty(Conversions.ToString(base.TabPages[i].Tag));
  192.                 if (flag)
  193.                 {
  194.                     bool flag2 = base.SelectedIndex == i;
  195.                     if (flag2)
  196.                     {
  197.                         using (SolidBrush solidBrush = new SolidBrush(Helpers.ColorFromHex("#2B2F33")))
  198.                         {
  199.                             using (SolidBrush solidBrush2 = new SolidBrush(Helpers.ColorFromHex("#BECCD9")))
  200.                             {
  201.                                 using (Font font = new Font("Segoe UI semibold", 9f))
  202.                                 {
  203.                                     this.G.FillRectangle(solidBrush, new Rectangle(this.Rect.X - 5, this.Rect.Y + 1, this.Rect.Width + 7, this.Rect.Height));
  204.                                     this.G.DrawString(base.TabPages[i].Text, font, solidBrush2, new Point(this.Rect.X + 50 + (base.ItemSize.Height - 180), this.Rect.Y + 12));
  205.                                 }
  206.                             }
  207.                         }
  208.                     }
  209.                     else
  210.                     {
  211.                         using (SolidBrush solidBrush3 = new SolidBrush(Helpers.ColorFromHex("#919BA6")))
  212.                         {
  213.                             using (Font font2 = new Font("Segoe UI semibold", 9f))
  214.                             {
  215.                                 this.G.DrawString(base.TabPages[i].Text, font2, solidBrush3, new Point(this.Rect.X + 50 + (base.ItemSize.Height - 180), this.Rect.Y + 12));
  216.                             }
  217.                         }
  218.                     }
  219.                     bool flag3 = this.OverIndex != -1 & base.SelectedIndex != this.OverIndex;
  220.                     if (flag3)
  221.                     {
  222.                         using (SolidBrush solidBrush4 = new SolidBrush(Helpers.ColorFromHex("#2F3338")))
  223.                         {
  224.                             using (SolidBrush solidBrush5 = new SolidBrush(Helpers.ColorFromHex("#919BA6")))
  225.                             {
  226.                                 using (Font font3 = new Font("Segoe UI semibold", 9f))
  227.                                 {
  228.                                     this.G.FillRectangle(solidBrush4, new Rectangle(base.GetTabRect(this.OverIndex).X - 5, base.GetTabRect(this.OverIndex).Y + 1, base.GetTabRect(this.OverIndex).Width + 7, base.GetTabRect(this.OverIndex).Height));
  229.                                     this.G.DrawString(base.TabPages[this.OverIndex].Text, font3, solidBrush5, new Point(base.GetTabRect(this.OverIndex).X + 50 + (base.ItemSize.Height - 180), base.GetTabRect(this.OverIndex).Y + 12));
  230.                                 }
  231.                             }
  232.                         }
  233.                         bool flag4 = !Information.IsNothing(base.ImageList);
  234.                         if (flag4)
  235.                         {
  236.                             bool flag5 = base.TabPages[this.OverIndex].ImageIndex >= 0;
  237.                             if (flag5)
  238.                             {
  239.                                 this.G.DrawImage(base.ImageList.Images[base.TabPages[this.OverIndex].ImageIndex], new Rectangle(base.GetTabRect(this.OverIndex).X + 25 + (base.ItemSize.Height - 180), (int)Math.Round(unchecked((double)base.GetTabRect(this.OverIndex).Y + ((double)base.GetTabRect(this.OverIndex).Height / 2.0 - 9.0))), 16, 16));
  240.                             }
  241.                         }
  242.                     }
  243.                     bool flag6 = !Information.IsNothing(base.ImageList);
  244.                     if (flag6)
  245.                     {
  246.                         bool flag7 = base.TabPages[i].ImageIndex >= 0;
  247.                         if (flag7)
  248.                         {
  249.                             this.G.DrawImage(base.ImageList.Images[base.TabPages[i].ImageIndex], new Rectangle(this.Rect.X + 25 + (base.ItemSize.Height - 180), (int)Math.Round(unchecked((double)this.Rect.Y + ((double)this.Rect.Height / 2.0 - 9.0))), 16, 16));
  250.                         }
  251.                     }
  252.                 }
  253.                 else
  254.                 {
  255.                     using (SolidBrush solidBrush6 = new SolidBrush(Helpers.ColorFromHex("#6A7279")))
  256.                     {
  257.                         using (Font font4 = new Font("Segoe UI", 7f, FontStyle.Bold))
  258.                         {
  259.                             using (Pen pen = new Pen(Helpers.ColorFromHex("#2B2F33")))
  260.                             {
  261.                                 bool firstHeaderBorder = this.FirstHeaderBorder;
  262.                                 if (firstHeaderBorder)
  263.                                 {
  264.                                     this.G.DrawLine(pen, new Point(this.Rect.X - 5, this.Rect.Y + 1), new Point(this.Rect.Width + 7, this.Rect.Y + 1));
  265.                                 }
  266.                                 else
  267.                                 {
  268.                                     bool flag8 = i != 0;
  269.                                     if (flag8)
  270.                                     {
  271.                                         this.G.DrawLine(pen, new Point(this.Rect.X - 5, this.Rect.Y + 1), new Point(this.Rect.Width + 7, this.Rect.Y + 1));
  272.                                     }
  273.                                 }
  274.                                 this.G.DrawString(base.TabPages[i].Text.ToUpper(), font4, solidBrush6, new Point(this.Rect.X + 25 + (base.ItemSize.Height - 180), this.Rect.Y + 16));
  275.                             }
  276.                         }
  277.                     }
  278.                 }
  279.             }
  280.         }
  281.     }
  282.  
  283.     protected override void OnSelecting(TabControlCancelEventArgs e)
  284.     {
  285.         base.OnSelecting(e);
  286.         bool flag = !Information.IsNothing(e.TabPage);
  287.         if (flag)
  288.         {
  289.             bool flag2 = !string.IsNullOrEmpty(Conversions.ToString(e.TabPage.Tag));
  290.             if (flag2)
  291.             {
  292.                 e.Cancel = true;
  293.             }
  294.             else
  295.             {
  296.                 this.OverIndex = -1;
  297.             }
  298.         }
  299.     }
  300.  
  301.     protected override void OnMouseMove(MouseEventArgs e)
  302.     {
  303.         base.OnMouseMove(e);
  304.         checked
  305.         {
  306.             int num = base.TabPages.Count - 1;
  307.             for (int i = 0; i <= num; i++)
  308.             {
  309.                 bool flag = base.GetTabRect(i).Contains(e.Location) & base.SelectedIndex != i & string.IsNullOrEmpty(Conversions.ToString(base.TabPages[i].Tag));
  310.                 if (flag)
  311.                 {
  312.                     this.OverIndex = i;
  313.                     break;
  314.                 }
  315.                 this.OverIndex = -1;
  316.             }
  317.         }
  318.     }
  319.  
  320.     protected override void OnMouseLeave(EventArgs e)
  321.     {
  322.         base.OnMouseLeave(e);
  323.         this.OverIndex = -1;
  324.     }
  325. }
  326. [DefaultEvent("TextChanged")]
  327. public class XylosTextBox : Control
  328. {
  329.     public enum MouseState : byte
  330.     {
  331.         None,
  332.         Over,
  333.         Down
  334.     }
  335.  
  336.     [DebuggerBrowsable(DebuggerBrowsableState.Never), AccessedThroughProperty("TB"), CompilerGenerated]
  337.     private TextBox _TB;
  338.  
  339.     private Graphics G;
  340.  
  341.     private XylosTextBox.MouseState State;
  342.  
  343.     private bool IsDown;
  344.  
  345.     private bool _EnabledCalc;
  346.  
  347.     private bool _allowpassword;
  348.  
  349.     private int _maxChars;
  350.  
  351.     private HorizontalAlignment _textAlignment;
  352.  
  353.     private bool _multiLine;
  354.  
  355.     private bool _readOnly;
  356.  
  357.     public virtual TextBox TB
  358.     {
  359.         [CompilerGenerated]
  360.         get
  361.         {
  362.             return this._TB;
  363.         }
  364.         [CompilerGenerated]
  365.         [MethodImpl(MethodImplOptions.Synchronized)]
  366.         set
  367.         {
  368.             EventHandler value2 = delegate (object a0, EventArgs a1)
  369.             {
  370.                 this.TextChangeTb();
  371.             };
  372.             TextBox tB = this._TB;
  373.             if (tB != null)
  374.             {
  375.                 tB.TextChanged -= value2;
  376.             }
  377.             this._TB = value;
  378.             tB = this._TB;
  379.             if (tB != null)
  380.             {
  381.                 tB.TextChanged += value2;
  382.             }
  383.         }
  384.     }
  385.  
  386.     public new bool Enabled
  387.     {
  388.         get
  389.         {
  390.             return this.EnabledCalc;
  391.         }
  392.         set
  393.         {
  394.             this.TB.Enabled = value;
  395.             this._EnabledCalc = value;
  396.             base.Invalidate();
  397.         }
  398.     }
  399.  
  400.     [DisplayName("Enabled")]
  401.     public bool EnabledCalc
  402.     {
  403.         get
  404.         {
  405.             return this._EnabledCalc;
  406.         }
  407.         set
  408.         {
  409.             this.Enabled = value;
  410.             base.Invalidate();
  411.         }
  412.     }
  413.  
  414.     public bool UseSystemPasswordChar
  415.     {
  416.         get
  417.         {
  418.             return this._allowpassword;
  419.         }
  420.         set
  421.         {
  422.             this.TB.UseSystemPasswordChar = this.UseSystemPasswordChar;
  423.             this._allowpassword = value;
  424.             base.Invalidate();
  425.         }
  426.     }
  427.  
  428.     public int MaxLength
  429.     {
  430.         get
  431.         {
  432.             return this._maxChars;
  433.         }
  434.         set
  435.         {
  436.             this._maxChars = value;
  437.             this.TB.MaxLength = this.MaxLength;
  438.             base.Invalidate();
  439.         }
  440.     }
  441.  
  442.     public HorizontalAlignment TextAlign
  443.     {
  444.         get
  445.         {
  446.             return this._textAlignment;
  447.         }
  448.         set
  449.         {
  450.             this._textAlignment = value;
  451.             base.Invalidate();
  452.         }
  453.     }
  454.  
  455.     public bool MultiLine
  456.     {
  457.         get
  458.         {
  459.             return this._multiLine;
  460.         }
  461.         set
  462.         {
  463.             this._multiLine = value;
  464.             this.TB.Multiline = value;
  465.             this.OnResize(EventArgs.Empty);
  466.             base.Invalidate();
  467.         }
  468.     }
  469.  
  470.     public bool ReadOnly
  471.     {
  472.         get
  473.         {
  474.             return this._readOnly;
  475.         }
  476.         set
  477.         {
  478.             this._readOnly = value;
  479.             bool flag = this.TB != null;
  480.             if (flag)
  481.             {
  482.                 this.TB.ReadOnly = value;
  483.             }
  484.         }
  485.     }
  486.  
  487.     protected override void OnTextChanged(EventArgs e)
  488.     {
  489.         base.OnTextChanged(e);
  490.         base.Invalidate();
  491.     }
  492.  
  493.     protected override void OnBackColorChanged(EventArgs e)
  494.     {
  495.         base.OnBackColorChanged(e);
  496.         base.Invalidate();
  497.     }
  498.  
  499.     protected override void OnForeColorChanged(EventArgs e)
  500.     {
  501.         base.OnForeColorChanged(e);
  502.         this.TB.ForeColor = this.ForeColor;
  503.         base.Invalidate();
  504.     }
  505.  
  506.     protected override void OnFontChanged(EventArgs e)
  507.     {
  508.         base.OnFontChanged(e);
  509.         this.TB.Font = this.Font;
  510.     }
  511.  
  512.     protected override void OnGotFocus(EventArgs e)
  513.     {
  514.         base.OnGotFocus(e);
  515.         this.TB.Focus();
  516.     }
  517.  
  518.     private void TextChangeTb()
  519.     {
  520.         this.Text = this.TB.Text;
  521.     }
  522.  
  523.     private void TextChng()
  524.     {
  525.         this.TB.Text = this.Text;
  526.     }
  527.  
  528.     public void NewTextBox()
  529.     {
  530.         TextBox tB = this.TB;
  531.         tB.Text = string.Empty;
  532.         tB.BackColor = Color.White;
  533.         tB.ForeColor = Helpers.ColorFromHex("#7C858E");
  534.         tB.TextAlign = HorizontalAlignment.Left;
  535.         tB.BorderStyle = BorderStyle.None;
  536.         tB.Location = new Point(3, 3);
  537.         tB.Font = new Font("Segoe UI", 9f);
  538.         tB.Size = checked(new Size(base.Width - 3, base.Height - 3));
  539.         tB.UseSystemPasswordChar = this.UseSystemPasswordChar;
  540.     }
  541.  
  542.     public XylosTextBox()
  543.     {
  544.         base.TextChanged += delegate (object a0, EventArgs a1)
  545.         {
  546.             this.TextChng();
  547.         };
  548.         this.TB = new TextBox();
  549.         this._allowpassword = false;
  550.         this._maxChars = 32767;
  551.         this._multiLine = false;
  552.         this._readOnly = false;
  553.         this.NewTextBox();
  554.         base.Controls.Add(this.TB);
  555.         base.SetStyle(ControlStyles.UserPaint | ControlStyles.SupportsTransparentBackColor, true);
  556.         this.DoubleBuffered = true;
  557.         this.TextAlign = HorizontalAlignment.Left;
  558.         this.ForeColor = Helpers.ColorFromHex("#7C858E");
  559.         this.Font = new Font("Segoe UI", 9f);
  560.         base.Size = new Size(130, 29);
  561.         this.Enabled = true;
  562.     }
  563.  
  564.     protected override void OnPaint(PaintEventArgs e)
  565.     {
  566.         this.G = e.Graphics;
  567.         this.G.SmoothingMode = SmoothingMode.HighQuality;
  568.         this.G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
  569.         base.OnPaint(e);
  570.         this.G.Clear(Color.White);
  571.         bool enabled = this.Enabled;
  572.         if (enabled)
  573.         {
  574.             this.TB.ForeColor = Helpers.ColorFromHex("#7C858E");
  575.             bool flag = this.State == XylosTextBox.MouseState.Down;
  576.             if (flag)
  577.             {
  578.                 using (Pen pen = new Pen(Helpers.ColorFromHex("#78B7E6")))
  579.                 {
  580.                     this.G.DrawPath(pen, Helpers.RoundRect(Helpers.FullRectangle(base.Size, true), 12, Helpers.RoundingStyle.All));
  581.                 }
  582.             }
  583.             else
  584.             {
  585.                 using (Pen pen2 = new Pen(Helpers.ColorFromHex("#D0D5D9")))
  586.                 {
  587.                     this.G.DrawPath(pen2, Helpers.RoundRect(Helpers.FullRectangle(base.Size, true), 12, Helpers.RoundingStyle.All));
  588.                 }
  589.             }
  590.         }
  591.         else
  592.         {
  593.             this.TB.ForeColor = Helpers.ColorFromHex("#7C858E");
  594.             using (Pen pen3 = new Pen(Helpers.ColorFromHex("#E1E1E2")))
  595.             {
  596.                 this.G.DrawPath(pen3, Helpers.RoundRect(Helpers.FullRectangle(base.Size, true), 12, Helpers.RoundingStyle.All));
  597.             }
  598.         }
  599.         this.TB.TextAlign = this.TextAlign;
  600.         this.TB.UseSystemPasswordChar = this.UseSystemPasswordChar;
  601.     }
  602.  
  603.     protected override void OnResize(EventArgs e)
  604.     {
  605.         base.OnResize(e);
  606.         bool flag = !this.MultiLine;
  607.         checked
  608.         {
  609.             if (flag)
  610.             {
  611.                 int height = this.TB.Height;
  612.                 this.TB.Location = new Point(10, (int)Math.Round(unchecked((double)base.Height / 2.0 - (double)height / 2.0 - 0.0)));
  613.                 this.TB.Size = new Size(base.Width - 20, height);
  614.             }
  615.             else
  616.             {
  617.                 this.TB.Location = new Point(10, 10);
  618.                 this.TB.Size = new Size(base.Width - 20, base.Height - 20);
  619.             }
  620.         }
  621.     }
  622.  
  623.     protected override void OnEnter(EventArgs e)
  624.     {
  625.         base.OnEnter(e);
  626.         this.State = XylosTextBox.MouseState.Down;
  627.         base.Invalidate();
  628.     }
  629.  
  630.     protected override void OnLeave(EventArgs e)
  631.     {
  632.         base.OnLeave(e);
  633.         this.State = XylosTextBox.MouseState.None;
  634.         base.Invalidate();
  635.     }
  636.     }
  637. public class XylosButton : Control
  638. {
  639.     public enum MouseState : byte
  640.     {
  641.         None,
  642.         Over,
  643.         Down
  644.     }
  645.  
  646.     public delegate void ClickEventHandler(object sender, EventArgs e);
  647.  
  648.     private Graphics G;
  649.  
  650.     private XylosButton.MouseState State;
  651.  
  652.     private bool _EnabledCalc;
  653.  
  654.     [DebuggerBrowsable(DebuggerBrowsableState.Never), CompilerGenerated]
  655.     private XylosButton.ClickEventHandler ClickEvent;
  656.  
  657.     public new event XylosButton.ClickEventHandler Click
  658.     {
  659.         [CompilerGenerated]
  660.         add
  661.         {
  662.             XylosButton.ClickEventHandler clickEventHandler = this.ClickEvent;
  663.             XylosButton.ClickEventHandler clickEventHandler2;
  664.             do
  665.             {
  666.                 clickEventHandler2 = clickEventHandler;
  667.                 XylosButton.ClickEventHandler value2 = (XylosButton.ClickEventHandler)Delegate.Combine(clickEventHandler2, value);
  668.                 clickEventHandler = Interlocked.CompareExchange<XylosButton.ClickEventHandler>(ref this.ClickEvent, value2, clickEventHandler2);
  669.             }
  670.             while (clickEventHandler != clickEventHandler2);
  671.         }
  672.         [CompilerGenerated]
  673.         remove
  674.         {
  675.             XylosButton.ClickEventHandler clickEventHandler = this.ClickEvent;
  676.             XylosButton.ClickEventHandler clickEventHandler2;
  677.             do
  678.             {
  679.                 clickEventHandler2 = clickEventHandler;
  680.                 XylosButton.ClickEventHandler value2 = (XylosButton.ClickEventHandler)Delegate.Remove(clickEventHandler2, value);
  681.                 clickEventHandler = Interlocked.CompareExchange<XylosButton.ClickEventHandler>(ref this.ClickEvent, value2, clickEventHandler2);
  682.             }
  683.             while (clickEventHandler != clickEventHandler2);
  684.         }
  685.     }
  686.  
  687.     public new bool Enabled
  688.     {
  689.         get
  690.         {
  691.             return this.EnabledCalc;
  692.         }
  693.         set
  694.         {
  695.             this._EnabledCalc = value;
  696.             base.Invalidate();
  697.         }
  698.     }
  699.  
  700.     [DisplayName("Enabled")]
  701.     public bool EnabledCalc
  702.     {
  703.         get
  704.         {
  705.             return this._EnabledCalc;
  706.         }
  707.         set
  708.         {
  709.             this.Enabled = value;
  710.             base.Invalidate();
  711.         }
  712.     }
  713.  
  714.     public XylosButton()
  715.     {
  716.         this.DoubleBuffered = true;
  717.         this.Enabled = true;
  718.     }
  719.  
  720.     protected override void OnPaint(PaintEventArgs e)
  721.     {
  722.         this.G = e.Graphics;
  723.         this.G.SmoothingMode = SmoothingMode.HighQuality;
  724.         this.G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
  725.         base.OnPaint(e);
  726.         bool enabled = this.Enabled;
  727.         if (enabled)
  728.         {
  729.             XylosButton.MouseState state = this.State;
  730.             if (state != XylosButton.MouseState.Over)
  731.             {
  732.                 if (state != XylosButton.MouseState.Down)
  733.                 {
  734.                     using (SolidBrush solidBrush = new SolidBrush(Helpers.ColorFromHex("#F6F6F6")))
  735.                     {
  736.                         this.G.FillPath(solidBrush, Helpers.RoundRect(Helpers.FullRectangle(base.Size, true), 3, Helpers.RoundingStyle.All));
  737.                     }
  738.                 }
  739.                 else
  740.                 {
  741.                     using (SolidBrush solidBrush2 = new SolidBrush(Helpers.ColorFromHex("#F0F0F0")))
  742.                     {
  743.                         this.G.FillPath(solidBrush2, Helpers.RoundRect(Helpers.FullRectangle(base.Size, true), 3, Helpers.RoundingStyle.All));
  744.                     }
  745.                 }
  746.             }
  747.             else
  748.             {
  749.                 using (SolidBrush solidBrush3 = new SolidBrush(Helpers.ColorFromHex("#FDFDFD")))
  750.                 {
  751.                     this.G.FillPath(solidBrush3, Helpers.RoundRect(Helpers.FullRectangle(base.Size, true), 3, Helpers.RoundingStyle.All));
  752.                 }
  753.             }
  754.             using (Font font = new Font("Segoe UI", 9f))
  755.             {
  756.                 using (Pen pen = new Pen(Helpers.ColorFromHex("#C3C3C3")))
  757.                 {
  758.                     this.G.DrawPath(pen, Helpers.RoundRect(Helpers.FullRectangle(base.Size, true), 3, Helpers.RoundingStyle.All));
  759.                     Helpers.CenterString(this.G, this.Text, font, Helpers.ColorFromHex("#7C858E"), Helpers.FullRectangle(base.Size, false));
  760.                 }
  761.             }
  762.         }
  763.         else
  764.         {
  765.             using (SolidBrush solidBrush4 = new SolidBrush(Helpers.ColorFromHex("#F3F4F7")))
  766.             {
  767.                 using (Pen pen2 = new Pen(Helpers.ColorFromHex("#DCDCDC")))
  768.                 {
  769.                     using (Font font2 = new Font("Segoe UI", 9f))
  770.                     {
  771.                         this.G.FillPath(solidBrush4, Helpers.RoundRect(Helpers.FullRectangle(base.Size, true), 3, Helpers.RoundingStyle.All));
  772.                         this.G.DrawPath(pen2, Helpers.RoundRect(Helpers.FullRectangle(base.Size, true), 3, Helpers.RoundingStyle.All));
  773.                         Helpers.CenterString(this.G, this.Text, font2, Helpers.ColorFromHex("#D0D3D7"), Helpers.FullRectangle(base.Size, false));
  774.                     }
  775.                 }
  776.             }
  777.         }
  778.     }
  779.  
  780.     protected override void OnMouseEnter(EventArgs e)
  781.     {
  782.         base.OnMouseEnter(e);
  783.         this.State = XylosButton.MouseState.Over;
  784.         base.Invalidate();
  785.     }
  786.  
  787.     protected override void OnMouseLeave(EventArgs e)
  788.     {
  789.         base.OnMouseLeave(e);
  790.         this.State = XylosButton.MouseState.None;
  791.         base.Invalidate();
  792.     }
  793.  
  794.     protected override void OnMouseUp(MouseEventArgs e)
  795.     {
  796.         base.OnMouseUp(e);
  797.         bool enabled = this.Enabled;
  798.         if (enabled)
  799.         {
  800.             XylosButton.ClickEventHandler clickEvent = this.ClickEvent;
  801.             if (clickEvent != null)
  802.             {
  803.                 clickEvent(this, e);
  804.             }
  805.         }
  806.         this.State = XylosButton.MouseState.Over;
  807.         base.Invalidate();
  808.     }
  809.  
  810.     protected override void OnMouseDown(MouseEventArgs e)
  811.     {
  812.         base.OnMouseDown(e);
  813.         this.State = XylosButton.MouseState.Down;
  814.         base.Invalidate();
  815.     }
  816. }
  817. [DefaultEvent("CheckedChanged")]
  818. public class XylosCheckBox : Control
  819. {
  820.     public delegate void CheckedChangedEventHandler(object sender, EventArgs e);
  821.  
  822.     [DebuggerBrowsable(DebuggerBrowsableState.Never), CompilerGenerated]
  823.     private XylosCheckBox.CheckedChangedEventHandler CheckedChangedEvent;
  824.  
  825.     private bool _Checked;
  826.  
  827.     private bool _EnabledCalc;
  828.  
  829.     private Graphics G;
  830.  
  831.     private string B64Enabled;
  832.  
  833.     private string B64Disabled;
  834.  
  835.     public event XylosCheckBox.CheckedChangedEventHandler CheckedChanged
  836.     {
  837.         [CompilerGenerated]
  838.         add
  839.         {
  840.             XylosCheckBox.CheckedChangedEventHandler checkedChangedEventHandler = this.CheckedChangedEvent;
  841.             XylosCheckBox.CheckedChangedEventHandler checkedChangedEventHandler2;
  842.             do
  843.             {
  844.                 checkedChangedEventHandler2 = checkedChangedEventHandler;
  845.                 XylosCheckBox.CheckedChangedEventHandler value2 = (XylosCheckBox.CheckedChangedEventHandler)Delegate.Combine(checkedChangedEventHandler2, value);
  846.                 checkedChangedEventHandler = Interlocked.CompareExchange<XylosCheckBox.CheckedChangedEventHandler>(ref this.CheckedChangedEvent, value2, checkedChangedEventHandler2);
  847.             }
  848.             while (checkedChangedEventHandler != checkedChangedEventHandler2);
  849.         }
  850.         [CompilerGenerated]
  851.         remove
  852.         {
  853.             XylosCheckBox.CheckedChangedEventHandler checkedChangedEventHandler = this.CheckedChangedEvent;
  854.             XylosCheckBox.CheckedChangedEventHandler checkedChangedEventHandler2;
  855.             do
  856.             {
  857.                 checkedChangedEventHandler2 = checkedChangedEventHandler;
  858.                 XylosCheckBox.CheckedChangedEventHandler value2 = (XylosCheckBox.CheckedChangedEventHandler)Delegate.Remove(checkedChangedEventHandler2, value);
  859.                 checkedChangedEventHandler = Interlocked.CompareExchange<XylosCheckBox.CheckedChangedEventHandler>(ref this.CheckedChangedEvent, value2, checkedChangedEventHandler2);
  860.             }
  861.             while (checkedChangedEventHandler != checkedChangedEventHandler2);
  862.         }
  863.     }
  864.  
  865.     public bool Checked
  866.     {
  867.         get
  868.         {
  869.             return this._Checked;
  870.         }
  871.         set
  872.         {
  873.             this._Checked = value;
  874.             base.Invalidate();
  875.         }
  876.     }
  877.  
  878.     public new bool Enabled
  879.     {
  880.         get
  881.         {
  882.             return this.EnabledCalc;
  883.         }
  884.         set
  885.         {
  886.             this._EnabledCalc = value;
  887.             bool enabled = this.Enabled;
  888.             if (enabled)
  889.             {
  890.                 this.Cursor = Cursors.Hand;
  891.             }
  892.             else
  893.             {
  894.                 this.Cursor = Cursors.Default;
  895.             }
  896.             base.Invalidate();
  897.         }
  898.     }
  899.  
  900.     [DisplayName("Enabled")]
  901.     public bool EnabledCalc
  902.     {
  903.         get
  904.         {
  905.             return this._EnabledCalc;
  906.         }
  907.         set
  908.         {
  909.             this.Enabled = value;
  910.             base.Invalidate();
  911.         }
  912.     }
  913.  
  914.     public XylosCheckBox()
  915.     {
  916.         this.B64Enabled = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA00lEQVQ4T6WTwQ2CMBSG30/07Ci6gY7gxZoIiYADuAIrsIDpQQ/cHMERZBOuXHimDSWALYL01EO/L//724JmLszk6S+BCOIExFsmL50sEH4kAZxVciYuJgnacD16Plpgg8tFtYMILntQdSXiZ3aXqa1UF/yUsoDw4wKglQaZZPa4RW3JEKzO4RjEbyJaN1BL8gvWgsMp3ADeq0lRJ2FimLZNYWpmFbudUJdolXTLyG2wTmDODUiccEfgSDIIfwmMxAMStS+XHPZn7l/z6Ifk+nSzBR8zi2d9JmVXSgAAAABJRU5ErkJggg==";
  917.         this.B64Disabled = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA1UlEQVQ4T6WTzQ2CQBCF56EnLpaiXvUAJBRgB2oFtkALdEAJnoVEMIGzdEIFjNkFN4DLn+xpD/N9efMWQAsPFvL0lyBMUg8MiwzyZwuiJAuI6CyTMxezBC24EuSTBTp4xaaN6JWdqKQbge6udfB1pfbBjrMvEMZZAdCm3ilw7eO1KRmCxRyiOH0TsFUQs5KMwVLweKY7ALFKUZUTECD6qdquCxM7i9jNhLJEraQ5xZzrYJngO9crGYBbAm2SEfhHoCQGeeK+Ls1Ld+fuM0/+kPp+usWCD10idEOGa4QuAAAAAElFTkSuQmCC";
  918.         this.DoubleBuffered = true;
  919.         this.Enabled = true;
  920.     }
  921.  
  922.     protected override void OnPaint(PaintEventArgs e)
  923.     {
  924.         this.G = e.Graphics;
  925.         this.G.SmoothingMode = SmoothingMode.HighQuality;
  926.         this.G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
  927.         base.OnPaint(e);
  928.         this.G.Clear(Color.White);
  929.         bool enabled = this.Enabled;
  930.         if (enabled)
  931.         {
  932.             using (SolidBrush solidBrush = new SolidBrush(Helpers.ColorFromHex("#F3F4F7")))
  933.             {
  934.                 using (Pen pen = new Pen(Helpers.ColorFromHex("#D0D5D9")))
  935.                 {
  936.                     using (SolidBrush solidBrush2 = new SolidBrush(Helpers.ColorFromHex("#7C858E")))
  937.                     {
  938.                         using (Font font = new Font("Segoe UI", 9f))
  939.                         {
  940.                             this.G.FillPath(solidBrush, Helpers.RoundRect(new Rectangle(0, 0, 16, 16), 3, Helpers.RoundingStyle.All));
  941.                             this.G.DrawPath(pen, Helpers.RoundRect(new Rectangle(0, 0, 16, 16), 3, Helpers.RoundingStyle.All));
  942.                             this.G.DrawString(this.Text, font, solidBrush2, new Point(25, 0));
  943.                         }
  944.                     }
  945.                 }
  946.             }
  947.             bool @checked = this.Checked;
  948.             if (@checked)
  949.             {
  950.                 using (Image image = Image.FromStream(new MemoryStream(Convert.FromBase64String(this.B64Enabled))))
  951.                 {
  952.                     this.G.DrawImage(image, new Rectangle(3, 3, 11, 11));
  953.                 }
  954.             }
  955.         }
  956.         else
  957.         {
  958.             using (SolidBrush solidBrush3 = new SolidBrush(Helpers.ColorFromHex("#F5F5F8")))
  959.             {
  960.                 using (Pen pen2 = new Pen(Helpers.ColorFromHex("#E1E1E2")))
  961.                 {
  962.                     using (SolidBrush solidBrush4 = new SolidBrush(Helpers.ColorFromHex("#D0D3D7")))
  963.                     {
  964.                         using (Font font2 = new Font("Segoe UI", 9f))
  965.                         {
  966.                             this.G.FillPath(solidBrush3, Helpers.RoundRect(new Rectangle(0, 0, 16, 16), 3, Helpers.RoundingStyle.All));
  967.                             this.G.DrawPath(pen2, Helpers.RoundRect(new Rectangle(0, 0, 16, 16), 3, Helpers.RoundingStyle.All));
  968.                             this.G.DrawString(this.Text, font2, solidBrush4, new Point(25, 0));
  969.                         }
  970.                     }
  971.                 }
  972.             }
  973.             bool checked2 = this.Checked;
  974.             if (checked2)
  975.             {
  976.                 using (Image image2 = Image.FromStream(new MemoryStream(Convert.FromBase64String(this.B64Disabled))))
  977.                 {
  978.                     this.G.DrawImage(image2, new Rectangle(3, 3, 11, 11));
  979.                 }
  980.             }
  981.         }
  982.     }
  983.  
  984.     protected override void OnMouseUp(MouseEventArgs e)
  985.     {
  986.         base.OnMouseUp(e);
  987.         bool enabled = this.Enabled;
  988.         if (enabled)
  989.         {
  990.             this.Checked = !this.Checked;
  991.             XylosCheckBox.CheckedChangedEventHandler checkedChangedEvent = this.CheckedChangedEvent;
  992.             if (checkedChangedEvent != null)
  993.             {
  994.                 checkedChangedEvent(this, e);
  995.             }
  996.         }
  997.     }
  998.  
  999.     protected override void OnResize(EventArgs e)
  1000.     {
  1001.         base.OnResize(e);
  1002.         base.Size = new Size(base.Width, 18);
  1003.     }
  1004. }
  1005. public class XylosCombobox : ComboBox
  1006. {
  1007.     private Graphics G;
  1008.  
  1009.     private Rectangle Rect;
  1010.  
  1011.     private bool _EnabledCalc;
  1012.  
  1013.     public new bool Enabled
  1014.     {
  1015.         get
  1016.         {
  1017.             return this.EnabledCalc;
  1018.         }
  1019.         set
  1020.         {
  1021.             this._EnabledCalc = value;
  1022.             base.Invalidate();
  1023.         }
  1024.     }
  1025.  
  1026.     [DisplayName("Enabled")]
  1027.     public bool EnabledCalc
  1028.     {
  1029.         get
  1030.         {
  1031.             return this._EnabledCalc;
  1032.         }
  1033.         set
  1034.         {
  1035.             base.Enabled = value;
  1036.             this.Enabled = value;
  1037.             base.Invalidate();
  1038.         }
  1039.     }
  1040.  
  1041.     public XylosCombobox()
  1042.     {
  1043.         this.DoubleBuffered = true;
  1044.         base.DropDownStyle = ComboBoxStyle.DropDownList;
  1045.         this.Cursor = Cursors.Hand;
  1046.         this.Enabled = true;
  1047.         base.DrawMode = DrawMode.OwnerDrawFixed;
  1048.         base.ItemHeight = 20;
  1049.     }
  1050.  
  1051.     protected override void OnCreateControl()
  1052.     {
  1053.         base.OnCreateControl();
  1054.         base.SetStyle(ControlStyles.UserPaint, true);
  1055.     }
  1056.  
  1057.     protected override void OnPaint(PaintEventArgs e)
  1058.     {
  1059.         this.G = e.Graphics;
  1060.         this.G.SmoothingMode = SmoothingMode.HighQuality;
  1061.         this.G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
  1062.         base.OnPaint(e);
  1063.         this.G.Clear(Color.White);
  1064.         bool enabled = this.Enabled;
  1065.         checked
  1066.         {
  1067.             if (enabled)
  1068.             {
  1069.                 using (Pen pen = new Pen(Helpers.ColorFromHex("#D0D5D9")))
  1070.                 {
  1071.                     using (SolidBrush solidBrush = new SolidBrush(Helpers.ColorFromHex("#7C858E")))
  1072.                     {
  1073.                         using (Font font = new Font("Marlett", 13f))
  1074.                         {
  1075.                             this.G.DrawPath(pen, Helpers.RoundRect(Helpers.FullRectangle(base.Size, true), 6, Helpers.RoundingStyle.All));
  1076.                             this.G.DrawString("6", font, solidBrush, new Point(base.Width - 22, 3));
  1077.                         }
  1078.                     }
  1079.                 }
  1080.             }
  1081.             else
  1082.             {
  1083.                 using (Pen pen2 = new Pen(Helpers.ColorFromHex("#E1E1E2")))
  1084.                 {
  1085.                     using (SolidBrush solidBrush2 = new SolidBrush(Helpers.ColorFromHex("#D0D3D7")))
  1086.                     {
  1087.                         using (Font font2 = new Font("Marlett", 13f))
  1088.                         {
  1089.                             this.G.DrawPath(pen2, Helpers.RoundRect(Helpers.FullRectangle(base.Size, true), 6, Helpers.RoundingStyle.All));
  1090.                             this.G.DrawString("6", font2, solidBrush2, new Point(base.Width - 22, 3));
  1091.                         }
  1092.                     }
  1093.                 }
  1094.             }
  1095.             bool flag = !Information.IsNothing(base.Items);
  1096.             if (flag)
  1097.             {
  1098.                 using (Font font3 = new Font("Segoe UI", 9f))
  1099.                 {
  1100.                     using (SolidBrush solidBrush3 = new SolidBrush(Helpers.ColorFromHex("#7C858E")))
  1101.                     {
  1102.                         bool enabled2 = this.Enabled;
  1103.                         if (enabled2)
  1104.                         {
  1105.                             bool flag2 = this.SelectedIndex != -1;
  1106.                             if (flag2)
  1107.                             {
  1108.                                 this.G.DrawString(base.GetItemText(RuntimeHelpers.GetObjectValue(base.Items[this.SelectedIndex])), font3, solidBrush3, new Point(7, 4));
  1109.                             }
  1110.                             else
  1111.                             {
  1112.                                 try
  1113.                                 {
  1114.                                     this.G.DrawString(base.GetItemText(RuntimeHelpers.GetObjectValue(base.Items[0])), font3, solidBrush3, new Point(7, 4));
  1115.                                 }
  1116.                                 catch (Exception arg_272_0)
  1117.                                 {
  1118.                                     ProjectData.SetProjectError(arg_272_0);
  1119.                                     ProjectData.ClearProjectError();
  1120.                                 }
  1121.                             }
  1122.                         }
  1123.                         else
  1124.                         {
  1125.                             using (SolidBrush solidBrush4 = new SolidBrush(Helpers.ColorFromHex("#D0D3D7")))
  1126.                             {
  1127.                                 bool flag3 = this.SelectedIndex != -1;
  1128.                                 if (flag3)
  1129.                                 {
  1130.                                     this.G.DrawString(base.GetItemText(RuntimeHelpers.GetObjectValue(base.Items[this.SelectedIndex])), font3, solidBrush4, new Point(7, 4));
  1131.                                 }
  1132.                                 else
  1133.                                 {
  1134.                                     this.G.DrawString(base.GetItemText(RuntimeHelpers.GetObjectValue(base.Items[0])), font3, solidBrush4, new Point(7, 4));
  1135.                                 }
  1136.                             }
  1137.                         }
  1138.                     }
  1139.                 }
  1140.             }
  1141.         }
  1142.     }
  1143.  
  1144.     protected override void OnDrawItem(DrawItemEventArgs e)
  1145.     {
  1146.         base.OnDrawItem(e);
  1147.         this.G = e.Graphics;
  1148.         this.G.SmoothingMode = SmoothingMode.HighQuality;
  1149.         this.G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
  1150.         bool enabled = this.Enabled;
  1151.         checked
  1152.         {
  1153.             if (enabled)
  1154.             {
  1155.                 e.DrawBackground();
  1156.                 this.Rect = e.Bounds;
  1157.                 try
  1158.                 {
  1159.                     using (new Font("Segoe UI", 9f))
  1160.                     {
  1161.                         using (new Pen(Helpers.ColorFromHex("#D0D5D9")))
  1162.                         {
  1163.                             bool flag = (e.State & DrawItemState.Selected) == DrawItemState.Selected;
  1164.                             if (flag)
  1165.                             {
  1166.                                 using (new SolidBrush(Color.White))
  1167.                                 {
  1168.                                     using (SolidBrush solidBrush2 = new SolidBrush(Helpers.ColorFromHex("#78B7E6")))
  1169.                                     {
  1170.                                         this.G.FillRectangle(solidBrush2, this.Rect);
  1171.                                         this.G.DrawString(base.GetItemText(RuntimeHelpers.GetObjectValue(base.Items[e.Index])), new Font("Segoe UI", 9f), Brushes.White, new Point(this.Rect.X + 5, this.Rect.Y + 1));
  1172.                                     }
  1173.                                 }
  1174.                             }
  1175.                             else
  1176.                             {
  1177.                                 using (SolidBrush solidBrush3 = new SolidBrush(Helpers.ColorFromHex("#7C858E")))
  1178.                                 {
  1179.                                     this.G.FillRectangle(Brushes.White, this.Rect);
  1180.                                     this.G.DrawString(base.GetItemText(RuntimeHelpers.GetObjectValue(base.Items[e.Index])), new Font("Segoe UI", 9f), solidBrush3, new Point(this.Rect.X + 5, this.Rect.Y + 1));
  1181.                                 }
  1182.                             }
  1183.                         }
  1184.                     }
  1185.                 }
  1186.                 catch (Exception arg_1F1_0)
  1187.                 {
  1188.                     ProjectData.SetProjectError(arg_1F1_0);
  1189.                     ProjectData.ClearProjectError();
  1190.                 }
  1191.             }
  1192.         }
  1193.     }
  1194.  
  1195.     protected override void OnSelectedItemChanged(EventArgs e)
  1196.     {
  1197.         base.OnSelectedItemChanged(e);
  1198.         base.Invalidate();
  1199.     }
  1200. }
  1201. public class XylosNotice : TextBox
  1202. {
  1203.     private Graphics G;
  1204.  
  1205.     private string B64;
  1206.  
  1207.     public XylosNotice()
  1208.     {
  1209.         this.B64 = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABL0lEQVQ4T5VT0VGDQBB9e2cBdGBSgTIDEr9MCw7pI0kFtgB9yFiC+KWMmREqMOnAAuDWOfAiudzhyA/svtvH7Xu7BOv5eH2atVKtwbwk0LWGGVyDqLzoRB7e3u/HJTQOdm+PGYjWNuk4ZkIW36RbkzsS7KqiBnB1Usw49DHh8oQEXMfJKhwgAM4/Mw7RIp0NeLG3ScCcR4vVhnTPnVCf9rUZeImTdKnz71VREnBnn5FKzMnX95jA2V6vLufkBQFESTq0WBXsEla7owmcoC6QJMKW2oCUePY5M0lAjK0iBAQ8TBGc2/d7+uvnM/AQNF4Rp4bpiGkRfTb2Gigx12+XzQb3D9JfBGaQzHWm7HS000RJ2i/av5fJjPDZMplErwl1GxDpMTbL1YC5lCwze52/AQFekh7wKBpGAAAAAElFTkSuQmCC";
  1210.         this.DoubleBuffered = true;
  1211.         base.Enabled = false;
  1212.         base.ReadOnly = true;
  1213.         base.BorderStyle = BorderStyle.None;
  1214.         this.Multiline = true;
  1215.         this.Cursor = Cursors.Default;
  1216.     }
  1217.  
  1218.     protected override void OnCreateControl()
  1219.     {
  1220.         base.OnCreateControl();
  1221.         base.SetStyle(ControlStyles.UserPaint, true);
  1222.     }
  1223.  
  1224.     protected override void OnPaint(PaintEventArgs e)
  1225.     {
  1226.         this.G = e.Graphics;
  1227.         this.G.SmoothingMode = SmoothingMode.HighQuality;
  1228.         this.G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
  1229.         base.OnPaint(e);
  1230.         this.G.Clear(Color.White);
  1231.         using (SolidBrush solidBrush = new SolidBrush(Helpers.ColorFromHex("#FFFDE8")))
  1232.         {
  1233.             using (Pen pen = new Pen(Helpers.ColorFromHex("#F2F3F7")))
  1234.             {
  1235.                 using (SolidBrush solidBrush2 = new SolidBrush(Helpers.ColorFromHex("#B9B595")))
  1236.                 {
  1237.                     using (Font font = new Font("Segoe UI", 9f))
  1238.                     {
  1239.                         this.G.FillPath(solidBrush, Helpers.RoundRect(Helpers.FullRectangle(base.Size, true), 3, Helpers.RoundingStyle.All));
  1240.                         this.G.DrawPath(pen, Helpers.RoundRect(Helpers.FullRectangle(base.Size, true), 3, Helpers.RoundingStyle.All));
  1241.                         this.G.DrawString(this.Text, font, solidBrush2, new Point(30, 6));
  1242.                     }
  1243.                 }
  1244.             }
  1245.         }
  1246.         using (Image image = Image.FromStream(new MemoryStream(Convert.FromBase64String(this.B64))))
  1247.         {
  1248.             this.G.DrawImage(image, new Rectangle(8, checked((int)Math.Round(unchecked((double)base.Height / 2.0 - 8.0))), 16, 16));
  1249.         }
  1250.     }
  1251.  
  1252.     protected override void OnMouseUp(MouseEventArgs e)
  1253.     {
  1254.         base.OnMouseUp(e);
  1255.     }
  1256. }
  1257. public class XylosProgressBar : Control
  1258. {
  1259.     private int _Val;
  1260.  
  1261.     private int _Min;
  1262.  
  1263.     private int _Max;
  1264.  
  1265.     [DebuggerBrowsable(DebuggerBrowsableState.Never), CompilerGenerated]
  1266.     private Color _Stripes;
  1267.  
  1268.     [DebuggerBrowsable(DebuggerBrowsableState.Never), CompilerGenerated]
  1269.     private Color _BackgroundColor;
  1270.  
  1271.     public Color Stripes
  1272.     {
  1273.         get;
  1274.         set;
  1275.     }
  1276.  
  1277.     public Color BackgroundColor
  1278.     {
  1279.         get;
  1280.         set;
  1281.     }
  1282.  
  1283.     public int Value
  1284.     {
  1285.         get
  1286.         {
  1287.             return this._Val;
  1288.         }
  1289.         set
  1290.         {
  1291.             this._Val = value;
  1292.             base.Invalidate();
  1293.         }
  1294.     }
  1295.  
  1296.     public int Minimum
  1297.     {
  1298.         get
  1299.         {
  1300.             return this._Min;
  1301.         }
  1302.         set
  1303.         {
  1304.             this._Min = value;
  1305.             base.Invalidate();
  1306.         }
  1307.     }
  1308.  
  1309.     public int Maximum
  1310.     {
  1311.         get
  1312.         {
  1313.             return this._Max;
  1314.         }
  1315.         set
  1316.         {
  1317.             this._Max = value;
  1318.             base.Invalidate();
  1319.         }
  1320.     }
  1321.  
  1322.     public XylosProgressBar()
  1323.     {
  1324.         this._Val = 0;
  1325.         this._Min = 0;
  1326.         this._Max = 100;
  1327.         this.Stripes = Color.DarkGreen;
  1328.         this.BackgroundColor = Color.Green;
  1329.         this.DoubleBuffered = true;
  1330.         this.Maximum = 100;
  1331.         this.Minimum = 0;
  1332.         this.Value = 0;
  1333.     }
  1334.  
  1335.     protected override void OnPaint(PaintEventArgs e)
  1336.     {
  1337.         Graphics graphics = e.Graphics;
  1338.         graphics.SmoothingMode = SmoothingMode.HighQuality;
  1339.         graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
  1340.         base.OnPaint(e);
  1341.         graphics.Clear(Color.White);
  1342.         using (Pen pen = new Pen(Helpers.ColorFromHex("#D0D5D9")))
  1343.         {
  1344.             graphics.DrawPath(pen, Helpers.RoundRect(Helpers.FullRectangle(base.Size, true), 6, Helpers.RoundingStyle.All));
  1345.         }
  1346.         bool flag = this.Value != 0;
  1347.         if (flag)
  1348.         {
  1349.             using (HatchBrush hatchBrush = new HatchBrush(HatchStyle.LightUpwardDiagonal, this.Stripes, this.BackgroundColor))
  1350.             {
  1351.                 graphics.FillPath(hatchBrush, Helpers.RoundRect(checked(new Rectangle(0, 0, (int)Math.Round(unchecked((double)this.Value / (double)this.Maximum * (double)base.Width - 1.0)), base.Height - 1)), 6, Helpers.RoundingStyle.All));
  1352.             }
  1353.         }
  1354.     }
  1355. }
  1356. [DefaultEvent("CheckedChanged")]
  1357. public class XylosRadioButton : Control
  1358. {
  1359.     public delegate void CheckedChangedEventHandler(object sender, EventArgs e);
  1360.  
  1361.     [DebuggerBrowsable(DebuggerBrowsableState.Never), CompilerGenerated]
  1362.     private XylosRadioButton.CheckedChangedEventHandler CheckedChangedEvent;
  1363.  
  1364.     private bool _Checked;
  1365.  
  1366.     private bool _EnabledCalc;
  1367.  
  1368.     private Graphics G;
  1369.  
  1370.     public event XylosRadioButton.CheckedChangedEventHandler CheckedChanged
  1371.     {
  1372.         [CompilerGenerated]
  1373.         add
  1374.         {
  1375.             XylosRadioButton.CheckedChangedEventHandler checkedChangedEventHandler = this.CheckedChangedEvent;
  1376.             XylosRadioButton.CheckedChangedEventHandler checkedChangedEventHandler2;
  1377.             do
  1378.             {
  1379.                 checkedChangedEventHandler2 = checkedChangedEventHandler;
  1380.                 XylosRadioButton.CheckedChangedEventHandler value2 = (XylosRadioButton.CheckedChangedEventHandler)Delegate.Combine(checkedChangedEventHandler2, value);
  1381.                 checkedChangedEventHandler = Interlocked.CompareExchange<XylosRadioButton.CheckedChangedEventHandler>(ref this.CheckedChangedEvent, value2, checkedChangedEventHandler2);
  1382.             }
  1383.             while (checkedChangedEventHandler != checkedChangedEventHandler2);
  1384.         }
  1385.         [CompilerGenerated]
  1386.         remove
  1387.         {
  1388.             XylosRadioButton.CheckedChangedEventHandler checkedChangedEventHandler = this.CheckedChangedEvent;
  1389.             XylosRadioButton.CheckedChangedEventHandler checkedChangedEventHandler2;
  1390.             do
  1391.             {
  1392.                 checkedChangedEventHandler2 = checkedChangedEventHandler;
  1393.                 XylosRadioButton.CheckedChangedEventHandler value2 = (XylosRadioButton.CheckedChangedEventHandler)Delegate.Remove(checkedChangedEventHandler2, value);
  1394.                 checkedChangedEventHandler = Interlocked.CompareExchange<XylosRadioButton.CheckedChangedEventHandler>(ref this.CheckedChangedEvent, value2, checkedChangedEventHandler2);
  1395.             }
  1396.             while (checkedChangedEventHandler != checkedChangedEventHandler2);
  1397.         }
  1398.     }
  1399.  
  1400.     public bool Checked
  1401.     {
  1402.         get
  1403.         {
  1404.             return this._Checked;
  1405.         }
  1406.         set
  1407.         {
  1408.             this._Checked = value;
  1409.             base.Invalidate();
  1410.         }
  1411.     }
  1412.  
  1413.     public new bool Enabled
  1414.     {
  1415.         get
  1416.         {
  1417.             return this.EnabledCalc;
  1418.         }
  1419.         set
  1420.         {
  1421.             this._EnabledCalc = value;
  1422.             bool enabled = this.Enabled;
  1423.             if (enabled)
  1424.             {
  1425.                 this.Cursor = Cursors.Hand;
  1426.             }
  1427.             else
  1428.             {
  1429.                 this.Cursor = Cursors.Default;
  1430.             }
  1431.             base.Invalidate();
  1432.         }
  1433.     }
  1434.  
  1435.     [DisplayName("Enabled")]
  1436.     public bool EnabledCalc
  1437.     {
  1438.         get
  1439.         {
  1440.             return this._EnabledCalc;
  1441.         }
  1442.         set
  1443.         {
  1444.             this.Enabled = value;
  1445.             base.Invalidate();
  1446.         }
  1447.     }
  1448.  
  1449.     public XylosRadioButton()
  1450.     {
  1451.         this.DoubleBuffered = true;
  1452.         this.Enabled = true;
  1453.     }
  1454.  
  1455.     protected override void OnPaint(PaintEventArgs e)
  1456.     {
  1457.         this.G = e.Graphics;
  1458.         this.G.SmoothingMode = SmoothingMode.HighQuality;
  1459.         this.G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
  1460.         base.OnPaint(e);
  1461.         this.G.Clear(Color.White);
  1462.         bool enabled = this.Enabled;
  1463.         if (enabled)
  1464.         {
  1465.             using (SolidBrush solidBrush = new SolidBrush(Helpers.ColorFromHex("#F3F4F7")))
  1466.             {
  1467.                 using (Pen pen = new Pen(Helpers.ColorFromHex("#D0D5D9")))
  1468.                 {
  1469.                     using (SolidBrush solidBrush2 = new SolidBrush(Helpers.ColorFromHex("#7C858E")))
  1470.                     {
  1471.                         using (Font font = new Font("Segoe UI", 9f))
  1472.                         {
  1473.                             this.G.FillEllipse(solidBrush, new Rectangle(0, 0, 16, 16));
  1474.                             this.G.DrawEllipse(pen, new Rectangle(0, 0, 16, 16));
  1475.                             this.G.DrawString(this.Text, font, solidBrush2, new Point(25, 0));
  1476.                         }
  1477.                     }
  1478.                 }
  1479.             }
  1480.             bool @checked = this.Checked;
  1481.             if (@checked)
  1482.             {
  1483.                 using (SolidBrush solidBrush3 = new SolidBrush(Helpers.ColorFromHex("#575C62")))
  1484.                 {
  1485.                     this.G.FillEllipse(solidBrush3, new Rectangle(4, 4, 8, 8));
  1486.                 }
  1487.             }
  1488.         }
  1489.         else
  1490.         {
  1491.             using (SolidBrush solidBrush4 = new SolidBrush(Helpers.ColorFromHex("#F5F5F8")))
  1492.             {
  1493.                 using (Pen pen2 = new Pen(Helpers.ColorFromHex("#E1E1E2")))
  1494.                 {
  1495.                     using (SolidBrush solidBrush5 = new SolidBrush(Helpers.ColorFromHex("#D0D3D7")))
  1496.                     {
  1497.                         using (Font font2 = new Font("Segoe UI", 9f))
  1498.                         {
  1499.                             this.G.FillEllipse(solidBrush4, new Rectangle(0, 0, 16, 16));
  1500.                             this.G.DrawEllipse(pen2, new Rectangle(0, 0, 16, 16));
  1501.                             this.G.DrawString(this.Text, font2, solidBrush5, new Point(25, 0));
  1502.                         }
  1503.                     }
  1504.                 }
  1505.             }
  1506.             bool checked2 = this.Checked;
  1507.             if (checked2)
  1508.             {
  1509.                 using (SolidBrush solidBrush6 = new SolidBrush(Helpers.ColorFromHex("#BCC1C6")))
  1510.                 {
  1511.                     this.G.FillEllipse(solidBrush6, new Rectangle(4, 4, 8, 8));
  1512.                 }
  1513.             }
  1514.         }
  1515.     }
  1516.  
  1517.     protected override void OnMouseUp(MouseEventArgs e)
  1518.     {
  1519.         base.OnMouseUp(e);
  1520.         bool enabled = this.Enabled;
  1521.         if (enabled)
  1522.         {
  1523.             try
  1524.             {
  1525.                 IEnumerator enumerator = base.Parent.Controls.GetEnumerator();
  1526.                 while (enumerator.MoveNext())
  1527.                 {
  1528.                     Control control = (Control)enumerator.Current;
  1529.                     bool flag = control is XylosRadioButton;
  1530.                     if (flag)
  1531.                     {
  1532.                         ((XylosRadioButton)control).Checked = false;
  1533.                     }
  1534.                 }
  1535.             }
  1536.             finally
  1537.             {
  1538.                
  1539.             }
  1540.             this.Checked = !this.Checked;
  1541.             XylosRadioButton.CheckedChangedEventHandler checkedChangedEvent = this.CheckedChangedEvent;
  1542.             if (checkedChangedEvent != null)
  1543.             {
  1544.                 checkedChangedEvent(this, e);
  1545.             }
  1546.         }
  1547.     }
  1548.  
  1549.     protected override void OnResize(EventArgs e)
  1550.     {
  1551.         base.OnResize(e);
  1552.         base.Size = new Size(base.Width, 18);
  1553.     }
  1554. }
  1555. public class XylosSeparator : Control
  1556. {
  1557.     private Graphics G;
  1558.  
  1559.     public XylosSeparator()
  1560.     {
  1561.         this.DoubleBuffered = true;
  1562.     }
  1563.  
  1564.     protected override void OnPaint(PaintEventArgs e)
  1565.     {
  1566.         this.G = e.Graphics;
  1567.         this.G.SmoothingMode = SmoothingMode.HighQuality;
  1568.         this.G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
  1569.         base.OnPaint(e);
  1570.         using (Pen pen = new Pen(Helpers.ColorFromHex("#EBEBEC")))
  1571.         {
  1572.             this.G.DrawLine(pen, new Point(0, 0), new Point(base.Width, 0));
  1573.         }
  1574.     }
  1575.  
  1576.     protected override void OnResize(EventArgs e)
  1577.     {
  1578.         base.OnResize(e);
  1579.         base.Size = new Size(base.Width, 2);
  1580.     }
  1581. }
Add Comment
Please, Sign In to add comment