Pastebin
API
tools
faq
paste
Login
Sign up
Please fix the following errors:
New Paste
Syntax Highlighting
// aevion theme convertered to c# using System; using System.Linq; using System.Drawing; using System.Windows.Forms; using System.Drawing.Drawing2D; namespace Aevion_r2 { public static class Helper { public struct Fonts { public static Font Primary = new Font("Segoe UI", 9); public static Font PrimaryBold = new Font("Segoe UI", 9, FontStyle.Bold); } public struct Colors { public static Color Foreground = Color.White; public static Color Background = Color.FromArgb(48, 57, 65); } public enum MouseState : byte { None = 0, Hover = 1, Down = 2 } public enum Direction : byte { Up = 0, Down = 1, Left = 3, Right = 4 } public static void RoundRect(Graphics g, Int32 x, Int32 y, Int32 Width, Int32 Height, Int32 Curve, Color c) { if (Curve <= 0) throw new ArgumentException("Curve must be Greater than 0.", "Curve"); var p = new Pen(c); var BaseRect = new RectangleF(x, y, Width, Height); var ArcRect = new RectangleF(BaseRect.Location, new SizeF(Curve, Curve)); g.DrawArc(p, ArcRect, 180, 90); g.DrawLine(p, x + (Curve / 2), y, y + Width - (Curve / 2), y); ArcRect.X = BaseRect.Right - Curve; g.DrawArc(p, ArcRect, 270, 90); g.DrawLine(p, x + Width, y + (Curve / 2), x + Width, y + Height - (Curve / 2)); ArcRect.Y = BaseRect.Bottom - Curve; g.DrawArc(p, ArcRect, 0, 90); g.DrawLine(p, x + (Curve / 2), y + Height, x + Width - (Curve / 2), y + Height); ArcRect.X = BaseRect.Left; g.DrawArc(p, ArcRect, 90, 30); g.DrawLine(p, x, y + (Curve / 2), x, y + Height - (Curve / 2)); p.Dispose(); } public static void DrawTriangle(Graphics g, Rectangle r, Direction d, Color c) { var w = r.Width/2; var y = r.Height/2; Point p0 = Point.Empty, p1 = Point.Empty, p2 = Point.Empty; switch (d) { case Direction.Up: p0 = new Point(r.Left + w, r.Top); p1 = new Point(r.Left, r.Bottom); p2 = new Point(r.Right, r.Bottom); break; case Direction.Down: p0 = new Point(r.Left + w, r.Bottom); p1 = new Point(r.Left, r.Top); p2 = new Point(r.Right, r.Top); break; case Direction.Left: p0 = new Point(r.Left, r.Top + y); p1 = new Point(r.Right, r.Top); p2 = new Point(r.Right, r.Bottom); break; case Direction.Right: p0 = new Point(r.Right, r.Top + y); p1 = new Point(r.Left, r.Bottom); p2 = new Point(r.Left, r.Top); break; } var s = new SolidBrush(c); g.FillPolygon(s, new [] {p0, p1, p2}); MultiDispose(s); } public static void CenterString(Graphics g, String Text, Font Font, Color c, Rectangle rect, Boolean Shadow = false, Int32 yOffset = 1) { CenterString(g, Text, Font, new SolidBrush(c), rect, Shadow, yOffset); } public static void CenterString(Graphics g, String Text, Font Font, Brush b, Rectangle rect, Boolean Shadow = false, Int32 yOffset = 1) { var TextSize = g.MeasureString(Text, Font); var x = rect.X + (rect.Width / 2) - (TextSize.Width / 2); var y = rect.Y + (rect.Height / 2) - (TextSize.Height / 2) + yOffset; if (Shadow) g.DrawString(Text, Font, Brushes.Black, x + 1, y + 1); g.DrawString(Text, Font, b, x, y); b.Dispose(); } public static Single ValueToPercentage(Int32 Value, Int32 Maximum, Int32 Minimum) { return (Single)(Value - Minimum) / (Maximum - Minimum); } public static void MultiDispose(params IDisposable[] Disposables) { foreach (var Disposable in Disposables.Where(Disposable => Disposable != null)) { Disposable.Dispose(); } } } sealed class AevionForm : Control { public AevionForm() { DoubleBuffered = true; Font = Helper.Fonts.Primary; ForeColor = Helper.Colors.Foreground; BackColor = Helper.Colors.Background; Dock = DockStyle.Fill; } protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); var g = e.Graphics; g.SmoothingMode=SmoothingMode.HighQuality; g.Clear(Helper.Colors.Background); } } sealed class AevionButton : Button { private Helper.MouseState State = Helper.MouseState.None; private LinearGradientBrush l1, l2, l3 = null; public enum Style { Default, Green, Red } private Style _ButtonStyle = Style.Default; private Image _Icon; private Boolean _ShowIcon = false; public Style ButtonStyle { get { return _ButtonStyle; } set { _ButtonStyle = value; Invalidate(); } } public Image Icon { get { return _Icon; } set { _Icon = value; Invalidate(); } } public Boolean ShowIcon { get { return _ShowIcon; } set { _ShowIcon = value; Invalidate(); } } public override string Text { get { return base.Text; } set { base.Text = value; Invalidate(); } } public override Font Font { get { return base.Font; } set { base.Font = value; Invalidate(); } } public AevionButton() { DoubleBuffered = true; Font = Helper.Fonts.PrimaryBold; SetStyle(ControlStyles.UserPaint | ControlStyles.SupportsTransparentBackColor, true); } protected override void OnMouseDown(MouseEventArgs mevent) { base.OnMouseDown(mevent); State = Helper.MouseState.Down; Invalidate(); } protected override void OnMouseUp(MouseEventArgs mevent) { base.OnMouseUp(mevent); State = Helper.MouseState.None; Invalidate(); } protected override void OnMouseEnter(EventArgs e) { base.OnMouseEnter(e); State = Helper.MouseState.Hover; Invalidate(); } protected override void OnMouseLeave(EventArgs e) { base.OnMouseLeave(e); State = Helper.MouseState.None; Invalidate(); } protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); var g = e.Graphics; g.SmoothingMode = SmoothingMode.HighQuality; g.Clear(Helper.Colors.Background); switch (ButtonStyle) { case Style.Default: l1 = new LinearGradientBrush(new Rectangle(0, 0, Width, Height + 35), Color.FromArgb(88, 105, 123), Color.Black, LinearGradientMode.Vertical); l2 = new LinearGradientBrush(new Rectangle(0, 0, Width, Height + 35), Color.FromArgb(108, 125, 143), Color.Black, LinearGradientMode.Vertical); l3 = new LinearGradientBrush(new Rectangle(0, 0, Width, Height + 35), Color.FromArgb(98, 115, 133), Color.Black, LinearGradientMode.Vertical); break; case Style.Red: l1 = new LinearGradientBrush(new Rectangle(0, 0, Width, Height + 35), Color.FromArgb(173, 83, 74), Color.Black, LinearGradientMode.Vertical); l2 = new LinearGradientBrush(new Rectangle(0, 0, Width, Height + 35), Color.FromArgb(193, 103, 94), Color.Black, LinearGradientMode.Vertical); l3 = new LinearGradientBrush(new Rectangle(0, 0, Width, Height + 35), Color.FromArgb(183, 93, 84), Color.Black, LinearGradientMode.Vertical); break; case Style.Green: l1 = new LinearGradientBrush(new Rectangle(0, 0, Width, Height + 35), Color.FromArgb(127, 177, 80), Color.Black, LinearGradientMode.Vertical); l2 = new LinearGradientBrush(new Rectangle(0, 0, Width, Height + 35), Color.FromArgb(157, 197, 100), Color.Black, LinearGradientMode.Vertical); l3 = new LinearGradientBrush(new Rectangle(0, 0, Width, Height + 35), Color.FromArgb(147, 187, 90), Color.Black, LinearGradientMode.Vertical); break; } switch (State) { case Helper.MouseState.Down: g.FillRectangle(l1, new Rectangle(1, 1, Width - 2, Height - 2)); break; case Helper.MouseState.Hover: g.FillRectangle(l2, new Rectangle(1, 1, Width - 2, Height - 2)); break; case Helper.MouseState.None: g.FillRectangle(l3, new Rectangle(1, 1, Width - 2, Height - 2)); break; } Helper.RoundRect(g, 0, 0, Width - 1, Height - 1, 3, Color.FromArgb(38, 38, 38)); if (ShowIcon) g.DrawImage(Icon, new Point(Width / 8, Height / 2 - 8)); Helper.CenterString(g, Text, Font, Helper.Colors.Foreground, new Rectangle(0, 0, Width, Height)); } } sealed class AevionRadioButton : Control { public event EventHandler CheckedChanged = delegate { }; private Boolean _Checked; public Boolean Checked { get { return _Checked; } set { _Checked = value; Invalidate(); CheckedChanged(this, new EventArgs()); } } public override string Text { get { return base.Text; } set { base.Text = value; Invalidate(); } } public override Font Font { get { return base.Font; } set { base.Font = value; Invalidate(); } } public AevionRadioButton() { DoubleBuffered = true; Size = new Size(Width, 16); Font = Helper.Fonts.Primary; SetStyle(ControlStyles.UserPaint | ControlStyles.SupportsTransparentBackColor, true); } protected override void OnResize(EventArgs e) { base.OnResize(e); Size = new Size(Width, 16); } protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp(e); Checked = !Checked; } protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); var g = e.Graphics; var p = new Pen(Color.FromArgb(35, 35, 40)); var s = new SolidBrush(Color.FromArgb(220, 220, 255)); g.SmoothingMode = SmoothingMode.HighQuality; g.Clear(Helper.Colors.Background); var l = new LinearGradientBrush(new Rectangle(0, 0, Width, Height + 35), Color.FromArgb(98, 115, 133), Color.Black, LinearGradientMode.Vertical); g.FillEllipse(l, new Rectangle(1, 1, 14, 14)); g.DrawEllipse(p, new Rectangle(5, 5, 5, 5)); if (Checked) g.FillEllipse(s, new Rectangle(5, 5, 5, 5)); s.Color = Helper.Colors.Foreground; g.DrawString(Text, Font, s, new PointF(20, 0)); Helper.MultiDispose(s, p, l); } } sealed class AevionCheckBox : Control { public event EventHandler CheckedChanged = delegate { }; private Boolean _Checked; public Boolean Checked { get { return _Checked; } set { _Checked = value; Invalidate(); CheckedChanged(this, new EventArgs()); } } public override string Text { get { return base.Text; } set { base.Text = value; Invalidate(); } } public override Font Font { get { return base.Font; } set { base.Font = value; Invalidate(); } } public AevionCheckBox() { DoubleBuffered = true; Font = Helper.Fonts.Primary; Size = new Size(Width, 16); } protected override void OnResize(EventArgs e) { base.OnResize(e); Size = new Size(Width, 16); } protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp(e); Checked = !Checked; } protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); var g = e.Graphics; var s = new SolidBrush(Helper.Colors.Foreground); var l = new LinearGradientBrush(new Rectangle(0, 0, Width, Height + 35), Color.FromArgb(98, 115, 133), Color.Black, LinearGradientMode.Vertical); g.SmoothingMode = SmoothingMode.HighQuality; g.Clear(Helper.Colors.Background); g.FillRectangle(l, new Rectangle(1, 1, 13, 13)); Helper.RoundRect(g, 0, 0, 14, 14, 3, Color.FromArgb(35, 35, 40)); if (Checked) Helper.CenterString(g, "b", new Font("Marlett", 10), Helper.Colors.Foreground, new Rectangle(2, 1, 13, 13)); g.DrawString(Text, Font, s, new Point(20, -1)); Helper.MultiDispose(s, l); } } sealed class AevionProgressBar : Control { private Int32 _Maximum = 100; private Int32 _Minimum, _Value = 0; private Boolean _ShowText = true; public Int32 Maximum { get { return _Maximum; } set { if (value > Int32.MaxValue) throw new OverflowException(); if (value < _Minimum) _Minimum = value - 1; if (_Value > _Maximum) _Value = value; _Maximum = value; Invalidate(); } } public Int32 Minimum { get { return _Minimum; } set { if (value < 0) throw new ArgumentOutOfRangeException("Minimum", "Value cannot go below 0."); if (value < _Minimum) _Value = value; if (value > _Maximum) _Maximum = value + 1; _Minimum = value; Invalidate(); } } public Int32 Value { get { return _Value; } set { if (value > _Maximum) _Value = _Maximum; else if (value < _Minimum) _Value = _Minimum; else _Value = value; Invalidate(); } } public Boolean ShowText { get { return _ShowText; } set { _ShowText = value; Invalidate(); } } public override string Text { get { return base.Text; } set { base.Text = value; Invalidate(); } } public override Font Font { get { return base.Font; } set { base.Font = value; Invalidate(); } } public AevionProgressBar() { DoubleBuffered = true; Font = Helper.Fonts.Primary; } protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); var g = e.Graphics; var l = new LinearGradientBrush(new Point(0, 0), new Point(Width + Value + 50, Height), Color.FromArgb(98, 115, 133), Color.Black); g.SmoothingMode = SmoothingMode.HighQuality; g.Clear(Helper.Colors.Background); g.FillRectangle(l, new Rectangle(0, 0, (int)(Helper.ValueToPercentage(Value, Maximum, Minimum) * Width), Height)); Helper.RoundRect(g, 0, 0, Width - 1, Height - 1, 3, Color.FromArgb(38, 38, 38)); if (ShowText) Helper.CenterString(g, Text, Font, Helper.Colors.Foreground, new Rectangle(0, 0, Width, Height)); Helper.MultiDispose(l); } } sealed class AevionNotice : TextBox { public AevionNotice() { DoubleBuffered = true; Font = Helper.Fonts.Primary; Enabled = false; Multiline = true; BorderStyle = BorderStyle.None; SetStyle(ControlStyles.UserPaint | ControlStyles.SupportsTransparentBackColor, true); } protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); var g = e.Graphics; var s = new SolidBrush(Color.FromArgb(38, 38, 38)); g.SmoothingMode = SmoothingMode.HighQuality; g.Clear(Helper.Colors.Background); g.FillRectangle(s, new Rectangle(1, 1, Width - 2, Height - 2)); Helper.RoundRect(g, 0, 0, Width - 1, Height - 1, 3, Color.FromArgb(35, 35, 40)); s.Color = Helper.Colors.Foreground; g.DrawString(Text, Font, s, new Point(12, 8)); } } sealed class AevionLabel : Label { public AevionLabel() { DoubleBuffered = true; Font = Helper.Fonts.Primary; ForeColor = Helper.Colors.Foreground; BackColor = Helper.Colors.Background; } } }
Optional Paste Settings
Category:
None
Cryptocurrency
Cybersecurity
Fixit
Food
Gaming
Haiku
Help
History
Housing
Jokes
Legal
Money
Movies
Music
Pets
Photo
Science
Software
Source Code
Spirit
Sports
Travel
TV
Writing
Tags:
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
JSON
Java
JavaScript
Lua
Markdown (PRO members only)
Objective C
PHP
Perl
Python
Ruby
Swift
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
AIMMS
ALGOL 68
APT Sources
ARM
ASM (NASM)
ASP
ActionScript
ActionScript 3
Ada
Apache Log
AppleScript
Arduino
Asymptote
AutoIt
Autohotkey
Avisynth
Awk
BASCOM AVR
BNF
BOO
Bash
Basic4GL
Batch
BibTeX
Blitz Basic
Blitz3D
BlitzMax
BrainFuck
C
C (WinAPI)
C Intermediate Language
C for Macs
C#
C++
C++ (WinAPI)
C++ (with Qt extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
CMake
COBOL
CSS
Ceylon
ChaiScript
Chapel
Clojure
Clone C
Clone C++
CoffeeScript
ColdFusion
Cuesheet
D
DCL
DCPU-16
DCS
DIV
DOT
Dart
Delphi
Delphi Prism (Oxygene)
Diff
E
ECMAScript
EPC
Easytrieve
Eiffel
Email
Erlang
Euphoria
F#
FO Language
Falcon
Filemaker
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
GDB
GDScript
Game Maker
Genero
Genie
GetText
Go
Godot GLSL
Groovy
GwBasic
HQ9 Plus
HTML
HTML 5
Haskell
Haxe
HicEst
IDL
INI file
INTERCAL
IO
ISPF Panel Definition
Icon
Inno Script
J
JCL
JSON
Java
Java 5
JavaScript
Julia
KSP (Kontakt Script)
KiXtart
Kotlin
LDIF
LLVM
LOL Code
LScript
Latex
Liberty BASIC
Linden Scripting
Lisp
Loco Basic
Logtalk
Lotus Formulas
Lotus Script
Lua
M68000 Assembler
MIX Assembler
MK-61/52
MPASM
MXML
MagikSF
Make
MapBasic
Markdown (PRO members only)
MatLab
Mercury
MetaPost
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MySQL
Nagios
NetRexx
Nginx
Nim
NullSoft Installer
OCaml
OCaml Brief
Oberon 2
Objeck Programming Langua
Objective C
Octave
Open Object Rexx
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
PARI/GP
PCRE
PHP
PHP Brief
PL/I
PL/SQL
POV-Ray
ParaSail
Pascal
Pawn
Per
Perl
Perl 6
Phix
Pic 16
Pike
Pixel Bender
PostScript
PostgreSQL
PowerBuilder
PowerShell
ProFTPd
Progress
Prolog
Properties
ProvideX
Puppet
PureBasic
PyCon
Python
Python for S60
QBasic
QML
R
RBScript
REBOL
REG
RPM Spec
Racket
Rails
Rexx
Robots
Roff Manpage
Ruby
Ruby Gnuplot
Rust
SAS
SCL
SPARK
SPARQL
SQF
SQL
SSH Config
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
StandardML
StoneScript
SuperCollider
Swift
SystemVerilog
T-SQL
TCL
TeXgraph
Tera Term
TypeScript
TypoScript
UPC
Unicon
UnrealScript
Urbi
VB.NET
VBScript
VHDL
VIM
Vala
Vedit
VeriLog
Visual Pro Log
VisualBasic
VisualFoxPro
WHOIS
WhiteSpace
Winbatch
XBasic
XML
XPP
Xojo
Xorg Config
YAML
YARA
Z80 Assembler
ZXBasic
autoconf
jQuery
mIRC
newLISP
q/kdb+
thinBasic
Paste Expiration:
Never
Burn after read
10 Minutes
1 Hour
1 Day
1 Week
2 Weeks
1 Month
6 Months
1 Year
Paste Exposure:
Public
Unlisted
Private
Folder:
(members only)
Password
NEW
Enabled
Disabled
Burn after read
NEW
Paste Name / Title:
Create New Paste
Hello
Guest
Sign Up
or
Login
Sign in with Facebook
Sign in with Twitter
Sign in with Google
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login
Public Pastes
Untitled
12 hours ago | 13.15 KB
Analog GPUs: THE FUTURE
18 hours ago | 8.88 KB
Quotes I believe to be true.
18 hours ago | 0.16 KB
Die 7 wichtigsten Aktionen diese Woche
1 day ago | 4.17 KB
Untitled
1 day ago | 13.34 KB
Untitled
1 day ago | 13.59 KB
VNC SCRIPT 2/2: autoinput.vbs
VBScript | 1 day ago | 0.23 KB
VNC SCRIPT 1/2: vncauto.bat
Batch | 1 day ago | 0.72 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!