Add source

This commit is contained in:
hexadecimal
2025-04-24 20:51:29 +03:00
parent 9badc969b8
commit e3c1cdea0e
92 changed files with 13471 additions and 0 deletions
+300
View File
@@ -0,0 +1,300 @@
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Design;
using System.Windows.Forms;
using Bunifu.Licensing.Properties;
namespace Bunifu.Licensing.Views.Controls
{
// Token: 0x02000022 RID: 34
[ToolboxItem(false)]
[DebuggerStepThrough]
[DefaultEvent("Click")]
[DefaultProperty("Hidden")]
[Description("Provides a call-to-action alert message view.")]
internal class Alert : UserControl
{
// Token: 0x0600017A RID: 378 RVA: 0x00014E1D File Offset: 0x0001301D
public Alert()
{
this.InitializeComponent();
this.ImproveTextRendering();
this.ResizeSurface();
}
// Token: 0x17000024 RID: 36
// (get) Token: 0x0600017B RID: 379 RVA: 0x00014E58 File Offset: 0x00013058
// (set) Token: 0x0600017C RID: 380 RVA: 0x00014E60 File Offset: 0x00013060
[Category("Appearance")]
[Description("Sets a value indicating whether the alert components will be displayed.")]
public bool Hidden
{
get
{
return this._hidden;
}
set
{
this._hidden = value;
if (value)
{
this.pbIcon.Hide();
this.lblMessage.Hide();
this.boxContainer.Hide();
this.lstProducts.Hide();
this.btnActivate.Hide();
base.Hide();
}
else
{
this.pbIcon.Show();
this.lblMessage.Show();
this.boxContainer.Show();
this.lstProducts.Show();
this.btnActivate.Show();
base.Show();
}
}
}
// Token: 0x17000025 RID: 37
// (get) Token: 0x0600017D RID: 381 RVA: 0x00014F08 File Offset: 0x00013108
[Browsable(true)]
[Category("Appearance")]
[ParenthesizePropertyName(true)]
[Description("Sets the list of product items.")]
[Editor("System.Windows.Forms.Design.StringCollectionEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public CheckedListBox.ObjectCollection Items
{
get
{
this.ResizeSurface();
return this.lstProducts.Items;
}
}
// Token: 0x17000026 RID: 38
// (get) Token: 0x0600017E RID: 382 RVA: 0x00014F2C File Offset: 0x0001312C
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public CheckedListBox.CheckedItemCollection CheckedItems
{
get
{
return this.lstProducts.CheckedItems;
}
}
// Token: 0x0600017F RID: 383 RVA: 0x00014F49 File Offset: 0x00013149
private void ImproveTextRendering()
{
this.lblMessage.UseCompatibleTextRendering = false;
this.lstProducts.UseCompatibleTextRendering = false;
this.btnActivate.UseCompatibleTextRendering = false;
}
// Token: 0x06000180 RID: 384 RVA: 0x00014F74 File Offset: 0x00013174
public void ResizeSurface()
{
this.lstProducts.Top = this.lblMessage.Bottom + 10;
this.lstProducts.Height = 28 * this.lstProducts.Items.Count;
base.Height = this.lblMessage.Height + this.lblMessage.Top * 2 + 22 * this.lstProducts.Items.Count + this.btnActivate.Height + 15;
this.btnActivate.Left = base.Width - this.btnActivate.Width - 4;
this.btnCancel.Left = this.btnActivate.Left - this.btnCancel.Width;
this.btnActivate.Top = base.Height - this.btnActivate.Height - 4;
this.btnCancel.Top = this.btnActivate.Top;
this.boxContainer.Height = base.Height;
this.boxContainer.Width = base.Width;
base.Invalidate();
this.Refresh();
}
// Token: 0x14000002 RID: 2
// (add) Token: 0x06000181 RID: 385 RVA: 0x000150AC File Offset: 0x000132AC
// (remove) Token: 0x06000182 RID: 386 RVA: 0x000150E4 File Offset: 0x000132E4
[Category("Bunifu Events")]
[Description("Occurs whenever the 'Activate' button has been clicked.")]
[field: DebuggerBrowsable(DebuggerBrowsableState.Never)]
public event EventHandler ActivateClicked = null;
// Token: 0x14000003 RID: 3
// (add) Token: 0x06000183 RID: 387 RVA: 0x0001511C File Offset: 0x0001331C
// (remove) Token: 0x06000184 RID: 388 RVA: 0x00015154 File Offset: 0x00013354
[Category("Bunifu Events")]
[Description("Occurs whenever the 'Cancel' button has been clicked.")]
[field: DebuggerBrowsable(DebuggerBrowsableState.Never)]
public event EventHandler CancelClicked = null;
// Token: 0x06000185 RID: 389 RVA: 0x00015189 File Offset: 0x00013389
protected override void OnResize(EventArgs e)
{
base.OnResize(e);
this.ResizeSurface();
}
// Token: 0x06000186 RID: 390 RVA: 0x0001519B File Offset: 0x0001339B
private void OnClickActivate(object sender, EventArgs e)
{
EventHandler activateClicked = this.ActivateClicked;
if (activateClicked != null)
{
activateClicked(this, e);
}
}
// Token: 0x06000187 RID: 391 RVA: 0x000151B2 File Offset: 0x000133B2
private void OnClickCancel(object sender, EventArgs e)
{
EventHandler cancelClicked = this.CancelClicked;
if (cancelClicked != null)
{
cancelClicked(this, e);
}
}
// Token: 0x06000188 RID: 392 RVA: 0x000151C9 File Offset: 0x000133C9
private void OnClickLink(object sender, LinkLabelLinkClickedEventArgs e)
{
Process.Start("https://bunifuframework.com/free-download");
}
// Token: 0x06000189 RID: 393 RVA: 0x000151D8 File Offset: 0x000133D8
protected override void Dispose(bool disposing)
{
bool flag = disposing && this.components != null;
if (flag)
{
this.components.Dispose();
}
base.Dispose(disposing);
}
// Token: 0x0600018A RID: 394 RVA: 0x00015210 File Offset: 0x00013410
private void InitializeComponent()
{
this.components = new Container();
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(Alert));
this.lblMessage = new Label();
this.pbIcon = new PictureBox();
this.btnActivate = new Button();
this.lstProducts = new CheckedListBox();
this.btnCancel = new Button();
this.toolTip = new ToolTip(this.components);
this.boxContainer = new Box();
((ISupportInitialize)this.pbIcon).BeginInit();
base.SuspendLayout();
this.lblMessage.AutoEllipsis = true;
this.lblMessage.AutoSize = true;
this.lblMessage.BackColor = Color.Transparent;
this.lblMessage.Cursor = Cursors.Arrow;
this.lblMessage.Font = new Font("Segoe UI", 9f);
this.lblMessage.ForeColor = Color.Black;
this.lblMessage.Location = new Point(30, 7);
this.lblMessage.MaximumSize = new Size(340, 0);
this.lblMessage.Name = "lblMessage";
this.lblMessage.Size = new Size(317, 30);
this.lblMessage.TabIndex = 53;
this.lblMessage.Text = "Your license also allows activating the following additional products: (Check and click 'Activate')";
this.pbIcon.Image = Resources.yellow_warning;
this.pbIcon.Location = new Point(7, 7);
this.pbIcon.Name = "pbIcon";
this.pbIcon.Size = new Size(19, 18);
this.pbIcon.SizeMode = PictureBoxSizeMode.Zoom;
this.pbIcon.TabIndex = 59;
this.pbIcon.TabStop = false;
this.btnActivate.Anchor = AnchorStyles.Right;
this.btnActivate.BackColor = Color.FromArgb(255, 202, 40);
this.btnActivate.Cursor = Cursors.Hand;
this.btnActivate.FlatAppearance.BorderColor = Color.FromArgb(255, 202, 40);
this.btnActivate.FlatStyle = FlatStyle.Flat;
this.btnActivate.Font = new Font("Segoe UI", 9f);
this.btnActivate.ForeColor = Color.Black;
this.btnActivate.Location = new Point(294, 88);
this.btnActivate.Name = "btnActivate";
this.btnActivate.Size = new Size(96, 29);
this.btnActivate.TabIndex = 60;
this.btnActivate.Text = "Activate";
this.toolTip.SetToolTip(this.btnActivate, "Activate products");
this.btnActivate.UseVisualStyleBackColor = false;
this.btnActivate.Click += this.OnClickActivate;
this.lstProducts.BackColor = Color.FromArgb(255, 251, 230);
this.lstProducts.BorderStyle = BorderStyle.None;
this.lstProducts.CheckOnClick = true;
this.lstProducts.Cursor = Cursors.Default;
this.lstProducts.Font = new Font("Segoe UI", 9f);
this.lstProducts.ForeColor = Color.Black;
this.lstProducts.FormattingEnabled = true;
this.lstProducts.Location = new Point(31, 56);
this.lstProducts.Name = "lstProducts";
this.lstProducts.Size = new Size(263, 18);
this.lstProducts.TabIndex = 61;
this.btnCancel.Anchor = AnchorStyles.Right;
this.btnCancel.BackColor = Color.Transparent;
this.btnCancel.Cursor = Cursors.Hand;
this.btnCancel.FlatAppearance.BorderColor = Color.FromArgb(255, 202, 40);
this.btnCancel.FlatStyle = FlatStyle.Flat;
this.btnCancel.Font = new Font("Segoe UI", 9f);
this.btnCancel.ForeColor = Color.FromArgb(170, 134, 26);
this.btnCancel.Image = (Image)componentResourceManager.GetObject("btnCancel.Image");
this.btnCancel.Location = new Point(260, 88);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new Size(34, 29);
this.btnCancel.TabIndex = 62;
this.toolTip.SetToolTip(this.btnCancel, "Hide message");
this.btnCancel.UseVisualStyleBackColor = false;
this.btnCancel.Click += this.OnClickCancel;
this.boxContainer.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
this.boxContainer.BackColor = Color.FromArgb(255, 251, 230);
this.boxContainer.ForeColor = Color.Black;
this.boxContainer.LineColor = Color.FromArgb(255, 229, 143);
this.boxContainer.LineStyle = Box.LineStyles.Solid;
this.boxContainer.Location = new Point(0, 0);
this.boxContainer.Name = "boxContainer";
this.boxContainer.Size = new Size(393, 120);
this.boxContainer.TabIndex = 58;
base.AutoScaleMode = AutoScaleMode.None;
this.BackColor = Color.FromArgb(255, 251, 230);
base.Controls.Add(this.btnCancel);
base.Controls.Add(this.lstProducts);
base.Controls.Add(this.btnActivate);
base.Controls.Add(this.pbIcon);
base.Controls.Add(this.lblMessage);
base.Controls.Add(this.boxContainer);
base.Name = "Alert";
base.Size = new Size(393, 120);
((ISupportInitialize)this.pbIcon).EndInit();
base.ResumeLayout(false);
base.PerformLayout();
}
// Token: 0x04000114 RID: 276
private bool _hidden = false;
// Token: 0x04000117 RID: 279
private IContainer components = null;
// Token: 0x04000118 RID: 280
private Box boxContainer;
// Token: 0x04000119 RID: 281
private PictureBox pbIcon;
// Token: 0x0400011A RID: 282
private Button btnActivate;
// Token: 0x0400011B RID: 283
public CheckedListBox lstProducts;
// Token: 0x0400011C RID: 284
public Label lblMessage;
// Token: 0x0400011D RID: 285
private Button btnCancel;
// Token: 0x0400011E RID: 286
private ToolTip toolTip;
}
}
Binary file not shown.
+192
View File
@@ -0,0 +1,192 @@
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
namespace Bunifu.Licensing.Views.Controls
{
// Token: 0x02000023 RID: 35
[ToolboxItem(false)]
[DebuggerStepThrough]
[DefaultEvent("Click")]
[DefaultProperty("LineColor")]
[Description("Provides a standard, gradient-filled Bunifu Tab Lines.")]
internal class Box : UserControl
{
// Token: 0x0600018B RID: 395 RVA: 0x000158A4 File Offset: 0x00013AA4
public Box()
{
this.InitializeComponent();
base.SetStyle(ControlStyles.UserPaint, true);
base.SetStyle(ControlStyles.ResizeRedraw, true);
base.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
base.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
base.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
this.ProvideDefaults();
}
// Token: 0x17000027 RID: 39
// (get) Token: 0x0600018C RID: 396 RVA: 0x0001592C File Offset: 0x00013B2C
// (set) Token: 0x0600018D RID: 397 RVA: 0x00015944 File Offset: 0x00013B44
[DefaultValue(true)]
[Category("Bunifu Properties")]
[Description("Sets the box line color.")]
public Color LineColor
{
get
{
return this._lineColor;
}
set
{
this._lineColor = value;
base.Invalidate();
EventHandler lineColorChanged = this.LineColorChanged;
if (lineColorChanged != null)
{
lineColorChanged(this, EventArgs.Empty);
}
}
}
// Token: 0x17000028 RID: 40
// (get) Token: 0x0600018E RID: 398 RVA: 0x0001596D File Offset: 0x00013B6D
// (set) Token: 0x0600018F RID: 399 RVA: 0x00015975 File Offset: 0x00013B75
[Category("Bunifu Properties")]
[Description("Sets the box line style.")]
public Box.LineStyles LineStyle
{
get
{
return this._lineStyle;
}
set
{
this._lineStyle = value;
base.Invalidate();
}
}
// Token: 0x17000029 RID: 41
// (get) Token: 0x06000190 RID: 400 RVA: 0x00015986 File Offset: 0x00013B86
// (set) Token: 0x06000191 RID: 401 RVA: 0x0001598E File Offset: 0x00013B8E
[Browsable(true)]
public override Color BackColor
{
get
{
return base.BackColor;
}
set
{
base.BackColor = value;
}
}
// Token: 0x06000192 RID: 402 RVA: 0x00015998 File Offset: 0x00013B98
private void ProvideDefaults()
{
try
{
this.LineColor = Color.DodgerBlue;
this.BackColor = Color.Transparent;
}
catch (Exception)
{
}
}
// Token: 0x14000004 RID: 4
// (add) Token: 0x06000193 RID: 403 RVA: 0x000159D8 File Offset: 0x00013BD8
// (remove) Token: 0x06000194 RID: 404 RVA: 0x00015A10 File Offset: 0x00013C10
[Category("Bunifu Events")]
[Description("Occurs whenever the 'LineColor' property has been changed.")]
[field: DebuggerBrowsable(DebuggerBrowsableState.Never)]
public event EventHandler LineColorChanged = null;
// Token: 0x06000195 RID: 405 RVA: 0x00015A48 File Offset: 0x00013C48
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
try
{
using (Pen pen = new Pen(this.LineColor, 1f))
{
bool flag = this._lineStyle == Box.LineStyles.Solid;
if (flag)
{
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
pen.DashStyle = DashStyle.Solid;
}
else
{
bool flag2 = this._lineStyle == Box.LineStyles.Dashed;
if (flag2)
{
e.Graphics.SmoothingMode = SmoothingMode.Default;
pen.DashStyle = DashStyle.Dash;
}
else
{
bool flag3 = this._lineStyle == Box.LineStyles.Dotted;
if (flag3)
{
e.Graphics.SmoothingMode = SmoothingMode.Default;
pen.DashStyle = DashStyle.Dot;
}
}
}
e.Graphics.DrawRectangle(pen, 0, 0, base.Width - 1, base.Height - 1);
}
}
catch (Exception)
{
}
}
// Token: 0x06000196 RID: 406 RVA: 0x00015B34 File Offset: 0x00013D34
protected override void Dispose(bool disposing)
{
bool flag = disposing && this.components != null;
if (flag)
{
this.components.Dispose();
}
base.Dispose(disposing);
}
// Token: 0x06000197 RID: 407 RVA: 0x00015B6C File Offset: 0x00013D6C
private void InitializeComponent()
{
base.SuspendLayout();
base.AutoScaleMode = AutoScaleMode.None;
this.BackColor = SystemColors.Control;
this.DoubleBuffered = true;
base.Name = "Box";
base.Size = new Size(75, 30);
base.ResumeLayout(false);
}
// Token: 0x0400011F RID: 287
private Box.LineStyles _lineStyle = Box.LineStyles.Solid;
// Token: 0x04000120 RID: 288
private Color _lineColor = Color.FromArgb(23, 122, 235);
// Token: 0x04000122 RID: 290
private IContainer components = null;
// Token: 0x02000048 RID: 72
public enum LineStyles
{
// Token: 0x040001BD RID: 445
Solid,
// Token: 0x040001BE RID: 446
Dashed,
// Token: 0x040001BF RID: 447
Dotted
}
}
}
Binary file not shown.
@@ -0,0 +1,166 @@
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;
namespace Bunifu.Licensing.Views.Controls
{
// Token: 0x02000024 RID: 36
[ToolboxItem(false)]
[DebuggerStepThrough]
[DefaultEvent("Click")]
[DefaultProperty("Hidden")]
[Description("Provides a free-trial message view in the activation window.")]
internal class FreeTrialMessage : UserControl
{
// Token: 0x06000198 RID: 408 RVA: 0x00015BC1 File Offset: 0x00013DC1
public FreeTrialMessage()
{
this.InitializeComponent();
this.ImproveTextRendering();
}
// Token: 0x1700002A RID: 42
// (get) Token: 0x06000199 RID: 409 RVA: 0x00015BE7 File Offset: 0x00013DE7
// (set) Token: 0x0600019A RID: 410 RVA: 0x00015BF0 File Offset: 0x00013DF0
[Category("Appearance")]
[Description("Sets a value indicating whether the free-trial message's components will be displayed.")]
public bool Hidden
{
get
{
return this._hidden;
}
set
{
this._hidden = value;
if (value)
{
this.lblMessage.Hide();
this.lblSideQuote.Hide();
this.lblQuoteContainer.Hide();
this.lnkFreeTrialSignup.Hide();
}
else
{
this.lblMessage.Show();
this.lblSideQuote.Show();
this.lblQuoteContainer.Show();
this.lnkFreeTrialSignup.Show();
}
}
}
// Token: 0x0600019B RID: 411 RVA: 0x00015C70 File Offset: 0x00013E70
private void ImproveTextRendering()
{
this.lblMessage.UseCompatibleTextRendering = false;
this.lblSideQuote.UseCompatibleTextRendering = false;
this.lblQuoteContainer.UseCompatibleTextRendering = false;
this.lnkFreeTrialSignup.UseCompatibleTextRendering = false;
}
// Token: 0x0600019C RID: 412 RVA: 0x00015CA7 File Offset: 0x00013EA7
private void lnkFreeTrialSignup_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Process.Start("https://bunifuframework.com/free-download");
}
// Token: 0x0600019D RID: 413 RVA: 0x00015CB8 File Offset: 0x00013EB8
protected override void Dispose(bool disposing)
{
bool flag = disposing && this.components != null;
if (flag)
{
this.components.Dispose();
}
base.Dispose(disposing);
}
// Token: 0x0600019E RID: 414 RVA: 0x00015CF0 File Offset: 0x00013EF0
private void InitializeComponent()
{
this.components = new Container();
this.lblMessage = new Label();
this.lnkFreeTrialSignup = new LinkLabel();
this.lblSideQuote = new Label();
this.lblQuoteContainer = new Label();
this.toolTip = new ToolTip(this.components);
base.SuspendLayout();
this.lblMessage.Anchor = AnchorStyles.Left;
this.lblMessage.AutoSize = true;
this.lblMessage.BackColor = Color.FromArgb(235, 244, 255);
this.lblMessage.Font = new Font("Segoe UI", 9f);
this.lblMessage.ForeColor = Color.FromArgb(64, 64, 64);
this.lblMessage.Location = new Point(20, 14);
this.lblMessage.Name = "lblMessage";
this.lblMessage.Size = new Size(292, 15);
this.lblMessage.TabIndex = 12;
this.lblMessage.Text = "If you haven't yet registered for a free trial, please visit:";
this.lnkFreeTrialSignup.ActiveLinkColor = Color.LimeGreen;
this.lnkFreeTrialSignup.Anchor = AnchorStyles.Left;
this.lnkFreeTrialSignup.AutoSize = true;
this.lnkFreeTrialSignup.BackColor = Color.FromArgb(235, 244, 255);
this.lnkFreeTrialSignup.Font = new Font("Segoe UI", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
this.lnkFreeTrialSignup.LinkBehavior = LinkBehavior.AlwaysUnderline;
this.lnkFreeTrialSignup.LinkColor = Color.DodgerBlue;
this.lnkFreeTrialSignup.Location = new Point(20, 30);
this.lnkFreeTrialSignup.Name = "lnkFreeTrialSignup";
this.lnkFreeTrialSignup.Size = new Size(249, 15);
this.lnkFreeTrialSignup.TabIndex = 13;
this.lnkFreeTrialSignup.TabStop = true;
this.lnkFreeTrialSignup.Text = "https://bunifuframework.com/free-download";
this.toolTip.SetToolTip(this.lnkFreeTrialSignup, "Register with your email for a 14-day free trial...");
this.lnkFreeTrialSignup.LinkClicked += this.lnkFreeTrialSignup_LinkClicked;
this.lblSideQuote.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left;
this.lblSideQuote.BackColor = Color.FromArgb(105, 181, 255);
this.lblSideQuote.Font = new Font("Segoe UI", 9f);
this.lblSideQuote.ForeColor = Color.Black;
this.lblSideQuote.Location = new Point(9, 7);
this.lblSideQuote.Name = "lblSideQuote";
this.lblSideQuote.Size = new Size(3, 47);
this.lblSideQuote.TabIndex = 14;
this.lblQuoteContainer.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
this.lblQuoteContainer.BackColor = Color.FromArgb(235, 244, 255);
this.lblQuoteContainer.Font = new Font("Segoe UI", 9f);
this.lblQuoteContainer.ForeColor = Color.Black;
this.lblQuoteContainer.Location = new Point(12, 7);
this.lblQuoteContainer.Name = "lblQuoteContainer";
this.lblQuoteContainer.Size = new Size(362, 47);
this.lblQuoteContainer.TabIndex = 15;
base.AutoScaleDimensions = new SizeF(6f, 13f);
base.AutoScaleMode = AutoScaleMode.Font;
this.BackColor = Color.White;
base.Controls.Add(this.lblSideQuote);
base.Controls.Add(this.lnkFreeTrialSignup);
base.Controls.Add(this.lblMessage);
base.Controls.Add(this.lblQuoteContainer);
base.Name = "FreeTrialMessage";
base.Size = new Size(383, 60);
base.ResumeLayout(false);
base.PerformLayout();
}
// Token: 0x04000123 RID: 291
private bool _hidden = false;
// Token: 0x04000124 RID: 292
private IContainer components = null;
// Token: 0x04000125 RID: 293
private Label lblMessage;
// Token: 0x04000126 RID: 294
private LinkLabel lnkFreeTrialSignup;
// Token: 0x04000127 RID: 295
private Label lblSideQuote;
// Token: 0x04000128 RID: 296
private Label lblQuoteContainer;
// Token: 0x04000129 RID: 297
private ToolTip toolTip;
}
}