using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
using System_Security_2010.My;
using Microsoft.VisualBasic.CompilerServices;
using Microsoft.VisualBasic.Devices;

namespace System_Security_2010;

[DesignerGenerated]
public class Settings : Form
{
	private static List<WeakReference> __ENCList = new List<WeakReference>();

	private IContainer components;

	[AccessedThroughProperty("Timer1")]
	private Timer _Timer1;

	[AccessedThroughProperty("TrackBar1")]
	private TrackBar _TrackBar1;

	[AccessedThroughProperty("Label1")]
	private Label _Label1;

	[AccessedThroughProperty("Label2")]
	private Label _Label2;

	[AccessedThroughProperty("Label3")]
	private Label _Label3;

	[AccessedThroughProperty("Label4")]
	private Label _Label4;

	[AccessedThroughProperty("Label5")]
	private Label _Label5;

	[AccessedThroughProperty("Label6")]
	private Label _Label6;

	private Point AppLocation;

	private Point CurLocation;

	internal virtual Timer Timer1
	{
		[DebuggerNonUserCode]
		get
		{
			return _Timer1;
		}
		[MethodImpl(MethodImplOptions.Synchronized)]
		[DebuggerNonUserCode]
		set
		{
			EventHandler value2 = Timer1_Tick;
			if (_Timer1 != null)
			{
				_Timer1.Tick -= value2;
			}
			_Timer1 = value;
			if (_Timer1 != null)
			{
				_Timer1.Tick += value2;
			}
		}
	}

	internal virtual TrackBar TrackBar1
	{
		[DebuggerNonUserCode]
		get
		{
			return _TrackBar1;
		}
		[MethodImpl(MethodImplOptions.Synchronized)]
		[DebuggerNonUserCode]
		set
		{
			_TrackBar1 = value;
		}
	}

	internal virtual Label Label1
	{
		[DebuggerNonUserCode]
		get
		{
			return _Label1;
		}
		[MethodImpl(MethodImplOptions.Synchronized)]
		[DebuggerNonUserCode]
		set
		{
			_Label1 = value;
		}
	}

	internal virtual Label Label2
	{
		[DebuggerNonUserCode]
		get
		{
			return _Label2;
		}
		[MethodImpl(MethodImplOptions.Synchronized)]
		[DebuggerNonUserCode]
		set
		{
			_Label2 = value;
		}
	}

	internal virtual Label Label3
	{
		[DebuggerNonUserCode]
		get
		{
			return _Label3;
		}
		[MethodImpl(MethodImplOptions.Synchronized)]
		[DebuggerNonUserCode]
		set
		{
			_Label3 = value;
		}
	}

	internal virtual Label Label4
	{
		[DebuggerNonUserCode]
		get
		{
			return _Label4;
		}
		[MethodImpl(MethodImplOptions.Synchronized)]
		[DebuggerNonUserCode]
		set
		{
			_Label4 = value;
		}
	}

	internal virtual Label Label5
	{
		[DebuggerNonUserCode]
		get
		{
			return _Label5;
		}
		[MethodImpl(MethodImplOptions.Synchronized)]
		[DebuggerNonUserCode]
		set
		{
			EventHandler value2 = Label5_Click;
			if (_Label5 != null)
			{
				_Label5.Click -= value2;
			}
			_Label5 = value;
			if (_Label5 != null)
			{
				_Label5.Click += value2;
			}
		}
	}

	internal virtual Label Label6
	{
		[DebuggerNonUserCode]
		get
		{
			return _Label6;
		}
		[MethodImpl(MethodImplOptions.Synchronized)]
		[DebuggerNonUserCode]
		set
		{
			_Label6 = value;
		}
	}

	public Settings()
	{
		base.MouseDown += Quit_MouseDown;
		base.Load += Quit_Load;
		base.MouseUp += Quit_MouseUp;
		__ENCAddToList(this);
		ref Point appLocation = ref AppLocation;
		appLocation = new Point(0, 0);
		ref Point curLocation = ref CurLocation;
		curLocation = new Point(0, 0);
		InitializeComponent();
	}

	[DebuggerNonUserCode]
	private static void __ENCAddToList(object value)
	{
		checked
		{
			lock (__ENCList)
			{
				if (__ENCList.Count == __ENCList.Capacity)
				{
					int num = 0;
					int num2 = __ENCList.Count - 1;
					int num3 = 0;
					while (true)
					{
						int num4 = num3;
						int num5 = num2;
						if (num4 > num5)
						{
							break;
						}
						WeakReference weakReference = __ENCList[num3];
						if (weakReference.IsAlive)
						{
							if (num3 != num)
							{
								__ENCList[num] = __ENCList[num3];
							}
							num++;
						}
						num3++;
					}
					__ENCList.RemoveRange(num, __ENCList.Count - num);
					__ENCList.Capacity = __ENCList.Count;
				}
				__ENCList.Add(new WeakReference(RuntimeHelpers.GetObjectValue(value)));
			}
		}
	}

	[DebuggerNonUserCode]
	protected override void Dispose(bool disposing)
	{
		try
		{
			if ((disposing && components != null) ? true : false)
			{
				components.Dispose();
			}
		}
		finally
		{
			base.Dispose(disposing);
		}
	}

	[System.Diagnostics.DebuggerStepThrough]
	private void InitializeComponent()
	{
		components = new System.ComponentModel.Container();
		System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(System_Security_2010.Settings));
		Timer1 = new System.Windows.Forms.Timer(components);
		TrackBar1 = new System.Windows.Forms.TrackBar();
		Label1 = new System.Windows.Forms.Label();
		Label2 = new System.Windows.Forms.Label();
		Label3 = new System.Windows.Forms.Label();
		Label4 = new System.Windows.Forms.Label();
		Label5 = new System.Windows.Forms.Label();
		Label6 = new System.Windows.Forms.Label();
		((System.ComponentModel.ISupportInitialize)TrackBar1).BeginInit();
		SuspendLayout();
		Timer1.Interval = 2;
		TrackBar1.Enabled = false;
		System.Drawing.Point point2 = (TrackBar1.Location = new System.Drawing.Point(12, 41));
		TrackBar1.Maximum = 2;
		TrackBar1.Name = "TrackBar1";
		System.Drawing.Size size2 = (TrackBar1.Size = new System.Drawing.Size(416, 45));
		TrackBar1.TabIndex = 0;
		Label1.AutoSize = true;
		point2 = (Label1.Location = new System.Drawing.Point(12, 73));
		Label1.Name = "Label1";
		size2 = (Label1.Size = new System.Drawing.Size(27, 13));
		Label1.TabIndex = 1;
		Label1.Text = "Low";
		Label2.AutoSize = true;
		point2 = (Label2.Location = new System.Drawing.Point(197, 73));
		Label2.Name = "Label2";
		size2 = (Label2.Size = new System.Drawing.Size(44, 13));
		Label2.TabIndex = 2;
		Label2.Text = "Medium";
		Label3.AutoSize = true;
		point2 = (Label3.Location = new System.Drawing.Point(399, 73));
		Label3.Name = "Label3";
		size2 = (Label3.Size = new System.Drawing.Size(29, 13));
		Label3.TabIndex = 3;
		Label3.Text = "High";
		Label4.AutoSize = true;
		Label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
		point2 = (Label4.Location = new System.Drawing.Point(161, 9));
		Label4.Name = "Label4";
		size2 = (Label4.Size = new System.Drawing.Size(117, 16));
		Label4.TabIndex = 4;
		Label4.Text = "Firewall Protection";
		Label5.AutoSize = true;
		Label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9f, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 0);
		point2 = (Label5.Location = new System.Drawing.Point(423, 1));
		Label5.Name = "Label5";
		size2 = (Label5.Size = new System.Drawing.Size(16, 15));
		Label5.TabIndex = 5;
		Label5.Text = "X";
		Label6.AutoSize = true;
		Label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
		Label6.ForeColor = System.Drawing.Color.FromArgb(64, 64, 64);
		point2 = (Label6.Location = new System.Drawing.Point(39, 98));
		Label6.Name = "Label6";
		size2 = (Label6.Size = new System.Drawing.Size(360, 16));
		Label6.TabIndex = 6;
		Label6.Text = "You must Activate System Security 2010 to activate Firewall.";
		System.Drawing.SizeF sizeF2 = (AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f));
		AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
		BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
		size2 = (ClientSize = new System.Drawing.Size(440, 123));
		Controls.Add(Label6);
		Controls.Add(Label5);
		Controls.Add(Label4);
		Controls.Add(Label3);
		Controls.Add(Label2);
		Controls.Add(Label1);
		Controls.Add(TrackBar1);
		FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
		Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
		MaximizeBox = false;
		MinimizeBox = false;
		Name = "Settings";
		System.Windows.Forms.Padding padding2 = (Padding = new System.Windows.Forms.Padding(9));
		ShowInTaskbar = false;
		StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
		TopMost = true;
		((System.ComponentModel.ISupportInitialize)TrackBar1).EndInit();
		ResumeLayout(false);
		PerformLayout();
	}

	private void Quit_Load(object sender, EventArgs e)
	{
		if (((ServerComputer)MyProject.Computer).get_FileSystem().FileExists("RegSS10.dll.egisenc"))
		{
			TrackBar1.Enabled = true;
			Label6.Text = "High Protection may affect your Program's accessing the Internet.";
		}
		else
		{
			TrackBar1.Enabled = false;
		}
	}

	private void Sync()
	{
		AppLocation = Location;
		CurLocation = Cursor.Position;
	}

	private void Timer1_Tick(object sender, EventArgs e)
	{
		Location = AppLocation - (Size)CurLocation + (Size)Cursor.Position;
	}

	private void Quit_MouseDown(object sender, MouseEventArgs e)
	{
		Timer1.Enabled = true;
		Timer1.Start();
		Sync();
	}

	private void Quit_MouseUp(object sender, MouseEventArgs e)
	{
		Timer1.Stop();
		Sync();
	}

	private void Label5_Click(object sender, EventArgs e)
	{
		Close();
	}
}
