Ejemplo n.º 1
0
        protected override void OnPaint(PaintEventArgs e)
        {
            G = e.Graphics;
            G.SmoothingMode     = SmoothingMode.HighQuality;
            G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
            base.OnPaint(e);
            G.Clear(BackColor);
            bool enabled = Enabled;

            if (enabled)
            {
                TB.ForeColor = ForeColor;
                bool flag = State == AloneTextBox.MouseState.Down;
                if (flag)
                {
                    using (Pen pen = new Pen(AloneLibrary.ColorFromHex("#78B7E6")))
                        G.DrawPath(pen, AloneLibrary.RoundRect(AloneLibrary.FullRectangle(base.Size, true), 12, AloneLibrary.RoundingStyle.All));
                }
                else
                {
                    using (Pen pen2 = new Pen(AloneLibrary.ColorFromHex("#D0D5D9")))
                        G.DrawPath(pen2, AloneLibrary.RoundRect(AloneLibrary.FullRectangle(base.Size, true), 12, AloneLibrary.RoundingStyle.All));
                }
            }
            else
            {
                TB.ForeColor = ForeColor;
                using (Pen pen3 = new Pen(AloneLibrary.ColorFromHex("#E1E1E2")))
                    G.DrawPath(pen3, AloneLibrary.RoundRect(AloneLibrary.FullRectangle(base.Size, true), 12, AloneLibrary.RoundingStyle.All));
            }
            TB.TextAlign             = TextAlign;
            TB.UseSystemPasswordChar = UseSystemPasswordChar;
        }
Ejemplo n.º 2
0
 public AloneRadioButton()
 {
     DoubleBuffered = true;
     Enabled        = true;
     Size           = new Size(138, 18);
     ForeColor      = AloneLibrary.ColorFromHex("#7C858E");
     BackColor      = Color.White;
 }
Ejemplo n.º 3
0
        protected override void OnPaint(PaintEventArgs e)
        {
            G = e.Graphics;
            G.SmoothingMode     = SmoothingMode.HighQuality;
            G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
            base.OnPaint(e);
            G.Clear(BackColor);
            bool enabled = Enabled;

            if (enabled)
            {
                using (SolidBrush solidBrush = new SolidBrush(AloneLibrary.ColorFromHex("#F3F4F7")))
                {
                    using (Pen pen = new Pen(AloneLibrary.ColorFromHex("#D0D5D9")))
                    {
                        using (SolidBrush solidBrush2 = new SolidBrush(ForeColor))
                        {
                            using (Font font = new Font("Segoe UI", 9f))
                            {
                                G.FillPath(solidBrush, AloneLibrary.RoundRect(new Rectangle(0, 0, 16, 16), 3, AloneLibrary.RoundingStyle.All));
                                G.DrawPath(pen, AloneLibrary.RoundRect(new Rectangle(0, 0, 16, 16), 3, AloneLibrary.RoundingStyle.All));
                                G.DrawString(Text, font, solidBrush2, new Point(25, 0));
                            }
                        }
                    }
                }
                bool @checked = Checked;
                if (@checked)
                {
                    using (Image image = Image.FromStream(new MemoryStream(Convert.FromBase64String(B64Enabled))))
                        G.DrawImage(image, new Rectangle(3, 3, 11, 11));
                }
            }
            else
            {
                using (SolidBrush solidBrush3 = new SolidBrush(AloneLibrary.ColorFromHex("#F5F5F8")))
                {
                    using (Pen pen2 = new Pen(AloneLibrary.ColorFromHex("#E1E1E2")))
                    {
                        using (SolidBrush solidBrush4 = new SolidBrush(AloneLibrary.ColorFromHex("#D0D3D7")))
                        {
                            using (Font font2 = new Font("Segoe UI", 9f))
                            {
                                G.FillPath(solidBrush3, AloneLibrary.RoundRect(new Rectangle(0, 0, 16, 16), 3, AloneLibrary.RoundingStyle.All));
                                G.DrawPath(pen2, AloneLibrary.RoundRect(new Rectangle(0, 0, 16, 16), 3, AloneLibrary.RoundingStyle.All));
                                G.DrawString(Text, font2, solidBrush4, new Point(25, 0));
                            }
                        }
                    }
                }
                bool checked2 = Checked;
                if (checked2)
                {
                    using (Image image2 = Image.FromStream(new MemoryStream(Convert.FromBase64String(B64Disabled))))
                        G.DrawImage(image2, new Rectangle(3, 3, 11, 11));
                }
            }
        }
Ejemplo n.º 4
0
 public AloneButton()
 {
     DoubleBuffered = true;
     Enabled        = true;
     Cursor         = Cursors.Hand;
     Size           = new Size(120, 40);
     Font           = new Font("Segoe UI", 9f);
     ForeColor      = AloneLibrary.ColorFromHex("#7C858E");
 }
Ejemplo n.º 5
0
 public AloneCheckBox()
 {
     B64Enabled     = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA00lEQVQ4T6WTwQ2CMBSG30/07Ci6gY7gxZoIiYADuAIrsIDpQQ/cHMERZBOuXHimDSWALYL01EO/L//724JmLszk6S+BCOIExFsmL50sEH4kAZxVciYuJgnacD16Plpgg8tFtYMILntQdSXiZ3aXqa1UF/yUsoDw4wKglQaZZPa4RW3JEKzO4RjEbyJaN1BL8gvWgsMp3ADeq0lRJ2FimLZNYWpmFbudUJdolXTLyG2wTmDODUiccEfgSDIIfwmMxAMStS+XHPZn7l/z6Ifk+nSzBR8zi2d9JmVXSgAAAABJRU5ErkJggg==";
     B64Disabled    = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA1UlEQVQ4T6WTzQ2CQBCF56EnLpaiXvUAJBRgB2oFtkALdEAJnoVEMIGzdEIFjNkFN4DLn+xpD/N9efMWQAsPFvL0lyBMUg8MiwzyZwuiJAuI6CyTMxezBC24EuSTBTp4xaaN6JWdqKQbge6udfB1pfbBjrMvEMZZAdCm3ilw7eO1KRmCxRyiOH0TsFUQs5KMwVLweKY7ALFKUZUTECD6qdquCxM7i9jNhLJEraQ5xZzrYJngO9crGYBbAm2SEfhHoCQGeeK+Ls1Ld+fuM0/+kPp+usWCD10idEOGa4QuAAAAAElFTkSuQmCC";
     DoubleBuffered = true;
     Enabled        = true;
     ForeColor      = AloneLibrary.ColorFromHex("#7C858E");
     BackColor      = Color.White;
     Size           = new Size(118, 18);
 }
Ejemplo n.º 6
0
 public AloneNotice()
 {
     B64              = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABL0lEQVQ4T5VT0VGDQBB9e2cBdGBSgTIDEr9MCw7pI0kFtgB9yFiC+KWMmREqMOnAAuDWOfAiudzhyA/svtvH7Xu7BOv5eH2atVKtwbwk0LWGGVyDqLzoRB7e3u/HJTQOdm+PGYjWNuk4ZkIW36RbkzsS7KqiBnB1Usw49DHh8oQEXMfJKhwgAM4/Mw7RIp0NeLG3ScCcR4vVhnTPnVCf9rUZeImTdKnz71VREnBnn5FKzMnX95jA2V6vLufkBQFESTq0WBXsEla7owmcoC6QJMKW2oCUePY5M0lAjK0iBAQ8TBGc2/d7+uvnM/AQNF4Rp4bpiGkRfTb2Gigx12+XzQb3D9JfBGaQzHWm7HS000RJ2i/av5fJjPDZMplErwl1GxDpMTbL1YC5lCwze52/AQFekh7wKBpGAAAAAElFTkSuQmCC";
     DoubleBuffered   = true;
     base.Enabled     = false;
     base.ReadOnly    = true;
     base.BorderStyle = BorderStyle.None;
     Multiline        = true;
     BackColor        = AloneLibrary.ColorFromHex("#FFFDE8");
     ForeColor        = AloneLibrary.ColorFromHex("#B9B595");
     Cursor           = Cursors.Default;
 }
Ejemplo n.º 7
0
        protected override void OnDrawItem(DrawItemEventArgs e)
        {
            base.OnDrawItem(e);
            G = e.Graphics;
            G.SmoothingMode     = SmoothingMode.HighQuality;
            G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
            bool enabled = Enabled;

            checked
            {
                if (enabled)
                {
                    e.DrawBackground();
                    Rect = e.Bounds;
                    try
                    {
                        using (new Font("Segoe UI", 9f))
                        {
                            using (new Pen(AloneLibrary.ColorFromHex("#D0D5D9")))
                            {
                                bool flag = (e.State & DrawItemState.Selected) == DrawItemState.Selected;
                                if (flag)
                                {
                                    using (new SolidBrush(Color.White))
                                    {
                                        using (SolidBrush solidBrush2 = new SolidBrush(AloneLibrary.ColorFromHex("#78B7E6")))
                                        {
                                            G.FillRectangle(solidBrush2, Rect);
                                            G.DrawString(base.GetItemText(RuntimeHelpers.GetObjectValue(base.Items[e.Index])), new Font("Segoe UI", 9f), Brushes.White, new Point(Rect.X + 5, Rect.Y + 1));
                                        }
                                    }
                                }
                                else
                                {
                                    using (SolidBrush solidBrush3 = new SolidBrush(AloneLibrary.ColorFromHex("#7C858E")))
                                    {
                                        G.FillRectangle(Brushes.White, Rect);
                                        G.DrawString(base.GetItemText(RuntimeHelpers.GetObjectValue(base.Items[e.Index])), new Font("Segoe UI", 9f), solidBrush3, new Point(Rect.X + 5, Rect.Y + 1));
                                    }
                                }
                            }
                        }
                    }
                    catch (Exception arg_1F1_0)
                    {
                        ProjectData.SetProjectError(arg_1F1_0);
                        ProjectData.ClearProjectError();
                    }
                }
            }
        }
Ejemplo n.º 8
0
 protected override void OnPaint(PaintEventArgs e)
 {
     G = e.Graphics;
     G.SmoothingMode     = SmoothingMode.HighQuality;
     G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
     base.OnPaint(e);
     if (Enabled)
     {
         AloneButton.MouseState state = State;
         if (state != AloneButton.MouseState.Over)
         {
             if (state != AloneButton.MouseState.Down)
             {
                 using (SolidBrush solidBrush = new SolidBrush(AloneLibrary.ColorFromHex("#F6F6F6")))
                     G.FillPath(solidBrush, AloneLibrary.RoundRect(AloneLibrary.FullRectangle(base.Size, true), 3, AloneLibrary.RoundingStyle.All));
             }
             else
             {
                 using (SolidBrush solidBrush2 = new SolidBrush(AloneLibrary.ColorFromHex("#F0F0F0")))
                     G.FillPath(solidBrush2, AloneLibrary.RoundRect(AloneLibrary.FullRectangle(base.Size, true), 3, AloneLibrary.RoundingStyle.All));
             }
         }
         else
         {
             using (SolidBrush solidBrush3 = new SolidBrush(AloneLibrary.ColorFromHex("#FDFDFD")))
                 G.FillPath(solidBrush3, AloneLibrary.RoundRect(AloneLibrary.FullRectangle(base.Size, true), 3, AloneLibrary.RoundingStyle.All));
         }
         using (Pen pen = new Pen(AloneLibrary.ColorFromHex("#C3C3C3")))
         {
             G.DrawPath(pen, AloneLibrary.RoundRect(AloneLibrary.FullRectangle(base.Size, true), 3, AloneLibrary.RoundingStyle.All));
             AloneLibrary.CenterString(G, Text, Font, ForeColor, AloneLibrary.FullRectangle(base.Size, false));
         }
         Cursor = Cursors.Hand;
     }
     else
     {
         using (SolidBrush solidBrush4 = new SolidBrush(AloneLibrary.ColorFromHex("#F3F4F7")))
         {
             using (Pen pen2 = new Pen(AloneLibrary.ColorFromHex("#DCDCDC")))
             {
                 G.FillPath(solidBrush4, AloneLibrary.RoundRect(AloneLibrary.FullRectangle(base.Size, true), 3, AloneLibrary.RoundingStyle.All));
                 G.DrawPath(pen2, AloneLibrary.RoundRect(AloneLibrary.FullRectangle(base.Size, true), 3, AloneLibrary.RoundingStyle.All));
                 AloneLibrary.CenterString(G, Text, Font, AloneLibrary.ColorFromHex("#D0D3D7"), AloneLibrary.FullRectangle(base.Size, false));
             }
         }
         Cursor = Cursors.Default;
     }
 }
Ejemplo n.º 9
0
 public AloneTextBox()
 {
     base.TextChanged += delegate(object a0, EventArgs a1)
     {
         TextChng();
     };
     TB             = new TextBox();
     _allowpassword = false;
     _maxChars      = 32767;
     _multiLine     = false;
     _readOnly      = false;
     NewTextBox();
     base.Controls.Add(TB);
     base.SetStyle(ControlStyles.UserPaint | ControlStyles.SupportsTransparentBackColor, true);
     DoubleBuffered = true;
     TextAlign      = HorizontalAlignment.Left;
     ForeColor      = AloneLibrary.ColorFromHex("#7C858E");
     BackColor      = Color.White;
     Font           = new Font("Segoe UI", 9f);
     base.Size      = new Size(97, 29);
     Enabled        = true;
 }
Ejemplo n.º 10
0
        protected override void OnPaint(PaintEventArgs e)
        {
            G = e.Graphics;
            G.SmoothingMode     = SmoothingMode.HighQuality;
            G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
            base.OnPaint(e);
            G.Clear(Color.White);
            bool enabled = Enabled;

            checked
            {
                if (enabled)
                {
                    using (Pen pen = new Pen(AloneLibrary.ColorFromHex("#D0D5D9")))
                    {
                        using (SolidBrush solidBrush = new SolidBrush(AloneLibrary.ColorFromHex("#7C858E")))
                        {
                            using (Font font = new Font("Marlett", 13f))
                            {
                                G.DrawPath(pen, AloneLibrary.RoundRect(AloneLibrary.FullRectangle(base.Size, true), 6, AloneLibrary.RoundingStyle.All));
                                G.DrawString("6", font, solidBrush, new Point(base.Width - 22, 3));
                            }
                        }
                    }
                }
                else
                {
                    using (Pen pen2 = new Pen(AloneLibrary.ColorFromHex("#E1E1E2")))
                    {
                        using (SolidBrush solidBrush2 = new SolidBrush(AloneLibrary.ColorFromHex("#D0D3D7")))
                        {
                            using (Font font2 = new Font("Marlett", 13f))
                            {
                                G.DrawPath(pen2, AloneLibrary.RoundRect(AloneLibrary.FullRectangle(base.Size, true), 6, AloneLibrary.RoundingStyle.All));
                                G.DrawString("6", font2, solidBrush2, new Point(base.Width - 22, 3));
                            }
                        }
                    }
                }
                bool flag = !Information.IsNothing(base.Items);
                if (flag)
                {
                    using (Font font3 = new Font("Segoe UI", 9f))
                    {
                        using (SolidBrush solidBrush3 = new SolidBrush(AloneLibrary.ColorFromHex("#7C858E")))
                        {
                            bool enabled2 = Enabled;
                            if (enabled2)
                            {
                                bool flag2 = SelectedIndex != -1;
                                if (flag2)
                                {
                                    G.DrawString(base.GetItemText(RuntimeHelpers.GetObjectValue(base.Items[SelectedIndex])), font3, solidBrush3, new Point(7, 4));
                                }
                                else
                                {
                                    try
                                    {
                                        G.DrawString(base.GetItemText(RuntimeHelpers.GetObjectValue(base.Items[0])), font3, solidBrush3, new Point(7, 4));
                                    }
                                    catch (Exception arg_272_0)
                                    {
                                        ProjectData.SetProjectError(arg_272_0);
                                        ProjectData.ClearProjectError();
                                    }
                                }
                            }
                            else
                            {
                                using (SolidBrush solidBrush4 = new SolidBrush(AloneLibrary.ColorFromHex("#D0D3D7")))
                                {
                                    bool flag3 = SelectedIndex != -1;
                                    if (flag3)
                                    {
                                        G.DrawString(base.GetItemText(RuntimeHelpers.GetObjectValue(base.Items[SelectedIndex])), font3, solidBrush4, new Point(7, 4));
                                    }
                                    else
                                    {
                                        G.DrawString(base.GetItemText(RuntimeHelpers.GetObjectValue(base.Items[0])), font3, solidBrush4, new Point(7, 4));
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 11
0
        protected override void OnPaint(PaintEventArgs e)
        {
            G = e.Graphics;
            G.SmoothingMode     = SmoothingMode.HighQuality;
            G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
            base.OnPaint(e);
            G.Clear(BackColor);
            bool enabled = Enabled;

            if (enabled)
            {
                using (SolidBrush solidBrush = new SolidBrush(AloneLibrary.ColorFromHex("#F3F4F7")))
                {
                    using (Pen pen = new Pen(AloneLibrary.ColorFromHex("#D0D5D9")))
                    {
                        using (SolidBrush solidBrush2 = new SolidBrush(ForeColor))
                        {
                            using (Font font = new Font("Segoe UI", 9f))
                            {
                                G.FillEllipse(solidBrush, new Rectangle(0, 0, 16, 16));
                                G.DrawEllipse(pen, new Rectangle(0, 0, 16, 16));
                                G.DrawString(Text, font, solidBrush2, new Point(25, 0));
                            }
                        }
                    }
                }
                bool @checked = Checked;
                if (@checked)
                {
                    using (SolidBrush solidBrush3 = new SolidBrush(AloneLibrary.ColorFromHex("#575C62")))
                    {
                        G.FillEllipse(solidBrush3, new Rectangle(4, 4, 8, 8));
                    }
                }
            }
            else
            {
                using (SolidBrush solidBrush4 = new SolidBrush(AloneLibrary.ColorFromHex("#F5F5F8")))
                {
                    using (Pen pen2 = new Pen(AloneLibrary.ColorFromHex("#E1E1E2")))
                    {
                        using (SolidBrush solidBrush5 = new SolidBrush(AloneLibrary.ColorFromHex("#D0D3D7")))
                        {
                            using (Font font2 = new Font("Segoe UI", 9f))
                            {
                                G.FillEllipse(solidBrush4, new Rectangle(0, 0, 16, 16));
                                G.DrawEllipse(pen2, new Rectangle(0, 0, 16, 16));
                                G.DrawString(Text, font2, solidBrush5, new Point(25, 0));
                            }
                        }
                    }
                }
                bool checked2 = Checked;
                if (checked2)
                {
                    using (SolidBrush solidBrush6 = new SolidBrush(AloneLibrary.ColorFromHex("#BCC1C6")))
                    {
                        G.FillEllipse(solidBrush6, new Rectangle(4, 4, 8, 8));
                    }
                }
            }
        }